diff --git a/.agents/skills/cli-api/SKILL.md b/.agents/skills/cli-api/SKILL.md index a9fc2f456a..417506c4a5 100644 --- a/.agents/skills/cli-api/SKILL.md +++ b/.agents/skills/cli-api/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-api -description: CLI tool (csdk) for the api API — provides CRUD commands for 90 tables and 49 custom operations +description: CLI tool (csdk) for the api API — provides CRUD commands for 91 tables and 43 custom operations --- # cli-api -CLI tool (csdk) for the api API — provides CRUD commands for 90 tables and 49 custom operations +CLI tool (csdk) for the api API — provides CRUD commands for 91 tables and 43 custom operations ## Usage @@ -105,6 +105,7 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-get-site-previews-record](references/platform-get-site-previews-record.md) - [platform-managed-domain](references/platform-managed-domain.md) - [platform-page](references/platform-page.md) +- [platform-reserved-subdomain](references/platform-reserved-subdomain.md) - [platform-site-app-link](references/platform-site-app-link.md) - [platform-site](references/platform-site.md) - [platform-site-deep-link](references/platform-site-deep-link.md) @@ -146,7 +147,6 @@ See the `references/` directory for detailed per-entity API documentation: - [view-rule](references/view-rule.md) - [view-table](references/view-table.md) - [webauthn-setting](references/webauthn-setting.md) -- [api-schema-names](references/api-schema-names.md) - [apply-registry-defaults](references/apply-registry-defaults.md) - [email-shared-account](references/email-shared-account.md) - [get-site-preview-commit](references/get-site-preview-commit.md) @@ -158,16 +158,12 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-sites-deep-link-url](references/platform-sites-deep-link-url.md) - [platform-sites-site-origin](references/platform-sites-site-origin.md) - [platform-verify-site-preview-token](references/platform-verify-site-preview-token.md) -- [resolve-deep-link](references/resolve-deep-link.md) -- [resolve-route](references/resolve-route.md) -- [resolve-site-app-links](references/resolve-site-app-links.md) - [sites-deep-link-url](references/sites-deep-link-url.md) - [sites-site-origin](references/sites-site-origin.md) - [verify-site-preview-token](references/verify-site-preview-token.md) - [accept-database-transfer](references/accept-database-transfer.md) - [apply-rls](references/apply-rls.md) - [cancel-database-transfer](references/cancel-database-transfer.md) -- [create-function-from-source](references/create-function-from-source.md) - [delete-site-preview](references/delete-site-preview.md) - [domains-assign-subdomain](references/domains-assign-subdomain.md) - [mint-site-preview-token](references/mint-site-preview-token.md) @@ -194,4 +190,3 @@ See the `references/` directory for detailed per-entity API documentation: - [sites-provision-static-site](references/sites-provision-static-site.md) - [suspend-database](references/suspend-database.md) - [unsuspend-database](references/unsuspend-database.md) -- [update-function-from-source](references/update-function-from-source.md) diff --git a/.agents/skills/cli-api/references/api.md b/.agents/skills/cli-api/references/api.md index 8df212fb8f..5009b445ab 100644 --- a/.agents/skills/cli-api/references/api.md +++ b/.agents/skills/cli-api/references/api.md @@ -12,8 +12,8 @@ csdk api list --where.. --orderBy csdk api list --limit 10 --after csdk api find-first --where.. csdk api get --id -csdk api create --databaseId --name [--anonRole ] [--config ] [--dbname ] [--isPublished ] [--roleName ] -csdk api update --id [--anonRole ] [--config ] [--databaseId ] [--dbname ] [--isPublished ] [--name ] [--roleName ] +csdk api create --databaseId --name [--anonRole ] [--config ] [--isPublished ] [--roleName ] +csdk api update --id [--anonRole ] [--config ] [--databaseId ] [--isPublished ] [--name ] [--roleName ] csdk api delete --id ``` @@ -58,7 +58,7 @@ csdk api list --where.id.equalTo --orderBy ID_ASC ### Create a api ```bash -csdk api create --databaseId --name [--anonRole ] [--config ] [--dbname ] [--isPublished ] [--roleName ] +csdk api create --databaseId --name [--anonRole ] [--config ] [--isPublished ] [--roleName ] ``` ### Get a api by id diff --git a/.agents/skills/cli-api/references/platform-api.md b/.agents/skills/cli-api/references/platform-api.md index 19250b7e37..a6af782ef8 100644 --- a/.agents/skills/cli-api/references/platform-api.md +++ b/.agents/skills/cli-api/references/platform-api.md @@ -12,8 +12,8 @@ csdk platform-api list --where.. --orderBy csdk platform-api list --limit 10 --after csdk platform-api find-first --where.. csdk platform-api get --id -csdk platform-api create --name [--anonRole ] [--config ] [--dbname ] [--isPublished ] [--roleName ] -csdk platform-api update --id [--anonRole ] [--config ] [--dbname ] [--isPublished ] [--name ] [--roleName ] +csdk platform-api create --name [--anonRole ] [--config ] [--isPublished ] [--roleName ] +csdk platform-api update --id [--anonRole ] [--config ] [--isPublished ] [--name ] [--roleName ] csdk platform-api delete --id ``` @@ -58,7 +58,7 @@ csdk platform-api list --where.id.equalTo --orderBy ID_ASC ### Create a platformApi ```bash -csdk platform-api create --name [--anonRole ] [--config ] [--dbname ] [--isPublished ] [--roleName ] +csdk platform-api create --name [--anonRole ] [--config ] [--isPublished ] [--roleName ] ``` ### Get a platformApi by id diff --git a/.agents/skills/cli-api/references/platform-reserved-subdomain.md b/.agents/skills/cli-api/references/platform-reserved-subdomain.md new file mode 100644 index 0000000000..b074f84226 --- /dev/null +++ b/.agents/skills/cli-api/references/platform-reserved-subdomain.md @@ -0,0 +1,68 @@ +# platformReservedSubdomain + + + +CRUD operations for PlatformReservedSubdomain records via csdk CLI + +## Usage + +```bash +csdk platform-reserved-subdomain list +csdk platform-reserved-subdomain list --where.. --orderBy +csdk platform-reserved-subdomain list --limit 10 --after +csdk platform-reserved-subdomain find-first --where.. +csdk platform-reserved-subdomain get --id +csdk platform-reserved-subdomain create --label [--createdByPrincipal ] [--match ] [--reason ] [--updatedByPrincipal ] +csdk platform-reserved-subdomain update --id [--createdByPrincipal ] [--label ] [--match ] [--reason ] [--updatedByPrincipal ] +csdk platform-reserved-subdomain delete --id +``` + +## Examples + +### List platformReservedSubdomain records + +```bash +csdk platform-reserved-subdomain list +``` + +### List platformReservedSubdomain records with pagination + +```bash +csdk platform-reserved-subdomain list --limit 10 --offset 0 +``` + +### List platformReservedSubdomain records with cursor pagination + +```bash +csdk platform-reserved-subdomain list --limit 10 --after +``` + +### Find first matching platformReservedSubdomain + +```bash +csdk platform-reserved-subdomain find-first --where.id.equalTo +``` + +### List platformReservedSubdomain records with field selection + +```bash +csdk platform-reserved-subdomain list --select id,id +``` + +### List platformReservedSubdomain records with filtering and ordering + +```bash +csdk platform-reserved-subdomain list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a platformReservedSubdomain + +```bash +csdk platform-reserved-subdomain create --label [--createdByPrincipal ] [--match ] [--reason ] [--updatedByPrincipal ] +``` + +### Get a platformReservedSubdomain by id + +```bash +csdk platform-reserved-subdomain get --id +``` diff --git a/.agents/skills/cli-auth/SKILL.md b/.agents/skills/cli-auth/SKILL.md index e6cbdedc26..1ebd5ac93e 100644 --- a/.agents/skills/cli-auth/SKILL.md +++ b/.agents/skills/cli-auth/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-auth -description: CLI tool (csdk) for the auth API — provides CRUD commands for 15 tables and 61 custom operations +description: CLI tool (csdk) for the auth API — provides CRUD commands for 15 tables and 63 custom operations --- # cli-auth -CLI tool (csdk) for the auth API — provides CRUD commands for 15 tables and 61 custom operations +CLI tool (csdk) for the auth API — provides CRUD commands for 15 tables and 63 custom operations ## Usage @@ -77,6 +77,7 @@ See the `references/` directory for detailed per-entity API documentation: - [current-user-id](references/current-user-id.md) - [get-mfa-status](references/get-mfa-status.md) - [require-step-up](references/require-step-up.md) +- [sign-in-options](references/sign-in-options.md) - [approve-device](references/approve-device.md) - [check-password](references/check-password.md) - [complete-mfa-challenge](references/complete-mfa-challenge.md) @@ -96,6 +97,7 @@ See the `references/` directory for detailed per-entity API documentation: - [enable-email-mfa](references/enable-email-mfa.md) - [enable-sms-mfa](references/enable-sms-mfa.md) - [enable-totp](references/enable-totp.md) +- [exchange-native-handoff](references/exchange-native-handoff.md) - [extend-token-expires](references/extend-token-expires.md) - [forgot-password](references/forgot-password.md) - [generate-backup-codes](references/generate-backup-codes.md) diff --git a/.agents/skills/cli-auth/references/create-api-key.md b/.agents/skills/cli-auth/references/create-api-key.md index 065a468e00..7c94c04b8c 100644 --- a/.agents/skills/cli-auth/references/create-api-key.md +++ b/.agents/skills/cli-auth/references/create-api-key.md @@ -2,7 +2,7 @@ -Execute the createApiKey mutation +Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key. ## Usage diff --git a/.agents/skills/cli-auth/references/exchange-native-handoff.md b/.agents/skills/cli-auth/references/exchange-native-handoff.md new file mode 100644 index 0000000000..c7f8bdce0b --- /dev/null +++ b/.agents/skills/cli-auth/references/exchange-native-handoff.md @@ -0,0 +1,19 @@ +# exchangeNativeHandoff + + + +Execute the exchangeNativeHandoff mutation + +## Usage + +```bash +csdk exchange-native-handoff --input.clientMutationId --input.code --input.codeVerifier --input.credentialKind +``` + +## Examples + +### Run exchangeNativeHandoff + +```bash +csdk exchange-native-handoff --input.clientMutationId --input.code --input.codeVerifier --input.credentialKind +``` diff --git a/.agents/skills/cli-auth/references/request-magic-link.md b/.agents/skills/cli-auth/references/request-magic-link.md index b46352f88e..520de6ae3a 100644 --- a/.agents/skills/cli-auth/references/request-magic-link.md +++ b/.agents/skills/cli-auth/references/request-magic-link.md @@ -7,7 +7,7 @@ Execute the requestMagicLink mutation ## Usage ```bash -csdk request-magic-link --input.clientMutationId --input.email --input.next +csdk request-magic-link --input.clientMutationId --input.codeChallenge --input.email --input.nativeRedirectUri --input.next ``` ## Examples @@ -15,5 +15,5 @@ csdk request-magic-link --input.clientMutationId --input.email ### Run requestMagicLink ```bash -csdk request-magic-link --input.clientMutationId --input.email --input.next +csdk request-magic-link --input.clientMutationId --input.codeChallenge --input.email --input.nativeRedirectUri --input.next ``` diff --git a/.agents/skills/cli-auth/references/set-password.md b/.agents/skills/cli-auth/references/set-password.md index a142c5366f..7ce0bbb271 100644 --- a/.agents/skills/cli-auth/references/set-password.md +++ b/.agents/skills/cli-auth/references/set-password.md @@ -7,7 +7,7 @@ Execute the setPassword mutation ## Usage ```bash -csdk set-password --input.clientMutationId --input.currentPassword --input.newPassword +csdk set-password --input.clientMutationId --input.currentPassword --input.newPassword --input.signOutOtherSessions ``` ## Examples @@ -15,5 +15,5 @@ csdk set-password --input.clientMutationId --input.currentPassword --input.currentPassword --input.newPassword +csdk set-password --input.clientMutationId --input.currentPassword --input.newPassword --input.signOutOtherSessions ``` diff --git a/.agents/skills/cli-auth/references/sign-in-options.md b/.agents/skills/cli-auth/references/sign-in-options.md new file mode 100644 index 0000000000..3817d2f2fd --- /dev/null +++ b/.agents/skills/cli-auth/references/sign-in-options.md @@ -0,0 +1,19 @@ +# signInOptions + + + +Execute the signInOptions query + +## Usage + +```bash +csdk sign-in-options +``` + +## Examples + +### Run signInOptions + +```bash +csdk sign-in-options +``` diff --git a/.agents/skills/cli-compute/SKILL.md b/.agents/skills/cli-compute/SKILL.md index af0f7f1826..65e1861258 100644 --- a/.agents/skills/cli-compute/SKILL.md +++ b/.agents/skills/cli-compute/SKILL.md @@ -59,7 +59,6 @@ See the `references/` directory for detailed per-entity API documentation: - [embedder](references/embedder.md) - [build](references/build.md) - [build-step](references/build-step.md) -- [builder-binding](references/builder-binding.md) - [content-preset](references/content-preset.md) - [database-function-graph](references/database-function-graph.md) - [database-function-graph-execution-cancel-request](references/database-function-graph-execution-cancel-request.md) @@ -103,7 +102,6 @@ See the `references/` directory for detailed per-entity API documentation: - [namespace-event](references/namespace-event.md) - [platform-build](references/platform-build.md) - [platform-build-step](references/platform-build-step.md) -- [platform-builder-binding](references/platform-builder-binding.md) - [platform-function-api-binding](references/platform-function-api-binding.md) - [platform-function-capability-binding](references/platform-function-capability-binding.md) - [platform-function-definition](references/platform-function-definition.md) @@ -150,6 +148,7 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-resources-health](references/platform-resources-health.md) - [platform-resources-requirements-state](references/platform-resources-requirements-state.md) - [platform-resources-resolved-requirement](references/platform-resources-resolved-requirement.md) +- [platform-service-binding](references/platform-service-binding.md) - [platform-webhook-endpoint](references/platform-webhook-endpoint.md) - [platform-webhook-event](references/platform-webhook-event.md) - [proposal-comment](references/proposal-comment.md) @@ -178,6 +177,7 @@ See the `references/` directory for detailed per-entity API documentation: - [resources-health](references/resources-health.md) - [resources-requirements-state](references/resources-requirements-state.md) - [resources-resolved-requirement](references/resources-resolved-requirement.md) +- [service-binding](references/service-binding.md) - [webhook-endpoint](references/webhook-endpoint.md) - [webhook-event](references/webhook-event.md) - [database-read-function-graph](references/database-read-function-graph.md) diff --git a/.agents/skills/cli-compute/references/platform-service-binding.md b/.agents/skills/cli-compute/references/platform-service-binding.md new file mode 100644 index 0000000000..ad0e5da311 --- /dev/null +++ b/.agents/skills/cli-compute/references/platform-service-binding.md @@ -0,0 +1,68 @@ +# platformServiceBinding + + + +CRUD operations for PlatformServiceBinding records via csdk CLI + +## Usage + +```bash +csdk platform-service-binding list +csdk platform-service-binding list --where.. --orderBy +csdk platform-service-binding list --limit 10 --after +csdk platform-service-binding find-first --where.. +csdk platform-service-binding get --id +csdk platform-service-binding create --installationId --installationScope --kind --namespaceId [--createdBy ] [--createdByPrincipal ] [--lastError ] [--metadata ] [--observedHost ] [--realm ] [--status ] [--updatedBy ] [--updatedByPrincipal ] +csdk platform-service-binding update --id [--createdBy ] [--createdByPrincipal ] [--installationId ] [--installationScope ] [--kind ] [--lastError ] [--metadata ] [--namespaceId ] [--observedHost ] [--realm ] [--status ] [--updatedBy ] [--updatedByPrincipal ] +csdk platform-service-binding delete --id +``` + +## Examples + +### List platformServiceBinding records + +```bash +csdk platform-service-binding list +``` + +### List platformServiceBinding records with pagination + +```bash +csdk platform-service-binding list --limit 10 --offset 0 +``` + +### List platformServiceBinding records with cursor pagination + +```bash +csdk platform-service-binding list --limit 10 --after +``` + +### Find first matching platformServiceBinding + +```bash +csdk platform-service-binding find-first --where.id.equalTo +``` + +### List platformServiceBinding records with field selection + +```bash +csdk platform-service-binding list --select id,id +``` + +### List platformServiceBinding records with filtering and ordering + +```bash +csdk platform-service-binding list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a platformServiceBinding + +```bash +csdk platform-service-binding create --installationId --installationScope --kind --namespaceId [--createdBy ] [--createdByPrincipal ] [--lastError ] [--metadata ] [--observedHost ] [--realm ] [--status ] [--updatedBy ] [--updatedByPrincipal ] +``` + +### Get a platformServiceBinding by id + +```bash +csdk platform-service-binding get --id +``` diff --git a/.agents/skills/cli-compute/references/service-binding.md b/.agents/skills/cli-compute/references/service-binding.md new file mode 100644 index 0000000000..b50ecfe71c --- /dev/null +++ b/.agents/skills/cli-compute/references/service-binding.md @@ -0,0 +1,68 @@ +# serviceBinding + + + +CRUD operations for ServiceBinding records via csdk CLI + +## Usage + +```bash +csdk service-binding list +csdk service-binding list --where.. --orderBy +csdk service-binding list --limit 10 --after +csdk service-binding find-first --where.. +csdk service-binding get --id +csdk service-binding create --databaseId --installationId --installationScope --kind --namespaceId [--createdBy ] [--createdByPrincipal ] [--lastError ] [--metadata ] [--observedHost ] [--realm ] [--status ] [--updatedBy ] [--updatedByPrincipal ] +csdk service-binding update --id [--createdBy ] [--createdByPrincipal ] [--databaseId ] [--installationId ] [--installationScope ] [--kind ] [--lastError ] [--metadata ] [--namespaceId ] [--observedHost ] [--realm ] [--status ] [--updatedBy ] [--updatedByPrincipal ] +csdk service-binding delete --id +``` + +## Examples + +### List serviceBinding records + +```bash +csdk service-binding list +``` + +### List serviceBinding records with pagination + +```bash +csdk service-binding list --limit 10 --offset 0 +``` + +### List serviceBinding records with cursor pagination + +```bash +csdk service-binding list --limit 10 --after +``` + +### Find first matching serviceBinding + +```bash +csdk service-binding find-first --where.id.equalTo +``` + +### List serviceBinding records with field selection + +```bash +csdk service-binding list --select id,id +``` + +### List serviceBinding records with filtering and ordering + +```bash +csdk service-binding list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a serviceBinding + +```bash +csdk service-binding create --databaseId --installationId --installationScope --kind --namespaceId [--createdBy ] [--createdByPrincipal ] [--lastError ] [--metadata ] [--observedHost ] [--realm ] [--status ] [--updatedBy ] [--updatedByPrincipal ] +``` + +### Get a serviceBinding by id + +```bash +csdk service-binding get --id +``` diff --git a/.agents/skills/cli-modules/references/blueprint-construction.md b/.agents/skills/cli-modules/references/blueprint-construction.md index 697a91ecc1..94c05e5185 100644 --- a/.agents/skills/cli-modules/references/blueprint-construction.md +++ b/.agents/skills/cli-modules/references/blueprint-construction.md @@ -12,8 +12,8 @@ csdk blueprint-construction list --where.. --orderBy csdk blueprint-construction list --limit 10 --after csdk blueprint-construction find-first --where.. csdk blueprint-construction get --id -csdk blueprint-construction create --blueprintId --databaseId [--constructedAt ] [--constructedDefinition ] [--schemaId ] [--status ] [--tableMap ] -csdk blueprint-construction update --id [--blueprintId ] [--constructedAt ] [--constructedDefinition ] [--databaseId ] [--schemaId ] [--status ] [--tableMap ] +csdk blueprint-construction create --blueprintId --databaseId [--constructedAt ] [--constructedDefinition ] [--error ] [--schemaId ] [--status ] [--tableMap ] +csdk blueprint-construction update --id [--blueprintId ] [--constructedAt ] [--constructedDefinition ] [--databaseId ] [--error ] [--schemaId ] [--status ] [--tableMap ] csdk blueprint-construction delete --id ``` @@ -58,7 +58,7 @@ csdk blueprint-construction list --where.id.equalTo --orderBy ID_ASC ### Create a blueprintConstruction ```bash -csdk blueprint-construction create --blueprintId --databaseId [--constructedAt ] [--constructedDefinition ] [--schemaId ] [--status ] [--tableMap ] +csdk blueprint-construction create --blueprintId --databaseId [--constructedAt ] [--constructedDefinition ] [--error ] [--schemaId ] [--status ] [--tableMap ] ``` ### Get a blueprintConstruction by id diff --git a/.agents/skills/cli-modules/references/construct-blueprint.md b/.agents/skills/cli-modules/references/construct-blueprint.md index 9ff5c9623f..b59041cfc5 100644 --- a/.agents/skills/cli-modules/references/construct-blueprint.md +++ b/.agents/skills/cli-modules/references/construct-blueprint.md @@ -2,7 +2,7 @@ -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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. +Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. ## Usage diff --git a/.agents/skills/cli-modules/references/domain-module.md b/.agents/skills/cli-modules/references/domain-module.md index dec550e2ce..08f695f101 100644 --- a/.agents/skills/cli-modules/references/domain-module.md +++ b/.agents/skills/cli-modules/references/domain-module.md @@ -12,8 +12,8 @@ csdk domain-module list --where.. --orderBy csdk domain-module list --limit 10 --after csdk domain-module find-first --where.. csdk domain-module get --id -csdk domain-module create --databaseId --scope [--apiName ] [--catalogModuleId ] [--defaultCapabilities ] [--domainEventsTableId ] [--domainEventsTableName ] [--domainVerificationsTableId ] [--domainVerificationsTableName ] [--domainsTableId ] [--domainsTableName ] [--entityField ] [--entityTableId ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--schemaId ] -csdk domain-module update --id [--apiName ] [--catalogModuleId ] [--databaseId ] [--defaultCapabilities ] [--domainEventsTableId ] [--domainEventsTableName ] [--domainVerificationsTableId ] [--domainVerificationsTableName ] [--domainsTableId ] [--domainsTableName ] [--entityField ] [--entityTableId ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--schemaId ] [--scope ] +csdk domain-module create --databaseId --scope [--apiName ] [--catalogModuleId ] [--defaultCapabilities ] [--defaultReservedSubdomains ] [--domainEventsTableId ] [--domainEventsTableName ] [--domainVerificationsTableId ] [--domainVerificationsTableName ] [--domainsTableId ] [--domainsTableName ] [--entityField ] [--entityTableId ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--reservedSubdomainsTableId ] [--reservedSubdomainsTableName ] [--schemaId ] [--sweepUnverifiedDomainsFunction ] +csdk domain-module update --id [--apiName ] [--catalogModuleId ] [--databaseId ] [--defaultCapabilities ] [--defaultReservedSubdomains ] [--domainEventsTableId ] [--domainEventsTableName ] [--domainVerificationsTableId ] [--domainVerificationsTableName ] [--domainsTableId ] [--domainsTableName ] [--entityField ] [--entityTableId ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--reservedSubdomainsTableId ] [--reservedSubdomainsTableName ] [--schemaId ] [--scope ] [--sweepUnverifiedDomainsFunction ] csdk domain-module delete --id ``` @@ -58,7 +58,7 @@ csdk domain-module list --where.id.equalTo --orderBy ID_ASC ### Create a domainModule ```bash -csdk domain-module create --databaseId --scope [--apiName ] [--catalogModuleId ] [--defaultCapabilities ] [--domainEventsTableId ] [--domainEventsTableName ] [--domainVerificationsTableId ] [--domainVerificationsTableName ] [--domainsTableId ] [--domainsTableName ] [--entityField ] [--entityTableId ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--schemaId ] +csdk domain-module create --databaseId --scope [--apiName ] [--catalogModuleId ] [--defaultCapabilities ] [--defaultReservedSubdomains ] [--domainEventsTableId ] [--domainEventsTableName ] [--domainVerificationsTableId ] [--domainVerificationsTableName ] [--domainsTableId ] [--domainsTableName ] [--entityField ] [--entityTableId ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--reservedSubdomainsTableId ] [--reservedSubdomainsTableName ] [--schemaId ] [--sweepUnverifiedDomainsFunction ] ``` ### Get a domainModule by id diff --git a/.agents/skills/cli-modules/references/resource-module.md b/.agents/skills/cli-modules/references/resource-module.md index cefbafe76e..b63de11dcf 100644 --- a/.agents/skills/cli-modules/references/resource-module.md +++ b/.agents/skills/cli-modules/references/resource-module.md @@ -12,8 +12,8 @@ csdk resource-module list --where.. --orderBy csdk resource-module list --limit 10 --after csdk resource-module find-first --where.. csdk resource-module get --id -csdk resource-module create --databaseId --scope [--apiName ] [--builderBindingsTableId ] [--builderBindingsTableName ] [--defaultCapabilities ] [--entityField ] [--entityTableId ] [--installationStoreName ] [--merkleStoreModuleId ] [--namespaceModuleId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--registryBindingsTableId ] [--registryBindingsTableName ] [--requirementsStateViewName ] [--resolvedRequirementsViewName ] [--resourceBillingRollupFunction ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceEventsTableId ] [--resourceEventsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourceStatusChecksTableId ] [--resourceStatusChecksTableName ] [--resourceUsageLogTableId ] [--resourceUsageLogTableName ] [--resourceUsageSummaryTableId ] [--resourceUsageSummaryTableName ] [--resourcesTableId ] [--resourcesTableName ] [--rollupResourceUsageSummaryFunction ] [--schemaId ] -csdk resource-module update --id [--apiName ] [--builderBindingsTableId ] [--builderBindingsTableName ] [--databaseId ] [--defaultCapabilities ] [--entityField ] [--entityTableId ] [--installationStoreName ] [--merkleStoreModuleId ] [--namespaceModuleId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--registryBindingsTableId ] [--registryBindingsTableName ] [--requirementsStateViewName ] [--resolvedRequirementsViewName ] [--resourceBillingRollupFunction ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceEventsTableId ] [--resourceEventsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourceStatusChecksTableId ] [--resourceStatusChecksTableName ] [--resourceUsageLogTableId ] [--resourceUsageLogTableName ] [--resourceUsageSummaryTableId ] [--resourceUsageSummaryTableName ] [--resourcesTableId ] [--resourcesTableName ] [--rollupResourceUsageSummaryFunction ] [--schemaId ] [--scope ] +csdk resource-module create --databaseId --scope [--apiName ] [--defaultCapabilities ] [--entityField ] [--entityTableId ] [--installationStoreName ] [--merkleStoreModuleId ] [--namespaceModuleId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--registryBindingsTableId ] [--registryBindingsTableName ] [--requirementsStateViewName ] [--resolvedRequirementsViewName ] [--resourceBillingRollupFunction ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceEventsTableId ] [--resourceEventsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourceStatusChecksTableId ] [--resourceStatusChecksTableName ] [--resourceUsageLogTableId ] [--resourceUsageLogTableName ] [--resourceUsageSummaryTableId ] [--resourceUsageSummaryTableName ] [--resourcesTableId ] [--resourcesTableName ] [--rollupResourceUsageSummaryFunction ] [--schemaId ] [--serviceBindingsTableId ] [--serviceBindingsTableName ] +csdk resource-module update --id [--apiName ] [--databaseId ] [--defaultCapabilities ] [--entityField ] [--entityTableId ] [--installationStoreName ] [--merkleStoreModuleId ] [--namespaceModuleId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--registryBindingsTableId ] [--registryBindingsTableName ] [--requirementsStateViewName ] [--resolvedRequirementsViewName ] [--resourceBillingRollupFunction ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceEventsTableId ] [--resourceEventsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourceStatusChecksTableId ] [--resourceStatusChecksTableName ] [--resourceUsageLogTableId ] [--resourceUsageLogTableName ] [--resourceUsageSummaryTableId ] [--resourceUsageSummaryTableName ] [--resourcesTableId ] [--resourcesTableName ] [--rollupResourceUsageSummaryFunction ] [--schemaId ] [--scope ] [--serviceBindingsTableId ] [--serviceBindingsTableName ] csdk resource-module delete --id ``` @@ -58,7 +58,7 @@ csdk resource-module list --where.id.equalTo --orderBy ID_ASC ### Create a resourceModule ```bash -csdk resource-module create --databaseId --scope [--apiName ] [--builderBindingsTableId ] [--builderBindingsTableName ] [--defaultCapabilities ] [--entityField ] [--entityTableId ] [--installationStoreName ] [--merkleStoreModuleId ] [--namespaceModuleId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--registryBindingsTableId ] [--registryBindingsTableName ] [--requirementsStateViewName ] [--resolvedRequirementsViewName ] [--resourceBillingRollupFunction ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceEventsTableId ] [--resourceEventsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourceStatusChecksTableId ] [--resourceStatusChecksTableName ] [--resourceUsageLogTableId ] [--resourceUsageLogTableName ] [--resourceUsageSummaryTableId ] [--resourceUsageSummaryTableName ] [--resourcesTableId ] [--resourcesTableName ] [--rollupResourceUsageSummaryFunction ] [--schemaId ] +csdk resource-module create --databaseId --scope [--apiName ] [--defaultCapabilities ] [--entityField ] [--entityTableId ] [--installationStoreName ] [--merkleStoreModuleId ] [--namespaceModuleId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--registryBindingsTableId ] [--registryBindingsTableName ] [--requirementsStateViewName ] [--resolvedRequirementsViewName ] [--resourceBillingRollupFunction ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceEventsTableId ] [--resourceEventsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourceStatusChecksTableId ] [--resourceStatusChecksTableName ] [--resourceUsageLogTableId ] [--resourceUsageLogTableName ] [--resourceUsageSummaryTableId ] [--resourceUsageSummaryTableName ] [--resourcesTableId ] [--resourcesTableName ] [--rollupResourceUsageSummaryFunction ] [--schemaId ] [--serviceBindingsTableId ] [--serviceBindingsTableName ] ``` ### Get a resourceModule by id diff --git a/.agents/skills/cli-remote/SKILL.md b/.agents/skills/cli-remote/SKILL.md index 466f90a757..218296a606 100644 --- a/.agents/skills/cli-remote/SKILL.md +++ b/.agents/skills/cli-remote/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-remote -description: CLI tool (csdk) for the remote API — provides CRUD commands for 3 tables and 2 custom operations +description: CLI tool (csdk) for the remote API — provides CRUD commands for 3 tables and 3 custom operations --- # cli-remote -CLI tool (csdk) for the remote API — provides CRUD commands for 3 tables and 2 custom operations +CLI tool (csdk) for the remote API — provides CRUD commands for 3 tables and 3 custom operations ## Usage @@ -59,5 +59,6 @@ See the `references/` directory for detailed per-entity API documentation: - [machine](references/machine.md) - [machine-message](references/machine-message.md) - [machine-session](references/machine-session.md) +- [current-database-id](references/current-database-id.md) - [machines-enroll](references/machines-enroll.md) - [provision-bucket](references/provision-bucket.md) diff --git a/.agents/skills/cli-remote/references/current-database-id.md b/.agents/skills/cli-remote/references/current-database-id.md new file mode 100644 index 0000000000..a4414dd70e --- /dev/null +++ b/.agents/skills/cli-remote/references/current-database-id.md @@ -0,0 +1,19 @@ +# currentDatabaseId + + + +Execute the currentDatabaseId query + +## Usage + +```bash +csdk current-database-id +``` + +## Examples + +### Run currentDatabaseId + +```bash +csdk current-database-id +``` diff --git a/.agents/skills/hooks-api/SKILL.md b/.agents/skills/hooks-api/SKILL.md index ddadf430a3..80bed6c707 100644 --- a/.agents/skills/hooks-api/SKILL.md +++ b/.agents/skills/hooks-api/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-api -description: React Query hooks for the api API — provides typed query and mutation hooks for 90 tables and 49 custom operations +description: React Query hooks for the api API — provides typed query and mutation hooks for 91 tables and 43 custom operations --- # hooks-api -React Query hooks for the api API — provides typed query and mutation hooks for 90 tables and 49 custom operations +React Query hooks for the api API — provides typed query and mutation hooks for 91 tables and 43 custom operations ## Usage @@ -87,6 +87,7 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-get-site-previews-record](references/platform-get-site-previews-record.md) - [platform-managed-domain](references/platform-managed-domain.md) - [platform-page](references/platform-page.md) +- [platform-reserved-subdomain](references/platform-reserved-subdomain.md) - [platform-site-app-link](references/platform-site-app-link.md) - [platform-site](references/platform-site.md) - [platform-site-deep-link](references/platform-site-deep-link.md) @@ -128,7 +129,6 @@ See the `references/` directory for detailed per-entity API documentation: - [view-rule](references/view-rule.md) - [view-table](references/view-table.md) - [webauthn-setting](references/webauthn-setting.md) -- [api-schema-names](references/api-schema-names.md) - [apply-registry-defaults](references/apply-registry-defaults.md) - [email-shared-account](references/email-shared-account.md) - [get-site-preview-commit](references/get-site-preview-commit.md) @@ -140,16 +140,12 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-sites-deep-link-url](references/platform-sites-deep-link-url.md) - [platform-sites-site-origin](references/platform-sites-site-origin.md) - [platform-verify-site-preview-token](references/platform-verify-site-preview-token.md) -- [resolve-deep-link](references/resolve-deep-link.md) -- [resolve-route](references/resolve-route.md) -- [resolve-site-app-links](references/resolve-site-app-links.md) - [sites-deep-link-url](references/sites-deep-link-url.md) - [sites-site-origin](references/sites-site-origin.md) - [verify-site-preview-token](references/verify-site-preview-token.md) - [accept-database-transfer](references/accept-database-transfer.md) - [apply-rls](references/apply-rls.md) - [cancel-database-transfer](references/cancel-database-transfer.md) -- [create-function-from-source](references/create-function-from-source.md) - [delete-site-preview](references/delete-site-preview.md) - [domains-assign-subdomain](references/domains-assign-subdomain.md) - [mint-site-preview-token](references/mint-site-preview-token.md) @@ -176,4 +172,3 @@ See the `references/` directory for detailed per-entity API documentation: - [sites-provision-static-site](references/sites-provision-static-site.md) - [suspend-database](references/suspend-database.md) - [unsuspend-database](references/unsuspend-database.md) -- [update-function-from-source](references/update-function-from-source.md) diff --git a/.agents/skills/hooks-api/references/api.md b/.agents/skills/hooks-api/references/api.md index 30167e3754..5c0c89da3b 100644 --- a/.agents/skills/hooks-api/references/api.md +++ b/.agents/skills/hooks-api/references/api.md @@ -7,8 +7,8 @@ API surfaces exposed by this scope; publication makes a surface bindable from ot ## Usage ```typescript -useApisQuery({ selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } } }) -useApiQuery({ id: '', selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } } }) +useApisQuery({ selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } } }) +useApiQuery({ id: '', selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } } }) useCreateApiMutation({ selection: { fields: { id: true } } }) useUpdateApiMutation({ selection: { fields: { id: true } } }) useDeleteApiMutation({}) @@ -20,7 +20,7 @@ useDeleteApiMutation({}) ```typescript 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 } }, + selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useApisQuery({ const { mutate } = useCreateApiMutation({ selection: { fields: { id: true } }, }); -mutate({ anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }); +mutate({ anonRole: '', config: '', databaseId: '', isPublished: '', name: '', roleName: '' }); ``` diff --git a/.agents/skills/hooks-api/references/platform-api.md b/.agents/skills/hooks-api/references/platform-api.md index 27d363ff58..5acd8fa85c 100644 --- a/.agents/skills/hooks-api/references/platform-api.md +++ b/.agents/skills/hooks-api/references/platform-api.md @@ -7,8 +7,8 @@ API surfaces exposed by this scope; publication makes a surface bindable from ot ## Usage ```typescript -usePlatformApisQuery({ selection: { fields: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } } }) -usePlatformApiQuery({ id: '', selection: { fields: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } } }) +usePlatformApisQuery({ selection: { fields: { anonRole: true, config: true, createdAt: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } } }) +usePlatformApiQuery({ id: '', selection: { fields: { anonRole: true, config: true, createdAt: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } } }) useCreatePlatformApiMutation({ selection: { fields: { id: true } } }) useUpdatePlatformApiMutation({ selection: { fields: { id: true } } }) useDeletePlatformApiMutation({}) @@ -20,7 +20,7 @@ useDeletePlatformApiMutation({}) ```typescript const { data, isLoading } = usePlatformApisQuery({ - selection: { fields: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, + selection: { fields: { anonRole: true, config: true, createdAt: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = usePlatformApisQuery({ const { mutate } = useCreatePlatformApiMutation({ selection: { fields: { id: true } }, }); -mutate({ anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }); +mutate({ anonRole: '', config: '', isPublished: '', name: '', roleName: '' }); ``` diff --git a/.agents/skills/hooks-api/references/platform-reserved-subdomain.md b/.agents/skills/hooks-api/references/platform-reserved-subdomain.md new file mode 100644 index 0000000000..e5de5be5e7 --- /dev/null +++ b/.agents/skills/hooks-api/references/platform-reserved-subdomain.md @@ -0,0 +1,34 @@ +# platformReservedSubdomain + + + +Subdomain labels no tenant may claim under a platform apex + +## Usage + +```typescript +usePlatformReservedSubdomainsQuery({ selection: { fields: { createdAt: true, createdByPrincipal: true, id: true, label: true, match: true, reason: true, updatedAt: true, updatedByPrincipal: true } } }) +usePlatformReservedSubdomainQuery({ id: '', selection: { fields: { createdAt: true, createdByPrincipal: true, id: true, label: true, match: true, reason: true, updatedAt: true, updatedByPrincipal: true } } }) +useCreatePlatformReservedSubdomainMutation({ selection: { fields: { id: true } } }) +useUpdatePlatformReservedSubdomainMutation({ selection: { fields: { id: true } } }) +useDeletePlatformReservedSubdomainMutation({}) +``` + +## Examples + +### List all platformReservedSubdomains + +```typescript +const { data, isLoading } = usePlatformReservedSubdomainsQuery({ + selection: { fields: { createdAt: true, createdByPrincipal: true, id: true, label: true, match: true, reason: true, updatedAt: true, updatedByPrincipal: true } }, +}); +``` + +### Create a platformReservedSubdomain + +```typescript +const { mutate } = useCreatePlatformReservedSubdomainMutation({ + selection: { fields: { id: true } }, +}); +mutate({ createdByPrincipal: '', label: '', match: '', reason: '', updatedByPrincipal: '' }); +``` diff --git a/.agents/skills/hooks-auth/SKILL.md b/.agents/skills/hooks-auth/SKILL.md index c2930123b3..75537118ca 100644 --- a/.agents/skills/hooks-auth/SKILL.md +++ b/.agents/skills/hooks-auth/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-auth -description: React Query hooks for the auth API — provides typed query and mutation hooks for 15 tables and 61 custom operations +description: React Query hooks for the auth API — provides typed query and mutation hooks for 15 tables and 63 custom operations --- # hooks-auth -React Query hooks for the auth API — provides typed query and mutation hooks for 15 tables and 61 custom operations +React Query hooks for the auth API — provides typed query and mutation hooks for 15 tables and 63 custom operations ## Usage @@ -59,6 +59,7 @@ See the `references/` directory for detailed per-entity API documentation: - [current-user-id](references/current-user-id.md) - [get-mfa-status](references/get-mfa-status.md) - [require-step-up](references/require-step-up.md) +- [sign-in-options](references/sign-in-options.md) - [approve-device](references/approve-device.md) - [check-password](references/check-password.md) - [complete-mfa-challenge](references/complete-mfa-challenge.md) @@ -78,6 +79,7 @@ See the `references/` directory for detailed per-entity API documentation: - [enable-email-mfa](references/enable-email-mfa.md) - [enable-sms-mfa](references/enable-sms-mfa.md) - [enable-totp](references/enable-totp.md) +- [exchange-native-handoff](references/exchange-native-handoff.md) - [extend-token-expires](references/extend-token-expires.md) - [forgot-password](references/forgot-password.md) - [generate-backup-codes](references/generate-backup-codes.md) diff --git a/.agents/skills/hooks-auth/references/create-api-key.md b/.agents/skills/hooks-auth/references/create-api-key.md index f90173478d..06fbe08d54 100644 --- a/.agents/skills/hooks-auth/references/create-api-key.md +++ b/.agents/skills/hooks-auth/references/create-api-key.md @@ -2,7 +2,7 @@ -React Query mutation hook for createApiKey +Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key. ## Usage diff --git a/.agents/skills/hooks-auth/references/exchange-native-handoff.md b/.agents/skills/hooks-auth/references/exchange-native-handoff.md new file mode 100644 index 0000000000..b99bbc0c4a --- /dev/null +++ b/.agents/skills/hooks-auth/references/exchange-native-handoff.md @@ -0,0 +1,20 @@ +# exchangeNativeHandoff + + + +React Query mutation hook for exchangeNativeHandoff + +## Usage + +```typescript +const { mutate } = useExchangeNativeHandoffMutation(); mutate({ input: { code: '', codeVerifier: '', credentialKind: '' } }); +``` + +## Examples + +### Use useExchangeNativeHandoffMutation + +```typescript +const { mutate, isLoading } = useExchangeNativeHandoffMutation(); +mutate({ input: { code: '', codeVerifier: '', credentialKind: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/request-magic-link.md b/.agents/skills/hooks-auth/references/request-magic-link.md index 249240c4d5..159f386d5d 100644 --- a/.agents/skills/hooks-auth/references/request-magic-link.md +++ b/.agents/skills/hooks-auth/references/request-magic-link.md @@ -7,7 +7,7 @@ React Query mutation hook for requestMagicLink ## Usage ```typescript -const { mutate } = useRequestMagicLinkMutation(); mutate({ input: { email: '', next: '' } }); +const { mutate } = useRequestMagicLinkMutation(); mutate({ input: { codeChallenge: '', email: '', nativeRedirectUri: '', next: '' } }); ``` ## Examples @@ -16,5 +16,5 @@ const { mutate } = useRequestMagicLinkMutation(); mutate({ input: { email: '', next: '' } }); +mutate({ input: { codeChallenge: '', email: '', nativeRedirectUri: '', next: '' } }); ``` diff --git a/.agents/skills/hooks-auth/references/set-password.md b/.agents/skills/hooks-auth/references/set-password.md index 91b80a3d53..ff091798bb 100644 --- a/.agents/skills/hooks-auth/references/set-password.md +++ b/.agents/skills/hooks-auth/references/set-password.md @@ -7,7 +7,7 @@ React Query mutation hook for setPassword ## Usage ```typescript -const { mutate } = useSetPasswordMutation(); mutate({ input: { currentPassword: '', newPassword: '' } }); +const { mutate } = useSetPasswordMutation(); mutate({ input: { currentPassword: '', newPassword: '', signOutOtherSessions: '' } }); ``` ## Examples @@ -16,5 +16,5 @@ const { mutate } = useSetPasswordMutation(); mutate({ input: { currentPassword: ```typescript const { mutate, isLoading } = useSetPasswordMutation(); -mutate({ input: { currentPassword: '', newPassword: '' } }); +mutate({ input: { currentPassword: '', newPassword: '', signOutOtherSessions: '' } }); ``` diff --git a/.agents/skills/hooks-auth/references/sign-in-options.md b/.agents/skills/hooks-auth/references/sign-in-options.md new file mode 100644 index 0000000000..33b93083b1 --- /dev/null +++ b/.agents/skills/hooks-auth/references/sign-in-options.md @@ -0,0 +1,19 @@ +# signInOptions + + + +React Query query hook for signInOptions + +## Usage + +```typescript +useSignInOptionsQuery() +``` + +## Examples + +### Use useSignInOptionsQuery + +```typescript +const { data, isLoading } = useSignInOptionsQuery(); +``` diff --git a/.agents/skills/hooks-compute/SKILL.md b/.agents/skills/hooks-compute/SKILL.md index e5bdfffbe0..b3a4f2425f 100644 --- a/.agents/skills/hooks-compute/SKILL.md +++ b/.agents/skills/hooks-compute/SKILL.md @@ -40,7 +40,6 @@ See the `references/` directory for detailed per-entity API documentation: - [build](references/build.md) - [build-step](references/build-step.md) -- [builder-binding](references/builder-binding.md) - [content-preset](references/content-preset.md) - [database-function-graph](references/database-function-graph.md) - [database-function-graph-execution-cancel-request](references/database-function-graph-execution-cancel-request.md) @@ -84,7 +83,6 @@ See the `references/` directory for detailed per-entity API documentation: - [namespace-event](references/namespace-event.md) - [platform-build](references/platform-build.md) - [platform-build-step](references/platform-build-step.md) -- [platform-builder-binding](references/platform-builder-binding.md) - [platform-function-api-binding](references/platform-function-api-binding.md) - [platform-function-capability-binding](references/platform-function-capability-binding.md) - [platform-function-definition](references/platform-function-definition.md) @@ -131,6 +129,7 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-resources-health](references/platform-resources-health.md) - [platform-resources-requirements-state](references/platform-resources-requirements-state.md) - [platform-resources-resolved-requirement](references/platform-resources-resolved-requirement.md) +- [platform-service-binding](references/platform-service-binding.md) - [platform-webhook-endpoint](references/platform-webhook-endpoint.md) - [platform-webhook-event](references/platform-webhook-event.md) - [proposal-comment](references/proposal-comment.md) @@ -159,6 +158,7 @@ See the `references/` directory for detailed per-entity API documentation: - [resources-health](references/resources-health.md) - [resources-requirements-state](references/resources-requirements-state.md) - [resources-resolved-requirement](references/resources-resolved-requirement.md) +- [service-binding](references/service-binding.md) - [webhook-endpoint](references/webhook-endpoint.md) - [webhook-event](references/webhook-event.md) - [database-read-function-graph](references/database-read-function-graph.md) diff --git a/.agents/skills/hooks-compute/references/platform-service-binding.md b/.agents/skills/hooks-compute/references/platform-service-binding.md new file mode 100644 index 0000000000..177616e9d3 --- /dev/null +++ b/.agents/skills/hooks-compute/references/platform-service-binding.md @@ -0,0 +1,34 @@ +# platformServiceBinding + + + +Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + +## Usage + +```typescript +usePlatformServiceBindingsQuery({ selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } } }) +usePlatformServiceBindingQuery({ id: '', selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } } }) +useCreatePlatformServiceBindingMutation({ selection: { fields: { id: true } } }) +useUpdatePlatformServiceBindingMutation({ selection: { fields: { id: true } } }) +useDeletePlatformServiceBindingMutation({}) +``` + +## Examples + +### List all platformServiceBindings + +```typescript +const { data, isLoading } = usePlatformServiceBindingsQuery({ + selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }, +}); +``` + +### Create a platformServiceBinding + +```typescript +const { mutate } = useCreatePlatformServiceBindingMutation({ + selection: { fields: { id: true } }, +}); +mutate({ createdBy: '', createdByPrincipal: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/service-binding.md b/.agents/skills/hooks-compute/references/service-binding.md new file mode 100644 index 0000000000..4728410b9b --- /dev/null +++ b/.agents/skills/hooks-compute/references/service-binding.md @@ -0,0 +1,34 @@ +# serviceBinding + + + +Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + +## Usage + +```typescript +useServiceBindingsQuery({ selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } } }) +useServiceBindingQuery({ id: '', selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } } }) +useCreateServiceBindingMutation({ selection: { fields: { id: true } } }) +useUpdateServiceBindingMutation({ selection: { fields: { id: true } } }) +useDeleteServiceBindingMutation({}) +``` + +## Examples + +### List all serviceBindings + +```typescript +const { data, isLoading } = useServiceBindingsQuery({ + selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }, +}); +``` + +### Create a serviceBinding + +```typescript +const { mutate } = useCreateServiceBindingMutation({ + selection: { fields: { id: true } }, +}); +mutate({ createdBy: '', createdByPrincipal: '', databaseId: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }); +``` diff --git a/.agents/skills/hooks-modules/references/blueprint-construction.md b/.agents/skills/hooks-modules/references/blueprint-construction.md index 62644e566a..84f4a51edf 100644 --- a/.agents/skills/hooks-modules/references/blueprint-construction.md +++ b/.agents/skills/hooks-modules/references/blueprint-construction.md @@ -2,13 +2,13 @@ -Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. +Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. ## Usage ```typescript -useBlueprintConstructionsQuery({ selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } } }) -useBlueprintConstructionQuery({ id: '', selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } } }) +useBlueprintConstructionsQuery({ selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } } }) +useBlueprintConstructionQuery({ id: '', selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } } }) useCreateBlueprintConstructionMutation({ selection: { fields: { id: true } } }) useUpdateBlueprintConstructionMutation({ selection: { fields: { id: true } } }) useDeleteBlueprintConstructionMutation({}) @@ -20,7 +20,7 @@ useDeleteBlueprintConstructionMutation({}) ```typescript const { data, isLoading } = useBlueprintConstructionsQuery({ - selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }, + selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useBlueprintConstructionsQuery({ const { mutate } = useCreateBlueprintConstructionMutation({ selection: { fields: { id: true } }, }); -mutate({ blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }); +mutate({ blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', error: '', schemaId: '', status: '', tableMap: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/construct-blueprint.md b/.agents/skills/hooks-modules/references/construct-blueprint.md index d36ddac233..c6f310ce01 100644 --- a/.agents/skills/hooks-modules/references/construct-blueprint.md +++ b/.agents/skills/hooks-modules/references/construct-blueprint.md @@ -2,7 +2,7 @@ -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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. +Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. ## Usage diff --git a/.agents/skills/hooks-modules/references/domain-module.md b/.agents/skills/hooks-modules/references/domain-module.md index 0eb8fd223c..bb4e4ebc40 100644 --- a/.agents/skills/hooks-modules/references/domain-module.md +++ b/.agents/skills/hooks-modules/references/domain-module.md @@ -7,8 +7,8 @@ React Query hooks for DomainModule data operations ## Usage ```typescript -useDomainModulesQuery({ selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) -useDomainModuleQuery({ id: '', selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useDomainModulesQuery({ selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, reservedSubdomainsTableId: true, reservedSubdomainsTableName: true, schemaId: true, scope: true, sweepUnverifiedDomainsFunction: true } } }) +useDomainModuleQuery({ id: '', selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, reservedSubdomainsTableId: true, reservedSubdomainsTableName: true, schemaId: true, scope: true, sweepUnverifiedDomainsFunction: true } } }) useCreateDomainModuleMutation({ selection: { fields: { id: true } } }) useUpdateDomainModuleMutation({ selection: { fields: { id: true } } }) useDeleteDomainModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteDomainModuleMutation({}) ```typescript const { data, isLoading } = useDomainModulesQuery({ - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, reservedSubdomainsTableId: true, reservedSubdomainsTableName: true, schemaId: true, scope: true, sweepUnverifiedDomainsFunction: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useDomainModulesQuery({ const { mutate } = useCreateDomainModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +mutate({ apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', defaultReservedSubdomains: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', reservedSubdomainsTableId: '', reservedSubdomainsTableName: '', schemaId: '', scope: '', sweepUnverifiedDomainsFunction: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/resource-module.md b/.agents/skills/hooks-modules/references/resource-module.md index 547951ab8c..91bfc86b40 100644 --- a/.agents/skills/hooks-modules/references/resource-module.md +++ b/.agents/skills/hooks-modules/references/resource-module.md @@ -7,8 +7,8 @@ React Query hooks for ResourceModule data operations ## Usage ```typescript -useResourceModulesQuery({ selection: { fields: { apiName: true, builderBindingsTableId: true, builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } } }) -useResourceModuleQuery({ id: '', selection: { fields: { apiName: true, builderBindingsTableId: true, builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } } }) +useResourceModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, serviceBindingsTableId: true, serviceBindingsTableName: true } } }) +useResourceModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, serviceBindingsTableId: true, serviceBindingsTableName: true } } }) useCreateResourceModuleMutation({ selection: { fields: { id: true } } }) useUpdateResourceModuleMutation({ selection: { fields: { id: true } } }) useDeleteResourceModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteResourceModuleMutation({}) ```typescript const { data, isLoading } = useResourceModulesQuery({ - selection: { fields: { apiName: true, builderBindingsTableId: true, builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, serviceBindingsTableId: true, serviceBindingsTableName: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useResourceModulesQuery({ const { mutate } = useCreateResourceModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', builderBindingsTableId: '', builderBindingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }); +mutate({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '', serviceBindingsTableId: '', serviceBindingsTableName: '' }); ``` diff --git a/.agents/skills/hooks-remote/SKILL.md b/.agents/skills/hooks-remote/SKILL.md index 5bc8c15fc0..5550704686 100644 --- a/.agents/skills/hooks-remote/SKILL.md +++ b/.agents/skills/hooks-remote/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-remote -description: React Query hooks for the remote API — provides typed query and mutation hooks for 3 tables and 2 custom operations +description: React Query hooks for the remote API — provides typed query and mutation hooks for 3 tables and 3 custom operations --- # hooks-remote -React Query hooks for the remote API — provides typed query and mutation hooks for 3 tables and 2 custom operations +React Query hooks for the remote API — provides typed query and mutation hooks for 3 tables and 3 custom operations ## Usage @@ -41,5 +41,6 @@ See the `references/` directory for detailed per-entity API documentation: - [machine](references/machine.md) - [machine-message](references/machine-message.md) - [machine-session](references/machine-session.md) +- [current-database-id](references/current-database-id.md) - [machines-enroll](references/machines-enroll.md) - [provision-bucket](references/provision-bucket.md) diff --git a/.agents/skills/hooks-remote/references/current-database-id.md b/.agents/skills/hooks-remote/references/current-database-id.md new file mode 100644 index 0000000000..072139e50f --- /dev/null +++ b/.agents/skills/hooks-remote/references/current-database-id.md @@ -0,0 +1,19 @@ +# currentDatabaseId + + + +React Query query hook for currentDatabaseId + +## Usage + +```typescript +useCurrentDatabaseIdQuery() +``` + +## Examples + +### Use useCurrentDatabaseIdQuery + +```typescript +const { data, isLoading } = useCurrentDatabaseIdQuery(); +``` diff --git a/.agents/skills/orm-api/SKILL.md b/.agents/skills/orm-api/SKILL.md index 4c61e2919f..3d5a0f0764 100644 --- a/.agents/skills/orm-api/SKILL.md +++ b/.agents/skills/orm-api/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-api -description: ORM client for the api API — provides typed CRUD operations for 90 tables and 49 custom operations +description: ORM client for the api API — provides typed CRUD operations for 91 tables and 43 custom operations --- # orm-api -ORM client for the api API — provides typed CRUD operations for 90 tables and 49 custom operations +ORM client for the api API — provides typed CRUD operations for 91 tables and 43 custom operations ## Usage @@ -86,6 +86,7 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-get-site-previews-record](references/platform-get-site-previews-record.md) - [platform-managed-domain](references/platform-managed-domain.md) - [platform-page](references/platform-page.md) +- [platform-reserved-subdomain](references/platform-reserved-subdomain.md) - [platform-site-app-link](references/platform-site-app-link.md) - [platform-site](references/platform-site.md) - [platform-site-deep-link](references/platform-site-deep-link.md) @@ -127,7 +128,6 @@ See the `references/` directory for detailed per-entity API documentation: - [view-rule](references/view-rule.md) - [view-table](references/view-table.md) - [webauthn-setting](references/webauthn-setting.md) -- [api-schema-names](references/api-schema-names.md) - [apply-registry-defaults](references/apply-registry-defaults.md) - [email-shared-account](references/email-shared-account.md) - [get-site-preview-commit](references/get-site-preview-commit.md) @@ -139,16 +139,12 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-sites-deep-link-url](references/platform-sites-deep-link-url.md) - [platform-sites-site-origin](references/platform-sites-site-origin.md) - [platform-verify-site-preview-token](references/platform-verify-site-preview-token.md) -- [resolve-deep-link](references/resolve-deep-link.md) -- [resolve-route](references/resolve-route.md) -- [resolve-site-app-links](references/resolve-site-app-links.md) - [sites-deep-link-url](references/sites-deep-link-url.md) - [sites-site-origin](references/sites-site-origin.md) - [verify-site-preview-token](references/verify-site-preview-token.md) - [accept-database-transfer](references/accept-database-transfer.md) - [apply-rls](references/apply-rls.md) - [cancel-database-transfer](references/cancel-database-transfer.md) -- [create-function-from-source](references/create-function-from-source.md) - [delete-site-preview](references/delete-site-preview.md) - [domains-assign-subdomain](references/domains-assign-subdomain.md) - [mint-site-preview-token](references/mint-site-preview-token.md) @@ -175,4 +171,3 @@ See the `references/` directory for detailed per-entity API documentation: - [sites-provision-static-site](references/sites-provision-static-site.md) - [suspend-database](references/suspend-database.md) - [unsuspend-database](references/unsuspend-database.md) -- [update-function-from-source](references/update-function-from-source.md) diff --git a/.agents/skills/orm-api/references/api.md b/.agents/skills/orm-api/references/api.md index a575a7c3f1..45fbea8ef8 100644 --- a/.agents/skills/orm-api/references/api.md +++ b/.agents/skills/orm-api/references/api.md @@ -9,7 +9,7 @@ API surfaces exposed by this scope; publication makes a surface bindable from ot ```typescript db.api.findMany({ select: { id: true } }).execute() db.api.findOne({ id: '', select: { id: true } }).execute() -db.api.create({ data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute() +db.api.create({ data: { anonRole: '', config: '', databaseId: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute() db.api.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute() db.api.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.api.findMany({ ```typescript const item = await db.api.create({ - data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, + data: { anonRole: '', config: '', databaseId: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/platform-api.md b/.agents/skills/orm-api/references/platform-api.md index 1dfcdea283..097956bfd8 100644 --- a/.agents/skills/orm-api/references/platform-api.md +++ b/.agents/skills/orm-api/references/platform-api.md @@ -9,7 +9,7 @@ API surfaces exposed by this scope; publication makes a surface bindable from ot ```typescript db.platformApi.findMany({ select: { id: true } }).execute() db.platformApi.findOne({ id: '', select: { id: true } }).execute() -db.platformApi.create({ data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute() +db.platformApi.create({ data: { anonRole: '', config: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute() db.platformApi.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute() db.platformApi.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.platformApi.findMany({ ```typescript const item = await db.platformApi.create({ - data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, + data: { anonRole: '', config: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/platform-reserved-subdomain.md b/.agents/skills/orm-api/references/platform-reserved-subdomain.md new file mode 100644 index 0000000000..fb8ac4ffd8 --- /dev/null +++ b/.agents/skills/orm-api/references/platform-reserved-subdomain.md @@ -0,0 +1,34 @@ +# platformReservedSubdomain + + + +Subdomain labels no tenant may claim under a platform apex + +## Usage + +```typescript +db.platformReservedSubdomain.findMany({ select: { id: true } }).execute() +db.platformReservedSubdomain.findOne({ id: '', select: { id: true } }).execute() +db.platformReservedSubdomain.create({ data: { createdByPrincipal: '', label: '', match: '', reason: '', updatedByPrincipal: '' }, select: { id: true } }).execute() +db.platformReservedSubdomain.update({ where: { id: '' }, data: { createdByPrincipal: '' }, select: { id: true } }).execute() +db.platformReservedSubdomain.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all platformReservedSubdomain records + +```typescript +const items = await db.platformReservedSubdomain.findMany({ + select: { id: true, createdByPrincipal: true } +}).execute(); +``` + +### Create a platformReservedSubdomain + +```typescript +const item = await db.platformReservedSubdomain.create({ + data: { createdByPrincipal: '', label: '', match: '', reason: '', updatedByPrincipal: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-auth/SKILL.md b/.agents/skills/orm-auth/SKILL.md index e9c93d8f59..5eb6f4da9f 100644 --- a/.agents/skills/orm-auth/SKILL.md +++ b/.agents/skills/orm-auth/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-auth -description: ORM client for the auth API — provides typed CRUD operations for 15 tables and 61 custom operations +description: ORM client for the auth API — provides typed CRUD operations for 15 tables and 63 custom operations --- # orm-auth -ORM client for the auth API — provides typed CRUD operations for 15 tables and 61 custom operations +ORM client for the auth API — provides typed CRUD operations for 15 tables and 63 custom operations ## Usage @@ -58,6 +58,7 @@ See the `references/` directory for detailed per-entity API documentation: - [current-user-id](references/current-user-id.md) - [get-mfa-status](references/get-mfa-status.md) - [require-step-up](references/require-step-up.md) +- [sign-in-options](references/sign-in-options.md) - [approve-device](references/approve-device.md) - [check-password](references/check-password.md) - [complete-mfa-challenge](references/complete-mfa-challenge.md) @@ -77,6 +78,7 @@ See the `references/` directory for detailed per-entity API documentation: - [enable-email-mfa](references/enable-email-mfa.md) - [enable-sms-mfa](references/enable-sms-mfa.md) - [enable-totp](references/enable-totp.md) +- [exchange-native-handoff](references/exchange-native-handoff.md) - [extend-token-expires](references/extend-token-expires.md) - [forgot-password](references/forgot-password.md) - [generate-backup-codes](references/generate-backup-codes.md) diff --git a/.agents/skills/orm-auth/references/create-api-key.md b/.agents/skills/orm-auth/references/create-api-key.md index 23aea2eaae..21ad2d6a38 100644 --- a/.agents/skills/orm-auth/references/create-api-key.md +++ b/.agents/skills/orm-auth/references/create-api-key.md @@ -2,7 +2,7 @@ -Execute the createApiKey mutation +Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key. ## Usage diff --git a/.agents/skills/orm-auth/references/exchange-native-handoff.md b/.agents/skills/orm-auth/references/exchange-native-handoff.md new file mode 100644 index 0000000000..2daeeb0410 --- /dev/null +++ b/.agents/skills/orm-auth/references/exchange-native-handoff.md @@ -0,0 +1,19 @@ +# exchangeNativeHandoff + + + +Execute the exchangeNativeHandoff mutation + +## Usage + +```typescript +db.mutation.exchangeNativeHandoff({ input: { code: '', codeVerifier: '', credentialKind: '' } }).execute() +``` + +## Examples + +### Run exchangeNativeHandoff + +```typescript +const result = await db.mutation.exchangeNativeHandoff({ input: { code: '', codeVerifier: '', credentialKind: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/request-magic-link.md b/.agents/skills/orm-auth/references/request-magic-link.md index 091a0e1f41..9802b4854e 100644 --- a/.agents/skills/orm-auth/references/request-magic-link.md +++ b/.agents/skills/orm-auth/references/request-magic-link.md @@ -7,7 +7,7 @@ Execute the requestMagicLink mutation ## Usage ```typescript -db.mutation.requestMagicLink({ input: { email: '', next: '' } }).execute() +db.mutation.requestMagicLink({ input: { codeChallenge: '', email: '', nativeRedirectUri: '', next: '' } }).execute() ``` ## Examples @@ -15,5 +15,5 @@ db.mutation.requestMagicLink({ input: { email: '', next: '' } }) ### Run requestMagicLink ```typescript -const result = await db.mutation.requestMagicLink({ input: { email: '', next: '' } }).execute(); +const result = await db.mutation.requestMagicLink({ input: { codeChallenge: '', email: '', nativeRedirectUri: '', next: '' } }).execute(); ``` diff --git a/.agents/skills/orm-auth/references/set-password.md b/.agents/skills/orm-auth/references/set-password.md index 599e1aac53..1e5ab5adee 100644 --- a/.agents/skills/orm-auth/references/set-password.md +++ b/.agents/skills/orm-auth/references/set-password.md @@ -7,7 +7,7 @@ Execute the setPassword mutation ## Usage ```typescript -db.mutation.setPassword({ input: { currentPassword: '', newPassword: '' } }).execute() +db.mutation.setPassword({ input: { currentPassword: '', newPassword: '', signOutOtherSessions: '' } }).execute() ``` ## Examples @@ -15,5 +15,5 @@ db.mutation.setPassword({ input: { currentPassword: '', newPassword: '', newPassword: '' } }).execute(); +const result = await db.mutation.setPassword({ input: { currentPassword: '', newPassword: '', signOutOtherSessions: '' } }).execute(); ``` diff --git a/.agents/skills/orm-auth/references/sign-in-options.md b/.agents/skills/orm-auth/references/sign-in-options.md new file mode 100644 index 0000000000..2531da1640 --- /dev/null +++ b/.agents/skills/orm-auth/references/sign-in-options.md @@ -0,0 +1,19 @@ +# signInOptions + + + +Execute the signInOptions query + +## Usage + +```typescript +db.query.signInOptions().execute() +``` + +## Examples + +### Run signInOptions + +```typescript +const result = await db.query.signInOptions().execute(); +``` diff --git a/.agents/skills/orm-compute/SKILL.md b/.agents/skills/orm-compute/SKILL.md index 33b621bbb0..a6e44f7abc 100644 --- a/.agents/skills/orm-compute/SKILL.md +++ b/.agents/skills/orm-compute/SKILL.md @@ -15,7 +15,7 @@ ORM client for the compute API — provides typed CRUD operations for 123 tables // Import the ORM client import { db } from './orm'; -// Available models: build, buildStep, builderBinding, contentPreset, databaseFunctionGraph, databaseFunctionGraphExecutionCancelRequest, databaseFunctionGraphExecution, databaseFunctionGraphExecutionNodeState, ... +// Available models: build, buildStep, contentPreset, databaseFunctionGraph, databaseFunctionGraphExecutionCancelRequest, databaseFunctionGraphExecution, databaseFunctionGraphExecutionNodeState, databaseFunctionGraphExecutionOutput, ... db..findMany({ select: { id: true } }).execute() db..findOne({ id: '', select: { id: true } }).execute() db..create({ data: { ... }, select: { id: true } }).execute() @@ -39,7 +39,6 @@ See the `references/` directory for detailed per-entity API documentation: - [build](references/build.md) - [build-step](references/build-step.md) -- [builder-binding](references/builder-binding.md) - [content-preset](references/content-preset.md) - [database-function-graph](references/database-function-graph.md) - [database-function-graph-execution-cancel-request](references/database-function-graph-execution-cancel-request.md) @@ -83,7 +82,6 @@ See the `references/` directory for detailed per-entity API documentation: - [namespace-event](references/namespace-event.md) - [platform-build](references/platform-build.md) - [platform-build-step](references/platform-build-step.md) -- [platform-builder-binding](references/platform-builder-binding.md) - [platform-function-api-binding](references/platform-function-api-binding.md) - [platform-function-capability-binding](references/platform-function-capability-binding.md) - [platform-function-definition](references/platform-function-definition.md) @@ -130,6 +128,7 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-resources-health](references/platform-resources-health.md) - [platform-resources-requirements-state](references/platform-resources-requirements-state.md) - [platform-resources-resolved-requirement](references/platform-resources-resolved-requirement.md) +- [platform-service-binding](references/platform-service-binding.md) - [platform-webhook-endpoint](references/platform-webhook-endpoint.md) - [platform-webhook-event](references/platform-webhook-event.md) - [proposal-comment](references/proposal-comment.md) @@ -158,6 +157,7 @@ See the `references/` directory for detailed per-entity API documentation: - [resources-health](references/resources-health.md) - [resources-requirements-state](references/resources-requirements-state.md) - [resources-resolved-requirement](references/resources-resolved-requirement.md) +- [service-binding](references/service-binding.md) - [webhook-endpoint](references/webhook-endpoint.md) - [webhook-event](references/webhook-event.md) - [database-read-function-graph](references/database-read-function-graph.md) diff --git a/.agents/skills/orm-compute/references/platform-service-binding.md b/.agents/skills/orm-compute/references/platform-service-binding.md new file mode 100644 index 0000000000..fcdd4d70ae --- /dev/null +++ b/.agents/skills/orm-compute/references/platform-service-binding.md @@ -0,0 +1,34 @@ +# platformServiceBinding + + + +Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + +## Usage + +```typescript +db.platformServiceBinding.findMany({ select: { id: true } }).execute() +db.platformServiceBinding.findOne({ id: '', select: { id: true } }).execute() +db.platformServiceBinding.create({ data: { createdBy: '', createdByPrincipal: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute() +db.platformServiceBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute() +db.platformServiceBinding.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all platformServiceBinding records + +```typescript +const items = await db.platformServiceBinding.findMany({ + select: { id: true, createdBy: true } +}).execute(); +``` + +### Create a platformServiceBinding + +```typescript +const item = await db.platformServiceBinding.create({ + data: { createdBy: '', createdByPrincipal: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-compute/references/service-binding.md b/.agents/skills/orm-compute/references/service-binding.md new file mode 100644 index 0000000000..c792818c84 --- /dev/null +++ b/.agents/skills/orm-compute/references/service-binding.md @@ -0,0 +1,34 @@ +# serviceBinding + + + +Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + +## Usage + +```typescript +db.serviceBinding.findMany({ select: { id: true } }).execute() +db.serviceBinding.findOne({ id: '', select: { id: true } }).execute() +db.serviceBinding.create({ data: { createdBy: '', createdByPrincipal: '', databaseId: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute() +db.serviceBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute() +db.serviceBinding.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all serviceBinding records + +```typescript +const items = await db.serviceBinding.findMany({ + select: { id: true, createdBy: true } +}).execute(); +``` + +### Create a serviceBinding + +```typescript +const item = await db.serviceBinding.create({ + data: { createdBy: '', createdByPrincipal: '', databaseId: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/references/blueprint-construction.md b/.agents/skills/orm-modules/references/blueprint-construction.md index 9c081fe747..733eb3569a 100644 --- a/.agents/skills/orm-modules/references/blueprint-construction.md +++ b/.agents/skills/orm-modules/references/blueprint-construction.md @@ -2,14 +2,14 @@ -Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. +Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. ## Usage ```typescript db.blueprintConstruction.findMany({ select: { id: true } }).execute() db.blueprintConstruction.findOne({ id: '', select: { id: true } }).execute() -db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute() +db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', error: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute() db.blueprintConstruction.update({ where: { id: '' }, data: { blueprintId: '' }, select: { id: true } }).execute() db.blueprintConstruction.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.blueprintConstruction.findMany({ ```typescript const item = await db.blueprintConstruction.create({ - data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }, + data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', error: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/construct-blueprint.md b/.agents/skills/orm-modules/references/construct-blueprint.md index 7e05c41c57..a35f495b7b 100644 --- a/.agents/skills/orm-modules/references/construct-blueprint.md +++ b/.agents/skills/orm-modules/references/construct-blueprint.md @@ -2,7 +2,7 @@ -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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. +Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. ## Usage diff --git a/.agents/skills/orm-modules/references/domain-module.md b/.agents/skills/orm-modules/references/domain-module.md index 894c368280..821ed6b9b8 100644 --- a/.agents/skills/orm-modules/references/domain-module.md +++ b/.agents/skills/orm-modules/references/domain-module.md @@ -9,7 +9,7 @@ ORM operations for DomainModule records ```typescript db.domainModule.findMany({ select: { id: true } }).execute() db.domainModule.findOne({ id: '', select: { id: true } }).execute() -db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', defaultReservedSubdomains: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', reservedSubdomainsTableId: '', reservedSubdomainsTableName: '', schemaId: '', scope: '', sweepUnverifiedDomainsFunction: '' }, select: { id: true } }).execute() db.domainModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.domainModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.domainModule.findMany({ ```typescript const item = await db.domainModule.create({ - data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, + data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', defaultReservedSubdomains: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', reservedSubdomainsTableId: '', reservedSubdomainsTableName: '', schemaId: '', scope: '', sweepUnverifiedDomainsFunction: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/resource-module.md b/.agents/skills/orm-modules/references/resource-module.md index 7456fd88b2..6454c3f735 100644 --- a/.agents/skills/orm-modules/references/resource-module.md +++ b/.agents/skills/orm-modules/references/resource-module.md @@ -9,7 +9,7 @@ ORM operations for ResourceModule records ```typescript db.resourceModule.findMany({ select: { id: true } }).execute() db.resourceModule.findOne({ id: '', select: { id: true } }).execute() -db.resourceModule.create({ data: { apiName: '', builderBindingsTableId: '', builderBindingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.resourceModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '', serviceBindingsTableId: '', serviceBindingsTableName: '' }, select: { id: true } }).execute() db.resourceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.resourceModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.resourceModule.findMany({ ```typescript const item = await db.resourceModule.create({ - data: { apiName: '', builderBindingsTableId: '', builderBindingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, + data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '', serviceBindingsTableId: '', serviceBindingsTableName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-remote/SKILL.md b/.agents/skills/orm-remote/SKILL.md index cc937bceed..1c7d61ae14 100644 --- a/.agents/skills/orm-remote/SKILL.md +++ b/.agents/skills/orm-remote/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-remote -description: ORM client for the remote API — provides typed CRUD operations for 3 tables and 2 custom operations +description: ORM client for the remote API — provides typed CRUD operations for 3 tables and 3 custom operations --- # orm-remote -ORM client for the remote API — provides typed CRUD operations for 3 tables and 2 custom operations +ORM client for the remote API — provides typed CRUD operations for 3 tables and 3 custom operations ## Usage @@ -40,5 +40,6 @@ See the `references/` directory for detailed per-entity API documentation: - [machine](references/machine.md) - [machine-message](references/machine-message.md) - [machine-session](references/machine-session.md) +- [current-database-id](references/current-database-id.md) - [machines-enroll](references/machines-enroll.md) - [provision-bucket](references/provision-bucket.md) diff --git a/.agents/skills/orm-remote/references/current-database-id.md b/.agents/skills/orm-remote/references/current-database-id.md new file mode 100644 index 0000000000..5877233d74 --- /dev/null +++ b/.agents/skills/orm-remote/references/current-database-id.md @@ -0,0 +1,19 @@ +# currentDatabaseId + + + +Execute the currentDatabaseId query + +## Usage + +```typescript +db.query.currentDatabaseId().execute() +``` + +## Examples + +### Run currentDatabaseId + +```typescript +const result = await db.query.currentDatabaseId().execute(); +``` diff --git a/sdk/constructive-cli/src/api/README.md b/sdk/constructive-cli/src/api/README.md index ed2d731670..b448c0b603 100644 --- a/sdk/constructive-cli/src/api/README.md +++ b/sdk/constructive-cli/src/api/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 90 -- **Custom queries:** 18 -- **Custom mutations:** 31 +- **Tables:** 91 +- **Custom queries:** 14 +- **Custom mutations:** 29 **Generators:** ORM, CLI diff --git a/sdk/constructive-cli/src/api/cli/README.md b/sdk/constructive-cli/src/api/cli/README.md index 11b2d3237c..f8af70ea6c 100644 --- a/sdk/constructive-cli/src/api/cli/README.md +++ b/sdk/constructive-cli/src/api/cli/README.md @@ -75,6 +75,7 @@ csdk auth set-token | `platform-get-site-previews-record` | platformGetSitePreviewsRecord CRUD operations | | `platform-managed-domain` | platformManagedDomain CRUD operations | | `platform-page` | platformPage CRUD operations | +| `platform-reserved-subdomain` | platformReservedSubdomain CRUD operations | | `platform-site-app-link` | platformSiteAppLink CRUD operations | | `platform-site` | platformSite CRUD operations | | `platform-site-deep-link` | platformSiteDeepLink CRUD operations | @@ -116,7 +117,6 @@ csdk auth set-token | `view-rule` | viewRule CRUD operations | | `view-table` | viewTable CRUD operations | | `webauthn-setting` | webauthnSetting CRUD operations | -| `api-schema-names` | apiSchemaNames | | `apply-registry-defaults` | applyRegistryDefaults | | `email-shared-account` | emailSharedAccount | | `get-site-preview-commit` | getSitePreviewCommit | @@ -128,16 +128,12 @@ csdk auth set-token | `platform-sites-deep-link-url` | platformSitesDeepLinkUrl | | `platform-sites-site-origin` | platformSitesSiteOrigin | | `platform-verify-site-preview-token` | platformVerifySitePreviewToken | -| `resolve-deep-link` | resolveDeepLink | -| `resolve-route` | resolveRoute | -| `resolve-site-app-links` | resolveSiteAppLinks | | `sites-deep-link-url` | sitesDeepLinkUrl | | `sites-site-origin` | sitesSiteOrigin | | `verify-site-preview-token` | verifySitePreviewToken | | `accept-database-transfer` | acceptDatabaseTransfer | | `apply-rls` | applyRls | | `cancel-database-transfer` | cancelDatabaseTransfer | -| `create-function-from-source` | Creates a `Function` from its `CREATE FUNCTION` source text. | | `delete-site-preview` | deleteSitePreview | | `domains-assign-subdomain` | domainsAssignSubdomain | | `mint-site-preview-token` | mintSitePreviewToken | @@ -176,7 +172,6 @@ Example usage: | `sites-provision-static-site` | sitesProvisionStaticSite | | `suspend-database` | suspendDatabase | | `unsuspend-database` | unsuspendDatabase | -| `update-function-from-source` | Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. | ## Infrastructure Commands @@ -240,7 +235,6 @@ CRUD operations for Api records. | `config` | JSON | | `createdAt` | Datetime | | `databaseId` | UUID | -| `dbname` | String | | `id` | UUID | | `isPublished` | Boolean | | `name` | String | @@ -248,7 +242,7 @@ CRUD operations for Api records. | `updatedAt` | Datetime | **Required create fields:** `databaseId`, `name` -**Optional create fields (backend defaults):** `anonRole`, `config`, `dbname`, `isPublished`, `roleName` +**Optional create fields (backend defaults):** `anonRole`, `config`, `isPublished`, `roleName` ### `api-schema` @@ -1457,7 +1451,6 @@ CRUD operations for PlatformApi records. | `anonRole` | String | | `config` | JSON | | `createdAt` | Datetime | -| `dbname` | String | | `id` | UUID | | `isPublished` | Boolean | | `name` | String | @@ -1465,7 +1458,7 @@ CRUD operations for PlatformApi records. | `updatedAt` | Datetime | **Required create fields:** `name` -**Optional create fields (backend defaults):** `anonRole`, `config`, `dbname`, `isPublished`, `roleName` +**Optional create fields (backend defaults):** `anonRole`, `config`, `isPublished`, `roleName` ### `platform-api-schema` @@ -1852,6 +1845,35 @@ CRUD operations for PlatformPage records. **Required create fields:** `content`, `siteId`, `slug` **Optional create fields (backend defaults):** `commitId`, `seededFrom`, `storeId` +### `platform-reserved-subdomain` + +CRUD operations for PlatformReservedSubdomain records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all platformReservedSubdomain records | +| `find-first` | Find first matching platformReservedSubdomain record | +| `get` | Get a platformReservedSubdomain by id | +| `create` | Create a new platformReservedSubdomain | +| `update` | Update an existing platformReservedSubdomain | +| `delete` | Delete a platformReservedSubdomain | + +**Fields:** + +| Field | Type | +|-------|------| +| `createdAt` | Datetime | +| `createdByPrincipal` | UUID | +| `id` | UUID | +| `label` | String | +| `match` | String | +| `reason` | String | +| `updatedAt` | Datetime | +| `updatedByPrincipal` | UUID | + +**Required create fields:** `label` +**Optional create fields (backend defaults):** `createdByPrincipal`, `match`, `reason`, `updatedByPrincipal` + ### `platform-site-app-link` CRUD operations for PlatformSiteAppLink records. @@ -3168,17 +3190,6 @@ CRUD operations for WebauthnSetting records. ## Custom Operations -### `api-schema-names` - -apiSchemaNames - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--targetApiId` | UUID | - ### `apply-registry-defaults` applyRegistryDefaults @@ -3305,42 +3316,6 @@ platformVerifySitePreviewToken | `--siteId` | UUID | | `--token` | String | -### `resolve-deep-link` - -resolveDeepLink - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--linkSlug` | String | - | `--targetSiteId` | UUID | - -### `resolve-route` - -resolveRoute - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--requestHost` | String | - | `--requestMethod` | String | - | `--requestPath` | String | - -### `resolve-site-app-links` - -resolveSiteAppLinks - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--targetSiteId` | UUID | - ### `sites-deep-link-url` sitesDeepLinkUrl @@ -3418,21 +3393,6 @@ cancelDatabaseTransfer | `--input.clientMutationId` | String | | `--input.transferId` | UUID | -### `create-function-from-source` - -Creates a `Function` from its `CREATE FUNCTION` source text. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--input.apiExposed` | Boolean | - | `--input.clientMutationId` | String | - | `--input.databaseId` | UUID (required) | - | `--input.schemaId` | UUID (required) | - | `--input.source` | String (required) | - ### `delete-site-preview` deleteSitePreview @@ -3815,19 +3775,6 @@ unsuspendDatabase | `--input.databaseId` | UUID | | `--input.reason` | String | -### `update-function-from-source` - -Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--input.clientMutationId` | String | - | `--input.id` | UUID (required) | - | `--input.source` | String (required) | - ## Output All commands output JSON to stdout. Pipe to `jq` for formatting: diff --git a/sdk/constructive-cli/src/api/cli/commands.ts b/sdk/constructive-cli/src/api/cli/commands.ts index 407d060a60..4b4b01b8e3 100644 --- a/sdk/constructive-cli/src/api/cli/commands.ts +++ b/sdk/constructive-cli/src/api/cli/commands.ts @@ -55,6 +55,7 @@ import platformEmailSiteIdentityCmd from './commands/platform-email-site-identit import platformGetSitePreviewsRecordCmd from './commands/platform-get-site-previews-record'; import platformManagedDomainCmd from './commands/platform-managed-domain'; import platformPageCmd from './commands/platform-page'; +import platformReservedSubdomainCmd from './commands/platform-reserved-subdomain'; import platformSiteAppLinkCmd from './commands/platform-site-app-link'; import platformSiteCmd from './commands/platform-site'; import platformSiteDeepLinkCmd from './commands/platform-site-deep-link'; @@ -96,7 +97,6 @@ import viewGrantCmd from './commands/view-grant'; import viewRuleCmd from './commands/view-rule'; import viewTableCmd from './commands/view-table'; import webauthnSettingCmd from './commands/webauthn-setting'; -import apiSchemaNamesCmd from './commands/api-schema-names'; import applyRegistryDefaultsCmd from './commands/apply-registry-defaults'; import emailSharedAccountCmd from './commands/email-shared-account'; import getSitePreviewCommitCmd from './commands/get-site-preview-commit'; @@ -108,16 +108,12 @@ import platformPagePublishedCmd from './commands/platform-page-published'; import platformSitesDeepLinkUrlCmd from './commands/platform-sites-deep-link-url'; import platformSitesSiteOriginCmd from './commands/platform-sites-site-origin'; import platformVerifySitePreviewTokenCmd from './commands/platform-verify-site-preview-token'; -import resolveDeepLinkCmd from './commands/resolve-deep-link'; -import resolveRouteCmd from './commands/resolve-route'; -import resolveSiteAppLinksCmd from './commands/resolve-site-app-links'; import sitesDeepLinkUrlCmd from './commands/sites-deep-link-url'; import sitesSiteOriginCmd from './commands/sites-site-origin'; import verifySitePreviewTokenCmd from './commands/verify-site-preview-token'; import acceptDatabaseTransferCmd from './commands/accept-database-transfer'; import applyRlsCmd from './commands/apply-rls'; import cancelDatabaseTransferCmd from './commands/cancel-database-transfer'; -import createFunctionFromSourceCmd from './commands/create-function-from-source'; import deleteSitePreviewCmd from './commands/delete-site-preview'; import domainsAssignSubdomainCmd from './commands/domains-assign-subdomain'; import mintSitePreviewTokenCmd from './commands/mint-site-preview-token'; @@ -144,7 +140,6 @@ import sitesInstallMantraCmd from './commands/sites-install-mantra'; import sitesProvisionStaticSiteCmd from './commands/sites-provision-static-site'; import suspendDatabaseCmd from './commands/suspend-database'; import unsuspendDatabaseCmd from './commands/unsuspend-database'; -import updateFunctionFromSourceCmd from './commands/update-function-from-source'; const createCommandMap: () => Record< string, ( @@ -204,6 +199,7 @@ const createCommandMap: () => Record< 'platform-get-site-previews-record': platformGetSitePreviewsRecordCmd, 'platform-managed-domain': platformManagedDomainCmd, 'platform-page': platformPageCmd, + 'platform-reserved-subdomain': platformReservedSubdomainCmd, 'platform-site-app-link': platformSiteAppLinkCmd, 'platform-site': platformSiteCmd, 'platform-site-deep-link': platformSiteDeepLinkCmd, @@ -245,7 +241,6 @@ const createCommandMap: () => Record< 'view-rule': viewRuleCmd, 'view-table': viewTableCmd, 'webauthn-setting': webauthnSettingCmd, - 'api-schema-names': apiSchemaNamesCmd, 'apply-registry-defaults': applyRegistryDefaultsCmd, 'email-shared-account': emailSharedAccountCmd, 'get-site-preview-commit': getSitePreviewCommitCmd, @@ -257,16 +252,12 @@ const createCommandMap: () => Record< 'platform-sites-deep-link-url': platformSitesDeepLinkUrlCmd, 'platform-sites-site-origin': platformSitesSiteOriginCmd, 'platform-verify-site-preview-token': platformVerifySitePreviewTokenCmd, - 'resolve-deep-link': resolveDeepLinkCmd, - 'resolve-route': resolveRouteCmd, - 'resolve-site-app-links': resolveSiteAppLinksCmd, 'sites-deep-link-url': sitesDeepLinkUrlCmd, 'sites-site-origin': sitesSiteOriginCmd, 'verify-site-preview-token': verifySitePreviewTokenCmd, 'accept-database-transfer': acceptDatabaseTransferCmd, 'apply-rls': applyRlsCmd, 'cancel-database-transfer': cancelDatabaseTransferCmd, - 'create-function-from-source': createFunctionFromSourceCmd, 'delete-site-preview': deleteSitePreviewCmd, 'domains-assign-subdomain': domainsAssignSubdomainCmd, 'mint-site-preview-token': mintSitePreviewTokenCmd, @@ -293,10 +284,9 @@ const createCommandMap: () => Record< 'sites-provision-static-site': sitesProvisionStaticSiteCmd, 'suspend-database': suspendDatabaseCmd, 'unsuspend-database': unsuspendDatabaseCmd, - 'update-function-from-source': updateFunctionFromSourceCmd, }); const usage = - "\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 email-identity emailIdentity CRUD operations\n email-provider-account emailProviderAccount CRUD operations\n email-site-identity emailSiteIdentity 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 get-site-previews-record getSitePreviewsRecord CRUD operations\n identity-provider-registry identityProviderRegistry CRUD operations\n index index CRUD operations\n list-suspended-databases-record listSuspendedDatabasesRecord 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-email-identity platformEmailIdentity CRUD operations\n platform-email-provider-account platformEmailProviderAccount CRUD operations\n platform-email-site-identity platformEmailSiteIdentity CRUD operations\n platform-get-site-previews-record platformGetSitePreviewsRecord 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-release platformSiteRelease 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 redirect redirect CRUD operations\n rls-setting rlsSetting 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-release siteRelease 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 email-shared-account emailSharedAccount\n get-site-preview-commit getSitePreviewCommit\n get-site-release-manifest getSiteReleaseManifest\n page-published pagePublished\n platform-get-site-preview-commit platformGetSitePreviewCommit\n platform-get-site-release-manifest platformGetSiteReleaseManifest\n platform-page-published platformPagePublished\n platform-sites-deep-link-url platformSitesDeepLinkUrl\n platform-sites-site-origin platformSitesSiteOrigin\n platform-verify-site-preview-token platformVerifySitePreviewToken\n resolve-deep-link resolveDeepLink\n resolve-route resolveRoute\n resolve-site-app-links resolveSiteAppLinks\n sites-deep-link-url sitesDeepLinkUrl\n sites-site-origin sitesSiteOrigin\n verify-site-preview-token verifySitePreviewToken\n accept-database-transfer acceptDatabaseTransfer\n apply-rls applyRls\n cancel-database-transfer cancelDatabaseTransfer\n create-function-from-source Creates a `Function` from its `CREATE FUNCTION` source text.\n delete-site-preview deleteSitePreview\n domains-assign-subdomain domainsAssignSubdomain\n mint-site-preview-token mintSitePreviewToken\n pages-install-pages pagesInstallPages\n platform-delete-site-preview platformDeleteSitePreview\n platform-domains-assign-subdomain platformDomainsAssignSubdomain\n platform-mint-site-preview-token platformMintSitePreviewToken\n platform-pages-install-pages platformPagesInstallPages\n platform-provision-site-preview platformProvisionSitePreview\n platform-set-site-preview platformSetSitePreview\n platform-site-metadata-install-robots platformSiteMetadataInstallRobots\n platform-sites-install-content-preset platformSitesInstallContentPreset\n platform-sites-install-mantra platformSitesInstallMantra\n platform-sites-provision-static-site platformSitesProvisionStaticSite\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\n provision-site-preview provisionSitePreview\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. Pass organization_id to have the organization own the database from the start (the caller must be an owner of that organization); the requesting user is still the identity bootstrapped into the new database. Omit it for a personal database. 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 SELECT * FROM metaschema_public.request_database('team_app', 'example.com', preset_slug := 'full', organization_id := '00000000-0000-0000-0000-000000000000'::uuid);\n set-field-order setFieldOrder\n set-site-preview setSitePreview\n site-metadata-install-robots siteMetadataInstallRobots\n sites-install-content-preset sitesInstallContentPreset\n sites-install-mantra sitesInstallMantra\n sites-provision-static-site sitesProvisionStaticSite\n suspend-database suspendDatabase\n unsuspend-database unsuspendDatabase\n update-function-from-source Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged.\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 email-identity emailIdentity CRUD operations\n email-provider-account emailProviderAccount CRUD operations\n email-site-identity emailSiteIdentity 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 get-site-previews-record getSitePreviewsRecord CRUD operations\n identity-provider-registry identityProviderRegistry CRUD operations\n index index CRUD operations\n list-suspended-databases-record listSuspendedDatabasesRecord 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-email-identity platformEmailIdentity CRUD operations\n platform-email-provider-account platformEmailProviderAccount CRUD operations\n platform-email-site-identity platformEmailSiteIdentity CRUD operations\n platform-get-site-previews-record platformGetSitePreviewsRecord CRUD operations\n platform-managed-domain platformManagedDomain CRUD operations\n platform-page platformPage CRUD operations\n platform-reserved-subdomain platformReservedSubdomain 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-release platformSiteRelease 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 redirect redirect CRUD operations\n rls-setting rlsSetting 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-release siteRelease 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 apply-registry-defaults applyRegistryDefaults\n email-shared-account emailSharedAccount\n get-site-preview-commit getSitePreviewCommit\n get-site-release-manifest getSiteReleaseManifest\n page-published pagePublished\n platform-get-site-preview-commit platformGetSitePreviewCommit\n platform-get-site-release-manifest platformGetSiteReleaseManifest\n platform-page-published platformPagePublished\n platform-sites-deep-link-url platformSitesDeepLinkUrl\n platform-sites-site-origin platformSitesSiteOrigin\n platform-verify-site-preview-token platformVerifySitePreviewToken\n sites-deep-link-url sitesDeepLinkUrl\n sites-site-origin sitesSiteOrigin\n verify-site-preview-token verifySitePreviewToken\n accept-database-transfer acceptDatabaseTransfer\n apply-rls applyRls\n cancel-database-transfer cancelDatabaseTransfer\n delete-site-preview deleteSitePreview\n domains-assign-subdomain domainsAssignSubdomain\n mint-site-preview-token mintSitePreviewToken\n pages-install-pages pagesInstallPages\n platform-delete-site-preview platformDeleteSitePreview\n platform-domains-assign-subdomain platformDomainsAssignSubdomain\n platform-mint-site-preview-token platformMintSitePreviewToken\n platform-pages-install-pages platformPagesInstallPages\n platform-provision-site-preview platformProvisionSitePreview\n platform-set-site-preview platformSetSitePreview\n platform-site-metadata-install-robots platformSiteMetadataInstallRobots\n platform-sites-install-content-preset platformSitesInstallContentPreset\n platform-sites-install-mantra platformSitesInstallMantra\n platform-sites-provision-static-site platformSitesProvisionStaticSite\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\n provision-site-preview provisionSitePreview\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. Pass organization_id to have the organization own the database from the start (the caller must be an owner of that organization); the requesting user is still the identity bootstrapped into the new database. Omit it for a personal database. 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 SELECT * FROM metaschema_public.request_database('team_app', 'example.com', preset_slug := 'full', organization_id := '00000000-0000-0000-0000-000000000000'::uuid);\n set-field-order setFieldOrder\n set-site-preview setSitePreview\n site-metadata-install-robots siteMetadataInstallRobots\n sites-install-content-preset sitesInstallContentPreset\n sites-install-mantra sitesInstallMantra\n sites-provision-static-site sitesProvisionStaticSite\n suspend-database suspendDatabase\n unsuspend-database unsuspendDatabase\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/api.ts b/sdk/constructive-cli/src/api/cli/commands/api.ts index d7efd0643c..d657f3016b 100644 --- a/sdk/constructive-cli/src/api/cli/commands/api.ts +++ b/sdk/constructive-cli/src/api/cli/commands/api.ts @@ -20,7 +20,6 @@ const fieldSchema: FieldSchema = { config: 'json', createdAt: 'string', databaseId: 'uuid', - dbname: 'string', id: 'uuid', isPublished: 'boolean', name: 'string', @@ -82,7 +81,6 @@ async function handleList(argv: Partial>, _prompter: Inq config: true, createdAt: true, databaseId: true, - dbname: true, id: true, isPublished: true, name: true, @@ -112,7 +110,6 @@ async function handleFindFirst(argv: Partial>, _prompter config: true, createdAt: true, databaseId: true, - dbname: true, id: true, isPublished: true, name: true, @@ -154,7 +151,6 @@ async function handleGet(argv: Partial>, prompter: Inqui config: true, createdAt: true, databaseId: true, - dbname: true, id: true, isPublished: true, name: true, @@ -195,13 +191,6 @@ async function handleCreate(argv: Partial>, prompter: In message: 'databaseId', required: true, }, - { - type: 'text', - name: 'dbname', - message: 'dbname', - required: false, - skipPrompt: true, - }, { type: 'boolean', name: 'isPublished', @@ -232,7 +221,6 @@ async function handleCreate(argv: Partial>, prompter: In anonRole: cleanedData.anonRole, config: cleanedData.config, databaseId: cleanedData.databaseId, - dbname: cleanedData.dbname, isPublished: cleanedData.isPublished, name: cleanedData.name, roleName: cleanedData.roleName, @@ -242,7 +230,6 @@ async function handleCreate(argv: Partial>, prompter: In config: true, createdAt: true, databaseId: true, - dbname: true, id: true, isPublished: true, name: true, @@ -289,13 +276,6 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'databaseId', required: false, }, - { - type: 'text', - name: 'dbname', - message: 'dbname', - required: false, - skipPrompt: true, - }, { type: 'boolean', name: 'isPublished', @@ -329,7 +309,6 @@ async function handleUpdate(argv: Partial>, prompter: In anonRole: cleanedData.anonRole, config: cleanedData.config, databaseId: cleanedData.databaseId, - dbname: cleanedData.dbname, isPublished: cleanedData.isPublished, name: cleanedData.name, roleName: cleanedData.roleName, @@ -339,7 +318,6 @@ async function handleUpdate(argv: Partial>, prompter: In config: true, createdAt: true, databaseId: true, - dbname: true, id: true, isPublished: true, name: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/platform-api.ts b/sdk/constructive-cli/src/api/cli/commands/platform-api.ts index 6338ed05c9..f31174f4b3 100644 --- a/sdk/constructive-cli/src/api/cli/commands/platform-api.ts +++ b/sdk/constructive-cli/src/api/cli/commands/platform-api.ts @@ -19,7 +19,6 @@ const fieldSchema: FieldSchema = { anonRole: 'string', config: 'json', createdAt: 'string', - dbname: 'string', id: 'uuid', isPublished: 'boolean', name: 'string', @@ -80,7 +79,6 @@ async function handleList(argv: Partial>, _prompter: Inq anonRole: true, config: true, createdAt: true, - dbname: true, id: true, isPublished: true, name: true, @@ -109,7 +107,6 @@ async function handleFindFirst(argv: Partial>, _prompter anonRole: true, config: true, createdAt: true, - dbname: true, id: true, isPublished: true, name: true, @@ -150,7 +147,6 @@ async function handleGet(argv: Partial>, prompter: Inqui anonRole: true, config: true, createdAt: true, - dbname: true, id: true, isPublished: true, name: true, @@ -185,13 +181,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'dbname', - message: 'dbname', - required: false, - skipPrompt: true, - }, { type: 'boolean', name: 'isPublished', @@ -224,7 +213,6 @@ async function handleCreate(argv: Partial>, prompter: In data: { anonRole: cleanedData.anonRole, config: cleanedData.config, - dbname: cleanedData.dbname, isPublished: cleanedData.isPublished, name: cleanedData.name, roleName: cleanedData.roleName, @@ -233,7 +221,6 @@ async function handleCreate(argv: Partial>, prompter: In anonRole: true, config: true, createdAt: true, - dbname: true, id: true, isPublished: true, name: true, @@ -274,13 +261,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'dbname', - message: 'dbname', - required: false, - skipPrompt: true, - }, { type: 'boolean', name: 'isPublished', @@ -313,7 +293,6 @@ async function handleUpdate(argv: Partial>, prompter: In data: { anonRole: cleanedData.anonRole, config: cleanedData.config, - dbname: cleanedData.dbname, isPublished: cleanedData.isPublished, name: cleanedData.name, roleName: cleanedData.roleName, @@ -322,7 +301,6 @@ async function handleUpdate(argv: Partial>, prompter: In anonRole: true, config: true, createdAt: true, - dbname: true, id: true, isPublished: true, name: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/platform-reserved-subdomain.ts b/sdk/constructive-cli/src/api/cli/commands/platform-reserved-subdomain.ts new file mode 100644 index 0000000000..5d5c1eb2ca --- /dev/null +++ b/sdk/constructive-cli/src/api/cli/commands/platform-reserved-subdomain.ts @@ -0,0 +1,359 @@ +/** + * CLI commands for PlatformReservedSubdomain + * @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 { + CreatePlatformReservedSubdomainInput, + PlatformReservedSubdomainPatch, + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + createdAt: 'string', + createdByPrincipal: 'uuid', + id: 'uuid', + label: 'string', + match: 'string', + reason: 'string', + updatedAt: 'string', + updatedByPrincipal: 'uuid', +}; +const usage = + '\nplatform-reserved-subdomain \n\nCommands:\n list List platformReservedSubdomain records\n find-first Find first matching platformReservedSubdomain record\n get Get a platformReservedSubdomain by ID\n create Create a new platformReservedSubdomain\n update Update an existing platformReservedSubdomain\n delete Delete a platformReservedSubdomain\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 = { + createdAt: true, + createdByPrincipal: true, + id: true, + label: true, + match: true, + reason: true, + updatedAt: true, + updatedByPrincipal: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs< + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy + > & { + select: PlatformReservedSubdomainSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.platformReservedSubdomain.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 = { + createdAt: true, + createdByPrincipal: true, + id: true, + label: true, + match: true, + reason: true, + updatedAt: true, + updatedByPrincipal: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs< + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy + > & { + select: PlatformReservedSubdomainSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.platformReservedSubdomain.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.platformReservedSubdomain + .findOne({ + id: answers.id as string, + select: { + createdAt: true, + createdByPrincipal: true, + id: true, + label: true, + match: true, + reason: true, + updatedAt: true, + updatedByPrincipal: 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: 'createdByPrincipal', + message: 'createdByPrincipal', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'label', + message: 'label', + required: true, + }, + { + type: 'text', + name: 'match', + message: 'match', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'reason', + message: 'reason', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'updatedByPrincipal', + message: 'updatedByPrincipal', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreatePlatformReservedSubdomainInput['platformReservedSubdomain']; + const client = getClient(); + const result = await client.platformReservedSubdomain + .create({ + data: { + createdByPrincipal: cleanedData.createdByPrincipal, + label: cleanedData.label, + match: cleanedData.match, + reason: cleanedData.reason, + updatedByPrincipal: cleanedData.updatedByPrincipal, + }, + select: { + createdAt: true, + createdByPrincipal: true, + id: true, + label: true, + match: true, + reason: true, + updatedAt: true, + updatedByPrincipal: 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: 'createdByPrincipal', + message: 'createdByPrincipal', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'label', + message: 'label', + required: false, + }, + { + type: 'text', + name: 'match', + message: 'match', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'reason', + message: 'reason', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'updatedByPrincipal', + message: 'updatedByPrincipal', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as PlatformReservedSubdomainPatch; + const client = getClient(); + const result = await client.platformReservedSubdomain + .update({ + where: { + id: answers.id as string, + }, + data: { + createdByPrincipal: cleanedData.createdByPrincipal, + label: cleanedData.label, + match: cleanedData.match, + reason: cleanedData.reason, + updatedByPrincipal: cleanedData.updatedByPrincipal, + }, + select: { + createdAt: true, + createdByPrincipal: true, + id: true, + label: true, + match: true, + reason: true, + updatedAt: true, + updatedByPrincipal: 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.platformReservedSubdomain + .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/api/cli/commands/resolve-deep-link.ts b/sdk/constructive-cli/src/api/cli/commands/resolve-deep-link.ts deleted file mode 100644 index 61d1d15ae2..0000000000 --- a/sdk/constructive-cli/src/api/cli/commands/resolve-deep-link.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * CLI command for query resolveDeepLink - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { CLIOptions, Inquirerer } from 'inquirerer'; -import { getClient } from '../executor'; -import type { ResolveDeepLinkVariables } from '../../orm/query'; -export default async ( - argv: Partial>, - prompter: Inquirerer, - _options: CLIOptions -) => { - try { - if (argv.help || argv.h) { - console.log('resolve-deep-link - resolveDeepLink\n\nUsage: resolve-deep-link [OPTIONS]\n'); - process.exit(0); - } - const answers = await prompter.prompt(argv, [ - { - type: 'text', - name: 'linkSlug', - message: 'linkSlug', - }, - { - type: 'text', - name: 'targetSiteId', - message: 'targetSiteId', - }, - ]); - const client = getClient(); - const result = await client.query - .resolveDeepLink(answers as unknown as ResolveDeepLinkVariables) - .execute(); - console.log(JSON.stringify(result, null, 2)); - } catch (error) { - console.error('Failed: resolveDeepLink'); - if (error instanceof Error) { - console.error(error.message); - } - process.exit(1); - } -}; diff --git a/sdk/constructive-cli/src/api/cli/commands/resolve-route.ts b/sdk/constructive-cli/src/api/cli/commands/resolve-route.ts deleted file mode 100644 index 45af777b53..0000000000 --- a/sdk/constructive-cli/src/api/cli/commands/resolve-route.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * CLI command for query resolveRoute - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { CLIOptions, Inquirerer } from 'inquirerer'; -import { getClient } from '../executor'; -import { buildSelectFromPaths } from '../utils'; -import type { ResolveRouteVariables } from '../../orm/query'; -import type { ResolveRouteRecordSelect } from '../../orm/input-types'; -export default async ( - argv: Partial>, - prompter: Inquirerer, - _options: CLIOptions -) => { - try { - if (argv.help || argv.h) { - console.log('resolve-route - resolveRoute\n\nUsage: resolve-route [OPTIONS]\n'); - process.exit(0); - } - const answers = await prompter.prompt(argv, [ - { - type: 'text', - name: 'requestHost', - message: 'requestHost', - }, - { - type: 'text', - name: 'requestMethod', - message: 'requestMethod', - }, - { - type: 'text', - name: 'requestPath', - message: 'requestPath', - }, - ]); - const client = getClient(); - const selectFields = buildSelectFromPaths((argv.select as string) ?? ''); - const result = await client.query - .resolveRoute( - answers as unknown as ResolveRouteVariables, - { - select: selectFields, - } as unknown as { - select: ResolveRouteRecordSelect; - } - ) - .execute(); - console.log(JSON.stringify(result, null, 2)); - } catch (error) { - console.error('Failed: resolveRoute'); - if (error instanceof Error) { - console.error(error.message); - } - process.exit(1); - } -}; diff --git a/sdk/constructive-cli/src/api/cli/commands/update-function-from-source.ts b/sdk/constructive-cli/src/api/cli/commands/update-function-from-source.ts deleted file mode 100644 index 04179d5675..0000000000 --- a/sdk/constructive-cli/src/api/cli/commands/update-function-from-source.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * CLI command for mutation updateFunctionFromSource - * @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 { UpdateFunctionFromSourceVariables } from '../../orm/mutation'; -import type { UpdateFunctionPayloadSelect } from '../../orm/input-types'; -export default async ( - argv: Partial>, - prompter: Inquirerer, - _options: CLIOptions -) => { - try { - if (argv.help || argv.h) { - console.log( - "update-function-from-source - Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged.\n\nUsage: update-function-from-source [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 - .updateFunctionFromSource( - parsedAnswers as unknown as UpdateFunctionFromSourceVariables, - { - select: selectFields, - } as unknown as { - select: UpdateFunctionPayloadSelect; - } - ) - .execute(); - console.log(JSON.stringify(result, null, 2)); - } catch (error) { - console.error('Failed: updateFunctionFromSource'); - if (error instanceof Error) { - console.error(error.message); - } - process.exit(1); - } -}; diff --git a/sdk/constructive-cli/src/api/orm/README.md b/sdk/constructive-cli/src/api/orm/README.md index 02e465c85e..66090e441e 100644 --- a/sdk/constructive-cli/src/api/orm/README.md +++ b/sdk/constructive-cli/src/api/orm/README.md @@ -70,6 +70,7 @@ const db = createClient({ | `platformGetSitePreviewsRecord` | findMany, findOne, create, update, delete | | `platformManagedDomain` | findMany, findOne, create, update, delete | | `platformPage` | findMany, findOne, create, update, delete | +| `platformReservedSubdomain` | findMany, findOne, create, update, delete | | `platformSiteAppLink` | findMany, findOne, create, update, delete | | `platformSite` | findMany, findOne, create, update, delete | | `platformSiteDeepLink` | findMany, findOne, create, update, delete | @@ -126,7 +127,6 @@ CRUD operations for Api records. | `config` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `dbname` | String | Yes | | `id` | UUID | No | | `isPublished` | Boolean | Yes | | `name` | String | Yes | @@ -137,13 +137,13 @@ CRUD operations for Api records. ```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(); +const items = await db.api.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: 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(); +const item = await db.api.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: 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(); +const created = await db.api.create({ data: { anonRole: '', config: '', databaseId: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); // Update const updated = await db.api.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); @@ -1601,7 +1601,6 @@ CRUD operations for PlatformApi records. | `anonRole` | String | Yes | | `config` | JSON | Yes | | `createdAt` | Datetime | No | -| `dbname` | String | Yes | | `id` | UUID | No | | `isPublished` | Boolean | Yes | | `name` | String | Yes | @@ -1612,13 +1611,13 @@ CRUD operations for PlatformApi records. ```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(); +const items = await db.platformApi.findMany({ select: { anonRole: true, config: true, createdAt: 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(); +const item = await db.platformApi.findOne({ id: '', select: { anonRole: true, config: true, createdAt: 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(); +const created = await db.platformApi.create({ data: { anonRole: '', config: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformApi.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); @@ -2100,6 +2099,42 @@ const updated = await db.platformPage.update({ where: { id: '' }, data: { const deleted = await db.platformPage.delete({ where: { id: '' } }).execute(); ``` +### `db.platformReservedSubdomain` + +CRUD operations for PlatformReservedSubdomain records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `createdByPrincipal` | UUID | Yes | +| `id` | UUID | No | +| `label` | String | Yes | +| `match` | String | Yes | +| `reason` | String | Yes | +| `updatedAt` | Datetime | No | +| `updatedByPrincipal` | UUID | Yes | + +**Operations:** + +```typescript +// List all platformReservedSubdomain records +const items = await db.platformReservedSubdomain.findMany({ select: { createdAt: true, createdByPrincipal: true, id: true, label: true, match: true, reason: true, updatedAt: true, updatedByPrincipal: true } }).execute(); + +// Get one by id +const item = await db.platformReservedSubdomain.findOne({ id: '', select: { createdAt: true, createdByPrincipal: true, id: true, label: true, match: true, reason: true, updatedAt: true, updatedByPrincipal: true } }).execute(); + +// Create +const created = await db.platformReservedSubdomain.create({ data: { createdByPrincipal: '', label: '', match: '', reason: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformReservedSubdomain.update({ where: { id: '' }, data: { createdByPrincipal: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformReservedSubdomain.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformSiteAppLink` CRUD operations for PlatformSiteAppLink records. @@ -3706,21 +3741,6 @@ const deleted = await db.webauthnSetting.delete({ where: { id: '' } }).exe ## Custom Operations -### `db.query.apiSchemaNames` - -apiSchemaNames - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `targetApiId` | UUID | - -```typescript -const result = await db.query.apiSchemaNames({ targetApiId: '' }).execute(); -``` - ### `db.query.applyRegistryDefaults` applyRegistryDefaults @@ -3891,54 +3911,6 @@ platformVerifySitePreviewToken const result = await db.query.platformVerifySitePreviewToken({ siteId: '', token: '' }).execute(); ``` -### `db.query.resolveDeepLink` - -resolveDeepLink - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `linkSlug` | String | - | `targetSiteId` | UUID | - -```typescript -const result = await db.query.resolveDeepLink({ linkSlug: '', targetSiteId: '' }).execute(); -``` - -### `db.query.resolveRoute` - -resolveRoute - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `requestHost` | String | - | `requestMethod` | String | - | `requestPath` | String | - -```typescript -const result = await db.query.resolveRoute({ requestHost: '', requestMethod: '', requestPath: '' }).execute(); -``` - -### `db.query.resolveSiteAppLinks` - -resolveSiteAppLinks - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `targetSiteId` | UUID | - -```typescript -const result = await db.query.resolveSiteAppLinks({ targetSiteId: '' }).execute(); -``` - ### `db.query.sitesDeepLinkUrl` sitesDeepLinkUrl @@ -4031,21 +4003,6 @@ cancelDatabaseTransfer const result = await db.mutation.cancelDatabaseTransfer({ input: { transferId: '' } }).execute(); ``` -### `db.mutation.createFunctionFromSource` - -Creates a `Function` from its `CREATE FUNCTION` source text. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | CreateFunctionFromSourceInput (required) | - -```typescript -const result = await db.mutation.createFunctionFromSource({ input: { apiExposed: '', databaseId: '', schemaId: '', source: '' } }).execute(); -``` - ### `db.mutation.deleteSitePreview` deleteSitePreview @@ -4447,18 +4404,3 @@ unsuspendDatabase ```typescript const result = await db.mutation.unsuspendDatabase({ input: { databaseId: '', reason: '' } }).execute(); ``` - -### `db.mutation.updateFunctionFromSource` - -Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | UpdateFunctionFromSourceInput (required) | - -```typescript -const result = await db.mutation.updateFunctionFromSource({ input: { id: '', source: '' } }).execute(); -``` diff --git a/sdk/constructive-cli/src/api/orm/index.ts b/sdk/constructive-cli/src/api/orm/index.ts index 038b8785ac..eb190bc93d 100644 --- a/sdk/constructive-cli/src/api/orm/index.ts +++ b/sdk/constructive-cli/src/api/orm/index.ts @@ -54,6 +54,7 @@ import { PlatformEmailSiteIdentityModel } from './models/platformEmailSiteIdenti import { PlatformGetSitePreviewsRecordModel } from './models/platformGetSitePreviewsRecord'; import { PlatformManagedDomainModel } from './models/platformManagedDomain'; import { PlatformPageModel } from './models/platformPage'; +import { PlatformReservedSubdomainModel } from './models/platformReservedSubdomain'; import { PlatformSiteAppLinkModel } from './models/platformSiteAppLink'; import { PlatformSiteModel } from './models/platformSite'; import { PlatformSiteDeepLinkModel } from './models/platformSiteDeepLink'; @@ -179,6 +180,7 @@ export function createClient(config: OrmClientConfig) { platformGetSitePreviewsRecord: new PlatformGetSitePreviewsRecordModel(client), platformManagedDomain: new PlatformManagedDomainModel(client), platformPage: new PlatformPageModel(client), + platformReservedSubdomain: new PlatformReservedSubdomainModel(client), platformSiteAppLink: new PlatformSiteAppLinkModel(client), platformSite: new PlatformSiteModel(client), platformSiteDeepLink: new PlatformSiteDeepLinkModel(client), diff --git a/sdk/constructive-cli/src/api/orm/input-types.ts b/sdk/constructive-cli/src/api/orm/input-types.ts index f4e5da7908..38d819c123 100644 --- a/sdk/constructive-cli/src/api/orm/input-types.ts +++ b/sdk/constructive-cli/src/api/orm/input-types.ts @@ -245,8 +245,6 @@ export interface Api { 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; @@ -945,8 +943,6 @@ export interface PlatformApi { /** 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; @@ -1229,6 +1225,20 @@ export interface PlatformPage { /** Timestamp of last modification */ updatedAt?: string | null; } +/** Subdomain labels no tenant may claim under a platform apex */ +export interface PlatformReservedSubdomain { + createdAt?: string | null; + createdByPrincipal?: string | null; + id: string; + /** Lowercase subdomain label, or the label prefix/suffix the match names */ + label?: string | null; + /** How the label matches a claimed label: exact, prefix or suffix */ + match?: string | null; + /** Why the label is reserved (free text, e.g. platform, brand, lookalike) */ + reason?: string | null; + updatedAt?: string | null; + updatedByPrincipal?: string | null; +} /** Per-host native-app association for a site surface: which app-owned store identity this host serves, and the path patterns it claims (joined with the store identity to render AASA / assetlinks.json) */ export interface PlatformSiteAppLink { /** App-owned store identity this association serves (app_store_identities row in this scope's app plane; the association carries no store facts of its own) */ @@ -2203,6 +2213,7 @@ export interface PlatformManagedDomainRelations { export interface PlatformPageRelations { site?: PlatformSite | null; } +export interface PlatformReservedSubdomainRelations {} export interface PlatformSiteAppLinkRelations { site?: PlatformSite | null; } @@ -2490,6 +2501,8 @@ export type PlatformGetSitePreviewsRecordWithRelations = PlatformGetSitePreviews export type PlatformManagedDomainWithRelations = PlatformManagedDomain & PlatformManagedDomainRelations; export type PlatformPageWithRelations = PlatformPage & PlatformPageRelations; +export type PlatformReservedSubdomainWithRelations = PlatformReservedSubdomain & + PlatformReservedSubdomainRelations; export type PlatformSiteAppLinkWithRelations = PlatformSiteAppLink & PlatformSiteAppLinkRelations; export type PlatformSiteWithRelations = PlatformSite & PlatformSiteRelations; export type PlatformSiteDeepLinkWithRelations = PlatformSiteDeepLink & @@ -2543,7 +2556,6 @@ export type ApiSelect = { config?: boolean; createdAt?: boolean; databaseId?: boolean; - dbname?: boolean; id?: boolean; isPublished?: boolean; name?: boolean; @@ -3547,7 +3559,6 @@ export type PlatformApiSelect = { anonRole?: boolean; config?: boolean; createdAt?: boolean; - dbname?: boolean; id?: boolean; isPublished?: boolean; name?: boolean; @@ -3802,6 +3813,16 @@ export type PlatformPageSelect = { select: PlatformSiteSelect; }; }; +export type PlatformReservedSubdomainSelect = { + createdAt?: boolean; + createdByPrincipal?: boolean; + id?: boolean; + label?: boolean; + match?: boolean; + reason?: boolean; + updatedAt?: boolean; + updatedByPrincipal?: boolean; +}; export type PlatformSiteAppLinkSelect = { appStoreIdentityId?: boolean; createdAt?: boolean; @@ -4949,8 +4970,6 @@ export interface ApiFilter { 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. */ @@ -6478,8 +6497,6 @@ export interface PlatformApiFilter { 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. */ @@ -6936,6 +6953,30 @@ export interface PlatformPageFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface PlatformReservedSubdomainFilter { + /** Checks for all expressions in this list. */ + and?: PlatformReservedSubdomainFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `label` field. */ + label?: StringFilter; + /** Filter by the object’s `match` field. */ + match?: StringFilter; + /** Negates the expression. */ + not?: PlatformReservedSubdomainFilter; + /** Checks for any expressions in this list. */ + or?: PlatformReservedSubdomainFilter[]; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} export interface PlatformSiteAppLinkFilter { /** Checks for all expressions in this list. */ and?: PlatformSiteAppLinkFilter[]; @@ -8650,8 +8691,6 @@ export type ApiOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLISHED_ASC' @@ -9726,8 +9765,6 @@ export type PlatformApiOrderBy = | 'CONFIG_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLISHED_ASC' @@ -10063,6 +10100,26 @@ export type PlatformPageOrderBy = | 'STORE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type PlatformReservedSubdomainOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LABEL_ASC' + | 'LABEL_DESC' + | 'MATCH_ASC' + | 'MATCH_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REASON_ASC' + | 'REASON_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; export type PlatformSiteAppLinkOrderBy = | 'APP_STORE_IDENTITY_ID_ASC' | 'APP_STORE_IDENTITY_ID_DESC' @@ -11144,7 +11201,6 @@ export interface CreateApiInput { anonRole?: string; config?: Record; databaseId: string; - dbname?: string; isPublished?: boolean; name: string; roleName?: string; @@ -11154,7 +11210,6 @@ export interface ApiPatch { anonRole?: string | null; config?: Record | null; databaseId?: string | null; - dbname?: string | null; isPublished?: boolean | null; name?: string | null; roleName?: string | null; @@ -12479,7 +12534,6 @@ export interface CreatePlatformApiInput { platformApi: { anonRole?: string; config?: Record; - dbname?: string; isPublished?: boolean; name: string; roleName?: string; @@ -12488,7 +12542,6 @@ export interface CreatePlatformApiInput { export interface PlatformApiPatch { anonRole?: string | null; config?: Record | null; - dbname?: string | null; isPublished?: boolean | null; name?: string | null; roleName?: string | null; @@ -12902,6 +12955,32 @@ export interface DeletePlatformPageInput { clientMutationId?: string; id: string; } +export interface CreatePlatformReservedSubdomainInput { + clientMutationId?: string; + platformReservedSubdomain: { + createdByPrincipal?: string; + label: string; + match?: string; + reason?: string; + updatedByPrincipal?: string; + }; +} +export interface PlatformReservedSubdomainPatch { + createdByPrincipal?: string | null; + label?: string | null; + match?: string | null; + reason?: string | null; + updatedByPrincipal?: string | null; +} +export interface UpdatePlatformReservedSubdomainInput { + clientMutationId?: string; + id: string; + platformReservedSubdomainPatch: PlatformReservedSubdomainPatch; +} +export interface DeletePlatformReservedSubdomainInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformSiteAppLinkInput { clientMutationId?: string; platformSiteAppLink: { @@ -14423,15 +14502,6 @@ export interface CancelDatabaseTransferInput { clientMutationId?: string; transferId?: string; } -/** Author a function from its `CREATE FUNCTION` source text. */ -export interface CreateFunctionFromSourceInput { - apiExposed?: boolean; - clientMutationId?: string; - databaseId: string; - schemaId: string; - /** One `CREATE FUNCTION` statement (LANGUAGE plpgsql or sql). */ - source: string; -} export interface DeleteSitePreviewInput { clientMutationId?: string; targetName?: string; @@ -14599,13 +14669,6 @@ export interface UnsuspendDatabaseInput { databaseId?: string; reason?: string; } -/** Replace a function's definition from its `CREATE FUNCTION` source text. */ -export interface UpdateFunctionFromSourceInput { - clientMutationId?: string; - id: string; - /** One `CREATE FUNCTION` statement (LANGUAGE plpgsql or sql). */ - source: string; -} /** A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ export interface ApiToManyApiSchemaFilter { /** Filters to entities where every related entity matches. */ @@ -15627,8 +15690,6 @@ export interface ApiInput { 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; @@ -16319,8 +16380,6 @@ export interface PlatformApiInput { /** 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; @@ -16599,6 +16658,20 @@ export interface PlatformPageInput { /** Timestamp of last modification */ updatedAt?: string; } +/** An input for mutations affecting `PlatformReservedSubdomain` */ +export interface PlatformReservedSubdomainInput { + createdAt?: string; + createdByPrincipal?: string; + id?: string; + /** Lowercase subdomain label, or the label prefix/suffix the match names */ + label: string; + /** How the label matches a claimed label: exact, prefix or suffix */ + match?: string; + /** Why the label is reserved (free text, e.g. platform, brand, lookalike) */ + reason?: string; + updatedAt?: string; + updatedByPrincipal?: string; +} /** An input for mutations affecting `PlatformSiteAppLink` */ export interface PlatformSiteAppLinkInput { /** App-owned store identity this association serves (app_store_identities row in this scope's app plane; the association carries no store facts of its own) */ @@ -19675,8 +19748,6 @@ export interface ApiFilter { 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. */ @@ -20445,8 +20516,6 @@ export interface PlatformApiFilter { 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. */ @@ -21069,44 +21138,6 @@ export interface BigIntFilter { notIn?: string[]; } // ============ Payload/Return Types (for custom operations) ============ -export interface ResolveRouteRecord { - domainId?: string | null; - hostname?: string | null; - matchedPath?: string | null; - matchedWildcard?: boolean | null; - method?: string | null; - priority?: number | null; - resolvedConfig?: Record | null; - routeBindingId?: string | null; - servingLane?: string | null; - targetCatalogId?: string | null; - targetModule?: string | null; - targetOwnerKey?: string | null; - targetOwnerScope?: string | null; - targetSourceId?: string | null; - tlsSecretName?: string | null; - tlsStatus?: string | null; - verificationStatus?: string | null; -} -export type ResolveRouteRecordSelect = { - domainId?: boolean; - hostname?: boolean; - matchedPath?: boolean; - matchedWildcard?: boolean; - method?: boolean; - priority?: boolean; - resolvedConfig?: boolean; - routeBindingId?: boolean; - servingLane?: boolean; - targetCatalogId?: boolean; - targetModule?: boolean; - targetOwnerKey?: boolean; - targetOwnerScope?: boolean; - targetSourceId?: boolean; - tlsSecretName?: boolean; - tlsStatus?: boolean; - verificationStatus?: boolean; -}; export interface AcceptDatabaseTransferPayload { clientMutationId?: string | null; result?: boolean | null; @@ -21129,21 +21160,6 @@ export type CancelDatabaseTransferPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface CreateFunctionPayload { - clientMutationId?: string | null; - /** The `Function` that was created by this mutation. */ - function?: Function | null; - functionEdge?: FunctionEdge | null; -} -export type CreateFunctionPayloadSelect = { - clientMutationId?: boolean; - function?: { - select: FunctionSelect; - }; - functionEdge?: { - select: FunctionEdgeSelect; - }; -}; export interface DeleteSitePreviewPayload { clientMutationId?: string | null; } @@ -21411,21 +21427,6 @@ export type UnsuspendDatabasePayloadSelect = { select: DatabaseSelect; }; }; -export interface UpdateFunctionPayload { - clientMutationId?: string | null; - /** The `Function` that was updated by this mutation. */ - function?: Function | null; - functionEdge?: FunctionEdge | null; -} -export type UpdateFunctionPayloadSelect = { - clientMutationId?: boolean; - function?: { - select: FunctionSelect; - }; - functionEdge?: { - select: FunctionEdgeSelect; - }; -}; export interface CreateApiPayload { /** The `Api` that was created by this mutation. */ api?: Api | null; @@ -22596,6 +22597,36 @@ export type DeleteFullTextSearchPayloadSelect = { select: FullTextSearchEdgeSelect; }; }; +export interface CreateFunctionPayload { + clientMutationId?: string | null; + /** The `Function` that was created by this mutation. */ + function?: Function | null; + functionEdge?: FunctionEdge | null; +} +export type CreateFunctionPayloadSelect = { + clientMutationId?: boolean; + function?: { + select: FunctionSelect; + }; + functionEdge?: { + select: FunctionEdgeSelect; + }; +}; +export interface UpdateFunctionPayload { + clientMutationId?: string | null; + /** The `Function` that was updated by this mutation. */ + function?: Function | null; + functionEdge?: FunctionEdge | null; +} +export type UpdateFunctionPayloadSelect = { + clientMutationId?: boolean; + function?: { + select: FunctionSelect; + }; + functionEdge?: { + select: FunctionEdgeSelect; + }; +}; export interface DeleteFunctionPayload { clientMutationId?: string | null; /** The `Function` that was deleted by this mutation. */ @@ -23421,6 +23452,51 @@ export type DeletePlatformPagePayloadSelect = { select: PlatformPageEdgeSelect; }; }; +export interface CreatePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was created by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} +export type CreatePlatformReservedSubdomainPayloadSelect = { + clientMutationId?: boolean; + platformReservedSubdomain?: { + select: PlatformReservedSubdomainSelect; + }; + platformReservedSubdomainEdge?: { + select: PlatformReservedSubdomainEdgeSelect; + }; +}; +export interface UpdatePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was updated by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} +export type UpdatePlatformReservedSubdomainPayloadSelect = { + clientMutationId?: boolean; + platformReservedSubdomain?: { + select: PlatformReservedSubdomainSelect; + }; + platformReservedSubdomainEdge?: { + select: PlatformReservedSubdomainEdgeSelect; + }; +}; +export interface DeletePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was deleted by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} +export type DeletePlatformReservedSubdomainPayloadSelect = { + clientMutationId?: boolean; + platformReservedSubdomain?: { + select: PlatformReservedSubdomainSelect; + }; + platformReservedSubdomainEdge?: { + select: PlatformReservedSubdomainEdgeSelect; + }; +}; export interface CreatePlatformSiteAppLinkPayload { clientMutationId?: string | null; /** The `PlatformSiteAppLink` that was created by this mutation. */ @@ -25221,18 +25297,6 @@ export type DeleteWebauthnSettingPayloadSelect = { select: WebauthnSettingEdgeSelect; }; }; -/** A `Function` edge in the connection. */ -export interface FunctionEdge { - cursor?: string | null; - /** The `Function` at the end of the edge. */ - node?: Function | null; -} -export type FunctionEdgeSelect = { - cursor?: boolean; - node?: { - select: FunctionSelect; - }; -}; /** A `Domain` edge in the connection. */ export interface DomainEdge { cursor?: string | null; @@ -25725,6 +25789,18 @@ export type FullTextSearchEdgeSelect = { select: FullTextSearchSelect; }; }; +/** A `Function` edge in the connection. */ +export interface FunctionEdge { + cursor?: string | null; + /** The `Function` at the end of the edge. */ + node?: Function | null; +} +export type FunctionEdgeSelect = { + cursor?: boolean; + node?: { + select: FunctionSelect; + }; +}; /** A `IdentityProviderRegistry` edge in the connection. */ export interface IdentityProviderRegistryEdge { cursor?: string | null; @@ -25929,6 +26005,18 @@ export type PlatformPageEdgeSelect = { select: PlatformPageSelect; }; }; +/** A `PlatformReservedSubdomain` edge in the connection. */ +export interface PlatformReservedSubdomainEdge { + cursor?: string | null; + /** The `PlatformReservedSubdomain` at the end of the edge. */ + node?: PlatformReservedSubdomain | null; +} +export type PlatformReservedSubdomainEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformReservedSubdomainSelect; + }; +}; /** A `PlatformSiteAppLink` edge in the connection. */ export interface PlatformSiteAppLinkEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/api/orm/models/index.ts b/sdk/constructive-cli/src/api/orm/models/index.ts index 207f507c84..3cd2ba5b52 100644 --- a/sdk/constructive-cli/src/api/orm/models/index.ts +++ b/sdk/constructive-cli/src/api/orm/models/index.ts @@ -52,6 +52,7 @@ export { PlatformEmailSiteIdentityModel } from './platformEmailSiteIdentity'; export { PlatformGetSitePreviewsRecordModel } from './platformGetSitePreviewsRecord'; export { PlatformManagedDomainModel } from './platformManagedDomain'; export { PlatformPageModel } from './platformPage'; +export { PlatformReservedSubdomainModel } from './platformReservedSubdomain'; export { PlatformSiteAppLinkModel } from './platformSiteAppLink'; export { PlatformSiteModel } from './platformSite'; export { PlatformSiteDeepLinkModel } from './platformSiteDeepLink'; diff --git a/sdk/constructive-cli/src/api/orm/models/platformReservedSubdomain.ts b/sdk/constructive-cli/src/api/orm/models/platformReservedSubdomain.ts new file mode 100644 index 0000000000..ab3f3b97e5 --- /dev/null +++ b/sdk/constructive-cli/src/api/orm/models/platformReservedSubdomain.ts @@ -0,0 +1,247 @@ +/** + * PlatformReservedSubdomain 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 { + PlatformReservedSubdomain, + PlatformReservedSubdomainWithRelations, + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy, + CreatePlatformReservedSubdomainInput, + UpdatePlatformReservedSubdomainInput, + PlatformReservedSubdomainPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformReservedSubdomainModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformReservedSubdomains: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformReservedSubdomain', + 'platformReservedSubdomains', + 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, + }, + 'PlatformReservedSubdomainFilter', + 'PlatformReservedSubdomainOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformReservedSubdomain', + fieldName: 'platformReservedSubdomains', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformReservedSubdomain: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformReservedSubdomain', + 'platformReservedSubdomains', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformReservedSubdomainFilter', + 'PlatformReservedSubdomainOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformReservedSubdomain', + fieldName: 'platformReservedSubdomain', + document, + variables, + transform: (data: { + platformReservedSubdomains?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformReservedSubdomain: data.platformReservedSubdomains?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformReservedSubdomain: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformReservedSubdomain', + 'platformReservedSubdomains', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformReservedSubdomainFilter', + 'PlatformReservedSubdomainOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformReservedSubdomain', + fieldName: 'platformReservedSubdomain', + document, + variables, + transform: (data: { + platformReservedSubdomains?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformReservedSubdomain: data.platformReservedSubdomains?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformReservedSubdomain', + 'createPlatformReservedSubdomain', + 'platformReservedSubdomain', + args.select, + args.data, + 'CreatePlatformReservedSubdomainInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformReservedSubdomain', + fieldName: 'createPlatformReservedSubdomain', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformReservedSubdomainPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformReservedSubdomain', + 'updatePlatformReservedSubdomain', + 'platformReservedSubdomain', + args.select, + args.where.id, + args.data, + 'UpdatePlatformReservedSubdomainInput', + 'id', + 'platformReservedSubdomainPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformReservedSubdomain', + fieldName: 'updatePlatformReservedSubdomain', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformReservedSubdomain', + 'deletePlatformReservedSubdomain', + 'platformReservedSubdomain', + { + id: args.where.id, + }, + 'DeletePlatformReservedSubdomainInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformReservedSubdomain', + fieldName: 'deletePlatformReservedSubdomain', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/api/orm/mutation/index.ts b/sdk/constructive-cli/src/api/orm/mutation/index.ts index 0afacc078c..2e33f95824 100644 --- a/sdk/constructive-cli/src/api/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/api/orm/mutation/index.ts @@ -10,7 +10,6 @@ import type { AcceptDatabaseTransferInput, ApplyRlsInput, CancelDatabaseTransferInput, - CreateFunctionFromSourceInput, DeleteSitePreviewInput, DomainsAssignSubdomainInput, MintSitePreviewTokenInput, @@ -37,11 +36,9 @@ import type { SitesProvisionStaticSiteInput, SuspendDatabaseInput, UnsuspendDatabaseInput, - UpdateFunctionFromSourceInput, AcceptDatabaseTransferPayload, ApplyRlsPayload, CancelDatabaseTransferPayload, - CreateFunctionPayload, DeleteSitePreviewPayload, DomainsAssignSubdomainPayload, MintSitePreviewTokenPayload, @@ -68,11 +65,9 @@ import type { SitesProvisionStaticSitePayload, SuspendDatabasePayload, UnsuspendDatabasePayload, - UpdateFunctionPayload, AcceptDatabaseTransferPayloadSelect, ApplyRlsPayloadSelect, CancelDatabaseTransferPayloadSelect, - CreateFunctionPayloadSelect, DeleteSitePreviewPayloadSelect, DomainsAssignSubdomainPayloadSelect, MintSitePreviewTokenPayloadSelect, @@ -99,7 +94,6 @@ import type { SitesProvisionStaticSitePayloadSelect, SuspendDatabasePayloadSelect, UnsuspendDatabasePayloadSelect, - UpdateFunctionPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface AcceptDatabaseTransferVariables { @@ -111,13 +105,6 @@ export interface ApplyRlsVariables { export interface CancelDatabaseTransferVariables { input: CancelDatabaseTransferInput; } -/** - * Variables for createFunctionFromSource - * Creates a `Function` from its `CREATE FUNCTION` source text. - */ -export interface CreateFunctionFromSourceVariables { - input: CreateFunctionFromSourceInput; -} export interface DeleteSitePreviewVariables { input: DeleteSitePreviewInput; } @@ -216,13 +203,6 @@ export interface SuspendDatabaseVariables { export interface UnsuspendDatabaseVariables { input: UnsuspendDatabaseInput; } -/** - * Variables for updateFunctionFromSource - * Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. - */ -export interface UpdateFunctionFromSourceVariables { - input: UpdateFunctionFromSourceInput; -} export function createMutationOperations(client: OrmClient) { return { acceptDatabaseTransfer: ( @@ -312,35 +292,6 @@ export function createMutationOperations(client: OrmClient) { 'CancelDatabaseTransferPayload' ), }), - createFunctionFromSource: ( - args: CreateFunctionFromSourceVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - createFunctionFromSource: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'CreateFunctionFromSource', - fieldName: 'createFunctionFromSource', - ...buildCustomDocument( - 'mutation', - 'CreateFunctionFromSource', - 'createFunctionFromSource', - options.select, - args, - [ - { - name: 'input', - type: 'CreateFunctionFromSourceInput!', - }, - ], - connectionFieldsMap, - 'CreateFunctionPayload' - ), - }), deleteSitePreview: ( args: DeleteSitePreviewVariables, options: { @@ -1113,34 +1064,5 @@ export function createMutationOperations(client: OrmClient) { 'UnsuspendDatabasePayload' ), }), - updateFunctionFromSource: ( - args: UpdateFunctionFromSourceVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - updateFunctionFromSource: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'UpdateFunctionFromSource', - fieldName: 'updateFunctionFromSource', - ...buildCustomDocument( - 'mutation', - 'UpdateFunctionFromSource', - 'updateFunctionFromSource', - options.select, - args, - [ - { - name: 'input', - type: 'UpdateFunctionFromSourceInput!', - }, - ], - connectionFieldsMap, - 'UpdateFunctionPayload' - ), - }), }; } diff --git a/sdk/constructive-cli/src/api/orm/query/index.ts b/sdk/constructive-cli/src/api/orm/query/index.ts index 12ea7b4e72..cfae605185 100644 --- a/sdk/constructive-cli/src/api/orm/query/index.ts +++ b/sdk/constructive-cli/src/api/orm/query/index.ts @@ -6,11 +6,7 @@ import { OrmClient } from '../client'; import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; -import type { ResolveRouteRecord, ResolveRouteRecordSelect } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export interface ApiSchemaNamesVariables { - targetApiId?: string; -} export interface ApplyRegistryDefaultsVariables { data?: unknown; nodeType?: string; @@ -50,18 +46,6 @@ export interface PlatformVerifySitePreviewTokenVariables { siteId?: string; token?: string; } -export interface ResolveDeepLinkVariables { - linkSlug?: string; - targetSiteId?: string; -} -export interface ResolveRouteVariables { - requestHost?: string; - requestMethod?: string; - requestPath?: string; -} -export interface ResolveSiteAppLinksVariables { - targetSiteId?: string; -} export interface SitesDeepLinkUrlVariables { linkSlug?: string; targetSiteId?: string; @@ -75,35 +59,6 @@ export interface VerifySitePreviewTokenVariables { } export function createQueryOperations(client: OrmClient) { return { - apiSchemaNames: ( - args: ApiSchemaNamesVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - apiSchemaNames: unknown | null; - }>({ - client, - operation: 'query', - operationName: 'ApiSchemaNames', - fieldName: 'apiSchemaNames', - ...buildCustomDocument( - 'query', - 'ApiSchemaNames', - 'apiSchemaNames', - options?.select, - args, - [ - { - name: 'targetApiId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), applyRegistryDefaults: ( args: ApplyRegistryDefaultsVariables, options?: { @@ -449,105 +404,6 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - resolveDeepLink: ( - args: ResolveDeepLinkVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveDeepLink: unknown | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveDeepLink', - fieldName: 'resolveDeepLink', - ...buildCustomDocument( - 'query', - 'ResolveDeepLink', - 'resolveDeepLink', - options?.select, - args, - [ - { - name: 'linkSlug', - type: 'String', - }, - { - name: 'targetSiteId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), - resolveRoute: ( - args: ResolveRouteVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - resolveRoute: InferSelectResult | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveRoute', - fieldName: 'resolveRoute', - ...buildCustomDocument( - 'query', - 'ResolveRoute', - 'resolveRoute', - options.select, - args, - [ - { - name: 'requestHost', - type: 'String', - }, - { - name: 'requestMethod', - type: 'String', - }, - { - name: 'requestPath', - type: 'String', - }, - ], - connectionFieldsMap, - 'ResolveRouteRecord' - ), - }), - resolveSiteAppLinks: ( - args: ResolveSiteAppLinksVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveSiteAppLinks: unknown | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveSiteAppLinks', - fieldName: 'resolveSiteAppLinks', - ...buildCustomDocument( - 'query', - 'ResolveSiteAppLinks', - 'resolveSiteAppLinks', - options?.select, - args, - [ - { - name: 'targetSiteId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), sitesDeepLinkUrl: ( args: SitesDeepLinkUrlVariables, options?: { diff --git a/sdk/constructive-cli/src/auth/README.md b/sdk/constructive-cli/src/auth/README.md index 111ed4bd64..424a5ed658 100644 --- a/sdk/constructive-cli/src/auth/README.md +++ b/sdk/constructive-cli/src/auth/README.md @@ -9,8 +9,8 @@ ## Overview - **Tables:** 15 -- **Custom queries:** 6 -- **Custom mutations:** 55 +- **Custom queries:** 7 +- **Custom mutations:** 56 **Generators:** ORM, CLI diff --git a/sdk/constructive-cli/src/auth/cli/README.md b/sdk/constructive-cli/src/auth/cli/README.md index d9ee9099f5..c343a9d4c9 100644 --- a/sdk/constructive-cli/src/auth/cli/README.md +++ b/sdk/constructive-cli/src/auth/cli/README.md @@ -47,12 +47,13 @@ csdk auth set-token | `current-user-id` | currentUserId | | `get-mfa-status` | getMfaStatus | | `require-step-up` | requireStepUp | +| `sign-in-options` | signInOptions | | `approve-device` | approveDevice | | `check-password` | checkPassword | | `complete-mfa-challenge` | completeMfaChallenge | | `confirm-delete-account` | confirmDeleteAccount | | `confirm-totp-setup` | confirmTotpSetup | -| `create-api-key` | createApiKey | +| `create-api-key` | Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key. | | `create-child-principal` | createChildPrincipal | | `create-org-api-key` | createOrgApiKey | | `create-org-principal` | createOrgPrincipal | @@ -66,6 +67,7 @@ csdk auth set-token | `enable-email-mfa` | enableEmailMfa | | `enable-sms-mfa` | enableSmsMfa | | `enable-totp` | enableTotp | +| `exchange-native-handoff` | exchangeNativeHandoff | | `extend-token-expires` | extendTokenExpires | | `forgot-password` | forgotPassword | | `generate-backup-codes` | generateBackupCodes | @@ -657,6 +659,13 @@ requireStepUp |----------|------| | `--stepUpType` | String | +### `sign-in-options` + +signInOptions + +- **Type:** query +- **Arguments:** none + ### `approve-device` approveDevice @@ -727,7 +736,7 @@ confirmTotpSetup ### `create-api-key` -createApiKey +Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key. - **Type:** mutation - **Arguments:** @@ -910,6 +919,20 @@ enableTotp |----------|------| | `--input.clientMutationId` | String | +### `exchange-native-handoff` + +exchangeNativeHandoff + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.code` | String | + | `--input.codeVerifier` | String | + | `--input.credentialKind` | String | + ### `extend-token-expires` extendTokenExpires @@ -1027,7 +1050,9 @@ requestMagicLink | Argument | Type | |----------|------| | `--input.clientMutationId` | String | + | `--input.codeChallenge` | String | | `--input.email` | String | + | `--input.nativeRedirectUri` | String | | `--input.next` | String | ### `reset-password` @@ -1166,6 +1191,7 @@ setPassword | `--input.clientMutationId` | String | | `--input.currentPassword` | String | | `--input.newPassword` | String | + | `--input.signOutOtherSessions` | Boolean | ### `set-principal-entities` diff --git a/sdk/constructive-cli/src/auth/cli/commands.ts b/sdk/constructive-cli/src/auth/cli/commands.ts index 15a3a321e7..314d6dc020 100644 --- a/sdk/constructive-cli/src/auth/cli/commands.ts +++ b/sdk/constructive-cli/src/auth/cli/commands.ts @@ -27,6 +27,7 @@ import currentUserAgentCmd from './commands/current-user-agent'; import currentUserIdCmd from './commands/current-user-id'; import getMfaStatusCmd from './commands/get-mfa-status'; import requireStepUpCmd from './commands/require-step-up'; +import signInOptionsCmd from './commands/sign-in-options'; import approveDeviceCmd from './commands/approve-device'; import checkPasswordCmd from './commands/check-password'; import completeMfaChallengeCmd from './commands/complete-mfa-challenge'; @@ -46,6 +47,7 @@ import disconnectAccountCmd from './commands/disconnect-account'; import enableEmailMfaCmd from './commands/enable-email-mfa'; import enableSmsMfaCmd from './commands/enable-sms-mfa'; import enableTotpCmd from './commands/enable-totp'; +import exchangeNativeHandoffCmd from './commands/exchange-native-handoff'; import extendTokenExpiresCmd from './commands/extend-token-expires'; import forgotPasswordCmd from './commands/forgot-password'; import generateBackupCodesCmd from './commands/generate-backup-codes'; @@ -113,6 +115,7 @@ const createCommandMap: () => Record< 'current-user-id': currentUserIdCmd, 'get-mfa-status': getMfaStatusCmd, 'require-step-up': requireStepUpCmd, + 'sign-in-options': signInOptionsCmd, 'approve-device': approveDeviceCmd, 'check-password': checkPasswordCmd, 'complete-mfa-challenge': completeMfaChallengeCmd, @@ -132,6 +135,7 @@ const createCommandMap: () => Record< 'enable-email-mfa': enableEmailMfaCmd, 'enable-sms-mfa': enableSmsMfaCmd, 'enable-totp': enableTotpCmd, + 'exchange-native-handoff': exchangeNativeHandoffCmd, 'extend-token-expires': extendTokenExpiresCmd, 'forgot-password': forgotPasswordCmd, 'generate-backup-codes': generateBackupCodesCmd, @@ -170,7 +174,7 @@ const createCommandMap: () => Record< 'verify-totp': verifyTotpCmd, }); const usage = - "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n audit-log-auth auditLogAuth CRUD operations\n crypto-address cryptoAddress CRUD operations\n email email CRUD operations\n identity-provider identityProvider CRUD operations\n org-api-key-list orgApiKeyList CRUD operations\n phone-number phoneNumber CRUD operations\n principal principal CRUD operations\n principal-entity principalEntity CRUD operations\n principal-scope-override principalScopeOverride CRUD operations\n role-type roleType CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n user user CRUD operations\n user-setting userSetting CRUD operations\n user-settings-security userSettingsSecurity CRUD operations\n webauthn-credential webauthnCredential CRUD operations\n current-ip-address currentIpAddress\n current-user currentUser\n current-user-agent currentUserAgent\n current-user-id currentUserId\n get-mfa-status getMfaStatus\n require-step-up requireStepUp\n approve-device approveDevice\n check-password checkPassword\n complete-mfa-challenge completeMfaChallenge\n confirm-delete-account confirmDeleteAccount\n confirm-totp-setup confirmTotpSetup\n create-api-key createApiKey\n create-child-principal createChildPrincipal\n create-org-api-key createOrgApiKey\n create-org-principal createOrgPrincipal\n create-principal-from-preset createPrincipalFromPreset\n delete-org-principal deleteOrgPrincipal\n delete-principal deletePrincipal\n disable-email-mfa disableEmailMfa\n disable-sms-mfa disableSmsMfa\n disable-totp disableTotp\n disconnect-account disconnectAccount\n enable-email-mfa enableEmailMfa\n enable-sms-mfa enableSmsMfa\n enable-totp enableTotp\n extend-token-expires extendTokenExpires\n forgot-password forgotPassword\n generate-backup-codes generateBackupCodes\n link-identity linkIdentity\n mint-access-token mintAccessToken\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\n refresh-access-token refreshAccessToken\n request-cross-origin-token requestCrossOriginToken\n request-magic-link requestMagicLink\n reset-password resetPassword\n revoke-api-key revokeApiKey\n revoke-org-api-key revokeOrgApiKey\n revoke-session revokeSession\n send-account-deletion-email sendAccountDeletionEmail\n send-mfa-challenge-code sendMfaChallengeCode\n send-phone-verification-code sendPhoneVerificationCode\n send-sms-otp sendSmsOtp\n send-step-up-code sendStepUpCode\n send-verification-email sendVerificationEmail\n set-password setPassword\n set-principal-entities setPrincipalEntities\n set-principal-scope setPrincipalScope\n sign-in signIn\n sign-in-cross-origin signInCrossOrigin\n sign-in-magic-link signInMagicLink\n sign-in-sms-otp signInSmsOtp\n sign-out signOut\n sign-up signUp\n sign-up-magic-link signUpMagicLink\n sign-up-sms signUpSms\n update-principal updatePrincipal\n verify-email verifyEmail\n verify-password verifyPassword\n verify-phone verifyPhone\n verify-step-up-code verifyStepUpCode\n verify-totp verifyTotp\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 audit-log-auth auditLogAuth CRUD operations\n crypto-address cryptoAddress CRUD operations\n email email CRUD operations\n identity-provider identityProvider CRUD operations\n org-api-key-list orgApiKeyList CRUD operations\n phone-number phoneNumber CRUD operations\n principal principal CRUD operations\n principal-entity principalEntity CRUD operations\n principal-scope-override principalScopeOverride CRUD operations\n role-type roleType CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n user user CRUD operations\n user-setting userSetting CRUD operations\n user-settings-security userSettingsSecurity CRUD operations\n webauthn-credential webauthnCredential CRUD operations\n current-ip-address currentIpAddress\n current-user currentUser\n current-user-agent currentUserAgent\n current-user-id currentUserId\n get-mfa-status getMfaStatus\n require-step-up requireStepUp\n sign-in-options signInOptions\n approve-device approveDevice\n check-password checkPassword\n complete-mfa-challenge completeMfaChallenge\n confirm-delete-account confirmDeleteAccount\n confirm-totp-setup confirmTotpSetup\n create-api-key Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key.\n create-child-principal createChildPrincipal\n create-org-api-key createOrgApiKey\n create-org-principal createOrgPrincipal\n create-principal-from-preset createPrincipalFromPreset\n delete-org-principal deleteOrgPrincipal\n delete-principal deletePrincipal\n disable-email-mfa disableEmailMfa\n disable-sms-mfa disableSmsMfa\n disable-totp disableTotp\n disconnect-account disconnectAccount\n enable-email-mfa enableEmailMfa\n enable-sms-mfa enableSmsMfa\n enable-totp enableTotp\n exchange-native-handoff exchangeNativeHandoff\n extend-token-expires extendTokenExpires\n forgot-password forgotPassword\n generate-backup-codes generateBackupCodes\n link-identity linkIdentity\n mint-access-token mintAccessToken\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\n refresh-access-token refreshAccessToken\n request-cross-origin-token requestCrossOriginToken\n request-magic-link requestMagicLink\n reset-password resetPassword\n revoke-api-key revokeApiKey\n revoke-org-api-key revokeOrgApiKey\n revoke-session revokeSession\n send-account-deletion-email sendAccountDeletionEmail\n send-mfa-challenge-code sendMfaChallengeCode\n send-phone-verification-code sendPhoneVerificationCode\n send-sms-otp sendSmsOtp\n send-step-up-code sendStepUpCode\n send-verification-email sendVerificationEmail\n set-password setPassword\n set-principal-entities setPrincipalEntities\n set-principal-scope setPrincipalScope\n sign-in signIn\n sign-in-cross-origin signInCrossOrigin\n sign-in-magic-link signInMagicLink\n sign-in-sms-otp signInSmsOtp\n sign-out signOut\n sign-up signUp\n sign-up-magic-link signUpMagicLink\n sign-up-sms signUpSms\n update-principal updatePrincipal\n verify-email verifyEmail\n verify-password verifyPassword\n verify-phone verifyPhone\n verify-step-up-code verifyStepUpCode\n verify-totp verifyTotp\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/auth/cli/commands/create-api-key.ts b/sdk/constructive-cli/src/auth/cli/commands/create-api-key.ts index 672db1229b..f16a3f4d4d 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/create-api-key.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/create-api-key.ts @@ -15,7 +15,9 @@ export default async ( ) => { try { if (argv.help || argv.h) { - console.log('create-api-key - createApiKey\n\nUsage: create-api-key [OPTIONS]\n'); + console.log( + 'create-api-key - Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key.\n\nUsage: create-api-key [OPTIONS]\n' + ); process.exit(0); } const answers = await prompter.prompt(argv, [ diff --git a/sdk/constructive-cli/src/api/cli/commands/create-function-from-source.ts b/sdk/constructive-cli/src/auth/cli/commands/exchange-native-handoff.ts similarity index 69% rename from sdk/constructive-cli/src/api/cli/commands/create-function-from-source.ts rename to sdk/constructive-cli/src/auth/cli/commands/exchange-native-handoff.ts index 2b8332aa48..7b27cd8990 100644 --- a/sdk/constructive-cli/src/api/cli/commands/create-function-from-source.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/exchange-native-handoff.ts @@ -1,13 +1,13 @@ /** - * CLI command for mutation createFunctionFromSource + * CLI command for mutation exchangeNativeHandoff * @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 { CreateFunctionFromSourceVariables } from '../../orm/mutation'; -import type { CreateFunctionPayloadSelect } from '../../orm/input-types'; +import type { ExchangeNativeHandoffVariables } from '../../orm/mutation'; +import type { ExchangeNativeHandoffPayloadSelect } 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( - 'create-function-from-source - Creates a `Function` from its `CREATE FUNCTION` source text.\n\nUsage: create-function-from-source [OPTIONS]\n' + 'exchange-native-handoff - exchangeNativeHandoff\n\nUsage: exchange-native-handoff [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 - .createFunctionFromSource( - parsedAnswers as unknown as CreateFunctionFromSourceVariables, + .exchangeNativeHandoff( + parsedAnswers as unknown as ExchangeNativeHandoffVariables, { select: selectFields, } as unknown as { - select: CreateFunctionPayloadSelect; + select: ExchangeNativeHandoffPayloadSelect; } ) .execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { - console.error('Failed: createFunctionFromSource'); + console.error('Failed: exchangeNativeHandoff'); if (error instanceof Error) { console.error(error.message); } diff --git a/sdk/constructive-cli/src/api/cli/commands/api-schema-names.ts b/sdk/constructive-cli/src/auth/cli/commands/sign-in-options.ts similarity index 56% rename from sdk/constructive-cli/src/api/cli/commands/api-schema-names.ts rename to sdk/constructive-cli/src/auth/cli/commands/sign-in-options.ts index 5ab8637bb6..f2bd79f6d8 100644 --- a/sdk/constructive-cli/src/api/cli/commands/api-schema-names.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/sign-in-options.ts @@ -1,11 +1,12 @@ /** - * CLI command for query apiSchemaNames + * CLI command for query signInOptions * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { CLIOptions, Inquirerer } from 'inquirerer'; import { getClient } from '../executor'; -import type { ApiSchemaNamesVariables } from '../../orm/query'; +import { buildSelectFromPaths } from '../utils'; +import type { SignInOptionsRecordSelect } from '../../orm/input-types'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -13,23 +14,21 @@ export default async ( ) => { try { if (argv.help || argv.h) { - console.log('api-schema-names - apiSchemaNames\n\nUsage: api-schema-names [OPTIONS]\n'); + console.log('sign-in-options - signInOptions\n\nUsage: sign-in-options [OPTIONS]\n'); process.exit(0); } - const answers = await prompter.prompt(argv, [ - { - type: 'text', - name: 'targetApiId', - message: 'targetApiId', - }, - ]); const client = getClient(); + const selectFields = buildSelectFromPaths((argv.select as string) ?? ''); const result = await client.query - .apiSchemaNames(answers as unknown as ApiSchemaNamesVariables) + .signInOptions({ + select: selectFields, + } as unknown as { + select: SignInOptionsRecordSelect; + }) .execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { - console.error('Failed: apiSchemaNames'); + console.error('Failed: signInOptions'); if (error instanceof Error) { console.error(error.message); } diff --git a/sdk/constructive-cli/src/auth/orm/README.md b/sdk/constructive-cli/src/auth/orm/README.md index 6e93f55c69..ea78b8958e 100644 --- a/sdk/constructive-cli/src/auth/orm/README.md +++ b/sdk/constructive-cli/src/auth/orm/README.md @@ -662,6 +662,17 @@ requireStepUp const result = await db.query.requireStepUp({ stepUpType: '' }).execute(); ``` +### `db.query.signInOptions` + +signInOptions + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.signInOptions().execute(); +``` + ### `db.mutation.approveDevice` approveDevice @@ -739,7 +750,7 @@ const result = await db.mutation.confirmTotpSetup({ input: { totpValue: '' }).execute(); ``` +### `db.mutation.exchangeNativeHandoff` + +exchangeNativeHandoff + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ExchangeNativeHandoffInput (required) | + +```typescript +const result = await db.mutation.exchangeNativeHandoff({ input: { code: '', codeVerifier: '', credentialKind: '' } }).execute(); +``` + ### `db.mutation.extendTokenExpires` extendTokenExpires @@ -1084,7 +1110,7 @@ requestMagicLink | `input` | RequestMagicLinkInput (required) | ```typescript -const result = await db.mutation.requestMagicLink({ input: { email: '', next: '' } }).execute(); +const result = await db.mutation.requestMagicLink({ input: { codeChallenge: '', email: '', nativeRedirectUri: '', next: '' } }).execute(); ``` ### `db.mutation.resetPassword` @@ -1249,7 +1275,7 @@ setPassword | `input` | SetPasswordInput (required) | ```typescript -const result = await db.mutation.setPassword({ input: { currentPassword: '', newPassword: '' } }).execute(); +const result = await db.mutation.setPassword({ input: { currentPassword: '', newPassword: '', signOutOtherSessions: '' } }).execute(); ``` ### `db.mutation.setPrincipalEntities` diff --git a/sdk/constructive-cli/src/auth/orm/input-types.ts b/sdk/constructive-cli/src/auth/orm/input-types.ts index 1289140d59..f2a533f238 100644 --- a/sdk/constructive-cli/src/auth/orm/input-types.ts +++ b/sdk/constructive-cli/src/auth/orm/input-types.ts @@ -2122,6 +2122,12 @@ export interface EnableSmsMfaInput { export interface EnableTotpInput { clientMutationId?: string; } +export interface ExchangeNativeHandoffInput { + clientMutationId?: string; + code?: string; + codeVerifier?: string; + credentialKind?: string; +} export interface ExtendTokenExpiresInput { amount?: IntervalInput; clientMutationId?: string; @@ -2167,7 +2173,9 @@ export interface RequestCrossOriginTokenInput { } export interface RequestMagicLinkInput { clientMutationId?: string; + codeChallenge?: string; email?: string; + nativeRedirectUri?: string; next?: string; } export interface ResetPasswordInput { @@ -2218,6 +2226,7 @@ export interface SetPasswordInput { clientMutationId?: string; currentPassword?: string; newPassword?: string; + signOutOtherSessions?: boolean; } export interface SetPrincipalEntitiesInput { clientMutationId?: string; @@ -3646,6 +3655,46 @@ export type GetMfaStatusRecordSelect = { smsMfaEnabled?: boolean; totpEnabled?: boolean; }; +export interface SignInOptionsRecord { + allowAnonymousSessions?: boolean | null; + allowEmailOtpSignIn?: boolean | null; + allowIdentitySignIn?: boolean | null; + allowIdentitySignUp?: boolean | null; + allowMagicLinkSignIn?: boolean | null; + allowMagicLinkSignUp?: boolean | null; + allowPasswordSignIn?: boolean | null; + allowPasswordSignUp?: boolean | null; + allowSignUp?: boolean | null; + allowSmsSignIn?: boolean | null; + allowSmsSignUp?: boolean | null; + allowWebauthnSignIn?: boolean | null; + allowWebauthnSignUp?: boolean | null; + allowWebauthnUsernameless?: boolean | null; + enableCaptcha?: boolean | null; + identityProviders?: Record | null; + requireMfa?: boolean | null; + signUpRequiresInvite?: boolean | null; +} +export type SignInOptionsRecordSelect = { + allowAnonymousSessions?: boolean; + allowEmailOtpSignIn?: boolean; + allowIdentitySignIn?: boolean; + allowIdentitySignUp?: boolean; + allowMagicLinkSignIn?: boolean; + allowMagicLinkSignUp?: boolean; + allowPasswordSignIn?: boolean; + allowPasswordSignUp?: boolean; + allowSignUp?: boolean; + allowSmsSignIn?: boolean; + allowSmsSignUp?: boolean; + allowWebauthnSignIn?: boolean; + allowWebauthnSignUp?: boolean; + allowWebauthnUsernameless?: boolean; + enableCaptcha?: boolean; + identityProviders?: boolean; + requireMfa?: boolean; + signUpRequiresInvite?: boolean; +}; export interface ApproveDevicePayload { clientMutationId?: string | null; result?: boolean | null; @@ -3802,6 +3851,16 @@ export type EnableTotpPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface ExchangeNativeHandoffPayload { + clientMutationId?: string | null; + result?: ExchangeNativeHandoffRecord | null; +} +export type ExchangeNativeHandoffPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: ExchangeNativeHandoffRecordSelect; + }; +}; export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; @@ -4558,6 +4617,22 @@ export type CreateOrgApiKeyRecordSelect = { expiresAt?: boolean; keyId?: boolean; }; +export interface ExchangeNativeHandoffRecord { + accessToken?: string | null; + accessTokenExpiresAt?: string | null; + id?: string | null; + isVerified?: boolean | null; + totpEnabled?: boolean | null; + userId?: string | null; +} +export type ExchangeNativeHandoffRecordSelect = { + accessToken?: boolean; + accessTokenExpiresAt?: boolean; + id?: boolean; + isVerified?: boolean; + totpEnabled?: boolean; + userId?: boolean; +}; export interface ExtendTokenExpiresRecord { expiresAt?: string | null; id?: string | null; @@ -4645,18 +4720,22 @@ export type SignInCrossOriginRecordSelect = { export interface SignInMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; + codeChallenge?: string | null; deviceApprovalRequired?: boolean | null; mfaChallengeToken?: string | null; mfaRequired?: boolean | null; + nativeRedirectUri?: string | null; outDeviceToken?: string | null; userId?: string | null; } export type SignInMagicLinkRecordSelect = { accessToken?: boolean; accessTokenExpiresAt?: boolean; + codeChallenge?: boolean; deviceApprovalRequired?: boolean; mfaChallengeToken?: boolean; mfaRequired?: boolean; + nativeRedirectUri?: boolean; outDeviceToken?: boolean; userId?: boolean; }; @@ -4681,12 +4760,16 @@ export type SignInSmsOtpRecordSelect = { export interface SignUpMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; + codeChallenge?: string | null; + nativeRedirectUri?: string | null; outDeviceToken?: string | null; userId?: string | null; } export type SignUpMagicLinkRecordSelect = { accessToken?: boolean; accessTokenExpiresAt?: boolean; + codeChallenge?: boolean; + nativeRedirectUri?: boolean; outDeviceToken?: boolean; userId?: boolean; }; diff --git a/sdk/constructive-cli/src/auth/orm/mutation/index.ts b/sdk/constructive-cli/src/auth/orm/mutation/index.ts index 39394d78e4..b8c511d386 100644 --- a/sdk/constructive-cli/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/auth/orm/mutation/index.ts @@ -26,6 +26,7 @@ import type { EnableEmailMfaInput, EnableSmsMfaInput, EnableTotpInput, + ExchangeNativeHandoffInput, ExtendTokenExpiresInput, ForgotPasswordInput, GenerateBackupCodesInput, @@ -81,6 +82,7 @@ import type { EnableEmailMfaPayload, EnableSmsMfaPayload, EnableTotpPayload, + ExchangeNativeHandoffPayload, ExtendTokenExpiresPayload, ForgotPasswordPayload, GenerateBackupCodesPayload, @@ -136,6 +138,7 @@ import type { EnableEmailMfaPayloadSelect, EnableSmsMfaPayloadSelect, EnableTotpPayloadSelect, + ExchangeNativeHandoffPayloadSelect, ExtendTokenExpiresPayloadSelect, ForgotPasswordPayloadSelect, GenerateBackupCodesPayloadSelect, @@ -189,6 +192,10 @@ export interface ConfirmDeleteAccountVariables { export interface ConfirmTotpSetupVariables { input: ConfirmTotpSetupInput; } +/** + * Variables for createApiKey + * Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key. + */ export interface CreateApiKeyVariables { input: CreateApiKeyInput; } @@ -231,6 +238,9 @@ export interface EnableSmsMfaVariables { export interface EnableTotpVariables { input: EnableTotpInput; } +export interface ExchangeNativeHandoffVariables { + input: ExchangeNativeHandoffInput; +} export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; } @@ -901,6 +911,35 @@ export function createMutationOperations(client: OrmClient) { 'EnableTotpPayload' ), }), + exchangeNativeHandoff: ( + args: ExchangeNativeHandoffVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + exchangeNativeHandoff: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ExchangeNativeHandoff', + fieldName: 'exchangeNativeHandoff', + ...buildCustomDocument( + 'mutation', + 'ExchangeNativeHandoff', + 'exchangeNativeHandoff', + options.select, + args, + [ + { + name: 'input', + type: 'ExchangeNativeHandoffInput!', + }, + ], + connectionFieldsMap, + 'ExchangeNativeHandoffPayload' + ), + }), extendTokenExpires: ( args: ExtendTokenExpiresVariables, options: { diff --git a/sdk/constructive-cli/src/auth/orm/query/index.ts b/sdk/constructive-cli/src/auth/orm/query/index.ts index 671fb80d21..aa77870a50 100644 --- a/sdk/constructive-cli/src/auth/orm/query/index.ts +++ b/sdk/constructive-cli/src/auth/orm/query/index.ts @@ -9,8 +9,10 @@ import type { InferSelectResult, StrictSelect } from '../select-types'; import type { User, GetMfaStatusRecord, + SignInOptionsRecord, UserSelect, GetMfaStatusRecordSelect, + SignInOptionsRecordSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface RequireStepUpVariables { @@ -150,5 +152,28 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + signInOptions: ( + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + signInOptions: InferSelectResult | null; + }>({ + client, + operation: 'query', + operationName: 'SignInOptions', + fieldName: 'signInOptions', + ...buildCustomDocument( + 'query', + 'SignInOptions', + 'signInOptions', + options.select, + undefined, + [], + connectionFieldsMap, + 'SignInOptionsRecord' + ), + }), }; } diff --git a/sdk/constructive-cli/src/compute/cli/README.md b/sdk/constructive-cli/src/compute/cli/README.md index bd769d9599..b2909efaa4 100644 --- a/sdk/constructive-cli/src/compute/cli/README.md +++ b/sdk/constructive-cli/src/compute/cli/README.md @@ -28,7 +28,6 @@ csdk auth set-token | `config` | Manage config key-value store (per-context) | | `build` | build CRUD operations | | `build-step` | buildStep CRUD operations | -| `builder-binding` | builderBinding CRUD operations | | `content-preset` | contentPreset CRUD operations | | `database-function-graph` | databaseFunctionGraph CRUD operations | | `database-function-graph-execution-cancel-request` | databaseFunctionGraphExecutionCancelRequest CRUD operations | @@ -72,7 +71,6 @@ csdk auth set-token | `namespace-event` | namespaceEvent CRUD operations | | `platform-build` | platformBuild CRUD operations | | `platform-build-step` | platformBuildStep CRUD operations | -| `platform-builder-binding` | platformBuilderBinding CRUD operations | | `platform-function-api-binding` | platformFunctionApiBinding CRUD operations | | `platform-function-capability-binding` | platformFunctionCapabilityBinding CRUD operations | | `platform-function-definition` | platformFunctionDefinition CRUD operations | @@ -119,6 +117,7 @@ csdk auth set-token | `platform-resources-health` | platformResourcesHealth CRUD operations | | `platform-resources-requirements-state` | platformResourcesRequirementsState CRUD operations | | `platform-resources-resolved-requirement` | platformResourcesResolvedRequirement CRUD operations | +| `platform-service-binding` | platformServiceBinding CRUD operations | | `platform-webhook-endpoint` | platformWebhookEndpoint CRUD operations | | `platform-webhook-event` | platformWebhookEvent CRUD operations | | `proposal-comment` | proposalComment CRUD operations | @@ -147,6 +146,7 @@ csdk auth set-token | `resources-health` | resourcesHealth CRUD operations | | `resources-requirements-state` | resourcesRequirementsState CRUD operations | | `resources-resolved-requirement` | resourcesResolvedRequirement CRUD operations | +| `service-binding` | serviceBinding CRUD operations | | `webhook-endpoint` | webhookEndpoint CRUD operations | | `webhook-event` | webhookEvent CRUD operations | | `database-read-function-graph` | databaseReadFunctionGraph | @@ -341,42 +341,6 @@ CRUD operations for BuildStep records. **Required create fields:** `buildId`, `name`, `seq` **Optional create fields (backend defaults):** `createdByPrincipal`, `exitCode`, `finishedAt`, `kind`, `logBytes`, `logOffset`, `parentSeq`, `recordedAt`, `startedAt`, `status`, `summary` -### `builder-binding` - -CRUD operations for BuilderBinding records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all builderBinding records | -| `find-first` | Find first matching builderBinding record | -| `get` | Get a builderBinding by id | -| `create` | Create a new builderBinding | -| `update` | Update an existing builderBinding | -| `delete` | Delete a builderBinding | - -**Fields:** - -| Field | Type | -|-------|------| -| `createdAt` | Datetime | -| `createdBy` | UUID | -| `createdByPrincipal` | UUID | -| `databaseId` | UUID | -| `id` | UUID | -| `installationId` | UUID | -| `lastError` | String | -| `metadata` | JSON | -| `namespaceId` | UUID | -| `observedHost` | String | -| `realm` | String | -| `status` | String | -| `updatedAt` | Datetime | -| `updatedBy` | UUID | -| `updatedByPrincipal` | UUID | - -**Required create fields:** `databaseId`, `installationId`, `namespaceId` -**Optional create fields (backend defaults):** `createdBy`, `createdByPrincipal`, `lastError`, `metadata`, `observedHost`, `realm`, `status`, `updatedBy`, `updatedByPrincipal` - ### `content-preset` CRUD operations for ContentPreset records. @@ -1786,41 +1750,6 @@ CRUD operations for PlatformBuildStep records. **Required create fields:** `buildId`, `name`, `seq` **Optional create fields (backend defaults):** `createdByPrincipal`, `exitCode`, `finishedAt`, `kind`, `logBytes`, `logOffset`, `parentSeq`, `recordedAt`, `startedAt`, `status`, `summary` -### `platform-builder-binding` - -CRUD operations for PlatformBuilderBinding records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all platformBuilderBinding records | -| `find-first` | Find first matching platformBuilderBinding record | -| `get` | Get a platformBuilderBinding by id | -| `create` | Create a new platformBuilderBinding | -| `update` | Update an existing platformBuilderBinding | -| `delete` | Delete a platformBuilderBinding | - -**Fields:** - -| Field | Type | -|-------|------| -| `createdAt` | Datetime | -| `createdBy` | UUID | -| `createdByPrincipal` | UUID | -| `id` | UUID | -| `installationId` | UUID | -| `lastError` | String | -| `metadata` | JSON | -| `namespaceId` | UUID | -| `observedHost` | String | -| `realm` | String | -| `status` | String | -| `updatedAt` | Datetime | -| `updatedBy` | UUID | -| `updatedByPrincipal` | UUID | - -**Required create fields:** `installationId`, `namespaceId` -**Optional create fields (backend defaults):** `createdBy`, `createdByPrincipal`, `lastError`, `metadata`, `observedHost`, `realm`, `status`, `updatedBy`, `updatedByPrincipal` - ### `platform-function-api-binding` CRUD operations for PlatformFunctionApiBinding records. @@ -3768,6 +3697,43 @@ CRUD operations for PlatformResourcesResolvedRequirement records. **Required create fields:** `atomId`, `configObjectName`, `name`, `namespaceId`, `present`, `realm`, `required`, `requirementKind`, `resourceId`, `secretsObjectName`, `slug` +### `platform-service-binding` + +CRUD operations for PlatformServiceBinding records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all platformServiceBinding records | +| `find-first` | Find first matching platformServiceBinding record | +| `get` | Get a platformServiceBinding by id | +| `create` | Create a new platformServiceBinding | +| `update` | Update an existing platformServiceBinding | +| `delete` | Delete a platformServiceBinding | + +**Fields:** + +| Field | Type | +|-------|------| +| `createdAt` | Datetime | +| `createdBy` | UUID | +| `createdByPrincipal` | UUID | +| `id` | UUID | +| `installationId` | UUID | +| `installationScope` | String | +| `kind` | String | +| `lastError` | String | +| `metadata` | JSON | +| `namespaceId` | UUID | +| `observedHost` | String | +| `realm` | String | +| `status` | String | +| `updatedAt` | Datetime | +| `updatedBy` | UUID | +| `updatedByPrincipal` | UUID | + +**Required create fields:** `installationId`, `installationScope`, `kind`, `namespaceId` +**Optional create fields (backend defaults):** `createdBy`, `createdByPrincipal`, `lastError`, `metadata`, `observedHost`, `realm`, `status`, `updatedBy`, `updatedByPrincipal` + ### `platform-webhook-endpoint` CRUD operations for PlatformWebhookEndpoint records. @@ -5135,6 +5101,44 @@ CRUD operations for ResourcesResolvedRequirement records. **Required create fields:** `atomId`, `configObjectName`, `name`, `namespaceId`, `present`, `realm`, `required`, `requirementKind`, `resourceId`, `secretsObjectName`, `slug` +### `service-binding` + +CRUD operations for ServiceBinding records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all serviceBinding records | +| `find-first` | Find first matching serviceBinding record | +| `get` | Get a serviceBinding by id | +| `create` | Create a new serviceBinding | +| `update` | Update an existing serviceBinding | +| `delete` | Delete a serviceBinding | + +**Fields:** + +| Field | Type | +|-------|------| +| `createdAt` | Datetime | +| `createdBy` | UUID | +| `createdByPrincipal` | UUID | +| `databaseId` | UUID | +| `id` | UUID | +| `installationId` | UUID | +| `installationScope` | String | +| `kind` | String | +| `lastError` | String | +| `metadata` | JSON | +| `namespaceId` | UUID | +| `observedHost` | String | +| `realm` | String | +| `status` | String | +| `updatedAt` | Datetime | +| `updatedBy` | UUID | +| `updatedByPrincipal` | UUID | + +**Required create fields:** `databaseId`, `installationId`, `installationScope`, `kind`, `namespaceId` +**Optional create fields (backend defaults):** `createdBy`, `createdByPrincipal`, `lastError`, `metadata`, `observedHost`, `realm`, `status`, `updatedBy`, `updatedByPrincipal` + ### `webhook-endpoint` CRUD operations for WebhookEndpoint records. diff --git a/sdk/constructive-cli/src/compute/cli/commands.ts b/sdk/constructive-cli/src/compute/cli/commands.ts index 78aee3f9d0..c0a4b54679 100644 --- a/sdk/constructive-cli/src/compute/cli/commands.ts +++ b/sdk/constructive-cli/src/compute/cli/commands.ts @@ -8,7 +8,6 @@ import contextCmd from './commands/context'; import authCmd from './commands/auth'; import buildCmd from './commands/build'; import buildStepCmd from './commands/build-step'; -import builderBindingCmd from './commands/builder-binding'; import contentPresetCmd from './commands/content-preset'; import databaseFunctionGraphCmd from './commands/database-function-graph'; import databaseFunctionGraphExecutionCancelRequestCmd from './commands/database-function-graph-execution-cancel-request'; @@ -52,7 +51,6 @@ import namespaceCmd from './commands/namespace'; import namespaceEventCmd from './commands/namespace-event'; import platformBuildCmd from './commands/platform-build'; import platformBuildStepCmd from './commands/platform-build-step'; -import platformBuilderBindingCmd from './commands/platform-builder-binding'; import platformFunctionApiBindingCmd from './commands/platform-function-api-binding'; import platformFunctionCapabilityBindingCmd from './commands/platform-function-capability-binding'; import platformFunctionDefinitionCmd from './commands/platform-function-definition'; @@ -99,6 +97,7 @@ import platformResourceUtilizationCmd from './commands/platform-resource-utiliza import platformResourcesHealthCmd from './commands/platform-resources-health'; import platformResourcesRequirementsStateCmd from './commands/platform-resources-requirements-state'; import platformResourcesResolvedRequirementCmd from './commands/platform-resources-resolved-requirement'; +import platformServiceBindingCmd from './commands/platform-service-binding'; import platformWebhookEndpointCmd from './commands/platform-webhook-endpoint'; import platformWebhookEventCmd from './commands/platform-webhook-event'; import proposalCommentCmd from './commands/proposal-comment'; @@ -127,6 +126,7 @@ import resourceUtilizationCmd from './commands/resource-utilization'; import resourcesHealthCmd from './commands/resources-health'; import resourcesRequirementsStateCmd from './commands/resources-requirements-state'; import resourcesResolvedRequirementCmd from './commands/resources-resolved-requirement'; +import serviceBindingCmd from './commands/service-binding'; import webhookEndpointCmd from './commands/webhook-endpoint'; import webhookEventCmd from './commands/webhook-event'; import databaseReadFunctionGraphCmd from './commands/database-read-function-graph'; @@ -205,7 +205,6 @@ const createCommandMap: () => Record< auth: authCmd, build: buildCmd, 'build-step': buildStepCmd, - 'builder-binding': builderBindingCmd, 'content-preset': contentPresetCmd, 'database-function-graph': databaseFunctionGraphCmd, 'database-function-graph-execution-cancel-request': @@ -250,7 +249,6 @@ const createCommandMap: () => Record< 'namespace-event': namespaceEventCmd, 'platform-build': platformBuildCmd, 'platform-build-step': platformBuildStepCmd, - 'platform-builder-binding': platformBuilderBindingCmd, 'platform-function-api-binding': platformFunctionApiBindingCmd, 'platform-function-capability-binding': platformFunctionCapabilityBindingCmd, 'platform-function-definition': platformFunctionDefinitionCmd, @@ -297,6 +295,7 @@ const createCommandMap: () => Record< 'platform-resources-health': platformResourcesHealthCmd, 'platform-resources-requirements-state': platformResourcesRequirementsStateCmd, 'platform-resources-resolved-requirement': platformResourcesResolvedRequirementCmd, + 'platform-service-binding': platformServiceBindingCmd, 'platform-webhook-endpoint': platformWebhookEndpointCmd, 'platform-webhook-event': platformWebhookEventCmd, 'proposal-comment': proposalCommentCmd, @@ -325,6 +324,7 @@ const createCommandMap: () => Record< 'resources-health': resourcesHealthCmd, 'resources-requirements-state': resourcesRequirementsStateCmd, 'resources-resolved-requirement': resourcesResolvedRequirementCmd, + 'service-binding': serviceBindingCmd, 'webhook-endpoint': webhookEndpointCmd, 'webhook-event': webhookEventCmd, 'database-read-function-graph': databaseReadFunctionGraphCmd, @@ -393,7 +393,7 @@ const createCommandMap: () => Record< 'validate-function-graph': validateFunctionGraphCmd, }); const usage = - "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n build build CRUD operations\n build-step buildStep CRUD operations\n builder-binding builderBinding CRUD operations\n content-preset contentPreset CRUD operations\n database-function-graph databaseFunctionGraph CRUD operations\n database-function-graph-execution-cancel-request databaseFunctionGraphExecutionCancelRequest CRUD operations\n database-function-graph-execution databaseFunctionGraphExecution CRUD operations\n database-function-graph-execution-node-state databaseFunctionGraphExecutionNodeState CRUD operations\n database-function-graph-execution-output databaseFunctionGraphExecutionOutput CRUD operations\n database-graph-commit databaseGraphCommit CRUD operations\n database-graph-get-all-tree-nodes-record databaseGraphGetAllTreeNodesRecord CRUD operations\n database-graph-object databaseGraphObject CRUD operations\n database-graph-ref databaseGraphRef CRUD operations\n database-graph-store databaseGraphStore CRUD operations\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-cancel-request functionGraphExecutionCancelRequest 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 function-schedule functionSchedule CRUD operations\n get-all-tree-nodes-record getAllTreeNodesRecord CRUD operations\n image image CRUD operations\n image-grant imageGrant 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-build platformBuild CRUD operations\n platform-build-step platformBuildStep CRUD operations\n platform-builder-binding platformBuilderBinding 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-function-schedule platformFunctionSchedule CRUD operations\n platform-image platformImage CRUD operations\n platform-image-grant platformImageGrant 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-k-8-s-resource-kind platformK8sResourceKind CRUD operations\n platform-k-8-s-spec-rule platformK8sSpecRule CRUD operations\n platform-namespace platformNamespace CRUD operations\n platform-namespace-event platformNamespaceEvent CRUD operations\n platform-proposal-comment platformProposalComment CRUD operations\n platform-proposal platformProposal CRUD operations\n platform-proposal-file-view platformProposalFileView CRUD operations\n platform-proposal-reaction platformProposalReaction CRUD operations\n platform-proposal-review platformProposalReview CRUD operations\n platform-proposals-chunk platformProposalsChunk CRUD operations\n platform-registry-binding platformRegistryBinding CRUD operations\n platform-registry platformRegistry CRUD operations\n platform-registry-grant platformRegistryGrant CRUD operations\n platform-repository platformRepository CRUD operations\n platform-repository-event platformRepositoryEvent CRUD operations\n platform-repository-required-check platformRepositoryRequiredCheck CRUD operations\n platform-repository-workflow platformRepositoryWorkflow 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-observed-storage platformResourceObservedStorage 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 proposal-comment proposalComment CRUD operations\n proposal proposal CRUD operations\n proposal-file-view proposalFileView CRUD operations\n proposal-reaction proposalReaction CRUD operations\n proposal-review proposalReview CRUD operations\n proposals-chunk proposalsChunk CRUD operations\n registry-binding registryBinding CRUD operations\n registry registry CRUD operations\n registry-grant registryGrant CRUD operations\n repository repository CRUD operations\n repository-event repositoryEvent CRUD operations\n repository-required-check repositoryRequiredCheck CRUD operations\n repository-workflow repositoryWorkflow 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-observed-storage resourceObservedStorage 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 database-read-function-graph databaseReadFunctionGraph\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 approve-node approveNode\n copy-graph copyGraph\n database-add-edge databaseAddEdge\n database-add-edge-and-save databaseAddEdgeAndSave\n database-add-node databaseAddNode\n database-add-node-and-save databaseAddNodeAndSave\n database-approve-node databaseApproveNode\n database-copy-graph databaseCopyGraph\n database-create-function-graph databaseCreateFunctionGraph\n database-graph-init-empty-repo databaseGraphInitEmptyRepo\n database-graph-insert-node-at-path databaseGraphInsertNodeAtPath\n database-graph-insert-nodes-at-paths databaseGraphInsertNodesAtPaths\n database-graph-set-and-commit databaseGraphSetAndCommit\n database-graph-set-data-at-path databaseGraphSetDataAtPath\n database-graph-set-many-and-commit databaseGraphSetManyAndCommit\n database-import-definitions databaseImportDefinitions\n database-import-graph-json databaseImportGraphJson\n database-save-graph databaseSaveGraph\n database-start-execution databaseStartExecution\n database-validate-function-graph databaseValidateFunctionGraph\n function-execution-logs-append functionExecutionLogsAppend\n function-invocations-create-page functionInvocationsCreatePage\n function-invocations-create-sync functionInvocationsCreateSync\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-function-execution-logs-append platformFunctionExecutionLogsAppend\n platform-function-invocations-create-page platformFunctionInvocationsCreatePage\n platform-function-invocations-create-sync platformFunctionInvocationsCreateSync\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 Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\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"; + "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n build build CRUD operations\n build-step buildStep CRUD operations\n content-preset contentPreset CRUD operations\n database-function-graph databaseFunctionGraph CRUD operations\n database-function-graph-execution-cancel-request databaseFunctionGraphExecutionCancelRequest CRUD operations\n database-function-graph-execution databaseFunctionGraphExecution CRUD operations\n database-function-graph-execution-node-state databaseFunctionGraphExecutionNodeState CRUD operations\n database-function-graph-execution-output databaseFunctionGraphExecutionOutput CRUD operations\n database-graph-commit databaseGraphCommit CRUD operations\n database-graph-get-all-tree-nodes-record databaseGraphGetAllTreeNodesRecord CRUD operations\n database-graph-object databaseGraphObject CRUD operations\n database-graph-ref databaseGraphRef CRUD operations\n database-graph-store databaseGraphStore CRUD operations\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-cancel-request functionGraphExecutionCancelRequest 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 function-schedule functionSchedule CRUD operations\n get-all-tree-nodes-record getAllTreeNodesRecord CRUD operations\n image image CRUD operations\n image-grant imageGrant 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-build platformBuild CRUD operations\n platform-build-step platformBuildStep 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-function-schedule platformFunctionSchedule CRUD operations\n platform-image platformImage CRUD operations\n platform-image-grant platformImageGrant 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-k-8-s-resource-kind platformK8sResourceKind CRUD operations\n platform-k-8-s-spec-rule platformK8sSpecRule CRUD operations\n platform-namespace platformNamespace CRUD operations\n platform-namespace-event platformNamespaceEvent CRUD operations\n platform-proposal-comment platformProposalComment CRUD operations\n platform-proposal platformProposal CRUD operations\n platform-proposal-file-view platformProposalFileView CRUD operations\n platform-proposal-reaction platformProposalReaction CRUD operations\n platform-proposal-review platformProposalReview CRUD operations\n platform-proposals-chunk platformProposalsChunk CRUD operations\n platform-registry-binding platformRegistryBinding CRUD operations\n platform-registry platformRegistry CRUD operations\n platform-registry-grant platformRegistryGrant CRUD operations\n platform-repository platformRepository CRUD operations\n platform-repository-event platformRepositoryEvent CRUD operations\n platform-repository-required-check platformRepositoryRequiredCheck CRUD operations\n platform-repository-workflow platformRepositoryWorkflow 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-observed-storage platformResourceObservedStorage 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-service-binding platformServiceBinding CRUD operations\n platform-webhook-endpoint platformWebhookEndpoint CRUD operations\n platform-webhook-event platformWebhookEvent CRUD operations\n proposal-comment proposalComment CRUD operations\n proposal proposal CRUD operations\n proposal-file-view proposalFileView CRUD operations\n proposal-reaction proposalReaction CRUD operations\n proposal-review proposalReview CRUD operations\n proposals-chunk proposalsChunk CRUD operations\n registry-binding registryBinding CRUD operations\n registry registry CRUD operations\n registry-grant registryGrant CRUD operations\n repository repository CRUD operations\n repository-event repositoryEvent CRUD operations\n repository-required-check repositoryRequiredCheck CRUD operations\n repository-workflow repositoryWorkflow 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-observed-storage resourceObservedStorage 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 service-binding serviceBinding CRUD operations\n webhook-endpoint webhookEndpoint CRUD operations\n webhook-event webhookEvent CRUD operations\n database-read-function-graph databaseReadFunctionGraph\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 approve-node approveNode\n copy-graph copyGraph\n database-add-edge databaseAddEdge\n database-add-edge-and-save databaseAddEdgeAndSave\n database-add-node databaseAddNode\n database-add-node-and-save databaseAddNodeAndSave\n database-approve-node databaseApproveNode\n database-copy-graph databaseCopyGraph\n database-create-function-graph databaseCreateFunctionGraph\n database-graph-init-empty-repo databaseGraphInitEmptyRepo\n database-graph-insert-node-at-path databaseGraphInsertNodeAtPath\n database-graph-insert-nodes-at-paths databaseGraphInsertNodesAtPaths\n database-graph-set-and-commit databaseGraphSetAndCommit\n database-graph-set-data-at-path databaseGraphSetDataAtPath\n database-graph-set-many-and-commit databaseGraphSetManyAndCommit\n database-import-definitions databaseImportDefinitions\n database-import-graph-json databaseImportGraphJson\n database-save-graph databaseSaveGraph\n database-start-execution databaseStartExecution\n database-validate-function-graph databaseValidateFunctionGraph\n function-execution-logs-append functionExecutionLogsAppend\n function-invocations-create-page functionInvocationsCreatePage\n function-invocations-create-sync functionInvocationsCreateSync\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-function-execution-logs-append platformFunctionExecutionLogsAppend\n platform-function-invocations-create-page platformFunctionInvocationsCreatePage\n platform-function-invocations-create-sync platformFunctionInvocationsCreateSync\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 Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\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/platform-builder-binding.ts b/sdk/constructive-cli/src/compute/cli/commands/platform-service-binding.ts similarity index 84% rename from sdk/constructive-cli/src/compute/cli/commands/platform-builder-binding.ts rename to sdk/constructive-cli/src/compute/cli/commands/platform-service-binding.ts index a58bb731f5..2696642efb 100644 --- a/sdk/constructive-cli/src/compute/cli/commands/platform-builder-binding.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/platform-service-binding.ts @@ -1,5 +1,5 @@ /** - * CLI commands for PlatformBuilderBinding + * CLI commands for PlatformServiceBinding * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -8,11 +8,11 @@ import { getClient } from '../executor'; import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; import type { FieldSchema } from '../utils'; import type { - CreatePlatformBuilderBindingInput, - PlatformBuilderBindingPatch, - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy, + CreatePlatformServiceBindingInput, + PlatformServiceBindingPatch, + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy, } from '../../orm/input-types'; import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; const fieldSchema: FieldSchema = { @@ -21,6 +21,8 @@ const fieldSchema: FieldSchema = { createdByPrincipal: 'uuid', id: 'uuid', installationId: 'uuid', + installationScope: 'string', + kind: 'string', lastError: 'string', metadata: 'json', namespaceId: 'uuid', @@ -32,7 +34,7 @@ const fieldSchema: FieldSchema = { updatedByPrincipal: 'uuid', }; const usage = - '\nplatform-builder-binding \n\nCommands:\n list List platformBuilderBinding records\n find-first Find first matching platformBuilderBinding record\n get Get a platformBuilderBinding by ID\n create Create a new platformBuilderBinding\n update Update an existing platformBuilderBinding\n delete Delete a platformBuilderBinding\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-service-binding \n\nCommands:\n list List platformServiceBinding records\n find-first Find first matching platformServiceBinding record\n get Get a platformServiceBinding by ID\n create Create a new platformServiceBinding\n update Update an existing platformServiceBinding\n delete Delete a platformServiceBinding\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, @@ -87,6 +89,8 @@ async function handleList(argv: Partial>, _prompter: Inq createdByPrincipal: true, id: true, installationId: true, + installationScope: true, + kind: true, lastError: true, metadata: true, namespaceId: true, @@ -99,15 +103,15 @@ async function handleList(argv: Partial>, _prompter: Inq }; const findManyArgs = parseFindManyArgs< FindManyArgs< - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy > & { - select: PlatformBuilderBindingSelect; + select: PlatformServiceBindingSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.platformBuilderBinding.findMany(findManyArgs).execute(); + const result = await client.platformServiceBinding.findMany(findManyArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to list records.'); @@ -125,6 +129,8 @@ async function handleFindFirst(argv: Partial>, _prompter createdByPrincipal: true, id: true, installationId: true, + installationScope: true, + kind: true, lastError: true, metadata: true, namespaceId: true, @@ -137,15 +143,15 @@ async function handleFindFirst(argv: Partial>, _prompter }; const findFirstArgs = parseFindFirstArgs< FindFirstArgs< - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy > & { - select: PlatformBuilderBindingSelect; + select: PlatformServiceBindingSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.platformBuilderBinding.findFirst(findFirstArgs).execute(); + const result = await client.platformServiceBinding.findFirst(findFirstArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to find record.'); @@ -166,7 +172,7 @@ async function handleGet(argv: Partial>, prompter: Inqui }, ]); const client = getClient(); - const result = await client.platformBuilderBinding + const result = await client.platformServiceBinding .findOne({ id: answers.id as string, select: { @@ -175,6 +181,8 @@ async function handleGet(argv: Partial>, prompter: Inqui createdByPrincipal: true, id: true, installationId: true, + installationScope: true, + kind: true, lastError: true, metadata: true, namespaceId: true, @@ -219,6 +227,18 @@ async function handleCreate(argv: Partial>, prompter: In message: 'installationId', required: true, }, + { + type: 'text', + name: 'installationScope', + message: 'installationScope', + required: true, + }, + { + type: 'text', + name: 'kind', + message: 'kind', + required: true, + }, { type: 'text', name: 'lastError', @@ -279,14 +299,16 @@ async function handleCreate(argv: Partial>, prompter: In const cleanedData = stripUndefined( answers, fieldSchema - ) as CreatePlatformBuilderBindingInput['platformBuilderBinding']; + ) as CreatePlatformServiceBindingInput['platformServiceBinding']; const client = getClient(); - const result = await client.platformBuilderBinding + const result = await client.platformServiceBinding .create({ data: { createdBy: cleanedData.createdBy, createdByPrincipal: cleanedData.createdByPrincipal, installationId: cleanedData.installationId, + installationScope: cleanedData.installationScope, + kind: cleanedData.kind, lastError: cleanedData.lastError, metadata: cleanedData.metadata, namespaceId: cleanedData.namespaceId, @@ -302,6 +324,8 @@ async function handleCreate(argv: Partial>, prompter: In createdByPrincipal: true, id: true, installationId: true, + installationScope: true, + kind: true, lastError: true, metadata: true, namespaceId: true, @@ -352,6 +376,18 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'installationId', required: false, }, + { + type: 'text', + name: 'installationScope', + message: 'installationScope', + required: false, + }, + { + type: 'text', + name: 'kind', + message: 'kind', + required: false, + }, { type: 'text', name: 'lastError', @@ -409,9 +445,9 @@ async function handleUpdate(argv: Partial>, prompter: In }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined(answers, fieldSchema) as PlatformBuilderBindingPatch; + const cleanedData = stripUndefined(answers, fieldSchema) as PlatformServiceBindingPatch; const client = getClient(); - const result = await client.platformBuilderBinding + const result = await client.platformServiceBinding .update({ where: { id: answers.id as string, @@ -420,6 +456,8 @@ async function handleUpdate(argv: Partial>, prompter: In createdBy: cleanedData.createdBy, createdByPrincipal: cleanedData.createdByPrincipal, installationId: cleanedData.installationId, + installationScope: cleanedData.installationScope, + kind: cleanedData.kind, lastError: cleanedData.lastError, metadata: cleanedData.metadata, namespaceId: cleanedData.namespaceId, @@ -435,6 +473,8 @@ async function handleUpdate(argv: Partial>, prompter: In createdByPrincipal: true, id: true, installationId: true, + installationScope: true, + kind: true, lastError: true, metadata: true, namespaceId: true, @@ -468,7 +508,7 @@ async function handleDelete(argv: Partial>, prompter: In ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const client = getClient(); - const result = await client.platformBuilderBinding + const result = await client.platformServiceBinding .delete({ where: { id: answers.id as string, diff --git a/sdk/constructive-cli/src/compute/cli/commands/builder-binding.ts b/sdk/constructive-cli/src/compute/cli/commands/service-binding.ts similarity index 86% rename from sdk/constructive-cli/src/compute/cli/commands/builder-binding.ts rename to sdk/constructive-cli/src/compute/cli/commands/service-binding.ts index 2e0f437fce..8995e03eaf 100644 --- a/sdk/constructive-cli/src/compute/cli/commands/builder-binding.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/service-binding.ts @@ -1,5 +1,5 @@ /** - * CLI commands for BuilderBinding + * CLI commands for ServiceBinding * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -8,11 +8,11 @@ import { getClient } from '../executor'; import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; import type { FieldSchema } from '../utils'; import type { - CreateBuilderBindingInput, - BuilderBindingPatch, - BuilderBindingSelect, - BuilderBindingFilter, - BuilderBindingOrderBy, + CreateServiceBindingInput, + ServiceBindingPatch, + ServiceBindingSelect, + ServiceBindingFilter, + ServiceBindingOrderBy, } from '../../orm/input-types'; import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; const fieldSchema: FieldSchema = { @@ -22,6 +22,8 @@ const fieldSchema: FieldSchema = { databaseId: 'uuid', id: 'uuid', installationId: 'uuid', + installationScope: 'string', + kind: 'string', lastError: 'string', metadata: 'json', namespaceId: 'uuid', @@ -33,7 +35,7 @@ const fieldSchema: FieldSchema = { updatedByPrincipal: 'uuid', }; const usage = - '\nbuilder-binding \n\nCommands:\n list List builderBinding records\n find-first Find first matching builderBinding record\n get Get a builderBinding by ID\n create Create a new builderBinding\n update Update an existing builderBinding\n delete Delete a builderBinding\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'; + '\nservice-binding \n\nCommands:\n list List serviceBinding records\n find-first Find first matching serviceBinding record\n get Get a serviceBinding by ID\n create Create a new serviceBinding\n update Update an existing serviceBinding\n delete Delete a serviceBinding\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, @@ -89,6 +91,8 @@ async function handleList(argv: Partial>, _prompter: Inq databaseId: true, id: true, installationId: true, + installationScope: true, + kind: true, lastError: true, metadata: true, namespaceId: true, @@ -100,12 +104,12 @@ async function handleList(argv: Partial>, _prompter: Inq updatedByPrincipal: true, }; const findManyArgs = parseFindManyArgs< - FindManyArgs & { - select: BuilderBindingSelect; + FindManyArgs & { + select: ServiceBindingSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.builderBinding.findMany(findManyArgs).execute(); + const result = await client.serviceBinding.findMany(findManyArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to list records.'); @@ -124,6 +128,8 @@ async function handleFindFirst(argv: Partial>, _prompter databaseId: true, id: true, installationId: true, + installationScope: true, + kind: true, lastError: true, metadata: true, namespaceId: true, @@ -135,12 +141,12 @@ async function handleFindFirst(argv: Partial>, _prompter updatedByPrincipal: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { - select: BuilderBindingSelect; + FindFirstArgs & { + select: ServiceBindingSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.builderBinding.findFirst(findFirstArgs).execute(); + const result = await client.serviceBinding.findFirst(findFirstArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to find record.'); @@ -161,7 +167,7 @@ async function handleGet(argv: Partial>, prompter: Inqui }, ]); const client = getClient(); - const result = await client.builderBinding + const result = await client.serviceBinding .findOne({ id: answers.id as string, select: { @@ -171,6 +177,8 @@ async function handleGet(argv: Partial>, prompter: Inqui databaseId: true, id: true, installationId: true, + installationScope: true, + kind: true, lastError: true, metadata: true, namespaceId: true, @@ -221,6 +229,18 @@ async function handleCreate(argv: Partial>, prompter: In message: 'installationId', required: true, }, + { + type: 'text', + name: 'installationScope', + message: 'installationScope', + required: true, + }, + { + type: 'text', + name: 'kind', + message: 'kind', + required: true, + }, { type: 'text', name: 'lastError', @@ -281,15 +301,17 @@ async function handleCreate(argv: Partial>, prompter: In const cleanedData = stripUndefined( answers, fieldSchema - ) as CreateBuilderBindingInput['builderBinding']; + ) as CreateServiceBindingInput['serviceBinding']; const client = getClient(); - const result = await client.builderBinding + const result = await client.serviceBinding .create({ data: { createdBy: cleanedData.createdBy, createdByPrincipal: cleanedData.createdByPrincipal, databaseId: cleanedData.databaseId, installationId: cleanedData.installationId, + installationScope: cleanedData.installationScope, + kind: cleanedData.kind, lastError: cleanedData.lastError, metadata: cleanedData.metadata, namespaceId: cleanedData.namespaceId, @@ -306,6 +328,8 @@ async function handleCreate(argv: Partial>, prompter: In databaseId: true, id: true, installationId: true, + installationScope: true, + kind: true, lastError: true, metadata: true, namespaceId: true, @@ -362,6 +386,18 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'installationId', required: false, }, + { + type: 'text', + name: 'installationScope', + message: 'installationScope', + required: false, + }, + { + type: 'text', + name: 'kind', + message: 'kind', + required: false, + }, { type: 'text', name: 'lastError', @@ -419,9 +455,9 @@ async function handleUpdate(argv: Partial>, prompter: In }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined(answers, fieldSchema) as BuilderBindingPatch; + const cleanedData = stripUndefined(answers, fieldSchema) as ServiceBindingPatch; const client = getClient(); - const result = await client.builderBinding + const result = await client.serviceBinding .update({ where: { id: answers.id as string, @@ -431,6 +467,8 @@ async function handleUpdate(argv: Partial>, prompter: In createdByPrincipal: cleanedData.createdByPrincipal, databaseId: cleanedData.databaseId, installationId: cleanedData.installationId, + installationScope: cleanedData.installationScope, + kind: cleanedData.kind, lastError: cleanedData.lastError, metadata: cleanedData.metadata, namespaceId: cleanedData.namespaceId, @@ -447,6 +485,8 @@ async function handleUpdate(argv: Partial>, prompter: In databaseId: true, id: true, installationId: true, + installationScope: true, + kind: true, lastError: true, metadata: true, namespaceId: true, @@ -480,7 +520,7 @@ async function handleDelete(argv: Partial>, prompter: In ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const client = getClient(); - const result = await client.builderBinding + const result = await client.serviceBinding .delete({ where: { id: answers.id as string, diff --git a/sdk/constructive-cli/src/compute/orm/README.md b/sdk/constructive-cli/src/compute/orm/README.md index 68d50bcb97..6737465511 100644 --- a/sdk/constructive-cli/src/compute/orm/README.md +++ b/sdk/constructive-cli/src/compute/orm/README.md @@ -23,7 +23,6 @@ const db = createClient({ |-------|------------| | `build` | findMany, findOne, create, update, delete | | `buildStep` | findMany, findOne, create, update, delete | -| `builderBinding` | findMany, findOne, create, update, delete | | `contentPreset` | findMany, findOne, create, update, delete | | `databaseFunctionGraph` | findMany, findOne, create, update, delete | | `databaseFunctionGraphExecutionCancelRequest` | findMany, findOne, create, update, delete | @@ -67,7 +66,6 @@ const db = createClient({ | `namespaceEvent` | findMany, findOne, create, update, delete | | `platformBuild` | findMany, findOne, create, update, delete | | `platformBuildStep` | findMany, findOne, create, update, delete | -| `platformBuilderBinding` | findMany, findOne, create, update, delete | | `platformFunctionApiBinding` | findMany, findOne, create, update, delete | | `platformFunctionCapabilityBinding` | findMany, findOne, create, update, delete | | `platformFunctionDefinition` | findMany, findOne, create, update, delete | @@ -114,6 +112,7 @@ const db = createClient({ | `platformResourcesHealth` | findMany, findOne, create, update, delete | | `platformResourcesRequirementsState` | findMany, findOne, create, update, delete | | `platformResourcesResolvedRequirement` | findMany, findOne, create, update, delete | +| `platformServiceBinding` | findMany, findOne, create, update, delete | | `platformWebhookEndpoint` | findMany, findOne, create, update, delete | | `platformWebhookEvent` | findMany, findOne, create, update, delete | | `proposalComment` | findMany, findOne, create, update, delete | @@ -142,6 +141,7 @@ const db = createClient({ | `resourcesHealth` | findMany, findOne, create, update, delete | | `resourcesRequirementsState` | findMany, findOne, create, update, delete | | `resourcesResolvedRequirement` | findMany, findOne, create, update, delete | +| `serviceBinding` | findMany, findOne, create, update, delete | | `webhookEndpoint` | findMany, findOne, create, update, delete | | `webhookEvent` | findMany, findOne, create, update, delete | @@ -242,49 +242,6 @@ const updated = await db.buildStep.update({ where: { id: '' }, data: { bui const deleted = await db.buildStep.delete({ where: { id: '' } }).execute(); ``` -### `db.builderBinding` - -CRUD operations for BuilderBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `createdAt` | Datetime | No | -| `createdBy` | UUID | Yes | -| `createdByPrincipal` | UUID | Yes | -| `databaseId` | UUID | Yes | -| `id` | UUID | No | -| `installationId` | UUID | Yes | -| `lastError` | String | Yes | -| `metadata` | JSON | Yes | -| `namespaceId` | UUID | Yes | -| `observedHost` | String | Yes | -| `realm` | String | Yes | -| `status` | String | Yes | -| `updatedAt` | Datetime | No | -| `updatedBy` | UUID | Yes | -| `updatedByPrincipal` | UUID | Yes | - -**Operations:** - -```typescript -// List all builderBinding records -const items = await db.builderBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Get one by id -const item = await db.builderBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Create -const created = await db.builderBinding.create({ data: { createdBy: '', createdByPrincipal: '', databaseId: '', installationId: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.builderBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.builderBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.contentPreset` CRUD operations for ContentPreset records. @@ -2002,48 +1959,6 @@ const updated = await db.platformBuildStep.update({ where: { id: '' }, dat const deleted = await db.platformBuildStep.delete({ where: { id: '' } }).execute(); ``` -### `db.platformBuilderBinding` - -CRUD operations for PlatformBuilderBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `createdAt` | Datetime | No | -| `createdBy` | UUID | Yes | -| `createdByPrincipal` | UUID | Yes | -| `id` | UUID | No | -| `installationId` | UUID | Yes | -| `lastError` | String | Yes | -| `metadata` | JSON | Yes | -| `namespaceId` | UUID | Yes | -| `observedHost` | String | Yes | -| `realm` | String | Yes | -| `status` | String | Yes | -| `updatedAt` | Datetime | No | -| `updatedBy` | UUID | Yes | -| `updatedByPrincipal` | UUID | Yes | - -**Operations:** - -```typescript -// List all platformBuilderBinding records -const items = await db.platformBuilderBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Get one by id -const item = await db.platformBuilderBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Create -const created = await db.platformBuilderBinding.create({ data: { createdBy: '', createdByPrincipal: '', installationId: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.platformBuilderBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.platformBuilderBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.platformFunctionApiBinding` CRUD operations for PlatformFunctionApiBinding records. @@ -4038,6 +3953,50 @@ const updated = await db.platformResourcesResolvedRequirement.update({ where: { const deleted = await db.platformResourcesResolvedRequirement.delete({ where: { id: '' } }).execute(); ``` +### `db.platformServiceBinding` + +CRUD operations for PlatformServiceBinding records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `createdByPrincipal` | UUID | Yes | +| `id` | UUID | No | +| `installationId` | UUID | Yes | +| `installationScope` | String | Yes | +| `kind` | String | Yes | +| `lastError` | String | Yes | +| `metadata` | JSON | Yes | +| `namespaceId` | UUID | Yes | +| `observedHost` | String | Yes | +| `realm` | String | Yes | +| `status` | String | Yes | +| `updatedAt` | Datetime | No | +| `updatedBy` | UUID | Yes | +| `updatedByPrincipal` | UUID | Yes | + +**Operations:** + +```typescript +// List all platformServiceBinding records +const items = await db.platformServiceBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Get one by id +const item = await db.platformServiceBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Create +const created = await db.platformServiceBinding.create({ data: { createdBy: '', createdByPrincipal: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformServiceBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformServiceBinding.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformWebhookEndpoint` CRUD operations for PlatformWebhookEndpoint records. @@ -5325,6 +5284,51 @@ const updated = await db.resourcesResolvedRequirement.update({ where: { id: '' } }).execute(); ``` +### `db.serviceBinding` + +CRUD operations for ServiceBinding records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `createdByPrincipal` | UUID | Yes | +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `installationId` | UUID | Yes | +| `installationScope` | String | Yes | +| `kind` | String | Yes | +| `lastError` | String | Yes | +| `metadata` | JSON | Yes | +| `namespaceId` | UUID | Yes | +| `observedHost` | String | Yes | +| `realm` | String | Yes | +| `status` | String | Yes | +| `updatedAt` | Datetime | No | +| `updatedBy` | UUID | Yes | +| `updatedByPrincipal` | UUID | Yes | + +**Operations:** + +```typescript +// List all serviceBinding records +const items = await db.serviceBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Get one by id +const item = await db.serviceBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Create +const created = await db.serviceBinding.create({ data: { createdBy: '', createdByPrincipal: '', databaseId: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.serviceBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.serviceBinding.delete({ where: { id: '' } }).execute(); +``` + ### `db.webhookEndpoint` CRUD operations for WebhookEndpoint records. diff --git a/sdk/constructive-cli/src/compute/orm/index.ts b/sdk/constructive-cli/src/compute/orm/index.ts index 01033dc125..bc4368881e 100644 --- a/sdk/constructive-cli/src/compute/orm/index.ts +++ b/sdk/constructive-cli/src/compute/orm/index.ts @@ -7,7 +7,6 @@ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; import { BuildModel } from './models/build'; import { BuildStepModel } from './models/buildStep'; -import { BuilderBindingModel } from './models/builderBinding'; import { ContentPresetModel } from './models/contentPreset'; import { DatabaseFunctionGraphModel } from './models/databaseFunctionGraph'; import { DatabaseFunctionGraphExecutionCancelRequestModel } from './models/databaseFunctionGraphExecutionCancelRequest'; @@ -51,7 +50,6 @@ import { NamespaceModel } from './models/namespace'; import { NamespaceEventModel } from './models/namespaceEvent'; import { PlatformBuildModel } from './models/platformBuild'; import { PlatformBuildStepModel } from './models/platformBuildStep'; -import { PlatformBuilderBindingModel } from './models/platformBuilderBinding'; import { PlatformFunctionApiBindingModel } from './models/platformFunctionApiBinding'; import { PlatformFunctionCapabilityBindingModel } from './models/platformFunctionCapabilityBinding'; import { PlatformFunctionDefinitionModel } from './models/platformFunctionDefinition'; @@ -98,6 +96,7 @@ import { PlatformResourceUtilizationModel } from './models/platformResourceUtili import { PlatformResourcesHealthModel } from './models/platformResourcesHealth'; import { PlatformResourcesRequirementsStateModel } from './models/platformResourcesRequirementsState'; import { PlatformResourcesResolvedRequirementModel } from './models/platformResourcesResolvedRequirement'; +import { PlatformServiceBindingModel } from './models/platformServiceBinding'; import { PlatformWebhookEndpointModel } from './models/platformWebhookEndpoint'; import { PlatformWebhookEventModel } from './models/platformWebhookEvent'; import { ProposalCommentModel } from './models/proposalComment'; @@ -126,6 +125,7 @@ import { ResourceUtilizationModel } from './models/resourceUtilization'; import { ResourcesHealthModel } from './models/resourcesHealth'; import { ResourcesRequirementsStateModel } from './models/resourcesRequirementsState'; import { ResourcesResolvedRequirementModel } from './models/resourcesResolvedRequirement'; +import { ServiceBindingModel } from './models/serviceBinding'; import { WebhookEndpointModel } from './models/webhookEndpoint'; import { WebhookEventModel } from './models/webhookEvent'; import { createQueryOperations } from './query'; @@ -165,7 +165,6 @@ export function createClient(config: OrmClientConfig) { return { build: new BuildModel(client), buildStep: new BuildStepModel(client), - builderBinding: new BuilderBindingModel(client), contentPreset: new ContentPresetModel(client), databaseFunctionGraph: new DatabaseFunctionGraphModel(client), databaseFunctionGraphExecutionCancelRequest: @@ -212,7 +211,6 @@ export function createClient(config: OrmClientConfig) { namespaceEvent: new NamespaceEventModel(client), platformBuild: new PlatformBuildModel(client), platformBuildStep: new PlatformBuildStepModel(client), - platformBuilderBinding: new PlatformBuilderBindingModel(client), platformFunctionApiBinding: new PlatformFunctionApiBindingModel(client), platformFunctionCapabilityBinding: new PlatformFunctionCapabilityBindingModel(client), platformFunctionDefinition: new PlatformFunctionDefinitionModel(client), @@ -259,6 +257,7 @@ export function createClient(config: OrmClientConfig) { platformResourcesHealth: new PlatformResourcesHealthModel(client), platformResourcesRequirementsState: new PlatformResourcesRequirementsStateModel(client), platformResourcesResolvedRequirement: new PlatformResourcesResolvedRequirementModel(client), + platformServiceBinding: new PlatformServiceBindingModel(client), platformWebhookEndpoint: new PlatformWebhookEndpointModel(client), platformWebhookEvent: new PlatformWebhookEventModel(client), proposalComment: new ProposalCommentModel(client), @@ -287,6 +286,7 @@ export function createClient(config: OrmClientConfig) { resourcesHealth: new ResourcesHealthModel(client), resourcesRequirementsState: new ResourcesRequirementsStateModel(client), resourcesResolvedRequirement: new ResourcesResolvedRequirementModel(client), + serviceBinding: new ServiceBindingModel(client), webhookEndpoint: new WebhookEndpointModel(client), webhookEvent: new WebhookEventModel(client), query: createQueryOperations(client), diff --git a/sdk/constructive-cli/src/compute/orm/input-types.ts b/sdk/constructive-cli/src/compute/orm/input-types.ts index c4f3a14a61..147bcb6cbd 100644 --- a/sdk/constructive-cli/src/compute/orm/input-types.ts +++ b/sdk/constructive-cli/src/compute/orm/input-types.ts @@ -315,32 +315,6 @@ export interface BuildStep { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record | null; } -/** Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST */ -export interface BuilderBinding { - createdAt?: string | null; - createdBy?: string | null; - createdByPrincipal?: string | null; - /** Database that owns this resource (database-scoped isolation) */ - databaseId?: string | null; - id: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId?: string | null; - /** Most recent projection failure */ - lastError?: string | null; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record | null; - /** Namespace whose builds use this BuildKit installation */ - namespaceId?: string | null; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string | null; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string | null; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string | null; - updatedAt?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} /** Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store */ export interface ContentPreset { /** Whether this preset is selectable at provision time */ @@ -1447,30 +1421,6 @@ export interface PlatformBuildStep { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record | null; } -/** Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST */ -export interface PlatformBuilderBinding { - createdAt?: string | null; - createdBy?: string | null; - createdByPrincipal?: string | null; - id: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId?: string | null; - /** Most recent projection failure */ - lastError?: string | null; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record | null; - /** Namespace whose builds use this BuildKit installation */ - namespaceId?: string | null; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string | null; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string | null; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string | null; - updatedAt?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} /** Join table binding function definitions to API endpoints with per-binding alias and config */ export interface PlatformFunctionApiBinding { /** Binding alias (e.g. default, staging, production) */ @@ -2720,6 +2670,34 @@ export interface PlatformResourcesResolvedRequirement { secretsObjectName?: string | null; slug?: string | null; } +/** Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config */ +export interface PlatformServiceBinding { + createdAt?: string | null; + createdBy?: string | null; + createdByPrincipal?: string | null; + id: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId?: string | null; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope?: string | null; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind?: string | null; + /** Most recent projection failure */ + lastError?: string | null; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record | null; + /** Namespace whose builds use this BuildKit installation */ + namespaceId?: string | null; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string | null; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string | null; + /** Projection state of the bound address: pending, active, failed */ + status?: string | null; + updatedAt?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} /** Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window */ export interface PlatformWebhookEndpoint { /** Whether this endpoint currently accepts deliveries */ @@ -3533,6 +3511,36 @@ export interface ResourcesResolvedRequirement { secretsObjectName?: string | null; slug?: string | null; } +/** Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config */ +export interface ServiceBinding { + createdAt?: string | null; + createdBy?: string | null; + createdByPrincipal?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + id: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId?: string | null; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope?: string | null; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind?: string | null; + /** Most recent projection failure */ + lastError?: string | null; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record | null; + /** Namespace whose builds use this BuildKit installation */ + namespaceId?: string | null; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string | null; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string | null; + /** Projection state of the bound address: pending, active, failed */ + status?: string | null; + updatedAt?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} /** Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window */ export interface WebhookEndpoint { /** Whether this endpoint currently accepts deliveries */ @@ -3607,9 +3615,6 @@ export interface BuildRelations { workflow?: RepositoryWorkflow | null; } export interface BuildStepRelations {} -export interface BuilderBindingRelations { - namespace?: Namespace | null; -} export interface ContentPresetRelations {} export interface DatabaseFunctionGraphRelations { databaseFunctionGraphExecutionsByGraphId?: ConnectionResult; @@ -3683,12 +3688,12 @@ export interface InfraRefRelations {} export interface InfraStoreRelations {} export interface IntegrationProviderRelations {} export interface NamespaceRelations { - builderBindings?: ConnectionResult; functionDeployments?: ConnectionResult; registryBindings?: ConnectionResult; resourceDefinitions?: ConnectionResult; resourceInstallations?: ConnectionResult; resources?: ConnectionResult; + serviceBindings?: ConnectionResult; webhookEndpoints?: ConnectionResult; } export interface NamespaceEventRelations {} @@ -3699,9 +3704,6 @@ export interface PlatformBuildRelations { workflow?: PlatformRepositoryWorkflow | null; } export interface PlatformBuildStepRelations {} -export interface PlatformBuilderBindingRelations { - namespace?: PlatformNamespace | null; -} export interface PlatformFunctionApiBindingRelations { functionDefinition?: PlatformFunctionDefinition | null; platformFunctionInvocationsByApiBindingId?: ConnectionResult; @@ -3742,12 +3744,12 @@ export interface PlatformInfraStoreRelations {} export interface PlatformK8sResourceKindRelations {} export interface PlatformK8sSpecRuleRelations {} export interface PlatformNamespaceRelations { - platformBuilderBindingsByNamespaceId?: ConnectionResult; platformFunctionDeploymentsByNamespaceId?: ConnectionResult; platformRegistryBindingsByNamespaceId?: ConnectionResult; platformResourceDefinitionsByNamespaceId?: ConnectionResult; platformResourceInstallationsByNamespaceId?: ConnectionResult; platformResourcesByNamespaceId?: ConnectionResult; + platformServiceBindingsByNamespaceId?: ConnectionResult; platformWebhookEndpointsByNamespaceId?: ConnectionResult; } export interface PlatformNamespaceEventRelations {} @@ -3839,6 +3841,9 @@ export interface PlatformResourceUtilizationRelations {} export interface PlatformResourcesHealthRelations {} export interface PlatformResourcesRequirementsStateRelations {} export interface PlatformResourcesResolvedRequirementRelations {} +export interface PlatformServiceBindingRelations { + namespace?: PlatformNamespace | null; +} export interface PlatformWebhookEndpointRelations { functionDefinition?: PlatformFunctionDefinition | null; namespace?: PlatformNamespace | null; @@ -3935,6 +3940,9 @@ export interface ResourceUtilizationRelations {} export interface ResourcesHealthRelations {} export interface ResourcesRequirementsStateRelations {} export interface ResourcesResolvedRequirementRelations {} +export interface ServiceBindingRelations { + namespace?: Namespace | null; +} export interface WebhookEndpointRelations { functionDefinition?: FunctionDefinition | null; namespace?: Namespace | null; @@ -3946,7 +3954,6 @@ export interface WebhookEventRelations { // ============ Entity Types With Relations ============ export type BuildWithRelations = Build & BuildRelations; export type BuildStepWithRelations = BuildStep & BuildStepRelations; -export type BuilderBindingWithRelations = BuilderBinding & BuilderBindingRelations; export type ContentPresetWithRelations = ContentPreset & ContentPresetRelations; export type DatabaseFunctionGraphWithRelations = DatabaseFunctionGraph & DatabaseFunctionGraphRelations; @@ -4007,8 +4014,6 @@ export type NamespaceWithRelations = Namespace & NamespaceRelations; export type NamespaceEventWithRelations = NamespaceEvent & NamespaceEventRelations; export type PlatformBuildWithRelations = PlatformBuild & PlatformBuildRelations; export type PlatformBuildStepWithRelations = PlatformBuildStep & PlatformBuildStepRelations; -export type PlatformBuilderBindingWithRelations = PlatformBuilderBinding & - PlatformBuilderBindingRelations; export type PlatformFunctionApiBindingWithRelations = PlatformFunctionApiBinding & PlatformFunctionApiBindingRelations; export type PlatformFunctionCapabilityBindingWithRelations = PlatformFunctionCapabilityBinding & @@ -4089,6 +4094,8 @@ export type PlatformResourcesRequirementsStateWithRelations = PlatformResourcesR PlatformResourcesRequirementsStateRelations; export type PlatformResourcesResolvedRequirementWithRelations = PlatformResourcesResolvedRequirement & PlatformResourcesResolvedRequirementRelations; +export type PlatformServiceBindingWithRelations = PlatformServiceBinding & + PlatformServiceBindingRelations; export type PlatformWebhookEndpointWithRelations = PlatformWebhookEndpoint & PlatformWebhookEndpointRelations; export type PlatformWebhookEventWithRelations = PlatformWebhookEvent & @@ -4126,6 +4133,7 @@ export type ResourcesRequirementsStateWithRelations = ResourcesRequirementsState ResourcesRequirementsStateRelations; export type ResourcesResolvedRequirementWithRelations = ResourcesResolvedRequirement & ResourcesResolvedRequirementRelations; +export type ServiceBindingWithRelations = ServiceBinding & ServiceBindingRelations; export type WebhookEndpointWithRelations = WebhookEndpoint & WebhookEndpointRelations; export type WebhookEventWithRelations = WebhookEvent & WebhookEventRelations; // ============ Entity Select Types ============ @@ -4184,26 +4192,6 @@ export type BuildStepSelect = { status?: boolean; summary?: boolean; }; -export type BuilderBindingSelect = { - createdAt?: boolean; - createdBy?: boolean; - createdByPrincipal?: boolean; - databaseId?: boolean; - id?: boolean; - installationId?: boolean; - lastError?: boolean; - metadata?: boolean; - namespaceId?: boolean; - observedHost?: boolean; - realm?: boolean; - status?: boolean; - updatedAt?: boolean; - updatedBy?: boolean; - updatedByPrincipal?: boolean; - namespace?: { - select: NamespaceSelect; - }; -}; export type ContentPresetSelect = { active?: boolean; commitId?: boolean; @@ -4850,12 +4838,6 @@ export type NamespaceSelect = { namespaceName?: boolean; status?: boolean; updatedAt?: boolean; - builderBindings?: { - select: BuilderBindingSelect; - first?: number; - filter?: BuilderBindingFilter; - orderBy?: BuilderBindingOrderBy[]; - }; functionDeployments?: { select: FunctionDeploymentSelect; first?: number; @@ -4886,6 +4868,12 @@ export type NamespaceSelect = { filter?: ResourceFilter; orderBy?: ResourceOrderBy[]; }; + serviceBindings?: { + select: ServiceBindingSelect; + first?: number; + filter?: ServiceBindingFilter; + orderBy?: ServiceBindingOrderBy[]; + }; webhookEndpoints?: { select: WebhookEndpointSelect; first?: number; @@ -4956,25 +4944,6 @@ export type PlatformBuildStepSelect = { status?: boolean; summary?: boolean; }; -export type PlatformBuilderBindingSelect = { - createdAt?: boolean; - createdBy?: boolean; - createdByPrincipal?: boolean; - id?: boolean; - installationId?: boolean; - lastError?: boolean; - metadata?: boolean; - namespaceId?: boolean; - observedHost?: boolean; - realm?: boolean; - status?: boolean; - updatedAt?: boolean; - updatedBy?: boolean; - updatedByPrincipal?: boolean; - namespace?: { - select: PlatformNamespaceSelect; - }; -}; export type PlatformFunctionApiBindingSelect = { alias?: boolean; apiId?: boolean; @@ -5313,12 +5282,6 @@ export type PlatformNamespaceSelect = { namespaceName?: boolean; status?: boolean; updatedAt?: boolean; - platformBuilderBindingsByNamespaceId?: { - select: PlatformBuilderBindingSelect; - first?: number; - filter?: PlatformBuilderBindingFilter; - orderBy?: PlatformBuilderBindingOrderBy[]; - }; platformFunctionDeploymentsByNamespaceId?: { select: PlatformFunctionDeploymentSelect; first?: number; @@ -5349,6 +5312,12 @@ export type PlatformNamespaceSelect = { filter?: PlatformResourceFilter; orderBy?: PlatformResourceOrderBy[]; }; + platformServiceBindingsByNamespaceId?: { + select: PlatformServiceBindingSelect; + first?: number; + filter?: PlatformServiceBindingFilter; + orderBy?: PlatformServiceBindingOrderBy[]; + }; platformWebhookEndpointsByNamespaceId?: { select: PlatformWebhookEndpointSelect; first?: number; @@ -6049,6 +6018,27 @@ export type PlatformResourcesResolvedRequirementSelect = { secretsObjectName?: boolean; slug?: boolean; }; +export type PlatformServiceBindingSelect = { + createdAt?: boolean; + createdBy?: boolean; + createdByPrincipal?: boolean; + id?: boolean; + installationId?: boolean; + installationScope?: boolean; + kind?: boolean; + lastError?: boolean; + metadata?: boolean; + namespaceId?: boolean; + observedHost?: boolean; + realm?: boolean; + status?: boolean; + updatedAt?: boolean; + updatedBy?: boolean; + updatedByPrincipal?: boolean; + namespace?: { + select: PlatformNamespaceSelect; + }; +}; export type PlatformWebhookEndpointSelect = { active?: boolean; createdAt?: boolean; @@ -6800,6 +6790,28 @@ export type ResourcesResolvedRequirementSelect = { secretsObjectName?: boolean; slug?: boolean; }; +export type ServiceBindingSelect = { + createdAt?: boolean; + createdBy?: boolean; + createdByPrincipal?: boolean; + databaseId?: boolean; + id?: boolean; + installationId?: boolean; + installationScope?: boolean; + kind?: boolean; + lastError?: boolean; + metadata?: boolean; + namespaceId?: boolean; + observedHost?: boolean; + realm?: boolean; + status?: boolean; + updatedAt?: boolean; + updatedBy?: boolean; + updatedByPrincipal?: boolean; + namespace?: { + select: NamespaceSelect; + }; +}; export type WebhookEndpointSelect = { active?: boolean; createdAt?: boolean; @@ -6957,46 +6969,6 @@ export interface BuildStepFilter { /** Filter by the object’s `summary` field. */ summary?: JSONFilter; } -export interface BuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: BuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: NamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: BuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: BuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} export interface ContentPresetFilter { /** Filter by the object’s `active` field. */ active?: BooleanFilter; @@ -8271,10 +8243,6 @@ export interface NamespaceFilter { and?: NamespaceFilter[]; /** Filter by the object’s `annotations` field. */ annotations?: JSONFilter; - /** Filter by the object’s `builderBindings` relation. */ - builderBindings?: NamespaceToManyBuilderBindingFilter; - /** `builderBindings` exist. */ - builderBindingsExist?: boolean; /** Filter by the object’s `clusterId` field. */ clusterId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -8321,6 +8289,10 @@ export interface NamespaceFilter { resources?: NamespaceToManyResourceFilter; /** `resources` exist. */ resourcesExist?: boolean; + /** Filter by the object’s `serviceBindings` relation. */ + serviceBindings?: NamespaceToManyServiceBindingFilter; + /** `serviceBindings` exist. */ + serviceBindingsExist?: boolean; /** Filter by the object’s `status` field. */ status?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -8458,44 +8430,6 @@ export interface PlatformBuildStepFilter { /** Filter by the object’s `summary` field. */ summary?: JSONFilter; } -export interface PlatformBuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: PlatformNamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: PlatformBuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} export interface PlatformFunctionApiBindingFilter { /** Filter by the object’s `alias` field. */ alias?: StringFilter; @@ -9166,10 +9100,6 @@ export interface PlatformNamespaceFilter { not?: PlatformNamespaceFilter; /** Checks for any expressions in this list. */ or?: PlatformNamespaceFilter[]; - /** Filter by the object’s `platformBuilderBindingsByNamespaceId` relation. */ - platformBuilderBindingsByNamespaceId?: PlatformNamespaceToManyPlatformBuilderBindingFilter; - /** `platformBuilderBindingsByNamespaceId` exist. */ - platformBuilderBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformFunctionDeploymentsByNamespaceId` relation. */ platformFunctionDeploymentsByNamespaceId?: PlatformNamespaceToManyPlatformFunctionDeploymentFilter; /** `platformFunctionDeploymentsByNamespaceId` exist. */ @@ -9190,6 +9120,10 @@ export interface PlatformNamespaceFilter { platformResourcesByNamespaceId?: PlatformNamespaceToManyPlatformResourceFilter; /** `platformResourcesByNamespaceId` exist. */ platformResourcesByNamespaceIdExist?: boolean; + /** Filter by the object’s `platformServiceBindingsByNamespaceId` relation. */ + platformServiceBindingsByNamespaceId?: PlatformNamespaceToManyPlatformServiceBindingFilter; + /** `platformServiceBindingsByNamespaceId` exist. */ + platformServiceBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformWebhookEndpointsByNamespaceId` relation. */ platformWebhookEndpointsByNamespaceId?: PlatformNamespaceToManyPlatformWebhookEndpointFilter; /** `platformWebhookEndpointsByNamespaceId` exist. */ @@ -10447,6 +10381,48 @@ export interface PlatformResourcesResolvedRequirementFilter { /** Filter by the object’s `slug` field. */ slug?: StringFilter; } +export interface PlatformServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} export interface PlatformWebhookEndpointFilter { /** Filter by the object’s `active` field. */ active?: BooleanFilter; @@ -11795,6 +11771,50 @@ export interface ResourcesResolvedRequirementFilter { /** Filter by the object’s `slug` field. */ slug?: StringFilter; } +export interface ServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: ServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: NamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: ServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: ServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} export interface WebhookEndpointFilter { /** Filter by the object’s `active` field. */ active?: BooleanFilter; @@ -11966,40 +11986,6 @@ export type BuildStepOrderBy = | 'STATUS_DESC' | 'SUMMARY_ASC' | 'SUMMARY_DESC'; -export type BuilderBindingOrderBy = - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_BY_PRINCIPAL_ASC' - | 'CREATED_BY_PRINCIPAL_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'INSTALLATION_ID_ASC' - | 'INSTALLATION_ID_DESC' - | 'LAST_ERROR_ASC' - | 'LAST_ERROR_DESC' - | 'METADATA_ASC' - | 'METADATA_DESC' - | 'NAMESPACE_ID_ASC' - | 'NAMESPACE_ID_DESC' - | 'NATURAL' - | 'OBSERVED_HOST_ASC' - | 'OBSERVED_HOST_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'REALM_ASC' - | 'REALM_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'UPDATED_BY_ASC' - | 'UPDATED_BY_DESC' - | 'UPDATED_BY_PRINCIPAL_ASC' - | 'UPDATED_BY_PRINCIPAL_DESC'; export type ContentPresetOrderBy = | 'ACTIVE_ASC' | 'ACTIVE_DESC' @@ -13198,38 +13184,6 @@ export type PlatformBuildStepOrderBy = | 'STATUS_DESC' | 'SUMMARY_ASC' | 'SUMMARY_DESC'; -export type PlatformBuilderBindingOrderBy = - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_BY_PRINCIPAL_ASC' - | 'CREATED_BY_PRINCIPAL_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'INSTALLATION_ID_ASC' - | 'INSTALLATION_ID_DESC' - | 'LAST_ERROR_ASC' - | 'LAST_ERROR_DESC' - | 'METADATA_ASC' - | 'METADATA_DESC' - | 'NAMESPACE_ID_ASC' - | 'NAMESPACE_ID_DESC' - | 'NATURAL' - | 'OBSERVED_HOST_ASC' - | 'OBSERVED_HOST_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'REALM_ASC' - | 'REALM_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'UPDATED_BY_ASC' - | 'UPDATED_BY_DESC' - | 'UPDATED_BY_PRINCIPAL_ASC' - | 'UPDATED_BY_PRINCIPAL_DESC'; export type PlatformFunctionApiBindingOrderBy = | 'ALIAS_ASC' | 'ALIAS_DESC' @@ -14766,6 +14720,42 @@ export type PlatformResourcesResolvedRequirementOrderBy = | 'SECRETS_OBJECT_NAME_DESC' | 'SLUG_ASC' | 'SLUG_DESC'; +export type PlatformServiceBindingOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'INSTALLATION_ID_ASC' + | 'INSTALLATION_ID_DESC' + | 'INSTALLATION_SCOPE_ASC' + | 'INSTALLATION_SCOPE_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'NATURAL' + | 'OBSERVED_HOST_ASC' + | 'OBSERVED_HOST_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; export type PlatformWebhookEndpointOrderBy = | 'ACTIVE_ASC' | 'ACTIVE_DESC' @@ -15824,6 +15814,44 @@ export type ResourcesResolvedRequirementOrderBy = | 'SECRETS_OBJECT_NAME_DESC' | 'SLUG_ASC' | 'SLUG_DESC'; +export type ServiceBindingOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'INSTALLATION_ID_ASC' + | 'INSTALLATION_ID_DESC' + | 'INSTALLATION_SCOPE_ASC' + | 'INSTALLATION_SCOPE_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'NATURAL' + | 'OBSERVED_HOST_ASC' + | 'OBSERVED_HOST_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; export type WebhookEndpointOrderBy = | 'ACTIVE_ASC' | 'ACTIVE_DESC' @@ -15992,46 +16020,6 @@ export interface DeleteBuildStepInput { clientMutationId?: string; id: string; } -export interface CreateBuilderBindingInput { - clientMutationId?: string; - builderBinding: { - createdBy?: string; - createdByPrincipal?: string; - databaseId: string; - installationId: string; - lastError?: string; - metadata?: Record; - namespaceId: string; - observedHost?: string; - realm?: string; - status?: string; - updatedBy?: string; - updatedByPrincipal?: string; - }; -} -export interface BuilderBindingPatch { - createdBy?: string | null; - createdByPrincipal?: string | null; - databaseId?: string | null; - installationId?: string | null; - lastError?: string | null; - metadata?: Record | null; - namespaceId?: string | null; - observedHost?: string | null; - realm?: string | null; - status?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} -export interface UpdateBuilderBindingInput { - clientMutationId?: string; - id: string; - builderBindingPatch: BuilderBindingPatch; -} -export interface DeleteBuilderBindingInput { - clientMutationId?: string; - id: string; -} export interface CreateContentPresetInput { clientMutationId?: string; contentPreset: { @@ -17568,44 +17556,6 @@ export interface DeletePlatformBuildStepInput { clientMutationId?: string; id: string; } -export interface CreatePlatformBuilderBindingInput { - clientMutationId?: string; - platformBuilderBinding: { - createdBy?: string; - createdByPrincipal?: string; - installationId: string; - lastError?: string; - metadata?: Record; - namespaceId: string; - observedHost?: string; - realm?: string; - status?: string; - updatedBy?: string; - updatedByPrincipal?: string; - }; -} -export interface PlatformBuilderBindingPatch { - createdBy?: string | null; - createdByPrincipal?: string | null; - installationId?: string | null; - lastError?: string | null; - metadata?: Record | null; - namespaceId?: string | null; - observedHost?: string | null; - realm?: string | null; - status?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} -export interface UpdatePlatformBuilderBindingInput { - clientMutationId?: string; - id: string; - platformBuilderBindingPatch: PlatformBuilderBindingPatch; -} -export interface DeletePlatformBuilderBindingInput { - clientMutationId?: string; - id: string; -} export interface CreatePlatformFunctionApiBindingInput { clientMutationId?: string; platformFunctionApiBinding: { @@ -19398,6 +19348,48 @@ export interface DeletePlatformResourcesResolvedRequirementInput { clientMutationId?: string; id: string; } +export interface CreatePlatformServiceBindingInput { + clientMutationId?: string; + platformServiceBinding: { + createdBy?: string; + createdByPrincipal?: string; + installationId: string; + installationScope: string; + kind: string; + lastError?: string; + metadata?: Record; + namespaceId: string; + observedHost?: string; + realm?: string; + status?: string; + updatedBy?: string; + updatedByPrincipal?: string; + }; +} +export interface PlatformServiceBindingPatch { + createdBy?: string | null; + createdByPrincipal?: string | null; + installationId?: string | null; + installationScope?: string | null; + kind?: string | null; + lastError?: string | null; + metadata?: Record | null; + namespaceId?: string | null; + observedHost?: string | null; + realm?: string | null; + status?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} +export interface UpdatePlatformServiceBindingInput { + clientMutationId?: string; + id: string; + platformServiceBindingPatch: PlatformServiceBindingPatch; +} +export interface DeletePlatformServiceBindingInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformWebhookEndpointInput { clientMutationId?: string; platformWebhookEndpoint: { @@ -20579,6 +20571,50 @@ export interface DeleteResourcesResolvedRequirementInput { clientMutationId?: string; id: string; } +export interface CreateServiceBindingInput { + clientMutationId?: string; + serviceBinding: { + createdBy?: string; + createdByPrincipal?: string; + databaseId: string; + installationId: string; + installationScope: string; + kind: string; + lastError?: string; + metadata?: Record; + namespaceId: string; + observedHost?: string; + realm?: string; + status?: string; + updatedBy?: string; + updatedByPrincipal?: string; + }; +} +export interface ServiceBindingPatch { + createdBy?: string | null; + createdByPrincipal?: string | null; + databaseId?: string | null; + installationId?: string | null; + installationScope?: string | null; + kind?: string | null; + lastError?: string | null; + metadata?: Record | null; + namespaceId?: string | null; + observedHost?: string | null; + realm?: string | null; + status?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} +export interface UpdateServiceBindingInput { + clientMutationId?: string; + id: string; + serviceBindingPatch: ServiceBindingPatch; +} +export interface DeleteServiceBindingInput { + clientMutationId?: string; + id: string; +} export interface CreateWebhookEndpointInput { clientMutationId?: string; webhookEndpoint: { @@ -20682,12 +20718,12 @@ export const connectionFieldsMap = { imageGrants: 'ImageGrant', }, Namespace: { - builderBindings: 'BuilderBinding', functionDeployments: 'FunctionDeployment', registryBindings: 'RegistryBinding', resourceDefinitions: 'ResourceDefinition', resourceInstallations: 'ResourceInstallation', resources: 'Resource', + serviceBindings: 'ServiceBinding', webhookEndpoints: 'WebhookEndpoint', }, PlatformFunctionApiBinding: { @@ -20703,12 +20739,12 @@ export const connectionFieldsMap = { platformImageGrantsByImageId: 'PlatformImageGrant', }, PlatformNamespace: { - platformBuilderBindingsByNamespaceId: 'PlatformBuilderBinding', platformFunctionDeploymentsByNamespaceId: 'PlatformFunctionDeployment', platformRegistryBindingsByNamespaceId: 'PlatformRegistryBinding', platformResourceDefinitionsByNamespaceId: 'PlatformResourceDefinition', platformResourceInstallationsByNamespaceId: 'PlatformResourceInstallation', platformResourcesByNamespaceId: 'PlatformResource', + platformServiceBindingsByNamespaceId: 'PlatformServiceBinding', platformWebhookEndpointsByNamespaceId: 'PlatformWebhookEndpoint', }, PlatformProposalComment: { @@ -21488,15 +21524,6 @@ export interface ConstructiveInternalTypeImageFilter { /** Not included in the specified list. */ notIn?: ConstructiveInternalTypeImage[]; } -/** A filter to be used against many `BuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface NamespaceToManyBuilderBindingFilter { - /** Filters to entities where every related entity matches. */ - every?: BuilderBindingFilter; - /** Filters to entities where no related entity matches. */ - none?: BuilderBindingFilter; - /** Filters to entities where at least one related entity matches. */ - some?: BuilderBindingFilter; -} /** A filter to be used against many `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface NamespaceToManyFunctionDeploymentFilter { /** Filters to entities where every related entity matches. */ @@ -21542,6 +21569,15 @@ export interface NamespaceToManyResourceFilter { /** Filters to entities where at least one related entity matches. */ some?: ResourceFilter; } +/** A filter to be used against many `ServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface NamespaceToManyServiceBindingFilter { + /** Filters to entities where every related entity matches. */ + every?: ServiceBindingFilter; + /** Filters to entities where no related entity matches. */ + none?: ServiceBindingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: ServiceBindingFilter; +} /** A filter to be used against many `WebhookEndpoint` object types. All fields are combined with a logical ‘and.’ */ export interface NamespaceToManyWebhookEndpointFilter { /** Filters to entities where every related entity matches. */ @@ -21605,15 +21641,6 @@ export interface PlatformImageToManyPlatformImageGrantFilter { /** Filters to entities where at least one related entity matches. */ some?: PlatformImageGrantFilter; } -/** A filter to be used against many `PlatformBuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformNamespaceToManyPlatformBuilderBindingFilter { - /** Filters to entities where every related entity matches. */ - every?: PlatformBuilderBindingFilter; - /** Filters to entities where no related entity matches. */ - none?: PlatformBuilderBindingFilter; - /** Filters to entities where at least one related entity matches. */ - some?: PlatformBuilderBindingFilter; -} /** A filter to be used against many `PlatformFunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformNamespaceToManyPlatformFunctionDeploymentFilter { /** Filters to entities where every related entity matches. */ @@ -21659,6 +21686,15 @@ export interface PlatformNamespaceToManyPlatformResourceFilter { /** Filters to entities where at least one related entity matches. */ some?: PlatformResourceFilter; } +/** A filter to be used against many `PlatformServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyPlatformServiceBindingFilter { + /** Filters to entities where every related entity matches. */ + every?: PlatformServiceBindingFilter; + /** Filters to entities where no related entity matches. */ + none?: PlatformServiceBindingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlatformServiceBindingFilter; +} /** A filter to be used against many `PlatformWebhookEndpoint` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformNamespaceToManyPlatformWebhookEndpointFilter { /** Filters to entities where every related entity matches. */ @@ -22322,32 +22358,6 @@ export interface BuildStepInput { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record; } -/** An input for mutations affecting `BuilderBinding` */ -export interface BuilderBindingInput { - createdAt?: string; - createdBy?: string; - createdByPrincipal?: string; - /** Database that owns this resource (database-scoped isolation) */ - databaseId: string; - id?: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId: string; - /** Most recent projection failure */ - lastError?: string; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record; - /** Namespace whose builds use this BuildKit installation */ - namespaceId: string; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string; - updatedAt?: string; - updatedBy?: string; - updatedByPrincipal?: string; -} /** An input for mutations affecting `ContentPreset` */ export interface ContentPresetInput { /** Whether this preset is selectable at provision time */ @@ -23384,30 +23394,6 @@ export interface PlatformBuildStepInput { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record; } -/** An input for mutations affecting `PlatformBuilderBinding` */ -export interface PlatformBuilderBindingInput { - createdAt?: string; - createdBy?: string; - createdByPrincipal?: string; - id?: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId: string; - /** Most recent projection failure */ - lastError?: string; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record; - /** Namespace whose builds use this BuildKit installation */ - namespaceId: string; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string; - updatedAt?: string; - updatedBy?: string; - updatedByPrincipal?: string; -} /** An input for mutations affecting `PlatformFunctionApiBinding` */ export interface PlatformFunctionApiBindingInput { /** Binding alias (e.g. default, staging, production) */ @@ -24460,6 +24446,34 @@ export interface PlatformResourceUsageSummaryInput { /** Number of raw samples aggregated into this summary */ sampleCount?: number; } +/** An input for mutations affecting `PlatformServiceBinding` */ +export interface PlatformServiceBindingInput { + createdAt?: string; + createdBy?: string; + createdByPrincipal?: string; + id?: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId: string; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope: string; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind: string; + /** Most recent projection failure */ + lastError?: string; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record; + /** Namespace whose builds use this BuildKit installation */ + namespaceId: string; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string; + /** Projection state of the bound address: pending, active, failed */ + status?: string; + updatedAt?: string; + updatedBy?: string; + updatedByPrincipal?: string; +} /** An input for mutations affecting `PlatformWebhookEndpoint` */ export interface PlatformWebhookEndpointInput { /** Whether this endpoint currently accepts deliveries */ @@ -25056,6 +25070,36 @@ export interface ResourceUsageSummaryInput { /** Number of raw samples aggregated into this summary */ sampleCount?: number; } +/** An input for mutations affecting `ServiceBinding` */ +export interface ServiceBindingInput { + createdAt?: string; + createdBy?: string; + createdByPrincipal?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + id?: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId: string; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope: string; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind: string; + /** Most recent projection failure */ + lastError?: string; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record; + /** Namespace whose builds use this BuildKit installation */ + namespaceId: string; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string; + /** Projection state of the bound address: pending, active, failed */ + status?: string; + updatedAt?: string; + updatedBy?: string; + updatedByPrincipal?: string; +} /** An input for mutations affecting `WebhookEndpoint` */ export interface WebhookEndpointInput { /** Whether this endpoint currently accepts deliveries */ @@ -25874,47 +25918,6 @@ export interface ImageGrantFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } -/** A filter to be used against `BuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface BuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: BuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: NamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: BuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: BuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} /** A filter to be used against `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionDeploymentFilter { /** Checks for all expressions in this list. */ @@ -26214,6 +26217,51 @@ export interface ResourceFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } +/** A filter to be used against `ServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface ServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: ServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: NamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: ServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: ServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} /** A filter to be used against `PlatformFunctionInvocation` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformFunctionInvocationFilter { /** Filter by the object’s `actorId` field. */ @@ -26456,45 +26504,6 @@ export interface PlatformImageGrantFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } -/** A filter to be used against `PlatformBuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformBuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: PlatformNamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: PlatformBuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} /** A filter to be used against `PlatformFunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformFunctionDeploymentFilter { /** Checks for all expressions in this list. */ @@ -26784,6 +26793,49 @@ export interface PlatformResourceFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } +/** A filter to be used against `PlatformServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} /** A filter to be used against `PlatformProposalReaction` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformProposalReactionFilter { /** Filter by the object’s `actorId` field. */ @@ -28502,10 +28554,6 @@ export interface NamespaceFilter { and?: NamespaceFilter[]; /** Filter by the object’s `annotations` field. */ annotations?: JSONFilter; - /** Filter by the object’s `builderBindings` relation. */ - builderBindings?: NamespaceToManyBuilderBindingFilter; - /** `builderBindings` exist. */ - builderBindingsExist?: boolean; /** Filter by the object’s `clusterId` field. */ clusterId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -28552,6 +28600,10 @@ export interface NamespaceFilter { resources?: NamespaceToManyResourceFilter; /** `resources` exist. */ resourcesExist?: boolean; + /** Filter by the object’s `serviceBindings` relation. */ + serviceBindings?: NamespaceToManyServiceBindingFilter; + /** `serviceBindings` exist. */ + serviceBindingsExist?: boolean; /** Filter by the object’s `status` field. */ status?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -28786,10 +28838,6 @@ export interface PlatformNamespaceFilter { not?: PlatformNamespaceFilter; /** Checks for any expressions in this list. */ or?: PlatformNamespaceFilter[]; - /** Filter by the object’s `platformBuilderBindingsByNamespaceId` relation. */ - platformBuilderBindingsByNamespaceId?: PlatformNamespaceToManyPlatformBuilderBindingFilter; - /** `platformBuilderBindingsByNamespaceId` exist. */ - platformBuilderBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformFunctionDeploymentsByNamespaceId` relation. */ platformFunctionDeploymentsByNamespaceId?: PlatformNamespaceToManyPlatformFunctionDeploymentFilter; /** `platformFunctionDeploymentsByNamespaceId` exist. */ @@ -28810,6 +28858,10 @@ export interface PlatformNamespaceFilter { platformResourcesByNamespaceId?: PlatformNamespaceToManyPlatformResourceFilter; /** `platformResourcesByNamespaceId` exist. */ platformResourcesByNamespaceIdExist?: boolean; + /** Filter by the object’s `platformServiceBindingsByNamespaceId` relation. */ + platformServiceBindingsByNamespaceId?: PlatformNamespaceToManyPlatformServiceBindingFilter; + /** `platformServiceBindingsByNamespaceId` exist. */ + platformServiceBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformWebhookEndpointsByNamespaceId` relation. */ platformWebhookEndpointsByNamespaceId?: PlatformNamespaceToManyPlatformWebhookEndpointFilter; /** `platformWebhookEndpointsByNamespaceId` exist. */ @@ -29563,51 +29615,6 @@ export type DeleteBuildStepPayloadSelect = { }; clientMutationId?: boolean; }; -export interface CreateBuilderBindingPayload { - /** The `BuilderBinding` that was created by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} -export type CreateBuilderBindingPayloadSelect = { - builderBinding?: { - select: BuilderBindingSelect; - }; - builderBindingEdge?: { - select: BuilderBindingEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface UpdateBuilderBindingPayload { - /** The `BuilderBinding` that was updated by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} -export type UpdateBuilderBindingPayloadSelect = { - builderBinding?: { - select: BuilderBindingSelect; - }; - builderBindingEdge?: { - select: BuilderBindingEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface DeleteBuilderBindingPayload { - /** The `BuilderBinding` that was deleted by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} -export type DeleteBuilderBindingPayloadSelect = { - builderBinding?: { - select: BuilderBindingSelect; - }; - builderBindingEdge?: { - select: BuilderBindingEdgeSelect; - }; - clientMutationId?: boolean; -}; export interface CreateContentPresetPayload { clientMutationId?: string | null; /** The `ContentPreset` that was created by this mutation. */ @@ -31386,51 +31393,6 @@ export type DeletePlatformBuildStepPayloadSelect = { select: PlatformBuildStepEdgeSelect; }; }; -export interface CreatePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was created by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} -export type CreatePlatformBuilderBindingPayloadSelect = { - clientMutationId?: boolean; - platformBuilderBinding?: { - select: PlatformBuilderBindingSelect; - }; - platformBuilderBindingEdge?: { - select: PlatformBuilderBindingEdgeSelect; - }; -}; -export interface UpdatePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was updated by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} -export type UpdatePlatformBuilderBindingPayloadSelect = { - clientMutationId?: boolean; - platformBuilderBinding?: { - select: PlatformBuilderBindingSelect; - }; - platformBuilderBindingEdge?: { - select: PlatformBuilderBindingEdgeSelect; - }; -}; -export interface DeletePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was deleted by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} -export type DeletePlatformBuilderBindingPayloadSelect = { - clientMutationId?: boolean; - platformBuilderBinding?: { - select: PlatformBuilderBindingSelect; - }; - platformBuilderBindingEdge?: { - select: PlatformBuilderBindingEdgeSelect; - }; -}; export interface CreatePlatformFunctionApiBindingPayload { clientMutationId?: string | null; /** The `PlatformFunctionApiBinding` that was created by this mutation. */ @@ -33186,6 +33148,51 @@ export type DeletePlatformResourceUsageSummaryPayloadSelect = { select: PlatformResourceUsageSummaryEdgeSelect; }; }; +export interface CreatePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was created by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} +export type CreatePlatformServiceBindingPayloadSelect = { + clientMutationId?: boolean; + platformServiceBinding?: { + select: PlatformServiceBindingSelect; + }; + platformServiceBindingEdge?: { + select: PlatformServiceBindingEdgeSelect; + }; +}; +export interface UpdatePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was updated by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} +export type UpdatePlatformServiceBindingPayloadSelect = { + clientMutationId?: boolean; + platformServiceBinding?: { + select: PlatformServiceBindingSelect; + }; + platformServiceBindingEdge?: { + select: PlatformServiceBindingEdgeSelect; + }; +}; +export interface DeletePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was deleted by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} +export type DeletePlatformServiceBindingPayloadSelect = { + clientMutationId?: boolean; + platformServiceBinding?: { + select: PlatformServiceBindingSelect; + }; + platformServiceBindingEdge?: { + select: PlatformServiceBindingEdgeSelect; + }; +}; export interface CreatePlatformWebhookEndpointPayload { clientMutationId?: string | null; /** The `PlatformWebhookEndpoint` that was created by this mutation. */ @@ -34176,6 +34183,51 @@ export type DeleteResourceUsageSummaryPayloadSelect = { select: ResourceUsageSummaryEdgeSelect; }; }; +export interface CreateServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was created by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} +export type CreateServiceBindingPayloadSelect = { + clientMutationId?: boolean; + serviceBinding?: { + select: ServiceBindingSelect; + }; + serviceBindingEdge?: { + select: ServiceBindingEdgeSelect; + }; +}; +export interface UpdateServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was updated by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} +export type UpdateServiceBindingPayloadSelect = { + clientMutationId?: boolean; + serviceBinding?: { + select: ServiceBindingSelect; + }; + serviceBindingEdge?: { + select: ServiceBindingEdgeSelect; + }; +}; +export interface DeleteServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was deleted by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} +export type DeleteServiceBindingPayloadSelect = { + clientMutationId?: boolean; + serviceBinding?: { + select: ServiceBindingSelect; + }; + serviceBindingEdge?: { + select: ServiceBindingEdgeSelect; + }; +}; export interface CreateWebhookEndpointPayload { clientMutationId?: string | null; /** The `WebhookEndpoint` that was created by this mutation. */ @@ -34362,18 +34414,6 @@ export type BuildStepEdgeSelect = { select: BuildStepSelect; }; }; -/** A `BuilderBinding` edge in the connection. */ -export interface BuilderBindingEdge { - cursor?: string | null; - /** The `BuilderBinding` at the end of the edge. */ - node?: BuilderBinding | null; -} -export type BuilderBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: BuilderBindingSelect; - }; -}; /** A `ContentPreset` edge in the connection. */ export interface ContentPresetEdge { cursor?: string | null; @@ -34806,18 +34846,6 @@ export type PlatformBuildStepEdgeSelect = { select: PlatformBuildStepSelect; }; }; -/** A `PlatformBuilderBinding` edge in the connection. */ -export interface PlatformBuilderBindingEdge { - cursor?: string | null; - /** The `PlatformBuilderBinding` at the end of the edge. */ - node?: PlatformBuilderBinding | null; -} -export type PlatformBuilderBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformBuilderBindingSelect; - }; -}; /** A `PlatformFunctionApiBinding` edge in the connection. */ export interface PlatformFunctionApiBindingEdge { cursor?: string | null; @@ -35262,6 +35290,18 @@ export type PlatformResourceUsageSummaryEdgeSelect = { select: PlatformResourceUsageSummarySelect; }; }; +/** A `PlatformServiceBinding` edge in the connection. */ +export interface PlatformServiceBindingEdge { + cursor?: string | null; + /** The `PlatformServiceBinding` at the end of the edge. */ + node?: PlatformServiceBinding | null; +} +export type PlatformServiceBindingEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformServiceBindingSelect; + }; +}; /** A `PlatformWebhookEndpoint` edge in the connection. */ export interface PlatformWebhookEndpointEdge { cursor?: string | null; @@ -35526,6 +35566,18 @@ export type ResourceUsageSummaryEdgeSelect = { select: ResourceUsageSummarySelect; }; }; +/** A `ServiceBinding` edge in the connection. */ +export interface ServiceBindingEdge { + cursor?: string | null; + /** The `ServiceBinding` at the end of the edge. */ + node?: ServiceBinding | null; +} +export type ServiceBindingEdgeSelect = { + cursor?: boolean; + node?: { + select: ServiceBindingSelect; + }; +}; /** A `WebhookEndpoint` edge in the connection. */ export interface WebhookEndpointEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/compute/orm/models/index.ts b/sdk/constructive-cli/src/compute/orm/models/index.ts index 3b2af275ae..dfb31b3c70 100644 --- a/sdk/constructive-cli/src/compute/orm/models/index.ts +++ b/sdk/constructive-cli/src/compute/orm/models/index.ts @@ -5,7 +5,6 @@ */ export { BuildModel } from './build'; export { BuildStepModel } from './buildStep'; -export { BuilderBindingModel } from './builderBinding'; export { ContentPresetModel } from './contentPreset'; export { DatabaseFunctionGraphModel } from './databaseFunctionGraph'; export { DatabaseFunctionGraphExecutionCancelRequestModel } from './databaseFunctionGraphExecutionCancelRequest'; @@ -49,7 +48,6 @@ export { NamespaceModel } from './namespace'; export { NamespaceEventModel } from './namespaceEvent'; export { PlatformBuildModel } from './platformBuild'; export { PlatformBuildStepModel } from './platformBuildStep'; -export { PlatformBuilderBindingModel } from './platformBuilderBinding'; export { PlatformFunctionApiBindingModel } from './platformFunctionApiBinding'; export { PlatformFunctionCapabilityBindingModel } from './platformFunctionCapabilityBinding'; export { PlatformFunctionDefinitionModel } from './platformFunctionDefinition'; @@ -96,6 +94,7 @@ export { PlatformResourceUtilizationModel } from './platformResourceUtilization' export { PlatformResourcesHealthModel } from './platformResourcesHealth'; export { PlatformResourcesRequirementsStateModel } from './platformResourcesRequirementsState'; export { PlatformResourcesResolvedRequirementModel } from './platformResourcesResolvedRequirement'; +export { PlatformServiceBindingModel } from './platformServiceBinding'; export { PlatformWebhookEndpointModel } from './platformWebhookEndpoint'; export { PlatformWebhookEventModel } from './platformWebhookEvent'; export { ProposalCommentModel } from './proposalComment'; @@ -124,5 +123,6 @@ export { ResourceUtilizationModel } from './resourceUtilization'; export { ResourcesHealthModel } from './resourcesHealth'; export { ResourcesRequirementsStateModel } from './resourcesRequirementsState'; export { ResourcesResolvedRequirementModel } from './resourcesResolvedRequirement'; +export { ServiceBindingModel } from './serviceBinding'; export { WebhookEndpointModel } from './webhookEndpoint'; export { WebhookEventModel } from './webhookEvent'; diff --git a/sdk/constructive-cli/src/compute/orm/models/platformBuilderBinding.ts b/sdk/constructive-cli/src/compute/orm/models/platformBuilderBinding.ts deleted file mode 100644 index 09a8daa1ed..0000000000 --- a/sdk/constructive-cli/src/compute/orm/models/platformBuilderBinding.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * PlatformBuilderBinding 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 { - PlatformBuilderBinding, - PlatformBuilderBindingWithRelations, - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy, - CreatePlatformBuilderBindingInput, - UpdatePlatformBuilderBindingInput, - PlatformBuilderBindingPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class PlatformBuilderBindingModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - platformBuilderBindings: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'PlatformBuilderBinding', - 'platformBuilderBindings', - 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, - }, - 'PlatformBuilderBindingFilter', - 'PlatformBuilderBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'PlatformBuilderBinding', - fieldName: 'platformBuilderBindings', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - platformBuilderBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'PlatformBuilderBinding', - 'platformBuilderBindings', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'PlatformBuilderBindingFilter', - 'PlatformBuilderBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'PlatformBuilderBinding', - fieldName: 'platformBuilderBinding', - document, - variables, - transform: (data: { - platformBuilderBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - platformBuilderBinding: data.platformBuilderBindings?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - platformBuilderBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'PlatformBuilderBinding', - 'platformBuilderBindings', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'PlatformBuilderBindingFilter', - 'PlatformBuilderBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'PlatformBuilderBinding', - fieldName: 'platformBuilderBinding', - document, - variables, - transform: (data: { - platformBuilderBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - platformBuilderBinding: data.platformBuilderBindings?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createPlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'PlatformBuilderBinding', - 'createPlatformBuilderBinding', - 'platformBuilderBinding', - args.select, - args.data, - 'CreatePlatformBuilderBindingInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'PlatformBuilderBinding', - fieldName: 'createPlatformBuilderBinding', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - PlatformBuilderBindingPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updatePlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'PlatformBuilderBinding', - 'updatePlatformBuilderBinding', - 'platformBuilderBinding', - args.select, - args.where.id, - args.data, - 'UpdatePlatformBuilderBindingInput', - 'id', - 'platformBuilderBindingPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'PlatformBuilderBinding', - fieldName: 'updatePlatformBuilderBinding', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deletePlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'PlatformBuilderBinding', - 'deletePlatformBuilderBinding', - 'platformBuilderBinding', - { - id: args.where.id, - }, - 'DeletePlatformBuilderBindingInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'PlatformBuilderBinding', - fieldName: 'deletePlatformBuilderBinding', - document, - variables, - }); - } -} diff --git a/sdk/constructive-cli/src/compute/orm/models/platformServiceBinding.ts b/sdk/constructive-cli/src/compute/orm/models/platformServiceBinding.ts new file mode 100644 index 0000000000..e50381b94d --- /dev/null +++ b/sdk/constructive-cli/src/compute/orm/models/platformServiceBinding.ts @@ -0,0 +1,247 @@ +/** + * PlatformServiceBinding 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 { + PlatformServiceBinding, + PlatformServiceBindingWithRelations, + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy, + CreatePlatformServiceBindingInput, + UpdatePlatformServiceBindingInput, + PlatformServiceBindingPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformServiceBindingModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformServiceBindings: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformServiceBinding', + 'platformServiceBindings', + 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, + }, + 'PlatformServiceBindingFilter', + 'PlatformServiceBindingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformServiceBinding', + fieldName: 'platformServiceBindings', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformServiceBinding: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformServiceBinding', + 'platformServiceBindings', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformServiceBindingFilter', + 'PlatformServiceBindingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformServiceBinding', + fieldName: 'platformServiceBinding', + document, + variables, + transform: (data: { + platformServiceBindings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformServiceBinding: data.platformServiceBindings?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformServiceBinding: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformServiceBinding', + 'platformServiceBindings', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformServiceBindingFilter', + 'PlatformServiceBindingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformServiceBinding', + fieldName: 'platformServiceBinding', + document, + variables, + transform: (data: { + platformServiceBindings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformServiceBinding: data.platformServiceBindings?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformServiceBinding', + 'createPlatformServiceBinding', + 'platformServiceBinding', + args.select, + args.data, + 'CreatePlatformServiceBindingInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformServiceBinding', + fieldName: 'createPlatformServiceBinding', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformServiceBindingPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformServiceBinding', + 'updatePlatformServiceBinding', + 'platformServiceBinding', + args.select, + args.where.id, + args.data, + 'UpdatePlatformServiceBindingInput', + 'id', + 'platformServiceBindingPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformServiceBinding', + fieldName: 'updatePlatformServiceBinding', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformServiceBinding', + 'deletePlatformServiceBinding', + 'platformServiceBinding', + { + id: args.where.id, + }, + 'DeletePlatformServiceBindingInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformServiceBinding', + fieldName: 'deletePlatformServiceBinding', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/compute/orm/models/builderBinding.ts b/sdk/constructive-cli/src/compute/orm/models/serviceBinding.ts similarity index 53% rename from sdk/constructive-cli/src/compute/orm/models/builderBinding.ts rename to sdk/constructive-cli/src/compute/orm/models/serviceBinding.ts index 0d5d7843e3..be7061a21b 100644 --- a/sdk/constructive-cli/src/compute/orm/models/builderBinding.ts +++ b/sdk/constructive-cli/src/compute/orm/models/serviceBinding.ts @@ -1,5 +1,5 @@ /** - * BuilderBinding model for ORM client + * ServiceBinding 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 { - BuilderBinding, - BuilderBindingWithRelations, - BuilderBindingSelect, - BuilderBindingFilter, - BuilderBindingOrderBy, - CreateBuilderBindingInput, - UpdateBuilderBindingInput, - BuilderBindingPatch, + ServiceBinding, + ServiceBindingWithRelations, + ServiceBindingSelect, + ServiceBindingFilter, + ServiceBindingOrderBy, + CreateServiceBindingInput, + UpdateServiceBindingInput, + ServiceBindingPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class BuilderBindingModel { +export class ServiceBindingModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - builderBindings: ConnectionResult>; + serviceBindings: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'BuilderBinding', - 'builderBindings', + 'ServiceBinding', + 'serviceBindings', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class BuilderBindingModel { before: args?.before, offset: args?.offset, }, - 'BuilderBindingFilter', - 'BuilderBindingOrderBy', + 'ServiceBindingFilter', + 'ServiceBindingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'BuilderBinding', - fieldName: 'builderBindings', + operationName: 'ServiceBinding', + fieldName: 'serviceBindings', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - builderBinding: InferSelectResult | null; + serviceBinding: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'BuilderBinding', - 'builderBindings', + 'ServiceBinding', + 'serviceBindings', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'BuilderBindingFilter', - 'BuilderBindingOrderBy', + 'ServiceBindingFilter', + 'ServiceBindingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'BuilderBinding', - fieldName: 'builderBinding', + operationName: 'ServiceBinding', + fieldName: 'serviceBinding', document, variables, transform: (data: { - builderBindings?: { - nodes?: InferSelectResult[]; + serviceBindings?: { + nodes?: InferSelectResult[]; }; }) => ({ - builderBinding: data.builderBindings?.nodes?.[0] ?? null, + serviceBinding: data.serviceBindings?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - builderBinding: InferSelectResult | null; + serviceBinding: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'BuilderBinding', - 'builderBindings', + 'ServiceBinding', + 'serviceBindings', args.select, { where: { @@ -124,91 +124,91 @@ export class BuilderBindingModel { }, first: 1, }, - 'BuilderBindingFilter', - 'BuilderBindingOrderBy', + 'ServiceBindingFilter', + 'ServiceBindingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'BuilderBinding', - fieldName: 'builderBinding', + operationName: 'ServiceBinding', + fieldName: 'serviceBinding', document, variables, transform: (data: { - builderBindings?: { - nodes?: InferSelectResult[]; + serviceBindings?: { + nodes?: InferSelectResult[]; }; }) => ({ - builderBinding: data.builderBindings?.nodes?.[0] ?? null, + serviceBinding: data.serviceBindings?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createBuilderBinding: { - builderBinding: InferSelectResult; + createServiceBinding: { + serviceBinding: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'BuilderBinding', - 'createBuilderBinding', - 'builderBinding', + 'ServiceBinding', + 'createServiceBinding', + 'serviceBinding', args.select, args.data, - 'CreateBuilderBindingInput', + 'CreateServiceBindingInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'BuilderBinding', - fieldName: 'createBuilderBinding', + operationName: 'ServiceBinding', + fieldName: 'createServiceBinding', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - BuilderBindingPatch + ServiceBindingPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateBuilderBinding: { - builderBinding: InferSelectResult; + updateServiceBinding: { + serviceBinding: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'BuilderBinding', - 'updateBuilderBinding', - 'builderBinding', + 'ServiceBinding', + 'updateServiceBinding', + 'serviceBinding', args.select, args.where.id, args.data, - 'UpdateBuilderBindingInput', + 'UpdateServiceBindingInput', 'id', - 'builderBindingPatch', + 'serviceBindingPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'BuilderBinding', - fieldName: 'updateBuilderBinding', + operationName: 'ServiceBinding', + fieldName: 'updateServiceBinding', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class BuilderBindingModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteBuilderBinding: { - builderBinding: InferSelectResult; + deleteServiceBinding: { + serviceBinding: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'BuilderBinding', - 'deleteBuilderBinding', - 'builderBinding', + 'ServiceBinding', + 'deleteServiceBinding', + 'serviceBinding', { id: args.where.id, }, - 'DeleteBuilderBindingInput', + 'DeleteServiceBindingInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'BuilderBinding', - fieldName: 'deleteBuilderBinding', + operationName: 'ServiceBinding', + fieldName: 'deleteServiceBinding', document, variables, }); diff --git a/sdk/constructive-cli/src/modules/cli/README.md b/sdk/constructive-cli/src/modules/cli/README.md index 1334f3510d..66fd6a8bd2 100644 --- a/sdk/constructive-cli/src/modules/cli/README.md +++ b/sdk/constructive-cli/src/modules/cli/README.md @@ -114,7 +114,7 @@ csdk auth set-token | `webauthn-auth-module` | webauthnAuthModule CRUD operations | | `webauthn-credentials-module` | webauthnCredentialsModule CRUD operations | | `webhook-module` | webhookModule CRUD operations | -| `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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. | +| `construct-blueprint` | Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. | | `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` | Reconcile an S3 bucket for a logical bucket in the database. Records the request on the bucket row via RLS; the bucket's job @@ -517,6 +517,7 @@ CRUD operations for BlueprintConstruction records. | `constructedDefinition` | JSON | | `createdAt` | Datetime | | `databaseId` | UUID | +| `error` | JSON | | `id` | UUID | | `schemaId` | UUID | | `status` | String | @@ -524,7 +525,7 @@ CRUD operations for BlueprintConstruction records. | `updatedAt` | Datetime | **Required create fields:** `blueprintId`, `databaseId` -**Optional create fields (backend defaults):** `constructedAt`, `constructedDefinition`, `schemaId`, `status`, `tableMap` +**Optional create fields (backend defaults):** `constructedAt`, `constructedDefinition`, `error`, `schemaId`, `status`, `tableMap` ### `blueprint-template` @@ -1274,6 +1275,7 @@ CRUD operations for DomainModule records. | `catalogModuleId` | UUID | | `databaseId` | UUID | | `defaultCapabilities` | String | +| `defaultReservedSubdomains` | JSON | | `domainEventsTableId` | UUID | | `domainEventsTableName` | String | | `domainVerificationsTableId` | UUID | @@ -1292,11 +1294,14 @@ CRUD operations for DomainModule records. | `privateSchemaName` | String | | `provisions` | JSON | | `publicSchemaName` | String | +| `reservedSubdomainsTableId` | UUID | +| `reservedSubdomainsTableName` | String | | `schemaId` | UUID | | `scope` | String | +| `sweepUnverifiedDomainsFunction` | String | **Required create fields:** `databaseId`, `scope` -**Optional create fields (backend defaults):** `apiName`, `catalogModuleId`, `defaultCapabilities`, `domainEventsTableId`, `domainEventsTableName`, `domainVerificationsTableId`, `domainVerificationsTableName`, `domainsTableId`, `domainsTableName`, `entityField`, `entityTableId`, `managedDomainsTableId`, `managedDomainsTableName`, `policies`, `prefix`, `privateApiName`, `privateSchemaId`, `privateSchemaName`, `provisions`, `publicSchemaName`, `schemaId` +**Optional create fields (backend defaults):** `apiName`, `catalogModuleId`, `defaultCapabilities`, `defaultReservedSubdomains`, `domainEventsTableId`, `domainEventsTableName`, `domainVerificationsTableId`, `domainVerificationsTableName`, `domainsTableId`, `domainsTableName`, `entityField`, `entityTableId`, `managedDomainsTableId`, `managedDomainsTableName`, `policies`, `prefix`, `privateApiName`, `privateSchemaId`, `privateSchemaName`, `provisions`, `publicSchemaName`, `reservedSubdomainsTableId`, `reservedSubdomainsTableName`, `schemaId`, `sweepUnverifiedDomainsFunction` ### `email-sender-module` @@ -3019,8 +3024,6 @@ CRUD operations for ResourceModule records. | Field | Type | |-------|------| | `apiName` | String | -| `builderBindingsTableId` | UUID | -| `builderBindingsTableName` | String | | `databaseId` | UUID | | `defaultCapabilities` | String | | `entityField` | String | @@ -3058,9 +3061,11 @@ CRUD operations for ResourceModule records. | `rollupResourceUsageSummaryFunction` | String | | `schemaId` | UUID | | `scope` | String | +| `serviceBindingsTableId` | UUID | +| `serviceBindingsTableName` | String | **Required create fields:** `databaseId`, `scope` -**Optional create fields (backend defaults):** `apiName`, `builderBindingsTableId`, `builderBindingsTableName`, `defaultCapabilities`, `entityField`, `entityTableId`, `installationStoreName`, `merkleStoreModuleId`, `namespaceModuleId`, `policies`, `prefix`, `privateApiName`, `privateSchemaId`, `privateSchemaName`, `provisions`, `publicSchemaName`, `registryBindingsTableId`, `registryBindingsTableName`, `requirementsStateViewName`, `resolvedRequirementsViewName`, `resourceBillingRollupFunction`, `resourceDefinitionsTableId`, `resourceDefinitionsTableName`, `resourceEventsTableId`, `resourceEventsTableName`, `resourceInstallationsTableId`, `resourceInstallationsTableName`, `resourceStatusChecksTableId`, `resourceStatusChecksTableName`, `resourceUsageLogTableId`, `resourceUsageLogTableName`, `resourceUsageSummaryTableId`, `resourceUsageSummaryTableName`, `resourcesTableId`, `resourcesTableName`, `rollupResourceUsageSummaryFunction`, `schemaId` +**Optional create fields (backend defaults):** `apiName`, `defaultCapabilities`, `entityField`, `entityTableId`, `installationStoreName`, `merkleStoreModuleId`, `namespaceModuleId`, `policies`, `prefix`, `privateApiName`, `privateSchemaId`, `privateSchemaName`, `provisions`, `publicSchemaName`, `registryBindingsTableId`, `registryBindingsTableName`, `requirementsStateViewName`, `resolvedRequirementsViewName`, `resourceBillingRollupFunction`, `resourceDefinitionsTableId`, `resourceDefinitionsTableName`, `resourceEventsTableId`, `resourceEventsTableName`, `resourceInstallationsTableId`, `resourceInstallationsTableName`, `resourceStatusChecksTableId`, `resourceStatusChecksTableName`, `resourceUsageLogTableId`, `resourceUsageLogTableName`, `resourceUsageSummaryTableId`, `resourceUsageSummaryTableName`, `resourcesTableId`, `resourcesTableName`, `rollupResourceUsageSummaryFunction`, `schemaId`, `serviceBindingsTableId`, `serviceBindingsTableName` ### `rls-module` @@ -3775,7 +3780,7 @@ CRUD operations for WebhookModule records. ### `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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. +Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/modules/cli/commands.ts b/sdk/constructive-cli/src/modules/cli/commands.ts index 3f3384e5d4..f036b3b1a9 100644 --- a/sdk/constructive-cli/src/modules/cli/commands.ts +++ b/sdk/constructive-cli/src/modules/cli/commands.ts @@ -200,7 +200,7 @@ const createCommandMap: () => Record< 'provision-bucket': provisionBucketCmd, }); 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 capabilities-module capabilitiesModule CRUD operations\n catalog-module catalogModule CRUD operations\n cluster-module clusterModule CRUD operations\n compute-log-module computeLogModule CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n content-preset-module contentPresetModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n data-capabilities-field dataCapabilitiesField 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 email-sender-module emailSenderModule CRUD operations\n emails-module emailsModule CRUD operations\n entity-type-provision entityTypeProvision CRUD operations\n events-module eventsModule CRUD operations\n file-ref-field fileRefField 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 i-18-n-module i18NModule CRUD operations\n identity-providers-module identityProvidersModule CRUD operations\n image-module imageModule 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-config-module internalConfigModule CRUD operations\n internal-secrets-module internalSecretsModule CRUD operations\n invites-module invitesModule CRUD operations\n k-8-s-admission-module k8sAdmissionModule CRUD operations\n limits-module limitsModule CRUD operations\n machine-module machineModule 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 oauth-requests-module oauthRequestsModule CRUD operations\n pages-module pagesModule 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 refusal-log-module refusalLogModule CRUD operations\n relation-provision relationProvision CRUD operations\n repository-module repositoryModule 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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row\'s recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record.\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 Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket\'s job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\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 capabilities-module capabilitiesModule CRUD operations\n catalog-module catalogModule CRUD operations\n cluster-module clusterModule CRUD operations\n compute-log-module computeLogModule CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n content-preset-module contentPresetModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n data-capabilities-field dataCapabilitiesField 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 email-sender-module emailSenderModule CRUD operations\n emails-module emailsModule CRUD operations\n entity-type-provision entityTypeProvision CRUD operations\n events-module eventsModule CRUD operations\n file-ref-field fileRefField 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 i-18-n-module i18NModule CRUD operations\n identity-providers-module identityProvidersModule CRUD operations\n image-module imageModule 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-config-module internalConfigModule CRUD operations\n internal-secrets-module internalSecretsModule CRUD operations\n invites-module invitesModule CRUD operations\n k-8-s-admission-module k8sAdmissionModule CRUD operations\n limits-module limitsModule CRUD operations\n machine-module machineModule 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 oauth-requests-module oauthRequestsModule CRUD operations\n pages-module pagesModule 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 refusal-log-module refusalLogModule CRUD operations\n relation-provision relationProvision CRUD operations\n repository-module repositoryModule 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 Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name.\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 Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\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/blueprint-construction.ts b/sdk/constructive-cli/src/modules/cli/commands/blueprint-construction.ts index 0a5f93fccd..fdb653770f 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/blueprint-construction.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/blueprint-construction.ts @@ -21,6 +21,7 @@ const fieldSchema: FieldSchema = { constructedDefinition: 'json', createdAt: 'string', databaseId: 'uuid', + error: 'json', id: 'uuid', schemaId: 'uuid', status: 'string', @@ -83,6 +84,7 @@ async function handleList(argv: Partial>, _prompter: Inq constructedDefinition: true, createdAt: true, databaseId: true, + error: true, id: true, schemaId: true, status: true, @@ -117,6 +119,7 @@ async function handleFindFirst(argv: Partial>, _prompter constructedDefinition: true, createdAt: true, databaseId: true, + error: true, id: true, schemaId: true, status: true, @@ -163,6 +166,7 @@ async function handleGet(argv: Partial>, prompter: Inqui constructedDefinition: true, createdAt: true, databaseId: true, + error: true, id: true, schemaId: true, status: true, @@ -209,6 +213,13 @@ async function handleCreate(argv: Partial>, prompter: In message: 'databaseId', required: true, }, + { + type: 'json', + name: 'error', + message: 'error', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'schemaId', @@ -244,6 +255,7 @@ async function handleCreate(argv: Partial>, prompter: In constructedAt: cleanedData.constructedAt, constructedDefinition: cleanedData.constructedDefinition, databaseId: cleanedData.databaseId, + error: cleanedData.error, schemaId: cleanedData.schemaId, status: cleanedData.status, tableMap: cleanedData.tableMap, @@ -254,6 +266,7 @@ async function handleCreate(argv: Partial>, prompter: In constructedDefinition: true, createdAt: true, databaseId: true, + error: true, id: true, schemaId: true, status: true, @@ -306,6 +319,13 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'databaseId', required: false, }, + { + type: 'json', + name: 'error', + message: 'error', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'schemaId', @@ -341,6 +361,7 @@ async function handleUpdate(argv: Partial>, prompter: In constructedAt: cleanedData.constructedAt, constructedDefinition: cleanedData.constructedDefinition, databaseId: cleanedData.databaseId, + error: cleanedData.error, schemaId: cleanedData.schemaId, status: cleanedData.status, tableMap: cleanedData.tableMap, @@ -351,6 +372,7 @@ async function handleUpdate(argv: Partial>, prompter: In constructedDefinition: true, createdAt: true, databaseId: true, + error: true, id: true, schemaId: true, status: true, diff --git a/sdk/constructive-cli/src/modules/cli/commands/construct-blueprint.ts b/sdk/constructive-cli/src/modules/cli/commands/construct-blueprint.ts index da487655b6..65bec14a7a 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/construct-blueprint.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/construct-blueprint.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - '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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row\'s recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record.\n\nUsage: construct-blueprint [OPTIONS]\n' + 'construct-blueprint - Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name.\n\nUsage: construct-blueprint [OPTIONS]\n' ); process.exit(0); } diff --git a/sdk/constructive-cli/src/modules/cli/commands/domain-module.ts b/sdk/constructive-cli/src/modules/cli/commands/domain-module.ts index 5b7d9e2ed3..316a21c2e3 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/domain-module.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/domain-module.ts @@ -20,6 +20,7 @@ const fieldSchema: FieldSchema = { catalogModuleId: 'uuid', databaseId: 'uuid', defaultCapabilities: 'string', + defaultReservedSubdomains: 'json', domainEventsTableId: 'uuid', domainEventsTableName: 'string', domainVerificationsTableId: 'uuid', @@ -38,8 +39,11 @@ const fieldSchema: FieldSchema = { privateSchemaName: 'string', provisions: 'json', publicSchemaName: 'string', + reservedSubdomainsTableId: 'uuid', + reservedSubdomainsTableName: 'string', schemaId: 'uuid', scope: 'string', + sweepUnverifiedDomainsFunction: 'string', }; const usage = '\ndomain-module \n\nCommands:\n list List domainModule records\n find-first Find first matching domainModule record\n get Get a domainModule by ID\n create Create a new domainModule\n update Update an existing domainModule\n delete Delete a domainModule\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'; @@ -96,6 +100,7 @@ async function handleList(argv: Partial>, _prompter: Inq catalogModuleId: true, databaseId: true, defaultCapabilities: true, + defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, @@ -114,8 +119,11 @@ async function handleList(argv: Partial>, _prompter: Inq privateSchemaName: true, provisions: true, publicSchemaName: true, + reservedSubdomainsTableId: true, + reservedSubdomainsTableName: true, schemaId: true, scope: true, + sweepUnverifiedDomainsFunction: true, }; const findManyArgs = parseFindManyArgs< FindManyArgs & { @@ -140,6 +148,7 @@ async function handleFindFirst(argv: Partial>, _prompter catalogModuleId: true, databaseId: true, defaultCapabilities: true, + defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, @@ -158,8 +167,11 @@ async function handleFindFirst(argv: Partial>, _prompter privateSchemaName: true, provisions: true, publicSchemaName: true, + reservedSubdomainsTableId: true, + reservedSubdomainsTableName: true, schemaId: true, scope: true, + sweepUnverifiedDomainsFunction: true, }; const findFirstArgs = parseFindFirstArgs< FindFirstArgs & { @@ -196,6 +208,7 @@ async function handleGet(argv: Partial>, prompter: Inqui catalogModuleId: true, databaseId: true, defaultCapabilities: true, + defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, @@ -214,8 +227,11 @@ async function handleGet(argv: Partial>, prompter: Inqui privateSchemaName: true, provisions: true, publicSchemaName: true, + reservedSubdomainsTableId: true, + reservedSubdomainsTableName: true, schemaId: true, scope: true, + sweepUnverifiedDomainsFunction: true, }, }) .execute(); @@ -258,6 +274,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'json', + name: 'defaultReservedSubdomains', + message: 'defaultReservedSubdomains', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'domainEventsTableId', @@ -377,6 +400,20 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'reservedSubdomainsTableId', + message: 'reservedSubdomainsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'reservedSubdomainsTableName', + message: 'reservedSubdomainsTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'schemaId', @@ -390,6 +427,13 @@ async function handleCreate(argv: Partial>, prompter: In message: 'scope', required: true, }, + { + type: 'text', + name: 'sweepUnverifiedDomainsFunction', + message: 'sweepUnverifiedDomainsFunction', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined( @@ -404,6 +448,7 @@ async function handleCreate(argv: Partial>, prompter: In catalogModuleId: cleanedData.catalogModuleId, databaseId: cleanedData.databaseId, defaultCapabilities: cleanedData.defaultCapabilities, + defaultReservedSubdomains: cleanedData.defaultReservedSubdomains, domainEventsTableId: cleanedData.domainEventsTableId, domainEventsTableName: cleanedData.domainEventsTableName, domainVerificationsTableId: cleanedData.domainVerificationsTableId, @@ -421,14 +466,18 @@ async function handleCreate(argv: Partial>, prompter: In privateSchemaName: cleanedData.privateSchemaName, provisions: cleanedData.provisions, publicSchemaName: cleanedData.publicSchemaName, + reservedSubdomainsTableId: cleanedData.reservedSubdomainsTableId, + reservedSubdomainsTableName: cleanedData.reservedSubdomainsTableName, schemaId: cleanedData.schemaId, scope: cleanedData.scope, + sweepUnverifiedDomainsFunction: cleanedData.sweepUnverifiedDomainsFunction, }, select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, + defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, @@ -447,8 +496,11 @@ async function handleCreate(argv: Partial>, prompter: In privateSchemaName: true, provisions: true, publicSchemaName: true, + reservedSubdomainsTableId: true, + reservedSubdomainsTableName: true, schemaId: true, scope: true, + sweepUnverifiedDomainsFunction: true, }, }) .execute(); @@ -497,6 +549,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'json', + name: 'defaultReservedSubdomains', + message: 'defaultReservedSubdomains', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'domainEventsTableId', @@ -616,6 +675,20 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'reservedSubdomainsTableId', + message: 'reservedSubdomainsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'reservedSubdomainsTableName', + message: 'reservedSubdomainsTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'schemaId', @@ -629,6 +702,13 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'scope', required: false, }, + { + type: 'text', + name: 'sweepUnverifiedDomainsFunction', + message: 'sweepUnverifiedDomainsFunction', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as DomainModulePatch; @@ -643,6 +723,7 @@ async function handleUpdate(argv: Partial>, prompter: In catalogModuleId: cleanedData.catalogModuleId, databaseId: cleanedData.databaseId, defaultCapabilities: cleanedData.defaultCapabilities, + defaultReservedSubdomains: cleanedData.defaultReservedSubdomains, domainEventsTableId: cleanedData.domainEventsTableId, domainEventsTableName: cleanedData.domainEventsTableName, domainVerificationsTableId: cleanedData.domainVerificationsTableId, @@ -660,14 +741,18 @@ async function handleUpdate(argv: Partial>, prompter: In privateSchemaName: cleanedData.privateSchemaName, provisions: cleanedData.provisions, publicSchemaName: cleanedData.publicSchemaName, + reservedSubdomainsTableId: cleanedData.reservedSubdomainsTableId, + reservedSubdomainsTableName: cleanedData.reservedSubdomainsTableName, schemaId: cleanedData.schemaId, scope: cleanedData.scope, + sweepUnverifiedDomainsFunction: cleanedData.sweepUnverifiedDomainsFunction, }, select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, + defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, @@ -686,8 +771,11 @@ async function handleUpdate(argv: Partial>, prompter: In privateSchemaName: true, provisions: true, publicSchemaName: true, + reservedSubdomainsTableId: true, + reservedSubdomainsTableName: true, schemaId: true, scope: true, + sweepUnverifiedDomainsFunction: true, }, }) .execute(); diff --git a/sdk/constructive-cli/src/modules/cli/commands/resource-module.ts b/sdk/constructive-cli/src/modules/cli/commands/resource-module.ts index 50621949a7..7466f15d8f 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/resource-module.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/resource-module.ts @@ -17,8 +17,6 @@ import type { import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; const fieldSchema: FieldSchema = { apiName: 'string', - builderBindingsTableId: 'uuid', - builderBindingsTableName: 'string', databaseId: 'uuid', defaultCapabilities: 'string', entityField: 'string', @@ -56,6 +54,8 @@ const fieldSchema: FieldSchema = { rollupResourceUsageSummaryFunction: 'string', schemaId: 'uuid', scope: 'string', + serviceBindingsTableId: 'uuid', + serviceBindingsTableName: 'string', }; const usage = '\nresource-module \n\nCommands:\n list List resourceModule records\n find-first Find first matching resourceModule record\n get Get a resourceModule by ID\n create Create a new resourceModule\n update Update an existing resourceModule\n delete Delete a resourceModule\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'; @@ -109,8 +109,6 @@ async function handleList(argv: Partial>, _prompter: Inq try { const defaultSelect = { apiName: true, - builderBindingsTableId: true, - builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, @@ -148,6 +146,8 @@ async function handleList(argv: Partial>, _prompter: Inq rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, + serviceBindingsTableId: true, + serviceBindingsTableName: true, }; const findManyArgs = parseFindManyArgs< FindManyArgs & { @@ -169,8 +169,6 @@ async function handleFindFirst(argv: Partial>, _prompter try { const defaultSelect = { apiName: true, - builderBindingsTableId: true, - builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, @@ -208,6 +206,8 @@ async function handleFindFirst(argv: Partial>, _prompter rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, + serviceBindingsTableId: true, + serviceBindingsTableName: true, }; const findFirstArgs = parseFindFirstArgs< FindFirstArgs & { @@ -241,8 +241,6 @@ async function handleGet(argv: Partial>, prompter: Inqui id: answers.id as string, select: { apiName: true, - builderBindingsTableId: true, - builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, @@ -280,6 +278,8 @@ async function handleGet(argv: Partial>, prompter: Inqui rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, + serviceBindingsTableId: true, + serviceBindingsTableName: true, }, }) .execute(); @@ -302,20 +302,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'builderBindingsTableId', - message: 'builderBindingsTableId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'builderBindingsTableName', - message: 'builderBindingsTableName', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'databaseId', @@ -566,6 +552,20 @@ async function handleCreate(argv: Partial>, prompter: In message: 'scope', required: true, }, + { + type: 'text', + name: 'serviceBindingsTableId', + message: 'serviceBindingsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'serviceBindingsTableName', + message: 'serviceBindingsTableName', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined( @@ -577,8 +577,6 @@ async function handleCreate(argv: Partial>, prompter: In .create({ data: { apiName: cleanedData.apiName, - builderBindingsTableId: cleanedData.builderBindingsTableId, - builderBindingsTableName: cleanedData.builderBindingsTableName, databaseId: cleanedData.databaseId, defaultCapabilities: cleanedData.defaultCapabilities, entityField: cleanedData.entityField, @@ -615,11 +613,11 @@ async function handleCreate(argv: Partial>, prompter: In rollupResourceUsageSummaryFunction: cleanedData.rollupResourceUsageSummaryFunction, schemaId: cleanedData.schemaId, scope: cleanedData.scope, + serviceBindingsTableId: cleanedData.serviceBindingsTableId, + serviceBindingsTableName: cleanedData.serviceBindingsTableName, }, select: { apiName: true, - builderBindingsTableId: true, - builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, @@ -657,6 +655,8 @@ async function handleCreate(argv: Partial>, prompter: In rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, + serviceBindingsTableId: true, + serviceBindingsTableName: true, }, }) .execute(); @@ -685,20 +685,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'builderBindingsTableId', - message: 'builderBindingsTableId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'builderBindingsTableName', - message: 'builderBindingsTableName', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'databaseId', @@ -949,6 +935,20 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'scope', required: false, }, + { + type: 'text', + name: 'serviceBindingsTableId', + message: 'serviceBindingsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'serviceBindingsTableName', + message: 'serviceBindingsTableName', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as ResourceModulePatch; @@ -960,8 +960,6 @@ async function handleUpdate(argv: Partial>, prompter: In }, data: { apiName: cleanedData.apiName, - builderBindingsTableId: cleanedData.builderBindingsTableId, - builderBindingsTableName: cleanedData.builderBindingsTableName, databaseId: cleanedData.databaseId, defaultCapabilities: cleanedData.defaultCapabilities, entityField: cleanedData.entityField, @@ -998,11 +996,11 @@ async function handleUpdate(argv: Partial>, prompter: In rollupResourceUsageSummaryFunction: cleanedData.rollupResourceUsageSummaryFunction, schemaId: cleanedData.schemaId, scope: cleanedData.scope, + serviceBindingsTableId: cleanedData.serviceBindingsTableId, + serviceBindingsTableName: cleanedData.serviceBindingsTableName, }, select: { apiName: true, - builderBindingsTableId: true, - builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, @@ -1040,6 +1038,8 @@ async function handleUpdate(argv: Partial>, prompter: In rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, + serviceBindingsTableId: true, + serviceBindingsTableName: true, }, }) .execute(); diff --git a/sdk/constructive-cli/src/modules/orm/README.md b/sdk/constructive-cli/src/modules/orm/README.md index 73e6574eaa..a40a540fb0 100644 --- a/sdk/constructive-cli/src/modules/orm/README.md +++ b/sdk/constructive-cli/src/modules/orm/README.md @@ -498,6 +498,7 @@ CRUD operations for BlueprintConstruction records. | `constructedDefinition` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | +| `error` | JSON | Yes | | `id` | UUID | No | | `schemaId` | UUID | Yes | | `status` | String | Yes | @@ -508,13 +509,13 @@ CRUD operations for BlueprintConstruction records. ```typescript // List all blueprintConstruction records -const items = await db.blueprintConstruction.findMany({ select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); +const items = await db.blueprintConstruction.findMany({ select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.blueprintConstruction.findOne({ id: '', select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); +const item = await db.blueprintConstruction.findOne({ id: '', select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); // Create -const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); +const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', error: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); // Update const updated = await db.blueprintConstruction.update({ where: { id: '' }, data: { blueprintId: '' }, select: { id: true } }).execute(); @@ -1396,6 +1397,7 @@ CRUD operations for DomainModule records. | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | | `defaultCapabilities` | String | Yes | +| `defaultReservedSubdomains` | JSON | Yes | | `domainEventsTableId` | UUID | Yes | | `domainEventsTableName` | String | Yes | | `domainVerificationsTableId` | UUID | Yes | @@ -1414,20 +1416,23 @@ CRUD operations for DomainModule records. | `privateSchemaName` | String | Yes | | `provisions` | JSON | Yes | | `publicSchemaName` | String | Yes | +| `reservedSubdomainsTableId` | UUID | Yes | +| `reservedSubdomainsTableName` | String | Yes | | `schemaId` | UUID | Yes | | `scope` | String | Yes | +| `sweepUnverifiedDomainsFunction` | String | Yes | **Operations:** ```typescript // List all domainModule records -const items = await db.domainModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.domainModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, reservedSubdomainsTableId: true, reservedSubdomainsTableName: true, schemaId: true, scope: true, sweepUnverifiedDomainsFunction: true } }).execute(); // Get one by id -const item = await db.domainModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.domainModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, reservedSubdomainsTableId: true, reservedSubdomainsTableName: true, schemaId: true, scope: true, sweepUnverifiedDomainsFunction: true } }).execute(); // Create -const created = await db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', defaultReservedSubdomains: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', reservedSubdomainsTableId: '', reservedSubdomainsTableName: '', schemaId: '', scope: '', sweepUnverifiedDomainsFunction: '' }, select: { id: true } }).execute(); // Update const updated = await db.domainModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -3435,8 +3440,6 @@ CRUD operations for ResourceModule records. | Field | Type | Editable | |-------|------|----------| | `apiName` | String | Yes | -| `builderBindingsTableId` | UUID | Yes | -| `builderBindingsTableName` | String | Yes | | `databaseId` | UUID | Yes | | `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | @@ -3474,18 +3477,20 @@ CRUD operations for ResourceModule records. | `rollupResourceUsageSummaryFunction` | String | Yes | | `schemaId` | UUID | Yes | | `scope` | String | Yes | +| `serviceBindingsTableId` | UUID | Yes | +| `serviceBindingsTableName` | String | Yes | **Operations:** ```typescript // List all resourceModule records -const items = await db.resourceModule.findMany({ select: { apiName: true, builderBindingsTableId: true, builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); +const items = await db.resourceModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, serviceBindingsTableId: true, serviceBindingsTableName: true } }).execute(); // Get one by id -const item = await db.resourceModule.findOne({ id: '', select: { apiName: true, builderBindingsTableId: true, builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); +const item = await db.resourceModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, serviceBindingsTableId: true, serviceBindingsTableName: true } }).execute(); // Create -const created = await db.resourceModule.create({ data: { apiName: '', builderBindingsTableId: '', builderBindingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.resourceModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '', serviceBindingsTableId: '', serviceBindingsTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.resourceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -4340,7 +4345,7 @@ const deleted = await db.webhookModule.delete({ where: { id: '' } }).execu ### `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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. +Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/modules/orm/input-types.ts b/sdk/constructive-cli/src/modules/orm/input-types.ts index ca44c2dad1..d4cde53664 100644 --- a/sdk/constructive-cli/src/modules/orm/input-types.ts +++ b/sdk/constructive-cli/src/modules/orm/input-types.ts @@ -461,7 +461,7 @@ export interface Blueprint { /** Timestamp when this blueprint was last modified. */ updatedAt?: string | null; } -/** Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. */ +/** Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. */ export interface BlueprintConstruction { /** The blueprint that was constructed. */ blueprintId?: string | null; @@ -473,11 +473,13 @@ export interface BlueprintConstruction { createdAt?: string | null; /** The database the blueprint was constructed into. */ databaseId?: string | null; + /** The coded error ({"code", "context", "class"} as raised through errors.raise_error, or {"code": , "message"} for a database error) a failed construction ended with. NULL unless status is failed. */ + error?: Record | null; /** Unique identifier for this construction attempt. */ id: string; /** The default schema used for tables that did not specify an explicit schema_name. NULL if not yet resolved. */ schemaId?: string | null; - /** Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. A failed construction raises and rolls back, so it leaves no row. */ + /** Execution state of this construction attempt. pending: enqueued, the blueprint:construct job has not started. constructing: the job is executing. constructed: successfully completed. failed: the job raised; the build rolled back and error carries its coded error. */ status?: string | null; /** Mapping of table names to created table UUIDs, populated after successful construction. Format: {"products": "uuid", "categories": "uuid", ...}. Defaults to empty object. */ tableMap?: Record | null; @@ -908,6 +910,7 @@ export interface DomainModule { catalogModuleId?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + defaultReservedSubdomains?: Record | null; domainEventsTableId?: string | null; domainEventsTableName?: string | null; domainVerificationsTableId?: string | null; @@ -926,8 +929,11 @@ export interface DomainModule { privateSchemaName?: string | null; provisions?: Record | null; publicSchemaName?: string | null; + reservedSubdomainsTableId?: string | null; + reservedSubdomainsTableName?: string | null; schemaId?: string | null; scope?: string | null; + sweepUnverifiedDomainsFunction?: string | null; } export interface EmailSenderModule { apiName?: string | null; @@ -2214,8 +2220,6 @@ export interface RepositoryModule { } export interface ResourceModule { apiName?: string | null; - builderBindingsTableId?: string | null; - builderBindingsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; entityField?: string | null; @@ -2253,6 +2257,8 @@ export interface ResourceModule { rollupResourceUsageSummaryFunction?: string | null; schemaId?: string | null; scope?: string | null; + serviceBindingsTableId?: string | null; + serviceBindingsTableName?: string | null; } export interface RlsModule { apiName?: string | null; @@ -3158,6 +3164,7 @@ export type BlueprintConstructionSelect = { constructedDefinition?: boolean; createdAt?: boolean; databaseId?: boolean; + error?: boolean; id?: boolean; schemaId?: boolean; status?: boolean; @@ -3599,6 +3606,7 @@ export type DomainModuleSelect = { catalogModuleId?: boolean; databaseId?: boolean; defaultCapabilities?: boolean; + defaultReservedSubdomains?: boolean; domainEventsTableId?: boolean; domainEventsTableName?: boolean; domainVerificationsTableId?: boolean; @@ -3617,8 +3625,11 @@ export type DomainModuleSelect = { privateSchemaName?: boolean; provisions?: boolean; publicSchemaName?: boolean; + reservedSubdomainsTableId?: boolean; + reservedSubdomainsTableName?: boolean; schemaId?: boolean; scope?: boolean; + sweepUnverifiedDomainsFunction?: boolean; catalogModule?: { select: CatalogModuleSelect; }; @@ -4666,8 +4677,6 @@ export type RepositoryModuleSelect = { }; export type ResourceModuleSelect = { apiName?: boolean; - builderBindingsTableId?: boolean; - builderBindingsTableName?: boolean; databaseId?: boolean; defaultCapabilities?: boolean; entityField?: boolean; @@ -4705,6 +4714,8 @@ export type ResourceModuleSelect = { rollupResourceUsageSummaryFunction?: boolean; schemaId?: boolean; scope?: boolean; + serviceBindingsTableId?: boolean; + serviceBindingsTableName?: boolean; merkleStoreModule?: { select: MerkleStoreModuleSelect; }; @@ -5589,6 +5600,8 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `error` field. */ + error?: JSONFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -6471,6 +6484,8 @@ export interface DomainModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ defaultCapabilities?: StringListFilter; + /** Filter by the object’s `defaultReservedSubdomains` field. */ + defaultReservedSubdomains?: JSONFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -6511,6 +6526,10 @@ export interface DomainModuleFilter { provisions?: JSONFilter; /** Filter by the object’s `publicSchemaName` field. */ publicSchemaName?: StringFilter; + /** Filter by the object’s `reservedSubdomainsTableId` field. */ + reservedSubdomainsTableId?: UUIDFilter; + /** Filter by the object’s `reservedSubdomainsTableName` field. */ + reservedSubdomainsTableName?: StringFilter; /** Filter by the object’s `routeModules` relation. */ routeModules?: DomainModuleToManyRouteModuleFilter; /** `routeModules` exist. */ @@ -6519,6 +6538,8 @@ export interface DomainModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `sweepUnverifiedDomainsFunction` field. */ + sweepUnverifiedDomainsFunction?: StringFilter; } export interface EmailSenderModuleFilter { /** Checks for all expressions in this list. */ @@ -8619,10 +8640,6 @@ export interface ResourceModuleFilter { and?: ResourceModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; - /** Filter by the object’s `builderBindingsTableId` field. */ - builderBindingsTableId?: UUIDFilter; - /** Filter by the object’s `builderBindingsTableName` field. */ - builderBindingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ @@ -8709,6 +8726,10 @@ export interface ResourceModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `serviceBindingsTableId` field. */ + serviceBindingsTableId?: UUIDFilter; + /** Filter by the object’s `serviceBindingsTableName` field. */ + serviceBindingsTableName?: StringFilter; } export interface RlsModuleFilter { /** Checks for all expressions in this list. */ @@ -9968,6 +9989,8 @@ export type BlueprintConstructionOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'ERROR_ASC' + | 'ERROR_DESC' | 'ID_ASC' | 'ID_DESC' | 'NATURAL' @@ -10724,6 +10747,8 @@ export type DomainModuleOrderBy = | 'DATABASE_ID_DESC' | 'DEFAULT_CAPABILITIES_ASC' | 'DEFAULT_CAPABILITIES_DESC' + | 'DEFAULT_RESERVED_SUBDOMAINS_ASC' + | 'DEFAULT_RESERVED_SUBDOMAINS_DESC' | 'DOMAINS_TABLE_ID_ASC' | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' @@ -10763,10 +10788,16 @@ export type DomainModuleOrderBy = | 'PROVISIONS_DESC' | 'PUBLIC_SCHEMA_NAME_ASC' | 'PUBLIC_SCHEMA_NAME_DESC' + | 'RESERVED_SUBDOMAINS_TABLE_ID_ASC' + | 'RESERVED_SUBDOMAINS_TABLE_ID_DESC' + | 'RESERVED_SUBDOMAINS_TABLE_NAME_ASC' + | 'RESERVED_SUBDOMAINS_TABLE_NAME_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' - | 'SCOPE_DESC'; + | 'SCOPE_DESC' + | 'SWEEP_UNVERIFIED_DOMAINS_FUNCTION_ASC' + | 'SWEEP_UNVERIFIED_DOMAINS_FUNCTION_DESC'; export type EmailSenderModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -12618,10 +12649,6 @@ export type RepositoryModuleOrderBy = export type ResourceModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' - | 'BUILDER_BINDINGS_TABLE_ID_ASC' - | 'BUILDER_BINDINGS_TABLE_ID_DESC' - | 'BUILDER_BINDINGS_TABLE_NAME_ASC' - | 'BUILDER_BINDINGS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'DEFAULT_CAPABILITIES_ASC' @@ -12698,7 +12725,11 @@ export type ResourceModuleOrderBy = | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' - | 'SCOPE_DESC'; + | 'SCOPE_DESC' + | 'SERVICE_BINDINGS_TABLE_ID_ASC' + | 'SERVICE_BINDINGS_TABLE_ID_DESC' + | 'SERVICE_BINDINGS_TABLE_NAME_ASC' + | 'SERVICE_BINDINGS_TABLE_NAME_DESC'; export type RlsModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -13893,6 +13924,7 @@ export interface CreateBlueprintConstructionInput { constructedAt?: string; constructedDefinition?: Record; databaseId: string; + error?: Record; schemaId?: string; status?: string; tableMap?: Record; @@ -13903,6 +13935,7 @@ export interface BlueprintConstructionPatch { constructedAt?: string | null; constructedDefinition?: Record | null; databaseId?: string | null; + error?: Record | null; schemaId?: string | null; status?: string | null; tableMap?: Record | null; @@ -14827,6 +14860,7 @@ export interface CreateDomainModuleInput { catalogModuleId?: string; databaseId: string; defaultCapabilities?: string[]; + defaultReservedSubdomains?: Record; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -14844,8 +14878,11 @@ export interface CreateDomainModuleInput { privateSchemaName?: string; provisions?: Record; publicSchemaName?: string; + reservedSubdomainsTableId?: string; + reservedSubdomainsTableName?: string; schemaId?: string; scope: string; + sweepUnverifiedDomainsFunction?: string; }; } export interface DomainModulePatch { @@ -14853,6 +14890,7 @@ export interface DomainModulePatch { catalogModuleId?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + defaultReservedSubdomains?: Record | null; domainEventsTableId?: string | null; domainEventsTableName?: string | null; domainVerificationsTableId?: string | null; @@ -14870,8 +14908,11 @@ export interface DomainModulePatch { privateSchemaName?: string | null; provisions?: Record | null; publicSchemaName?: string | null; + reservedSubdomainsTableId?: string | null; + reservedSubdomainsTableName?: string | null; schemaId?: string | null; scope?: string | null; + sweepUnverifiedDomainsFunction?: string | null; } export interface UpdateDomainModuleInput { clientMutationId?: string; @@ -17132,8 +17173,6 @@ export interface CreateResourceModuleInput { clientMutationId?: string; resourceModule: { apiName?: string; - builderBindingsTableId?: string; - builderBindingsTableName?: string; databaseId: string; defaultCapabilities?: string[]; entityField?: string; @@ -17170,12 +17209,12 @@ export interface CreateResourceModuleInput { rollupResourceUsageSummaryFunction?: string; schemaId?: string; scope: string; + serviceBindingsTableId?: string; + serviceBindingsTableName?: string; }; } export interface ResourceModulePatch { apiName?: string | null; - builderBindingsTableId?: string | null; - builderBindingsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; entityField?: string | null; @@ -17212,6 +17251,8 @@ export interface ResourceModulePatch { rollupResourceUsageSummaryFunction?: string | null; schemaId?: string | null; scope?: string | null; + serviceBindingsTableId?: string | null; + serviceBindingsTableName?: string | null; } export interface UpdateResourceModuleInput { clientMutationId?: string; @@ -18741,11 +18782,13 @@ export interface BlueprintConstructionInput { createdAt?: string; /** The database the blueprint was constructed into. */ databaseId: string; + /** The coded error ({"code", "context", "class"} as raised through errors.raise_error, or {"code": , "message"} for a database error) a failed construction ended with. NULL unless status is failed. */ + error?: Record; /** Unique identifier for this construction attempt. */ id?: string; /** The default schema used for tables that did not specify an explicit schema_name. NULL if not yet resolved. */ schemaId?: string; - /** Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. A failed construction raises and rolls back, so it leaves no row. */ + /** Execution state of this construction attempt. pending: enqueued, the blueprint:construct job has not started. constructing: the job is executing. constructed: successfully completed. failed: the job raised; the build rolled back and error carries its coded error. */ status?: string; /** Mapping of table names to created table UUIDs, populated after successful construction. Format: {"products": "uuid", "categories": "uuid", ...}. Defaults to empty object. */ tableMap?: Record; @@ -19211,6 +19254,7 @@ export interface DomainModuleInput { catalogModuleId?: string; databaseId: string; defaultCapabilities?: string[]; + defaultReservedSubdomains?: Record; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -19229,8 +19273,11 @@ export interface DomainModuleInput { privateSchemaName?: string; provisions?: Record; publicSchemaName?: string; + reservedSubdomainsTableId?: string; + reservedSubdomainsTableName?: string; schemaId?: string; scope: string; + sweepUnverifiedDomainsFunction?: string; } /** An input for mutations affecting `EmailSenderModule` */ export interface EmailSenderModuleInput { @@ -20507,8 +20554,6 @@ export interface RepositoryModuleInput { /** An input for mutations affecting `ResourceModule` */ export interface ResourceModuleInput { apiName?: string; - builderBindingsTableId?: string; - builderBindingsTableName?: string; databaseId: string; defaultCapabilities?: string[]; entityField?: string; @@ -20546,6 +20591,8 @@ export interface ResourceModuleInput { rollupResourceUsageSummaryFunction?: string; schemaId?: string; scope: string; + serviceBindingsTableId?: string; + serviceBindingsTableName?: string; } /** An input for mutations affecting `RlsModule` */ export interface RlsModuleInput { @@ -20945,6 +20992,8 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `error` field. */ + error?: JSONFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -21223,6 +21272,8 @@ export interface DomainModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ defaultCapabilities?: StringListFilter; + /** Filter by the object’s `defaultReservedSubdomains` field. */ + defaultReservedSubdomains?: JSONFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -21263,6 +21314,10 @@ export interface DomainModuleFilter { provisions?: JSONFilter; /** Filter by the object’s `publicSchemaName` field. */ publicSchemaName?: StringFilter; + /** Filter by the object’s `reservedSubdomainsTableId` field. */ + reservedSubdomainsTableId?: UUIDFilter; + /** Filter by the object’s `reservedSubdomainsTableName` field. */ + reservedSubdomainsTableName?: StringFilter; /** Filter by the object’s `routeModules` relation. */ routeModules?: DomainModuleToManyRouteModuleFilter; /** `routeModules` exist. */ @@ -21271,6 +21326,8 @@ export interface DomainModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `sweepUnverifiedDomainsFunction` field. */ + sweepUnverifiedDomainsFunction?: StringFilter; } /** A filter to be used against `RouteModule` object types. All fields are combined with a logical ‘and.’ */ export interface RouteModuleFilter { @@ -21884,10 +21941,6 @@ export interface ResourceModuleFilter { and?: ResourceModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; - /** Filter by the object’s `builderBindingsTableId` field. */ - builderBindingsTableId?: UUIDFilter; - /** Filter by the object’s `builderBindingsTableName` field. */ - builderBindingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ @@ -21974,6 +22027,10 @@ export interface ResourceModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `serviceBindingsTableId` field. */ + serviceBindingsTableId?: UUIDFilter; + /** Filter by the object’s `serviceBindingsTableName` field. */ + serviceBindingsTableName?: StringFilter; } /** A filter to be used against `EmailSenderModule` object types. All fields are combined with a logical ‘and.’ */ export interface EmailSenderModuleFilter { diff --git a/sdk/constructive-cli/src/modules/orm/mutation/index.ts b/sdk/constructive-cli/src/modules/orm/mutation/index.ts index e59de99a2e..26ad9b2410 100644 --- a/sdk/constructive-cli/src/modules/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/modules/orm/mutation/index.ts @@ -20,7 +20,7 @@ import type { import { connectionFieldsMap } from '../input-types'; /** * Variables for 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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. + * Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. */ export interface ConstructBlueprintVariables { input: ConstructBlueprintInput; diff --git a/sdk/constructive-cli/src/remote/README.md b/sdk/constructive-cli/src/remote/README.md index 9dd2d4d9cb..2e22b6aba1 100644 --- a/sdk/constructive-cli/src/remote/README.md +++ b/sdk/constructive-cli/src/remote/README.md @@ -9,7 +9,7 @@ ## Overview - **Tables:** 3 -- **Custom queries:** 0 +- **Custom queries:** 1 - **Custom mutations:** 2 **Generators:** ORM, CLI diff --git a/sdk/constructive-cli/src/remote/cli/README.md b/sdk/constructive-cli/src/remote/cli/README.md index afc3f9beff..060838bb45 100644 --- a/sdk/constructive-cli/src/remote/cli/README.md +++ b/sdk/constructive-cli/src/remote/cli/README.md @@ -29,6 +29,7 @@ csdk auth set-token | `machine` | machine CRUD operations | | `machine-message` | machineMessage CRUD operations | | `machine-session` | machineSession CRUD operations | +| `current-database-id` | currentDatabaseId | | `machines-enroll` | machinesEnroll | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. Records the request on the bucket row via RLS; the bucket's job @@ -199,6 +200,13 @@ CRUD operations for MachineSession records. ## Custom Operations +### `current-database-id` + +currentDatabaseId + +- **Type:** query +- **Arguments:** none + ### `machines-enroll` machinesEnroll diff --git a/sdk/constructive-cli/src/remote/cli/commands.ts b/sdk/constructive-cli/src/remote/cli/commands.ts index e51b43e0e5..05b8a47c5b 100644 --- a/sdk/constructive-cli/src/remote/cli/commands.ts +++ b/sdk/constructive-cli/src/remote/cli/commands.ts @@ -9,6 +9,7 @@ import authCmd from './commands/auth'; import machineCmd from './commands/machine'; import machineMessageCmd from './commands/machine-message'; import machineSessionCmd from './commands/machine-session'; +import currentDatabaseIdCmd from './commands/current-database-id'; import machinesEnrollCmd from './commands/machines-enroll'; import provisionBucketCmd from './commands/provision-bucket'; const createCommandMap: () => Record< @@ -24,11 +25,12 @@ const createCommandMap: () => Record< machine: machineCmd, 'machine-message': machineMessageCmd, 'machine-session': machineSessionCmd, + 'current-database-id': currentDatabaseIdCmd, 'machines-enroll': machinesEnrollCmd, 'provision-bucket': provisionBucketCmd, }); const usage = - "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n machine machine CRUD operations\n machine-message machineMessage CRUD operations\n machine-session machineSession CRUD operations\n machines-enroll machinesEnroll\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\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 machine machine CRUD operations\n machine-message machineMessage CRUD operations\n machine-session machineSession CRUD operations\n current-database-id currentDatabaseId\n machines-enroll machinesEnroll\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\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/resolve-site-app-links.ts b/sdk/constructive-cli/src/remote/cli/commands/current-database-id.ts similarity index 52% rename from sdk/constructive-cli/src/api/cli/commands/resolve-site-app-links.ts rename to sdk/constructive-cli/src/remote/cli/commands/current-database-id.ts index 5a08de23a1..674a964532 100644 --- a/sdk/constructive-cli/src/api/cli/commands/resolve-site-app-links.ts +++ b/sdk/constructive-cli/src/remote/cli/commands/current-database-id.ts @@ -1,11 +1,10 @@ /** - * CLI command for query resolveSiteAppLinks + * CLI command for query currentDatabaseId * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { CLIOptions, Inquirerer } from 'inquirerer'; import { getClient } from '../executor'; -import type { ResolveSiteAppLinksVariables } from '../../orm/query'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -14,24 +13,15 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'resolve-site-app-links - resolveSiteAppLinks\n\nUsage: resolve-site-app-links [OPTIONS]\n' + 'current-database-id - currentDatabaseId\n\nUsage: current-database-id [OPTIONS]\n' ); process.exit(0); } - const answers = await prompter.prompt(argv, [ - { - type: 'text', - name: 'targetSiteId', - message: 'targetSiteId', - }, - ]); const client = getClient(); - const result = await client.query - .resolveSiteAppLinks(answers as unknown as ResolveSiteAppLinksVariables) - .execute(); + const result = await client.query.currentDatabaseId().execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { - console.error('Failed: resolveSiteAppLinks'); + console.error('Failed: currentDatabaseId'); if (error instanceof Error) { console.error(error.message); } diff --git a/sdk/constructive-cli/src/remote/orm/README.md b/sdk/constructive-cli/src/remote/orm/README.md index eb2fdd09aa..b76819b71e 100644 --- a/sdk/constructive-cli/src/remote/orm/README.md +++ b/sdk/constructive-cli/src/remote/orm/README.md @@ -169,6 +169,17 @@ const deleted = await db.machineSession.delete({ where: { id: '' } }).exec ## Custom Operations +### `db.query.currentDatabaseId` + +currentDatabaseId + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.currentDatabaseId().execute(); +``` + ### `db.mutation.machinesEnroll` machinesEnroll diff --git a/sdk/constructive-cli/src/remote/orm/index.ts b/sdk/constructive-cli/src/remote/orm/index.ts index e166dd236a..554ce59ad1 100644 --- a/sdk/constructive-cli/src/remote/orm/index.ts +++ b/sdk/constructive-cli/src/remote/orm/index.ts @@ -8,12 +8,14 @@ import type { OrmClientConfig } from './client'; import { MachineModel } from './models/machine'; import { MachineMessageModel } from './models/machineMessage'; import { MachineSessionModel } from './models/machineSession'; +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 @@ -44,6 +46,7 @@ export function createClient(config: OrmClientConfig) { machine: new MachineModel(client), machineMessage: new MachineMessageModel(client), machineSession: new MachineSessionModel(client), + query: createQueryOperations(client), mutation: createMutationOperations(client), }; } diff --git a/sdk/constructive-cli/src/remote/orm/query/index.ts b/sdk/constructive-cli/src/remote/orm/query/index.ts new file mode 100644 index 0000000000..901e0de080 --- /dev/null +++ b/sdk/constructive-cli/src/remote/orm/query/index.ts @@ -0,0 +1,32 @@ +/** + * 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'; +export function createQueryOperations(client: OrmClient) { + return { + currentDatabaseId: (options?: { select?: Record }) => + new QueryBuilder<{ + currentDatabaseId: string | null; + }>({ + client, + operation: 'query', + operationName: 'CurrentDatabaseId', + fieldName: 'currentDatabaseId', + ...buildCustomDocument( + 'query', + 'CurrentDatabaseId', + 'currentDatabaseId', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), + }; +} diff --git a/sdk/constructive-react/src/admin/schema-types.ts b/sdk/constructive-react/src/admin/schema-types.ts index eb45142cdc..89db6fe587 100644 --- a/sdk/constructive-react/src/admin/schema-types.ts +++ b/sdk/constructive-react/src/admin/schema-types.ts @@ -3351,19 +3351,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -3588,6 +3590,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -3597,6 +3601,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -3610,7 +3620,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -3625,7 +3635,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -3653,7 +3663,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -3668,13 +3678,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -3692,17 +3702,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -3775,7 +3785,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -3786,7 +3796,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -3804,10 +3814,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-react/src/agent/schema-types.ts b/sdk/constructive-react/src/agent/schema-types.ts index 11db8cff08..a4cbb56d62 100644 --- a/sdk/constructive-react/src/agent/schema-types.ts +++ b/sdk/constructive-react/src/agent/schema-types.ts @@ -4757,19 +4757,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -4942,6 +4944,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -4951,6 +4955,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -4964,7 +4974,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -4979,7 +4989,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -5007,7 +5017,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -5022,13 +5032,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -5046,17 +5056,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -5129,7 +5139,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -5140,7 +5150,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -5158,10 +5168,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-react/src/api/README.md b/sdk/constructive-react/src/api/README.md index ed648007ba..d6c36d8b27 100644 --- a/sdk/constructive-react/src/api/README.md +++ b/sdk/constructive-react/src/api/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 90 -- **Custom queries:** 18 -- **Custom mutations:** 31 +- **Tables:** 91 +- **Custom queries:** 14 +- **Custom mutations:** 29 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/api/hooks/README.md b/sdk/constructive-react/src/api/hooks/README.md index b723c91d0a..a4563c8b95 100644 --- a/sdk/constructive-react/src/api/hooks/README.md +++ b/sdk/constructive-react/src/api/hooks/README.md @@ -271,6 +271,11 @@ function App() { | `useCreatePlatformPageMutation` | Mutation | Site-owned page content — merkle-versioned head over the infra store; never a routing surface | | `useUpdatePlatformPageMutation` | Mutation | Site-owned page content — merkle-versioned head over the infra store; never a routing surface | | `useDeletePlatformPageMutation` | Mutation | Site-owned page content — merkle-versioned head over the infra store; never a routing surface | +| `usePlatformReservedSubdomainsQuery` | Query | Subdomain labels no tenant may claim under a platform apex | +| `usePlatformReservedSubdomainQuery` | Query | Subdomain labels no tenant may claim under a platform apex | +| `useCreatePlatformReservedSubdomainMutation` | Mutation | Subdomain labels no tenant may claim under a platform apex | +| `useUpdatePlatformReservedSubdomainMutation` | Mutation | Subdomain labels no tenant may claim under a platform apex | +| `useDeletePlatformReservedSubdomainMutation` | Mutation | Subdomain labels no tenant may claim under a platform apex | | `usePlatformSiteAppLinksQuery` | Query | Per-host native-app association for a site surface: which app-owned store identity this host serves, and the path patterns it claims (joined with the store identity to render AASA / assetlinks.json) | | `usePlatformSiteAppLinkQuery` | Query | Per-host native-app association for a site surface: which app-owned store identity this host serves, and the path patterns it claims (joined with the store identity to render AASA / assetlinks.json) | | `useCreatePlatformSiteAppLinkMutation` | Mutation | Per-host native-app association for a site surface: which app-owned store identity this host serves, and the path patterns it claims (joined with the store identity to render AASA / assetlinks.json) | @@ -476,7 +481,6 @@ function App() { | `useCreateWebauthnSettingMutation` | Mutation | WebAuthn/passkey runtime configuration; relying party options and typed references to the credential/session storage | | `useUpdateWebauthnSettingMutation` | Mutation | WebAuthn/passkey runtime configuration; relying party options and typed references to the credential/session storage | | `useDeleteWebauthnSettingMutation` | Mutation | WebAuthn/passkey runtime configuration; relying party options and typed references to the credential/session storage | -| `useApiSchemaNamesQuery` | Query | apiSchemaNames | | `useApplyRegistryDefaultsQuery` | Query | applyRegistryDefaults | | `useEmailSharedAccountQuery` | Query | emailSharedAccount | | `useGetSitePreviewCommitQuery` | Query | getSitePreviewCommit | @@ -488,16 +492,12 @@ function App() { | `usePlatformSitesDeepLinkUrlQuery` | Query | platformSitesDeepLinkUrl | | `usePlatformSitesSiteOriginQuery` | Query | platformSitesSiteOrigin | | `usePlatformVerifySitePreviewTokenQuery` | Query | platformVerifySitePreviewToken | -| `useResolveDeepLinkQuery` | Query | resolveDeepLink | -| `useResolveRouteQuery` | Query | resolveRoute | -| `useResolveSiteAppLinksQuery` | Query | resolveSiteAppLinks | | `useSitesDeepLinkUrlQuery` | Query | sitesDeepLinkUrl | | `useSitesSiteOriginQuery` | Query | sitesSiteOrigin | | `useVerifySitePreviewTokenQuery` | Query | verifySitePreviewToken | | `useAcceptDatabaseTransferMutation` | Mutation | acceptDatabaseTransfer | | `useApplyRlsMutation` | Mutation | applyRls | | `useCancelDatabaseTransferMutation` | Mutation | cancelDatabaseTransfer | -| `useCreateFunctionFromSourceMutation` | Mutation | Creates a `Function` from its `CREATE FUNCTION` source text. | | `useDeleteSitePreviewMutation` | Mutation | deleteSitePreview | | `useDomainsAssignSubdomainMutation` | Mutation | domainsAssignSubdomain | | `useMintSitePreviewTokenMutation` | Mutation | mintSitePreviewToken | @@ -536,7 +536,6 @@ Example usage: | `useSitesProvisionStaticSiteMutation` | Mutation | sitesProvisionStaticSite | | `useSuspendDatabaseMutation` | Mutation | suspendDatabase | | `useUnsuspendDatabaseMutation` | Mutation | unsuspendDatabase | -| `useUpdateFunctionFromSourceMutation` | Mutation | Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. | ## Table Hooks @@ -545,20 +544,20 @@ Example usage: ```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 } }, + selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: 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 } }, + selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: 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: '' }); +create({ anonRole: '', config: '', databaseId: '', isPublished: '', name: '', roleName: '' }); ``` ### ApiSchema @@ -1295,20 +1294,20 @@ create({ databaseId: '', interval: '', isParented: '', na ```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 } }, + selection: { fields: { anonRole: true, config: true, createdAt: 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 } }, + selection: { fields: { anonRole: true, config: true, createdAt: 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: '' }); +create({ anonRole: '', config: '', isPublished: '', name: '', roleName: '' }); ``` ### PlatformApiSchema @@ -1557,6 +1556,27 @@ const { mutate: create } = useCreatePlatformPageMutation({ create({ commitId: '', content: '', seededFrom: '', siteId: '', slug: '', storeId: '' }); ``` +### PlatformReservedSubdomain + +```typescript +// List all platformReservedSubdomains +const { data, isLoading } = usePlatformReservedSubdomainsQuery({ + selection: { fields: { createdAt: true, createdByPrincipal: true, id: true, label: true, match: true, reason: true, updatedAt: true, updatedByPrincipal: true } }, +}); + +// Get one platformReservedSubdomain +const { data: item } = usePlatformReservedSubdomainQuery({ + id: '', + selection: { fields: { createdAt: true, createdByPrincipal: true, id: true, label: true, match: true, reason: true, updatedAt: true, updatedByPrincipal: true } }, +}); + +// Create a platformReservedSubdomain +const { mutate: create } = useCreatePlatformReservedSubdomainMutation({ + selection: { fields: { id: true } }, +}); +create({ createdByPrincipal: '', label: '', match: '', reason: '', updatedByPrincipal: '' }); +``` + ### PlatformSiteAppLink ```typescript @@ -2420,17 +2440,6 @@ create({ attestationType: '', challengeExpirySeconds: '', creden ## Custom Operation Hooks -### `useApiSchemaNamesQuery` - -apiSchemaNames - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `targetApiId` | UUID | - ### `useApplyRegistryDefaultsQuery` applyRegistryDefaults @@ -2557,42 +2566,6 @@ platformVerifySitePreviewToken | `siteId` | UUID | | `token` | String | -### `useResolveDeepLinkQuery` - -resolveDeepLink - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `linkSlug` | String | - | `targetSiteId` | UUID | - -### `useResolveRouteQuery` - -resolveRoute - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `requestHost` | String | - | `requestMethod` | String | - | `requestPath` | String | - -### `useResolveSiteAppLinksQuery` - -resolveSiteAppLinks - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `targetSiteId` | UUID | - ### `useSitesDeepLinkUrlQuery` sitesDeepLinkUrl @@ -2661,17 +2634,6 @@ cancelDatabaseTransfer |----------|------| | `input` | CancelDatabaseTransferInput (required) | -### `useCreateFunctionFromSourceMutation` - -Creates a `Function` from its `CREATE FUNCTION` source text. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | CreateFunctionFromSourceInput (required) | - ### `useDeleteSitePreviewMutation` deleteSitePreview @@ -2969,14 +2931,3 @@ unsuspendDatabase | Argument | Type | |----------|------| | `input` | UnsuspendDatabaseInput (required) | - -### `useUpdateFunctionFromSourceMutation` - -Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | UpdateFunctionFromSourceInput (required) | diff --git a/sdk/constructive-react/src/api/hooks/index.ts b/sdk/constructive-react/src/api/hooks/index.ts index e69ef19c9e..71e1007a30 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: Api, ApiSchema, ApiSetting, AstMigration, CheckConstraint, CompositeType, CorsSetting, Database, DatabaseSetting, DatabaseTransfer, DefaultPrivilege, Derive, Domain, DomainEvent, DomainType, DomainVerification, EmailIdentity, EmailProviderAccount, EmailSiteIdentity, EmbeddingChunk, Enum, ExclusionConstraint, FieldBehavior, Field, ForeignKeyConstraintBehavior, ForeignKeyConstraint, FullTextSearch, Function, GetSitePreviewsRecord, IdentityProviderRegistry, Index, ListSuspendedDatabasesRecord, ManagedDomain, NodeTypeRegistry, Page, Partition, PlatformApi, PlatformApiSchema, PlatformApiSetting, PlatformCorsSetting, PlatformDomain, PlatformDomainEvent, PlatformDomainVerification, PlatformEmailIdentity, PlatformEmailProviderAccount, PlatformEmailSiteIdentity, PlatformGetSitePreviewsRecord, PlatformManagedDomain, PlatformPage, PlatformSiteAppLink, PlatformSite, PlatformSiteDeepLink, PlatformSiteErrorPage, PlatformSiteMetadatum, PlatformSiteModule, PlatformSiteRelease, PlatformSiteTheme, PlatformSiteWebConfig, Policy, PrimaryKeyConstraint, PubkeySetting, Redirect, RlsSetting, Route, Schema, SchemaGrant, SiteAppLink, Site, SiteDeepLink, SiteErrorPage, SiteMetadatum, SiteModule, SiteRelease, 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, EmailIdentity, EmailProviderAccount, EmailSiteIdentity, EmbeddingChunk, Enum, ExclusionConstraint, FieldBehavior, Field, ForeignKeyConstraintBehavior, ForeignKeyConstraint, FullTextSearch, Function, GetSitePreviewsRecord, IdentityProviderRegistry, Index, ListSuspendedDatabasesRecord, ManagedDomain, NodeTypeRegistry, Page, Partition, PlatformApi, PlatformApiSchema, PlatformApiSetting, PlatformCorsSetting, PlatformDomain, PlatformDomainEvent, PlatformDomainVerification, PlatformEmailIdentity, PlatformEmailProviderAccount, PlatformEmailSiteIdentity, PlatformGetSitePreviewsRecord, PlatformManagedDomain, PlatformPage, PlatformReservedSubdomain, PlatformSiteAppLink, PlatformSite, PlatformSiteDeepLink, PlatformSiteErrorPage, PlatformSiteMetadatum, PlatformSiteModule, PlatformSiteRelease, PlatformSiteTheme, PlatformSiteWebConfig, Policy, PrimaryKeyConstraint, PubkeySetting, Redirect, RlsSetting, Route, Schema, SchemaGrant, SiteAppLink, Site, SiteDeepLink, SiteErrorPage, SiteMetadatum, SiteModule, SiteRelease, 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 64a35bc6ca..37608f665a 100644 --- a/sdk/constructive-react/src/api/hooks/invalidation.ts +++ b/sdk/constructive-react/src/api/hooks/invalidation.ts @@ -64,6 +64,7 @@ import { platformGetSitePreviewsRecordKeys, platformManagedDomainKeys, platformPageKeys, + platformReservedSubdomainKeys, platformSiteAppLinkKeys, platformSiteKeys, platformSiteDeepLinkKeys, @@ -934,6 +935,23 @@ export const invalidate = { queryKey: platformPageKeys.detail(id), }), }, + /** Invalidate platformReservedSubdomain queries */ platformReservedSubdomain: { + /** Invalidate all platformReservedSubdomain queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformReservedSubdomainKeys.all, + }), + /** Invalidate platformReservedSubdomain list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformReservedSubdomainKeys.lists(), + }), + /** Invalidate a specific platformReservedSubdomain */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: platformReservedSubdomainKeys.detail(id), + }), + }, /** Invalidate platformSiteAppLink queries */ platformSiteAppLink: { /** Invalidate all platformSiteAppLink queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1976,6 +1994,14 @@ export const remove = { queryKey: platformPageKeys.detail(id), }); }, + /** Remove platformReservedSubdomain from cache */ platformReservedSubdomain: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: platformReservedSubdomainKeys.detail(id), + }); + }, /** Remove platformSiteAppLink from cache */ platformSiteAppLink: ( queryClient: QueryClient, id: string | number diff --git a/sdk/constructive-react/src/api/hooks/mutation-keys.ts b/sdk/constructive-react/src/api/hooks/mutation-keys.ts index 8f71c0e390..b0027ad8d9 100644 --- a/sdk/constructive-react/src/api/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/api/hooks/mutation-keys.ts @@ -476,6 +476,18 @@ export const platformPageMutationKeys = { /** Delete platformPage mutation key */ delete: (id: string | number) => ['mutation', 'platformpage', 'delete', id] as const, } as const; +export const platformReservedSubdomainMutationKeys = { + /** All platformReservedSubdomain mutation keys */ all: [ + 'mutation', + 'platformreservedsubdomain', + ] as const, + /** Create platformReservedSubdomain mutation key */ create: () => + ['mutation', 'platformreservedsubdomain', 'create'] as const, + /** Update platformReservedSubdomain mutation key */ update: (id: string | number) => + ['mutation', 'platformreservedsubdomain', 'update', id] as const, + /** Delete platformReservedSubdomain mutation key */ delete: (id: string | number) => + ['mutation', 'platformreservedsubdomain', 'delete', id] as const, +} as const; export const platformSiteAppLinkMutationKeys = { /** All platformSiteAppLink mutation keys */ all: ['mutation', 'platformsiteapplink'] as const, /** Create platformSiteAppLink mutation key */ create: () => @@ -859,12 +871,6 @@ export const customMutationKeys = { identifier ? (['mutation', 'cancelDatabaseTransfer', identifier] as const) : (['mutation', 'cancelDatabaseTransfer'] as const), - /** Mutation key for createFunctionFromSource */ createFunctionFromSource: ( - identifier?: string - ) => - identifier - ? (['mutation', 'createFunctionFromSource', identifier] as const) - : (['mutation', 'createFunctionFromSource'] as const), /** Mutation key for deleteSitePreview */ deleteSitePreview: (identifier?: string) => identifier ? (['mutation', 'deleteSitePreview', identifier] as const) @@ -993,12 +999,6 @@ export const customMutationKeys = { identifier ? (['mutation', 'unsuspendDatabase', identifier] as const) : (['mutation', 'unsuspendDatabase'] as const), - /** Mutation key for updateFunctionFromSource */ updateFunctionFromSource: ( - identifier?: string - ) => - identifier - ? (['mutation', 'updateFunctionFromSource', identifier] as const) - : (['mutation', 'updateFunctionFromSource'] as const), } as const; /** @@ -1072,6 +1072,7 @@ export const mutationKeys = { platformGetSitePreviewsRecord: platformGetSitePreviewsRecordMutationKeys, platformManagedDomain: platformManagedDomainMutationKeys, platformPage: platformPageMutationKeys, + platformReservedSubdomain: platformReservedSubdomainMutationKeys, platformSiteAppLink: platformSiteAppLinkMutationKeys, platformSite: platformSiteMutationKeys, platformSiteDeepLink: platformSiteDeepLinkMutationKeys, diff --git a/sdk/constructive-react/src/api/hooks/mutations/index.ts b/sdk/constructive-react/src/api/hooks/mutations/index.ts index 213cbbadd2..3ae311095e 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/index.ts @@ -142,6 +142,9 @@ export * from './useDeletePlatformManagedDomainMutation'; export * from './useCreatePlatformPageMutation'; export * from './useUpdatePlatformPageMutation'; export * from './useDeletePlatformPageMutation'; +export * from './useCreatePlatformReservedSubdomainMutation'; +export * from './useUpdatePlatformReservedSubdomainMutation'; +export * from './useDeletePlatformReservedSubdomainMutation'; export * from './useCreatePlatformSiteAppLinkMutation'; export * from './useUpdatePlatformSiteAppLinkMutation'; export * from './useDeletePlatformSiteAppLinkMutation'; @@ -266,7 +269,6 @@ export * from './useDeleteWebauthnSettingMutation'; export * from './useAcceptDatabaseTransferMutation'; export * from './useApplyRlsMutation'; export * from './useCancelDatabaseTransferMutation'; -export * from './useCreateFunctionFromSourceMutation'; export * from './useDeleteSitePreviewMutation'; export * from './useDomainsAssignSubdomainMutation'; export * from './useMintSitePreviewTokenMutation'; @@ -293,4 +295,3 @@ export * from './useSitesInstallMantraMutation'; export * from './useSitesProvisionStaticSiteMutation'; export * from './useSuspendDatabaseMutation'; export * from './useUnsuspendDatabaseMutation'; -export * from './useUpdateFunctionFromSourceMutation'; diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreateFunctionFromSourceMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateFunctionFromSourceMutation.ts deleted file mode 100644 index 10c785d907..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useCreateFunctionFromSourceMutation.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Custom mutation hook for createFunctionFromSource - * @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 { CreateFunctionFromSourceVariables } from '../../orm/mutation'; -import type { CreateFunctionPayloadSelect, CreateFunctionPayload } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { CreateFunctionFromSourceVariables } from '../../orm/mutation'; -export type { CreateFunctionPayloadSelect } from '../../orm/input-types'; -export function useCreateFunctionFromSourceMutation( - params: { - selection: { - fields: S & CreateFunctionPayloadSelect; - } & HookStrictSelect, CreateFunctionPayloadSelect>; - } & Omit< - UseMutationOptions< - { - createFunctionFromSource: InferSelectResult | null; - }, - Error, - CreateFunctionFromSourceVariables - >, - 'mutationFn' - > -): UseMutationResult< - { - createFunctionFromSource: InferSelectResult | null; - }, - Error, - CreateFunctionFromSourceVariables -> { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - return useMutation({ - mutationKey: customMutationKeys.createFunctionFromSource(), - mutationFn: (variables: CreateFunctionFromSourceVariables) => - getClient() - .mutation.createFunctionFromSource(variables, { - select: args.select, - } as { - select: S; - } & StrictSelect) - .unwrap(), - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformReservedSubdomainMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformReservedSubdomainMutation.ts new file mode 100644 index 0000000000..0f4e41e3bc --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformReservedSubdomainMutation.ts @@ -0,0 +1,97 @@ +/** + * Subdomain labels no tenant may claim under a platform apex + * @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 { platformReservedSubdomainKeys } from '../query-keys'; +import { platformReservedSubdomainMutationKeys } from '../mutation-keys'; +import type { + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainWithRelations, + CreatePlatformReservedSubdomainInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainWithRelations, + CreatePlatformReservedSubdomainInput, +} from '../../orm/input-types'; +/** + * Subdomain labels no tenant may claim under a platform apex + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlatformReservedSubdomainMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlatformReservedSubdomainMutation< + S extends PlatformReservedSubdomainSelect, +>( + params: { + selection: { + fields: S & PlatformReservedSubdomainSelect; + } & HookStrictSelect, PlatformReservedSubdomainSelect>; + } & Omit< + UseMutationOptions< + { + createPlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }, + Error, + CreatePlatformReservedSubdomainInput['platformReservedSubdomain'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }, + Error, + CreatePlatformReservedSubdomainInput['platformReservedSubdomain'] +>; +export function useCreatePlatformReservedSubdomainMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreatePlatformReservedSubdomainInput['platformReservedSubdomain'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformReservedSubdomainMutationKeys.create(), + mutationFn: (data: CreatePlatformReservedSubdomainInput['platformReservedSubdomain']) => + getClient() + .platformReservedSubdomain.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: platformReservedSubdomainKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformReservedSubdomainMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformReservedSubdomainMutation.ts new file mode 100644 index 0000000000..7926f92d95 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformReservedSubdomainMutation.ts @@ -0,0 +1,106 @@ +/** + * Subdomain labels no tenant may claim under a platform apex + * @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 { platformReservedSubdomainKeys } from '../query-keys'; +import { platformReservedSubdomainMutationKeys } from '../mutation-keys'; +import type { + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainWithRelations, +} from '../../orm/input-types'; +/** + * Subdomain labels no tenant may claim under a platform apex + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlatformReservedSubdomainMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlatformReservedSubdomainMutation< + S extends PlatformReservedSubdomainSelect, +>( + params: { + selection: { + fields: S & PlatformReservedSubdomainSelect; + } & HookStrictSelect, PlatformReservedSubdomainSelect>; + } & Omit< + UseMutationOptions< + { + deletePlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlatformReservedSubdomainMutation( + 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: platformReservedSubdomainMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .platformReservedSubdomain.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: platformReservedSubdomainKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformReservedSubdomainKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdateFunctionFromSourceMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdateFunctionFromSourceMutation.ts deleted file mode 100644 index 9b6a7cf46a..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useUpdateFunctionFromSourceMutation.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Custom mutation hook for updateFunctionFromSource - * @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 { UpdateFunctionFromSourceVariables } from '../../orm/mutation'; -import type { UpdateFunctionPayloadSelect, UpdateFunctionPayload } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { UpdateFunctionFromSourceVariables } from '../../orm/mutation'; -export type { UpdateFunctionPayloadSelect } from '../../orm/input-types'; -export function useUpdateFunctionFromSourceMutation( - params: { - selection: { - fields: S & UpdateFunctionPayloadSelect; - } & HookStrictSelect, UpdateFunctionPayloadSelect>; - } & Omit< - UseMutationOptions< - { - updateFunctionFromSource: InferSelectResult | null; - }, - Error, - UpdateFunctionFromSourceVariables - >, - 'mutationFn' - > -): UseMutationResult< - { - updateFunctionFromSource: InferSelectResult | null; - }, - Error, - UpdateFunctionFromSourceVariables -> { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - return useMutation({ - mutationKey: customMutationKeys.updateFunctionFromSource(), - mutationFn: (variables: UpdateFunctionFromSourceVariables) => - getClient() - .mutation.updateFunctionFromSource(variables, { - select: args.select, - } as { - select: S; - } & StrictSelect) - .unwrap(), - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformReservedSubdomainMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformReservedSubdomainMutation.ts new file mode 100644 index 0000000000..117598d865 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformReservedSubdomainMutation.ts @@ -0,0 +1,118 @@ +/** + * Subdomain labels no tenant may claim under a platform apex + * @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 { platformReservedSubdomainKeys } from '../query-keys'; +import { platformReservedSubdomainMutationKeys } from '../mutation-keys'; +import type { + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainWithRelations, + PlatformReservedSubdomainPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainWithRelations, + PlatformReservedSubdomainPatch, +} from '../../orm/input-types'; +/** + * Subdomain labels no tenant may claim under a platform apex + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlatformReservedSubdomainMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', platformReservedSubdomainPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlatformReservedSubdomainMutation< + S extends PlatformReservedSubdomainSelect, +>( + params: { + selection: { + fields: S & PlatformReservedSubdomainSelect; + } & HookStrictSelect, PlatformReservedSubdomainSelect>; + } & Omit< + UseMutationOptions< + { + updatePlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }, + Error, + { + id: string; + platformReservedSubdomainPatch: PlatformReservedSubdomainPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }, + Error, + { + id: string; + platformReservedSubdomainPatch: PlatformReservedSubdomainPatch; + } +>; +export function useUpdatePlatformReservedSubdomainMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + platformReservedSubdomainPatch: PlatformReservedSubdomainPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformReservedSubdomainMutationKeys.all, + mutationFn: ({ + id, + platformReservedSubdomainPatch, + }: { + id: string; + platformReservedSubdomainPatch: PlatformReservedSubdomainPatch; + }) => + getClient() + .platformReservedSubdomain.update({ + where: { + id, + }, + data: platformReservedSubdomainPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: platformReservedSubdomainKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformReservedSubdomainKeys.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 b57ad83438..0afaf213b5 100644 --- a/sdk/constructive-react/src/api/hooks/queries/index.ts +++ b/sdk/constructive-react/src/api/hooks/queries/index.ts @@ -99,6 +99,8 @@ export * from './usePlatformManagedDomainsQuery'; export * from './usePlatformManagedDomainQuery'; export * from './usePlatformPagesQuery'; export * from './usePlatformPageQuery'; +export * from './usePlatformReservedSubdomainsQuery'; +export * from './usePlatformReservedSubdomainQuery'; export * from './usePlatformSiteAppLinksQuery'; export * from './usePlatformSiteAppLinkQuery'; export * from './usePlatformSitesQuery'; @@ -181,7 +183,6 @@ export * from './useViewTablesQuery'; export * from './useViewTableQuery'; export * from './useWebauthnSettingsQuery'; export * from './useWebauthnSettingQuery'; -export * from './useApiSchemaNamesQuery'; export * from './useApplyRegistryDefaultsQuery'; export * from './useEmailSharedAccountQuery'; export * from './useGetSitePreviewCommitQuery'; @@ -193,9 +194,6 @@ export * from './usePlatformPagePublishedQuery'; export * from './usePlatformSitesDeepLinkUrlQuery'; export * from './usePlatformSitesSiteOriginQuery'; export * from './usePlatformVerifySitePreviewTokenQuery'; -export * from './useResolveDeepLinkQuery'; -export * from './useResolveRouteQuery'; -export * from './useResolveSiteAppLinksQuery'; export * from './useSitesDeepLinkUrlQuery'; export * from './useSitesSiteOriginQuery'; export * from './useVerifySitePreviewTokenQuery'; diff --git a/sdk/constructive-react/src/api/hooks/queries/useApiSchemaNamesQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useApiSchemaNamesQuery.ts deleted file mode 100644 index 1d45b38894..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useApiSchemaNamesQuery.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Custom query hook for apiSchemaNames - * @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 { ApiSchemaNamesVariables } from '../../orm/query'; -export type { ApiSchemaNamesVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const apiSchemaNamesQueryKey = customQueryKeys.apiSchemaNames; -/** - * Query hook for apiSchemaNames - * - * @example - * ```tsx - * const { data, isLoading } = useApiSchemaNamesQuery({ variables: { targetApiId } }); - * - * if (data?.apiSchemaNames) { - * console.log(data.apiSchemaNames); - * } - * ``` - */ -export function useApiSchemaNamesQuery< - TData = { - apiSchemaNames: unknown | null; - }, ->( - params?: { - variables?: ApiSchemaNamesVariables; - } & Omit< - UseQueryOptions< - { - apiSchemaNames: unknown | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useApiSchemaNamesQuery< - TData = { - apiSchemaNames: unknown | null; - }, ->( - params?: { - variables?: ApiSchemaNamesVariables; - } & Omit< - UseQueryOptions< - { - apiSchemaNames: unknown | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: apiSchemaNamesQueryKey(variables), - queryFn: () => getClient().query.apiSchemaNames(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch apiSchemaNames without React hooks - * - * @example - * ```ts - * const data = await fetchApiSchemaNamesQuery({ variables: { targetApiId } }); - * ``` - */ -export async function fetchApiSchemaNamesQuery(params?: { variables?: ApiSchemaNamesVariables }) { - const variables = params?.variables ?? {}; - return getClient().query.apiSchemaNames(variables).unwrap(); -} -/** - * Prefetch apiSchemaNames for SSR or cache warming - * - * @example - * ```ts - * await prefetchApiSchemaNamesQuery(queryClient, { variables: { targetApiId } }); - * ``` - */ -export async function prefetchApiSchemaNamesQuery( - queryClient: QueryClient, - params?: { - variables?: ApiSchemaNamesVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: apiSchemaNamesQueryKey(variables), - queryFn: () => getClient().query.apiSchemaNames(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformReservedSubdomainQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformReservedSubdomainQuery.ts new file mode 100644 index 0000000000..20cb32de19 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformReservedSubdomainQuery.ts @@ -0,0 +1,151 @@ +/** + * Subdomain labels no tenant may claim under a platform apex + * @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 { platformReservedSubdomainKeys } from '../query-keys'; +import type { + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformReservedSubdomainQueryKey = platformReservedSubdomainKeys.detail; +/** + * Subdomain labels no tenant may claim under a platform apex + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformReservedSubdomainQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlatformReservedSubdomainQuery< + S extends PlatformReservedSubdomainSelect, + TData = { + platformReservedSubdomain: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformReservedSubdomainSelect>; + } & Omit< + UseQueryOptions< + { + platformReservedSubdomain: InferSelectResult< + PlatformReservedSubdomainWithRelations, + S + > | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformReservedSubdomainQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformReservedSubdomainKeys.detail(params.id), + queryFn: () => + getClient() + .platformReservedSubdomain.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Subdomain labels no tenant may claim under a platform apex + * + * @example + * ```ts + * const data = await fetchPlatformReservedSubdomainQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlatformReservedSubdomainQuery< + S extends PlatformReservedSubdomainSelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformReservedSubdomainSelect>; +}): Promise<{ + platformReservedSubdomain: InferSelectResult | null; +}>; +export async function fetchPlatformReservedSubdomainQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .platformReservedSubdomain.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Subdomain labels no tenant may claim under a platform apex + * + * @example + * ```ts + * await prefetchPlatformReservedSubdomainQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlatformReservedSubdomainQuery< + S extends PlatformReservedSubdomainSelect, +>( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformReservedSubdomainSelect>; + } +): Promise; +export async function prefetchPlatformReservedSubdomainQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformReservedSubdomainKeys.detail(params.id), + queryFn: () => + getClient() + .platformReservedSubdomain.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformReservedSubdomainsQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformReservedSubdomainsQuery.ts new file mode 100644 index 0000000000..6f7cea223d --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformReservedSubdomainsQuery.ts @@ -0,0 +1,182 @@ +/** + * Subdomain labels no tenant may claim under a platform apex + * @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 { platformReservedSubdomainKeys } from '../query-keys'; +import type { + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainWithRelations, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainWithRelations, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformReservedSubdomainsQueryKey = platformReservedSubdomainKeys.list; +/** + * Subdomain labels no tenant may claim under a platform apex + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformReservedSubdomainsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlatformReservedSubdomainsQuery< + S extends PlatformReservedSubdomainSelect, + TData = { + platformReservedSubdomains: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformReservedSubdomainSelect>; + } & Omit< + UseQueryOptions< + { + platformReservedSubdomains: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformReservedSubdomainsQuery( + params: { + selection: ListSelectionConfig< + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformReservedSubdomainKeys.list(args), + queryFn: () => getClient().platformReservedSubdomain.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Subdomain labels no tenant may claim under a platform apex + * + * @example + * ```ts + * const data = await fetchPlatformReservedSubdomainsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlatformReservedSubdomainsQuery< + S extends PlatformReservedSubdomainSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformReservedSubdomainSelect>; +}): Promise<{ + platformReservedSubdomains: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchPlatformReservedSubdomainsQuery(params: { + selection: ListSelectionConfig< + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy + >; +}) { + const args = buildListSelectionArgs< + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy + >(params.selection); + return getClient().platformReservedSubdomain.findMany(args).unwrap(); +} +/** + * Subdomain labels no tenant may claim under a platform apex + * + * @example + * ```ts + * await prefetchPlatformReservedSubdomainsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlatformReservedSubdomainsQuery< + S extends PlatformReservedSubdomainSelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformReservedSubdomainSelect>; + } +): Promise; +export async function prefetchPlatformReservedSubdomainsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformReservedSubdomainKeys.list(args), + queryFn: () => getClient().platformReservedSubdomain.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useResolveDeepLinkQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useResolveDeepLinkQuery.ts deleted file mode 100644 index 61add404ea..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useResolveDeepLinkQuery.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Custom query hook for resolveDeepLink - * @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 { ResolveDeepLinkVariables } from '../../orm/query'; -export type { ResolveDeepLinkVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const resolveDeepLinkQueryKey = customQueryKeys.resolveDeepLink; -/** - * Query hook for resolveDeepLink - * - * @example - * ```tsx - * const { data, isLoading } = useResolveDeepLinkQuery({ variables: { linkSlug, targetSiteId } }); - * - * if (data?.resolveDeepLink) { - * console.log(data.resolveDeepLink); - * } - * ``` - */ -export function useResolveDeepLinkQuery< - TData = { - resolveDeepLink: unknown | null; - }, ->( - params?: { - variables?: ResolveDeepLinkVariables; - } & Omit< - UseQueryOptions< - { - resolveDeepLink: unknown | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useResolveDeepLinkQuery< - TData = { - resolveDeepLink: unknown | null; - }, ->( - params?: { - variables?: ResolveDeepLinkVariables; - } & Omit< - UseQueryOptions< - { - resolveDeepLink: unknown | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: resolveDeepLinkQueryKey(variables), - queryFn: () => getClient().query.resolveDeepLink(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch resolveDeepLink without React hooks - * - * @example - * ```ts - * const data = await fetchResolveDeepLinkQuery({ variables: { linkSlug, targetSiteId } }); - * ``` - */ -export async function fetchResolveDeepLinkQuery(params?: { variables?: ResolveDeepLinkVariables }) { - const variables = params?.variables ?? {}; - return getClient().query.resolveDeepLink(variables).unwrap(); -} -/** - * Prefetch resolveDeepLink for SSR or cache warming - * - * @example - * ```ts - * await prefetchResolveDeepLinkQuery(queryClient, { variables: { linkSlug, targetSiteId } }); - * ``` - */ -export async function prefetchResolveDeepLinkQuery( - queryClient: QueryClient, - params?: { - variables?: ResolveDeepLinkVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: resolveDeepLinkQueryKey(variables), - queryFn: () => getClient().query.resolveDeepLink(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/queries/useResolveRouteQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useResolveRouteQuery.ts deleted file mode 100644 index 6986d75350..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useResolveRouteQuery.ts +++ /dev/null @@ -1,139 +0,0 @@ -/** - * Custom query hook for resolveRoute - * @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 { ResolveRouteVariables } from '../../orm/query'; -import type { ResolveRouteRecordSelect, ResolveRouteRecord } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ResolveRouteVariables } from '../../orm/query'; -export type { ResolveRouteRecordSelect } from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const resolveRouteQueryKey = customQueryKeys.resolveRoute; -/** - * Query hook for resolveRoute - * - * @example - * ```tsx - * const { data, isLoading } = useResolveRouteQuery({ variables: { requestHost, requestMethod, requestPath }, selection: { fields: { id: true } } }); - * - * if (data?.resolveRoute) { - * console.log(data.resolveRoute); - * } - * ``` - */ -export function useResolveRouteQuery< - S extends ResolveRouteRecordSelect, - TData = { - resolveRoute: InferSelectResult | null; - }, ->( - params: { - variables?: ResolveRouteVariables; - selection: { - fields: S & ResolveRouteRecordSelect; - } & HookStrictSelect, ResolveRouteRecordSelect>; - } & Omit< - UseQueryOptions< - { - resolveRoute: InferSelectResult | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useResolveRouteQuery( - params: { - variables?: ResolveRouteVariables; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const variables = params.variables ?? {}; - const args = buildSelectionArgs(params.selection); - const { variables: _variables, selection: _selection, ...queryOptions } = params ?? {}; - void _variables; - void _selection; - return useQuery({ - queryKey: resolveRouteQueryKey(variables), - queryFn: () => - getClient() - .query.resolveRoute(variables, { - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * Fetch resolveRoute without React hooks - * - * @example - * ```ts - * const data = await fetchResolveRouteQuery({ variables: { requestHost, requestMethod, requestPath }, selection: { fields: { id: true } } }); - * ``` - */ -export async function fetchResolveRouteQuery(params: { - variables?: ResolveRouteVariables; - selection: { - fields: S & ResolveRouteRecordSelect; - } & HookStrictSelect, ResolveRouteRecordSelect>; -}): Promise<{ - resolveRoute: InferSelectResult | null; -}>; -export async function fetchResolveRouteQuery(params: { - variables?: ResolveRouteVariables; - selection: SelectionConfig; -}) { - const variables = params.variables ?? {}; - const args = buildSelectionArgs(params.selection); - return getClient() - .query.resolveRoute(variables, { - select: args.select, - }) - .unwrap(); -} -/** - * Prefetch resolveRoute for SSR or cache warming - * - * @example - * ```ts - * await prefetchResolveRouteQuery(queryClient, { variables: { requestHost, requestMethod, requestPath }, selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchResolveRouteQuery( - queryClient: QueryClient, - params: { - variables?: ResolveRouteVariables; - selection: { - fields: S & ResolveRouteRecordSelect; - } & HookStrictSelect, ResolveRouteRecordSelect>; - } -): Promise; -export async function prefetchResolveRouteQuery( - queryClient: QueryClient, - params: { - variables?: ResolveRouteVariables; - selection: SelectionConfig; - } -): Promise { - const variables = params.variables ?? {}; - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: resolveRouteQueryKey(variables), - queryFn: () => - getClient() - .query.resolveRoute(variables, { - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/queries/useResolveSiteAppLinksQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useResolveSiteAppLinksQuery.ts deleted file mode 100644 index 0accd74a08..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useResolveSiteAppLinksQuery.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Custom query hook for resolveSiteAppLinks - * @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 { ResolveSiteAppLinksVariables } from '../../orm/query'; -export type { ResolveSiteAppLinksVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const resolveSiteAppLinksQueryKey = customQueryKeys.resolveSiteAppLinks; -/** - * Query hook for resolveSiteAppLinks - * - * @example - * ```tsx - * const { data, isLoading } = useResolveSiteAppLinksQuery({ variables: { targetSiteId } }); - * - * if (data?.resolveSiteAppLinks) { - * console.log(data.resolveSiteAppLinks); - * } - * ``` - */ -export function useResolveSiteAppLinksQuery< - TData = { - resolveSiteAppLinks: unknown | null; - }, ->( - params?: { - variables?: ResolveSiteAppLinksVariables; - } & Omit< - UseQueryOptions< - { - resolveSiteAppLinks: unknown | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useResolveSiteAppLinksQuery< - TData = { - resolveSiteAppLinks: unknown | null; - }, ->( - params?: { - variables?: ResolveSiteAppLinksVariables; - } & Omit< - UseQueryOptions< - { - resolveSiteAppLinks: unknown | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: resolveSiteAppLinksQueryKey(variables), - queryFn: () => getClient().query.resolveSiteAppLinks(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch resolveSiteAppLinks without React hooks - * - * @example - * ```ts - * const data = await fetchResolveSiteAppLinksQuery({ variables: { targetSiteId } }); - * ``` - */ -export async function fetchResolveSiteAppLinksQuery(params?: { - variables?: ResolveSiteAppLinksVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.resolveSiteAppLinks(variables).unwrap(); -} -/** - * Prefetch resolveSiteAppLinks for SSR or cache warming - * - * @example - * ```ts - * await prefetchResolveSiteAppLinksQuery(queryClient, { variables: { targetSiteId } }); - * ``` - */ -export async function prefetchResolveSiteAppLinksQuery( - queryClient: QueryClient, - params?: { - variables?: ResolveSiteAppLinksVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: resolveSiteAppLinksQueryKey(variables), - queryFn: () => getClient().query.resolveSiteAppLinks(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/query-keys.ts b/sdk/constructive-react/src/api/hooks/query-keys.ts index c534c4c09a..d63b5908f6 100644 --- a/sdk/constructive-react/src/api/hooks/query-keys.ts +++ b/sdk/constructive-react/src/api/hooks/query-keys.ts @@ -465,6 +465,15 @@ export const platformPageKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...platformPageKeys.details(), id] as const, } as const; +export const platformReservedSubdomainKeys = { + /** All platformReservedSubdomain queries */ all: ['platformreservedsubdomain'] as const, + /** List query keys */ lists: () => [...platformReservedSubdomainKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...platformReservedSubdomainKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...platformReservedSubdomainKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...platformReservedSubdomainKeys.details(), id] as const, +} as const; export const platformSiteAppLinkKeys = { /** All platformSiteAppLink queries */ all: ['platformsiteapplink'] as const, /** List query keys */ lists: () => [...platformSiteAppLinkKeys.all, 'list'] as const, @@ -840,8 +849,6 @@ export const webauthnSettingKeys = { // ============================================================================ export const customQueryKeys = { - /** Query key for apiSchemaNames */ apiSchemaNames: (variables?: object) => - ['apiSchemaNames', variables] as const, /** Query key for applyRegistryDefaults */ applyRegistryDefaults: (variables?: object) => ['applyRegistryDefaults', variables] as const, /** Query key for emailSharedAccount */ emailSharedAccount: () => ['emailSharedAccount'] as const, @@ -866,12 +873,6 @@ export const customQueryKeys = { /** Query key for platformVerifySitePreviewToken */ platformVerifySitePreviewToken: ( variables?: object ) => ['platformVerifySitePreviewToken', variables] as const, - /** Query key for resolveDeepLink */ resolveDeepLink: (variables?: object) => - ['resolveDeepLink', variables] as const, - /** Query key for resolveRoute */ resolveRoute: (variables?: object) => - ['resolveRoute', variables] as const, - /** Query key for resolveSiteAppLinks */ resolveSiteAppLinks: (variables?: object) => - ['resolveSiteAppLinks', variables] as const, /** Query key for sitesDeepLinkUrl */ sitesDeepLinkUrl: (variables?: object) => ['sitesDeepLinkUrl', variables] as const, /** Query key for sitesSiteOrigin */ sitesSiteOrigin: (variables?: object) => @@ -951,6 +952,7 @@ export const queryKeys = { platformGetSitePreviewsRecord: platformGetSitePreviewsRecordKeys, platformManagedDomain: platformManagedDomainKeys, platformPage: platformPageKeys, + platformReservedSubdomain: platformReservedSubdomainKeys, platformSiteAppLink: platformSiteAppLinkKeys, platformSite: platformSiteKeys, platformSiteDeepLink: platformSiteDeepLinkKeys, diff --git a/sdk/constructive-react/src/api/orm/README.md b/sdk/constructive-react/src/api/orm/README.md index 02e465c85e..66090e441e 100644 --- a/sdk/constructive-react/src/api/orm/README.md +++ b/sdk/constructive-react/src/api/orm/README.md @@ -70,6 +70,7 @@ const db = createClient({ | `platformGetSitePreviewsRecord` | findMany, findOne, create, update, delete | | `platformManagedDomain` | findMany, findOne, create, update, delete | | `platformPage` | findMany, findOne, create, update, delete | +| `platformReservedSubdomain` | findMany, findOne, create, update, delete | | `platformSiteAppLink` | findMany, findOne, create, update, delete | | `platformSite` | findMany, findOne, create, update, delete | | `platformSiteDeepLink` | findMany, findOne, create, update, delete | @@ -126,7 +127,6 @@ CRUD operations for Api records. | `config` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `dbname` | String | Yes | | `id` | UUID | No | | `isPublished` | Boolean | Yes | | `name` | String | Yes | @@ -137,13 +137,13 @@ CRUD operations for Api records. ```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(); +const items = await db.api.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: 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(); +const item = await db.api.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: 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(); +const created = await db.api.create({ data: { anonRole: '', config: '', databaseId: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); // Update const updated = await db.api.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); @@ -1601,7 +1601,6 @@ CRUD operations for PlatformApi records. | `anonRole` | String | Yes | | `config` | JSON | Yes | | `createdAt` | Datetime | No | -| `dbname` | String | Yes | | `id` | UUID | No | | `isPublished` | Boolean | Yes | | `name` | String | Yes | @@ -1612,13 +1611,13 @@ CRUD operations for PlatformApi records. ```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(); +const items = await db.platformApi.findMany({ select: { anonRole: true, config: true, createdAt: 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(); +const item = await db.platformApi.findOne({ id: '', select: { anonRole: true, config: true, createdAt: 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(); +const created = await db.platformApi.create({ data: { anonRole: '', config: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformApi.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); @@ -2100,6 +2099,42 @@ const updated = await db.platformPage.update({ where: { id: '' }, data: { const deleted = await db.platformPage.delete({ where: { id: '' } }).execute(); ``` +### `db.platformReservedSubdomain` + +CRUD operations for PlatformReservedSubdomain records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `createdByPrincipal` | UUID | Yes | +| `id` | UUID | No | +| `label` | String | Yes | +| `match` | String | Yes | +| `reason` | String | Yes | +| `updatedAt` | Datetime | No | +| `updatedByPrincipal` | UUID | Yes | + +**Operations:** + +```typescript +// List all platformReservedSubdomain records +const items = await db.platformReservedSubdomain.findMany({ select: { createdAt: true, createdByPrincipal: true, id: true, label: true, match: true, reason: true, updatedAt: true, updatedByPrincipal: true } }).execute(); + +// Get one by id +const item = await db.platformReservedSubdomain.findOne({ id: '', select: { createdAt: true, createdByPrincipal: true, id: true, label: true, match: true, reason: true, updatedAt: true, updatedByPrincipal: true } }).execute(); + +// Create +const created = await db.platformReservedSubdomain.create({ data: { createdByPrincipal: '', label: '', match: '', reason: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformReservedSubdomain.update({ where: { id: '' }, data: { createdByPrincipal: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformReservedSubdomain.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformSiteAppLink` CRUD operations for PlatformSiteAppLink records. @@ -3706,21 +3741,6 @@ const deleted = await db.webauthnSetting.delete({ where: { id: '' } }).exe ## Custom Operations -### `db.query.apiSchemaNames` - -apiSchemaNames - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `targetApiId` | UUID | - -```typescript -const result = await db.query.apiSchemaNames({ targetApiId: '' }).execute(); -``` - ### `db.query.applyRegistryDefaults` applyRegistryDefaults @@ -3891,54 +3911,6 @@ platformVerifySitePreviewToken const result = await db.query.platformVerifySitePreviewToken({ siteId: '', token: '' }).execute(); ``` -### `db.query.resolveDeepLink` - -resolveDeepLink - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `linkSlug` | String | - | `targetSiteId` | UUID | - -```typescript -const result = await db.query.resolveDeepLink({ linkSlug: '', targetSiteId: '' }).execute(); -``` - -### `db.query.resolveRoute` - -resolveRoute - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `requestHost` | String | - | `requestMethod` | String | - | `requestPath` | String | - -```typescript -const result = await db.query.resolveRoute({ requestHost: '', requestMethod: '', requestPath: '' }).execute(); -``` - -### `db.query.resolveSiteAppLinks` - -resolveSiteAppLinks - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `targetSiteId` | UUID | - -```typescript -const result = await db.query.resolveSiteAppLinks({ targetSiteId: '' }).execute(); -``` - ### `db.query.sitesDeepLinkUrl` sitesDeepLinkUrl @@ -4031,21 +4003,6 @@ cancelDatabaseTransfer const result = await db.mutation.cancelDatabaseTransfer({ input: { transferId: '' } }).execute(); ``` -### `db.mutation.createFunctionFromSource` - -Creates a `Function` from its `CREATE FUNCTION` source text. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | CreateFunctionFromSourceInput (required) | - -```typescript -const result = await db.mutation.createFunctionFromSource({ input: { apiExposed: '', databaseId: '', schemaId: '', source: '' } }).execute(); -``` - ### `db.mutation.deleteSitePreview` deleteSitePreview @@ -4447,18 +4404,3 @@ unsuspendDatabase ```typescript const result = await db.mutation.unsuspendDatabase({ input: { databaseId: '', reason: '' } }).execute(); ``` - -### `db.mutation.updateFunctionFromSource` - -Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | UpdateFunctionFromSourceInput (required) | - -```typescript -const result = await db.mutation.updateFunctionFromSource({ input: { id: '', source: '' } }).execute(); -``` diff --git a/sdk/constructive-react/src/api/orm/index.ts b/sdk/constructive-react/src/api/orm/index.ts index 038b8785ac..eb190bc93d 100644 --- a/sdk/constructive-react/src/api/orm/index.ts +++ b/sdk/constructive-react/src/api/orm/index.ts @@ -54,6 +54,7 @@ import { PlatformEmailSiteIdentityModel } from './models/platformEmailSiteIdenti import { PlatformGetSitePreviewsRecordModel } from './models/platformGetSitePreviewsRecord'; import { PlatformManagedDomainModel } from './models/platformManagedDomain'; import { PlatformPageModel } from './models/platformPage'; +import { PlatformReservedSubdomainModel } from './models/platformReservedSubdomain'; import { PlatformSiteAppLinkModel } from './models/platformSiteAppLink'; import { PlatformSiteModel } from './models/platformSite'; import { PlatformSiteDeepLinkModel } from './models/platformSiteDeepLink'; @@ -179,6 +180,7 @@ export function createClient(config: OrmClientConfig) { platformGetSitePreviewsRecord: new PlatformGetSitePreviewsRecordModel(client), platformManagedDomain: new PlatformManagedDomainModel(client), platformPage: new PlatformPageModel(client), + platformReservedSubdomain: new PlatformReservedSubdomainModel(client), platformSiteAppLink: new PlatformSiteAppLinkModel(client), platformSite: new PlatformSiteModel(client), platformSiteDeepLink: new PlatformSiteDeepLinkModel(client), diff --git a/sdk/constructive-react/src/api/orm/input-types.ts b/sdk/constructive-react/src/api/orm/input-types.ts index f4e5da7908..38d819c123 100644 --- a/sdk/constructive-react/src/api/orm/input-types.ts +++ b/sdk/constructive-react/src/api/orm/input-types.ts @@ -245,8 +245,6 @@ export interface Api { 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; @@ -945,8 +943,6 @@ export interface PlatformApi { /** 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; @@ -1229,6 +1225,20 @@ export interface PlatformPage { /** Timestamp of last modification */ updatedAt?: string | null; } +/** Subdomain labels no tenant may claim under a platform apex */ +export interface PlatformReservedSubdomain { + createdAt?: string | null; + createdByPrincipal?: string | null; + id: string; + /** Lowercase subdomain label, or the label prefix/suffix the match names */ + label?: string | null; + /** How the label matches a claimed label: exact, prefix or suffix */ + match?: string | null; + /** Why the label is reserved (free text, e.g. platform, brand, lookalike) */ + reason?: string | null; + updatedAt?: string | null; + updatedByPrincipal?: string | null; +} /** Per-host native-app association for a site surface: which app-owned store identity this host serves, and the path patterns it claims (joined with the store identity to render AASA / assetlinks.json) */ export interface PlatformSiteAppLink { /** App-owned store identity this association serves (app_store_identities row in this scope's app plane; the association carries no store facts of its own) */ @@ -2203,6 +2213,7 @@ export interface PlatformManagedDomainRelations { export interface PlatformPageRelations { site?: PlatformSite | null; } +export interface PlatformReservedSubdomainRelations {} export interface PlatformSiteAppLinkRelations { site?: PlatformSite | null; } @@ -2490,6 +2501,8 @@ export type PlatformGetSitePreviewsRecordWithRelations = PlatformGetSitePreviews export type PlatformManagedDomainWithRelations = PlatformManagedDomain & PlatformManagedDomainRelations; export type PlatformPageWithRelations = PlatformPage & PlatformPageRelations; +export type PlatformReservedSubdomainWithRelations = PlatformReservedSubdomain & + PlatformReservedSubdomainRelations; export type PlatformSiteAppLinkWithRelations = PlatformSiteAppLink & PlatformSiteAppLinkRelations; export type PlatformSiteWithRelations = PlatformSite & PlatformSiteRelations; export type PlatformSiteDeepLinkWithRelations = PlatformSiteDeepLink & @@ -2543,7 +2556,6 @@ export type ApiSelect = { config?: boolean; createdAt?: boolean; databaseId?: boolean; - dbname?: boolean; id?: boolean; isPublished?: boolean; name?: boolean; @@ -3547,7 +3559,6 @@ export type PlatformApiSelect = { anonRole?: boolean; config?: boolean; createdAt?: boolean; - dbname?: boolean; id?: boolean; isPublished?: boolean; name?: boolean; @@ -3802,6 +3813,16 @@ export type PlatformPageSelect = { select: PlatformSiteSelect; }; }; +export type PlatformReservedSubdomainSelect = { + createdAt?: boolean; + createdByPrincipal?: boolean; + id?: boolean; + label?: boolean; + match?: boolean; + reason?: boolean; + updatedAt?: boolean; + updatedByPrincipal?: boolean; +}; export type PlatformSiteAppLinkSelect = { appStoreIdentityId?: boolean; createdAt?: boolean; @@ -4949,8 +4970,6 @@ export interface ApiFilter { 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. */ @@ -6478,8 +6497,6 @@ export interface PlatformApiFilter { 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. */ @@ -6936,6 +6953,30 @@ export interface PlatformPageFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface PlatformReservedSubdomainFilter { + /** Checks for all expressions in this list. */ + and?: PlatformReservedSubdomainFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `label` field. */ + label?: StringFilter; + /** Filter by the object’s `match` field. */ + match?: StringFilter; + /** Negates the expression. */ + not?: PlatformReservedSubdomainFilter; + /** Checks for any expressions in this list. */ + or?: PlatformReservedSubdomainFilter[]; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} export interface PlatformSiteAppLinkFilter { /** Checks for all expressions in this list. */ and?: PlatformSiteAppLinkFilter[]; @@ -8650,8 +8691,6 @@ export type ApiOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLISHED_ASC' @@ -9726,8 +9765,6 @@ export type PlatformApiOrderBy = | 'CONFIG_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLISHED_ASC' @@ -10063,6 +10100,26 @@ export type PlatformPageOrderBy = | 'STORE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type PlatformReservedSubdomainOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LABEL_ASC' + | 'LABEL_DESC' + | 'MATCH_ASC' + | 'MATCH_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REASON_ASC' + | 'REASON_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; export type PlatformSiteAppLinkOrderBy = | 'APP_STORE_IDENTITY_ID_ASC' | 'APP_STORE_IDENTITY_ID_DESC' @@ -11144,7 +11201,6 @@ export interface CreateApiInput { anonRole?: string; config?: Record; databaseId: string; - dbname?: string; isPublished?: boolean; name: string; roleName?: string; @@ -11154,7 +11210,6 @@ export interface ApiPatch { anonRole?: string | null; config?: Record | null; databaseId?: string | null; - dbname?: string | null; isPublished?: boolean | null; name?: string | null; roleName?: string | null; @@ -12479,7 +12534,6 @@ export interface CreatePlatformApiInput { platformApi: { anonRole?: string; config?: Record; - dbname?: string; isPublished?: boolean; name: string; roleName?: string; @@ -12488,7 +12542,6 @@ export interface CreatePlatformApiInput { export interface PlatformApiPatch { anonRole?: string | null; config?: Record | null; - dbname?: string | null; isPublished?: boolean | null; name?: string | null; roleName?: string | null; @@ -12902,6 +12955,32 @@ export interface DeletePlatformPageInput { clientMutationId?: string; id: string; } +export interface CreatePlatformReservedSubdomainInput { + clientMutationId?: string; + platformReservedSubdomain: { + createdByPrincipal?: string; + label: string; + match?: string; + reason?: string; + updatedByPrincipal?: string; + }; +} +export interface PlatformReservedSubdomainPatch { + createdByPrincipal?: string | null; + label?: string | null; + match?: string | null; + reason?: string | null; + updatedByPrincipal?: string | null; +} +export interface UpdatePlatformReservedSubdomainInput { + clientMutationId?: string; + id: string; + platformReservedSubdomainPatch: PlatformReservedSubdomainPatch; +} +export interface DeletePlatformReservedSubdomainInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformSiteAppLinkInput { clientMutationId?: string; platformSiteAppLink: { @@ -14423,15 +14502,6 @@ export interface CancelDatabaseTransferInput { clientMutationId?: string; transferId?: string; } -/** Author a function from its `CREATE FUNCTION` source text. */ -export interface CreateFunctionFromSourceInput { - apiExposed?: boolean; - clientMutationId?: string; - databaseId: string; - schemaId: string; - /** One `CREATE FUNCTION` statement (LANGUAGE plpgsql or sql). */ - source: string; -} export interface DeleteSitePreviewInput { clientMutationId?: string; targetName?: string; @@ -14599,13 +14669,6 @@ export interface UnsuspendDatabaseInput { databaseId?: string; reason?: string; } -/** Replace a function's definition from its `CREATE FUNCTION` source text. */ -export interface UpdateFunctionFromSourceInput { - clientMutationId?: string; - id: string; - /** One `CREATE FUNCTION` statement (LANGUAGE plpgsql or sql). */ - source: string; -} /** A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ export interface ApiToManyApiSchemaFilter { /** Filters to entities where every related entity matches. */ @@ -15627,8 +15690,6 @@ export interface ApiInput { 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; @@ -16319,8 +16380,6 @@ export interface PlatformApiInput { /** 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; @@ -16599,6 +16658,20 @@ export interface PlatformPageInput { /** Timestamp of last modification */ updatedAt?: string; } +/** An input for mutations affecting `PlatformReservedSubdomain` */ +export interface PlatformReservedSubdomainInput { + createdAt?: string; + createdByPrincipal?: string; + id?: string; + /** Lowercase subdomain label, or the label prefix/suffix the match names */ + label: string; + /** How the label matches a claimed label: exact, prefix or suffix */ + match?: string; + /** Why the label is reserved (free text, e.g. platform, brand, lookalike) */ + reason?: string; + updatedAt?: string; + updatedByPrincipal?: string; +} /** An input for mutations affecting `PlatformSiteAppLink` */ export interface PlatformSiteAppLinkInput { /** App-owned store identity this association serves (app_store_identities row in this scope's app plane; the association carries no store facts of its own) */ @@ -19675,8 +19748,6 @@ export interface ApiFilter { 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. */ @@ -20445,8 +20516,6 @@ export interface PlatformApiFilter { 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. */ @@ -21069,44 +21138,6 @@ export interface BigIntFilter { notIn?: string[]; } // ============ Payload/Return Types (for custom operations) ============ -export interface ResolveRouteRecord { - domainId?: string | null; - hostname?: string | null; - matchedPath?: string | null; - matchedWildcard?: boolean | null; - method?: string | null; - priority?: number | null; - resolvedConfig?: Record | null; - routeBindingId?: string | null; - servingLane?: string | null; - targetCatalogId?: string | null; - targetModule?: string | null; - targetOwnerKey?: string | null; - targetOwnerScope?: string | null; - targetSourceId?: string | null; - tlsSecretName?: string | null; - tlsStatus?: string | null; - verificationStatus?: string | null; -} -export type ResolveRouteRecordSelect = { - domainId?: boolean; - hostname?: boolean; - matchedPath?: boolean; - matchedWildcard?: boolean; - method?: boolean; - priority?: boolean; - resolvedConfig?: boolean; - routeBindingId?: boolean; - servingLane?: boolean; - targetCatalogId?: boolean; - targetModule?: boolean; - targetOwnerKey?: boolean; - targetOwnerScope?: boolean; - targetSourceId?: boolean; - tlsSecretName?: boolean; - tlsStatus?: boolean; - verificationStatus?: boolean; -}; export interface AcceptDatabaseTransferPayload { clientMutationId?: string | null; result?: boolean | null; @@ -21129,21 +21160,6 @@ export type CancelDatabaseTransferPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface CreateFunctionPayload { - clientMutationId?: string | null; - /** The `Function` that was created by this mutation. */ - function?: Function | null; - functionEdge?: FunctionEdge | null; -} -export type CreateFunctionPayloadSelect = { - clientMutationId?: boolean; - function?: { - select: FunctionSelect; - }; - functionEdge?: { - select: FunctionEdgeSelect; - }; -}; export interface DeleteSitePreviewPayload { clientMutationId?: string | null; } @@ -21411,21 +21427,6 @@ export type UnsuspendDatabasePayloadSelect = { select: DatabaseSelect; }; }; -export interface UpdateFunctionPayload { - clientMutationId?: string | null; - /** The `Function` that was updated by this mutation. */ - function?: Function | null; - functionEdge?: FunctionEdge | null; -} -export type UpdateFunctionPayloadSelect = { - clientMutationId?: boolean; - function?: { - select: FunctionSelect; - }; - functionEdge?: { - select: FunctionEdgeSelect; - }; -}; export interface CreateApiPayload { /** The `Api` that was created by this mutation. */ api?: Api | null; @@ -22596,6 +22597,36 @@ export type DeleteFullTextSearchPayloadSelect = { select: FullTextSearchEdgeSelect; }; }; +export interface CreateFunctionPayload { + clientMutationId?: string | null; + /** The `Function` that was created by this mutation. */ + function?: Function | null; + functionEdge?: FunctionEdge | null; +} +export type CreateFunctionPayloadSelect = { + clientMutationId?: boolean; + function?: { + select: FunctionSelect; + }; + functionEdge?: { + select: FunctionEdgeSelect; + }; +}; +export interface UpdateFunctionPayload { + clientMutationId?: string | null; + /** The `Function` that was updated by this mutation. */ + function?: Function | null; + functionEdge?: FunctionEdge | null; +} +export type UpdateFunctionPayloadSelect = { + clientMutationId?: boolean; + function?: { + select: FunctionSelect; + }; + functionEdge?: { + select: FunctionEdgeSelect; + }; +}; export interface DeleteFunctionPayload { clientMutationId?: string | null; /** The `Function` that was deleted by this mutation. */ @@ -23421,6 +23452,51 @@ export type DeletePlatformPagePayloadSelect = { select: PlatformPageEdgeSelect; }; }; +export interface CreatePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was created by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} +export type CreatePlatformReservedSubdomainPayloadSelect = { + clientMutationId?: boolean; + platformReservedSubdomain?: { + select: PlatformReservedSubdomainSelect; + }; + platformReservedSubdomainEdge?: { + select: PlatformReservedSubdomainEdgeSelect; + }; +}; +export interface UpdatePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was updated by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} +export type UpdatePlatformReservedSubdomainPayloadSelect = { + clientMutationId?: boolean; + platformReservedSubdomain?: { + select: PlatformReservedSubdomainSelect; + }; + platformReservedSubdomainEdge?: { + select: PlatformReservedSubdomainEdgeSelect; + }; +}; +export interface DeletePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was deleted by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} +export type DeletePlatformReservedSubdomainPayloadSelect = { + clientMutationId?: boolean; + platformReservedSubdomain?: { + select: PlatformReservedSubdomainSelect; + }; + platformReservedSubdomainEdge?: { + select: PlatformReservedSubdomainEdgeSelect; + }; +}; export interface CreatePlatformSiteAppLinkPayload { clientMutationId?: string | null; /** The `PlatformSiteAppLink` that was created by this mutation. */ @@ -25221,18 +25297,6 @@ export type DeleteWebauthnSettingPayloadSelect = { select: WebauthnSettingEdgeSelect; }; }; -/** A `Function` edge in the connection. */ -export interface FunctionEdge { - cursor?: string | null; - /** The `Function` at the end of the edge. */ - node?: Function | null; -} -export type FunctionEdgeSelect = { - cursor?: boolean; - node?: { - select: FunctionSelect; - }; -}; /** A `Domain` edge in the connection. */ export interface DomainEdge { cursor?: string | null; @@ -25725,6 +25789,18 @@ export type FullTextSearchEdgeSelect = { select: FullTextSearchSelect; }; }; +/** A `Function` edge in the connection. */ +export interface FunctionEdge { + cursor?: string | null; + /** The `Function` at the end of the edge. */ + node?: Function | null; +} +export type FunctionEdgeSelect = { + cursor?: boolean; + node?: { + select: FunctionSelect; + }; +}; /** A `IdentityProviderRegistry` edge in the connection. */ export interface IdentityProviderRegistryEdge { cursor?: string | null; @@ -25929,6 +26005,18 @@ export type PlatformPageEdgeSelect = { select: PlatformPageSelect; }; }; +/** A `PlatformReservedSubdomain` edge in the connection. */ +export interface PlatformReservedSubdomainEdge { + cursor?: string | null; + /** The `PlatformReservedSubdomain` at the end of the edge. */ + node?: PlatformReservedSubdomain | null; +} +export type PlatformReservedSubdomainEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformReservedSubdomainSelect; + }; +}; /** A `PlatformSiteAppLink` edge in the connection. */ export interface PlatformSiteAppLinkEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/api/orm/models/index.ts b/sdk/constructive-react/src/api/orm/models/index.ts index 207f507c84..3cd2ba5b52 100644 --- a/sdk/constructive-react/src/api/orm/models/index.ts +++ b/sdk/constructive-react/src/api/orm/models/index.ts @@ -52,6 +52,7 @@ export { PlatformEmailSiteIdentityModel } from './platformEmailSiteIdentity'; export { PlatformGetSitePreviewsRecordModel } from './platformGetSitePreviewsRecord'; export { PlatformManagedDomainModel } from './platformManagedDomain'; export { PlatformPageModel } from './platformPage'; +export { PlatformReservedSubdomainModel } from './platformReservedSubdomain'; export { PlatformSiteAppLinkModel } from './platformSiteAppLink'; export { PlatformSiteModel } from './platformSite'; export { PlatformSiteDeepLinkModel } from './platformSiteDeepLink'; diff --git a/sdk/constructive-react/src/api/orm/models/platformReservedSubdomain.ts b/sdk/constructive-react/src/api/orm/models/platformReservedSubdomain.ts new file mode 100644 index 0000000000..ab3f3b97e5 --- /dev/null +++ b/sdk/constructive-react/src/api/orm/models/platformReservedSubdomain.ts @@ -0,0 +1,247 @@ +/** + * PlatformReservedSubdomain 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 { + PlatformReservedSubdomain, + PlatformReservedSubdomainWithRelations, + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy, + CreatePlatformReservedSubdomainInput, + UpdatePlatformReservedSubdomainInput, + PlatformReservedSubdomainPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformReservedSubdomainModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformReservedSubdomains: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformReservedSubdomain', + 'platformReservedSubdomains', + 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, + }, + 'PlatformReservedSubdomainFilter', + 'PlatformReservedSubdomainOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformReservedSubdomain', + fieldName: 'platformReservedSubdomains', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformReservedSubdomain: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformReservedSubdomain', + 'platformReservedSubdomains', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformReservedSubdomainFilter', + 'PlatformReservedSubdomainOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformReservedSubdomain', + fieldName: 'platformReservedSubdomain', + document, + variables, + transform: (data: { + platformReservedSubdomains?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformReservedSubdomain: data.platformReservedSubdomains?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformReservedSubdomain: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformReservedSubdomain', + 'platformReservedSubdomains', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformReservedSubdomainFilter', + 'PlatformReservedSubdomainOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformReservedSubdomain', + fieldName: 'platformReservedSubdomain', + document, + variables, + transform: (data: { + platformReservedSubdomains?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformReservedSubdomain: data.platformReservedSubdomains?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformReservedSubdomain', + 'createPlatformReservedSubdomain', + 'platformReservedSubdomain', + args.select, + args.data, + 'CreatePlatformReservedSubdomainInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformReservedSubdomain', + fieldName: 'createPlatformReservedSubdomain', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformReservedSubdomainPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformReservedSubdomain', + 'updatePlatformReservedSubdomain', + 'platformReservedSubdomain', + args.select, + args.where.id, + args.data, + 'UpdatePlatformReservedSubdomainInput', + 'id', + 'platformReservedSubdomainPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformReservedSubdomain', + fieldName: 'updatePlatformReservedSubdomain', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformReservedSubdomain', + 'deletePlatformReservedSubdomain', + 'platformReservedSubdomain', + { + id: args.where.id, + }, + 'DeletePlatformReservedSubdomainInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformReservedSubdomain', + fieldName: 'deletePlatformReservedSubdomain', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/api/orm/mutation/index.ts b/sdk/constructive-react/src/api/orm/mutation/index.ts index 0afacc078c..2e33f95824 100644 --- a/sdk/constructive-react/src/api/orm/mutation/index.ts +++ b/sdk/constructive-react/src/api/orm/mutation/index.ts @@ -10,7 +10,6 @@ import type { AcceptDatabaseTransferInput, ApplyRlsInput, CancelDatabaseTransferInput, - CreateFunctionFromSourceInput, DeleteSitePreviewInput, DomainsAssignSubdomainInput, MintSitePreviewTokenInput, @@ -37,11 +36,9 @@ import type { SitesProvisionStaticSiteInput, SuspendDatabaseInput, UnsuspendDatabaseInput, - UpdateFunctionFromSourceInput, AcceptDatabaseTransferPayload, ApplyRlsPayload, CancelDatabaseTransferPayload, - CreateFunctionPayload, DeleteSitePreviewPayload, DomainsAssignSubdomainPayload, MintSitePreviewTokenPayload, @@ -68,11 +65,9 @@ import type { SitesProvisionStaticSitePayload, SuspendDatabasePayload, UnsuspendDatabasePayload, - UpdateFunctionPayload, AcceptDatabaseTransferPayloadSelect, ApplyRlsPayloadSelect, CancelDatabaseTransferPayloadSelect, - CreateFunctionPayloadSelect, DeleteSitePreviewPayloadSelect, DomainsAssignSubdomainPayloadSelect, MintSitePreviewTokenPayloadSelect, @@ -99,7 +94,6 @@ import type { SitesProvisionStaticSitePayloadSelect, SuspendDatabasePayloadSelect, UnsuspendDatabasePayloadSelect, - UpdateFunctionPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface AcceptDatabaseTransferVariables { @@ -111,13 +105,6 @@ export interface ApplyRlsVariables { export interface CancelDatabaseTransferVariables { input: CancelDatabaseTransferInput; } -/** - * Variables for createFunctionFromSource - * Creates a `Function` from its `CREATE FUNCTION` source text. - */ -export interface CreateFunctionFromSourceVariables { - input: CreateFunctionFromSourceInput; -} export interface DeleteSitePreviewVariables { input: DeleteSitePreviewInput; } @@ -216,13 +203,6 @@ export interface SuspendDatabaseVariables { export interface UnsuspendDatabaseVariables { input: UnsuspendDatabaseInput; } -/** - * Variables for updateFunctionFromSource - * Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. - */ -export interface UpdateFunctionFromSourceVariables { - input: UpdateFunctionFromSourceInput; -} export function createMutationOperations(client: OrmClient) { return { acceptDatabaseTransfer: ( @@ -312,35 +292,6 @@ export function createMutationOperations(client: OrmClient) { 'CancelDatabaseTransferPayload' ), }), - createFunctionFromSource: ( - args: CreateFunctionFromSourceVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - createFunctionFromSource: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'CreateFunctionFromSource', - fieldName: 'createFunctionFromSource', - ...buildCustomDocument( - 'mutation', - 'CreateFunctionFromSource', - 'createFunctionFromSource', - options.select, - args, - [ - { - name: 'input', - type: 'CreateFunctionFromSourceInput!', - }, - ], - connectionFieldsMap, - 'CreateFunctionPayload' - ), - }), deleteSitePreview: ( args: DeleteSitePreviewVariables, options: { @@ -1113,34 +1064,5 @@ export function createMutationOperations(client: OrmClient) { 'UnsuspendDatabasePayload' ), }), - updateFunctionFromSource: ( - args: UpdateFunctionFromSourceVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - updateFunctionFromSource: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'UpdateFunctionFromSource', - fieldName: 'updateFunctionFromSource', - ...buildCustomDocument( - 'mutation', - 'UpdateFunctionFromSource', - 'updateFunctionFromSource', - options.select, - args, - [ - { - name: 'input', - type: 'UpdateFunctionFromSourceInput!', - }, - ], - connectionFieldsMap, - 'UpdateFunctionPayload' - ), - }), }; } diff --git a/sdk/constructive-react/src/api/orm/query/index.ts b/sdk/constructive-react/src/api/orm/query/index.ts index 12ea7b4e72..cfae605185 100644 --- a/sdk/constructive-react/src/api/orm/query/index.ts +++ b/sdk/constructive-react/src/api/orm/query/index.ts @@ -6,11 +6,7 @@ import { OrmClient } from '../client'; import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; -import type { ResolveRouteRecord, ResolveRouteRecordSelect } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export interface ApiSchemaNamesVariables { - targetApiId?: string; -} export interface ApplyRegistryDefaultsVariables { data?: unknown; nodeType?: string; @@ -50,18 +46,6 @@ export interface PlatformVerifySitePreviewTokenVariables { siteId?: string; token?: string; } -export interface ResolveDeepLinkVariables { - linkSlug?: string; - targetSiteId?: string; -} -export interface ResolveRouteVariables { - requestHost?: string; - requestMethod?: string; - requestPath?: string; -} -export interface ResolveSiteAppLinksVariables { - targetSiteId?: string; -} export interface SitesDeepLinkUrlVariables { linkSlug?: string; targetSiteId?: string; @@ -75,35 +59,6 @@ export interface VerifySitePreviewTokenVariables { } export function createQueryOperations(client: OrmClient) { return { - apiSchemaNames: ( - args: ApiSchemaNamesVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - apiSchemaNames: unknown | null; - }>({ - client, - operation: 'query', - operationName: 'ApiSchemaNames', - fieldName: 'apiSchemaNames', - ...buildCustomDocument( - 'query', - 'ApiSchemaNames', - 'apiSchemaNames', - options?.select, - args, - [ - { - name: 'targetApiId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), applyRegistryDefaults: ( args: ApplyRegistryDefaultsVariables, options?: { @@ -449,105 +404,6 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - resolveDeepLink: ( - args: ResolveDeepLinkVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveDeepLink: unknown | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveDeepLink', - fieldName: 'resolveDeepLink', - ...buildCustomDocument( - 'query', - 'ResolveDeepLink', - 'resolveDeepLink', - options?.select, - args, - [ - { - name: 'linkSlug', - type: 'String', - }, - { - name: 'targetSiteId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), - resolveRoute: ( - args: ResolveRouteVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - resolveRoute: InferSelectResult | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveRoute', - fieldName: 'resolveRoute', - ...buildCustomDocument( - 'query', - 'ResolveRoute', - 'resolveRoute', - options.select, - args, - [ - { - name: 'requestHost', - type: 'String', - }, - { - name: 'requestMethod', - type: 'String', - }, - { - name: 'requestPath', - type: 'String', - }, - ], - connectionFieldsMap, - 'ResolveRouteRecord' - ), - }), - resolveSiteAppLinks: ( - args: ResolveSiteAppLinksVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveSiteAppLinks: unknown | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveSiteAppLinks', - fieldName: 'resolveSiteAppLinks', - ...buildCustomDocument( - 'query', - 'ResolveSiteAppLinks', - 'resolveSiteAppLinks', - options?.select, - args, - [ - { - name: 'targetSiteId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), sitesDeepLinkUrl: ( args: SitesDeepLinkUrlVariables, options?: { diff --git a/sdk/constructive-react/src/api/schema-types.ts b/sdk/constructive-react/src/api/schema-types.ts index eb20b05828..f02866538b 100644 --- a/sdk/constructive-react/src/api/schema-types.ts +++ b/sdk/constructive-react/src/api/schema-types.ts @@ -54,6 +54,7 @@ import type { PlatformGetSitePreviewsRecord, PlatformManagedDomain, PlatformPage, + PlatformReservedSubdomain, PlatformSite, PlatformSiteAppLink, PlatformSiteDeepLink, @@ -125,8 +126,6 @@ export type ApiOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLISHED_ASC' @@ -1214,8 +1213,6 @@ export type PlatformApiOrderBy = | 'CONFIG_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLISHED_ASC' @@ -1554,6 +1551,27 @@ export type PlatformPageOrderBy = | 'STORE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `PlatformReservedSubdomain`. */ +export type PlatformReservedSubdomainOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LABEL_ASC' + | 'LABEL_DESC' + | 'MATCH_ASC' + | 'MATCH_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REASON_ASC' + | 'REASON_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; /** Methods to use when ordering `PlatformSiteAppLink`. */ export type PlatformSiteAppLinkOrderBy = | 'APP_STORE_IDENTITY_ID_ASC' @@ -2722,8 +2740,6 @@ export interface ApiFilter { 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. */ @@ -2748,8 +2764,6 @@ export interface ApiInput { 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; @@ -2768,8 +2782,6 @@ export interface ApiPatch { 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; @@ -3434,15 +3446,6 @@ export interface CreateFullTextSearchInput { /** The `FullTextSearch` to be created by this mutation. */ fullTextSearch: FullTextSearchInput; } -/** Author a function from its `CREATE FUNCTION` source text. */ -export interface CreateFunctionFromSourceInput { - apiExposed?: boolean; - clientMutationId?: string; - databaseId: string; - schemaId: string; - /** One `CREATE FUNCTION` statement (LANGUAGE plpgsql or sql). */ - source: string; -} export interface CreateFunctionInput { clientMutationId?: string; /** The `Function` to be created by this mutation. */ @@ -3538,6 +3541,11 @@ export interface CreatePlatformPageInput { /** The `PlatformPage` to be created by this mutation. */ platformPage: PlatformPageInput; } +export interface CreatePlatformReservedSubdomainInput { + clientMutationId?: string; + /** The `PlatformReservedSubdomain` to be created by this mutation. */ + platformReservedSubdomain: PlatformReservedSubdomainInput; +} export interface CreatePlatformSiteAppLinkInput { clientMutationId?: string; /** The `PlatformSiteAppLink` to be created by this mutation. */ @@ -4740,6 +4748,10 @@ export interface DeletePlatformPageInput { /** Unique page identifier */ id: string; } +export interface DeletePlatformReservedSubdomainInput { + clientMutationId?: string; + id: string; +} export interface DeletePlatformSiteAppLinkInput { clientMutationId?: string; id: string; @@ -6971,8 +6983,6 @@ export interface PlatformApiFilter { 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. */ @@ -7007,8 +7017,6 @@ export interface PlatformApiInput { /** 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; @@ -7025,8 +7033,6 @@ export interface PlatformApiPatch { /** 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; @@ -8101,6 +8107,59 @@ export interface PlatformProvisionSitePreviewInput { name?: string; siteId?: string; } +/** A filter to be used against `PlatformReservedSubdomain` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformReservedSubdomainFilter { + /** Checks for all expressions in this list. */ + and?: PlatformReservedSubdomainFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `label` field. */ + label?: StringFilter; + /** Filter by the object’s `match` field. */ + match?: StringFilter; + /** Negates the expression. */ + not?: PlatformReservedSubdomainFilter; + /** Checks for any expressions in this list. */ + or?: PlatformReservedSubdomainFilter[]; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} +/** An input for mutations affecting `PlatformReservedSubdomain` */ +export interface PlatformReservedSubdomainInput { + createdAt?: string; + createdByPrincipal?: string; + id?: string; + /** Lowercase subdomain label, or the label prefix/suffix the match names */ + label: string; + /** How the label matches a claimed label: exact, prefix or suffix */ + match?: string; + /** Why the label is reserved (free text, e.g. platform, brand, lookalike) */ + reason?: string; + updatedAt?: string; + updatedByPrincipal?: string; +} +/** Represents an update to a `PlatformReservedSubdomain`. Fields that are set will be updated. */ +export interface PlatformReservedSubdomainPatch { + createdAt?: string; + createdByPrincipal?: string; + id?: string; + /** Lowercase subdomain label, or the label prefix/suffix the match names */ + label?: string; + /** How the label matches a claimed label: exact, prefix or suffix */ + match?: string; + /** Why the label is reserved (free text, e.g. platform, brand, lookalike) */ + reason?: string; + updatedAt?: string; + updatedByPrincipal?: string; +} export interface PlatformSetSitePreviewInput { clientMutationId?: string; targetCommitId?: string; @@ -11551,13 +11610,6 @@ export interface UpdateFullTextSearchInput { fullTextSearchPatch: FullTextSearchPatch; id: string; } -/** Replace a function's definition from its `CREATE FUNCTION` source text. */ -export interface UpdateFunctionFromSourceInput { - clientMutationId?: string; - id: string; - /** One `CREATE FUNCTION` statement (LANGUAGE plpgsql or sql). */ - source: string; -} export interface UpdateFunctionInput { clientMutationId?: string; /** An object where the defined keys will be set on the `Function` being updated. */ @@ -11674,6 +11726,12 @@ export interface UpdatePlatformPageInput { /** An object where the defined keys will be set on the `PlatformPage` being updated. */ platformPagePatch: PlatformPagePatch; } +export interface UpdatePlatformReservedSubdomainInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `PlatformReservedSubdomain` being updated. */ + platformReservedSubdomainPatch: PlatformReservedSubdomainPatch; +} export interface UpdatePlatformSiteAppLinkInput { clientMutationId?: string; id: string; @@ -12751,6 +12809,13 @@ export interface PlatformPageConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `PlatformReservedSubdomain` values. */ +export interface PlatformReservedSubdomainConnection { + edges: PlatformReservedSubdomainEdge[]; + nodes: PlatformReservedSubdomain[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `PlatformSiteAppLink` values. */ export interface PlatformSiteAppLinkConnection { edges: PlatformSiteAppLinkEdge[]; @@ -12842,25 +12907,6 @@ export interface RedirectConnection { pageInfo: PageInfo; totalCount: number; } -export interface ResolveRouteRecord { - domainId?: string | null; - hostname?: string | null; - matchedPath?: string | null; - matchedWildcard?: boolean | null; - method?: string | null; - priority?: number | null; - resolvedConfig?: unknown | null; - routeBindingId?: string | null; - servingLane?: string | null; - targetCatalogId?: string | null; - targetModule?: string | null; - targetOwnerKey?: string | null; - targetOwnerScope?: string | null; - targetSourceId?: string | null; - tlsSecretName?: string | null; - tlsStatus?: string | null; - verificationStatus?: string | null; -} /** A connection to a list of `RlsSetting` values. */ export interface RlsSettingConnection { edges: RlsSettingEdge[]; @@ -13338,6 +13384,12 @@ export interface CreatePlatformPagePayload { platformPage?: PlatformPage | null; platformPageEdge?: PlatformPageEdge | null; } +export interface CreatePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was created by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} export interface CreatePlatformSitePayload { clientMutationId?: string | null; /** The `PlatformSite` that was created by this mutation. */ @@ -13848,6 +13900,12 @@ export interface DeletePlatformPagePayload { platformPage?: PlatformPage | null; platformPageEdge?: PlatformPageEdge | null; } +export interface DeletePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was deleted by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} export interface DeletePlatformSitePayload { clientMutationId?: string | null; /** The `PlatformSite` that was deleted by this mutation. */ @@ -14472,6 +14530,12 @@ export interface UpdatePlatformPagePayload { platformPage?: PlatformPage | null; platformPageEdge?: PlatformPageEdge | null; } +export interface UpdatePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was updated by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} export interface UpdatePlatformSitePayload { clientMutationId?: string | null; /** The `PlatformSite` that was updated by this mutation. */ @@ -14717,19 +14781,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -15044,6 +15110,12 @@ export interface PlatformPageEdge { /** The `PlatformPage` at the end of the edge. */ node?: PlatformPage | null; } +/** A `PlatformReservedSubdomain` edge in the connection. */ +export interface PlatformReservedSubdomainEdge { + cursor?: string | null; + /** The `PlatformReservedSubdomain` at the end of the edge. */ + node?: PlatformReservedSubdomain | null; +} /** A `PlatformSiteAppLink` edge in the connection. */ export interface PlatformSiteAppLinkEdge { cursor?: string | null; @@ -15380,6 +15452,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -15389,6 +15463,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -15402,7 +15482,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -15417,7 +15497,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -15445,7 +15525,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -15460,13 +15540,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -15484,17 +15564,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -15567,7 +15647,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -15578,7 +15658,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -15596,10 +15676,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-react/src/api/types.ts b/sdk/constructive-react/src/api/types.ts index 89bc1cf1c7..db9ec9efb5 100644 --- a/sdk/constructive-react/src/api/types.ts +++ b/sdk/constructive-react/src/api/types.ts @@ -10,7 +10,6 @@ export interface Api { config: unknown | null; createdAt: string | null; databaseId: string | null; - dbname: string | null; id: string | null; isPublished: boolean | null; name: string | null; @@ -549,7 +548,6 @@ export interface PlatformApi { anonRole: string | null; config: unknown | null; createdAt: string | null; - dbname: string | null; id: string | null; isPublished: boolean | null; name: string | null; @@ -717,6 +715,16 @@ export interface PlatformPage { storeId: string | null; updatedAt: string | null; } +export interface PlatformReservedSubdomain { + createdAt: string | null; + createdByPrincipal: string | null; + id: string | null; + label: string | null; + match: string | null; + reason: string | null; + updatedAt: string | null; + updatedByPrincipal: string | null; +} export interface PlatformSiteAppLink { appStoreIdentityId: string | null; createdAt: string | null; diff --git a/sdk/constructive-react/src/auth/README.md b/sdk/constructive-react/src/auth/README.md index c4ed001355..94e42532d4 100644 --- a/sdk/constructive-react/src/auth/README.md +++ b/sdk/constructive-react/src/auth/README.md @@ -9,8 +9,8 @@ ## Overview - **Tables:** 15 -- **Custom queries:** 6 -- **Custom mutations:** 55 +- **Custom queries:** 7 +- **Custom mutations:** 56 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/auth/hooks/README.md b/sdk/constructive-react/src/auth/hooks/README.md index 5cf4da76c9..9a71356a6c 100644 --- a/sdk/constructive-react/src/auth/hooks/README.md +++ b/sdk/constructive-react/src/auth/hooks/README.md @@ -110,12 +110,13 @@ function App() { | `useCurrentUserIdQuery` | Query | currentUserId | | `useGetMfaStatusQuery` | Query | getMfaStatus | | `useRequireStepUpQuery` | Query | requireStepUp | +| `useSignInOptionsQuery` | Query | signInOptions | | `useApproveDeviceMutation` | Mutation | approveDevice | | `useCheckPasswordMutation` | Mutation | checkPassword | | `useCompleteMfaChallengeMutation` | Mutation | completeMfaChallenge | | `useConfirmDeleteAccountMutation` | Mutation | confirmDeleteAccount | | `useConfirmTotpSetupMutation` | Mutation | confirmTotpSetup | -| `useCreateApiKeyMutation` | Mutation | createApiKey | +| `useCreateApiKeyMutation` | Mutation | Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key. | | `useCreateChildPrincipalMutation` | Mutation | createChildPrincipal | | `useCreateOrgApiKeyMutation` | Mutation | createOrgApiKey | | `useCreateOrgPrincipalMutation` | Mutation | createOrgPrincipal | @@ -129,6 +130,7 @@ function App() { | `useEnableEmailMfaMutation` | Mutation | enableEmailMfa | | `useEnableSmsMfaMutation` | Mutation | enableSmsMfa | | `useEnableTotpMutation` | Mutation | enableTotp | +| `useExchangeNativeHandoffMutation` | Mutation | exchangeNativeHandoff | | `useExtendTokenExpiresMutation` | Mutation | extendTokenExpires | | `useForgotPasswordMutation` | Mutation | forgotPassword | | `useGenerateBackupCodesMutation` | Mutation | generateBackupCodes | @@ -530,6 +532,13 @@ requireStepUp |----------|------| | `stepUpType` | String | +### `useSignInOptionsQuery` + +signInOptions + +- **Type:** query +- **Arguments:** none + ### `useApproveDeviceMutation` approveDevice @@ -587,7 +596,7 @@ confirmTotpSetup ### `useCreateApiKeyMutation` -createApiKey +Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key. - **Type:** mutation - **Arguments:** @@ -739,6 +748,17 @@ enableTotp |----------|------| | `input` | EnableTotpInput (required) | +### `useExchangeNativeHandoffMutation` + +exchangeNativeHandoff + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ExchangeNativeHandoffInput (required) | + ### `useExtendTokenExpiresMutation` extendTokenExpires diff --git a/sdk/constructive-react/src/auth/hooks/mutation-keys.ts b/sdk/constructive-react/src/auth/hooks/mutation-keys.ts index ea11abc608..90d5ace194 100644 --- a/sdk/constructive-react/src/auth/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/auth/hooks/mutation-keys.ts @@ -236,6 +236,10 @@ export const customMutationKeys = { identifier ? (['mutation', 'enableTotp', identifier] as const) : (['mutation', 'enableTotp'] as const), + /** Mutation key for exchangeNativeHandoff */ exchangeNativeHandoff: (identifier?: string) => + identifier + ? (['mutation', 'exchangeNativeHandoff', identifier] as const) + : (['mutation', 'exchangeNativeHandoff'] as const), /** Mutation key for extendTokenExpires */ extendTokenExpires: (identifier?: string) => identifier ? (['mutation', 'extendTokenExpires', identifier] as const) diff --git a/sdk/constructive-react/src/auth/hooks/mutations/index.ts b/sdk/constructive-react/src/auth/hooks/mutations/index.ts index ef74460847..9ae31a3468 100644 --- a/sdk/constructive-react/src/auth/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/auth/hooks/mutations/index.ts @@ -55,6 +55,7 @@ export * from './useDisconnectAccountMutation'; export * from './useEnableEmailMfaMutation'; export * from './useEnableSmsMfaMutation'; export * from './useEnableTotpMutation'; +export * from './useExchangeNativeHandoffMutation'; export * from './useExtendTokenExpiresMutation'; export * from './useForgotPasswordMutation'; export * from './useGenerateBackupCodesMutation'; diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useExchangeNativeHandoffMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useExchangeNativeHandoffMutation.ts new file mode 100644 index 0000000000..6eec737c16 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useExchangeNativeHandoffMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for exchangeNativeHandoff + * @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 { ExchangeNativeHandoffVariables } from '../../orm/mutation'; +import type { + ExchangeNativeHandoffPayloadSelect, + ExchangeNativeHandoffPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { ExchangeNativeHandoffVariables } from '../../orm/mutation'; +export type { ExchangeNativeHandoffPayloadSelect } from '../../orm/input-types'; +export function useExchangeNativeHandoffMutation( + params: { + selection: { + fields: S & ExchangeNativeHandoffPayloadSelect; + } & HookStrictSelect, ExchangeNativeHandoffPayloadSelect>; + } & Omit< + UseMutationOptions< + { + exchangeNativeHandoff: InferSelectResult | null; + }, + Error, + ExchangeNativeHandoffVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + exchangeNativeHandoff: InferSelectResult | null; + }, + Error, + ExchangeNativeHandoffVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.exchangeNativeHandoff(), + mutationFn: (variables: ExchangeNativeHandoffVariables) => + getClient() + .mutation.exchangeNativeHandoff(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/index.ts b/sdk/constructive-react/src/auth/hooks/queries/index.ts index 0baeef2927..06ae02a663 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/index.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/index.ts @@ -38,3 +38,4 @@ export * from './useCurrentUserAgentQuery'; export * from './useCurrentUserIdQuery'; export * from './useGetMfaStatusQuery'; export * from './useRequireStepUpQuery'; +export * from './useSignInOptionsQuery'; diff --git a/sdk/constructive-react/src/auth/hooks/queries/useSignInOptionsQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useSignInOptionsQuery.ts new file mode 100644 index 0000000000..f94a924d57 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/useSignInOptionsQuery.ts @@ -0,0 +1,127 @@ +/** + * Custom query hook for signInOptions + * @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 { SignInOptionsRecordSelect, SignInOptionsRecord } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { SignInOptionsRecordSelect } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const signInOptionsQueryKey = customQueryKeys.signInOptions; +/** + * Query hook for signInOptions + * + * @example + * ```tsx + * const { data, isLoading } = useSignInOptionsQuery({ selection: { fields: { id: true } } }); + * + * if (data?.signInOptions) { + * console.log(data.signInOptions); + * } + * ``` + */ +export function useSignInOptionsQuery< + S extends SignInOptionsRecordSelect, + TData = { + signInOptions: InferSelectResult | null; + }, +>( + params: { + selection: { + fields: S & SignInOptionsRecordSelect; + } & HookStrictSelect, SignInOptionsRecordSelect>; + } & Omit< + UseQueryOptions< + { + signInOptions: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useSignInOptionsQuery( + params: { + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: signInOptionsQueryKey(), + queryFn: () => + getClient() + .query.signInOptions({ + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch signInOptions without React hooks + * + * @example + * ```ts + * const data = await fetchSignInOptionsQuery({ selection: { fields: { id: true } } }); + * ``` + */ +export async function fetchSignInOptionsQuery(params: { + selection: { + fields: S & SignInOptionsRecordSelect; + } & HookStrictSelect, SignInOptionsRecordSelect>; +}): Promise<{ + signInOptions: InferSelectResult | null; +}>; +export async function fetchSignInOptionsQuery(params: { + selection: SelectionConfig; +}) { + const args = buildSelectionArgs(params.selection); + return getClient() + .query.signInOptions({ + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch signInOptions for SSR or cache warming + * + * @example + * ```ts + * await prefetchSignInOptionsQuery(queryClient, { selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchSignInOptionsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S & SignInOptionsRecordSelect; + } & HookStrictSelect, SignInOptionsRecordSelect>; + } +): Promise; +export async function prefetchSignInOptionsQuery( + queryClient: QueryClient, + params: { + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: signInOptionsQueryKey(), + queryFn: () => + getClient() + .query.signInOptions({ + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/query-keys.ts b/sdk/constructive-react/src/auth/hooks/query-keys.ts index 57cfc97741..5d00c09400 100644 --- a/sdk/constructive-react/src/auth/hooks/query-keys.ts +++ b/sdk/constructive-react/src/auth/hooks/query-keys.ts @@ -167,6 +167,7 @@ export const customQueryKeys = { /** Query key for getMfaStatus */ getMfaStatus: () => ['getMfaStatus'] as const, /** Query key for requireStepUp */ requireStepUp: (variables?: object) => ['requireStepUp', variables] as const, + /** Query key for signInOptions */ signInOptions: () => ['signInOptions'] as const, } as const; /** diff --git a/sdk/constructive-react/src/auth/orm/README.md b/sdk/constructive-react/src/auth/orm/README.md index 6e93f55c69..ea78b8958e 100644 --- a/sdk/constructive-react/src/auth/orm/README.md +++ b/sdk/constructive-react/src/auth/orm/README.md @@ -662,6 +662,17 @@ requireStepUp const result = await db.query.requireStepUp({ stepUpType: '' }).execute(); ``` +### `db.query.signInOptions` + +signInOptions + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.signInOptions().execute(); +``` + ### `db.mutation.approveDevice` approveDevice @@ -739,7 +750,7 @@ const result = await db.mutation.confirmTotpSetup({ input: { totpValue: '' }).execute(); ``` +### `db.mutation.exchangeNativeHandoff` + +exchangeNativeHandoff + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ExchangeNativeHandoffInput (required) | + +```typescript +const result = await db.mutation.exchangeNativeHandoff({ input: { code: '', codeVerifier: '', credentialKind: '' } }).execute(); +``` + ### `db.mutation.extendTokenExpires` extendTokenExpires @@ -1084,7 +1110,7 @@ requestMagicLink | `input` | RequestMagicLinkInput (required) | ```typescript -const result = await db.mutation.requestMagicLink({ input: { email: '', next: '' } }).execute(); +const result = await db.mutation.requestMagicLink({ input: { codeChallenge: '', email: '', nativeRedirectUri: '', next: '' } }).execute(); ``` ### `db.mutation.resetPassword` @@ -1249,7 +1275,7 @@ setPassword | `input` | SetPasswordInput (required) | ```typescript -const result = await db.mutation.setPassword({ input: { currentPassword: '', newPassword: '' } }).execute(); +const result = await db.mutation.setPassword({ input: { currentPassword: '', newPassword: '', signOutOtherSessions: '' } }).execute(); ``` ### `db.mutation.setPrincipalEntities` diff --git a/sdk/constructive-react/src/auth/orm/input-types.ts b/sdk/constructive-react/src/auth/orm/input-types.ts index 1289140d59..f2a533f238 100644 --- a/sdk/constructive-react/src/auth/orm/input-types.ts +++ b/sdk/constructive-react/src/auth/orm/input-types.ts @@ -2122,6 +2122,12 @@ export interface EnableSmsMfaInput { export interface EnableTotpInput { clientMutationId?: string; } +export interface ExchangeNativeHandoffInput { + clientMutationId?: string; + code?: string; + codeVerifier?: string; + credentialKind?: string; +} export interface ExtendTokenExpiresInput { amount?: IntervalInput; clientMutationId?: string; @@ -2167,7 +2173,9 @@ export interface RequestCrossOriginTokenInput { } export interface RequestMagicLinkInput { clientMutationId?: string; + codeChallenge?: string; email?: string; + nativeRedirectUri?: string; next?: string; } export interface ResetPasswordInput { @@ -2218,6 +2226,7 @@ export interface SetPasswordInput { clientMutationId?: string; currentPassword?: string; newPassword?: string; + signOutOtherSessions?: boolean; } export interface SetPrincipalEntitiesInput { clientMutationId?: string; @@ -3646,6 +3655,46 @@ export type GetMfaStatusRecordSelect = { smsMfaEnabled?: boolean; totpEnabled?: boolean; }; +export interface SignInOptionsRecord { + allowAnonymousSessions?: boolean | null; + allowEmailOtpSignIn?: boolean | null; + allowIdentitySignIn?: boolean | null; + allowIdentitySignUp?: boolean | null; + allowMagicLinkSignIn?: boolean | null; + allowMagicLinkSignUp?: boolean | null; + allowPasswordSignIn?: boolean | null; + allowPasswordSignUp?: boolean | null; + allowSignUp?: boolean | null; + allowSmsSignIn?: boolean | null; + allowSmsSignUp?: boolean | null; + allowWebauthnSignIn?: boolean | null; + allowWebauthnSignUp?: boolean | null; + allowWebauthnUsernameless?: boolean | null; + enableCaptcha?: boolean | null; + identityProviders?: Record | null; + requireMfa?: boolean | null; + signUpRequiresInvite?: boolean | null; +} +export type SignInOptionsRecordSelect = { + allowAnonymousSessions?: boolean; + allowEmailOtpSignIn?: boolean; + allowIdentitySignIn?: boolean; + allowIdentitySignUp?: boolean; + allowMagicLinkSignIn?: boolean; + allowMagicLinkSignUp?: boolean; + allowPasswordSignIn?: boolean; + allowPasswordSignUp?: boolean; + allowSignUp?: boolean; + allowSmsSignIn?: boolean; + allowSmsSignUp?: boolean; + allowWebauthnSignIn?: boolean; + allowWebauthnSignUp?: boolean; + allowWebauthnUsernameless?: boolean; + enableCaptcha?: boolean; + identityProviders?: boolean; + requireMfa?: boolean; + signUpRequiresInvite?: boolean; +}; export interface ApproveDevicePayload { clientMutationId?: string | null; result?: boolean | null; @@ -3802,6 +3851,16 @@ export type EnableTotpPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface ExchangeNativeHandoffPayload { + clientMutationId?: string | null; + result?: ExchangeNativeHandoffRecord | null; +} +export type ExchangeNativeHandoffPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: ExchangeNativeHandoffRecordSelect; + }; +}; export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; @@ -4558,6 +4617,22 @@ export type CreateOrgApiKeyRecordSelect = { expiresAt?: boolean; keyId?: boolean; }; +export interface ExchangeNativeHandoffRecord { + accessToken?: string | null; + accessTokenExpiresAt?: string | null; + id?: string | null; + isVerified?: boolean | null; + totpEnabled?: boolean | null; + userId?: string | null; +} +export type ExchangeNativeHandoffRecordSelect = { + accessToken?: boolean; + accessTokenExpiresAt?: boolean; + id?: boolean; + isVerified?: boolean; + totpEnabled?: boolean; + userId?: boolean; +}; export interface ExtendTokenExpiresRecord { expiresAt?: string | null; id?: string | null; @@ -4645,18 +4720,22 @@ export type SignInCrossOriginRecordSelect = { export interface SignInMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; + codeChallenge?: string | null; deviceApprovalRequired?: boolean | null; mfaChallengeToken?: string | null; mfaRequired?: boolean | null; + nativeRedirectUri?: string | null; outDeviceToken?: string | null; userId?: string | null; } export type SignInMagicLinkRecordSelect = { accessToken?: boolean; accessTokenExpiresAt?: boolean; + codeChallenge?: boolean; deviceApprovalRequired?: boolean; mfaChallengeToken?: boolean; mfaRequired?: boolean; + nativeRedirectUri?: boolean; outDeviceToken?: boolean; userId?: boolean; }; @@ -4681,12 +4760,16 @@ export type SignInSmsOtpRecordSelect = { export interface SignUpMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; + codeChallenge?: string | null; + nativeRedirectUri?: string | null; outDeviceToken?: string | null; userId?: string | null; } export type SignUpMagicLinkRecordSelect = { accessToken?: boolean; accessTokenExpiresAt?: boolean; + codeChallenge?: boolean; + nativeRedirectUri?: boolean; outDeviceToken?: boolean; userId?: boolean; }; diff --git a/sdk/constructive-react/src/auth/orm/mutation/index.ts b/sdk/constructive-react/src/auth/orm/mutation/index.ts index 39394d78e4..b8c511d386 100644 --- a/sdk/constructive-react/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-react/src/auth/orm/mutation/index.ts @@ -26,6 +26,7 @@ import type { EnableEmailMfaInput, EnableSmsMfaInput, EnableTotpInput, + ExchangeNativeHandoffInput, ExtendTokenExpiresInput, ForgotPasswordInput, GenerateBackupCodesInput, @@ -81,6 +82,7 @@ import type { EnableEmailMfaPayload, EnableSmsMfaPayload, EnableTotpPayload, + ExchangeNativeHandoffPayload, ExtendTokenExpiresPayload, ForgotPasswordPayload, GenerateBackupCodesPayload, @@ -136,6 +138,7 @@ import type { EnableEmailMfaPayloadSelect, EnableSmsMfaPayloadSelect, EnableTotpPayloadSelect, + ExchangeNativeHandoffPayloadSelect, ExtendTokenExpiresPayloadSelect, ForgotPasswordPayloadSelect, GenerateBackupCodesPayloadSelect, @@ -189,6 +192,10 @@ export interface ConfirmDeleteAccountVariables { export interface ConfirmTotpSetupVariables { input: ConfirmTotpSetupInput; } +/** + * Variables for createApiKey + * Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key. + */ export interface CreateApiKeyVariables { input: CreateApiKeyInput; } @@ -231,6 +238,9 @@ export interface EnableSmsMfaVariables { export interface EnableTotpVariables { input: EnableTotpInput; } +export interface ExchangeNativeHandoffVariables { + input: ExchangeNativeHandoffInput; +} export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; } @@ -901,6 +911,35 @@ export function createMutationOperations(client: OrmClient) { 'EnableTotpPayload' ), }), + exchangeNativeHandoff: ( + args: ExchangeNativeHandoffVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + exchangeNativeHandoff: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ExchangeNativeHandoff', + fieldName: 'exchangeNativeHandoff', + ...buildCustomDocument( + 'mutation', + 'ExchangeNativeHandoff', + 'exchangeNativeHandoff', + options.select, + args, + [ + { + name: 'input', + type: 'ExchangeNativeHandoffInput!', + }, + ], + connectionFieldsMap, + 'ExchangeNativeHandoffPayload' + ), + }), extendTokenExpires: ( args: ExtendTokenExpiresVariables, options: { diff --git a/sdk/constructive-react/src/auth/orm/query/index.ts b/sdk/constructive-react/src/auth/orm/query/index.ts index 671fb80d21..aa77870a50 100644 --- a/sdk/constructive-react/src/auth/orm/query/index.ts +++ b/sdk/constructive-react/src/auth/orm/query/index.ts @@ -9,8 +9,10 @@ import type { InferSelectResult, StrictSelect } from '../select-types'; import type { User, GetMfaStatusRecord, + SignInOptionsRecord, UserSelect, GetMfaStatusRecordSelect, + SignInOptionsRecordSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface RequireStepUpVariables { @@ -150,5 +152,28 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + signInOptions: ( + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + signInOptions: InferSelectResult | null; + }>({ + client, + operation: 'query', + operationName: 'SignInOptions', + fieldName: 'signInOptions', + ...buildCustomDocument( + 'query', + 'SignInOptions', + 'signInOptions', + options.select, + undefined, + [], + connectionFieldsMap, + 'SignInOptionsRecord' + ), + }), }; } diff --git a/sdk/constructive-react/src/auth/schema-types.ts b/sdk/constructive-react/src/auth/schema-types.ts index 7c40ace397..3a28371747 100644 --- a/sdk/constructive-react/src/auth/schema-types.ts +++ b/sdk/constructive-react/src/auth/schema-types.ts @@ -950,6 +950,12 @@ export interface EnableSmsMfaInput { export interface EnableTotpInput { clientMutationId?: string; } +export interface ExchangeNativeHandoffInput { + clientMutationId?: string; + code?: string; + codeVerifier?: string; + credentialKind?: string; +} export interface ExtendTokenExpiresInput { amount?: IntervalInput; clientMutationId?: string; @@ -1292,7 +1298,9 @@ export interface RequestCrossOriginTokenInput { } export interface RequestMagicLinkInput { clientMutationId?: string; + codeChallenge?: string; email?: string; + nativeRedirectUri?: string; next?: string; } export interface ResetPasswordInput { @@ -1366,6 +1374,7 @@ export interface SetPasswordInput { clientMutationId?: string; currentPassword?: string; newPassword?: string; + signOutOtherSessions?: boolean; } export interface SetPrincipalEntitiesInput { clientMutationId?: string; @@ -2072,6 +2081,26 @@ export interface RoleTypeConnection { pageInfo: PageInfo; totalCount: number; } +export interface SignInOptionsRecord { + allowAnonymousSessions?: boolean | null; + allowEmailOtpSignIn?: boolean | null; + allowIdentitySignIn?: boolean | null; + allowIdentitySignUp?: boolean | null; + allowMagicLinkSignIn?: boolean | null; + allowMagicLinkSignUp?: boolean | null; + allowPasswordSignIn?: boolean | null; + allowPasswordSignUp?: boolean | null; + allowSignUp?: boolean | null; + allowSmsSignIn?: boolean | null; + allowSmsSignUp?: boolean | null; + allowWebauthnSignIn?: boolean | null; + allowWebauthnSignUp?: boolean | null; + allowWebauthnUsernameless?: boolean | null; + enableCaptcha?: boolean | null; + identityProviders?: unknown | null; + requireMfa?: boolean | null; + signUpRequiresInvite?: boolean | null; +} /** A connection to a list of `UserConnectedAccount` values. */ export interface UserConnectedAccountConnection { edges: UserConnectedAccountEdge[]; @@ -2294,6 +2323,10 @@ export interface EnableTotpPayload { clientMutationId?: string | null; result?: string | null; } +export interface ExchangeNativeHandoffPayload { + clientMutationId?: string | null; + result?: ExchangeNativeHandoffRecord | null; +} export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; @@ -2498,19 +2531,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -2640,6 +2675,14 @@ export interface CreateOrgApiKeyRecord { expiresAt?: string | null; keyId?: string | null; } +export interface ExchangeNativeHandoffRecord { + accessToken?: string | null; + accessTokenExpiresAt?: string | null; + id?: string | null; + isVerified?: boolean | null; + totpEnabled?: boolean | null; + userId?: string | null; +} export interface ExtendTokenExpiresRecord { expiresAt?: string | null; id?: string | null; @@ -2685,9 +2728,11 @@ export interface SignInCrossOriginRecord { export interface SignInMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; + codeChallenge?: string | null; deviceApprovalRequired?: boolean | null; mfaChallengeToken?: string | null; mfaRequired?: boolean | null; + nativeRedirectUri?: string | null; outDeviceToken?: string | null; userId?: string | null; } @@ -2703,6 +2748,8 @@ export interface SignInSmsOtpRecord { export interface SignUpMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; + codeChallenge?: string | null; + nativeRedirectUri?: string | null; outDeviceToken?: string | null; userId?: string | null; } @@ -2720,6 +2767,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -2729,6 +2778,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -2742,7 +2797,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -2757,7 +2812,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -2785,7 +2840,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -2800,13 +2855,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -2824,17 +2879,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -2907,7 +2962,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -2918,7 +2973,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -2936,10 +2991,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-react/src/compute/hooks/README.md b/sdk/constructive-react/src/compute/hooks/README.md index f023257150..3ccc60f0be 100644 --- a/sdk/constructive-react/src/compute/hooks/README.md +++ b/sdk/constructive-react/src/compute/hooks/README.md @@ -42,11 +42,6 @@ function App() { | `useCreateBuildStepMutation` | Mutation | Partitioned append-only step and test results of a build, keyed into its log object | | `useUpdateBuildStepMutation` | Mutation | Partitioned append-only step and test results of a build, keyed into its log object | | `useDeleteBuildStepMutation` | Mutation | Partitioned append-only step and test results of a build, keyed into its log object | -| `useBuilderBindingsQuery` | Query | Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST | -| `useBuilderBindingQuery` | Query | Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST | -| `useCreateBuilderBindingMutation` | Mutation | Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST | -| `useUpdateBuilderBindingMutation` | Mutation | Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST | -| `useDeleteBuilderBindingMutation` | Mutation | Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST | | `useContentPresetsQuery` | Query | Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store | | `useContentPresetQuery` | Query | Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store | | `useCreateContentPresetMutation` | Mutation | Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store | @@ -253,11 +248,6 @@ function App() { | `useCreatePlatformBuildStepMutation` | Mutation | Partitioned append-only step and test results of a build, keyed into its log object | | `useUpdatePlatformBuildStepMutation` | Mutation | Partitioned append-only step and test results of a build, keyed into its log object | | `useDeletePlatformBuildStepMutation` | Mutation | Partitioned append-only step and test results of a build, keyed into its log object | -| `usePlatformBuilderBindingsQuery` | Query | Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST | -| `usePlatformBuilderBindingQuery` | Query | Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST | -| `useCreatePlatformBuilderBindingMutation` | Mutation | Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST | -| `useUpdatePlatformBuilderBindingMutation` | Mutation | Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST | -| `useDeletePlatformBuilderBindingMutation` | Mutation | Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST | | `usePlatformFunctionApiBindingsQuery` | Query | Join table binding function definitions to API endpoints with per-binding alias and config | | `usePlatformFunctionApiBindingQuery` | Query | Join table binding function definitions to API endpoints with per-binding alias and config | | `useCreatePlatformFunctionApiBindingMutation` | Mutation | Join table binding function definitions to API endpoints with per-binding alias and config | @@ -470,6 +460,11 @@ function App() { | `useCreatePlatformResourcesRequirementsStateMutation` | Mutation | Create a platformResourcesRequirementsState | | `usePlatformResourcesResolvedRequirementsQuery` | Query | List all platformResourcesResolvedRequirements | | `useCreatePlatformResourcesResolvedRequirementMutation` | Mutation | Create a platformResourcesResolvedRequirement | +| `usePlatformServiceBindingsQuery` | Query | Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config | +| `usePlatformServiceBindingQuery` | Query | Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config | +| `useCreatePlatformServiceBindingMutation` | Mutation | Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config | +| `useUpdatePlatformServiceBindingMutation` | Mutation | Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config | +| `useDeletePlatformServiceBindingMutation` | Mutation | Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config | | `usePlatformWebhookEndpointsQuery` | Query | Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window | | `usePlatformWebhookEndpointQuery` | Query | Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window | | `useCreatePlatformWebhookEndpointMutation` | Mutation | Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window | @@ -595,6 +590,11 @@ function App() { | `useCreateResourcesRequirementsStateMutation` | Mutation | Create a resourcesRequirementsState | | `useResourcesResolvedRequirementsQuery` | Query | List all resourcesResolvedRequirements | | `useCreateResourcesResolvedRequirementMutation` | Mutation | Create a resourcesResolvedRequirement | +| `useServiceBindingsQuery` | Query | Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config | +| `useServiceBindingQuery` | Query | Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config | +| `useCreateServiceBindingMutation` | Mutation | Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config | +| `useUpdateServiceBindingMutation` | Mutation | Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config | +| `useDeleteServiceBindingMutation` | Mutation | Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config | | `useWebhookEndpointsQuery` | Query | Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window | | `useWebhookEndpointQuery` | Query | Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window | | `useCreateWebhookEndpointMutation` | Mutation | Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window | @@ -719,27 +719,6 @@ const { mutate: create } = useCreateBuildStepMutation({ create({ buildId: '', createdByPrincipal: '', databaseId: '', exitCode: '', finishedAt: '', kind: '', logBytes: '', logOffset: '', name: '', parentSeq: '', recordedAt: '', seq: '', startedAt: '', status: '', summary: '' }); ``` -### BuilderBinding - -```typescript -// List all builderBindings -const { data, isLoading } = useBuilderBindingsQuery({ - selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }, -}); - -// Get one builderBinding -const { data: item } = useBuilderBindingQuery({ - id: '', - selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }, -}); - -// Create a builderBinding -const { mutate: create } = useCreateBuilderBindingMutation({ - selection: { fields: { id: true } }, -}); -create({ createdBy: '', createdByPrincipal: '', databaseId: '', installationId: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }); -``` - ### ContentPreset ```typescript @@ -1625,27 +1604,6 @@ const { mutate: create } = useCreatePlatformBuildStepMutation({ create({ buildId: '', createdByPrincipal: '', exitCode: '', finishedAt: '', kind: '', logBytes: '', logOffset: '', name: '', parentSeq: '', recordedAt: '', seq: '', startedAt: '', status: '', summary: '' }); ``` -### PlatformBuilderBinding - -```typescript -// List all platformBuilderBindings -const { data, isLoading } = usePlatformBuilderBindingsQuery({ - selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }, -}); - -// Get one platformBuilderBinding -const { data: item } = usePlatformBuilderBindingQuery({ - id: '', - selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }, -}); - -// Create a platformBuilderBinding -const { mutate: create } = useCreatePlatformBuilderBindingMutation({ - selection: { fields: { id: true } }, -}); -create({ createdBy: '', createdByPrincipal: '', installationId: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }); -``` - ### PlatformFunctionApiBinding ```typescript @@ -2576,6 +2534,27 @@ const { mutate: create } = useCreatePlatformResourcesResolvedRequirementMutation create({ atomId: '', configObjectName: '', name: '', namespaceId: '', present: '', realm: '', required: '', requirementKind: '', resourceId: '', secretsObjectName: '', slug: '' }); ``` +### PlatformServiceBinding + +```typescript +// List all platformServiceBindings +const { data, isLoading } = usePlatformServiceBindingsQuery({ + selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }, +}); + +// Get one platformServiceBinding +const { data: item } = usePlatformServiceBindingQuery({ + id: '', + selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }, +}); + +// Create a platformServiceBinding +const { mutate: create } = useCreatePlatformServiceBindingMutation({ + selection: { fields: { id: true } }, +}); +create({ createdBy: '', createdByPrincipal: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }); +``` + ### PlatformWebhookEndpoint ```typescript @@ -3134,6 +3113,27 @@ const { mutate: create } = useCreateResourcesResolvedRequirementMutation({ create({ atomId: '', configObjectName: '', name: '', namespaceId: '', present: '', realm: '', required: '', requirementKind: '', resourceId: '', secretsObjectName: '', slug: '' }); ``` +### ServiceBinding + +```typescript +// List all serviceBindings +const { data, isLoading } = useServiceBindingsQuery({ + selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }, +}); + +// Get one serviceBinding +const { data: item } = useServiceBindingQuery({ + id: '', + selection: { fields: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }, +}); + +// Create a serviceBinding +const { mutate: create } = useCreateServiceBindingMutation({ + selection: { fields: { id: true } }, +}); +create({ createdBy: '', createdByPrincipal: '', databaseId: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }); +``` + ### WebhookEndpoint ```typescript diff --git a/sdk/constructive-react/src/compute/hooks/index.ts b/sdk/constructive-react/src/compute/hooks/index.ts index bf82de3c32..1a18ecdbfd 100644 --- a/sdk/constructive-react/src/compute/hooks/index.ts +++ b/sdk/constructive-react/src/compute/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: Build, BuildStep, BuilderBinding, ContentPreset, DatabaseFunctionGraph, DatabaseFunctionGraphExecutionCancelRequest, DatabaseFunctionGraphExecution, DatabaseFunctionGraphExecutionNodeState, DatabaseFunctionGraphExecutionOutput, DatabaseGraphCommit, DatabaseGraphGetAllTreeNodesRecord, DatabaseGraphObject, DatabaseGraphRef, DatabaseGraphStore, DbPreset, FunctionApiBinding, FunctionCapabilityBinding, FunctionDefinition, FunctionDeployment, FunctionDeploymentEvent, FunctionExecutionLog, FunctionGraphCommit, FunctionGraph, FunctionGraphExecutionCancelRequest, FunctionGraphExecution, FunctionGraphExecutionNodeState, FunctionGraphExecutionOutput, FunctionGraphObject, FunctionGraphRef, FunctionGraphStore, FunctionInvocationAttempt, FunctionInvocation, FunctionSchedule, GetAllTreeNodesRecord, Image, ImageGrant, InfraCommit, InfraGetAllTreeNodesRecord, InfraObject, InfraRef, InfraStore, IntegrationProvider, Namespace, NamespaceEvent, PlatformBuild, PlatformBuildStep, PlatformBuilderBinding, PlatformFunctionApiBinding, PlatformFunctionCapabilityBinding, PlatformFunctionDefinition, PlatformFunctionDeployment, PlatformFunctionDeploymentEvent, PlatformFunctionExecutionLog, PlatformFunctionInvocationAttempt, PlatformFunctionInvocation, PlatformFunctionSchedule, PlatformImage, PlatformImageGrant, PlatformInfraCommit, PlatformInfraGetAllTreeNodesRecord, PlatformInfraObject, PlatformInfraRef, PlatformInfraStore, PlatformK8sResourceKind, PlatformK8sSpecRule, PlatformNamespace, PlatformNamespaceEvent, PlatformProposalComment, PlatformProposal, PlatformProposalFileView, PlatformProposalReaction, PlatformProposalReview, PlatformProposalsChunk, PlatformRegistryBinding, PlatformRegistry, PlatformRegistryGrant, PlatformRepository, PlatformRepositoryEvent, PlatformRepositoryRequiredCheck, PlatformRepositoryWorkflow, PlatformResource, PlatformResourceDeclaredCapacity, PlatformResourceDefinition, PlatformResourceEvent, PlatformResourceInstallation, PlatformResourceObservedStorage, PlatformResourceStatusCheck, PlatformResourceUsageLog, PlatformResourceUsageSummary, PlatformResourceUtilization, PlatformResourcesHealth, PlatformResourcesRequirementsState, PlatformResourcesResolvedRequirement, PlatformWebhookEndpoint, PlatformWebhookEvent, ProposalComment, Proposal, ProposalFileView, ProposalReaction, ProposalReview, ProposalsChunk, RegistryBinding, Registry, RegistryGrant, Repository, RepositoryEvent, RepositoryRequiredCheck, RepositoryWorkflow, Resource, ResourceDeclaredCapacity, ResourceDefinition, ResourceEvent, ResourceInstallation, ResourceObservedStorage, ResourceStatusCheck, ResourceUsageLog, ResourceUsageSummary, ResourceUtilization, ResourcesHealth, ResourcesRequirementsState, ResourcesResolvedRequirement, WebhookEndpoint, WebhookEvent + * Tables: Build, BuildStep, ContentPreset, DatabaseFunctionGraph, DatabaseFunctionGraphExecutionCancelRequest, DatabaseFunctionGraphExecution, DatabaseFunctionGraphExecutionNodeState, DatabaseFunctionGraphExecutionOutput, DatabaseGraphCommit, DatabaseGraphGetAllTreeNodesRecord, DatabaseGraphObject, DatabaseGraphRef, DatabaseGraphStore, DbPreset, FunctionApiBinding, FunctionCapabilityBinding, FunctionDefinition, FunctionDeployment, FunctionDeploymentEvent, FunctionExecutionLog, FunctionGraphCommit, FunctionGraph, FunctionGraphExecutionCancelRequest, FunctionGraphExecution, FunctionGraphExecutionNodeState, FunctionGraphExecutionOutput, FunctionGraphObject, FunctionGraphRef, FunctionGraphStore, FunctionInvocationAttempt, FunctionInvocation, FunctionSchedule, GetAllTreeNodesRecord, Image, ImageGrant, InfraCommit, InfraGetAllTreeNodesRecord, InfraObject, InfraRef, InfraStore, IntegrationProvider, Namespace, NamespaceEvent, PlatformBuild, PlatformBuildStep, PlatformFunctionApiBinding, PlatformFunctionCapabilityBinding, PlatformFunctionDefinition, PlatformFunctionDeployment, PlatformFunctionDeploymentEvent, PlatformFunctionExecutionLog, PlatformFunctionInvocationAttempt, PlatformFunctionInvocation, PlatformFunctionSchedule, PlatformImage, PlatformImageGrant, PlatformInfraCommit, PlatformInfraGetAllTreeNodesRecord, PlatformInfraObject, PlatformInfraRef, PlatformInfraStore, PlatformK8sResourceKind, PlatformK8sSpecRule, PlatformNamespace, PlatformNamespaceEvent, PlatformProposalComment, PlatformProposal, PlatformProposalFileView, PlatformProposalReaction, PlatformProposalReview, PlatformProposalsChunk, PlatformRegistryBinding, PlatformRegistry, PlatformRegistryGrant, PlatformRepository, PlatformRepositoryEvent, PlatformRepositoryRequiredCheck, PlatformRepositoryWorkflow, PlatformResource, PlatformResourceDeclaredCapacity, PlatformResourceDefinition, PlatformResourceEvent, PlatformResourceInstallation, PlatformResourceObservedStorage, PlatformResourceStatusCheck, PlatformResourceUsageLog, PlatformResourceUsageSummary, PlatformResourceUtilization, PlatformResourcesHealth, PlatformResourcesRequirementsState, PlatformResourcesResolvedRequirement, PlatformServiceBinding, PlatformWebhookEndpoint, PlatformWebhookEvent, ProposalComment, Proposal, ProposalFileView, ProposalReaction, ProposalReview, ProposalsChunk, RegistryBinding, Registry, RegistryGrant, Repository, RepositoryEvent, RepositoryRequiredCheck, RepositoryWorkflow, Resource, ResourceDeclaredCapacity, ResourceDefinition, ResourceEvent, ResourceInstallation, ResourceObservedStorage, ResourceStatusCheck, ResourceUsageLog, ResourceUsageSummary, ResourceUtilization, ResourcesHealth, ResourcesRequirementsState, ResourcesResolvedRequirement, ServiceBinding, WebhookEndpoint, WebhookEvent * * Usage: * diff --git a/sdk/constructive-react/src/compute/hooks/invalidation.ts b/sdk/constructive-react/src/compute/hooks/invalidation.ts index f54368135f..8ddf2be8d8 100644 --- a/sdk/constructive-react/src/compute/hooks/invalidation.ts +++ b/sdk/constructive-react/src/compute/hooks/invalidation.ts @@ -17,7 +17,6 @@ import type { QueryClient } from '@tanstack/react-query'; import { buildKeys, buildStepKeys, - builderBindingKeys, contentPresetKeys, databaseFunctionGraphKeys, databaseFunctionGraphExecutionCancelRequestKeys, @@ -61,7 +60,6 @@ import { namespaceEventKeys, platformBuildKeys, platformBuildStepKeys, - platformBuilderBindingKeys, platformFunctionApiBindingKeys, platformFunctionCapabilityBindingKeys, platformFunctionDefinitionKeys, @@ -108,6 +106,7 @@ import { platformResourcesHealthKeys, platformResourcesRequirementsStateKeys, platformResourcesResolvedRequirementKeys, + platformServiceBindingKeys, platformWebhookEndpointKeys, platformWebhookEventKeys, proposalCommentKeys, @@ -136,6 +135,7 @@ import { resourcesHealthKeys, resourcesRequirementsStateKeys, resourcesResolvedRequirementKeys, + serviceBindingKeys, webhookEndpointKeys, webhookEventKeys, } from './query-keys'; @@ -190,23 +190,6 @@ export const invalidate = { queryKey: buildStepKeys.detail(id), }), }, - /** Invalidate builderBinding queries */ builderBinding: { - /** Invalidate all builderBinding queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: builderBindingKeys.all, - }), - /** Invalidate builderBinding list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: builderBindingKeys.lists(), - }), - /** Invalidate a specific builderBinding */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: builderBindingKeys.detail(id), - }), - }, /** Invalidate contentPreset queries */ contentPreset: { /** Invalidate all contentPreset queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -957,23 +940,6 @@ export const invalidate = { queryKey: platformBuildStepKeys.detail(id), }), }, - /** Invalidate platformBuilderBinding queries */ platformBuilderBinding: { - /** Invalidate all platformBuilderBinding queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: platformBuilderBindingKeys.all, - }), - /** Invalidate platformBuilderBinding list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: platformBuilderBindingKeys.lists(), - }), - /** Invalidate a specific platformBuilderBinding */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: platformBuilderBindingKeys.detail(id), - }), - }, /** Invalidate platformFunctionApiBinding queries */ platformFunctionApiBinding: { /** Invalidate all platformFunctionApiBinding queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1787,6 +1753,23 @@ export const invalidate = { queryKey: platformResourcesResolvedRequirementKeys.detail(id), }), }, + /** Invalidate platformServiceBinding queries */ platformServiceBinding: { + /** Invalidate all platformServiceBinding queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformServiceBindingKeys.all, + }), + /** Invalidate platformServiceBinding list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformServiceBindingKeys.lists(), + }), + /** Invalidate a specific platformServiceBinding */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: platformServiceBindingKeys.detail(id), + }), + }, /** Invalidate platformWebhookEndpoint queries */ platformWebhookEndpoint: { /** Invalidate all platformWebhookEndpoint queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -2254,6 +2237,23 @@ export const invalidate = { queryKey: resourcesResolvedRequirementKeys.detail(id), }), }, + /** Invalidate serviceBinding queries */ serviceBinding: { + /** Invalidate all serviceBinding queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: serviceBindingKeys.all, + }), + /** Invalidate serviceBinding list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: serviceBindingKeys.lists(), + }), + /** Invalidate a specific serviceBinding */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: serviceBindingKeys.detail(id), + }), + }, /** Invalidate webhookEndpoint queries */ webhookEndpoint: { /** Invalidate all webhookEndpoint queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -2311,14 +2311,6 @@ export const remove = { queryKey: buildStepKeys.detail(id), }); }, - /** Remove builderBinding from cache */ builderBinding: ( - queryClient: QueryClient, - id: string | number - ) => { - queryClient.removeQueries({ - queryKey: builderBindingKeys.detail(id), - }); - }, /** Remove contentPreset from cache */ contentPreset: ( queryClient: QueryClient, id: string | number @@ -2643,14 +2635,6 @@ export const remove = { queryKey: platformBuildStepKeys.detail(id), }); }, - /** Remove platformBuilderBinding from cache */ platformBuilderBinding: ( - queryClient: QueryClient, - id: string | number - ) => { - queryClient.removeQueries({ - queryKey: platformBuilderBindingKeys.detail(id), - }); - }, /** Remove platformFunctionApiBinding from cache */ platformFunctionApiBinding: ( queryClient: QueryClient, id: string | number @@ -3017,6 +3001,14 @@ export const remove = { queryKey: platformResourcesResolvedRequirementKeys.detail(id), }); }, + /** Remove platformServiceBinding from cache */ platformServiceBinding: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: platformServiceBindingKeys.detail(id), + }); + }, /** Remove platformWebhookEndpoint from cache */ platformWebhookEndpoint: ( queryClient: QueryClient, id: string | number @@ -3232,6 +3224,14 @@ export const remove = { queryKey: resourcesResolvedRequirementKeys.detail(id), }); }, + /** Remove serviceBinding from cache */ serviceBinding: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: serviceBindingKeys.detail(id), + }); + }, /** Remove webhookEndpoint from cache */ webhookEndpoint: ( queryClient: QueryClient, id: string | number diff --git a/sdk/constructive-react/src/compute/hooks/mutation-keys.ts b/sdk/constructive-react/src/compute/hooks/mutation-keys.ts index 849257673e..6e57710924 100644 --- a/sdk/constructive-react/src/compute/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/compute/hooks/mutation-keys.ts @@ -34,15 +34,6 @@ export const buildStepMutationKeys = { /** Delete buildStep mutation key */ delete: (id: string | number) => ['mutation', 'buildstep', 'delete', id] as const, } as const; -export const builderBindingMutationKeys = { - /** All builderBinding mutation keys */ all: ['mutation', 'builderbinding'] as const, - /** Create builderBinding mutation key */ create: () => - ['mutation', 'builderbinding', 'create'] as const, - /** Update builderBinding mutation key */ update: (id: string | number) => - ['mutation', 'builderbinding', 'update', id] as const, - /** Delete builderBinding mutation key */ delete: (id: string | number) => - ['mutation', 'builderbinding', 'delete', id] as const, -} as const; export const contentPresetMutationKeys = { /** All contentPreset mutation keys */ all: ['mutation', 'contentpreset'] as const, /** Create contentPreset mutation key */ create: () => @@ -473,18 +464,6 @@ export const platformBuildStepMutationKeys = { /** Delete platformBuildStep mutation key */ delete: (id: string | number) => ['mutation', 'platformbuildstep', 'delete', id] as const, } as const; -export const platformBuilderBindingMutationKeys = { - /** All platformBuilderBinding mutation keys */ all: [ - 'mutation', - 'platformbuilderbinding', - ] as const, - /** Create platformBuilderBinding mutation key */ create: () => - ['mutation', 'platformbuilderbinding', 'create'] as const, - /** Update platformBuilderBinding mutation key */ update: (id: string | number) => - ['mutation', 'platformbuilderbinding', 'update', id] as const, - /** Delete platformBuilderBinding mutation key */ delete: (id: string | number) => - ['mutation', 'platformbuilderbinding', 'delete', id] as const, -} as const; export const platformFunctionApiBindingMutationKeys = { /** All platformFunctionApiBinding mutation keys */ all: [ 'mutation', @@ -1001,6 +980,18 @@ export const platformResourcesResolvedRequirementMutationKeys = { /** Delete platformResourcesResolvedRequirement mutation key */ delete: (id: string | number) => ['mutation', 'platformresourcesresolvedrequirement', 'delete', id] as const, } as const; +export const platformServiceBindingMutationKeys = { + /** All platformServiceBinding mutation keys */ all: [ + 'mutation', + 'platformservicebinding', + ] as const, + /** Create platformServiceBinding mutation key */ create: () => + ['mutation', 'platformservicebinding', 'create'] as const, + /** Update platformServiceBinding mutation key */ update: (id: string | number) => + ['mutation', 'platformservicebinding', 'update', id] as const, + /** Delete platformServiceBinding mutation key */ delete: (id: string | number) => + ['mutation', 'platformservicebinding', 'delete', id] as const, +} as const; export const platformWebhookEndpointMutationKeys = { /** All platformWebhookEndpoint mutation keys */ all: [ 'mutation', @@ -1267,6 +1258,15 @@ export const resourcesResolvedRequirementMutationKeys = { /** Delete resourcesResolvedRequirement mutation key */ delete: (id: string | number) => ['mutation', 'resourcesresolvedrequirement', 'delete', id] as const, } as const; +export const serviceBindingMutationKeys = { + /** All serviceBinding mutation keys */ all: ['mutation', 'servicebinding'] as const, + /** Create serviceBinding mutation key */ create: () => + ['mutation', 'servicebinding', 'create'] as const, + /** Update serviceBinding mutation key */ update: (id: string | number) => + ['mutation', 'servicebinding', 'update', id] as const, + /** Delete serviceBinding mutation key */ delete: (id: string | number) => + ['mutation', 'servicebinding', 'delete', id] as const, +} as const; export const webhookEndpointMutationKeys = { /** All webhookEndpoint mutation keys */ all: ['mutation', 'webhookendpoint'] as const, /** Create webhookEndpoint mutation key */ create: () => @@ -1617,7 +1617,6 @@ export const customMutationKeys = { export const mutationKeys = { build: buildMutationKeys, buildStep: buildStepMutationKeys, - builderBinding: builderBindingMutationKeys, contentPreset: contentPresetMutationKeys, databaseFunctionGraph: databaseFunctionGraphMutationKeys, databaseFunctionGraphExecutionCancelRequest: @@ -1662,7 +1661,6 @@ export const mutationKeys = { namespaceEvent: namespaceEventMutationKeys, platformBuild: platformBuildMutationKeys, platformBuildStep: platformBuildStepMutationKeys, - platformBuilderBinding: platformBuilderBindingMutationKeys, platformFunctionApiBinding: platformFunctionApiBindingMutationKeys, platformFunctionCapabilityBinding: platformFunctionCapabilityBindingMutationKeys, platformFunctionDefinition: platformFunctionDefinitionMutationKeys, @@ -1709,6 +1707,7 @@ export const mutationKeys = { platformResourcesHealth: platformResourcesHealthMutationKeys, platformResourcesRequirementsState: platformResourcesRequirementsStateMutationKeys, platformResourcesResolvedRequirement: platformResourcesResolvedRequirementMutationKeys, + platformServiceBinding: platformServiceBindingMutationKeys, platformWebhookEndpoint: platformWebhookEndpointMutationKeys, platformWebhookEvent: platformWebhookEventMutationKeys, proposalComment: proposalCommentMutationKeys, @@ -1737,6 +1736,7 @@ export const mutationKeys = { resourcesHealth: resourcesHealthMutationKeys, resourcesRequirementsState: resourcesRequirementsStateMutationKeys, resourcesResolvedRequirement: resourcesResolvedRequirementMutationKeys, + serviceBinding: serviceBindingMutationKeys, webhookEndpoint: webhookEndpointMutationKeys, webhookEvent: webhookEventMutationKeys, custom: customMutationKeys, diff --git a/sdk/constructive-react/src/compute/hooks/mutations/index.ts b/sdk/constructive-react/src/compute/hooks/mutations/index.ts index e1eb9a75e4..29bf894010 100644 --- a/sdk/constructive-react/src/compute/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/index.ts @@ -9,9 +9,6 @@ export * from './useDeleteBuildMutation'; export * from './useCreateBuildStepMutation'; export * from './useUpdateBuildStepMutation'; export * from './useDeleteBuildStepMutation'; -export * from './useCreateBuilderBindingMutation'; -export * from './useUpdateBuilderBindingMutation'; -export * from './useDeleteBuilderBindingMutation'; export * from './useCreateContentPresetMutation'; export * from './useUpdateContentPresetMutation'; export * from './useDeleteContentPresetMutation'; @@ -135,9 +132,6 @@ export * from './useDeletePlatformBuildMutation'; export * from './useCreatePlatformBuildStepMutation'; export * from './useUpdatePlatformBuildStepMutation'; export * from './useDeletePlatformBuildStepMutation'; -export * from './useCreatePlatformBuilderBindingMutation'; -export * from './useUpdatePlatformBuilderBindingMutation'; -export * from './useDeletePlatformBuilderBindingMutation'; export * from './useCreatePlatformFunctionApiBindingMutation'; export * from './useUpdatePlatformFunctionApiBindingMutation'; export * from './useDeletePlatformFunctionApiBindingMutation'; @@ -262,6 +256,9 @@ export * from './useCreatePlatformResourceUtilizationMutation'; export * from './useCreatePlatformResourcesHealthMutation'; export * from './useCreatePlatformResourcesRequirementsStateMutation'; export * from './useCreatePlatformResourcesResolvedRequirementMutation'; +export * from './useCreatePlatformServiceBindingMutation'; +export * from './useUpdatePlatformServiceBindingMutation'; +export * from './useDeletePlatformServiceBindingMutation'; export * from './useCreatePlatformWebhookEndpointMutation'; export * from './useUpdatePlatformWebhookEndpointMutation'; export * from './useDeletePlatformWebhookEndpointMutation'; @@ -334,6 +331,9 @@ export * from './useCreateResourceUtilizationMutation'; export * from './useCreateResourcesHealthMutation'; export * from './useCreateResourcesRequirementsStateMutation'; export * from './useCreateResourcesResolvedRequirementMutation'; +export * from './useCreateServiceBindingMutation'; +export * from './useUpdateServiceBindingMutation'; +export * from './useDeleteServiceBindingMutation'; export * from './useCreateWebhookEndpointMutation'; export * from './useUpdateWebhookEndpointMutation'; export * from './useDeleteWebhookEndpointMutation'; diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useCreateBuilderBindingMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useCreateBuilderBindingMutation.ts deleted file mode 100644 index 4aceb82c89..0000000000 --- a/sdk/constructive-react/src/compute/hooks/mutations/useCreateBuilderBindingMutation.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * @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 { builderBindingKeys } from '../query-keys'; -import { builderBindingMutationKeys } from '../mutation-keys'; -import type { - BuilderBindingSelect, - BuilderBindingWithRelations, - CreateBuilderBindingInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - BuilderBindingSelect, - BuilderBindingWithRelations, - CreateBuilderBindingInput, -} from '../../orm/input-types'; -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateBuilderBindingMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateBuilderBindingMutation( - params: { - selection: { - fields: S & BuilderBindingSelect; - } & HookStrictSelect, BuilderBindingSelect>; - } & Omit< - UseMutationOptions< - { - createBuilderBinding: { - builderBinding: InferSelectResult; - }; - }, - Error, - CreateBuilderBindingInput['builderBinding'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createBuilderBinding: { - builderBinding: InferSelectResult; - }; - }, - Error, - CreateBuilderBindingInput['builderBinding'] ->; -export function useCreateBuilderBindingMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: builderBindingMutationKeys.create(), - mutationFn: (data: CreateBuilderBindingInput['builderBinding']) => - getClient() - .builderBinding.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: builderBindingKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformBuilderBindingMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformBuilderBindingMutation.ts deleted file mode 100644 index 5bf54919a9..0000000000 --- a/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformBuilderBindingMutation.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * @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 { platformBuilderBindingKeys } from '../query-keys'; -import { platformBuilderBindingMutationKeys } from '../mutation-keys'; -import type { - PlatformBuilderBindingSelect, - PlatformBuilderBindingWithRelations, - CreatePlatformBuilderBindingInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - PlatformBuilderBindingSelect, - PlatformBuilderBindingWithRelations, - CreatePlatformBuilderBindingInput, -} from '../../orm/input-types'; -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```tsx - * const { mutate, isPending } = useCreatePlatformBuilderBindingMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreatePlatformBuilderBindingMutation( - params: { - selection: { - fields: S & PlatformBuilderBindingSelect; - } & HookStrictSelect, PlatformBuilderBindingSelect>; - } & Omit< - UseMutationOptions< - { - createPlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }, - Error, - CreatePlatformBuilderBindingInput['platformBuilderBinding'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createPlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }, - Error, - CreatePlatformBuilderBindingInput['platformBuilderBinding'] ->; -export function useCreatePlatformBuilderBindingMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: platformBuilderBindingMutationKeys.create(), - mutationFn: (data: CreatePlatformBuilderBindingInput['platformBuilderBinding']) => - getClient() - .platformBuilderBinding.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: platformBuilderBindingKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformServiceBindingMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformServiceBindingMutation.ts new file mode 100644 index 0000000000..e56418dfe4 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformServiceBindingMutation.ts @@ -0,0 +1,91 @@ +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * @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 { platformServiceBindingKeys } from '../query-keys'; +import { platformServiceBindingMutationKeys } from '../mutation-keys'; +import type { + PlatformServiceBindingSelect, + PlatformServiceBindingWithRelations, + CreatePlatformServiceBindingInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformServiceBindingSelect, + PlatformServiceBindingWithRelations, + CreatePlatformServiceBindingInput, +} from '../../orm/input-types'; +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlatformServiceBindingMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlatformServiceBindingMutation( + params: { + selection: { + fields: S & PlatformServiceBindingSelect; + } & HookStrictSelect, PlatformServiceBindingSelect>; + } & Omit< + UseMutationOptions< + { + createPlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }, + Error, + CreatePlatformServiceBindingInput['platformServiceBinding'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }, + Error, + CreatePlatformServiceBindingInput['platformServiceBinding'] +>; +export function useCreatePlatformServiceBindingMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformServiceBindingMutationKeys.create(), + mutationFn: (data: CreatePlatformServiceBindingInput['platformServiceBinding']) => + getClient() + .platformServiceBinding.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: platformServiceBindingKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useCreateServiceBindingMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useCreateServiceBindingMutation.ts new file mode 100644 index 0000000000..f75bc965d6 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useCreateServiceBindingMutation.ts @@ -0,0 +1,91 @@ +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * @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 { serviceBindingKeys } from '../query-keys'; +import { serviceBindingMutationKeys } from '../mutation-keys'; +import type { + ServiceBindingSelect, + ServiceBindingWithRelations, + CreateServiceBindingInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ServiceBindingSelect, + ServiceBindingWithRelations, + CreateServiceBindingInput, +} from '../../orm/input-types'; +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateServiceBindingMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateServiceBindingMutation( + params: { + selection: { + fields: S & ServiceBindingSelect; + } & HookStrictSelect, ServiceBindingSelect>; + } & Omit< + UseMutationOptions< + { + createServiceBinding: { + serviceBinding: InferSelectResult; + }; + }, + Error, + CreateServiceBindingInput['serviceBinding'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createServiceBinding: { + serviceBinding: InferSelectResult; + }; + }, + Error, + CreateServiceBindingInput['serviceBinding'] +>; +export function useCreateServiceBindingMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: serviceBindingMutationKeys.create(), + mutationFn: (data: CreateServiceBindingInput['serviceBinding']) => + getClient() + .serviceBinding.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: serviceBindingKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformBuilderBindingMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformServiceBindingMutation.ts similarity index 51% rename from sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformBuilderBindingMutation.ts rename to sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformServiceBindingMutation.ts index df71f1af3f..dd98f4f1d8 100644 --- a/sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformBuilderBindingMutation.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformServiceBindingMutation.ts @@ -1,5 +1,5 @@ /** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,39 +9,39 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { platformBuilderBindingKeys } from '../query-keys'; -import { platformBuilderBindingMutationKeys } from '../mutation-keys'; +import { platformServiceBindingKeys } from '../query-keys'; +import { platformServiceBindingMutationKeys } from '../mutation-keys'; import type { - PlatformBuilderBindingSelect, - PlatformBuilderBindingWithRelations, + PlatformServiceBindingSelect, + PlatformServiceBindingWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - PlatformBuilderBindingSelect, - PlatformBuilderBindingWithRelations, + PlatformServiceBindingSelect, + PlatformServiceBindingWithRelations, } from '../../orm/input-types'; /** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config * * @example * ```tsx - * const { mutate, isPending } = useDeletePlatformBuilderBindingMutation({ + * const { mutate, isPending } = useDeletePlatformServiceBindingMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeletePlatformBuilderBindingMutation( +export function useDeletePlatformServiceBindingMutation( params: { selection: { - fields: S & PlatformBuilderBindingSelect; - } & HookStrictSelect, PlatformBuilderBindingSelect>; + fields: S & PlatformServiceBindingSelect; + } & HookStrictSelect, PlatformServiceBindingSelect>; } & Omit< UseMutationOptions< { - deletePlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; + deletePlatformServiceBinding: { + platformServiceBinding: InferSelectResult; }; }, Error, @@ -53,8 +53,8 @@ export function useDeletePlatformBuilderBindingMutation ): UseMutationResult< { - deletePlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; + deletePlatformServiceBinding: { + platformServiceBinding: InferSelectResult; }; }, Error, @@ -62,9 +62,9 @@ export function useDeletePlatformBuilderBindingMutation; -export function useDeletePlatformBuilderBindingMutation( +export function useDeletePlatformServiceBindingMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -76,15 +76,15 @@ export function useDeletePlatformBuilderBindingMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: platformBuilderBindingMutationKeys.all, + mutationKey: platformServiceBindingMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .platformBuilderBinding.delete({ + .platformServiceBinding.delete({ where: { id, }, @@ -93,10 +93,10 @@ export function useDeletePlatformBuilderBindingMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: platformBuilderBindingKeys.detail(variables.id), + queryKey: platformServiceBindingKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: platformBuilderBindingKeys.lists(), + queryKey: platformServiceBindingKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useDeleteBuilderBindingMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useDeleteServiceBindingMutation.ts similarity index 53% rename from sdk/constructive-react/src/compute/hooks/mutations/useDeleteBuilderBindingMutation.ts rename to sdk/constructive-react/src/compute/hooks/mutations/useDeleteServiceBindingMutation.ts index 26004519c8..b6b2c29414 100644 --- a/sdk/constructive-react/src/compute/hooks/mutations/useDeleteBuilderBindingMutation.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/useDeleteServiceBindingMutation.ts @@ -1,5 +1,5 @@ /** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -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 { builderBindingKeys } from '../query-keys'; -import { builderBindingMutationKeys } from '../mutation-keys'; -import type { BuilderBindingSelect, BuilderBindingWithRelations } from '../../orm/input-types'; +import { serviceBindingKeys } from '../query-keys'; +import { serviceBindingMutationKeys } from '../mutation-keys'; +import type { ServiceBindingSelect, ServiceBindingWithRelations } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { BuilderBindingSelect, BuilderBindingWithRelations } from '../../orm/input-types'; +export type { ServiceBindingSelect, ServiceBindingWithRelations } from '../../orm/input-types'; /** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config * * @example * ```tsx - * const { mutate, isPending } = useDeleteBuilderBindingMutation({ + * const { mutate, isPending } = useDeleteServiceBindingMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteBuilderBindingMutation( +export function useDeleteServiceBindingMutation( params: { selection: { - fields: S & BuilderBindingSelect; - } & HookStrictSelect, BuilderBindingSelect>; + fields: S & ServiceBindingSelect; + } & HookStrictSelect, ServiceBindingSelect>; } & Omit< UseMutationOptions< { - deleteBuilderBinding: { - builderBinding: InferSelectResult; + deleteServiceBinding: { + serviceBinding: InferSelectResult; }; }, Error, @@ -47,8 +47,8 @@ export function useDeleteBuilderBindingMutation( > ): UseMutationResult< { - deleteBuilderBinding: { - builderBinding: InferSelectResult; + deleteServiceBinding: { + serviceBinding: InferSelectResult; }; }, Error, @@ -56,9 +56,9 @@ export function useDeleteBuilderBindingMutation( id: string; } >; -export function useDeleteBuilderBindingMutation( +export function useDeleteServiceBindingMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -70,15 +70,15 @@ export function useDeleteBuilderBindingMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: builderBindingMutationKeys.all, + mutationKey: serviceBindingMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .builderBinding.delete({ + .serviceBinding.delete({ where: { id, }, @@ -87,10 +87,10 @@ export function useDeleteBuilderBindingMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: builderBindingKeys.detail(variables.id), + queryKey: serviceBindingKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: builderBindingKeys.lists(), + queryKey: serviceBindingKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useUpdateBuilderBindingMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useUpdateBuilderBindingMutation.ts deleted file mode 100644 index 8e095c6826..0000000000 --- a/sdk/constructive-react/src/compute/hooks/mutations/useUpdateBuilderBindingMutation.ts +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * @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 { builderBindingKeys } from '../query-keys'; -import { builderBindingMutationKeys } from '../mutation-keys'; -import type { - BuilderBindingSelect, - BuilderBindingWithRelations, - BuilderBindingPatch, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - BuilderBindingSelect, - BuilderBindingWithRelations, - BuilderBindingPatch, -} from '../../orm/input-types'; -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```tsx - * const { mutate, isPending } = useUpdateBuilderBindingMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ id: 'value-here', builderBindingPatch: { name: 'Updated' } }); - * ``` - */ -export function useUpdateBuilderBindingMutation( - params: { - selection: { - fields: S & BuilderBindingSelect; - } & HookStrictSelect, BuilderBindingSelect>; - } & Omit< - UseMutationOptions< - { - updateBuilderBinding: { - builderBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - builderBindingPatch: BuilderBindingPatch; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - updateBuilderBinding: { - builderBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - builderBindingPatch: BuilderBindingPatch; - } ->; -export function useUpdateBuilderBindingMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - { - id: string; - builderBindingPatch: BuilderBindingPatch; - } - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: builderBindingMutationKeys.all, - mutationFn: ({ - id, - builderBindingPatch, - }: { - id: string; - builderBindingPatch: BuilderBindingPatch; - }) => - getClient() - .builderBinding.update({ - where: { - id, - }, - data: builderBindingPatch, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.invalidateQueries({ - queryKey: builderBindingKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: builderBindingKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformBuilderBindingMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformBuilderBindingMutation.ts deleted file mode 100644 index c4bb465f60..0000000000 --- a/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformBuilderBindingMutation.ts +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * @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 { platformBuilderBindingKeys } from '../query-keys'; -import { platformBuilderBindingMutationKeys } from '../mutation-keys'; -import type { - PlatformBuilderBindingSelect, - PlatformBuilderBindingWithRelations, - PlatformBuilderBindingPatch, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - PlatformBuilderBindingSelect, - PlatformBuilderBindingWithRelations, - PlatformBuilderBindingPatch, -} from '../../orm/input-types'; -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```tsx - * const { mutate, isPending } = useUpdatePlatformBuilderBindingMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ id: 'value-here', platformBuilderBindingPatch: { name: 'Updated' } }); - * ``` - */ -export function useUpdatePlatformBuilderBindingMutation( - params: { - selection: { - fields: S & PlatformBuilderBindingSelect; - } & HookStrictSelect, PlatformBuilderBindingSelect>; - } & Omit< - UseMutationOptions< - { - updatePlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - platformBuilderBindingPatch: PlatformBuilderBindingPatch; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - updatePlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - platformBuilderBindingPatch: PlatformBuilderBindingPatch; - } ->; -export function useUpdatePlatformBuilderBindingMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - { - id: string; - platformBuilderBindingPatch: PlatformBuilderBindingPatch; - } - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: platformBuilderBindingMutationKeys.all, - mutationFn: ({ - id, - platformBuilderBindingPatch, - }: { - id: string; - platformBuilderBindingPatch: PlatformBuilderBindingPatch; - }) => - getClient() - .platformBuilderBinding.update({ - where: { - id, - }, - data: platformBuilderBindingPatch, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.invalidateQueries({ - queryKey: platformBuilderBindingKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: platformBuilderBindingKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformServiceBindingMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformServiceBindingMutation.ts new file mode 100644 index 0000000000..4a9bf984e1 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformServiceBindingMutation.ts @@ -0,0 +1,116 @@ +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * @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 { platformServiceBindingKeys } from '../query-keys'; +import { platformServiceBindingMutationKeys } from '../mutation-keys'; +import type { + PlatformServiceBindingSelect, + PlatformServiceBindingWithRelations, + PlatformServiceBindingPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformServiceBindingSelect, + PlatformServiceBindingWithRelations, + PlatformServiceBindingPatch, +} from '../../orm/input-types'; +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlatformServiceBindingMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', platformServiceBindingPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlatformServiceBindingMutation( + params: { + selection: { + fields: S & PlatformServiceBindingSelect; + } & HookStrictSelect, PlatformServiceBindingSelect>; + } & Omit< + UseMutationOptions< + { + updatePlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }, + Error, + { + id: string; + platformServiceBindingPatch: PlatformServiceBindingPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }, + Error, + { + id: string; + platformServiceBindingPatch: PlatformServiceBindingPatch; + } +>; +export function useUpdatePlatformServiceBindingMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + platformServiceBindingPatch: PlatformServiceBindingPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformServiceBindingMutationKeys.all, + mutationFn: ({ + id, + platformServiceBindingPatch, + }: { + id: string; + platformServiceBindingPatch: PlatformServiceBindingPatch; + }) => + getClient() + .platformServiceBinding.update({ + where: { + id, + }, + data: platformServiceBindingPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: platformServiceBindingKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformServiceBindingKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useUpdateServiceBindingMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useUpdateServiceBindingMutation.ts new file mode 100644 index 0000000000..5d67543217 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useUpdateServiceBindingMutation.ts @@ -0,0 +1,116 @@ +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * @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 { serviceBindingKeys } from '../query-keys'; +import { serviceBindingMutationKeys } from '../mutation-keys'; +import type { + ServiceBindingSelect, + ServiceBindingWithRelations, + ServiceBindingPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ServiceBindingSelect, + ServiceBindingWithRelations, + ServiceBindingPatch, +} from '../../orm/input-types'; +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateServiceBindingMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', serviceBindingPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateServiceBindingMutation( + params: { + selection: { + fields: S & ServiceBindingSelect; + } & HookStrictSelect, ServiceBindingSelect>; + } & Omit< + UseMutationOptions< + { + updateServiceBinding: { + serviceBinding: InferSelectResult; + }; + }, + Error, + { + id: string; + serviceBindingPatch: ServiceBindingPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateServiceBinding: { + serviceBinding: InferSelectResult; + }; + }, + Error, + { + id: string; + serviceBindingPatch: ServiceBindingPatch; + } +>; +export function useUpdateServiceBindingMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + serviceBindingPatch: ServiceBindingPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: serviceBindingMutationKeys.all, + mutationFn: ({ + id, + serviceBindingPatch, + }: { + id: string; + serviceBindingPatch: ServiceBindingPatch; + }) => + getClient() + .serviceBinding.update({ + where: { + id, + }, + data: serviceBindingPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: serviceBindingKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: serviceBindingKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/index.ts b/sdk/constructive-react/src/compute/hooks/queries/index.ts index 8c7e240a7a..6fcae8413e 100644 --- a/sdk/constructive-react/src/compute/hooks/queries/index.ts +++ b/sdk/constructive-react/src/compute/hooks/queries/index.ts @@ -7,8 +7,6 @@ export * from './useBuildsQuery'; export * from './useBuildQuery'; export * from './useBuildStepsQuery'; export * from './useBuildStepQuery'; -export * from './useBuilderBindingsQuery'; -export * from './useBuilderBindingQuery'; export * from './useContentPresetsQuery'; export * from './useContentPresetQuery'; export * from './useDatabaseFunctionGraphsQuery'; @@ -92,8 +90,6 @@ export * from './usePlatformBuildsQuery'; export * from './usePlatformBuildQuery'; export * from './usePlatformBuildStepsQuery'; export * from './usePlatformBuildStepQuery'; -export * from './usePlatformBuilderBindingsQuery'; -export * from './usePlatformBuilderBindingQuery'; export * from './usePlatformFunctionApiBindingsQuery'; export * from './usePlatformFunctionApiBindingQuery'; export * from './usePlatformFunctionCapabilityBindingsQuery'; @@ -180,6 +176,8 @@ export * from './usePlatformResourcesHealthsQuery'; export * from './usePlatformResourcesHealthQuery'; export * from './usePlatformResourcesRequirementsStatesQuery'; export * from './usePlatformResourcesResolvedRequirementsQuery'; +export * from './usePlatformServiceBindingsQuery'; +export * from './usePlatformServiceBindingQuery'; export * from './usePlatformWebhookEndpointsQuery'; export * from './usePlatformWebhookEndpointQuery'; export * from './usePlatformWebhookEventsQuery'; @@ -231,6 +229,8 @@ export * from './useResourcesHealthsQuery'; export * from './useResourcesHealthQuery'; export * from './useResourcesRequirementsStatesQuery'; export * from './useResourcesResolvedRequirementsQuery'; +export * from './useServiceBindingsQuery'; +export * from './useServiceBindingQuery'; export * from './useWebhookEndpointsQuery'; export * from './useWebhookEndpointQuery'; export * from './useWebhookEventsQuery'; diff --git a/sdk/constructive-react/src/compute/hooks/queries/useBuilderBindingQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/useBuilderBindingQuery.ts deleted file mode 100644 index 54533ab4ac..0000000000 --- a/sdk/constructive-react/src/compute/hooks/queries/useBuilderBindingQuery.ts +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * @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 { builderBindingKeys } from '../query-keys'; -import type { BuilderBindingSelect, BuilderBindingWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { BuilderBindingSelect, BuilderBindingWithRelations } from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const builderBindingQueryKey = builderBindingKeys.detail; -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```tsx - * const { data, isLoading } = useBuilderBindingQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function useBuilderBindingQuery< - S extends BuilderBindingSelect, - TData = { - builderBinding: InferSelectResult | null; - }, ->( - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, BuilderBindingSelect>; - } & Omit< - UseQueryOptions< - { - builderBinding: InferSelectResult | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useBuilderBindingQuery( - params: { - id: string; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: builderBindingKeys.detail(params.id), - queryFn: () => - getClient() - .builderBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```ts - * const data = await fetchBuilderBindingQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchBuilderBindingQuery(params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, BuilderBindingSelect>; -}): Promise<{ - builderBinding: InferSelectResult | null; -}>; -export async function fetchBuilderBindingQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .builderBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```ts - * await prefetchBuilderBindingQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchBuilderBindingQuery( - queryClient: QueryClient, - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, BuilderBindingSelect>; - } -): Promise; -export async function prefetchBuilderBindingQuery( - queryClient: QueryClient, - params: { - id: string; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: builderBindingKeys.detail(params.id), - queryFn: () => - getClient() - .builderBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/compute/hooks/queries/useBuilderBindingsQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/useBuilderBindingsQuery.ts deleted file mode 100644 index dd88c3c42c..0000000000 --- a/sdk/constructive-react/src/compute/hooks/queries/useBuilderBindingsQuery.ts +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * @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 { builderBindingKeys } from '../query-keys'; -import type { - BuilderBindingSelect, - BuilderBindingWithRelations, - BuilderBindingFilter, - BuilderBindingOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - BuilderBindingSelect, - BuilderBindingWithRelations, - BuilderBindingFilter, - BuilderBindingOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const builderBindingsQueryKey = builderBindingKeys.list; -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```tsx - * const { data, isLoading } = useBuilderBindingsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useBuilderBindingsQuery< - S extends BuilderBindingSelect, - TData = { - builderBindings: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, BuilderBindingSelect>; - } & Omit< - UseQueryOptions< - { - builderBindings: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useBuilderBindingsQuery( - params: { - selection: ListSelectionConfig< - BuilderBindingSelect, - BuilderBindingFilter, - BuilderBindingOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - BuilderBindingSelect, - BuilderBindingFilter, - BuilderBindingOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: builderBindingKeys.list(args), - queryFn: () => getClient().builderBinding.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```ts - * const data = await fetchBuilderBindingsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchBuilderBindingsQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, BuilderBindingSelect>; -}): Promise<{ - builderBindings: ConnectionResult>; -}>; -export async function fetchBuilderBindingsQuery(params: { - selection: ListSelectionConfig; -}) { - const args = buildListSelectionArgs< - BuilderBindingSelect, - BuilderBindingFilter, - BuilderBindingOrderBy - >(params.selection); - return getClient().builderBinding.findMany(args).unwrap(); -} -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```ts - * await prefetchBuilderBindingsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchBuilderBindingsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, BuilderBindingSelect>; - } -): Promise; -export async function prefetchBuilderBindingsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - BuilderBindingSelect, - BuilderBindingFilter, - BuilderBindingOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - BuilderBindingSelect, - BuilderBindingFilter, - BuilderBindingOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: builderBindingKeys.list(args), - queryFn: () => getClient().builderBinding.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/compute/hooks/queries/usePlatformBuilderBindingQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/usePlatformBuilderBindingQuery.ts deleted file mode 100644 index 638ca58416..0000000000 --- a/sdk/constructive-react/src/compute/hooks/queries/usePlatformBuilderBindingQuery.ts +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * @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 { platformBuilderBindingKeys } from '../query-keys'; -import type { - PlatformBuilderBindingSelect, - PlatformBuilderBindingWithRelations, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - PlatformBuilderBindingSelect, - PlatformBuilderBindingWithRelations, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const platformBuilderBindingQueryKey = platformBuilderBindingKeys.detail; -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```tsx - * const { data, isLoading } = usePlatformBuilderBindingQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function usePlatformBuilderBindingQuery< - S extends PlatformBuilderBindingSelect, - TData = { - platformBuilderBinding: InferSelectResult | null; - }, ->( - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, PlatformBuilderBindingSelect>; - } & Omit< - UseQueryOptions< - { - platformBuilderBinding: InferSelectResult | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function usePlatformBuilderBindingQuery( - params: { - id: string; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: platformBuilderBindingKeys.detail(params.id), - queryFn: () => - getClient() - .platformBuilderBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```ts - * const data = await fetchPlatformBuilderBindingQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchPlatformBuilderBindingQuery< - S extends PlatformBuilderBindingSelect, ->(params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, PlatformBuilderBindingSelect>; -}): Promise<{ - platformBuilderBinding: InferSelectResult | null; -}>; -export async function fetchPlatformBuilderBindingQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .platformBuilderBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```ts - * await prefetchPlatformBuilderBindingQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchPlatformBuilderBindingQuery( - queryClient: QueryClient, - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, PlatformBuilderBindingSelect>; - } -): Promise; -export async function prefetchPlatformBuilderBindingQuery( - queryClient: QueryClient, - params: { - id: string; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: platformBuilderBindingKeys.detail(params.id), - queryFn: () => - getClient() - .platformBuilderBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/compute/hooks/queries/usePlatformBuilderBindingsQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/usePlatformBuilderBindingsQuery.ts deleted file mode 100644 index 9071bbe899..0000000000 --- a/sdk/constructive-react/src/compute/hooks/queries/usePlatformBuilderBindingsQuery.ts +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * @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 { platformBuilderBindingKeys } from '../query-keys'; -import type { - PlatformBuilderBindingSelect, - PlatformBuilderBindingWithRelations, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - PlatformBuilderBindingSelect, - PlatformBuilderBindingWithRelations, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const platformBuilderBindingsQueryKey = platformBuilderBindingKeys.list; -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```tsx - * const { data, isLoading } = usePlatformBuilderBindingsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function usePlatformBuilderBindingsQuery< - S extends PlatformBuilderBindingSelect, - TData = { - platformBuilderBindings: ConnectionResult< - InferSelectResult - >; - }, ->( - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, PlatformBuilderBindingSelect>; - } & Omit< - UseQueryOptions< - { - platformBuilderBindings: ConnectionResult< - InferSelectResult - >; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function usePlatformBuilderBindingsQuery( - params: { - selection: ListSelectionConfig< - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: platformBuilderBindingKeys.list(args), - queryFn: () => getClient().platformBuilderBinding.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```ts - * const data = await fetchPlatformBuilderBindingsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchPlatformBuilderBindingsQuery< - S extends PlatformBuilderBindingSelect, ->(params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, PlatformBuilderBindingSelect>; -}): Promise<{ - platformBuilderBindings: ConnectionResult< - InferSelectResult - >; -}>; -export async function fetchPlatformBuilderBindingsQuery(params: { - selection: ListSelectionConfig< - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy - >; -}) { - const args = buildListSelectionArgs< - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy - >(params.selection); - return getClient().platformBuilderBinding.findMany(args).unwrap(); -} -/** - * Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST - * - * @example - * ```ts - * await prefetchPlatformBuilderBindingsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchPlatformBuilderBindingsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, PlatformBuilderBindingSelect>; - } -): Promise; -export async function prefetchPlatformBuilderBindingsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: platformBuilderBindingKeys.list(args), - queryFn: () => getClient().platformBuilderBinding.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/compute/hooks/queries/usePlatformServiceBindingQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/usePlatformServiceBindingQuery.ts new file mode 100644 index 0000000000..e644793718 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/usePlatformServiceBindingQuery.ts @@ -0,0 +1,146 @@ +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * @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 { platformServiceBindingKeys } from '../query-keys'; +import type { + PlatformServiceBindingSelect, + PlatformServiceBindingWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformServiceBindingSelect, + PlatformServiceBindingWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformServiceBindingQueryKey = platformServiceBindingKeys.detail; +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformServiceBindingQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlatformServiceBindingQuery< + S extends PlatformServiceBindingSelect, + TData = { + platformServiceBinding: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformServiceBindingSelect>; + } & Omit< + UseQueryOptions< + { + platformServiceBinding: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformServiceBindingQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformServiceBindingKeys.detail(params.id), + queryFn: () => + getClient() + .platformServiceBinding.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```ts + * const data = await fetchPlatformServiceBindingQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlatformServiceBindingQuery< + S extends PlatformServiceBindingSelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformServiceBindingSelect>; +}): Promise<{ + platformServiceBinding: InferSelectResult | null; +}>; +export async function fetchPlatformServiceBindingQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .platformServiceBinding.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```ts + * await prefetchPlatformServiceBindingQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlatformServiceBindingQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformServiceBindingSelect>; + } +): Promise; +export async function prefetchPlatformServiceBindingQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformServiceBindingKeys.detail(params.id), + queryFn: () => + getClient() + .platformServiceBinding.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/usePlatformServiceBindingsQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/usePlatformServiceBindingsQuery.ts new file mode 100644 index 0000000000..d3db6328cc --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/usePlatformServiceBindingsQuery.ts @@ -0,0 +1,180 @@ +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * @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 { platformServiceBindingKeys } from '../query-keys'; +import type { + PlatformServiceBindingSelect, + PlatformServiceBindingWithRelations, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlatformServiceBindingSelect, + PlatformServiceBindingWithRelations, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformServiceBindingsQueryKey = platformServiceBindingKeys.list; +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformServiceBindingsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlatformServiceBindingsQuery< + S extends PlatformServiceBindingSelect, + TData = { + platformServiceBindings: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformServiceBindingSelect>; + } & Omit< + UseQueryOptions< + { + platformServiceBindings: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformServiceBindingsQuery( + params: { + selection: ListSelectionConfig< + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformServiceBindingKeys.list(args), + queryFn: () => getClient().platformServiceBinding.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```ts + * const data = await fetchPlatformServiceBindingsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlatformServiceBindingsQuery< + S extends PlatformServiceBindingSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformServiceBindingSelect>; +}): Promise<{ + platformServiceBindings: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchPlatformServiceBindingsQuery(params: { + selection: ListSelectionConfig< + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy + >; +}) { + const args = buildListSelectionArgs< + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy + >(params.selection); + return getClient().platformServiceBinding.findMany(args).unwrap(); +} +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```ts + * await prefetchPlatformServiceBindingsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlatformServiceBindingsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformServiceBindingSelect>; + } +): Promise; +export async function prefetchPlatformServiceBindingsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformServiceBindingKeys.list(args), + queryFn: () => getClient().platformServiceBinding.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/useServiceBindingQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/useServiceBindingQuery.ts new file mode 100644 index 0000000000..41206d8a77 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/useServiceBindingQuery.ts @@ -0,0 +1,138 @@ +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * @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 { serviceBindingKeys } from '../query-keys'; +import type { ServiceBindingSelect, ServiceBindingWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ServiceBindingSelect, ServiceBindingWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const serviceBindingQueryKey = serviceBindingKeys.detail; +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```tsx + * const { data, isLoading } = useServiceBindingQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useServiceBindingQuery< + S extends ServiceBindingSelect, + TData = { + serviceBinding: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ServiceBindingSelect>; + } & Omit< + UseQueryOptions< + { + serviceBinding: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useServiceBindingQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: serviceBindingKeys.detail(params.id), + queryFn: () => + getClient() + .serviceBinding.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```ts + * const data = await fetchServiceBindingQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchServiceBindingQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ServiceBindingSelect>; +}): Promise<{ + serviceBinding: InferSelectResult | null; +}>; +export async function fetchServiceBindingQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .serviceBinding.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```ts + * await prefetchServiceBindingQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchServiceBindingQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ServiceBindingSelect>; + } +): Promise; +export async function prefetchServiceBindingQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: serviceBindingKeys.detail(params.id), + queryFn: () => + getClient() + .serviceBinding.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/useServiceBindingsQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/useServiceBindingsQuery.ts new file mode 100644 index 0000000000..17c297adda --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/useServiceBindingsQuery.ts @@ -0,0 +1,159 @@ +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * @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 { serviceBindingKeys } from '../query-keys'; +import type { + ServiceBindingSelect, + ServiceBindingWithRelations, + ServiceBindingFilter, + ServiceBindingOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + ServiceBindingSelect, + ServiceBindingWithRelations, + ServiceBindingFilter, + ServiceBindingOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const serviceBindingsQueryKey = serviceBindingKeys.list; +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```tsx + * const { data, isLoading } = useServiceBindingsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useServiceBindingsQuery< + S extends ServiceBindingSelect, + TData = { + serviceBindings: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ServiceBindingSelect>; + } & Omit< + UseQueryOptions< + { + serviceBindings: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useServiceBindingsQuery( + params: { + selection: ListSelectionConfig< + ServiceBindingSelect, + ServiceBindingFilter, + ServiceBindingOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + ServiceBindingSelect, + ServiceBindingFilter, + ServiceBindingOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: serviceBindingKeys.list(args), + queryFn: () => getClient().serviceBinding.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```ts + * const data = await fetchServiceBindingsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchServiceBindingsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ServiceBindingSelect>; +}): Promise<{ + serviceBindings: ConnectionResult>; +}>; +export async function fetchServiceBindingsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs< + ServiceBindingSelect, + ServiceBindingFilter, + ServiceBindingOrderBy + >(params.selection); + return getClient().serviceBinding.findMany(args).unwrap(); +} +/** + * Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config + * + * @example + * ```ts + * await prefetchServiceBindingsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchServiceBindingsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ServiceBindingSelect>; + } +): Promise; +export async function prefetchServiceBindingsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + ServiceBindingSelect, + ServiceBindingFilter, + ServiceBindingOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + ServiceBindingSelect, + ServiceBindingFilter, + ServiceBindingOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: serviceBindingKeys.list(args), + queryFn: () => getClient().serviceBinding.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/query-keys.ts b/sdk/constructive-react/src/compute/hooks/query-keys.ts index 47f4410b39..b34c4fbf0e 100644 --- a/sdk/constructive-react/src/compute/hooks/query-keys.ts +++ b/sdk/constructive-react/src/compute/hooks/query-keys.ts @@ -37,15 +37,6 @@ export const buildStepKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...buildStepKeys.details(), id] as const, } as const; -export const builderBindingKeys = { - /** All builderBinding queries */ all: ['builderbinding'] as const, - /** List query keys */ lists: () => [...builderBindingKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...builderBindingKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...builderBindingKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...builderBindingKeys.details(), id] as const, -} as const; export const contentPresetKeys = { /** All contentPreset queries */ all: ['contentpreset'] as const, /** List query keys */ lists: () => [...contentPresetKeys.all, 'list'] as const, @@ -461,15 +452,6 @@ export const platformBuildStepKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...platformBuildStepKeys.details(), id] as const, } as const; -export const platformBuilderBindingKeys = { - /** All platformBuilderBinding queries */ all: ['platformbuilderbinding'] as const, - /** List query keys */ lists: () => [...platformBuilderBindingKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...platformBuilderBindingKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...platformBuilderBindingKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...platformBuilderBindingKeys.details(), id] as const, -} as const; export const platformFunctionApiBindingKeys = { /** All platformFunctionApiBinding queries */ all: ['platformfunctionapibinding'] as const, /** List query keys */ lists: () => [...platformFunctionApiBindingKeys.all, 'list'] as const, @@ -928,6 +910,15 @@ export const platformResourcesResolvedRequirementKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...platformResourcesResolvedRequirementKeys.details(), id] as const, } as const; +export const platformServiceBindingKeys = { + /** All platformServiceBinding queries */ all: ['platformservicebinding'] as const, + /** List query keys */ lists: () => [...platformServiceBindingKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...platformServiceBindingKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...platformServiceBindingKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...platformServiceBindingKeys.details(), id] as const, +} as const; export const platformWebhookEndpointKeys = { /** All platformWebhookEndpoint queries */ all: ['platformwebhookendpoint'] as const, /** List query keys */ lists: () => [...platformWebhookEndpointKeys.all, 'list'] as const, @@ -1182,6 +1173,15 @@ export const resourcesResolvedRequirementKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...resourcesResolvedRequirementKeys.details(), id] as const, } as const; +export const serviceBindingKeys = { + /** All serviceBinding queries */ all: ['servicebinding'] as const, + /** List query keys */ lists: () => [...serviceBindingKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...serviceBindingKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...serviceBindingKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...serviceBindingKeys.details(), id] as const, +} as const; export const webhookEndpointKeys = { /** All webhookEndpoint queries */ all: ['webhookendpoint'] as const, /** List query keys */ lists: () => [...webhookEndpointKeys.all, 'list'] as const, @@ -1236,7 +1236,6 @@ export const customQueryKeys = { export const queryKeys = { build: buildKeys, buildStep: buildStepKeys, - builderBinding: builderBindingKeys, contentPreset: contentPresetKeys, databaseFunctionGraph: databaseFunctionGraphKeys, databaseFunctionGraphExecutionCancelRequest: databaseFunctionGraphExecutionCancelRequestKeys, @@ -1280,7 +1279,6 @@ export const queryKeys = { namespaceEvent: namespaceEventKeys, platformBuild: platformBuildKeys, platformBuildStep: platformBuildStepKeys, - platformBuilderBinding: platformBuilderBindingKeys, platformFunctionApiBinding: platformFunctionApiBindingKeys, platformFunctionCapabilityBinding: platformFunctionCapabilityBindingKeys, platformFunctionDefinition: platformFunctionDefinitionKeys, @@ -1327,6 +1325,7 @@ export const queryKeys = { platformResourcesHealth: platformResourcesHealthKeys, platformResourcesRequirementsState: platformResourcesRequirementsStateKeys, platformResourcesResolvedRequirement: platformResourcesResolvedRequirementKeys, + platformServiceBinding: platformServiceBindingKeys, platformWebhookEndpoint: platformWebhookEndpointKeys, platformWebhookEvent: platformWebhookEventKeys, proposalComment: proposalCommentKeys, @@ -1355,6 +1354,7 @@ export const queryKeys = { resourcesHealth: resourcesHealthKeys, resourcesRequirementsState: resourcesRequirementsStateKeys, resourcesResolvedRequirement: resourcesResolvedRequirementKeys, + serviceBinding: serviceBindingKeys, webhookEndpoint: webhookEndpointKeys, webhookEvent: webhookEventKeys, custom: customQueryKeys, diff --git a/sdk/constructive-react/src/compute/orm/README.md b/sdk/constructive-react/src/compute/orm/README.md index 68d50bcb97..6737465511 100644 --- a/sdk/constructive-react/src/compute/orm/README.md +++ b/sdk/constructive-react/src/compute/orm/README.md @@ -23,7 +23,6 @@ const db = createClient({ |-------|------------| | `build` | findMany, findOne, create, update, delete | | `buildStep` | findMany, findOne, create, update, delete | -| `builderBinding` | findMany, findOne, create, update, delete | | `contentPreset` | findMany, findOne, create, update, delete | | `databaseFunctionGraph` | findMany, findOne, create, update, delete | | `databaseFunctionGraphExecutionCancelRequest` | findMany, findOne, create, update, delete | @@ -67,7 +66,6 @@ const db = createClient({ | `namespaceEvent` | findMany, findOne, create, update, delete | | `platformBuild` | findMany, findOne, create, update, delete | | `platformBuildStep` | findMany, findOne, create, update, delete | -| `platformBuilderBinding` | findMany, findOne, create, update, delete | | `platformFunctionApiBinding` | findMany, findOne, create, update, delete | | `platformFunctionCapabilityBinding` | findMany, findOne, create, update, delete | | `platformFunctionDefinition` | findMany, findOne, create, update, delete | @@ -114,6 +112,7 @@ const db = createClient({ | `platformResourcesHealth` | findMany, findOne, create, update, delete | | `platformResourcesRequirementsState` | findMany, findOne, create, update, delete | | `platformResourcesResolvedRequirement` | findMany, findOne, create, update, delete | +| `platformServiceBinding` | findMany, findOne, create, update, delete | | `platformWebhookEndpoint` | findMany, findOne, create, update, delete | | `platformWebhookEvent` | findMany, findOne, create, update, delete | | `proposalComment` | findMany, findOne, create, update, delete | @@ -142,6 +141,7 @@ const db = createClient({ | `resourcesHealth` | findMany, findOne, create, update, delete | | `resourcesRequirementsState` | findMany, findOne, create, update, delete | | `resourcesResolvedRequirement` | findMany, findOne, create, update, delete | +| `serviceBinding` | findMany, findOne, create, update, delete | | `webhookEndpoint` | findMany, findOne, create, update, delete | | `webhookEvent` | findMany, findOne, create, update, delete | @@ -242,49 +242,6 @@ const updated = await db.buildStep.update({ where: { id: '' }, data: { bui const deleted = await db.buildStep.delete({ where: { id: '' } }).execute(); ``` -### `db.builderBinding` - -CRUD operations for BuilderBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `createdAt` | Datetime | No | -| `createdBy` | UUID | Yes | -| `createdByPrincipal` | UUID | Yes | -| `databaseId` | UUID | Yes | -| `id` | UUID | No | -| `installationId` | UUID | Yes | -| `lastError` | String | Yes | -| `metadata` | JSON | Yes | -| `namespaceId` | UUID | Yes | -| `observedHost` | String | Yes | -| `realm` | String | Yes | -| `status` | String | Yes | -| `updatedAt` | Datetime | No | -| `updatedBy` | UUID | Yes | -| `updatedByPrincipal` | UUID | Yes | - -**Operations:** - -```typescript -// List all builderBinding records -const items = await db.builderBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Get one by id -const item = await db.builderBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Create -const created = await db.builderBinding.create({ data: { createdBy: '', createdByPrincipal: '', databaseId: '', installationId: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.builderBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.builderBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.contentPreset` CRUD operations for ContentPreset records. @@ -2002,48 +1959,6 @@ const updated = await db.platformBuildStep.update({ where: { id: '' }, dat const deleted = await db.platformBuildStep.delete({ where: { id: '' } }).execute(); ``` -### `db.platformBuilderBinding` - -CRUD operations for PlatformBuilderBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `createdAt` | Datetime | No | -| `createdBy` | UUID | Yes | -| `createdByPrincipal` | UUID | Yes | -| `id` | UUID | No | -| `installationId` | UUID | Yes | -| `lastError` | String | Yes | -| `metadata` | JSON | Yes | -| `namespaceId` | UUID | Yes | -| `observedHost` | String | Yes | -| `realm` | String | Yes | -| `status` | String | Yes | -| `updatedAt` | Datetime | No | -| `updatedBy` | UUID | Yes | -| `updatedByPrincipal` | UUID | Yes | - -**Operations:** - -```typescript -// List all platformBuilderBinding records -const items = await db.platformBuilderBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Get one by id -const item = await db.platformBuilderBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Create -const created = await db.platformBuilderBinding.create({ data: { createdBy: '', createdByPrincipal: '', installationId: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.platformBuilderBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.platformBuilderBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.platformFunctionApiBinding` CRUD operations for PlatformFunctionApiBinding records. @@ -4038,6 +3953,50 @@ const updated = await db.platformResourcesResolvedRequirement.update({ where: { const deleted = await db.platformResourcesResolvedRequirement.delete({ where: { id: '' } }).execute(); ``` +### `db.platformServiceBinding` + +CRUD operations for PlatformServiceBinding records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `createdByPrincipal` | UUID | Yes | +| `id` | UUID | No | +| `installationId` | UUID | Yes | +| `installationScope` | String | Yes | +| `kind` | String | Yes | +| `lastError` | String | Yes | +| `metadata` | JSON | Yes | +| `namespaceId` | UUID | Yes | +| `observedHost` | String | Yes | +| `realm` | String | Yes | +| `status` | String | Yes | +| `updatedAt` | Datetime | No | +| `updatedBy` | UUID | Yes | +| `updatedByPrincipal` | UUID | Yes | + +**Operations:** + +```typescript +// List all platformServiceBinding records +const items = await db.platformServiceBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Get one by id +const item = await db.platformServiceBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Create +const created = await db.platformServiceBinding.create({ data: { createdBy: '', createdByPrincipal: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformServiceBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformServiceBinding.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformWebhookEndpoint` CRUD operations for PlatformWebhookEndpoint records. @@ -5325,6 +5284,51 @@ const updated = await db.resourcesResolvedRequirement.update({ where: { id: '' } }).execute(); ``` +### `db.serviceBinding` + +CRUD operations for ServiceBinding records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `createdByPrincipal` | UUID | Yes | +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `installationId` | UUID | Yes | +| `installationScope` | String | Yes | +| `kind` | String | Yes | +| `lastError` | String | Yes | +| `metadata` | JSON | Yes | +| `namespaceId` | UUID | Yes | +| `observedHost` | String | Yes | +| `realm` | String | Yes | +| `status` | String | Yes | +| `updatedAt` | Datetime | No | +| `updatedBy` | UUID | Yes | +| `updatedByPrincipal` | UUID | Yes | + +**Operations:** + +```typescript +// List all serviceBinding records +const items = await db.serviceBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Get one by id +const item = await db.serviceBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Create +const created = await db.serviceBinding.create({ data: { createdBy: '', createdByPrincipal: '', databaseId: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.serviceBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.serviceBinding.delete({ where: { id: '' } }).execute(); +``` + ### `db.webhookEndpoint` CRUD operations for WebhookEndpoint records. diff --git a/sdk/constructive-react/src/compute/orm/index.ts b/sdk/constructive-react/src/compute/orm/index.ts index 01033dc125..bc4368881e 100644 --- a/sdk/constructive-react/src/compute/orm/index.ts +++ b/sdk/constructive-react/src/compute/orm/index.ts @@ -7,7 +7,6 @@ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; import { BuildModel } from './models/build'; import { BuildStepModel } from './models/buildStep'; -import { BuilderBindingModel } from './models/builderBinding'; import { ContentPresetModel } from './models/contentPreset'; import { DatabaseFunctionGraphModel } from './models/databaseFunctionGraph'; import { DatabaseFunctionGraphExecutionCancelRequestModel } from './models/databaseFunctionGraphExecutionCancelRequest'; @@ -51,7 +50,6 @@ import { NamespaceModel } from './models/namespace'; import { NamespaceEventModel } from './models/namespaceEvent'; import { PlatformBuildModel } from './models/platformBuild'; import { PlatformBuildStepModel } from './models/platformBuildStep'; -import { PlatformBuilderBindingModel } from './models/platformBuilderBinding'; import { PlatformFunctionApiBindingModel } from './models/platformFunctionApiBinding'; import { PlatformFunctionCapabilityBindingModel } from './models/platformFunctionCapabilityBinding'; import { PlatformFunctionDefinitionModel } from './models/platformFunctionDefinition'; @@ -98,6 +96,7 @@ import { PlatformResourceUtilizationModel } from './models/platformResourceUtili import { PlatformResourcesHealthModel } from './models/platformResourcesHealth'; import { PlatformResourcesRequirementsStateModel } from './models/platformResourcesRequirementsState'; import { PlatformResourcesResolvedRequirementModel } from './models/platformResourcesResolvedRequirement'; +import { PlatformServiceBindingModel } from './models/platformServiceBinding'; import { PlatformWebhookEndpointModel } from './models/platformWebhookEndpoint'; import { PlatformWebhookEventModel } from './models/platformWebhookEvent'; import { ProposalCommentModel } from './models/proposalComment'; @@ -126,6 +125,7 @@ import { ResourceUtilizationModel } from './models/resourceUtilization'; import { ResourcesHealthModel } from './models/resourcesHealth'; import { ResourcesRequirementsStateModel } from './models/resourcesRequirementsState'; import { ResourcesResolvedRequirementModel } from './models/resourcesResolvedRequirement'; +import { ServiceBindingModel } from './models/serviceBinding'; import { WebhookEndpointModel } from './models/webhookEndpoint'; import { WebhookEventModel } from './models/webhookEvent'; import { createQueryOperations } from './query'; @@ -165,7 +165,6 @@ export function createClient(config: OrmClientConfig) { return { build: new BuildModel(client), buildStep: new BuildStepModel(client), - builderBinding: new BuilderBindingModel(client), contentPreset: new ContentPresetModel(client), databaseFunctionGraph: new DatabaseFunctionGraphModel(client), databaseFunctionGraphExecutionCancelRequest: @@ -212,7 +211,6 @@ export function createClient(config: OrmClientConfig) { namespaceEvent: new NamespaceEventModel(client), platformBuild: new PlatformBuildModel(client), platformBuildStep: new PlatformBuildStepModel(client), - platformBuilderBinding: new PlatformBuilderBindingModel(client), platformFunctionApiBinding: new PlatformFunctionApiBindingModel(client), platformFunctionCapabilityBinding: new PlatformFunctionCapabilityBindingModel(client), platformFunctionDefinition: new PlatformFunctionDefinitionModel(client), @@ -259,6 +257,7 @@ export function createClient(config: OrmClientConfig) { platformResourcesHealth: new PlatformResourcesHealthModel(client), platformResourcesRequirementsState: new PlatformResourcesRequirementsStateModel(client), platformResourcesResolvedRequirement: new PlatformResourcesResolvedRequirementModel(client), + platformServiceBinding: new PlatformServiceBindingModel(client), platformWebhookEndpoint: new PlatformWebhookEndpointModel(client), platformWebhookEvent: new PlatformWebhookEventModel(client), proposalComment: new ProposalCommentModel(client), @@ -287,6 +286,7 @@ export function createClient(config: OrmClientConfig) { resourcesHealth: new ResourcesHealthModel(client), resourcesRequirementsState: new ResourcesRequirementsStateModel(client), resourcesResolvedRequirement: new ResourcesResolvedRequirementModel(client), + serviceBinding: new ServiceBindingModel(client), webhookEndpoint: new WebhookEndpointModel(client), webhookEvent: new WebhookEventModel(client), query: createQueryOperations(client), diff --git a/sdk/constructive-react/src/compute/orm/input-types.ts b/sdk/constructive-react/src/compute/orm/input-types.ts index c4f3a14a61..147bcb6cbd 100644 --- a/sdk/constructive-react/src/compute/orm/input-types.ts +++ b/sdk/constructive-react/src/compute/orm/input-types.ts @@ -315,32 +315,6 @@ export interface BuildStep { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record | null; } -/** Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST */ -export interface BuilderBinding { - createdAt?: string | null; - createdBy?: string | null; - createdByPrincipal?: string | null; - /** Database that owns this resource (database-scoped isolation) */ - databaseId?: string | null; - id: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId?: string | null; - /** Most recent projection failure */ - lastError?: string | null; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record | null; - /** Namespace whose builds use this BuildKit installation */ - namespaceId?: string | null; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string | null; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string | null; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string | null; - updatedAt?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} /** Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store */ export interface ContentPreset { /** Whether this preset is selectable at provision time */ @@ -1447,30 +1421,6 @@ export interface PlatformBuildStep { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record | null; } -/** Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST */ -export interface PlatformBuilderBinding { - createdAt?: string | null; - createdBy?: string | null; - createdByPrincipal?: string | null; - id: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId?: string | null; - /** Most recent projection failure */ - lastError?: string | null; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record | null; - /** Namespace whose builds use this BuildKit installation */ - namespaceId?: string | null; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string | null; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string | null; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string | null; - updatedAt?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} /** Join table binding function definitions to API endpoints with per-binding alias and config */ export interface PlatformFunctionApiBinding { /** Binding alias (e.g. default, staging, production) */ @@ -2720,6 +2670,34 @@ export interface PlatformResourcesResolvedRequirement { secretsObjectName?: string | null; slug?: string | null; } +/** Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config */ +export interface PlatformServiceBinding { + createdAt?: string | null; + createdBy?: string | null; + createdByPrincipal?: string | null; + id: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId?: string | null; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope?: string | null; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind?: string | null; + /** Most recent projection failure */ + lastError?: string | null; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record | null; + /** Namespace whose builds use this BuildKit installation */ + namespaceId?: string | null; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string | null; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string | null; + /** Projection state of the bound address: pending, active, failed */ + status?: string | null; + updatedAt?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} /** Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window */ export interface PlatformWebhookEndpoint { /** Whether this endpoint currently accepts deliveries */ @@ -3533,6 +3511,36 @@ export interface ResourcesResolvedRequirement { secretsObjectName?: string | null; slug?: string | null; } +/** Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config */ +export interface ServiceBinding { + createdAt?: string | null; + createdBy?: string | null; + createdByPrincipal?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + id: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId?: string | null; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope?: string | null; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind?: string | null; + /** Most recent projection failure */ + lastError?: string | null; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record | null; + /** Namespace whose builds use this BuildKit installation */ + namespaceId?: string | null; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string | null; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string | null; + /** Projection state of the bound address: pending, active, failed */ + status?: string | null; + updatedAt?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} /** Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window */ export interface WebhookEndpoint { /** Whether this endpoint currently accepts deliveries */ @@ -3607,9 +3615,6 @@ export interface BuildRelations { workflow?: RepositoryWorkflow | null; } export interface BuildStepRelations {} -export interface BuilderBindingRelations { - namespace?: Namespace | null; -} export interface ContentPresetRelations {} export interface DatabaseFunctionGraphRelations { databaseFunctionGraphExecutionsByGraphId?: ConnectionResult; @@ -3683,12 +3688,12 @@ export interface InfraRefRelations {} export interface InfraStoreRelations {} export interface IntegrationProviderRelations {} export interface NamespaceRelations { - builderBindings?: ConnectionResult; functionDeployments?: ConnectionResult; registryBindings?: ConnectionResult; resourceDefinitions?: ConnectionResult; resourceInstallations?: ConnectionResult; resources?: ConnectionResult; + serviceBindings?: ConnectionResult; webhookEndpoints?: ConnectionResult; } export interface NamespaceEventRelations {} @@ -3699,9 +3704,6 @@ export interface PlatformBuildRelations { workflow?: PlatformRepositoryWorkflow | null; } export interface PlatformBuildStepRelations {} -export interface PlatformBuilderBindingRelations { - namespace?: PlatformNamespace | null; -} export interface PlatformFunctionApiBindingRelations { functionDefinition?: PlatformFunctionDefinition | null; platformFunctionInvocationsByApiBindingId?: ConnectionResult; @@ -3742,12 +3744,12 @@ export interface PlatformInfraStoreRelations {} export interface PlatformK8sResourceKindRelations {} export interface PlatformK8sSpecRuleRelations {} export interface PlatformNamespaceRelations { - platformBuilderBindingsByNamespaceId?: ConnectionResult; platformFunctionDeploymentsByNamespaceId?: ConnectionResult; platformRegistryBindingsByNamespaceId?: ConnectionResult; platformResourceDefinitionsByNamespaceId?: ConnectionResult; platformResourceInstallationsByNamespaceId?: ConnectionResult; platformResourcesByNamespaceId?: ConnectionResult; + platformServiceBindingsByNamespaceId?: ConnectionResult; platformWebhookEndpointsByNamespaceId?: ConnectionResult; } export interface PlatformNamespaceEventRelations {} @@ -3839,6 +3841,9 @@ export interface PlatformResourceUtilizationRelations {} export interface PlatformResourcesHealthRelations {} export interface PlatformResourcesRequirementsStateRelations {} export interface PlatformResourcesResolvedRequirementRelations {} +export interface PlatformServiceBindingRelations { + namespace?: PlatformNamespace | null; +} export interface PlatformWebhookEndpointRelations { functionDefinition?: PlatformFunctionDefinition | null; namespace?: PlatformNamespace | null; @@ -3935,6 +3940,9 @@ export interface ResourceUtilizationRelations {} export interface ResourcesHealthRelations {} export interface ResourcesRequirementsStateRelations {} export interface ResourcesResolvedRequirementRelations {} +export interface ServiceBindingRelations { + namespace?: Namespace | null; +} export interface WebhookEndpointRelations { functionDefinition?: FunctionDefinition | null; namespace?: Namespace | null; @@ -3946,7 +3954,6 @@ export interface WebhookEventRelations { // ============ Entity Types With Relations ============ export type BuildWithRelations = Build & BuildRelations; export type BuildStepWithRelations = BuildStep & BuildStepRelations; -export type BuilderBindingWithRelations = BuilderBinding & BuilderBindingRelations; export type ContentPresetWithRelations = ContentPreset & ContentPresetRelations; export type DatabaseFunctionGraphWithRelations = DatabaseFunctionGraph & DatabaseFunctionGraphRelations; @@ -4007,8 +4014,6 @@ export type NamespaceWithRelations = Namespace & NamespaceRelations; export type NamespaceEventWithRelations = NamespaceEvent & NamespaceEventRelations; export type PlatformBuildWithRelations = PlatformBuild & PlatformBuildRelations; export type PlatformBuildStepWithRelations = PlatformBuildStep & PlatformBuildStepRelations; -export type PlatformBuilderBindingWithRelations = PlatformBuilderBinding & - PlatformBuilderBindingRelations; export type PlatformFunctionApiBindingWithRelations = PlatformFunctionApiBinding & PlatformFunctionApiBindingRelations; export type PlatformFunctionCapabilityBindingWithRelations = PlatformFunctionCapabilityBinding & @@ -4089,6 +4094,8 @@ export type PlatformResourcesRequirementsStateWithRelations = PlatformResourcesR PlatformResourcesRequirementsStateRelations; export type PlatformResourcesResolvedRequirementWithRelations = PlatformResourcesResolvedRequirement & PlatformResourcesResolvedRequirementRelations; +export type PlatformServiceBindingWithRelations = PlatformServiceBinding & + PlatformServiceBindingRelations; export type PlatformWebhookEndpointWithRelations = PlatformWebhookEndpoint & PlatformWebhookEndpointRelations; export type PlatformWebhookEventWithRelations = PlatformWebhookEvent & @@ -4126,6 +4133,7 @@ export type ResourcesRequirementsStateWithRelations = ResourcesRequirementsState ResourcesRequirementsStateRelations; export type ResourcesResolvedRequirementWithRelations = ResourcesResolvedRequirement & ResourcesResolvedRequirementRelations; +export type ServiceBindingWithRelations = ServiceBinding & ServiceBindingRelations; export type WebhookEndpointWithRelations = WebhookEndpoint & WebhookEndpointRelations; export type WebhookEventWithRelations = WebhookEvent & WebhookEventRelations; // ============ Entity Select Types ============ @@ -4184,26 +4192,6 @@ export type BuildStepSelect = { status?: boolean; summary?: boolean; }; -export type BuilderBindingSelect = { - createdAt?: boolean; - createdBy?: boolean; - createdByPrincipal?: boolean; - databaseId?: boolean; - id?: boolean; - installationId?: boolean; - lastError?: boolean; - metadata?: boolean; - namespaceId?: boolean; - observedHost?: boolean; - realm?: boolean; - status?: boolean; - updatedAt?: boolean; - updatedBy?: boolean; - updatedByPrincipal?: boolean; - namespace?: { - select: NamespaceSelect; - }; -}; export type ContentPresetSelect = { active?: boolean; commitId?: boolean; @@ -4850,12 +4838,6 @@ export type NamespaceSelect = { namespaceName?: boolean; status?: boolean; updatedAt?: boolean; - builderBindings?: { - select: BuilderBindingSelect; - first?: number; - filter?: BuilderBindingFilter; - orderBy?: BuilderBindingOrderBy[]; - }; functionDeployments?: { select: FunctionDeploymentSelect; first?: number; @@ -4886,6 +4868,12 @@ export type NamespaceSelect = { filter?: ResourceFilter; orderBy?: ResourceOrderBy[]; }; + serviceBindings?: { + select: ServiceBindingSelect; + first?: number; + filter?: ServiceBindingFilter; + orderBy?: ServiceBindingOrderBy[]; + }; webhookEndpoints?: { select: WebhookEndpointSelect; first?: number; @@ -4956,25 +4944,6 @@ export type PlatformBuildStepSelect = { status?: boolean; summary?: boolean; }; -export type PlatformBuilderBindingSelect = { - createdAt?: boolean; - createdBy?: boolean; - createdByPrincipal?: boolean; - id?: boolean; - installationId?: boolean; - lastError?: boolean; - metadata?: boolean; - namespaceId?: boolean; - observedHost?: boolean; - realm?: boolean; - status?: boolean; - updatedAt?: boolean; - updatedBy?: boolean; - updatedByPrincipal?: boolean; - namespace?: { - select: PlatformNamespaceSelect; - }; -}; export type PlatformFunctionApiBindingSelect = { alias?: boolean; apiId?: boolean; @@ -5313,12 +5282,6 @@ export type PlatformNamespaceSelect = { namespaceName?: boolean; status?: boolean; updatedAt?: boolean; - platformBuilderBindingsByNamespaceId?: { - select: PlatformBuilderBindingSelect; - first?: number; - filter?: PlatformBuilderBindingFilter; - orderBy?: PlatformBuilderBindingOrderBy[]; - }; platformFunctionDeploymentsByNamespaceId?: { select: PlatformFunctionDeploymentSelect; first?: number; @@ -5349,6 +5312,12 @@ export type PlatformNamespaceSelect = { filter?: PlatformResourceFilter; orderBy?: PlatformResourceOrderBy[]; }; + platformServiceBindingsByNamespaceId?: { + select: PlatformServiceBindingSelect; + first?: number; + filter?: PlatformServiceBindingFilter; + orderBy?: PlatformServiceBindingOrderBy[]; + }; platformWebhookEndpointsByNamespaceId?: { select: PlatformWebhookEndpointSelect; first?: number; @@ -6049,6 +6018,27 @@ export type PlatformResourcesResolvedRequirementSelect = { secretsObjectName?: boolean; slug?: boolean; }; +export type PlatformServiceBindingSelect = { + createdAt?: boolean; + createdBy?: boolean; + createdByPrincipal?: boolean; + id?: boolean; + installationId?: boolean; + installationScope?: boolean; + kind?: boolean; + lastError?: boolean; + metadata?: boolean; + namespaceId?: boolean; + observedHost?: boolean; + realm?: boolean; + status?: boolean; + updatedAt?: boolean; + updatedBy?: boolean; + updatedByPrincipal?: boolean; + namespace?: { + select: PlatformNamespaceSelect; + }; +}; export type PlatformWebhookEndpointSelect = { active?: boolean; createdAt?: boolean; @@ -6800,6 +6790,28 @@ export type ResourcesResolvedRequirementSelect = { secretsObjectName?: boolean; slug?: boolean; }; +export type ServiceBindingSelect = { + createdAt?: boolean; + createdBy?: boolean; + createdByPrincipal?: boolean; + databaseId?: boolean; + id?: boolean; + installationId?: boolean; + installationScope?: boolean; + kind?: boolean; + lastError?: boolean; + metadata?: boolean; + namespaceId?: boolean; + observedHost?: boolean; + realm?: boolean; + status?: boolean; + updatedAt?: boolean; + updatedBy?: boolean; + updatedByPrincipal?: boolean; + namespace?: { + select: NamespaceSelect; + }; +}; export type WebhookEndpointSelect = { active?: boolean; createdAt?: boolean; @@ -6957,46 +6969,6 @@ export interface BuildStepFilter { /** Filter by the object’s `summary` field. */ summary?: JSONFilter; } -export interface BuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: BuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: NamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: BuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: BuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} export interface ContentPresetFilter { /** Filter by the object’s `active` field. */ active?: BooleanFilter; @@ -8271,10 +8243,6 @@ export interface NamespaceFilter { and?: NamespaceFilter[]; /** Filter by the object’s `annotations` field. */ annotations?: JSONFilter; - /** Filter by the object’s `builderBindings` relation. */ - builderBindings?: NamespaceToManyBuilderBindingFilter; - /** `builderBindings` exist. */ - builderBindingsExist?: boolean; /** Filter by the object’s `clusterId` field. */ clusterId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -8321,6 +8289,10 @@ export interface NamespaceFilter { resources?: NamespaceToManyResourceFilter; /** `resources` exist. */ resourcesExist?: boolean; + /** Filter by the object’s `serviceBindings` relation. */ + serviceBindings?: NamespaceToManyServiceBindingFilter; + /** `serviceBindings` exist. */ + serviceBindingsExist?: boolean; /** Filter by the object’s `status` field. */ status?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -8458,44 +8430,6 @@ export interface PlatformBuildStepFilter { /** Filter by the object’s `summary` field. */ summary?: JSONFilter; } -export interface PlatformBuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: PlatformNamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: PlatformBuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} export interface PlatformFunctionApiBindingFilter { /** Filter by the object’s `alias` field. */ alias?: StringFilter; @@ -9166,10 +9100,6 @@ export interface PlatformNamespaceFilter { not?: PlatformNamespaceFilter; /** Checks for any expressions in this list. */ or?: PlatformNamespaceFilter[]; - /** Filter by the object’s `platformBuilderBindingsByNamespaceId` relation. */ - platformBuilderBindingsByNamespaceId?: PlatformNamespaceToManyPlatformBuilderBindingFilter; - /** `platformBuilderBindingsByNamespaceId` exist. */ - platformBuilderBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformFunctionDeploymentsByNamespaceId` relation. */ platformFunctionDeploymentsByNamespaceId?: PlatformNamespaceToManyPlatformFunctionDeploymentFilter; /** `platformFunctionDeploymentsByNamespaceId` exist. */ @@ -9190,6 +9120,10 @@ export interface PlatformNamespaceFilter { platformResourcesByNamespaceId?: PlatformNamespaceToManyPlatformResourceFilter; /** `platformResourcesByNamespaceId` exist. */ platformResourcesByNamespaceIdExist?: boolean; + /** Filter by the object’s `platformServiceBindingsByNamespaceId` relation. */ + platformServiceBindingsByNamespaceId?: PlatformNamespaceToManyPlatformServiceBindingFilter; + /** `platformServiceBindingsByNamespaceId` exist. */ + platformServiceBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformWebhookEndpointsByNamespaceId` relation. */ platformWebhookEndpointsByNamespaceId?: PlatformNamespaceToManyPlatformWebhookEndpointFilter; /** `platformWebhookEndpointsByNamespaceId` exist. */ @@ -10447,6 +10381,48 @@ export interface PlatformResourcesResolvedRequirementFilter { /** Filter by the object’s `slug` field. */ slug?: StringFilter; } +export interface PlatformServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} export interface PlatformWebhookEndpointFilter { /** Filter by the object’s `active` field. */ active?: BooleanFilter; @@ -11795,6 +11771,50 @@ export interface ResourcesResolvedRequirementFilter { /** Filter by the object’s `slug` field. */ slug?: StringFilter; } +export interface ServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: ServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: NamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: ServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: ServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} export interface WebhookEndpointFilter { /** Filter by the object’s `active` field. */ active?: BooleanFilter; @@ -11966,40 +11986,6 @@ export type BuildStepOrderBy = | 'STATUS_DESC' | 'SUMMARY_ASC' | 'SUMMARY_DESC'; -export type BuilderBindingOrderBy = - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_BY_PRINCIPAL_ASC' - | 'CREATED_BY_PRINCIPAL_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'INSTALLATION_ID_ASC' - | 'INSTALLATION_ID_DESC' - | 'LAST_ERROR_ASC' - | 'LAST_ERROR_DESC' - | 'METADATA_ASC' - | 'METADATA_DESC' - | 'NAMESPACE_ID_ASC' - | 'NAMESPACE_ID_DESC' - | 'NATURAL' - | 'OBSERVED_HOST_ASC' - | 'OBSERVED_HOST_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'REALM_ASC' - | 'REALM_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'UPDATED_BY_ASC' - | 'UPDATED_BY_DESC' - | 'UPDATED_BY_PRINCIPAL_ASC' - | 'UPDATED_BY_PRINCIPAL_DESC'; export type ContentPresetOrderBy = | 'ACTIVE_ASC' | 'ACTIVE_DESC' @@ -13198,38 +13184,6 @@ export type PlatformBuildStepOrderBy = | 'STATUS_DESC' | 'SUMMARY_ASC' | 'SUMMARY_DESC'; -export type PlatformBuilderBindingOrderBy = - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_BY_PRINCIPAL_ASC' - | 'CREATED_BY_PRINCIPAL_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'INSTALLATION_ID_ASC' - | 'INSTALLATION_ID_DESC' - | 'LAST_ERROR_ASC' - | 'LAST_ERROR_DESC' - | 'METADATA_ASC' - | 'METADATA_DESC' - | 'NAMESPACE_ID_ASC' - | 'NAMESPACE_ID_DESC' - | 'NATURAL' - | 'OBSERVED_HOST_ASC' - | 'OBSERVED_HOST_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'REALM_ASC' - | 'REALM_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'UPDATED_BY_ASC' - | 'UPDATED_BY_DESC' - | 'UPDATED_BY_PRINCIPAL_ASC' - | 'UPDATED_BY_PRINCIPAL_DESC'; export type PlatformFunctionApiBindingOrderBy = | 'ALIAS_ASC' | 'ALIAS_DESC' @@ -14766,6 +14720,42 @@ export type PlatformResourcesResolvedRequirementOrderBy = | 'SECRETS_OBJECT_NAME_DESC' | 'SLUG_ASC' | 'SLUG_DESC'; +export type PlatformServiceBindingOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'INSTALLATION_ID_ASC' + | 'INSTALLATION_ID_DESC' + | 'INSTALLATION_SCOPE_ASC' + | 'INSTALLATION_SCOPE_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'NATURAL' + | 'OBSERVED_HOST_ASC' + | 'OBSERVED_HOST_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; export type PlatformWebhookEndpointOrderBy = | 'ACTIVE_ASC' | 'ACTIVE_DESC' @@ -15824,6 +15814,44 @@ export type ResourcesResolvedRequirementOrderBy = | 'SECRETS_OBJECT_NAME_DESC' | 'SLUG_ASC' | 'SLUG_DESC'; +export type ServiceBindingOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'INSTALLATION_ID_ASC' + | 'INSTALLATION_ID_DESC' + | 'INSTALLATION_SCOPE_ASC' + | 'INSTALLATION_SCOPE_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'NATURAL' + | 'OBSERVED_HOST_ASC' + | 'OBSERVED_HOST_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; export type WebhookEndpointOrderBy = | 'ACTIVE_ASC' | 'ACTIVE_DESC' @@ -15992,46 +16020,6 @@ export interface DeleteBuildStepInput { clientMutationId?: string; id: string; } -export interface CreateBuilderBindingInput { - clientMutationId?: string; - builderBinding: { - createdBy?: string; - createdByPrincipal?: string; - databaseId: string; - installationId: string; - lastError?: string; - metadata?: Record; - namespaceId: string; - observedHost?: string; - realm?: string; - status?: string; - updatedBy?: string; - updatedByPrincipal?: string; - }; -} -export interface BuilderBindingPatch { - createdBy?: string | null; - createdByPrincipal?: string | null; - databaseId?: string | null; - installationId?: string | null; - lastError?: string | null; - metadata?: Record | null; - namespaceId?: string | null; - observedHost?: string | null; - realm?: string | null; - status?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} -export interface UpdateBuilderBindingInput { - clientMutationId?: string; - id: string; - builderBindingPatch: BuilderBindingPatch; -} -export interface DeleteBuilderBindingInput { - clientMutationId?: string; - id: string; -} export interface CreateContentPresetInput { clientMutationId?: string; contentPreset: { @@ -17568,44 +17556,6 @@ export interface DeletePlatformBuildStepInput { clientMutationId?: string; id: string; } -export interface CreatePlatformBuilderBindingInput { - clientMutationId?: string; - platformBuilderBinding: { - createdBy?: string; - createdByPrincipal?: string; - installationId: string; - lastError?: string; - metadata?: Record; - namespaceId: string; - observedHost?: string; - realm?: string; - status?: string; - updatedBy?: string; - updatedByPrincipal?: string; - }; -} -export interface PlatformBuilderBindingPatch { - createdBy?: string | null; - createdByPrincipal?: string | null; - installationId?: string | null; - lastError?: string | null; - metadata?: Record | null; - namespaceId?: string | null; - observedHost?: string | null; - realm?: string | null; - status?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} -export interface UpdatePlatformBuilderBindingInput { - clientMutationId?: string; - id: string; - platformBuilderBindingPatch: PlatformBuilderBindingPatch; -} -export interface DeletePlatformBuilderBindingInput { - clientMutationId?: string; - id: string; -} export interface CreatePlatformFunctionApiBindingInput { clientMutationId?: string; platformFunctionApiBinding: { @@ -19398,6 +19348,48 @@ export interface DeletePlatformResourcesResolvedRequirementInput { clientMutationId?: string; id: string; } +export interface CreatePlatformServiceBindingInput { + clientMutationId?: string; + platformServiceBinding: { + createdBy?: string; + createdByPrincipal?: string; + installationId: string; + installationScope: string; + kind: string; + lastError?: string; + metadata?: Record; + namespaceId: string; + observedHost?: string; + realm?: string; + status?: string; + updatedBy?: string; + updatedByPrincipal?: string; + }; +} +export interface PlatformServiceBindingPatch { + createdBy?: string | null; + createdByPrincipal?: string | null; + installationId?: string | null; + installationScope?: string | null; + kind?: string | null; + lastError?: string | null; + metadata?: Record | null; + namespaceId?: string | null; + observedHost?: string | null; + realm?: string | null; + status?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} +export interface UpdatePlatformServiceBindingInput { + clientMutationId?: string; + id: string; + platformServiceBindingPatch: PlatformServiceBindingPatch; +} +export interface DeletePlatformServiceBindingInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformWebhookEndpointInput { clientMutationId?: string; platformWebhookEndpoint: { @@ -20579,6 +20571,50 @@ export interface DeleteResourcesResolvedRequirementInput { clientMutationId?: string; id: string; } +export interface CreateServiceBindingInput { + clientMutationId?: string; + serviceBinding: { + createdBy?: string; + createdByPrincipal?: string; + databaseId: string; + installationId: string; + installationScope: string; + kind: string; + lastError?: string; + metadata?: Record; + namespaceId: string; + observedHost?: string; + realm?: string; + status?: string; + updatedBy?: string; + updatedByPrincipal?: string; + }; +} +export interface ServiceBindingPatch { + createdBy?: string | null; + createdByPrincipal?: string | null; + databaseId?: string | null; + installationId?: string | null; + installationScope?: string | null; + kind?: string | null; + lastError?: string | null; + metadata?: Record | null; + namespaceId?: string | null; + observedHost?: string | null; + realm?: string | null; + status?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} +export interface UpdateServiceBindingInput { + clientMutationId?: string; + id: string; + serviceBindingPatch: ServiceBindingPatch; +} +export interface DeleteServiceBindingInput { + clientMutationId?: string; + id: string; +} export interface CreateWebhookEndpointInput { clientMutationId?: string; webhookEndpoint: { @@ -20682,12 +20718,12 @@ export const connectionFieldsMap = { imageGrants: 'ImageGrant', }, Namespace: { - builderBindings: 'BuilderBinding', functionDeployments: 'FunctionDeployment', registryBindings: 'RegistryBinding', resourceDefinitions: 'ResourceDefinition', resourceInstallations: 'ResourceInstallation', resources: 'Resource', + serviceBindings: 'ServiceBinding', webhookEndpoints: 'WebhookEndpoint', }, PlatformFunctionApiBinding: { @@ -20703,12 +20739,12 @@ export const connectionFieldsMap = { platformImageGrantsByImageId: 'PlatformImageGrant', }, PlatformNamespace: { - platformBuilderBindingsByNamespaceId: 'PlatformBuilderBinding', platformFunctionDeploymentsByNamespaceId: 'PlatformFunctionDeployment', platformRegistryBindingsByNamespaceId: 'PlatformRegistryBinding', platformResourceDefinitionsByNamespaceId: 'PlatformResourceDefinition', platformResourceInstallationsByNamespaceId: 'PlatformResourceInstallation', platformResourcesByNamespaceId: 'PlatformResource', + platformServiceBindingsByNamespaceId: 'PlatformServiceBinding', platformWebhookEndpointsByNamespaceId: 'PlatformWebhookEndpoint', }, PlatformProposalComment: { @@ -21488,15 +21524,6 @@ export interface ConstructiveInternalTypeImageFilter { /** Not included in the specified list. */ notIn?: ConstructiveInternalTypeImage[]; } -/** A filter to be used against many `BuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface NamespaceToManyBuilderBindingFilter { - /** Filters to entities where every related entity matches. */ - every?: BuilderBindingFilter; - /** Filters to entities where no related entity matches. */ - none?: BuilderBindingFilter; - /** Filters to entities where at least one related entity matches. */ - some?: BuilderBindingFilter; -} /** A filter to be used against many `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface NamespaceToManyFunctionDeploymentFilter { /** Filters to entities where every related entity matches. */ @@ -21542,6 +21569,15 @@ export interface NamespaceToManyResourceFilter { /** Filters to entities where at least one related entity matches. */ some?: ResourceFilter; } +/** A filter to be used against many `ServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface NamespaceToManyServiceBindingFilter { + /** Filters to entities where every related entity matches. */ + every?: ServiceBindingFilter; + /** Filters to entities where no related entity matches. */ + none?: ServiceBindingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: ServiceBindingFilter; +} /** A filter to be used against many `WebhookEndpoint` object types. All fields are combined with a logical ‘and.’ */ export interface NamespaceToManyWebhookEndpointFilter { /** Filters to entities where every related entity matches. */ @@ -21605,15 +21641,6 @@ export interface PlatformImageToManyPlatformImageGrantFilter { /** Filters to entities where at least one related entity matches. */ some?: PlatformImageGrantFilter; } -/** A filter to be used against many `PlatformBuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformNamespaceToManyPlatformBuilderBindingFilter { - /** Filters to entities where every related entity matches. */ - every?: PlatformBuilderBindingFilter; - /** Filters to entities where no related entity matches. */ - none?: PlatformBuilderBindingFilter; - /** Filters to entities where at least one related entity matches. */ - some?: PlatformBuilderBindingFilter; -} /** A filter to be used against many `PlatformFunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformNamespaceToManyPlatformFunctionDeploymentFilter { /** Filters to entities where every related entity matches. */ @@ -21659,6 +21686,15 @@ export interface PlatformNamespaceToManyPlatformResourceFilter { /** Filters to entities where at least one related entity matches. */ some?: PlatformResourceFilter; } +/** A filter to be used against many `PlatformServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyPlatformServiceBindingFilter { + /** Filters to entities where every related entity matches. */ + every?: PlatformServiceBindingFilter; + /** Filters to entities where no related entity matches. */ + none?: PlatformServiceBindingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlatformServiceBindingFilter; +} /** A filter to be used against many `PlatformWebhookEndpoint` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformNamespaceToManyPlatformWebhookEndpointFilter { /** Filters to entities where every related entity matches. */ @@ -22322,32 +22358,6 @@ export interface BuildStepInput { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record; } -/** An input for mutations affecting `BuilderBinding` */ -export interface BuilderBindingInput { - createdAt?: string; - createdBy?: string; - createdByPrincipal?: string; - /** Database that owns this resource (database-scoped isolation) */ - databaseId: string; - id?: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId: string; - /** Most recent projection failure */ - lastError?: string; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record; - /** Namespace whose builds use this BuildKit installation */ - namespaceId: string; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string; - updatedAt?: string; - updatedBy?: string; - updatedByPrincipal?: string; -} /** An input for mutations affecting `ContentPreset` */ export interface ContentPresetInput { /** Whether this preset is selectable at provision time */ @@ -23384,30 +23394,6 @@ export interface PlatformBuildStepInput { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record; } -/** An input for mutations affecting `PlatformBuilderBinding` */ -export interface PlatformBuilderBindingInput { - createdAt?: string; - createdBy?: string; - createdByPrincipal?: string; - id?: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId: string; - /** Most recent projection failure */ - lastError?: string; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record; - /** Namespace whose builds use this BuildKit installation */ - namespaceId: string; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string; - updatedAt?: string; - updatedBy?: string; - updatedByPrincipal?: string; -} /** An input for mutations affecting `PlatformFunctionApiBinding` */ export interface PlatformFunctionApiBindingInput { /** Binding alias (e.g. default, staging, production) */ @@ -24460,6 +24446,34 @@ export interface PlatformResourceUsageSummaryInput { /** Number of raw samples aggregated into this summary */ sampleCount?: number; } +/** An input for mutations affecting `PlatformServiceBinding` */ +export interface PlatformServiceBindingInput { + createdAt?: string; + createdBy?: string; + createdByPrincipal?: string; + id?: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId: string; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope: string; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind: string; + /** Most recent projection failure */ + lastError?: string; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record; + /** Namespace whose builds use this BuildKit installation */ + namespaceId: string; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string; + /** Projection state of the bound address: pending, active, failed */ + status?: string; + updatedAt?: string; + updatedBy?: string; + updatedByPrincipal?: string; +} /** An input for mutations affecting `PlatformWebhookEndpoint` */ export interface PlatformWebhookEndpointInput { /** Whether this endpoint currently accepts deliveries */ @@ -25056,6 +25070,36 @@ export interface ResourceUsageSummaryInput { /** Number of raw samples aggregated into this summary */ sampleCount?: number; } +/** An input for mutations affecting `ServiceBinding` */ +export interface ServiceBindingInput { + createdAt?: string; + createdBy?: string; + createdByPrincipal?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + id?: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId: string; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope: string; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind: string; + /** Most recent projection failure */ + lastError?: string; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record; + /** Namespace whose builds use this BuildKit installation */ + namespaceId: string; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string; + /** Projection state of the bound address: pending, active, failed */ + status?: string; + updatedAt?: string; + updatedBy?: string; + updatedByPrincipal?: string; +} /** An input for mutations affecting `WebhookEndpoint` */ export interface WebhookEndpointInput { /** Whether this endpoint currently accepts deliveries */ @@ -25874,47 +25918,6 @@ export interface ImageGrantFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } -/** A filter to be used against `BuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface BuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: BuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: NamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: BuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: BuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} /** A filter to be used against `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionDeploymentFilter { /** Checks for all expressions in this list. */ @@ -26214,6 +26217,51 @@ export interface ResourceFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } +/** A filter to be used against `ServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface ServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: ServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: NamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: ServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: ServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} /** A filter to be used against `PlatformFunctionInvocation` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformFunctionInvocationFilter { /** Filter by the object’s `actorId` field. */ @@ -26456,45 +26504,6 @@ export interface PlatformImageGrantFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } -/** A filter to be used against `PlatformBuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformBuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: PlatformNamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: PlatformBuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} /** A filter to be used against `PlatformFunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformFunctionDeploymentFilter { /** Checks for all expressions in this list. */ @@ -26784,6 +26793,49 @@ export interface PlatformResourceFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } +/** A filter to be used against `PlatformServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} /** A filter to be used against `PlatformProposalReaction` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformProposalReactionFilter { /** Filter by the object’s `actorId` field. */ @@ -28502,10 +28554,6 @@ export interface NamespaceFilter { and?: NamespaceFilter[]; /** Filter by the object’s `annotations` field. */ annotations?: JSONFilter; - /** Filter by the object’s `builderBindings` relation. */ - builderBindings?: NamespaceToManyBuilderBindingFilter; - /** `builderBindings` exist. */ - builderBindingsExist?: boolean; /** Filter by the object’s `clusterId` field. */ clusterId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -28552,6 +28600,10 @@ export interface NamespaceFilter { resources?: NamespaceToManyResourceFilter; /** `resources` exist. */ resourcesExist?: boolean; + /** Filter by the object’s `serviceBindings` relation. */ + serviceBindings?: NamespaceToManyServiceBindingFilter; + /** `serviceBindings` exist. */ + serviceBindingsExist?: boolean; /** Filter by the object’s `status` field. */ status?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -28786,10 +28838,6 @@ export interface PlatformNamespaceFilter { not?: PlatformNamespaceFilter; /** Checks for any expressions in this list. */ or?: PlatformNamespaceFilter[]; - /** Filter by the object’s `platformBuilderBindingsByNamespaceId` relation. */ - platformBuilderBindingsByNamespaceId?: PlatformNamespaceToManyPlatformBuilderBindingFilter; - /** `platformBuilderBindingsByNamespaceId` exist. */ - platformBuilderBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformFunctionDeploymentsByNamespaceId` relation. */ platformFunctionDeploymentsByNamespaceId?: PlatformNamespaceToManyPlatformFunctionDeploymentFilter; /** `platformFunctionDeploymentsByNamespaceId` exist. */ @@ -28810,6 +28858,10 @@ export interface PlatformNamespaceFilter { platformResourcesByNamespaceId?: PlatformNamespaceToManyPlatformResourceFilter; /** `platformResourcesByNamespaceId` exist. */ platformResourcesByNamespaceIdExist?: boolean; + /** Filter by the object’s `platformServiceBindingsByNamespaceId` relation. */ + platformServiceBindingsByNamespaceId?: PlatformNamespaceToManyPlatformServiceBindingFilter; + /** `platformServiceBindingsByNamespaceId` exist. */ + platformServiceBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformWebhookEndpointsByNamespaceId` relation. */ platformWebhookEndpointsByNamespaceId?: PlatformNamespaceToManyPlatformWebhookEndpointFilter; /** `platformWebhookEndpointsByNamespaceId` exist. */ @@ -29563,51 +29615,6 @@ export type DeleteBuildStepPayloadSelect = { }; clientMutationId?: boolean; }; -export interface CreateBuilderBindingPayload { - /** The `BuilderBinding` that was created by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} -export type CreateBuilderBindingPayloadSelect = { - builderBinding?: { - select: BuilderBindingSelect; - }; - builderBindingEdge?: { - select: BuilderBindingEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface UpdateBuilderBindingPayload { - /** The `BuilderBinding` that was updated by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} -export type UpdateBuilderBindingPayloadSelect = { - builderBinding?: { - select: BuilderBindingSelect; - }; - builderBindingEdge?: { - select: BuilderBindingEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface DeleteBuilderBindingPayload { - /** The `BuilderBinding` that was deleted by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} -export type DeleteBuilderBindingPayloadSelect = { - builderBinding?: { - select: BuilderBindingSelect; - }; - builderBindingEdge?: { - select: BuilderBindingEdgeSelect; - }; - clientMutationId?: boolean; -}; export interface CreateContentPresetPayload { clientMutationId?: string | null; /** The `ContentPreset` that was created by this mutation. */ @@ -31386,51 +31393,6 @@ export type DeletePlatformBuildStepPayloadSelect = { select: PlatformBuildStepEdgeSelect; }; }; -export interface CreatePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was created by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} -export type CreatePlatformBuilderBindingPayloadSelect = { - clientMutationId?: boolean; - platformBuilderBinding?: { - select: PlatformBuilderBindingSelect; - }; - platformBuilderBindingEdge?: { - select: PlatformBuilderBindingEdgeSelect; - }; -}; -export interface UpdatePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was updated by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} -export type UpdatePlatformBuilderBindingPayloadSelect = { - clientMutationId?: boolean; - platformBuilderBinding?: { - select: PlatformBuilderBindingSelect; - }; - platformBuilderBindingEdge?: { - select: PlatformBuilderBindingEdgeSelect; - }; -}; -export interface DeletePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was deleted by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} -export type DeletePlatformBuilderBindingPayloadSelect = { - clientMutationId?: boolean; - platformBuilderBinding?: { - select: PlatformBuilderBindingSelect; - }; - platformBuilderBindingEdge?: { - select: PlatformBuilderBindingEdgeSelect; - }; -}; export interface CreatePlatformFunctionApiBindingPayload { clientMutationId?: string | null; /** The `PlatformFunctionApiBinding` that was created by this mutation. */ @@ -33186,6 +33148,51 @@ export type DeletePlatformResourceUsageSummaryPayloadSelect = { select: PlatformResourceUsageSummaryEdgeSelect; }; }; +export interface CreatePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was created by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} +export type CreatePlatformServiceBindingPayloadSelect = { + clientMutationId?: boolean; + platformServiceBinding?: { + select: PlatformServiceBindingSelect; + }; + platformServiceBindingEdge?: { + select: PlatformServiceBindingEdgeSelect; + }; +}; +export interface UpdatePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was updated by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} +export type UpdatePlatformServiceBindingPayloadSelect = { + clientMutationId?: boolean; + platformServiceBinding?: { + select: PlatformServiceBindingSelect; + }; + platformServiceBindingEdge?: { + select: PlatformServiceBindingEdgeSelect; + }; +}; +export interface DeletePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was deleted by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} +export type DeletePlatformServiceBindingPayloadSelect = { + clientMutationId?: boolean; + platformServiceBinding?: { + select: PlatformServiceBindingSelect; + }; + platformServiceBindingEdge?: { + select: PlatformServiceBindingEdgeSelect; + }; +}; export interface CreatePlatformWebhookEndpointPayload { clientMutationId?: string | null; /** The `PlatformWebhookEndpoint` that was created by this mutation. */ @@ -34176,6 +34183,51 @@ export type DeleteResourceUsageSummaryPayloadSelect = { select: ResourceUsageSummaryEdgeSelect; }; }; +export interface CreateServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was created by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} +export type CreateServiceBindingPayloadSelect = { + clientMutationId?: boolean; + serviceBinding?: { + select: ServiceBindingSelect; + }; + serviceBindingEdge?: { + select: ServiceBindingEdgeSelect; + }; +}; +export interface UpdateServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was updated by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} +export type UpdateServiceBindingPayloadSelect = { + clientMutationId?: boolean; + serviceBinding?: { + select: ServiceBindingSelect; + }; + serviceBindingEdge?: { + select: ServiceBindingEdgeSelect; + }; +}; +export interface DeleteServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was deleted by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} +export type DeleteServiceBindingPayloadSelect = { + clientMutationId?: boolean; + serviceBinding?: { + select: ServiceBindingSelect; + }; + serviceBindingEdge?: { + select: ServiceBindingEdgeSelect; + }; +}; export interface CreateWebhookEndpointPayload { clientMutationId?: string | null; /** The `WebhookEndpoint` that was created by this mutation. */ @@ -34362,18 +34414,6 @@ export type BuildStepEdgeSelect = { select: BuildStepSelect; }; }; -/** A `BuilderBinding` edge in the connection. */ -export interface BuilderBindingEdge { - cursor?: string | null; - /** The `BuilderBinding` at the end of the edge. */ - node?: BuilderBinding | null; -} -export type BuilderBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: BuilderBindingSelect; - }; -}; /** A `ContentPreset` edge in the connection. */ export interface ContentPresetEdge { cursor?: string | null; @@ -34806,18 +34846,6 @@ export type PlatformBuildStepEdgeSelect = { select: PlatformBuildStepSelect; }; }; -/** A `PlatformBuilderBinding` edge in the connection. */ -export interface PlatformBuilderBindingEdge { - cursor?: string | null; - /** The `PlatformBuilderBinding` at the end of the edge. */ - node?: PlatformBuilderBinding | null; -} -export type PlatformBuilderBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformBuilderBindingSelect; - }; -}; /** A `PlatformFunctionApiBinding` edge in the connection. */ export interface PlatformFunctionApiBindingEdge { cursor?: string | null; @@ -35262,6 +35290,18 @@ export type PlatformResourceUsageSummaryEdgeSelect = { select: PlatformResourceUsageSummarySelect; }; }; +/** A `PlatformServiceBinding` edge in the connection. */ +export interface PlatformServiceBindingEdge { + cursor?: string | null; + /** The `PlatformServiceBinding` at the end of the edge. */ + node?: PlatformServiceBinding | null; +} +export type PlatformServiceBindingEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformServiceBindingSelect; + }; +}; /** A `PlatformWebhookEndpoint` edge in the connection. */ export interface PlatformWebhookEndpointEdge { cursor?: string | null; @@ -35526,6 +35566,18 @@ export type ResourceUsageSummaryEdgeSelect = { select: ResourceUsageSummarySelect; }; }; +/** A `ServiceBinding` edge in the connection. */ +export interface ServiceBindingEdge { + cursor?: string | null; + /** The `ServiceBinding` at the end of the edge. */ + node?: ServiceBinding | null; +} +export type ServiceBindingEdgeSelect = { + cursor?: boolean; + node?: { + select: ServiceBindingSelect; + }; +}; /** A `WebhookEndpoint` edge in the connection. */ export interface WebhookEndpointEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/compute/orm/models/index.ts b/sdk/constructive-react/src/compute/orm/models/index.ts index 3b2af275ae..dfb31b3c70 100644 --- a/sdk/constructive-react/src/compute/orm/models/index.ts +++ b/sdk/constructive-react/src/compute/orm/models/index.ts @@ -5,7 +5,6 @@ */ export { BuildModel } from './build'; export { BuildStepModel } from './buildStep'; -export { BuilderBindingModel } from './builderBinding'; export { ContentPresetModel } from './contentPreset'; export { DatabaseFunctionGraphModel } from './databaseFunctionGraph'; export { DatabaseFunctionGraphExecutionCancelRequestModel } from './databaseFunctionGraphExecutionCancelRequest'; @@ -49,7 +48,6 @@ export { NamespaceModel } from './namespace'; export { NamespaceEventModel } from './namespaceEvent'; export { PlatformBuildModel } from './platformBuild'; export { PlatformBuildStepModel } from './platformBuildStep'; -export { PlatformBuilderBindingModel } from './platformBuilderBinding'; export { PlatformFunctionApiBindingModel } from './platformFunctionApiBinding'; export { PlatformFunctionCapabilityBindingModel } from './platformFunctionCapabilityBinding'; export { PlatformFunctionDefinitionModel } from './platformFunctionDefinition'; @@ -96,6 +94,7 @@ export { PlatformResourceUtilizationModel } from './platformResourceUtilization' export { PlatformResourcesHealthModel } from './platformResourcesHealth'; export { PlatformResourcesRequirementsStateModel } from './platformResourcesRequirementsState'; export { PlatformResourcesResolvedRequirementModel } from './platformResourcesResolvedRequirement'; +export { PlatformServiceBindingModel } from './platformServiceBinding'; export { PlatformWebhookEndpointModel } from './platformWebhookEndpoint'; export { PlatformWebhookEventModel } from './platformWebhookEvent'; export { ProposalCommentModel } from './proposalComment'; @@ -124,5 +123,6 @@ export { ResourceUtilizationModel } from './resourceUtilization'; export { ResourcesHealthModel } from './resourcesHealth'; export { ResourcesRequirementsStateModel } from './resourcesRequirementsState'; export { ResourcesResolvedRequirementModel } from './resourcesResolvedRequirement'; +export { ServiceBindingModel } from './serviceBinding'; export { WebhookEndpointModel } from './webhookEndpoint'; export { WebhookEventModel } from './webhookEvent'; diff --git a/sdk/constructive-react/src/compute/orm/models/platformBuilderBinding.ts b/sdk/constructive-react/src/compute/orm/models/platformBuilderBinding.ts deleted file mode 100644 index 09a8daa1ed..0000000000 --- a/sdk/constructive-react/src/compute/orm/models/platformBuilderBinding.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * PlatformBuilderBinding 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 { - PlatformBuilderBinding, - PlatformBuilderBindingWithRelations, - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy, - CreatePlatformBuilderBindingInput, - UpdatePlatformBuilderBindingInput, - PlatformBuilderBindingPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class PlatformBuilderBindingModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - platformBuilderBindings: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'PlatformBuilderBinding', - 'platformBuilderBindings', - 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, - }, - 'PlatformBuilderBindingFilter', - 'PlatformBuilderBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'PlatformBuilderBinding', - fieldName: 'platformBuilderBindings', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - platformBuilderBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'PlatformBuilderBinding', - 'platformBuilderBindings', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'PlatformBuilderBindingFilter', - 'PlatformBuilderBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'PlatformBuilderBinding', - fieldName: 'platformBuilderBinding', - document, - variables, - transform: (data: { - platformBuilderBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - platformBuilderBinding: data.platformBuilderBindings?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - platformBuilderBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'PlatformBuilderBinding', - 'platformBuilderBindings', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'PlatformBuilderBindingFilter', - 'PlatformBuilderBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'PlatformBuilderBinding', - fieldName: 'platformBuilderBinding', - document, - variables, - transform: (data: { - platformBuilderBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - platformBuilderBinding: data.platformBuilderBindings?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createPlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'PlatformBuilderBinding', - 'createPlatformBuilderBinding', - 'platformBuilderBinding', - args.select, - args.data, - 'CreatePlatformBuilderBindingInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'PlatformBuilderBinding', - fieldName: 'createPlatformBuilderBinding', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - PlatformBuilderBindingPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updatePlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'PlatformBuilderBinding', - 'updatePlatformBuilderBinding', - 'platformBuilderBinding', - args.select, - args.where.id, - args.data, - 'UpdatePlatformBuilderBindingInput', - 'id', - 'platformBuilderBindingPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'PlatformBuilderBinding', - fieldName: 'updatePlatformBuilderBinding', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deletePlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'PlatformBuilderBinding', - 'deletePlatformBuilderBinding', - 'platformBuilderBinding', - { - id: args.where.id, - }, - 'DeletePlatformBuilderBindingInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'PlatformBuilderBinding', - fieldName: 'deletePlatformBuilderBinding', - document, - variables, - }); - } -} diff --git a/sdk/constructive-react/src/compute/orm/models/platformServiceBinding.ts b/sdk/constructive-react/src/compute/orm/models/platformServiceBinding.ts new file mode 100644 index 0000000000..e50381b94d --- /dev/null +++ b/sdk/constructive-react/src/compute/orm/models/platformServiceBinding.ts @@ -0,0 +1,247 @@ +/** + * PlatformServiceBinding 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 { + PlatformServiceBinding, + PlatformServiceBindingWithRelations, + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy, + CreatePlatformServiceBindingInput, + UpdatePlatformServiceBindingInput, + PlatformServiceBindingPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformServiceBindingModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformServiceBindings: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformServiceBinding', + 'platformServiceBindings', + 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, + }, + 'PlatformServiceBindingFilter', + 'PlatformServiceBindingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformServiceBinding', + fieldName: 'platformServiceBindings', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformServiceBinding: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformServiceBinding', + 'platformServiceBindings', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformServiceBindingFilter', + 'PlatformServiceBindingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformServiceBinding', + fieldName: 'platformServiceBinding', + document, + variables, + transform: (data: { + platformServiceBindings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformServiceBinding: data.platformServiceBindings?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformServiceBinding: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformServiceBinding', + 'platformServiceBindings', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformServiceBindingFilter', + 'PlatformServiceBindingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformServiceBinding', + fieldName: 'platformServiceBinding', + document, + variables, + transform: (data: { + platformServiceBindings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformServiceBinding: data.platformServiceBindings?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformServiceBinding', + 'createPlatformServiceBinding', + 'platformServiceBinding', + args.select, + args.data, + 'CreatePlatformServiceBindingInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformServiceBinding', + fieldName: 'createPlatformServiceBinding', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformServiceBindingPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformServiceBinding', + 'updatePlatformServiceBinding', + 'platformServiceBinding', + args.select, + args.where.id, + args.data, + 'UpdatePlatformServiceBindingInput', + 'id', + 'platformServiceBindingPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformServiceBinding', + fieldName: 'updatePlatformServiceBinding', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformServiceBinding', + 'deletePlatformServiceBinding', + 'platformServiceBinding', + { + id: args.where.id, + }, + 'DeletePlatformServiceBindingInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformServiceBinding', + fieldName: 'deletePlatformServiceBinding', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/compute/orm/models/builderBinding.ts b/sdk/constructive-react/src/compute/orm/models/serviceBinding.ts similarity index 53% rename from sdk/constructive-sdk/src/compute/orm/models/builderBinding.ts rename to sdk/constructive-react/src/compute/orm/models/serviceBinding.ts index 0d5d7843e3..be7061a21b 100644 --- a/sdk/constructive-sdk/src/compute/orm/models/builderBinding.ts +++ b/sdk/constructive-react/src/compute/orm/models/serviceBinding.ts @@ -1,5 +1,5 @@ /** - * BuilderBinding model for ORM client + * ServiceBinding 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 { - BuilderBinding, - BuilderBindingWithRelations, - BuilderBindingSelect, - BuilderBindingFilter, - BuilderBindingOrderBy, - CreateBuilderBindingInput, - UpdateBuilderBindingInput, - BuilderBindingPatch, + ServiceBinding, + ServiceBindingWithRelations, + ServiceBindingSelect, + ServiceBindingFilter, + ServiceBindingOrderBy, + CreateServiceBindingInput, + UpdateServiceBindingInput, + ServiceBindingPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class BuilderBindingModel { +export class ServiceBindingModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - builderBindings: ConnectionResult>; + serviceBindings: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'BuilderBinding', - 'builderBindings', + 'ServiceBinding', + 'serviceBindings', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class BuilderBindingModel { before: args?.before, offset: args?.offset, }, - 'BuilderBindingFilter', - 'BuilderBindingOrderBy', + 'ServiceBindingFilter', + 'ServiceBindingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'BuilderBinding', - fieldName: 'builderBindings', + operationName: 'ServiceBinding', + fieldName: 'serviceBindings', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - builderBinding: InferSelectResult | null; + serviceBinding: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'BuilderBinding', - 'builderBindings', + 'ServiceBinding', + 'serviceBindings', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'BuilderBindingFilter', - 'BuilderBindingOrderBy', + 'ServiceBindingFilter', + 'ServiceBindingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'BuilderBinding', - fieldName: 'builderBinding', + operationName: 'ServiceBinding', + fieldName: 'serviceBinding', document, variables, transform: (data: { - builderBindings?: { - nodes?: InferSelectResult[]; + serviceBindings?: { + nodes?: InferSelectResult[]; }; }) => ({ - builderBinding: data.builderBindings?.nodes?.[0] ?? null, + serviceBinding: data.serviceBindings?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - builderBinding: InferSelectResult | null; + serviceBinding: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'BuilderBinding', - 'builderBindings', + 'ServiceBinding', + 'serviceBindings', args.select, { where: { @@ -124,91 +124,91 @@ export class BuilderBindingModel { }, first: 1, }, - 'BuilderBindingFilter', - 'BuilderBindingOrderBy', + 'ServiceBindingFilter', + 'ServiceBindingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'BuilderBinding', - fieldName: 'builderBinding', + operationName: 'ServiceBinding', + fieldName: 'serviceBinding', document, variables, transform: (data: { - builderBindings?: { - nodes?: InferSelectResult[]; + serviceBindings?: { + nodes?: InferSelectResult[]; }; }) => ({ - builderBinding: data.builderBindings?.nodes?.[0] ?? null, + serviceBinding: data.serviceBindings?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createBuilderBinding: { - builderBinding: InferSelectResult; + createServiceBinding: { + serviceBinding: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'BuilderBinding', - 'createBuilderBinding', - 'builderBinding', + 'ServiceBinding', + 'createServiceBinding', + 'serviceBinding', args.select, args.data, - 'CreateBuilderBindingInput', + 'CreateServiceBindingInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'BuilderBinding', - fieldName: 'createBuilderBinding', + operationName: 'ServiceBinding', + fieldName: 'createServiceBinding', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - BuilderBindingPatch + ServiceBindingPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateBuilderBinding: { - builderBinding: InferSelectResult; + updateServiceBinding: { + serviceBinding: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'BuilderBinding', - 'updateBuilderBinding', - 'builderBinding', + 'ServiceBinding', + 'updateServiceBinding', + 'serviceBinding', args.select, args.where.id, args.data, - 'UpdateBuilderBindingInput', + 'UpdateServiceBindingInput', 'id', - 'builderBindingPatch', + 'serviceBindingPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'BuilderBinding', - fieldName: 'updateBuilderBinding', + operationName: 'ServiceBinding', + fieldName: 'updateServiceBinding', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class BuilderBindingModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteBuilderBinding: { - builderBinding: InferSelectResult; + deleteServiceBinding: { + serviceBinding: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'BuilderBinding', - 'deleteBuilderBinding', - 'builderBinding', + 'ServiceBinding', + 'deleteServiceBinding', + 'serviceBinding', { id: args.where.id, }, - 'DeleteBuilderBindingInput', + 'DeleteServiceBindingInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'BuilderBinding', - fieldName: 'deleteBuilderBinding', + operationName: 'ServiceBinding', + fieldName: 'deleteServiceBinding', document, variables, }); diff --git a/sdk/constructive-react/src/compute/schema-types.ts b/sdk/constructive-react/src/compute/schema-types.ts index 2e98363daf..b7a9e90b2f 100644 --- a/sdk/constructive-react/src/compute/schema-types.ts +++ b/sdk/constructive-react/src/compute/schema-types.ts @@ -7,7 +7,6 @@ import type { Build, BuildStep, - BuilderBinding, ContentPreset, DatabaseFunctionGraph, DatabaseFunctionGraphExecution, @@ -51,7 +50,6 @@ import type { NamespaceEvent, PlatformBuild, PlatformBuildStep, - PlatformBuilderBinding, PlatformFunctionApiBinding, PlatformFunctionCapabilityBinding, PlatformFunctionDefinition, @@ -98,6 +96,7 @@ import type { PlatformResourcesHealth, PlatformResourcesRequirementsState, PlatformResourcesResolvedRequirement, + PlatformServiceBinding, PlatformWebhookEndpoint, PlatformWebhookEvent, Proposal, @@ -126,6 +125,7 @@ import type { ResourcesHealth, ResourcesRequirementsState, ResourcesResolvedRequirement, + ServiceBinding, WebhookEndpoint, WebhookEvent, BigFloatFilter, @@ -237,41 +237,6 @@ export type BuildStepOrderBy = | 'STATUS_DESC' | 'SUMMARY_ASC' | 'SUMMARY_DESC'; -/** Methods to use when ordering `BuilderBinding`. */ -export type BuilderBindingOrderBy = - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_BY_PRINCIPAL_ASC' - | 'CREATED_BY_PRINCIPAL_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'INSTALLATION_ID_ASC' - | 'INSTALLATION_ID_DESC' - | 'LAST_ERROR_ASC' - | 'LAST_ERROR_DESC' - | 'METADATA_ASC' - | 'METADATA_DESC' - | 'NAMESPACE_ID_ASC' - | 'NAMESPACE_ID_DESC' - | 'NATURAL' - | 'OBSERVED_HOST_ASC' - | 'OBSERVED_HOST_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'REALM_ASC' - | 'REALM_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'UPDATED_BY_ASC' - | 'UPDATED_BY_DESC' - | 'UPDATED_BY_PRINCIPAL_ASC' - | 'UPDATED_BY_PRINCIPAL_DESC'; /** Methods to use when ordering `ContentPreset`. */ export type ContentPresetOrderBy = | 'ACTIVE_ASC' @@ -1486,39 +1451,6 @@ export type PlatformBuildStepOrderBy = | 'STATUS_DESC' | 'SUMMARY_ASC' | 'SUMMARY_DESC'; -/** Methods to use when ordering `PlatformBuilderBinding`. */ -export type PlatformBuilderBindingOrderBy = - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_BY_PRINCIPAL_ASC' - | 'CREATED_BY_PRINCIPAL_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'INSTALLATION_ID_ASC' - | 'INSTALLATION_ID_DESC' - | 'LAST_ERROR_ASC' - | 'LAST_ERROR_DESC' - | 'METADATA_ASC' - | 'METADATA_DESC' - | 'NAMESPACE_ID_ASC' - | 'NAMESPACE_ID_DESC' - | 'NATURAL' - | 'OBSERVED_HOST_ASC' - | 'OBSERVED_HOST_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'REALM_ASC' - | 'REALM_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'UPDATED_BY_ASC' - | 'UPDATED_BY_DESC' - | 'UPDATED_BY_PRINCIPAL_ASC' - | 'UPDATED_BY_PRINCIPAL_DESC'; /** Methods to use when ordering `PlatformFunctionApiBinding`. */ export type PlatformFunctionApiBindingOrderBy = | 'ALIAS_ASC' @@ -3092,6 +3024,43 @@ export type PlatformResourcesResolvedRequirementOrderBy = | 'SECRETS_OBJECT_NAME_DESC' | 'SLUG_ASC' | 'SLUG_DESC'; +/** Methods to use when ordering `PlatformServiceBinding`. */ +export type PlatformServiceBindingOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'INSTALLATION_ID_ASC' + | 'INSTALLATION_ID_DESC' + | 'INSTALLATION_SCOPE_ASC' + | 'INSTALLATION_SCOPE_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'NATURAL' + | 'OBSERVED_HOST_ASC' + | 'OBSERVED_HOST_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; /** Methods to use when ordering `PlatformWebhookEndpoint`. */ export type PlatformWebhookEndpointOrderBy = | 'ACTIVE_ASC' @@ -4178,6 +4147,45 @@ export type ResourcesResolvedRequirementOrderBy = | 'SECRETS_OBJECT_NAME_DESC' | 'SLUG_ASC' | 'SLUG_DESC'; +/** Methods to use when ordering `ServiceBinding`. */ +export type ServiceBindingOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'INSTALLATION_ID_ASC' + | 'INSTALLATION_ID_DESC' + | 'INSTALLATION_SCOPE_ASC' + | 'INSTALLATION_SCOPE_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'NATURAL' + | 'OBSERVED_HOST_ASC' + | 'OBSERVED_HOST_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; /** Similarity metric for vector search */ export type VectorMetric = 'COSINE' | 'IP' | 'L2'; /** Methods to use when ordering `WebhookEndpoint`. */ @@ -4578,99 +4586,6 @@ export interface BuildStepPatch { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: unknown; } -/** A filter to be used against `BuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface BuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: BuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: NamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: BuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: BuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} -/** An input for mutations affecting `BuilderBinding` */ -export interface BuilderBindingInput { - createdAt?: string; - createdBy?: string; - createdByPrincipal?: string; - /** Database that owns this resource (database-scoped isolation) */ - databaseId: string; - id?: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId: string; - /** Most recent projection failure */ - lastError?: string; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: unknown; - /** Namespace whose builds use this BuildKit installation */ - namespaceId: string; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string; - updatedAt?: string; - updatedBy?: string; - updatedByPrincipal?: string; -} -/** Represents an update to a `BuilderBinding`. Fields that are set will be updated. */ -export interface BuilderBindingPatch { - createdAt?: string; - createdBy?: string; - createdByPrincipal?: string; - /** Database that owns this resource (database-scoped isolation) */ - databaseId?: string; - id?: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId?: string; - /** Most recent projection failure */ - lastError?: string; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: unknown; - /** Namespace whose builds use this BuildKit installation */ - namespaceId?: string; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string; - updatedAt?: string; - updatedBy?: string; - updatedByPrincipal?: string; -} /** A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ */ export interface ConstructiveInternalTypeImageFilter { /** Contained by the specified JSON. */ @@ -4877,11 +4792,6 @@ export interface CreateBuildStepInput { buildStep: BuildStepInput; clientMutationId?: string; } -export interface CreateBuilderBindingInput { - /** The `BuilderBinding` to be created by this mutation. */ - builderBinding: BuilderBindingInput; - clientMutationId?: string; -} export interface CreateContentPresetInput { clientMutationId?: string; /** The `ContentPreset` to be created by this mutation. */ @@ -5081,11 +4991,6 @@ export interface CreatePlatformBuildStepInput { /** The `PlatformBuildStep` to be created by this mutation. */ platformBuildStep: PlatformBuildStepInput; } -export interface CreatePlatformBuilderBindingInput { - clientMutationId?: string; - /** The `PlatformBuilderBinding` to be created by this mutation. */ - platformBuilderBinding: PlatformBuilderBindingInput; -} export interface CreatePlatformFunctionApiBindingInput { clientMutationId?: string; /** The `PlatformFunctionApiBinding` to be created by this mutation. */ @@ -5281,6 +5186,11 @@ export interface CreatePlatformResourceUsageSummaryInput { /** The `PlatformResourceUsageSummary` to be created by this mutation. */ platformResourceUsageSummary: PlatformResourceUsageSummaryInput; } +export interface CreatePlatformServiceBindingInput { + clientMutationId?: string; + /** The `PlatformServiceBinding` to be created by this mutation. */ + platformServiceBinding: PlatformServiceBindingInput; +} export interface CreatePlatformWebhookEndpointInput { clientMutationId?: string; /** The `PlatformWebhookEndpoint` to be created by this mutation. */ @@ -5391,6 +5301,11 @@ export interface CreateResourceUsageSummaryInput { /** The `ResourceUsageSummary` to be created by this mutation. */ resourceUsageSummary: ResourceUsageSummaryInput; } +export interface CreateServiceBindingInput { + clientMutationId?: string; + /** The `ServiceBinding` to be created by this mutation. */ + serviceBinding: ServiceBindingInput; +} export interface CreateWebhookEndpointInput { clientMutationId?: string; /** The `WebhookEndpoint` to be created by this mutation. */ @@ -6387,10 +6302,6 @@ export interface DeleteBuildStepInput { /** When the result was recorded (partition key) */ recordedAt: string; } -export interface DeleteBuilderBindingInput { - clientMutationId?: string; - id: string; -} export interface DeleteContentPresetInput { clientMutationId?: string; /** Unique preset identifier */ @@ -6623,10 +6534,6 @@ export interface DeletePlatformBuildStepInput { /** When the result was recorded (partition key) */ recordedAt: string; } -export interface DeletePlatformBuilderBindingInput { - clientMutationId?: string; - id: string; -} export interface DeletePlatformFunctionApiBindingInput { clientMutationId?: string; id: string; @@ -6820,6 +6727,10 @@ export interface DeletePlatformResourceUsageSummaryInput { /** Unique usage summary identifier */ id: string; } +export interface DeletePlatformServiceBindingInput { + clientMutationId?: string; + id: string; +} export interface DeletePlatformWebhookEndpointInput { clientMutationId?: string; id: string; @@ -6918,6 +6829,10 @@ export interface DeleteResourceUsageSummaryInput { /** Unique usage summary identifier */ id: string; } +export interface DeleteServiceBindingInput { + clientMutationId?: string; + id: string; +} export interface DeleteWebhookEndpointInput { clientMutationId?: string; id: string; @@ -9512,10 +9427,6 @@ export interface NamespaceFilter { and?: NamespaceFilter[]; /** Filter by the object’s `annotations` field. */ annotations?: JSONFilter; - /** Filter by the object’s `builderBindings` relation. */ - builderBindings?: NamespaceToManyBuilderBindingFilter; - /** `builderBindings` exist. */ - builderBindingsExist?: boolean; /** Filter by the object’s `clusterId` field. */ clusterId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -9562,6 +9473,10 @@ export interface NamespaceFilter { resources?: NamespaceToManyResourceFilter; /** `resources` exist. */ resourcesExist?: boolean; + /** Filter by the object’s `serviceBindings` relation. */ + serviceBindings?: NamespaceToManyServiceBindingFilter; + /** `serviceBindings` exist. */ + serviceBindingsExist?: boolean; /** Filter by the object’s `status` field. */ status?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -9627,15 +9542,6 @@ export interface NamespacePatch { status?: string; updatedAt?: string; } -/** A filter to be used against many `BuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface NamespaceToManyBuilderBindingFilter { - /** Filters to entities where every related entity matches. */ - every?: BuilderBindingFilter; - /** Filters to entities where no related entity matches. */ - none?: BuilderBindingFilter; - /** Filters to entities where at least one related entity matches. */ - some?: BuilderBindingFilter; -} /** A filter to be used against many `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface NamespaceToManyFunctionDeploymentFilter { /** Filters to entities where every related entity matches. */ @@ -9681,6 +9587,15 @@ export interface NamespaceToManyResourceInstallationFilter { /** Filters to entities where at least one related entity matches. */ some?: ResourceInstallationFilter; } +/** A filter to be used against many `ServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface NamespaceToManyServiceBindingFilter { + /** Filters to entities where every related entity matches. */ + every?: ServiceBindingFilter; + /** Filters to entities where no related entity matches. */ + none?: ServiceBindingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: ServiceBindingFilter; +} /** A filter to be used against many `WebhookEndpoint` object types. All fields are combined with a logical ‘and.’ */ export interface NamespaceToManyWebhookEndpointFilter { /** Filters to entities where every related entity matches. */ @@ -9924,116 +9839,29 @@ export interface PlatformBuildStepPatch { /** Process exit code of a step (NULL for a test result) */ exitCode?: number; /** When this step or test finished */ - finishedAt?: string; - /** Unique identifier (uuidv7 provides temporal ordering) */ - id?: string; - /** What this row is: step, or test */ - kind?: string; - /** Byte length of this row's output in the build log object */ - logBytes?: string; - /** Byte offset of this row's output in the build log object */ - logOffset?: string; - /** Step name, or the test's fully qualified name */ - name?: string; - /** Sequence of the step that reported this test (NULL for a step itself) */ - parentSeq?: number; - /** When the result was recorded (partition key) */ - recordedAt?: string; - /** Position within the build, monotonically increasing across steps and their tests */ - seq?: number; - /** When this step or test began */ - startedAt?: string; - /** Outcome: running, succeeded, failed, skipped, cancelled */ - status?: string; - /** Parsed detail: failure message, assertion diff, counts, annotations */ - summary?: unknown; -} -/** A filter to be used against `PlatformBuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformBuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: PlatformNamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: PlatformBuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} -/** An input for mutations affecting `PlatformBuilderBinding` */ -export interface PlatformBuilderBindingInput { - createdAt?: string; - createdBy?: string; - createdByPrincipal?: string; - id?: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId: string; - /** Most recent projection failure */ - lastError?: string; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: unknown; - /** Namespace whose builds use this BuildKit installation */ - namespaceId: string; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string; - updatedAt?: string; - updatedBy?: string; - updatedByPrincipal?: string; -} -/** Represents an update to a `PlatformBuilderBinding`. Fields that are set will be updated. */ -export interface PlatformBuilderBindingPatch { - createdAt?: string; - createdBy?: string; - createdByPrincipal?: string; + finishedAt?: string; + /** Unique identifier (uuidv7 provides temporal ordering) */ id?: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId?: string; - /** Most recent projection failure */ - lastError?: string; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: unknown; - /** Namespace whose builds use this BuildKit installation */ - namespaceId?: string; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ + /** What this row is: step, or test */ + kind?: string; + /** Byte length of this row's output in the build log object */ + logBytes?: string; + /** Byte offset of this row's output in the build log object */ + logOffset?: string; + /** Step name, or the test's fully qualified name */ + name?: string; + /** Sequence of the step that reported this test (NULL for a step itself) */ + parentSeq?: number; + /** When the result was recorded (partition key) */ + recordedAt?: string; + /** Position within the build, monotonically increasing across steps and their tests */ + seq?: number; + /** When this step or test began */ + startedAt?: string; + /** Outcome: running, succeeded, failed, skipped, cancelled */ status?: string; - updatedAt?: string; - updatedBy?: string; - updatedByPrincipal?: string; + /** Parsed detail: failure message, assertion diff, counts, annotations */ + summary?: unknown; } /** A filter to be used against `PlatformFunctionApiBinding` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformFunctionApiBindingFilter { @@ -11841,10 +11669,6 @@ export interface PlatformNamespaceFilter { not?: PlatformNamespaceFilter; /** Checks for any expressions in this list. */ or?: PlatformNamespaceFilter[]; - /** Filter by the object’s `platformBuilderBindingsByNamespaceId` relation. */ - platformBuilderBindingsByNamespaceId?: PlatformNamespaceToManyPlatformBuilderBindingFilter; - /** `platformBuilderBindingsByNamespaceId` exist. */ - platformBuilderBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformFunctionDeploymentsByNamespaceId` relation. */ platformFunctionDeploymentsByNamespaceId?: PlatformNamespaceToManyPlatformFunctionDeploymentFilter; /** `platformFunctionDeploymentsByNamespaceId` exist. */ @@ -11865,6 +11689,10 @@ export interface PlatformNamespaceFilter { platformResourcesByNamespaceId?: PlatformNamespaceToManyPlatformResourceFilter; /** `platformResourcesByNamespaceId` exist. */ platformResourcesByNamespaceIdExist?: boolean; + /** Filter by the object’s `platformServiceBindingsByNamespaceId` relation. */ + platformServiceBindingsByNamespaceId?: PlatformNamespaceToManyPlatformServiceBindingFilter; + /** `platformServiceBindingsByNamespaceId` exist. */ + platformServiceBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformWebhookEndpointsByNamespaceId` relation. */ platformWebhookEndpointsByNamespaceId?: PlatformNamespaceToManyPlatformWebhookEndpointFilter; /** `platformWebhookEndpointsByNamespaceId` exist. */ @@ -11926,15 +11754,6 @@ export interface PlatformNamespacePatch { status?: string; updatedAt?: string; } -/** A filter to be used against many `PlatformBuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformNamespaceToManyPlatformBuilderBindingFilter { - /** Filters to entities where every related entity matches. */ - every?: PlatformBuilderBindingFilter; - /** Filters to entities where no related entity matches. */ - none?: PlatformBuilderBindingFilter; - /** Filters to entities where at least one related entity matches. */ - some?: PlatformBuilderBindingFilter; -} /** A filter to be used against many `PlatformFunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformNamespaceToManyPlatformFunctionDeploymentFilter { /** Filters to entities where every related entity matches. */ @@ -11980,6 +11799,15 @@ export interface PlatformNamespaceToManyPlatformResourceInstallationFilter { /** Filters to entities where at least one related entity matches. */ some?: PlatformResourceInstallationFilter; } +/** A filter to be used against many `PlatformServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyPlatformServiceBindingFilter { + /** Filters to entities where every related entity matches. */ + every?: PlatformServiceBindingFilter; + /** Filters to entities where no related entity matches. */ + none?: PlatformServiceBindingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlatformServiceBindingFilter; +} /** A filter to be used against many `PlatformWebhookEndpoint` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformNamespaceToManyPlatformWebhookEndpointFilter { /** Filters to entities where every related entity matches. */ @@ -14501,6 +14329,105 @@ export interface PlatformResourcesResolvedRequirementFilter { /** Filter by the object’s `slug` field. */ slug?: StringFilter; } +/** A filter to be used against `PlatformServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} +/** An input for mutations affecting `PlatformServiceBinding` */ +export interface PlatformServiceBindingInput { + createdAt?: string; + createdBy?: string; + createdByPrincipal?: string; + id?: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId: string; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope: string; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind: string; + /** Most recent projection failure */ + lastError?: string; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: unknown; + /** Namespace whose builds use this BuildKit installation */ + namespaceId: string; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string; + /** Projection state of the bound address: pending, active, failed */ + status?: string; + updatedAt?: string; + updatedBy?: string; + updatedByPrincipal?: string; +} +/** Represents an update to a `PlatformServiceBinding`. Fields that are set will be updated. */ +export interface PlatformServiceBindingPatch { + createdAt?: string; + createdBy?: string; + createdByPrincipal?: string; + id?: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId?: string; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope?: string; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind?: string; + /** Most recent projection failure */ + lastError?: string; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: unknown; + /** Namespace whose builds use this BuildKit installation */ + namespaceId?: string; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string; + /** Projection state of the bound address: pending, active, failed */ + status?: string; + updatedAt?: string; + updatedBy?: string; + updatedByPrincipal?: string; +} /** A filter to be used against `PlatformWebhookEndpoint` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformWebhookEndpointFilter { /** Filter by the object’s `active` field. */ @@ -17333,6 +17260,111 @@ export interface SaveGraphInput { message?: string; rootHash?: string; } +/** A filter to be used against `ServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface ServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: ServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: NamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: ServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: ServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} +/** An input for mutations affecting `ServiceBinding` */ +export interface ServiceBindingInput { + createdAt?: string; + createdBy?: string; + createdByPrincipal?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + id?: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId: string; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope: string; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind: string; + /** Most recent projection failure */ + lastError?: string; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: unknown; + /** Namespace whose builds use this BuildKit installation */ + namespaceId: string; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string; + /** Projection state of the bound address: pending, active, failed */ + status?: string; + updatedAt?: string; + updatedBy?: string; + updatedByPrincipal?: string; +} +/** Represents an update to a `ServiceBinding`. Fields that are set will be updated. */ +export interface ServiceBindingPatch { + createdAt?: string; + createdBy?: string; + createdByPrincipal?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string; + id?: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId?: string; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope?: string; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind?: string; + /** Most recent projection failure */ + lastError?: string; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: unknown; + /** Namespace whose builds use this BuildKit installation */ + namespaceId?: string; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string; + /** Projection state of the bound address: pending, active, failed */ + status?: string; + updatedAt?: string; + updatedBy?: string; + updatedByPrincipal?: string; +} export interface SetAndCommitInput { clientMutationId?: string; data?: unknown; @@ -17475,12 +17507,6 @@ export interface UpdateBuildStepInput { /** When the result was recorded (partition key) */ recordedAt: string; } -export interface UpdateBuilderBindingInput { - /** An object where the defined keys will be set on the `BuilderBinding` being updated. */ - builderBindingPatch: BuilderBindingPatch; - clientMutationId?: string; - id: string; -} export interface UpdateContentPresetInput { clientMutationId?: string; /** An object where the defined keys will be set on the `ContentPreset` being updated. */ @@ -17793,12 +17819,6 @@ export interface UpdatePlatformBuildStepInput { /** When the result was recorded (partition key) */ recordedAt: string; } -export interface UpdatePlatformBuilderBindingInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `PlatformBuilderBinding` being updated. */ - platformBuilderBindingPatch: PlatformBuilderBindingPatch; -} export interface UpdatePlatformFunctionApiBindingInput { clientMutationId?: string; id: string; @@ -18070,6 +18090,12 @@ export interface UpdatePlatformResourceUsageSummaryInput { /** An object where the defined keys will be set on the `PlatformResourceUsageSummary` being updated. */ platformResourceUsageSummaryPatch: PlatformResourceUsageSummaryPatch; } +export interface UpdatePlatformServiceBindingInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `PlatformServiceBinding` being updated. */ + platformServiceBindingPatch: PlatformServiceBindingPatch; +} export interface UpdatePlatformWebhookEndpointInput { clientMutationId?: string; id: string; @@ -18212,6 +18238,12 @@ export interface UpdateResourceUsageSummaryInput { /** An object where the defined keys will be set on the `ResourceUsageSummary` being updated. */ resourceUsageSummaryPatch: ResourceUsageSummaryPatch; } +export interface UpdateServiceBindingInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `ServiceBinding` being updated. */ + serviceBindingPatch: ServiceBindingPatch; +} export interface UpdateWebhookEndpointInput { clientMutationId?: string; id: string; @@ -18455,13 +18487,6 @@ export interface BuildStepConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `BuilderBinding` values. */ -export interface BuilderBindingConnection { - edges: BuilderBindingEdge[]; - nodes: BuilderBinding[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `Build` values. */ export interface BuildConnection { edges: BuildEdge[]; @@ -18763,13 +18788,6 @@ export interface PlatformBuildStepConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `PlatformBuilderBinding` values. */ -export interface PlatformBuilderBindingConnection { - edges: PlatformBuilderBindingEdge[]; - nodes: PlatformBuilderBinding[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `PlatformBuild` values. */ export interface PlatformBuildConnection { edges: PlatformBuildEdge[]; @@ -19099,6 +19117,13 @@ export interface PlatformResourcesResolvedRequirementConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `PlatformServiceBinding` values. */ +export interface PlatformServiceBindingConnection { + edges: PlatformServiceBindingEdge[]; + nodes: PlatformServiceBinding[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `PlatformWebhookEndpoint` values. */ export interface PlatformWebhookEndpointConnection { edges: PlatformWebhookEndpointEdge[]; @@ -19295,6 +19320,13 @@ export interface ResourcesResolvedRequirementConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `ServiceBinding` values. */ +export interface ServiceBindingConnection { + edges: ServiceBindingEdge[]; + nodes: ServiceBinding[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `WebhookEndpoint` values. */ export interface WebhookEndpointConnection { edges: WebhookEndpointEdge[]; @@ -19344,12 +19376,6 @@ export interface CreateBuildStepPayload { buildStepEdge?: BuildStepEdge | null; clientMutationId?: string | null; } -export interface CreateBuilderBindingPayload { - /** The `BuilderBinding` that was created by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} export interface CreateContentPresetPayload { clientMutationId?: string | null; /** The `ContentPreset` that was created by this mutation. */ @@ -19582,12 +19608,6 @@ export interface CreatePlatformBuildStepPayload { platformBuildStep?: PlatformBuildStep | null; platformBuildStepEdge?: PlatformBuildStepEdge | null; } -export interface CreatePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was created by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} export interface CreatePlatformFunctionApiBindingPayload { clientMutationId?: string | null; /** The `PlatformFunctionApiBinding` that was created by this mutation. */ @@ -19822,6 +19842,12 @@ export interface CreatePlatformResourceUsageSummaryPayload { platformResourceUsageSummary?: PlatformResourceUsageSummary | null; platformResourceUsageSummaryEdge?: PlatformResourceUsageSummaryEdge | null; } +export interface CreatePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was created by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} export interface CreatePlatformWebhookEndpointPayload { clientMutationId?: string | null; /** The `PlatformWebhookEndpoint` that was created by this mutation. */ @@ -19954,6 +19980,12 @@ export interface CreateResourceUsageSummaryPayload { resourceUsageSummary?: ResourceUsageSummary | null; resourceUsageSummaryEdge?: ResourceUsageSummaryEdge | null; } +export interface CreateServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was created by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} export interface CreateWebhookEndpointPayload { clientMutationId?: string | null; /** The `WebhookEndpoint` that was created by this mutation. */ @@ -20049,12 +20081,6 @@ export interface DeleteBuildStepPayload { buildStepEdge?: BuildStepEdge | null; clientMutationId?: string | null; } -export interface DeleteBuilderBindingPayload { - /** The `BuilderBinding` that was deleted by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} export interface DeleteContentPresetPayload { clientMutationId?: string | null; /** The `ContentPreset` that was deleted by this mutation. */ @@ -20295,12 +20321,6 @@ export interface DeletePlatformBuildStepPayload { platformBuildStep?: PlatformBuildStep | null; platformBuildStepEdge?: PlatformBuildStepEdge | null; } -export interface DeletePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was deleted by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} export interface DeletePlatformFunctionApiBindingPayload { clientMutationId?: string | null; /** The `PlatformFunctionApiBinding` that was deleted by this mutation. */ @@ -20535,6 +20555,12 @@ export interface DeletePlatformResourceUsageSummaryPayload { platformResourceUsageSummary?: PlatformResourceUsageSummary | null; platformResourceUsageSummaryEdge?: PlatformResourceUsageSummaryEdge | null; } +export interface DeletePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was deleted by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} export interface DeletePlatformWebhookEndpointPayload { clientMutationId?: string | null; /** The `PlatformWebhookEndpoint` that was deleted by this mutation. */ @@ -20667,6 +20693,12 @@ export interface DeleteResourceUsageSummaryPayload { resourceUsageSummary?: ResourceUsageSummary | null; resourceUsageSummaryEdge?: ResourceUsageSummaryEdge | null; } +export interface DeleteServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was deleted by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} export interface DeleteWebhookEndpointPayload { clientMutationId?: string | null; /** The `WebhookEndpoint` that was deleted by this mutation. */ @@ -20842,12 +20874,6 @@ export interface UpdateBuildStepPayload { buildStepEdge?: BuildStepEdge | null; clientMutationId?: string | null; } -export interface UpdateBuilderBindingPayload { - /** The `BuilderBinding` that was updated by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} export interface UpdateContentPresetPayload { clientMutationId?: string | null; /** The `ContentPreset` that was updated by this mutation. */ @@ -21088,12 +21114,6 @@ export interface UpdatePlatformBuildStepPayload { platformBuildStep?: PlatformBuildStep | null; platformBuildStepEdge?: PlatformBuildStepEdge | null; } -export interface UpdatePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was updated by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} export interface UpdatePlatformFunctionApiBindingPayload { clientMutationId?: string | null; /** The `PlatformFunctionApiBinding` that was updated by this mutation. */ @@ -21328,6 +21348,12 @@ export interface UpdatePlatformResourceUsageSummaryPayload { platformResourceUsageSummary?: PlatformResourceUsageSummary | null; platformResourceUsageSummaryEdge?: PlatformResourceUsageSummaryEdge | null; } +export interface UpdatePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was updated by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} export interface UpdatePlatformWebhookEndpointPayload { clientMutationId?: string | null; /** The `PlatformWebhookEndpoint` that was updated by this mutation. */ @@ -21460,6 +21486,12 @@ export interface UpdateResourceUsageSummaryPayload { resourceUsageSummary?: ResourceUsageSummary | null; resourceUsageSummaryEdge?: ResourceUsageSummaryEdge | null; } +export interface UpdateServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was updated by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} export interface UpdateWebhookEndpointPayload { clientMutationId?: string | null; /** The `WebhookEndpoint` that was updated by this mutation. */ @@ -21481,19 +21513,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -21520,12 +21554,6 @@ export interface PageInfo { /** When paginating backwards, the cursor to continue. */ startCursor?: string | null; } -/** A `BuilderBinding` edge in the connection. */ -export interface BuilderBindingEdge { - cursor?: string | null; - /** The `BuilderBinding` at the end of the edge. */ - node?: BuilderBinding | null; -} /** A `Build` edge in the connection. */ export interface BuildEdge { cursor?: string | null; @@ -21784,12 +21812,6 @@ export interface PlatformBuildStepEdge { /** The `PlatformBuildStep` at the end of the edge. */ node?: PlatformBuildStep | null; } -/** A `PlatformBuilderBinding` edge in the connection. */ -export interface PlatformBuilderBindingEdge { - cursor?: string | null; - /** The `PlatformBuilderBinding` at the end of the edge. */ - node?: PlatformBuilderBinding | null; -} /** A `PlatformBuild` edge in the connection. */ export interface PlatformBuildEdge { cursor?: string | null; @@ -22072,6 +22094,12 @@ export interface PlatformResourcesResolvedRequirementEdge { /** The `PlatformResourcesResolvedRequirement` at the end of the edge. */ node?: PlatformResourcesResolvedRequirement | null; } +/** A `PlatformServiceBinding` edge in the connection. */ +export interface PlatformServiceBindingEdge { + cursor?: string | null; + /** The `PlatformServiceBinding` at the end of the edge. */ + node?: PlatformServiceBinding | null; +} /** A `PlatformWebhookEndpoint` edge in the connection. */ export interface PlatformWebhookEndpointEdge { cursor?: string | null; @@ -22240,6 +22268,12 @@ export interface ResourcesResolvedRequirementEdge { /** The `ResourcesResolvedRequirement` at the end of the edge. */ node?: ResourcesResolvedRequirement | null; } +/** A `ServiceBinding` edge in the connection. */ +export interface ServiceBindingEdge { + cursor?: string | null; + /** The `ServiceBinding` at the end of the edge. */ + node?: ServiceBinding | null; +} /** A `WebhookEndpoint` edge in the connection. */ export interface WebhookEndpointEdge { cursor?: string | null; @@ -22260,6 +22294,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -22269,6 +22305,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -22282,7 +22324,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -22297,7 +22339,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -22325,7 +22367,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -22340,13 +22382,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -22364,17 +22406,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -22447,7 +22489,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -22458,7 +22500,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -22476,10 +22518,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-react/src/compute/types.ts b/sdk/constructive-react/src/compute/types.ts index d89c25ab4e..d9028bb9ad 100644 --- a/sdk/constructive-react/src/compute/types.ts +++ b/sdk/constructive-react/src/compute/types.ts @@ -50,23 +50,6 @@ export interface BuildStep { status: string | null; summary: unknown | null; } -export interface BuilderBinding { - createdAt: string | null; - createdBy: string | null; - createdByPrincipal: string | null; - databaseId: string | null; - id: string | null; - installationId: string | null; - lastError: string | null; - metadata: unknown | null; - namespaceId: string | null; - observedHost: string | null; - realm: string | null; - status: string | null; - updatedAt: string | null; - updatedBy: string | null; - updatedByPrincipal: string | null; -} export interface ContentPreset { active: boolean | null; commitId: string | null; @@ -666,22 +649,6 @@ export interface PlatformBuildStep { status: string | null; summary: unknown | null; } -export interface PlatformBuilderBinding { - createdAt: string | null; - createdBy: string | null; - createdByPrincipal: string | null; - id: string | null; - installationId: string | null; - lastError: string | null; - metadata: unknown | null; - namespaceId: string | null; - observedHost: string | null; - realm: string | null; - status: string | null; - updatedAt: string | null; - updatedBy: string | null; - updatedByPrincipal: string | null; -} export interface PlatformFunctionApiBinding { alias: string | null; apiId: string | null; @@ -1456,6 +1423,24 @@ export interface PlatformResourcesResolvedRequirement { secretsObjectName: string | null; slug: string | null; } +export interface PlatformServiceBinding { + createdAt: string | null; + createdBy: string | null; + createdByPrincipal: string | null; + id: string | null; + installationId: string | null; + installationScope: string | null; + kind: string | null; + lastError: string | null; + metadata: unknown | null; + namespaceId: string | null; + observedHost: string | null; + realm: string | null; + status: string | null; + updatedAt: string | null; + updatedBy: string | null; + updatedByPrincipal: string | null; +} export interface PlatformWebhookEndpoint { active: boolean | null; createdAt: string | null; @@ -1991,6 +1976,25 @@ export interface ResourcesResolvedRequirement { secretsObjectName: string | null; slug: string | null; } +export interface ServiceBinding { + createdAt: string | null; + createdBy: string | null; + createdByPrincipal: string | null; + databaseId: string | null; + id: string | null; + installationId: string | null; + installationScope: string | null; + kind: string | null; + lastError: string | null; + metadata: unknown | null; + namespaceId: string | null; + observedHost: string | null; + realm: string | null; + status: string | null; + updatedAt: string | null; + updatedBy: string | null; + updatedByPrincipal: string | null; +} export interface WebhookEndpoint { active: boolean | null; createdAt: string | null; diff --git a/sdk/constructive-react/src/config/schema-types.ts b/sdk/constructive-react/src/config/schema-types.ts index fae75472c7..e05a6a1824 100644 --- a/sdk/constructive-react/src/config/schema-types.ts +++ b/sdk/constructive-react/src/config/schema-types.ts @@ -1226,19 +1226,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -1321,6 +1323,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -1330,6 +1334,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -1343,7 +1353,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -1358,7 +1368,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -1386,7 +1396,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -1401,13 +1411,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -1425,17 +1435,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -1508,7 +1518,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -1519,7 +1529,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -1537,10 +1547,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-react/src/infra/schema-types.ts b/sdk/constructive-react/src/infra/schema-types.ts index 14d6bf4ac2..da5d100771 100644 --- a/sdk/constructive-react/src/infra/schema-types.ts +++ b/sdk/constructive-react/src/infra/schema-types.ts @@ -1478,19 +1478,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -1585,6 +1587,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -1594,6 +1598,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -1607,7 +1617,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -1622,7 +1632,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -1650,7 +1660,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -1665,13 +1675,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -1689,17 +1699,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -1772,7 +1782,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -1783,7 +1793,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -1801,10 +1811,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-react/src/modules/hooks/README.md b/sdk/constructive-react/src/modules/hooks/README.md index cfe0357e8c..f8f40d5a77 100644 --- a/sdk/constructive-react/src/modules/hooks/README.md +++ b/sdk/constructive-react/src/modules/hooks/README.md @@ -62,11 +62,11 @@ function App() { | `useCreateBlueprintMutation` | Mutation | 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. | | `useUpdateBlueprintMutation` | Mutation | 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. | | `useDeleteBlueprintMutation` | Mutation | 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. | -| `useBlueprintConstructionsQuery` | Query | Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. | -| `useBlueprintConstructionQuery` | Query | Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. | -| `useCreateBlueprintConstructionMutation` | Mutation | Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. | -| `useUpdateBlueprintConstructionMutation` | Mutation | Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. | -| `useDeleteBlueprintConstructionMutation` | Mutation | Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. | +| `useBlueprintConstructionsQuery` | Query | Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. | +| `useBlueprintConstructionQuery` | Query | Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. | +| `useCreateBlueprintConstructionMutation` | Mutation | Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. | +| `useUpdateBlueprintConstructionMutation` | Mutation | Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. | +| `useDeleteBlueprintConstructionMutation` | Mutation | Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. | | `useBlueprintTemplatesQuery` | Query | A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible). | | `useBlueprintTemplateQuery` | Query | A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible). | | `useCreateBlueprintTemplateMutation` | Mutation | A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible). | @@ -637,7 +637,7 @@ function App() { | `useCreateWebhookModuleMutation` | Mutation | Create a webhookModule | | `useUpdateWebhookModuleMutation` | Mutation | Update a webhookModule | | `useDeleteWebhookModuleMutation` | Mutation | Delete a webhookModule | -| `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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. | +| `useConstructBlueprintMutation` | Mutation | Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. | | `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 | Reconcile an S3 bucket for a logical bucket in the database. Records the request on the bucket row via RLS; the bucket's job @@ -779,20 +779,20 @@ create({ databaseId: '', definition: '', definitionHash: '', d ```typescript // List all blueprintConstructions const { data, isLoading } = useBlueprintConstructionsQuery({ - selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }, + selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }, }); // Get one blueprintConstruction const { data: item } = useBlueprintConstructionQuery({ id: '', - selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }, + selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }, }); // Create a blueprintConstruction const { mutate: create } = useCreateBlueprintConstructionMutation({ selection: { fields: { id: true } }, }); -create({ blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }); +create({ blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', error: '', schemaId: '', status: '', tableMap: '' }); ``` ### BlueprintTemplate @@ -1199,20 +1199,20 @@ create({ databaseId: '', deviceSettingsTableId: '', deviceSettingsTa ```typescript // List all domainModules const { data, isLoading } = useDomainModulesQuery({ - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, reservedSubdomainsTableId: true, reservedSubdomainsTableName: true, schemaId: true, scope: true, sweepUnverifiedDomainsFunction: true } }, }); // Get one domainModule const { data: item } = useDomainModuleQuery({ id: '', - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, reservedSubdomainsTableId: true, reservedSubdomainsTableName: true, schemaId: true, scope: true, sweepUnverifiedDomainsFunction: true } }, }); // Create a domainModule const { mutate: create } = useCreateDomainModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +create({ apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', defaultReservedSubdomains: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', reservedSubdomainsTableId: '', reservedSubdomainsTableName: '', schemaId: '', scope: '', sweepUnverifiedDomainsFunction: '' }); ``` ### EmailSenderModule @@ -2081,20 +2081,20 @@ create({ apiName: '', buildStepsTableId: '', buildStepsTableName: ```typescript // List all resourceModules const { data, isLoading } = useResourceModulesQuery({ - selection: { fields: { apiName: true, builderBindingsTableId: true, builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, serviceBindingsTableId: true, serviceBindingsTableName: true } }, }); // Get one resourceModule const { data: item } = useResourceModuleQuery({ id: '', - selection: { fields: { apiName: true, builderBindingsTableId: true, builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, serviceBindingsTableId: true, serviceBindingsTableName: true } }, }); // Create a resourceModule const { mutate: create } = useCreateResourceModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', builderBindingsTableId: '', builderBindingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }); +create({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '', serviceBindingsTableId: '', serviceBindingsTableName: '' }); ``` ### RlsModule @@ -2500,7 +2500,7 @@ create({ apiName: '', databaseId: '', defaultCapabilities: ' constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateBlueprintConstructionMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateBlueprintConstructionMutation.ts index db049e428e..09f1100b20 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useCreateBlueprintConstructionMutation.ts +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateBlueprintConstructionMutation.ts @@ -1,5 +1,5 @@ /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -23,7 +23,7 @@ export type { CreateBlueprintConstructionInput, } from '../../orm/input-types'; /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * * @example * ```tsx diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteBlueprintConstructionMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteBlueprintConstructionMutation.ts index 81277a7558..0dda7c5c34 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteBlueprintConstructionMutation.ts +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteBlueprintConstructionMutation.ts @@ -1,5 +1,5 @@ /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -21,7 +21,7 @@ export type { BlueprintConstructionWithRelations, } from '../../orm/input-types'; /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * * @example * ```tsx diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateBlueprintConstructionMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateBlueprintConstructionMutation.ts index b773322a19..3b555400d2 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateBlueprintConstructionMutation.ts +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateBlueprintConstructionMutation.ts @@ -1,5 +1,5 @@ /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -23,7 +23,7 @@ export type { BlueprintConstructionPatch, } from '../../orm/input-types'; /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * * @example * ```tsx diff --git a/sdk/constructive-react/src/modules/hooks/queries/useBlueprintConstructionQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useBlueprintConstructionQuery.ts index b4c286d3db..3a2cd853e7 100644 --- a/sdk/constructive-react/src/modules/hooks/queries/useBlueprintConstructionQuery.ts +++ b/sdk/constructive-react/src/modules/hooks/queries/useBlueprintConstructionQuery.ts @@ -1,5 +1,5 @@ /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -22,7 +22,7 @@ export type { /** Query key factory - re-exported from query-keys.ts */ export const blueprintConstructionQueryKey = blueprintConstructionKeys.detail; /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * * @example * ```tsx @@ -76,7 +76,7 @@ export function useBlueprintConstructionQuery( }); } /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * * @example * ```ts @@ -109,7 +109,7 @@ export async function fetchBlueprintConstructionQuery(params: { .unwrap(); } /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * * @example * ```ts diff --git a/sdk/constructive-react/src/modules/hooks/queries/useBlueprintConstructionsQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useBlueprintConstructionsQuery.ts index b8f5b8371e..5f96c40fc2 100644 --- a/sdk/constructive-react/src/modules/hooks/queries/useBlueprintConstructionsQuery.ts +++ b/sdk/constructive-react/src/modules/hooks/queries/useBlueprintConstructionsQuery.ts @@ -1,5 +1,5 @@ /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -31,7 +31,7 @@ export type { /** Query key factory - re-exported from query-keys.ts */ export const blueprintConstructionsQueryKey = blueprintConstructionKeys.list; /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * * @example * ```tsx @@ -97,7 +97,7 @@ export function useBlueprintConstructionsQuery( }); } /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * * @example * ```ts @@ -139,7 +139,7 @@ export async function fetchBlueprintConstructionsQuery(params: { return getClient().blueprintConstruction.findMany(args).unwrap(); } /** - * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. + * Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. * * @example * ```ts diff --git a/sdk/constructive-react/src/modules/orm/README.md b/sdk/constructive-react/src/modules/orm/README.md index 73e6574eaa..a40a540fb0 100644 --- a/sdk/constructive-react/src/modules/orm/README.md +++ b/sdk/constructive-react/src/modules/orm/README.md @@ -498,6 +498,7 @@ CRUD operations for BlueprintConstruction records. | `constructedDefinition` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | +| `error` | JSON | Yes | | `id` | UUID | No | | `schemaId` | UUID | Yes | | `status` | String | Yes | @@ -508,13 +509,13 @@ CRUD operations for BlueprintConstruction records. ```typescript // List all blueprintConstruction records -const items = await db.blueprintConstruction.findMany({ select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); +const items = await db.blueprintConstruction.findMany({ select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.blueprintConstruction.findOne({ id: '', select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); +const item = await db.blueprintConstruction.findOne({ id: '', select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); // Create -const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); +const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', error: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); // Update const updated = await db.blueprintConstruction.update({ where: { id: '' }, data: { blueprintId: '' }, select: { id: true } }).execute(); @@ -1396,6 +1397,7 @@ CRUD operations for DomainModule records. | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | | `defaultCapabilities` | String | Yes | +| `defaultReservedSubdomains` | JSON | Yes | | `domainEventsTableId` | UUID | Yes | | `domainEventsTableName` | String | Yes | | `domainVerificationsTableId` | UUID | Yes | @@ -1414,20 +1416,23 @@ CRUD operations for DomainModule records. | `privateSchemaName` | String | Yes | | `provisions` | JSON | Yes | | `publicSchemaName` | String | Yes | +| `reservedSubdomainsTableId` | UUID | Yes | +| `reservedSubdomainsTableName` | String | Yes | | `schemaId` | UUID | Yes | | `scope` | String | Yes | +| `sweepUnverifiedDomainsFunction` | String | Yes | **Operations:** ```typescript // List all domainModule records -const items = await db.domainModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.domainModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, reservedSubdomainsTableId: true, reservedSubdomainsTableName: true, schemaId: true, scope: true, sweepUnverifiedDomainsFunction: true } }).execute(); // Get one by id -const item = await db.domainModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.domainModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, reservedSubdomainsTableId: true, reservedSubdomainsTableName: true, schemaId: true, scope: true, sweepUnverifiedDomainsFunction: true } }).execute(); // Create -const created = await db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', defaultReservedSubdomains: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', reservedSubdomainsTableId: '', reservedSubdomainsTableName: '', schemaId: '', scope: '', sweepUnverifiedDomainsFunction: '' }, select: { id: true } }).execute(); // Update const updated = await db.domainModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -3435,8 +3440,6 @@ CRUD operations for ResourceModule records. | Field | Type | Editable | |-------|------|----------| | `apiName` | String | Yes | -| `builderBindingsTableId` | UUID | Yes | -| `builderBindingsTableName` | String | Yes | | `databaseId` | UUID | Yes | | `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | @@ -3474,18 +3477,20 @@ CRUD operations for ResourceModule records. | `rollupResourceUsageSummaryFunction` | String | Yes | | `schemaId` | UUID | Yes | | `scope` | String | Yes | +| `serviceBindingsTableId` | UUID | Yes | +| `serviceBindingsTableName` | String | Yes | **Operations:** ```typescript // List all resourceModule records -const items = await db.resourceModule.findMany({ select: { apiName: true, builderBindingsTableId: true, builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); +const items = await db.resourceModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, serviceBindingsTableId: true, serviceBindingsTableName: true } }).execute(); // Get one by id -const item = await db.resourceModule.findOne({ id: '', select: { apiName: true, builderBindingsTableId: true, builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); +const item = await db.resourceModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, serviceBindingsTableId: true, serviceBindingsTableName: true } }).execute(); // Create -const created = await db.resourceModule.create({ data: { apiName: '', builderBindingsTableId: '', builderBindingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.resourceModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '', serviceBindingsTableId: '', serviceBindingsTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.resourceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -4340,7 +4345,7 @@ const deleted = await db.webhookModule.delete({ where: { id: '' } }).execu ### `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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. +Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/modules/orm/input-types.ts b/sdk/constructive-react/src/modules/orm/input-types.ts index ca44c2dad1..d4cde53664 100644 --- a/sdk/constructive-react/src/modules/orm/input-types.ts +++ b/sdk/constructive-react/src/modules/orm/input-types.ts @@ -461,7 +461,7 @@ export interface Blueprint { /** Timestamp when this blueprint was last modified. */ updatedAt?: string | null; } -/** Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. */ +/** Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. */ export interface BlueprintConstruction { /** The blueprint that was constructed. */ blueprintId?: string | null; @@ -473,11 +473,13 @@ export interface BlueprintConstruction { createdAt?: string | null; /** The database the blueprint was constructed into. */ databaseId?: string | null; + /** The coded error ({"code", "context", "class"} as raised through errors.raise_error, or {"code": , "message"} for a database error) a failed construction ended with. NULL unless status is failed. */ + error?: Record | null; /** Unique identifier for this construction attempt. */ id: string; /** The default schema used for tables that did not specify an explicit schema_name. NULL if not yet resolved. */ schemaId?: string | null; - /** Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. A failed construction raises and rolls back, so it leaves no row. */ + /** Execution state of this construction attempt. pending: enqueued, the blueprint:construct job has not started. constructing: the job is executing. constructed: successfully completed. failed: the job raised; the build rolled back and error carries its coded error. */ status?: string | null; /** Mapping of table names to created table UUIDs, populated after successful construction. Format: {"products": "uuid", "categories": "uuid", ...}. Defaults to empty object. */ tableMap?: Record | null; @@ -908,6 +910,7 @@ export interface DomainModule { catalogModuleId?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + defaultReservedSubdomains?: Record | null; domainEventsTableId?: string | null; domainEventsTableName?: string | null; domainVerificationsTableId?: string | null; @@ -926,8 +929,11 @@ export interface DomainModule { privateSchemaName?: string | null; provisions?: Record | null; publicSchemaName?: string | null; + reservedSubdomainsTableId?: string | null; + reservedSubdomainsTableName?: string | null; schemaId?: string | null; scope?: string | null; + sweepUnverifiedDomainsFunction?: string | null; } export interface EmailSenderModule { apiName?: string | null; @@ -2214,8 +2220,6 @@ export interface RepositoryModule { } export interface ResourceModule { apiName?: string | null; - builderBindingsTableId?: string | null; - builderBindingsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; entityField?: string | null; @@ -2253,6 +2257,8 @@ export interface ResourceModule { rollupResourceUsageSummaryFunction?: string | null; schemaId?: string | null; scope?: string | null; + serviceBindingsTableId?: string | null; + serviceBindingsTableName?: string | null; } export interface RlsModule { apiName?: string | null; @@ -3158,6 +3164,7 @@ export type BlueprintConstructionSelect = { constructedDefinition?: boolean; createdAt?: boolean; databaseId?: boolean; + error?: boolean; id?: boolean; schemaId?: boolean; status?: boolean; @@ -3599,6 +3606,7 @@ export type DomainModuleSelect = { catalogModuleId?: boolean; databaseId?: boolean; defaultCapabilities?: boolean; + defaultReservedSubdomains?: boolean; domainEventsTableId?: boolean; domainEventsTableName?: boolean; domainVerificationsTableId?: boolean; @@ -3617,8 +3625,11 @@ export type DomainModuleSelect = { privateSchemaName?: boolean; provisions?: boolean; publicSchemaName?: boolean; + reservedSubdomainsTableId?: boolean; + reservedSubdomainsTableName?: boolean; schemaId?: boolean; scope?: boolean; + sweepUnverifiedDomainsFunction?: boolean; catalogModule?: { select: CatalogModuleSelect; }; @@ -4666,8 +4677,6 @@ export type RepositoryModuleSelect = { }; export type ResourceModuleSelect = { apiName?: boolean; - builderBindingsTableId?: boolean; - builderBindingsTableName?: boolean; databaseId?: boolean; defaultCapabilities?: boolean; entityField?: boolean; @@ -4705,6 +4714,8 @@ export type ResourceModuleSelect = { rollupResourceUsageSummaryFunction?: boolean; schemaId?: boolean; scope?: boolean; + serviceBindingsTableId?: boolean; + serviceBindingsTableName?: boolean; merkleStoreModule?: { select: MerkleStoreModuleSelect; }; @@ -5589,6 +5600,8 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `error` field. */ + error?: JSONFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -6471,6 +6484,8 @@ export interface DomainModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ defaultCapabilities?: StringListFilter; + /** Filter by the object’s `defaultReservedSubdomains` field. */ + defaultReservedSubdomains?: JSONFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -6511,6 +6526,10 @@ export interface DomainModuleFilter { provisions?: JSONFilter; /** Filter by the object’s `publicSchemaName` field. */ publicSchemaName?: StringFilter; + /** Filter by the object’s `reservedSubdomainsTableId` field. */ + reservedSubdomainsTableId?: UUIDFilter; + /** Filter by the object’s `reservedSubdomainsTableName` field. */ + reservedSubdomainsTableName?: StringFilter; /** Filter by the object’s `routeModules` relation. */ routeModules?: DomainModuleToManyRouteModuleFilter; /** `routeModules` exist. */ @@ -6519,6 +6538,8 @@ export interface DomainModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `sweepUnverifiedDomainsFunction` field. */ + sweepUnverifiedDomainsFunction?: StringFilter; } export interface EmailSenderModuleFilter { /** Checks for all expressions in this list. */ @@ -8619,10 +8640,6 @@ export interface ResourceModuleFilter { and?: ResourceModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; - /** Filter by the object’s `builderBindingsTableId` field. */ - builderBindingsTableId?: UUIDFilter; - /** Filter by the object’s `builderBindingsTableName` field. */ - builderBindingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ @@ -8709,6 +8726,10 @@ export interface ResourceModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `serviceBindingsTableId` field. */ + serviceBindingsTableId?: UUIDFilter; + /** Filter by the object’s `serviceBindingsTableName` field. */ + serviceBindingsTableName?: StringFilter; } export interface RlsModuleFilter { /** Checks for all expressions in this list. */ @@ -9968,6 +9989,8 @@ export type BlueprintConstructionOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'ERROR_ASC' + | 'ERROR_DESC' | 'ID_ASC' | 'ID_DESC' | 'NATURAL' @@ -10724,6 +10747,8 @@ export type DomainModuleOrderBy = | 'DATABASE_ID_DESC' | 'DEFAULT_CAPABILITIES_ASC' | 'DEFAULT_CAPABILITIES_DESC' + | 'DEFAULT_RESERVED_SUBDOMAINS_ASC' + | 'DEFAULT_RESERVED_SUBDOMAINS_DESC' | 'DOMAINS_TABLE_ID_ASC' | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' @@ -10763,10 +10788,16 @@ export type DomainModuleOrderBy = | 'PROVISIONS_DESC' | 'PUBLIC_SCHEMA_NAME_ASC' | 'PUBLIC_SCHEMA_NAME_DESC' + | 'RESERVED_SUBDOMAINS_TABLE_ID_ASC' + | 'RESERVED_SUBDOMAINS_TABLE_ID_DESC' + | 'RESERVED_SUBDOMAINS_TABLE_NAME_ASC' + | 'RESERVED_SUBDOMAINS_TABLE_NAME_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' - | 'SCOPE_DESC'; + | 'SCOPE_DESC' + | 'SWEEP_UNVERIFIED_DOMAINS_FUNCTION_ASC' + | 'SWEEP_UNVERIFIED_DOMAINS_FUNCTION_DESC'; export type EmailSenderModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -12618,10 +12649,6 @@ export type RepositoryModuleOrderBy = export type ResourceModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' - | 'BUILDER_BINDINGS_TABLE_ID_ASC' - | 'BUILDER_BINDINGS_TABLE_ID_DESC' - | 'BUILDER_BINDINGS_TABLE_NAME_ASC' - | 'BUILDER_BINDINGS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'DEFAULT_CAPABILITIES_ASC' @@ -12698,7 +12725,11 @@ export type ResourceModuleOrderBy = | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' - | 'SCOPE_DESC'; + | 'SCOPE_DESC' + | 'SERVICE_BINDINGS_TABLE_ID_ASC' + | 'SERVICE_BINDINGS_TABLE_ID_DESC' + | 'SERVICE_BINDINGS_TABLE_NAME_ASC' + | 'SERVICE_BINDINGS_TABLE_NAME_DESC'; export type RlsModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -13893,6 +13924,7 @@ export interface CreateBlueprintConstructionInput { constructedAt?: string; constructedDefinition?: Record; databaseId: string; + error?: Record; schemaId?: string; status?: string; tableMap?: Record; @@ -13903,6 +13935,7 @@ export interface BlueprintConstructionPatch { constructedAt?: string | null; constructedDefinition?: Record | null; databaseId?: string | null; + error?: Record | null; schemaId?: string | null; status?: string | null; tableMap?: Record | null; @@ -14827,6 +14860,7 @@ export interface CreateDomainModuleInput { catalogModuleId?: string; databaseId: string; defaultCapabilities?: string[]; + defaultReservedSubdomains?: Record; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -14844,8 +14878,11 @@ export interface CreateDomainModuleInput { privateSchemaName?: string; provisions?: Record; publicSchemaName?: string; + reservedSubdomainsTableId?: string; + reservedSubdomainsTableName?: string; schemaId?: string; scope: string; + sweepUnverifiedDomainsFunction?: string; }; } export interface DomainModulePatch { @@ -14853,6 +14890,7 @@ export interface DomainModulePatch { catalogModuleId?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + defaultReservedSubdomains?: Record | null; domainEventsTableId?: string | null; domainEventsTableName?: string | null; domainVerificationsTableId?: string | null; @@ -14870,8 +14908,11 @@ export interface DomainModulePatch { privateSchemaName?: string | null; provisions?: Record | null; publicSchemaName?: string | null; + reservedSubdomainsTableId?: string | null; + reservedSubdomainsTableName?: string | null; schemaId?: string | null; scope?: string | null; + sweepUnverifiedDomainsFunction?: string | null; } export interface UpdateDomainModuleInput { clientMutationId?: string; @@ -17132,8 +17173,6 @@ export interface CreateResourceModuleInput { clientMutationId?: string; resourceModule: { apiName?: string; - builderBindingsTableId?: string; - builderBindingsTableName?: string; databaseId: string; defaultCapabilities?: string[]; entityField?: string; @@ -17170,12 +17209,12 @@ export interface CreateResourceModuleInput { rollupResourceUsageSummaryFunction?: string; schemaId?: string; scope: string; + serviceBindingsTableId?: string; + serviceBindingsTableName?: string; }; } export interface ResourceModulePatch { apiName?: string | null; - builderBindingsTableId?: string | null; - builderBindingsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; entityField?: string | null; @@ -17212,6 +17251,8 @@ export interface ResourceModulePatch { rollupResourceUsageSummaryFunction?: string | null; schemaId?: string | null; scope?: string | null; + serviceBindingsTableId?: string | null; + serviceBindingsTableName?: string | null; } export interface UpdateResourceModuleInput { clientMutationId?: string; @@ -18741,11 +18782,13 @@ export interface BlueprintConstructionInput { createdAt?: string; /** The database the blueprint was constructed into. */ databaseId: string; + /** The coded error ({"code", "context", "class"} as raised through errors.raise_error, or {"code": , "message"} for a database error) a failed construction ended with. NULL unless status is failed. */ + error?: Record; /** Unique identifier for this construction attempt. */ id?: string; /** The default schema used for tables that did not specify an explicit schema_name. NULL if not yet resolved. */ schemaId?: string; - /** Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. A failed construction raises and rolls back, so it leaves no row. */ + /** Execution state of this construction attempt. pending: enqueued, the blueprint:construct job has not started. constructing: the job is executing. constructed: successfully completed. failed: the job raised; the build rolled back and error carries its coded error. */ status?: string; /** Mapping of table names to created table UUIDs, populated after successful construction. Format: {"products": "uuid", "categories": "uuid", ...}. Defaults to empty object. */ tableMap?: Record; @@ -19211,6 +19254,7 @@ export interface DomainModuleInput { catalogModuleId?: string; databaseId: string; defaultCapabilities?: string[]; + defaultReservedSubdomains?: Record; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -19229,8 +19273,11 @@ export interface DomainModuleInput { privateSchemaName?: string; provisions?: Record; publicSchemaName?: string; + reservedSubdomainsTableId?: string; + reservedSubdomainsTableName?: string; schemaId?: string; scope: string; + sweepUnverifiedDomainsFunction?: string; } /** An input for mutations affecting `EmailSenderModule` */ export interface EmailSenderModuleInput { @@ -20507,8 +20554,6 @@ export interface RepositoryModuleInput { /** An input for mutations affecting `ResourceModule` */ export interface ResourceModuleInput { apiName?: string; - builderBindingsTableId?: string; - builderBindingsTableName?: string; databaseId: string; defaultCapabilities?: string[]; entityField?: string; @@ -20546,6 +20591,8 @@ export interface ResourceModuleInput { rollupResourceUsageSummaryFunction?: string; schemaId?: string; scope: string; + serviceBindingsTableId?: string; + serviceBindingsTableName?: string; } /** An input for mutations affecting `RlsModule` */ export interface RlsModuleInput { @@ -20945,6 +20992,8 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `error` field. */ + error?: JSONFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -21223,6 +21272,8 @@ export interface DomainModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ defaultCapabilities?: StringListFilter; + /** Filter by the object’s `defaultReservedSubdomains` field. */ + defaultReservedSubdomains?: JSONFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -21263,6 +21314,10 @@ export interface DomainModuleFilter { provisions?: JSONFilter; /** Filter by the object’s `publicSchemaName` field. */ publicSchemaName?: StringFilter; + /** Filter by the object’s `reservedSubdomainsTableId` field. */ + reservedSubdomainsTableId?: UUIDFilter; + /** Filter by the object’s `reservedSubdomainsTableName` field. */ + reservedSubdomainsTableName?: StringFilter; /** Filter by the object’s `routeModules` relation. */ routeModules?: DomainModuleToManyRouteModuleFilter; /** `routeModules` exist. */ @@ -21271,6 +21326,8 @@ export interface DomainModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `sweepUnverifiedDomainsFunction` field. */ + sweepUnverifiedDomainsFunction?: StringFilter; } /** A filter to be used against `RouteModule` object types. All fields are combined with a logical ‘and.’ */ export interface RouteModuleFilter { @@ -21884,10 +21941,6 @@ export interface ResourceModuleFilter { and?: ResourceModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; - /** Filter by the object’s `builderBindingsTableId` field. */ - builderBindingsTableId?: UUIDFilter; - /** Filter by the object’s `builderBindingsTableName` field. */ - builderBindingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ @@ -21974,6 +22027,10 @@ export interface ResourceModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `serviceBindingsTableId` field. */ + serviceBindingsTableId?: UUIDFilter; + /** Filter by the object’s `serviceBindingsTableName` field. */ + serviceBindingsTableName?: StringFilter; } /** A filter to be used against `EmailSenderModule` object types. All fields are combined with a logical ‘and.’ */ export interface EmailSenderModuleFilter { diff --git a/sdk/constructive-react/src/modules/orm/mutation/index.ts b/sdk/constructive-react/src/modules/orm/mutation/index.ts index e59de99a2e..26ad9b2410 100644 --- a/sdk/constructive-react/src/modules/orm/mutation/index.ts +++ b/sdk/constructive-react/src/modules/orm/mutation/index.ts @@ -20,7 +20,7 @@ import type { import { connectionFieldsMap } from '../input-types'; /** * Variables for 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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. + * Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. */ export interface ConstructBlueprintVariables { input: ConstructBlueprintInput; diff --git a/sdk/constructive-react/src/modules/schema-types.ts b/sdk/constructive-react/src/modules/schema-types.ts index 51f5f63ec2..445015d620 100644 --- a/sdk/constructive-react/src/modules/schema-types.ts +++ b/sdk/constructive-react/src/modules/schema-types.ts @@ -534,6 +534,8 @@ export type BlueprintConstructionOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'ERROR_ASC' + | 'ERROR_DESC' | 'ID_ASC' | 'ID_DESC' | 'NATURAL' @@ -1339,6 +1341,8 @@ export type DomainModuleOrderBy = | 'DATABASE_ID_DESC' | 'DEFAULT_CAPABILITIES_ASC' | 'DEFAULT_CAPABILITIES_DESC' + | 'DEFAULT_RESERVED_SUBDOMAINS_ASC' + | 'DEFAULT_RESERVED_SUBDOMAINS_DESC' | 'DOMAINS_TABLE_ID_ASC' | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' @@ -1378,10 +1382,16 @@ export type DomainModuleOrderBy = | 'PROVISIONS_DESC' | 'PUBLIC_SCHEMA_NAME_ASC' | 'PUBLIC_SCHEMA_NAME_DESC' + | 'RESERVED_SUBDOMAINS_TABLE_ID_ASC' + | 'RESERVED_SUBDOMAINS_TABLE_ID_DESC' + | 'RESERVED_SUBDOMAINS_TABLE_NAME_ASC' + | 'RESERVED_SUBDOMAINS_TABLE_NAME_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' - | 'SCOPE_DESC'; + | 'SCOPE_DESC' + | 'SWEEP_UNVERIFIED_DOMAINS_FUNCTION_ASC' + | 'SWEEP_UNVERIFIED_DOMAINS_FUNCTION_DESC'; /** Methods to use when ordering `EmailSenderModule`. */ export type EmailSenderModuleOrderBy = | 'API_NAME_ASC' @@ -3275,10 +3285,6 @@ export type RepositoryModuleOrderBy = export type ResourceModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' - | 'BUILDER_BINDINGS_TABLE_ID_ASC' - | 'BUILDER_BINDINGS_TABLE_ID_DESC' - | 'BUILDER_BINDINGS_TABLE_NAME_ASC' - | 'BUILDER_BINDINGS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'DEFAULT_CAPABILITIES_ASC' @@ -3355,7 +3361,11 @@ export type ResourceModuleOrderBy = | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' - | 'SCOPE_DESC'; + | 'SCOPE_DESC' + | 'SERVICE_BINDINGS_TABLE_ID_ASC' + | 'SERVICE_BINDINGS_TABLE_ID_DESC' + | 'SERVICE_BINDINGS_TABLE_NAME_ASC' + | 'SERVICE_BINDINGS_TABLE_NAME_DESC'; /** Methods to use when ordering `RlsModule`. */ export type RlsModuleOrderBy = | 'API_NAME_ASC' @@ -4942,6 +4952,8 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `error` field. */ + error?: JSONFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -4969,11 +4981,13 @@ export interface BlueprintConstructionInput { createdAt?: string; /** The database the blueprint was constructed into. */ databaseId: string; + /** The coded error ({"code", "context", "class"} as raised through errors.raise_error, or {"code": , "message"} for a database error) a failed construction ended with. NULL unless status is failed. */ + error?: unknown; /** Unique identifier for this construction attempt. */ id?: string; /** The default schema used for tables that did not specify an explicit schema_name. NULL if not yet resolved. */ schemaId?: string; - /** Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. A failed construction raises and rolls back, so it leaves no row. */ + /** Execution state of this construction attempt. pending: enqueued, the blueprint:construct job has not started. constructing: the job is executing. constructed: successfully completed. failed: the job raised; the build rolled back and error carries its coded error. */ status?: string; /** Mapping of table names to created table UUIDs, populated after successful construction. Format: {"products": "uuid", "categories": "uuid", ...}. Defaults to empty object. */ tableMap?: unknown; @@ -4992,11 +5006,13 @@ export interface BlueprintConstructionPatch { createdAt?: string; /** The database the blueprint was constructed into. */ databaseId?: string; + /** The coded error ({"code", "context", "class"} as raised through errors.raise_error, or {"code": , "message"} for a database error) a failed construction ended with. NULL unless status is failed. */ + error?: unknown; /** Unique identifier for this construction attempt. */ id?: string; /** The default schema used for tables that did not specify an explicit schema_name. NULL if not yet resolved. */ schemaId?: string; - /** Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. A failed construction raises and rolls back, so it leaves no row. */ + /** Execution state of this construction attempt. pending: enqueued, the blueprint:construct job has not started. constructing: the job is executing. constructed: successfully completed. failed: the job raised; the build rolled back and error carries its coded error. */ status?: string; /** Mapping of table names to created table UUIDs, populated after successful construction. Format: {"products": "uuid", "categories": "uuid", ...}. Defaults to empty object. */ tableMap?: unknown; @@ -7745,6 +7761,8 @@ export interface DomainModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ defaultCapabilities?: StringListFilter; + /** Filter by the object’s `defaultReservedSubdomains` field. */ + defaultReservedSubdomains?: JSONFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -7785,6 +7803,10 @@ export interface DomainModuleFilter { provisions?: JSONFilter; /** Filter by the object’s `publicSchemaName` field. */ publicSchemaName?: StringFilter; + /** Filter by the object’s `reservedSubdomainsTableId` field. */ + reservedSubdomainsTableId?: UUIDFilter; + /** Filter by the object’s `reservedSubdomainsTableName` field. */ + reservedSubdomainsTableName?: StringFilter; /** Filter by the object’s `routeModules` relation. */ routeModules?: DomainModuleToManyRouteModuleFilter; /** `routeModules` exist. */ @@ -7793,6 +7815,8 @@ export interface DomainModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `sweepUnverifiedDomainsFunction` field. */ + sweepUnverifiedDomainsFunction?: StringFilter; } /** An input for mutations affecting `DomainModule` */ export interface DomainModuleInput { @@ -7800,6 +7824,7 @@ export interface DomainModuleInput { catalogModuleId?: string; databaseId: string; defaultCapabilities?: string[]; + defaultReservedSubdomains?: unknown; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -7818,8 +7843,11 @@ export interface DomainModuleInput { privateSchemaName?: string; provisions?: unknown; publicSchemaName?: string; + reservedSubdomainsTableId?: string; + reservedSubdomainsTableName?: string; schemaId?: string; scope: string; + sweepUnverifiedDomainsFunction?: string; } /** Represents an update to a `DomainModule`. Fields that are set will be updated. */ export interface DomainModulePatch { @@ -7827,6 +7855,7 @@ export interface DomainModulePatch { catalogModuleId?: string; databaseId?: string; defaultCapabilities?: string[]; + defaultReservedSubdomains?: unknown; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -7845,8 +7874,11 @@ export interface DomainModulePatch { privateSchemaName?: string; provisions?: unknown; publicSchemaName?: string; + reservedSubdomainsTableId?: string; + reservedSubdomainsTableName?: string; schemaId?: string; scope?: string; + sweepUnverifiedDomainsFunction?: string; } /** A filter to be used against many `RouteModule` object types. All fields are combined with a logical ‘and.’ */ export interface DomainModuleToManyRouteModuleFilter { @@ -12760,10 +12792,6 @@ export interface ResourceModuleFilter { and?: ResourceModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; - /** Filter by the object’s `builderBindingsTableId` field. */ - builderBindingsTableId?: UUIDFilter; - /** Filter by the object’s `builderBindingsTableName` field. */ - builderBindingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ @@ -12850,12 +12878,14 @@ export interface ResourceModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `serviceBindingsTableId` field. */ + serviceBindingsTableId?: UUIDFilter; + /** Filter by the object’s `serviceBindingsTableName` field. */ + serviceBindingsTableName?: StringFilter; } /** An input for mutations affecting `ResourceModule` */ export interface ResourceModuleInput { apiName?: string; - builderBindingsTableId?: string; - builderBindingsTableName?: string; databaseId: string; defaultCapabilities?: string[]; entityField?: string; @@ -12893,12 +12923,12 @@ export interface ResourceModuleInput { rollupResourceUsageSummaryFunction?: string; schemaId?: string; scope: string; + serviceBindingsTableId?: string; + serviceBindingsTableName?: string; } /** Represents an update to a `ResourceModule`. Fields that are set will be updated. */ export interface ResourceModulePatch { apiName?: string; - builderBindingsTableId?: string; - builderBindingsTableName?: string; databaseId?: string; defaultCapabilities?: string[]; entityField?: string; @@ -12936,6 +12966,8 @@ export interface ResourceModulePatch { rollupResourceUsageSummaryFunction?: string; schemaId?: string; scope?: string; + serviceBindingsTableId?: string; + serviceBindingsTableName?: string; } /** A filter to be used against `RlsModule` object types. All fields are combined with a logical ‘and.’ */ export interface RlsModuleFilter { @@ -17319,19 +17351,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -17888,6 +17922,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -17897,6 +17933,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -17910,7 +17952,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -17925,7 +17967,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -17953,7 +17995,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -17968,13 +18010,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -17992,17 +18034,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -18075,7 +18117,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -18086,7 +18128,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -18104,10 +18146,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-react/src/modules/types.ts b/sdk/constructive-react/src/modules/types.ts index 7f47bb07b1..b581829edf 100644 --- a/sdk/constructive-react/src/modules/types.ts +++ b/sdk/constructive-react/src/modules/types.ts @@ -226,6 +226,7 @@ export interface BlueprintConstruction { constructedDefinition: unknown | null; createdAt: string | null; databaseId: string | null; + error: unknown | null; id: string | null; schemaId: string | null; status: string | null; @@ -604,6 +605,7 @@ export interface DomainModule { catalogModuleId: string | null; databaseId: string | null; defaultCapabilities: string[] | null; + defaultReservedSubdomains: unknown | null; domainEventsTableId: string | null; domainEventsTableName: string | null; domainVerificationsTableId: string | null; @@ -622,8 +624,11 @@ export interface DomainModule { privateSchemaName: string | null; provisions: unknown | null; publicSchemaName: string | null; + reservedSubdomainsTableId: string | null; + reservedSubdomainsTableName: string | null; schemaId: string | null; scope: string | null; + sweepUnverifiedDomainsFunction: string | null; } export interface EmailSenderModule { apiName: string | null; @@ -1551,8 +1556,6 @@ export interface RepositoryModule { } export interface ResourceModule { apiName: string | null; - builderBindingsTableId: string | null; - builderBindingsTableName: string | null; databaseId: string | null; defaultCapabilities: string[] | null; entityField: string | null; @@ -1590,6 +1593,8 @@ export interface ResourceModule { rollupResourceUsageSummaryFunction: string | null; schemaId: string | null; scope: string | null; + serviceBindingsTableId: string | null; + serviceBindingsTableName: string | null; } export interface RlsModule { apiName: string | null; diff --git a/sdk/constructive-react/src/objects/schema-types.ts b/sdk/constructive-react/src/objects/schema-types.ts index d5780ec824..38c5f74a48 100644 --- a/sdk/constructive-react/src/objects/schema-types.ts +++ b/sdk/constructive-react/src/objects/schema-types.ts @@ -596,19 +596,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -667,6 +669,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -676,6 +680,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -689,7 +699,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -704,7 +714,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -732,7 +742,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -747,13 +757,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -771,17 +781,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -854,7 +864,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -865,7 +875,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -883,10 +893,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-react/src/remote/README.md b/sdk/constructive-react/src/remote/README.md index 14fcdccd0f..62a6bee69e 100644 --- a/sdk/constructive-react/src/remote/README.md +++ b/sdk/constructive-react/src/remote/README.md @@ -9,7 +9,7 @@ ## Overview - **Tables:** 3 -- **Custom queries:** 0 +- **Custom queries:** 1 - **Custom mutations:** 2 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/remote/hooks/README.md b/sdk/constructive-react/src/remote/hooks/README.md index 033ddc00a8..9eceb618a2 100644 --- a/sdk/constructive-react/src/remote/hooks/README.md +++ b/sdk/constructive-react/src/remote/hooks/README.md @@ -47,6 +47,7 @@ function App() { | `useCreateMachineSessionMutation` | Mutation | Command or terminal sessions running on an enrolled machine | | `useUpdateMachineSessionMutation` | Mutation | Command or terminal sessions running on an enrolled machine | | `useDeleteMachineSessionMutation` | Mutation | Command or terminal sessions running on an enrolled machine | +| `useCurrentDatabaseIdQuery` | Query | currentDatabaseId | | `useMachinesEnrollMutation` | Mutation | machinesEnroll | | `useProvisionBucketMutation` | Mutation | Reconcile an S3 bucket for a logical bucket in the database. Records the request on the bucket row via RLS; the bucket's job @@ -122,6 +123,13 @@ create({ agentMode: '', agentSessionRef: '', args: '', c ## Custom Operation Hooks +### `useCurrentDatabaseIdQuery` + +currentDatabaseId + +- **Type:** query +- **Arguments:** none + ### `useMachinesEnrollMutation` machinesEnroll diff --git a/sdk/constructive-react/src/remote/hooks/queries/index.ts b/sdk/constructive-react/src/remote/hooks/queries/index.ts index 43a5062bf0..06021972fc 100644 --- a/sdk/constructive-react/src/remote/hooks/queries/index.ts +++ b/sdk/constructive-react/src/remote/hooks/queries/index.ts @@ -9,3 +9,4 @@ export * from './useMachineMessagesQuery'; export * from './useMachineMessageQuery'; export * from './useMachineSessionsQuery'; export * from './useMachineSessionQuery'; +export * from './useCurrentDatabaseIdQuery'; diff --git a/sdk/constructive-react/src/remote/hooks/queries/useCurrentDatabaseIdQuery.ts b/sdk/constructive-react/src/remote/hooks/queries/useCurrentDatabaseIdQuery.ts new file mode 100644 index 0000000000..ba46df079d --- /dev/null +++ b/sdk/constructive-react/src/remote/hooks/queries/useCurrentDatabaseIdQuery.ts @@ -0,0 +1,90 @@ +/** + * Custom query hook for currentDatabaseId + * @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'; +/** Query key factory - re-exported from query-keys.ts */ +export const currentDatabaseIdQueryKey = customQueryKeys.currentDatabaseId; +/** + * Query hook for currentDatabaseId + * + * @example + * ```tsx + * const { data, isLoading } = useCurrentDatabaseIdQuery(); + * + * if (data?.currentDatabaseId) { + * console.log(data.currentDatabaseId); + * } + * ``` + */ +export function useCurrentDatabaseIdQuery< + TData = { + currentDatabaseId: string | null; + }, +>( + params?: Omit< + UseQueryOptions< + { + currentDatabaseId: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useCurrentDatabaseIdQuery< + TData = { + currentDatabaseId: string | null; + }, +>( + params?: Omit< + UseQueryOptions< + { + currentDatabaseId: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const queryOptions = params ?? {}; + return useQuery({ + queryKey: currentDatabaseIdQueryKey(), + queryFn: () => getClient().query.currentDatabaseId().unwrap(), + ...queryOptions, + }); +} +/** + * Fetch currentDatabaseId without React hooks + * + * @example + * ```ts + * const data = await fetchCurrentDatabaseIdQuery(); + * ``` + */ +export async function fetchCurrentDatabaseIdQuery() { + return getClient().query.currentDatabaseId().unwrap(); +} +/** + * Prefetch currentDatabaseId for SSR or cache warming + * + * @example + * ```ts + * await prefetchCurrentDatabaseIdQuery(queryClient); + * ``` + */ +export async function prefetchCurrentDatabaseIdQuery(queryClient: QueryClient): Promise { + await queryClient.prefetchQuery({ + queryKey: currentDatabaseIdQueryKey(), + queryFn: () => getClient().query.currentDatabaseId().unwrap(), + }); +} diff --git a/sdk/constructive-react/src/remote/hooks/query-keys.ts b/sdk/constructive-react/src/remote/hooks/query-keys.ts index 371a742682..ff5492f281 100644 --- a/sdk/constructive-react/src/remote/hooks/query-keys.ts +++ b/sdk/constructive-react/src/remote/hooks/query-keys.ts @@ -46,6 +46,14 @@ export const machineSessionKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...machineSessionKeys.details(), id] as const, } as const; + +// ============================================================================ +// Custom Query Keys +// ============================================================================ + +export const customQueryKeys = { + /** Query key for currentDatabaseId */ currentDatabaseId: () => ['currentDatabaseId'] as const, +} as const; /** // ============================================================================ @@ -72,6 +80,7 @@ export const queryKeys = { machine: machineKeys, machineMessage: machineMessageKeys, machineSession: machineSessionKeys, + custom: customQueryKeys, } as const; /** Type representing all available query key scopes */ export type QueryKeyScope = keyof typeof queryKeys; diff --git a/sdk/constructive-react/src/remote/orm/README.md b/sdk/constructive-react/src/remote/orm/README.md index eb2fdd09aa..b76819b71e 100644 --- a/sdk/constructive-react/src/remote/orm/README.md +++ b/sdk/constructive-react/src/remote/orm/README.md @@ -169,6 +169,17 @@ const deleted = await db.machineSession.delete({ where: { id: '' } }).exec ## Custom Operations +### `db.query.currentDatabaseId` + +currentDatabaseId + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.currentDatabaseId().execute(); +``` + ### `db.mutation.machinesEnroll` machinesEnroll diff --git a/sdk/constructive-react/src/remote/orm/index.ts b/sdk/constructive-react/src/remote/orm/index.ts index e166dd236a..554ce59ad1 100644 --- a/sdk/constructive-react/src/remote/orm/index.ts +++ b/sdk/constructive-react/src/remote/orm/index.ts @@ -8,12 +8,14 @@ import type { OrmClientConfig } from './client'; import { MachineModel } from './models/machine'; import { MachineMessageModel } from './models/machineMessage'; import { MachineSessionModel } from './models/machineSession'; +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 @@ -44,6 +46,7 @@ export function createClient(config: OrmClientConfig) { machine: new MachineModel(client), machineMessage: new MachineMessageModel(client), machineSession: new MachineSessionModel(client), + query: createQueryOperations(client), mutation: createMutationOperations(client), }; } diff --git a/sdk/constructive-react/src/remote/orm/query/index.ts b/sdk/constructive-react/src/remote/orm/query/index.ts new file mode 100644 index 0000000000..901e0de080 --- /dev/null +++ b/sdk/constructive-react/src/remote/orm/query/index.ts @@ -0,0 +1,32 @@ +/** + * 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'; +export function createQueryOperations(client: OrmClient) { + return { + currentDatabaseId: (options?: { select?: Record }) => + new QueryBuilder<{ + currentDatabaseId: string | null; + }>({ + client, + operation: 'query', + operationName: 'CurrentDatabaseId', + fieldName: 'currentDatabaseId', + ...buildCustomDocument( + 'query', + 'CurrentDatabaseId', + 'currentDatabaseId', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), + }; +} diff --git a/sdk/constructive-react/src/remote/schema-types.ts b/sdk/constructive-react/src/remote/schema-types.ts index 0ece215dde..a9ffca9b26 100644 --- a/sdk/constructive-react/src/remote/schema-types.ts +++ b/sdk/constructive-react/src/remote/schema-types.ts @@ -695,19 +695,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -754,6 +756,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -763,6 +767,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -776,7 +786,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -791,7 +801,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -819,7 +829,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -834,13 +844,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -858,17 +868,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -941,7 +951,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -952,7 +962,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -970,10 +980,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-react/src/storage/schema-types.ts b/sdk/constructive-react/src/storage/schema-types.ts index 4014d60858..9c72e65e1d 100644 --- a/sdk/constructive-react/src/storage/schema-types.ts +++ b/sdk/constructive-react/src/storage/schema-types.ts @@ -1154,19 +1154,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -1239,6 +1241,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -1248,6 +1252,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -1261,7 +1271,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -1276,7 +1286,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -1304,7 +1314,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -1319,13 +1329,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -1343,17 +1353,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -1426,7 +1436,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -1437,7 +1447,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -1455,10 +1465,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-react/src/usage/schema-types.ts b/sdk/constructive-react/src/usage/schema-types.ts index b42936303d..73c5d05042 100644 --- a/sdk/constructive-react/src/usage/schema-types.ts +++ b/sdk/constructive-react/src/usage/schema-types.ts @@ -2309,19 +2309,21 @@ export interface MetaTable { constraints: MetaConstraints; fields: MetaField[]; foreignKeyConstraints: MetaForeignKeyConstraint[]; - /** i18n metadata (null if no @i18n tag) */ + /** i18n metadata (null if the table is not translatable) */ i18n?: MetaI18n | null; indexes: MetaIndex[]; inflection: MetaInflection; + /** Whether this table only links rows of two other tables; the link appears in their manyToMany relations */ + isJunction: boolean; /** Final GraphQL output type name */ name: string; primaryKeyConstraints: MetaPrimaryKeyConstraint[]; query: MetaQuery; - /** Realtime metadata (null if no @realtime tag) */ + /** Realtime metadata (null if the table has no change subscriptions) */ realtime?: MetaRealtime | null; relations: MetaRelations; schemaName: string; - /** Provisioning scope metadata (null if no @scope tag) */ + /** Provisioning scope metadata (null if the table has no scope) */ scope?: MetaScope | null; /** Search metadata (null if no search configured) */ search?: MetaSearch | null; @@ -2458,6 +2460,8 @@ export interface MetaConstraints { } /** Information about a table field/column */ export interface MetaField { + /** Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. */ + allowedValues?: string[] | null; /** PostgreSQL column name */ columnName: string; description?: string | null; @@ -2467,6 +2471,12 @@ export interface MetaField { isForeignKey: boolean; isNotNull: boolean; isPrimaryKey: boolean; + /** Whether a create must provide this field. Set on a table's own fields only. */ + isRequiredOnCreate?: boolean | null; + /** Whether a create may set this field. Set on a table's own fields only. */ + isWritableOnCreate?: boolean | null; + /** Whether an update may change this field. Set on a table's own fields only. */ + isWritableOnUpdate?: boolean | null; /** Final GraphQL field name */ name: string; type: MetaType; @@ -2480,7 +2490,7 @@ export interface MetaForeignKeyConstraint { referencedFields: string[]; referencedTable: string; } -/** i18n metadata for a table with @i18n tag */ +/** i18n metadata for a translatable table */ export interface MetaI18n { /** Fields that are translatable */ translatableFields: MetaI18nField[]; @@ -2495,7 +2505,7 @@ export interface MetaIndex { isUnique: boolean; name: string; } -/** Table inflection names */ +/** Type and field names generated for this table */ export interface MetaInflection { allRows: string; conditionType: string; @@ -2523,7 +2533,7 @@ export interface MetaQuery { one?: string | null; update?: string | null; } -/** Realtime metadata for a table with @realtime tag */ +/** Realtime metadata for a table with change subscriptions */ export interface MetaRealtime { /** The generated subscription field name (e.g. onPostChanged) */ subscriptionFieldName: string; @@ -2538,13 +2548,13 @@ export interface MetaRelations { } /** Provisioning scope metadata for a table */ export interface MetaScope { - /** SQL name of the entity table for entity scopes, else null */ + /** Name of the entity table for entity scopes, else null */ entityTable?: string | null; - /** Inflected scope key column (e.g. databaseId, orgId), null for global tiers */ + /** Field name of the scope key (e.g. databaseId, orgId), null for global tiers */ keyColumn?: string | null; /** Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') */ scope: string; - /** Provenance of the scope metadata (always 'smartTag') */ + /** Where this scope metadata comes from */ source: string; /** Coarse bucket: 'global', 'database', or 'entity' */ tier: string; @@ -2562,17 +2572,17 @@ export interface MetaSearch { } /** Storage metadata for a table */ export interface MetaStorage { - /** GraphQL type name of the plane's buckets table */ + /** GraphQL type name of the paired buckets table */ bucketsType: string; /** Computed download-URL field on the files type; null on the buckets side */ downloadUrlField?: string | null; - /** GraphQL type name of the plane's files table */ + /** GraphQL type name of the paired files table */ filesType: string; /** Whether this table is a storage buckets table */ isBucketsTable: boolean; /** Whether this table is a storage files table */ isFilesTable: boolean; - /** The plane's GraphQL upload surface */ + /** Upload mutations and types for this storage */ upload: MetaStorageUpload; } /** Information about a unique constraint */ @@ -2645,7 +2655,7 @@ export interface MetaSearchColumn { /** Column name (camelCase) */ name: string; } -/** Per-table search configuration from @searchConfig smart tag */ +/** Per-table search configuration */ export interface MetaSearchConfig { /** Exponential decay factor per day */ boostRecencyDecay?: number | null; @@ -2656,7 +2666,7 @@ export interface MetaSearchConfig { /** JSON-encoded per-adapter score weights */ weights?: string | null; } -/** The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from */ +/** The upload mutations and types for a storage table pair */ export interface MetaStorageUpload { /** Per-file input type inside the bulk input */ bulkFileInputType: string; @@ -2674,10 +2684,10 @@ export interface MetaStorageUpload { mutation: string; /** Payload type of the single upload mutation */ payloadType: string; - /** Whether the upload input requires ownerId (entity-keyed plane) */ + /** Whether the upload input requires ownerId */ requiresOwnerId: boolean; } -/** How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. */ +/** How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. */ export interface MetaScalarEncoding { /** For 'vector': declared length, else null. */ dimensions?: number | null; diff --git a/sdk/constructive-sdk/schemas/admin.graphql b/sdk/constructive-sdk/schemas/admin.graphql index 6bdd4ad99b..0966c06711 100644 --- a/sdk/constructive-sdk/schemas/admin.graphql +++ b/sdk/constructive-sdk/schemas/admin.graphql @@ -3802,6 +3802,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -3813,6 +3818,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -3837,7 +3855,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -3864,7 +3882,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -3909,7 +3927,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -3930,7 +3948,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -3961,11 +3979,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -3974,7 +3992,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -4005,7 +4023,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -4022,7 +4040,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -4030,7 +4048,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -4039,13 +4057,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -4071,7 +4087,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -4081,22 +4097,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" diff --git a/sdk/constructive-sdk/schemas/agent.graphql b/sdk/constructive-sdk/schemas/agent.graphql index bb8461a2b1..601d99c99b 100644 --- a/sdk/constructive-sdk/schemas/agent.graphql +++ b/sdk/constructive-sdk/schemas/agent.graphql @@ -5870,6 +5870,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -5881,6 +5886,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -5905,7 +5923,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -5932,7 +5950,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -5977,7 +5995,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -5998,7 +6016,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -6029,11 +6047,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -6042,7 +6060,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -6073,7 +6091,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -6090,7 +6108,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -6098,7 +6116,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -6107,13 +6125,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -6139,7 +6155,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -6149,22 +6165,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" diff --git a/sdk/constructive-sdk/schemas/api.graphql b/sdk/constructive-sdk/schemas/api.graphql index bb6ff2a4e3..5cc90c76b8 100644 --- a/sdk/constructive-sdk/schemas/api.graphql +++ b/sdk/constructive-sdk/schemas/api.graphql @@ -97,9 +97,6 @@ type Api { """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""" @@ -224,9 +221,6 @@ input ApiFilter { """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 @@ -260,9 +254,6 @@ input ApiInput { """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""" @@ -286,8 +277,6 @@ enum ApiOrderBy { CREATED_AT_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DBNAME_ASC - DBNAME_DESC ID_ASC ID_DESC IS_PUBLISHED_ASC @@ -314,9 +303,6 @@ input ApiPatch { """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""" @@ -2834,22 +2820,6 @@ type CreateFullTextSearchPayload { query: Query } -"""Author a function from its `CREATE FUNCTION` source text.""" -input CreateFunctionFromSourceInput { - apiExposed: Boolean = false - - """ - 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! - schemaId: UUID! - - """One `CREATE FUNCTION` statement (LANGUAGE plpgsql or sql).""" - source: String! -} - """All input for the create `Function` mutation.""" input CreateFunctionInput { """ @@ -3517,6 +3487,41 @@ type CreatePlatformPagePayload { query: Query } +"""All input for the create `PlatformReservedSubdomain` mutation.""" +input CreatePlatformReservedSubdomainInput { + """ + 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 `PlatformReservedSubdomain` to be created by this mutation.""" + platformReservedSubdomain: PlatformReservedSubdomainInput! +} + +"""The output of our create `PlatformReservedSubdomain` mutation.""" +type CreatePlatformReservedSubdomainPayload { + """ + 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 `PlatformReservedSubdomain` that was created by this mutation.""" + platformReservedSubdomain: PlatformReservedSubdomain + + """An edge for our `PlatformReservedSubdomain`. May be used by Relay 1.""" + platformReservedSubdomainEdge( + """The method to use when ordering `PlatformReservedSubdomain`.""" + orderBy: [PlatformReservedSubdomainOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformReservedSubdomainEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `PlatformSiteAppLink` mutation.""" input CreatePlatformSiteAppLinkInput { """ @@ -9271,6 +9276,39 @@ type DeletePlatformPagePayload { query: Query } +"""All input for the `deletePlatformReservedSubdomain` mutation.""" +input DeletePlatformReservedSubdomainInput { + """ + 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 `PlatformReservedSubdomain` mutation.""" +type DeletePlatformReservedSubdomainPayload { + """ + 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 `PlatformReservedSubdomain` that was deleted by this mutation.""" + platformReservedSubdomain: PlatformReservedSubdomain + + """An edge for our `PlatformReservedSubdomain`. May be used by Relay 1.""" + platformReservedSubdomainEdge( + """The method to use when ordering `PlatformReservedSubdomain`.""" + orderBy: [PlatformReservedSubdomainOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformReservedSubdomainEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `deletePlatformSiteAppLink` mutation.""" input DeletePlatformSiteAppLinkInput { """ @@ -15817,6 +15855,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -15828,6 +15871,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -15852,7 +15908,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -15879,7 +15935,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -15924,7 +15980,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -15945,7 +16001,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -15976,11 +16032,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -15989,7 +16045,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -16020,7 +16076,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -16037,7 +16093,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -16045,7 +16101,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -16054,13 +16110,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -16086,7 +16140,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -16096,22 +16150,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" @@ -16415,14 +16474,6 @@ type Mutation { input: CreateFunctionInput! ): CreateFunctionPayload - """Creates a `Function` from its `CREATE FUNCTION` source text.""" - createFunctionFromSource( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateFunctionFromSourceInput! - ): CreateFunctionPayload - """Creates a single `IdentityProviderRegistry`.""" createIdentityProviderRegistry( """ @@ -16567,6 +16618,14 @@ type Mutation { input: CreatePlatformPageInput! ): CreatePlatformPagePayload + """Creates a single `PlatformReservedSubdomain`.""" + createPlatformReservedSubdomain( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlatformReservedSubdomainInput! + ): CreatePlatformReservedSubdomainPayload + """Creates a single `PlatformSite`.""" createPlatformSite( """ @@ -17247,6 +17306,14 @@ type Mutation { input: DeletePlatformPageInput! ): DeletePlatformPagePayload + """Deletes a single `PlatformReservedSubdomain` using a unique key.""" + deletePlatformReservedSubdomain( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlatformReservedSubdomainInput! + ): DeletePlatformReservedSubdomainPayload + """Deletes a single `PlatformSite` using a unique key.""" deletePlatformSite( """ @@ -17965,16 +18032,6 @@ type Mutation { input: UpdateFunctionInput! ): UpdateFunctionPayload - """ - Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. - """ - updateFunctionFromSource( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateFunctionFromSourceInput! - ): UpdateFunctionPayload - """ Updates a single `IdentityProviderRegistry` using a unique key and a patch. """ @@ -18131,6 +18188,16 @@ type Mutation { input: UpdatePlatformPageInput! ): UpdatePlatformPagePayload + """ + Updates a single `PlatformReservedSubdomain` using a unique key and a patch. + """ + updatePlatformReservedSubdomain( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlatformReservedSubdomainInput! + ): UpdatePlatformReservedSubdomainPayload + """Updates a single `PlatformSite` using a unique key and a patch.""" updatePlatformSite( """ @@ -19101,9 +19168,6 @@ type PlatformApi { """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""" @@ -19198,9 +19262,6 @@ input PlatformApiFilter { """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 @@ -19249,9 +19310,6 @@ input PlatformApiInput { """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""" @@ -19273,8 +19331,6 @@ enum PlatformApiOrderBy { CONFIG_DESC CREATED_AT_ASC CREATED_AT_DESC - DBNAME_ASC - DBNAME_DESC ID_ASC ID_DESC IS_PUBLISHED_ASC @@ -19300,9 +19356,6 @@ input PlatformApiPatch { """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""" @@ -22591,6 +22644,151 @@ type PlatformProvisionSitePreviewPayload { result: PlatformRoute } +"""Subdomain labels no tenant may claim under a platform apex""" +type PlatformReservedSubdomain { + createdAt: Datetime + createdByPrincipal: UUID + id: UUID! + + """Lowercase subdomain label, or the label prefix/suffix the match names""" + label: String! + + """How the label matches a claimed label: exact, prefix or suffix""" + match: String! + + """Why the label is reserved (free text, e.g. platform, brand, lookalike)""" + reason: String + updatedAt: Datetime + updatedByPrincipal: UUID +} + +"""A connection to a list of `PlatformReservedSubdomain` values.""" +type PlatformReservedSubdomainConnection { + """ + A list of edges which contains the `PlatformReservedSubdomain` and cursor to aid in pagination. + """ + edges: [PlatformReservedSubdomainEdge]! + + """A list of `PlatformReservedSubdomain` objects.""" + nodes: [PlatformReservedSubdomain]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `PlatformReservedSubdomain` you could get from the connection. + """ + totalCount: Int! +} + +"""A `PlatformReservedSubdomain` edge in the connection.""" +type PlatformReservedSubdomainEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PlatformReservedSubdomain` at the end of the edge.""" + node: PlatformReservedSubdomain +} + +""" +A filter to be used against `PlatformReservedSubdomain` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformReservedSubdomainFilter { + """Checks for all expressions in this list.""" + and: [PlatformReservedSubdomainFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `createdByPrincipal` field.""" + createdByPrincipal: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `label` field.""" + label: StringFilter + + """Filter by the object’s `match` field.""" + match: StringFilter + + """Negates the expression.""" + not: PlatformReservedSubdomainFilter + + """Checks for any expressions in this list.""" + or: [PlatformReservedSubdomainFilter!] + + """Filter by the object’s `reason` field.""" + reason: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `updatedByPrincipal` field.""" + updatedByPrincipal: UUIDFilter +} + +"""An input for mutations affecting `PlatformReservedSubdomain`""" +input PlatformReservedSubdomainInput { + createdAt: Datetime + createdByPrincipal: UUID + id: UUID + + """Lowercase subdomain label, or the label prefix/suffix the match names""" + label: String! + + """How the label matches a claimed label: exact, prefix or suffix""" + match: String + + """Why the label is reserved (free text, e.g. platform, brand, lookalike)""" + reason: String + updatedAt: Datetime + updatedByPrincipal: UUID +} + +"""Methods to use when ordering `PlatformReservedSubdomain`.""" +enum PlatformReservedSubdomainOrderBy { + CREATED_AT_ASC + CREATED_AT_DESC + CREATED_BY_PRINCIPAL_ASC + CREATED_BY_PRINCIPAL_DESC + ID_ASC + ID_DESC + LABEL_ASC + LABEL_DESC + MATCH_ASC + MATCH_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + REASON_ASC + REASON_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + UPDATED_BY_PRINCIPAL_ASC + UPDATED_BY_PRINCIPAL_DESC +} + +""" +Represents an update to a `PlatformReservedSubdomain`. Fields that are set will be updated. +""" +input PlatformReservedSubdomainPatch { + createdAt: Datetime + createdByPrincipal: UUID + id: UUID + + """Lowercase subdomain label, or the label prefix/suffix the match names""" + label: String + + """How the label matches a claimed label: exact, prefix or suffix""" + match: String + + """Why the label is reserved (free text, e.g. platform, brand, lookalike)""" + reason: String + updatedAt: Datetime + updatedByPrincipal: UUID +} + """Routes binding a domain hostname and path to a typed catalog target""" type PlatformRoute { """ @@ -25711,7 +25909,6 @@ type Query { Metadata about the database schema, including tables, fields, indexes, and constraints. Useful for code generation tools. """ _meta: MetaSchema - apiSchemaNames(targetApiId: UUID): JSON """Reads and enables pagination through a set of `ApiSchema`.""" apiSchemas( @@ -27118,6 +27315,37 @@ type Query { where: PlatformPageFilter ): PlatformPageConnection + """ + Reads and enables pagination through a set of `PlatformReservedSubdomain`. + """ + platformReservedSubdomains( + """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 `PlatformReservedSubdomain`.""" + orderBy: [PlatformReservedSubdomainOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlatformReservedSubdomainFilter + ): PlatformReservedSubdomainConnection + """Reads and enables pagination through a set of `PlatformSiteAppLink`.""" platformSiteAppLinks( """Read all values in the set after (below) this cursor.""" @@ -27497,9 +27725,6 @@ type Query { """ where: RedirectFilter ): RedirectConnection - resolveDeepLink(linkSlug: String, targetSiteId: UUID): JSON - resolveRoute(requestHost: String, requestMethod: String, requestPath: String): ResolveRouteRecord - resolveSiteAppLinks(targetSiteId: UUID): JSON """Reads and enables pagination through a set of `RlsSetting`.""" rlsSettings( @@ -28609,26 +28834,6 @@ type RequestDatabasePayload { result: DatabaseProvisionModule } -type ResolveRouteRecord { - domainId: UUID - hostname: String - matchedPath: String - matchedWildcard: Boolean - method: String - priority: Int - resolvedConfig: JSON - routeBindingId: UUID - servingLane: String - targetCatalogId: UUID - targetModule: String - targetOwnerKey: UUID - targetOwnerScope: String - targetSourceId: UUID - tlsSecretName: String - tlsStatus: String - verificationStatus: String -} - """ RLS module runtime configuration; typed references to the authenticate/current_role function plumbing """ @@ -36551,21 +36756,6 @@ type UpdateFullTextSearchPayload { query: Query } -""" -Replace a function's definition from its `CREATE FUNCTION` source text. -""" -input UpdateFunctionFromSourceInput { - """ - 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! - - """One `CREATE FUNCTION` statement (LANGUAGE plpgsql or sql).""" - source: String! -} - """All input for the `updateFunction` mutation.""" input UpdateFunctionInput { """ @@ -37294,6 +37484,44 @@ type UpdatePlatformPagePayload { query: Query } +"""All input for the `updatePlatformReservedSubdomain` mutation.""" +input UpdatePlatformReservedSubdomainInput { + """ + 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 `PlatformReservedSubdomain` being updated. + """ + platformReservedSubdomainPatch: PlatformReservedSubdomainPatch! +} + +"""The output of our update `PlatformReservedSubdomain` mutation.""" +type UpdatePlatformReservedSubdomainPayload { + """ + 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 `PlatformReservedSubdomain` that was updated by this mutation.""" + platformReservedSubdomain: PlatformReservedSubdomain + + """An edge for our `PlatformReservedSubdomain`. May be used by Relay 1.""" + platformReservedSubdomainEdge( + """The method to use when ordering `PlatformReservedSubdomain`.""" + orderBy: [PlatformReservedSubdomainOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformReservedSubdomainEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updatePlatformSiteAppLink` mutation.""" input UpdatePlatformSiteAppLinkInput { """ diff --git a/sdk/constructive-sdk/schemas/auth.graphql b/sdk/constructive-sdk/schemas/auth.graphql index 4120afd62b..67cd10a26d 100644 --- a/sdk/constructive-sdk/schemas/auth.graphql +++ b/sdk/constructive-sdk/schemas/auth.graphql @@ -2250,6 +2250,42 @@ type EnableTotpPayload { result: String } +"""All input for the `exchangeNativeHandoff` mutation.""" +input ExchangeNativeHandoffInput { + """ + 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 + code: String + codeVerifier: String + credentialKind: String +} + +"""The output of our `exchangeNativeHandoff` mutation.""" +type ExchangeNativeHandoffPayload { + """ + 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: ExchangeNativeHandoffRecord +} + +type ExchangeNativeHandoffRecord { + accessToken: String + accessTokenExpiresAt: Datetime + id: UUID + isVerified: Boolean + totpEnabled: Boolean + userId: UUID +} + """All input for the `extendTokenExpires` mutation.""" input ExtendTokenExpiresInput { amount: IntervalInput @@ -2761,6 +2797,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -2772,6 +2813,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -2796,7 +2850,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -2823,7 +2877,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -2868,7 +2922,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -2889,7 +2943,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -2920,11 +2974,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -2933,7 +2987,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -2964,7 +3018,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -2981,7 +3035,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -2989,7 +3043,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -2998,13 +3052,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -3030,7 +3082,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -3040,22 +3092,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" @@ -3158,6 +3215,10 @@ type Mutation { """ input: ConfirmTotpSetupInput! ): ConfirmTotpSetupPayload + + """ + Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key. + """ createApiKey( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -3392,6 +3453,12 @@ type Mutation { """ input: EnableTotpInput! ): EnableTotpPayload + exchangeNativeHandoff( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: ExchangeNativeHandoffInput! + ): ExchangeNativeHandoffPayload extendTokenExpires( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -4930,6 +4997,7 @@ type Query { """ where: RoleTypeFilter ): RoleTypeConnection + signInOptions: SignInOptionsRecord """Reads and enables pagination through a set of `UserConnectedAccount`.""" userConnectedAccounts( @@ -5146,7 +5214,9 @@ input RequestMagicLinkInput { payload verbatim. May be used to track mutations by the client. """ clientMutationId: String + codeChallenge: String email: String + nativeRedirectUri: String next: String } @@ -5503,6 +5573,7 @@ input SetPasswordInput { clientMutationId: String currentPassword: String newPassword: String + signOutOtherSessions: Boolean } """The output of our `setPassword` mutation.""" @@ -5658,13 +5729,36 @@ type SignInMagicLinkPayload { type SignInMagicLinkRecord { accessToken: String accessTokenExpiresAt: Datetime + codeChallenge: String deviceApprovalRequired: Boolean mfaChallengeToken: String mfaRequired: Boolean + nativeRedirectUri: String outDeviceToken: String userId: UUID } +type SignInOptionsRecord { + allowAnonymousSessions: Boolean + allowEmailOtpSignIn: Boolean + allowIdentitySignIn: Boolean + allowIdentitySignUp: Boolean + allowMagicLinkSignIn: Boolean + allowMagicLinkSignUp: Boolean + allowPasswordSignIn: Boolean + allowPasswordSignUp: Boolean + allowSignUp: Boolean + allowSmsSignIn: Boolean + allowSmsSignUp: Boolean + allowWebauthnSignIn: Boolean + allowWebauthnSignUp: Boolean + allowWebauthnUsernameless: Boolean + enableCaptcha: Boolean + identityProviders: JSON + requireMfa: Boolean + signUpRequiresInvite: Boolean +} + """The output of our `signIn` mutation.""" type SignInPayload { """ @@ -5801,6 +5895,8 @@ type SignUpMagicLinkPayload { type SignUpMagicLinkRecord { accessToken: String accessTokenExpiresAt: Datetime + codeChallenge: String + nativeRedirectUri: String outDeviceToken: String userId: UUID } diff --git a/sdk/constructive-sdk/schemas/cluster.graphql b/sdk/constructive-sdk/schemas/cluster.graphql index 10a94a76bd..dadc8ab984 100644 --- a/sdk/constructive-sdk/schemas/cluster.graphql +++ b/sdk/constructive-sdk/schemas/cluster.graphql @@ -34,6 +34,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -45,6 +50,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -69,7 +87,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -96,7 +114,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -141,7 +159,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -162,7 +180,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -193,11 +211,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -206,7 +224,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -237,7 +255,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -254,7 +272,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -262,7 +280,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -271,13 +289,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -303,7 +319,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -313,22 +329,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" diff --git a/sdk/constructive-sdk/schemas/compute.graphql b/sdk/constructive-sdk/schemas/compute.graphql index e91946b76c..23cf92bb11 100644 --- a/sdk/constructive-sdk/schemas/compute.graphql +++ b/sdk/constructive-sdk/schemas/compute.graphql @@ -1013,255 +1013,6 @@ input BuildStepPatch { summary: JSON } -""" -Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST -""" -type BuilderBinding { - createdAt: Datetime - createdBy: UUID - createdByPrincipal: UUID - - """Database that owns this resource (database-scoped isolation)""" - databaseId: UUID! - id: UUID! - - """ - BuildKit resource installation serving this binding; may belong to another resource scope - """ - installationId: UUID! - - """Most recent projection failure""" - lastError: String - - """Reconciler detail (projection timestamps and diagnostics)""" - metadata: JSON - - """Reads a single `Namespace` that is related to this `BuilderBinding`.""" - namespace: Namespace - - """Namespace whose builds use this BuildKit installation""" - namespaceId: UUID! - - """ - BuildKit address last projected into the namespace (NULL = never projected) - """ - observedHost: String - - """Lane this binding applies to (NULL = the scope's default lane)""" - realm: String - - """Projection state of BUILDKIT_HOST: pending, active, failed""" - status: String! - updatedAt: Datetime - updatedBy: UUID - updatedByPrincipal: UUID -} - -"""A connection to a list of `BuilderBinding` values.""" -type BuilderBindingConnection { - """ - A list of edges which contains the `BuilderBinding` and cursor to aid in pagination. - """ - edges: [BuilderBindingEdge]! - - """A list of `BuilderBinding` objects.""" - nodes: [BuilderBinding]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """The count of *all* `BuilderBinding` you could get from the connection.""" - totalCount: Int! -} - -"""A `BuilderBinding` edge in the connection.""" -type BuilderBindingEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `BuilderBinding` at the end of the edge.""" - node: BuilderBinding -} - -""" -A filter to be used against `BuilderBinding` object types. All fields are combined with a logical ‘and.’ -""" -input BuilderBindingFilter { - """Checks for all expressions in this list.""" - and: [BuilderBindingFilter!] - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `createdBy` field.""" - createdBy: UUIDFilter - - """Filter by the object’s `createdByPrincipal` field.""" - createdByPrincipal: UUIDFilter - - """Filter by the object’s `databaseId` field.""" - databaseId: UUIDFilter - - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `installationId` field.""" - installationId: UUIDFilter - - """Filter by the object’s `lastError` field.""" - lastError: StringFilter - - """Filter by the object’s `metadata` field.""" - metadata: JSONFilter - - """Filter by the object’s `namespace` relation.""" - namespace: NamespaceFilter - - """Filter by the object’s `namespaceId` field.""" - namespaceId: UUIDFilter - - """Negates the expression.""" - not: BuilderBindingFilter - - """Filter by the object’s `observedHost` field.""" - observedHost: StringFilter - - """Checks for any expressions in this list.""" - or: [BuilderBindingFilter!] - - """Filter by the object’s `realm` field.""" - realm: StringFilter - - """Filter by the object’s `status` field.""" - status: StringFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter - - """Filter by the object’s `updatedBy` field.""" - updatedBy: UUIDFilter - - """Filter by the object’s `updatedByPrincipal` field.""" - updatedByPrincipal: UUIDFilter -} - -"""An input for mutations affecting `BuilderBinding`""" -input BuilderBindingInput { - createdAt: Datetime - createdBy: UUID - createdByPrincipal: UUID - - """Database that owns this resource (database-scoped isolation)""" - databaseId: UUID! - id: UUID - - """ - BuildKit resource installation serving this binding; may belong to another resource scope - """ - installationId: UUID! - - """Most recent projection failure""" - lastError: String - - """Reconciler detail (projection timestamps and diagnostics)""" - metadata: JSON - - """Namespace whose builds use this BuildKit installation""" - namespaceId: UUID! - - """ - BuildKit address last projected into the namespace (NULL = never projected) - """ - observedHost: String - - """Lane this binding applies to (NULL = the scope's default lane)""" - realm: String - - """Projection state of BUILDKIT_HOST: pending, active, failed""" - status: String - updatedAt: Datetime - updatedBy: UUID - updatedByPrincipal: UUID -} - -"""Methods to use when ordering `BuilderBinding`.""" -enum BuilderBindingOrderBy { - CREATED_AT_ASC - CREATED_AT_DESC - CREATED_BY_ASC - CREATED_BY_DESC - CREATED_BY_PRINCIPAL_ASC - CREATED_BY_PRINCIPAL_DESC - DATABASE_ID_ASC - DATABASE_ID_DESC - ID_ASC - ID_DESC - INSTALLATION_ID_ASC - INSTALLATION_ID_DESC - LAST_ERROR_ASC - LAST_ERROR_DESC - METADATA_ASC - METADATA_DESC - NAMESPACE_ID_ASC - NAMESPACE_ID_DESC - NATURAL - OBSERVED_HOST_ASC - OBSERVED_HOST_DESC - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - REALM_ASC - REALM_DESC - STATUS_ASC - STATUS_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC - UPDATED_BY_ASC - UPDATED_BY_DESC - UPDATED_BY_PRINCIPAL_ASC - UPDATED_BY_PRINCIPAL_DESC -} - -""" -Represents an update to a `BuilderBinding`. Fields that are set will be updated. -""" -input BuilderBindingPatch { - createdAt: Datetime - createdBy: UUID - createdByPrincipal: UUID - - """Database that owns this resource (database-scoped isolation)""" - databaseId: UUID - id: UUID - - """ - BuildKit resource installation serving this binding; may belong to another resource scope - """ - installationId: UUID - - """Most recent projection failure""" - lastError: String - - """Reconciler detail (projection timestamps and diagnostics)""" - metadata: JSON - - """Namespace whose builds use this BuildKit installation""" - namespaceId: UUID - - """ - BuildKit address last projected into the namespace (NULL = never projected) - """ - observedHost: String - - """Lane this binding applies to (NULL = the scope's default lane)""" - realm: String - - """Projection state of BUILDKIT_HOST: pending, active, failed""" - status: String - updatedAt: Datetime - updatedBy: UUID - updatedByPrincipal: UUID -} - scalar ConstructiveInternalTypeImage """ @@ -1784,41 +1535,6 @@ type CreateBuildStepPayload { query: Query } -"""All input for the create `BuilderBinding` mutation.""" -input CreateBuilderBindingInput { - """The `BuilderBinding` to be created by this mutation.""" - builderBinding: BuilderBindingInput! - - """ - 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 `BuilderBinding` mutation.""" -type CreateBuilderBindingPayload { - """The `BuilderBinding` that was created by this mutation.""" - builderBinding: BuilderBinding - - """An edge for our `BuilderBinding`. May be used by Relay 1.""" - builderBindingEdge( - """The method to use when ordering `BuilderBinding`.""" - orderBy: [BuilderBindingOrderBy!]! = [PRIMARY_KEY_ASC] - ): BuilderBindingEdge - - """ - 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 `ContentPreset` mutation.""" input CreateContentPresetInput { """ @@ -3235,41 +2951,6 @@ type CreatePlatformBuildStepPayload { query: Query } -"""All input for the create `PlatformBuilderBinding` mutation.""" -input CreatePlatformBuilderBindingInput { - """ - 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 `PlatformBuilderBinding` to be created by this mutation.""" - platformBuilderBinding: PlatformBuilderBindingInput! -} - -"""The output of our create `PlatformBuilderBinding` mutation.""" -type CreatePlatformBuilderBindingPayload { - """ - 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 `PlatformBuilderBinding` that was created by this mutation.""" - platformBuilderBinding: PlatformBuilderBinding - - """An edge for our `PlatformBuilderBinding`. May be used by Relay 1.""" - platformBuilderBindingEdge( - """The method to use when ordering `PlatformBuilderBinding`.""" - orderBy: [PlatformBuilderBindingOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformBuilderBindingEdge - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - """All input for the create `PlatformFunctionApiBinding` mutation.""" input CreatePlatformFunctionApiBindingInput { """ @@ -4661,6 +4342,41 @@ type CreatePlatformResourceUsageSummaryPayload { query: Query } +"""All input for the create `PlatformServiceBinding` mutation.""" +input CreatePlatformServiceBindingInput { + """ + 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 `PlatformServiceBinding` to be created by this mutation.""" + platformServiceBinding: PlatformServiceBindingInput! +} + +"""The output of our create `PlatformServiceBinding` mutation.""" +type CreatePlatformServiceBindingPayload { + """ + 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 `PlatformServiceBinding` that was created by this mutation.""" + platformServiceBinding: PlatformServiceBinding + + """An edge for our `PlatformServiceBinding`. May be used by Relay 1.""" + platformServiceBindingEdge( + """The method to use when ordering `PlatformServiceBinding`.""" + orderBy: [PlatformServiceBindingOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformServiceBindingEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `PlatformWebhookEndpoint` mutation.""" input CreatePlatformWebhookEndpointInput { """ @@ -5431,6 +5147,41 @@ type CreateResourceUsageSummaryPayload { ): ResourceUsageSummaryEdge } +"""All input for the create `ServiceBinding` mutation.""" +input CreateServiceBindingInput { + """ + 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 `ServiceBinding` to be created by this mutation.""" + serviceBinding: ServiceBindingInput! +} + +"""The output of our create `ServiceBinding` mutation.""" +type CreateServiceBindingPayload { + """ + 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 `ServiceBinding` that was created by this mutation.""" + serviceBinding: ServiceBinding + + """An edge for our `ServiceBinding`. May be used by Relay 1.""" + serviceBindingEdge( + """The method to use when ordering `ServiceBinding`.""" + orderBy: [ServiceBindingOrderBy!]! = [PRIMARY_KEY_ASC] + ): ServiceBindingEdge +} + """All input for the create `WebhookEndpoint` mutation.""" input CreateWebhookEndpointInput { """ @@ -8643,39 +8394,6 @@ type DeleteBuildStepPayload { query: Query } -"""All input for the `deleteBuilderBinding` mutation.""" -input DeleteBuilderBindingInput { - """ - 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 `BuilderBinding` mutation.""" -type DeleteBuilderBindingPayload { - """The `BuilderBinding` that was deleted by this mutation.""" - builderBinding: BuilderBinding - - """An edge for our `BuilderBinding`. May be used by Relay 1.""" - builderBindingEdge( - """The method to use when ordering `BuilderBinding`.""" - orderBy: [BuilderBindingOrderBy!]! = [PRIMARY_KEY_ASC] - ): BuilderBindingEdge - - """ - 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 `deleteContentPreset` mutation.""" input DeleteContentPresetInput { """ @@ -10167,39 +9885,6 @@ type DeletePlatformBuildStepPayload { query: Query } -"""All input for the `deletePlatformBuilderBinding` mutation.""" -input DeletePlatformBuilderBindingInput { - """ - 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 `PlatformBuilderBinding` mutation.""" -type DeletePlatformBuilderBindingPayload { - """ - 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 `PlatformBuilderBinding` that was deleted by this mutation.""" - platformBuilderBinding: PlatformBuilderBinding - - """An edge for our `PlatformBuilderBinding`. May be used by Relay 1.""" - platformBuilderBindingEdge( - """The method to use when ordering `PlatformBuilderBinding`.""" - orderBy: [PlatformBuilderBindingOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformBuilderBindingEdge - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - """All input for the `deletePlatformFunctionApiBinding` mutation.""" input DeletePlatformFunctionApiBindingInput { """ @@ -11572,6 +11257,39 @@ type DeletePlatformResourceUsageSummaryPayload { query: Query } +"""All input for the `deletePlatformServiceBinding` mutation.""" +input DeletePlatformServiceBindingInput { + """ + 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 `PlatformServiceBinding` mutation.""" +type DeletePlatformServiceBindingPayload { + """ + 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 `PlatformServiceBinding` that was deleted by this mutation.""" + platformServiceBinding: PlatformServiceBinding + + """An edge for our `PlatformServiceBinding`. May be used by Relay 1.""" + platformServiceBindingEdge( + """The method to use when ordering `PlatformServiceBinding`.""" + orderBy: [PlatformServiceBindingOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformServiceBindingEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `deletePlatformWebhookEndpoint` mutation.""" input DeletePlatformWebhookEndpointInput { """ @@ -12315,6 +12033,39 @@ type DeleteResourceUsageSummaryPayload { ): ResourceUsageSummaryEdge } +"""All input for the `deleteServiceBinding` mutation.""" +input DeleteServiceBindingInput { + """ + 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 `ServiceBinding` mutation.""" +type DeleteServiceBindingPayload { + """ + 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 `ServiceBinding` that was deleted by this mutation.""" + serviceBinding: ServiceBinding + + """An edge for our `ServiceBinding`. May be used by Relay 1.""" + serviceBindingEdge( + """The method to use when ordering `ServiceBinding`.""" + orderBy: [ServiceBindingOrderBy!]! = [PRIMARY_KEY_ASC] + ): ServiceBindingEdge +} + """All input for the `deleteWebhookEndpoint` mutation.""" input DeleteWebhookEndpointInput { """ @@ -19985,6 +19736,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -19996,6 +19752,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -20020,7 +19789,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -20047,7 +19816,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -20092,7 +19861,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -20113,7 +19882,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -20144,11 +19913,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -20157,7 +19926,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -20188,7 +19957,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -20205,7 +19974,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -20213,7 +19982,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -20222,13 +19991,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -20254,7 +20021,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -20264,22 +20031,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" @@ -20368,14 +20140,6 @@ type Mutation { input: CreateBuildStepInput! ): CreateBuildStepPayload - """Creates a single `BuilderBinding`.""" - createBuilderBinding( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateBuilderBindingInput! - ): CreateBuilderBindingPayload - """Creates a single `ContentPreset`.""" createContentPreset( """ @@ -20686,14 +20450,6 @@ type Mutation { input: CreatePlatformBuildStepInput! ): CreatePlatformBuildStepPayload - """Creates a single `PlatformBuilderBinding`.""" - createPlatformBuilderBinding( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreatePlatformBuilderBindingInput! - ): CreatePlatformBuilderBindingPayload - """Creates a single `PlatformFunctionApiBinding`.""" createPlatformFunctionApiBinding( """ @@ -21006,6 +20762,14 @@ type Mutation { input: CreatePlatformResourceUsageSummaryInput! ): CreatePlatformResourceUsageSummaryPayload + """Creates a single `PlatformServiceBinding`.""" + createPlatformServiceBinding( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlatformServiceBindingInput! + ): CreatePlatformServiceBindingPayload + """Creates a single `PlatformWebhookEndpoint`.""" createPlatformWebhookEndpoint( """ @@ -21182,6 +20946,14 @@ type Mutation { input: CreateResourceUsageSummaryInput! ): CreateResourceUsageSummaryPayload + """Creates a single `ServiceBinding`.""" + createServiceBinding( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateServiceBindingInput! + ): CreateServiceBindingPayload + """Creates a single `WebhookEndpoint`.""" createWebhookEndpoint( """ @@ -21322,14 +21094,6 @@ type Mutation { input: DeleteBuildStepInput! ): DeleteBuildStepPayload - """Deletes a single `BuilderBinding` using a unique key.""" - deleteBuilderBinding( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteBuilderBindingInput! - ): DeleteBuilderBindingPayload - """Deletes a single `ContentPreset` using a unique key.""" deleteContentPreset( """ @@ -21658,14 +21422,6 @@ type Mutation { input: DeletePlatformBuildStepInput! ): DeletePlatformBuildStepPayload - """Deletes a single `PlatformBuilderBinding` using a unique key.""" - deletePlatformBuilderBinding( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeletePlatformBuilderBindingInput! - ): DeletePlatformBuilderBindingPayload - """Deletes a single `PlatformFunctionApiBinding` using a unique key.""" deletePlatformFunctionApiBinding( """ @@ -21982,6 +21738,14 @@ type Mutation { input: DeletePlatformResourceUsageSummaryInput! ): DeletePlatformResourceUsageSummaryPayload + """Deletes a single `PlatformServiceBinding` using a unique key.""" + deletePlatformServiceBinding( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlatformServiceBindingInput! + ): DeletePlatformServiceBindingPayload + """Deletes a single `PlatformWebhookEndpoint` using a unique key.""" deletePlatformWebhookEndpoint( """ @@ -22158,6 +21922,14 @@ type Mutation { input: DeleteResourceUsageSummaryInput! ): DeleteResourceUsageSummaryPayload + """Deletes a single `ServiceBinding` using a unique key.""" + deleteServiceBinding( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteServiceBindingInput! + ): DeleteServiceBindingPayload + """Deletes a single `WebhookEndpoint` using a unique key.""" deleteWebhookEndpoint( """ @@ -22421,14 +22193,6 @@ type Mutation { input: UpdateBuildStepInput! ): UpdateBuildStepPayload - """Updates a single `BuilderBinding` using a unique key and a patch.""" - updateBuilderBinding( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateBuilderBindingInput! - ): UpdateBuilderBindingPayload - """Updates a single `ContentPreset` using a unique key and a patch.""" updateContentPreset( """ @@ -22775,16 +22539,6 @@ type Mutation { input: UpdatePlatformBuildStepInput! ): UpdatePlatformBuildStepPayload - """ - Updates a single `PlatformBuilderBinding` using a unique key and a patch. - """ - updatePlatformBuilderBinding( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdatePlatformBuilderBindingInput! - ): UpdatePlatformBuilderBindingPayload - """ Updates a single `PlatformFunctionApiBinding` using a unique key and a patch. """ @@ -23151,6 +22905,16 @@ type Mutation { input: UpdatePlatformResourceUsageSummaryInput! ): UpdatePlatformResourceUsageSummaryPayload + """ + Updates a single `PlatformServiceBinding` using a unique key and a patch. + """ + updatePlatformServiceBinding( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlatformServiceBindingInput! + ): UpdatePlatformServiceBindingPayload + """ Updates a single `PlatformWebhookEndpoint` using a unique key and a patch. """ @@ -23337,6 +23101,14 @@ type Mutation { input: UpdateResourceUsageSummaryInput! ): UpdateResourceUsageSummaryPayload + """Updates a single `ServiceBinding` using a unique key and a patch.""" + updateServiceBinding( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateServiceBindingInput! + ): UpdateServiceBindingPayload + """Updates a single `WebhookEndpoint` using a unique key and a patch.""" updateWebhookEndpoint( """ @@ -23367,35 +23139,6 @@ type Namespace { """Freeform metadata for tooling and operational notes""" annotations: JSON! - """Reads and enables pagination through a set of `BuilderBinding`.""" - builderBindings( - """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 `BuilderBinding`.""" - orderBy: [BuilderBindingOrderBy!] = [PRIMARY_KEY_ASC] - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: BuilderBindingFilter - ): BuilderBindingConnection! - """ Cluster this namespace is projected onto; NULL = the cluster the reconciler runs in """ @@ -23576,6 +23319,35 @@ type Namespace { where: ResourceFilter ): ResourceConnection! + """Reads and enables pagination through a set of `ServiceBinding`.""" + serviceBindings( + """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 `ServiceBinding`.""" + orderBy: [ServiceBindingOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ServiceBindingFilter + ): ServiceBindingConnection! + """ Namespace provisioning lifecycle status: pending, provisioning, active, failed """ @@ -23832,12 +23604,6 @@ input NamespaceFilter { """Filter by the object’s `annotations` field.""" annotations: JSONFilter - """Filter by the object’s `builderBindings` relation.""" - builderBindings: NamespaceToManyBuilderBindingFilter - - """`builderBindings` exist.""" - builderBindingsExist: Boolean - """Filter by the object’s `clusterId` field.""" clusterId: UUIDFilter @@ -23907,6 +23673,12 @@ input NamespaceFilter { """`resources` exist.""" resourcesExist: Boolean + """Filter by the object’s `serviceBindings` relation.""" + serviceBindings: NamespaceToManyServiceBindingFilter + + """`serviceBindings` exist.""" + serviceBindingsExist: Boolean + """Filter by the object’s `status` field.""" status: StringFilter @@ -24051,20 +23823,6 @@ input NamespacePatch { updatedAt: Datetime } -""" -A filter to be used against many `BuilderBinding` object types. All fields are combined with a logical ‘and.’ -""" -input NamespaceToManyBuilderBindingFilter { - """Filters to entities where every related entity matches.""" - every: BuilderBindingFilter - - """Filters to entities where no related entity matches.""" - none: BuilderBindingFilter - - """Filters to entities where at least one related entity matches.""" - some: BuilderBindingFilter -} - """ A filter to be used against many `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ """ @@ -24135,6 +23893,20 @@ input NamespaceToManyResourceInstallationFilter { some: ResourceInstallationFilter } +""" +A filter to be used against many `ServiceBinding` object types. All fields are combined with a logical ‘and.’ +""" +input NamespaceToManyServiceBindingFilter { + """Filters to entities where every related entity matches.""" + every: ServiceBindingFilter + + """Filters to entities where no related entity matches.""" + none: ServiceBindingFilter + + """Filters to entities where at least one related entity matches.""" + some: ServiceBindingFilter +} + """ A filter to be used against many `WebhookEndpoint` object types. All fields are combined with a logical ‘and.’ """ @@ -24844,245 +24616,6 @@ input PlatformBuildStepPatch { summary: JSON } -""" -Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST -""" -type PlatformBuilderBinding { - createdAt: Datetime - createdBy: UUID - createdByPrincipal: UUID - id: UUID! - - """ - BuildKit resource installation serving this binding; may belong to another resource scope - """ - installationId: UUID! - - """Most recent projection failure""" - lastError: String - - """Reconciler detail (projection timestamps and diagnostics)""" - metadata: JSON - - """ - Reads a single `PlatformNamespace` that is related to this `PlatformBuilderBinding`. - """ - namespace: PlatformNamespace - - """Namespace whose builds use this BuildKit installation""" - namespaceId: UUID! - - """ - BuildKit address last projected into the namespace (NULL = never projected) - """ - observedHost: String - - """Lane this binding applies to (NULL = the scope's default lane)""" - realm: String - - """Projection state of BUILDKIT_HOST: pending, active, failed""" - status: String! - updatedAt: Datetime - updatedBy: UUID - updatedByPrincipal: UUID -} - -"""A connection to a list of `PlatformBuilderBinding` values.""" -type PlatformBuilderBindingConnection { - """ - A list of edges which contains the `PlatformBuilderBinding` and cursor to aid in pagination. - """ - edges: [PlatformBuilderBindingEdge]! - - """A list of `PlatformBuilderBinding` objects.""" - nodes: [PlatformBuilderBinding]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """ - The count of *all* `PlatformBuilderBinding` you could get from the connection. - """ - totalCount: Int! -} - -"""A `PlatformBuilderBinding` edge in the connection.""" -type PlatformBuilderBindingEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `PlatformBuilderBinding` at the end of the edge.""" - node: PlatformBuilderBinding -} - -""" -A filter to be used against `PlatformBuilderBinding` object types. All fields are combined with a logical ‘and.’ -""" -input PlatformBuilderBindingFilter { - """Checks for all expressions in this list.""" - and: [PlatformBuilderBindingFilter!] - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `createdBy` field.""" - createdBy: UUIDFilter - - """Filter by the object’s `createdByPrincipal` field.""" - createdByPrincipal: UUIDFilter - - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `installationId` field.""" - installationId: UUIDFilter - - """Filter by the object’s `lastError` field.""" - lastError: StringFilter - - """Filter by the object’s `metadata` field.""" - metadata: JSONFilter - - """Filter by the object’s `namespace` relation.""" - namespace: PlatformNamespaceFilter - - """Filter by the object’s `namespaceId` field.""" - namespaceId: UUIDFilter - - """Negates the expression.""" - not: PlatformBuilderBindingFilter - - """Filter by the object’s `observedHost` field.""" - observedHost: StringFilter - - """Checks for any expressions in this list.""" - or: [PlatformBuilderBindingFilter!] - - """Filter by the object’s `realm` field.""" - realm: StringFilter - - """Filter by the object’s `status` field.""" - status: StringFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter - - """Filter by the object’s `updatedBy` field.""" - updatedBy: UUIDFilter - - """Filter by the object’s `updatedByPrincipal` field.""" - updatedByPrincipal: UUIDFilter -} - -"""An input for mutations affecting `PlatformBuilderBinding`""" -input PlatformBuilderBindingInput { - createdAt: Datetime - createdBy: UUID - createdByPrincipal: UUID - id: UUID - - """ - BuildKit resource installation serving this binding; may belong to another resource scope - """ - installationId: UUID! - - """Most recent projection failure""" - lastError: String - - """Reconciler detail (projection timestamps and diagnostics)""" - metadata: JSON - - """Namespace whose builds use this BuildKit installation""" - namespaceId: UUID! - - """ - BuildKit address last projected into the namespace (NULL = never projected) - """ - observedHost: String - - """Lane this binding applies to (NULL = the scope's default lane)""" - realm: String - - """Projection state of BUILDKIT_HOST: pending, active, failed""" - status: String - updatedAt: Datetime - updatedBy: UUID - updatedByPrincipal: UUID -} - -"""Methods to use when ordering `PlatformBuilderBinding`.""" -enum PlatformBuilderBindingOrderBy { - CREATED_AT_ASC - CREATED_AT_DESC - CREATED_BY_ASC - CREATED_BY_DESC - CREATED_BY_PRINCIPAL_ASC - CREATED_BY_PRINCIPAL_DESC - ID_ASC - ID_DESC - INSTALLATION_ID_ASC - INSTALLATION_ID_DESC - LAST_ERROR_ASC - LAST_ERROR_DESC - METADATA_ASC - METADATA_DESC - NAMESPACE_ID_ASC - NAMESPACE_ID_DESC - NATURAL - OBSERVED_HOST_ASC - OBSERVED_HOST_DESC - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - REALM_ASC - REALM_DESC - STATUS_ASC - STATUS_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC - UPDATED_BY_ASC - UPDATED_BY_DESC - UPDATED_BY_PRINCIPAL_ASC - UPDATED_BY_PRINCIPAL_DESC -} - -""" -Represents an update to a `PlatformBuilderBinding`. Fields that are set will be updated. -""" -input PlatformBuilderBindingPatch { - createdAt: Datetime - createdBy: UUID - createdByPrincipal: UUID - id: UUID - - """ - BuildKit resource installation serving this binding; may belong to another resource scope - """ - installationId: UUID - - """Most recent projection failure""" - lastError: String - - """Reconciler detail (projection timestamps and diagnostics)""" - metadata: JSON - - """Namespace whose builds use this BuildKit installation""" - namespaceId: UUID - - """ - BuildKit address last projected into the namespace (NULL = never projected) - """ - observedHost: String - - """Lane this binding applies to (NULL = the scope's default lane)""" - realm: String - - """Projection state of BUILDKIT_HOST: pending, active, failed""" - status: String - updatedAt: Datetime - updatedBy: UUID - updatedByPrincipal: UUID -} - """ Join table binding function definitions to API endpoints with per-binding alias and config """ @@ -30310,37 +29843,6 @@ type PlatformNamespace { """ namespaceName: String! - """ - Reads and enables pagination through a set of `PlatformBuilderBinding`. - """ - platformBuilderBindingsByNamespaceId( - """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 `PlatformBuilderBinding`.""" - orderBy: [PlatformBuilderBindingOrderBy!] = [PRIMARY_KEY_ASC] - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: PlatformBuilderBindingFilter - ): PlatformBuilderBindingConnection! - """ Reads and enables pagination through a set of `PlatformFunctionDeployment`. """ @@ -30494,6 +29996,37 @@ type PlatformNamespace { where: PlatformResourceFilter ): PlatformResourceConnection! + """ + Reads and enables pagination through a set of `PlatformServiceBinding`. + """ + platformServiceBindingsByNamespaceId( + """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 `PlatformServiceBinding`.""" + orderBy: [PlatformServiceBindingOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlatformServiceBindingFilter + ): PlatformServiceBindingConnection! + """ Reads and enables pagination through a set of `PlatformWebhookEndpoint`. """ @@ -30778,14 +30311,6 @@ input PlatformNamespaceFilter { """Checks for any expressions in this list.""" or: [PlatformNamespaceFilter!] - """ - Filter by the object’s `platformBuilderBindingsByNamespaceId` relation. - """ - platformBuilderBindingsByNamespaceId: PlatformNamespaceToManyPlatformBuilderBindingFilter - - """`platformBuilderBindingsByNamespaceId` exist.""" - platformBuilderBindingsByNamespaceIdExist: Boolean - """ Filter by the object’s `platformFunctionDeploymentsByNamespaceId` relation. """ @@ -30824,6 +30349,14 @@ input PlatformNamespaceFilter { """`platformResourcesByNamespaceId` exist.""" platformResourcesByNamespaceIdExist: Boolean + """ + Filter by the object’s `platformServiceBindingsByNamespaceId` relation. + """ + platformServiceBindingsByNamespaceId: PlatformNamespaceToManyPlatformServiceBindingFilter + + """`platformServiceBindingsByNamespaceId` exist.""" + platformServiceBindingsByNamespaceIdExist: Boolean + """ Filter by the object’s `platformWebhookEndpointsByNamespaceId` relation. """ @@ -30962,20 +30495,6 @@ input PlatformNamespacePatch { updatedAt: Datetime } -""" -A filter to be used against many `PlatformBuilderBinding` object types. All fields are combined with a logical ‘and.’ -""" -input PlatformNamespaceToManyPlatformBuilderBindingFilter { - """Filters to entities where every related entity matches.""" - every: PlatformBuilderBindingFilter - - """Filters to entities where no related entity matches.""" - none: PlatformBuilderBindingFilter - - """Filters to entities where at least one related entity matches.""" - some: PlatformBuilderBindingFilter -} - """ A filter to be used against many `PlatformFunctionDeployment` object types. All fields are combined with a logical ‘and.’ """ @@ -31046,6 +30565,20 @@ input PlatformNamespaceToManyPlatformResourceInstallationFilter { some: PlatformResourceInstallationFilter } +""" +A filter to be used against many `PlatformServiceBinding` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformNamespaceToManyPlatformServiceBindingFilter { + """Filters to entities where every related entity matches.""" + every: PlatformServiceBindingFilter + + """Filters to entities where no related entity matches.""" + none: PlatformServiceBindingFilter + + """Filters to entities where at least one related entity matches.""" + some: PlatformServiceBindingFilter +} + """ A filter to be used against many `PlatformWebhookEndpoint` object types. All fields are combined with a logical ‘and.’ """ @@ -38783,6 +38316,285 @@ enum PlatformResourcesResolvedRequirementOrderBy { SLUG_DESC } +""" +Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config +""" +type PlatformServiceBinding { + createdAt: Datetime + createdBy: UUID + createdByPrincipal: UUID + id: UUID! + + """ + Resource installation serving this binding, in the installations table of installation_scope + """ + installationId: UUID! + + """ + Scope whose installations table holds installation_id: this scope or platform + """ + installationScope: String! + + """ + Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) + """ + kind: String! + + """Most recent projection failure""" + lastError: String + + """Reconciler detail (projection timestamps and diagnostics)""" + metadata: JSON + + """ + Reads a single `PlatformNamespace` that is related to this `PlatformServiceBinding`. + """ + namespace: PlatformNamespace + + """Namespace whose builds use this BuildKit installation""" + namespaceId: UUID! + + """ + Service address last projected into the namespace (NULL = never projected) + """ + observedHost: String + + """Lane this binding applies to (NULL = the scope's default lane)""" + realm: String + + """Projection state of the bound address: pending, active, failed""" + status: String! + updatedAt: Datetime + updatedBy: UUID + updatedByPrincipal: UUID +} + +"""A connection to a list of `PlatformServiceBinding` values.""" +type PlatformServiceBindingConnection { + """ + A list of edges which contains the `PlatformServiceBinding` and cursor to aid in pagination. + """ + edges: [PlatformServiceBindingEdge]! + + """A list of `PlatformServiceBinding` objects.""" + nodes: [PlatformServiceBinding]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `PlatformServiceBinding` you could get from the connection. + """ + totalCount: Int! +} + +"""A `PlatformServiceBinding` edge in the connection.""" +type PlatformServiceBindingEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PlatformServiceBinding` at the end of the edge.""" + node: PlatformServiceBinding +} + +""" +A filter to be used against `PlatformServiceBinding` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformServiceBindingFilter { + """Checks for all expressions in this list.""" + and: [PlatformServiceBindingFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `createdBy` field.""" + createdBy: UUIDFilter + + """Filter by the object’s `createdByPrincipal` field.""" + createdByPrincipal: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `installationId` field.""" + installationId: UUIDFilter + + """Filter by the object’s `installationScope` field.""" + installationScope: StringFilter + + """Filter by the object’s `kind` field.""" + kind: StringFilter + + """Filter by the object’s `lastError` field.""" + lastError: StringFilter + + """Filter by the object’s `metadata` field.""" + metadata: JSONFilter + + """Filter by the object’s `namespace` relation.""" + namespace: PlatformNamespaceFilter + + """Filter by the object’s `namespaceId` field.""" + namespaceId: UUIDFilter + + """Negates the expression.""" + not: PlatformServiceBindingFilter + + """Filter by the object’s `observedHost` field.""" + observedHost: StringFilter + + """Checks for any expressions in this list.""" + or: [PlatformServiceBindingFilter!] + + """Filter by the object’s `realm` field.""" + realm: StringFilter + + """Filter by the object’s `status` field.""" + status: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `updatedBy` field.""" + updatedBy: UUIDFilter + + """Filter by the object’s `updatedByPrincipal` field.""" + updatedByPrincipal: UUIDFilter +} + +"""An input for mutations affecting `PlatformServiceBinding`""" +input PlatformServiceBindingInput { + createdAt: Datetime + createdBy: UUID + createdByPrincipal: UUID + id: UUID + + """ + Resource installation serving this binding, in the installations table of installation_scope + """ + installationId: UUID! + + """ + Scope whose installations table holds installation_id: this scope or platform + """ + installationScope: String! + + """ + Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) + """ + kind: String! + + """Most recent projection failure""" + lastError: String + + """Reconciler detail (projection timestamps and diagnostics)""" + metadata: JSON + + """Namespace whose builds use this BuildKit installation""" + namespaceId: UUID! + + """ + Service address last projected into the namespace (NULL = never projected) + """ + observedHost: String + + """Lane this binding applies to (NULL = the scope's default lane)""" + realm: String + + """Projection state of the bound address: pending, active, failed""" + status: String + updatedAt: Datetime + updatedBy: UUID + updatedByPrincipal: UUID +} + +"""Methods to use when ordering `PlatformServiceBinding`.""" +enum PlatformServiceBindingOrderBy { + CREATED_AT_ASC + CREATED_AT_DESC + CREATED_BY_ASC + CREATED_BY_DESC + CREATED_BY_PRINCIPAL_ASC + CREATED_BY_PRINCIPAL_DESC + ID_ASC + ID_DESC + INSTALLATION_ID_ASC + INSTALLATION_ID_DESC + INSTALLATION_SCOPE_ASC + INSTALLATION_SCOPE_DESC + KIND_ASC + KIND_DESC + LAST_ERROR_ASC + LAST_ERROR_DESC + METADATA_ASC + METADATA_DESC + NAMESPACE_ID_ASC + NAMESPACE_ID_DESC + NATURAL + OBSERVED_HOST_ASC + OBSERVED_HOST_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + REALM_ASC + REALM_DESC + STATUS_ASC + STATUS_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + UPDATED_BY_ASC + UPDATED_BY_DESC + UPDATED_BY_PRINCIPAL_ASC + UPDATED_BY_PRINCIPAL_DESC +} + +""" +Represents an update to a `PlatformServiceBinding`. Fields that are set will be updated. +""" +input PlatformServiceBindingPatch { + createdAt: Datetime + createdBy: UUID + createdByPrincipal: UUID + id: UUID + + """ + Resource installation serving this binding, in the installations table of installation_scope + """ + installationId: UUID + + """ + Scope whose installations table holds installation_id: this scope or platform + """ + installationScope: String + + """ + Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) + """ + kind: String + + """Most recent projection failure""" + lastError: String + + """Reconciler detail (projection timestamps and diagnostics)""" + metadata: JSON + + """Namespace whose builds use this BuildKit installation""" + namespaceId: UUID + + """ + Service address last projected into the namespace (NULL = never projected) + """ + observedHost: String + + """Lane this binding applies to (NULL = the scope's default lane)""" + realm: String + + """Projection state of the bound address: pending, active, failed""" + status: String + updatedAt: Datetime + updatedBy: UUID + updatedByPrincipal: UUID +} + """ Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window """ @@ -41601,35 +41413,6 @@ type Query { where: BuildStepFilter ): BuildStepConnection - """Reads and enables pagination through a set of `BuilderBinding`.""" - builderBindings( - """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 `BuilderBinding`.""" - orderBy: [BuilderBindingOrderBy!] = [PRIMARY_KEY_ASC] - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: BuilderBindingFilter - ): BuilderBindingConnection - """Reads and enables pagination through a set of `Build`.""" builds( """Read all values in the set after (below) this cursor.""" @@ -42877,37 +42660,6 @@ type Query { where: PlatformBuildStepFilter ): PlatformBuildStepConnection - """ - Reads and enables pagination through a set of `PlatformBuilderBinding`. - """ - platformBuilderBindings( - """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 `PlatformBuilderBinding`.""" - orderBy: [PlatformBuilderBindingOrderBy!] = [PRIMARY_KEY_ASC] - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: PlatformBuilderBindingFilter - ): PlatformBuilderBindingConnection - """Reads and enables pagination through a set of `PlatformBuild`.""" platformBuilds( """Read all values in the set after (below) this cursor.""" @@ -44326,6 +44078,37 @@ type Query { where: PlatformResourcesResolvedRequirementFilter ): PlatformResourcesResolvedRequirementConnection + """ + Reads and enables pagination through a set of `PlatformServiceBinding`. + """ + platformServiceBindings( + """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 `PlatformServiceBinding`.""" + orderBy: [PlatformServiceBindingOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlatformServiceBindingFilter + ): PlatformServiceBindingConnection + """ Reads and enables pagination through a set of `PlatformWebhookEndpoint`. """ @@ -45151,6 +44934,35 @@ type Query { where: ResourcesResolvedRequirementFilter ): ResourcesResolvedRequirementConnection + """Reads and enables pagination through a set of `ServiceBinding`.""" + serviceBindings( + """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 `ServiceBinding`.""" + orderBy: [ServiceBindingOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ServiceBindingFilter + ): ServiceBindingConnection + """Reads and enables pagination through a set of `WebhookEndpoint`.""" webhookEndpoints( """Read all values in the set after (below) this cursor.""" @@ -50981,6 +50793,295 @@ type SaveGraphPayload { result: UUID } +""" +Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config +""" +type ServiceBinding { + createdAt: Datetime + createdBy: UUID + createdByPrincipal: UUID + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + id: UUID! + + """ + Resource installation serving this binding, in the installations table of installation_scope + """ + installationId: UUID! + + """ + Scope whose installations table holds installation_id: this scope or platform + """ + installationScope: String! + + """ + Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) + """ + kind: String! + + """Most recent projection failure""" + lastError: String + + """Reconciler detail (projection timestamps and diagnostics)""" + metadata: JSON + + """Reads a single `Namespace` that is related to this `ServiceBinding`.""" + namespace: Namespace + + """Namespace whose builds use this BuildKit installation""" + namespaceId: UUID! + + """ + Service address last projected into the namespace (NULL = never projected) + """ + observedHost: String + + """Lane this binding applies to (NULL = the scope's default lane)""" + realm: String + + """Projection state of the bound address: pending, active, failed""" + status: String! + updatedAt: Datetime + updatedBy: UUID + updatedByPrincipal: UUID +} + +"""A connection to a list of `ServiceBinding` values.""" +type ServiceBindingConnection { + """ + A list of edges which contains the `ServiceBinding` and cursor to aid in pagination. + """ + edges: [ServiceBindingEdge]! + + """A list of `ServiceBinding` objects.""" + nodes: [ServiceBinding]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `ServiceBinding` you could get from the connection.""" + totalCount: Int! +} + +"""A `ServiceBinding` edge in the connection.""" +type ServiceBindingEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `ServiceBinding` at the end of the edge.""" + node: ServiceBinding +} + +""" +A filter to be used against `ServiceBinding` object types. All fields are combined with a logical ‘and.’ +""" +input ServiceBindingFilter { + """Checks for all expressions in this list.""" + and: [ServiceBindingFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `createdBy` field.""" + createdBy: UUIDFilter + + """Filter by the object’s `createdByPrincipal` field.""" + createdByPrincipal: UUIDFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `installationId` field.""" + installationId: UUIDFilter + + """Filter by the object’s `installationScope` field.""" + installationScope: StringFilter + + """Filter by the object’s `kind` field.""" + kind: StringFilter + + """Filter by the object’s `lastError` field.""" + lastError: StringFilter + + """Filter by the object’s `metadata` field.""" + metadata: JSONFilter + + """Filter by the object’s `namespace` relation.""" + namespace: NamespaceFilter + + """Filter by the object’s `namespaceId` field.""" + namespaceId: UUIDFilter + + """Negates the expression.""" + not: ServiceBindingFilter + + """Filter by the object’s `observedHost` field.""" + observedHost: StringFilter + + """Checks for any expressions in this list.""" + or: [ServiceBindingFilter!] + + """Filter by the object’s `realm` field.""" + realm: StringFilter + + """Filter by the object’s `status` field.""" + status: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `updatedBy` field.""" + updatedBy: UUIDFilter + + """Filter by the object’s `updatedByPrincipal` field.""" + updatedByPrincipal: UUIDFilter +} + +"""An input for mutations affecting `ServiceBinding`""" +input ServiceBindingInput { + createdAt: Datetime + createdBy: UUID + createdByPrincipal: UUID + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + id: UUID + + """ + Resource installation serving this binding, in the installations table of installation_scope + """ + installationId: UUID! + + """ + Scope whose installations table holds installation_id: this scope or platform + """ + installationScope: String! + + """ + Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) + """ + kind: String! + + """Most recent projection failure""" + lastError: String + + """Reconciler detail (projection timestamps and diagnostics)""" + metadata: JSON + + """Namespace whose builds use this BuildKit installation""" + namespaceId: UUID! + + """ + Service address last projected into the namespace (NULL = never projected) + """ + observedHost: String + + """Lane this binding applies to (NULL = the scope's default lane)""" + realm: String + + """Projection state of the bound address: pending, active, failed""" + status: String + updatedAt: Datetime + updatedBy: UUID + updatedByPrincipal: UUID +} + +"""Methods to use when ordering `ServiceBinding`.""" +enum ServiceBindingOrderBy { + CREATED_AT_ASC + CREATED_AT_DESC + CREATED_BY_ASC + CREATED_BY_DESC + CREATED_BY_PRINCIPAL_ASC + CREATED_BY_PRINCIPAL_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + ID_ASC + ID_DESC + INSTALLATION_ID_ASC + INSTALLATION_ID_DESC + INSTALLATION_SCOPE_ASC + INSTALLATION_SCOPE_DESC + KIND_ASC + KIND_DESC + LAST_ERROR_ASC + LAST_ERROR_DESC + METADATA_ASC + METADATA_DESC + NAMESPACE_ID_ASC + NAMESPACE_ID_DESC + NATURAL + OBSERVED_HOST_ASC + OBSERVED_HOST_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + REALM_ASC + REALM_DESC + STATUS_ASC + STATUS_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + UPDATED_BY_ASC + UPDATED_BY_DESC + UPDATED_BY_PRINCIPAL_ASC + UPDATED_BY_PRINCIPAL_DESC +} + +""" +Represents an update to a `ServiceBinding`. Fields that are set will be updated. +""" +input ServiceBindingPatch { + createdAt: Datetime + createdBy: UUID + createdByPrincipal: UUID + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID + id: UUID + + """ + Resource installation serving this binding, in the installations table of installation_scope + """ + installationId: UUID + + """ + Scope whose installations table holds installation_id: this scope or platform + """ + installationScope: String + + """ + Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) + """ + kind: String + + """Most recent projection failure""" + lastError: String + + """Reconciler detail (projection timestamps and diagnostics)""" + metadata: JSON + + """Namespace whose builds use this BuildKit installation""" + namespaceId: UUID + + """ + Service address last projected into the namespace (NULL = never projected) + """ + observedHost: String + + """Lane this binding applies to (NULL = the scope's default lane)""" + realm: String + + """Projection state of the bound address: pending, active, failed""" + status: String + updatedAt: Datetime + updatedBy: UUID + updatedByPrincipal: UUID +} + """All input for the `setAndCommit` mutation.""" input SetAndCommitInput { """ @@ -51657,44 +51758,6 @@ type UpdateBuildStepPayload { query: Query } -"""All input for the `updateBuilderBinding` mutation.""" -input UpdateBuilderBindingInput { - """ - An object where the defined keys will be set on the `BuilderBinding` being updated. - """ - builderBindingPatch: BuilderBindingPatch! - - """ - 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 `BuilderBinding` mutation.""" -type UpdateBuilderBindingPayload { - """The `BuilderBinding` that was updated by this mutation.""" - builderBinding: BuilderBinding - - """An edge for our `BuilderBinding`. May be used by Relay 1.""" - builderBindingEdge( - """The method to use when ordering `BuilderBinding`.""" - orderBy: [BuilderBindingOrderBy!]! = [PRIMARY_KEY_ASC] - ): BuilderBindingEdge - - """ - 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 `updateContentPreset` mutation.""" input UpdateContentPresetInput { """ @@ -53386,44 +53449,6 @@ type UpdatePlatformBuildStepPayload { query: Query } -"""All input for the `updatePlatformBuilderBinding` mutation.""" -input UpdatePlatformBuilderBindingInput { - """ - 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 `PlatformBuilderBinding` being updated. - """ - platformBuilderBindingPatch: PlatformBuilderBindingPatch! -} - -"""The output of our update `PlatformBuilderBinding` mutation.""" -type UpdatePlatformBuilderBindingPayload { - """ - 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 `PlatformBuilderBinding` that was updated by this mutation.""" - platformBuilderBinding: PlatformBuilderBinding - - """An edge for our `PlatformBuilderBinding`. May be used by Relay 1.""" - platformBuilderBindingEdge( - """The method to use when ordering `PlatformBuilderBinding`.""" - orderBy: [PlatformBuilderBindingOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformBuilderBindingEdge - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - """All input for the `updatePlatformFunctionApiBinding` mutation.""" input UpdatePlatformFunctionApiBindingInput { """ @@ -54991,6 +55016,44 @@ type UpdatePlatformResourceUsageSummaryPayload { query: Query } +"""All input for the `updatePlatformServiceBinding` mutation.""" +input UpdatePlatformServiceBindingInput { + """ + 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 `PlatformServiceBinding` being updated. + """ + platformServiceBindingPatch: PlatformServiceBindingPatch! +} + +"""The output of our update `PlatformServiceBinding` mutation.""" +type UpdatePlatformServiceBindingPayload { + """ + 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 `PlatformServiceBinding` that was updated by this mutation.""" + platformServiceBinding: PlatformServiceBinding + + """An edge for our `PlatformServiceBinding`. May be used by Relay 1.""" + platformServiceBindingEdge( + """The method to use when ordering `PlatformServiceBinding`.""" + orderBy: [PlatformServiceBindingOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformServiceBindingEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updatePlatformWebhookEndpoint` mutation.""" input UpdatePlatformWebhookEndpointInput { """ @@ -55844,6 +55907,44 @@ type UpdateResourceUsageSummaryPayload { ): ResourceUsageSummaryEdge } +"""All input for the `updateServiceBinding` mutation.""" +input UpdateServiceBindingInput { + """ + 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 `ServiceBinding` being updated. + """ + serviceBindingPatch: ServiceBindingPatch! +} + +"""The output of our update `ServiceBinding` mutation.""" +type UpdateServiceBindingPayload { + """ + 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 `ServiceBinding` that was updated by this mutation.""" + serviceBinding: ServiceBinding + + """An edge for our `ServiceBinding`. May be used by Relay 1.""" + serviceBindingEdge( + """The method to use when ordering `ServiceBinding`.""" + orderBy: [ServiceBindingOrderBy!]! = [PRIMARY_KEY_ASC] + ): ServiceBindingEdge +} + """All input for the `updateWebhookEndpoint` mutation.""" input UpdateWebhookEndpointInput { """ diff --git a/sdk/constructive-sdk/schemas/config.graphql b/sdk/constructive-sdk/schemas/config.graphql index 63617187f9..496480e86d 100644 --- a/sdk/constructive-sdk/schemas/config.graphql +++ b/sdk/constructive-sdk/schemas/config.graphql @@ -1239,6 +1239,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -1250,6 +1255,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -1274,7 +1292,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -1301,7 +1319,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -1346,7 +1364,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -1367,7 +1385,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -1398,11 +1416,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -1411,7 +1429,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -1442,7 +1460,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -1459,7 +1477,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -1467,7 +1485,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -1476,13 +1494,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -1508,7 +1524,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -1518,22 +1534,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" diff --git a/sdk/constructive-sdk/schemas/infra.graphql b/sdk/constructive-sdk/schemas/infra.graphql index 49c184eb27..aa9c6289ae 100644 --- a/sdk/constructive-sdk/schemas/infra.graphql +++ b/sdk/constructive-sdk/schemas/infra.graphql @@ -1382,6 +1382,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -1393,6 +1398,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -1417,7 +1435,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -1444,7 +1462,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -1489,7 +1507,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -1510,7 +1528,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -1541,11 +1559,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -1554,7 +1572,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -1585,7 +1603,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -1602,7 +1620,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -1610,7 +1628,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -1619,13 +1637,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -1651,7 +1667,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -1661,22 +1677,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" diff --git a/sdk/constructive-sdk/schemas/modules.graphql b/sdk/constructive-sdk/schemas/modules.graphql index 48fd532478..4bab93bfc8 100644 --- a/sdk/constructive-sdk/schemas/modules.graphql +++ b/sdk/constructive-sdk/schemas/modules.graphql @@ -2020,7 +2020,7 @@ type BlueprintConnection { } """ -Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. +Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. """ type BlueprintConstruction { """ @@ -2047,6 +2047,11 @@ type BlueprintConstruction { """The database the blueprint was constructed into.""" databaseId: UUID! + """ + The coded error ({"code", "context", "class"} as raised through errors.raise_error, or {"code": , "message"} for a database error) a failed construction ended with. NULL unless status is failed. + """ + error: JSON + """Unique identifier for this construction attempt.""" id: UUID! @@ -2056,7 +2061,7 @@ type BlueprintConstruction { schemaId: UUID """ - Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. A failed construction raises and rolls back, so it leaves no row. + Execution state of this construction attempt. pending: enqueued, the blueprint:construct job has not started. constructing: the job is executing. constructed: successfully completed. failed: the job raised; the build rolled back and error carries its coded error. """ status: String! @@ -2122,6 +2127,9 @@ input BlueprintConstructionFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter + """Filter by the object’s `error` field.""" + error: JSONFilter + """Filter by the object’s `id` field.""" id: UUIDFilter @@ -2165,6 +2173,11 @@ input BlueprintConstructionInput { """The database the blueprint was constructed into.""" databaseId: UUID! + """ + The coded error ({"code", "context", "class"} as raised through errors.raise_error, or {"code": , "message"} for a database error) a failed construction ended with. NULL unless status is failed. + """ + error: JSON + """Unique identifier for this construction attempt.""" id: UUID @@ -2174,7 +2187,7 @@ input BlueprintConstructionInput { schemaId: UUID """ - Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. A failed construction raises and rolls back, so it leaves no row. + Execution state of this construction attempt. pending: enqueued, the blueprint:construct job has not started. constructing: the job is executing. constructed: successfully completed. failed: the job raised; the build rolled back and error carries its coded error. """ status: String @@ -2199,6 +2212,8 @@ enum BlueprintConstructionOrderBy { CREATED_AT_DESC DATABASE_ID_ASC DATABASE_ID_DESC + ERROR_ASC + ERROR_DESC ID_ASC ID_DESC NATURAL @@ -2237,6 +2252,11 @@ input BlueprintConstructionPatch { """The database the blueprint was constructed into.""" databaseId: UUID + """ + The coded error ({"code", "context", "class"} as raised through errors.raise_error, or {"code": , "message"} for a database error) a failed construction ended with. NULL unless status is failed. + """ + error: JSON + """Unique identifier for this construction attempt.""" id: UUID @@ -2246,7 +2266,7 @@ input BlueprintConstructionPatch { schemaId: UUID """ - Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. A failed construction raises and rolls back, so it leaves no row. + Execution state of this construction attempt. pending: enqueued, the blueprint:construct job has not started. constructing: the job is executing. constructed: successfully completed. failed: the job raised; the build rolled back and error carries its coded error. """ status: String @@ -13309,6 +13329,7 @@ type DomainModule { catalogModuleId: UUID databaseId: UUID! defaultCapabilities: [String] + defaultReservedSubdomains: JSON domainEventsTableId: UUID! domainEventsTableName: String! domainVerificationsTableId: UUID! @@ -13327,6 +13348,8 @@ type DomainModule { privateSchemaName: String provisions: JSON publicSchemaName: String + reservedSubdomainsTableId: UUID + reservedSubdomainsTableName: String! """Reads and enables pagination through a set of `RouteModule`.""" routeModules( @@ -13358,6 +13381,7 @@ type DomainModule { ): RouteModuleConnection! schemaId: UUID! scope: String! + sweepUnverifiedDomainsFunction: String } """A connection to a list of `DomainModule` values.""" @@ -13411,6 +13435,9 @@ input DomainModuleFilter { """Filter by the object’s `defaultCapabilities` field.""" defaultCapabilities: StringListFilter + """Filter by the object’s `defaultReservedSubdomains` field.""" + defaultReservedSubdomains: JSONFilter + """Filter by the object’s `domainEventsTableId` field.""" domainEventsTableId: UUIDFilter @@ -13471,6 +13498,12 @@ input DomainModuleFilter { """Filter by the object’s `publicSchemaName` field.""" publicSchemaName: StringFilter + """Filter by the object’s `reservedSubdomainsTableId` field.""" + reservedSubdomainsTableId: UUIDFilter + + """Filter by the object’s `reservedSubdomainsTableName` field.""" + reservedSubdomainsTableName: StringFilter + """Filter by the object’s `routeModules` relation.""" routeModules: DomainModuleToManyRouteModuleFilter @@ -13482,6 +13515,9 @@ input DomainModuleFilter { """Filter by the object’s `scope` field.""" scope: StringFilter + + """Filter by the object’s `sweepUnverifiedDomainsFunction` field.""" + sweepUnverifiedDomainsFunction: StringFilter } """An input for mutations affecting `DomainModule`""" @@ -13490,6 +13526,7 @@ input DomainModuleInput { catalogModuleId: UUID databaseId: UUID! defaultCapabilities: [String] + defaultReservedSubdomains: JSON domainEventsTableId: UUID domainEventsTableName: String domainVerificationsTableId: UUID @@ -13508,8 +13545,11 @@ input DomainModuleInput { privateSchemaName: String provisions: JSON publicSchemaName: String + reservedSubdomainsTableId: UUID + reservedSubdomainsTableName: String schemaId: UUID scope: String! + sweepUnverifiedDomainsFunction: String } """Methods to use when ordering `DomainModule`.""" @@ -13522,6 +13562,8 @@ enum DomainModuleOrderBy { DATABASE_ID_DESC DEFAULT_CAPABILITIES_ASC DEFAULT_CAPABILITIES_DESC + DEFAULT_RESERVED_SUBDOMAINS_ASC + DEFAULT_RESERVED_SUBDOMAINS_DESC DOMAINS_TABLE_ID_ASC DOMAINS_TABLE_ID_DESC DOMAINS_TABLE_NAME_ASC @@ -13561,10 +13603,16 @@ enum DomainModuleOrderBy { PROVISIONS_DESC PUBLIC_SCHEMA_NAME_ASC PUBLIC_SCHEMA_NAME_DESC + RESERVED_SUBDOMAINS_TABLE_ID_ASC + RESERVED_SUBDOMAINS_TABLE_ID_DESC + RESERVED_SUBDOMAINS_TABLE_NAME_ASC + RESERVED_SUBDOMAINS_TABLE_NAME_DESC SCHEMA_ID_ASC SCHEMA_ID_DESC SCOPE_ASC SCOPE_DESC + SWEEP_UNVERIFIED_DOMAINS_FUNCTION_ASC + SWEEP_UNVERIFIED_DOMAINS_FUNCTION_DESC } """ @@ -13575,6 +13623,7 @@ input DomainModulePatch { catalogModuleId: UUID databaseId: UUID defaultCapabilities: [String] + defaultReservedSubdomains: JSON domainEventsTableId: UUID domainEventsTableName: String domainVerificationsTableId: UUID @@ -13593,8 +13642,11 @@ input DomainModulePatch { privateSchemaName: String provisions: JSON publicSchemaName: String + reservedSubdomainsTableId: UUID + reservedSubdomainsTableName: String schemaId: UUID scope: String + sweepUnverifiedDomainsFunction: String } """ @@ -21414,6 +21466,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -21425,6 +21482,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -21449,7 +21519,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -21476,7 +21546,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -21521,7 +21591,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -21542,7 +21612,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -21573,11 +21643,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -21586,7 +21656,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -21617,7 +21687,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -21634,7 +21704,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -21642,7 +21712,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -21651,13 +21721,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -21683,7 +21751,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -21693,22 +21761,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" @@ -21745,7 +21818,7 @@ The root mutation type which contains root level fields which mutate data. """ type 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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. + Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. """ constructBlueprint( """ @@ -30289,8 +30362,6 @@ input RepositoryModulePatch { type ResourceModule { apiName: String - builderBindingsTableId: UUID! - builderBindingsTableName: String! databaseId: UUID! defaultCapabilities: [String] entityField: String @@ -30338,6 +30409,8 @@ type ResourceModule { rollupResourceUsageSummaryFunction: String! schemaId: UUID! scope: String! + serviceBindingsTableId: UUID! + serviceBindingsTableName: String! } """A connection to a list of `ResourceModule` values.""" @@ -30376,12 +30449,6 @@ input ResourceModuleFilter { """Filter by the object’s `apiName` field.""" apiName: StringFilter - """Filter by the object’s `builderBindingsTableId` field.""" - builderBindingsTableId: UUIDFilter - - """Filter by the object’s `builderBindingsTableName` field.""" - builderBindingsTableName: StringFilter - """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter @@ -30510,13 +30577,17 @@ input ResourceModuleFilter { """Filter by the object’s `scope` field.""" scope: StringFilter + + """Filter by the object’s `serviceBindingsTableId` field.""" + serviceBindingsTableId: UUIDFilter + + """Filter by the object’s `serviceBindingsTableName` field.""" + serviceBindingsTableName: StringFilter } """An input for mutations affecting `ResourceModule`""" input ResourceModuleInput { apiName: String - builderBindingsTableId: UUID - builderBindingsTableName: String databaseId: UUID! defaultCapabilities: [String] entityField: String @@ -30554,16 +30625,14 @@ input ResourceModuleInput { rollupResourceUsageSummaryFunction: String schemaId: UUID scope: String! + serviceBindingsTableId: UUID + serviceBindingsTableName: String } """Methods to use when ordering `ResourceModule`.""" enum ResourceModuleOrderBy { API_NAME_ASC API_NAME_DESC - BUILDER_BINDINGS_TABLE_ID_ASC - BUILDER_BINDINGS_TABLE_ID_DESC - BUILDER_BINDINGS_TABLE_NAME_ASC - BUILDER_BINDINGS_TABLE_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC DEFAULT_CAPABILITIES_ASC @@ -30641,6 +30710,10 @@ enum ResourceModuleOrderBy { SCHEMA_ID_DESC SCOPE_ASC SCOPE_DESC + SERVICE_BINDINGS_TABLE_ID_ASC + SERVICE_BINDINGS_TABLE_ID_DESC + SERVICE_BINDINGS_TABLE_NAME_ASC + SERVICE_BINDINGS_TABLE_NAME_DESC } """ @@ -30648,8 +30721,6 @@ Represents an update to a `ResourceModule`. Fields that are set will be updated. """ input ResourceModulePatch { apiName: String - builderBindingsTableId: UUID - builderBindingsTableName: String databaseId: UUID defaultCapabilities: [String] entityField: String @@ -30687,6 +30758,8 @@ input ResourceModulePatch { rollupResourceUsageSummaryFunction: String schemaId: UUID scope: String + serviceBindingsTableId: UUID + serviceBindingsTableName: String } type RlsModule { diff --git a/sdk/constructive-sdk/schemas/objects.graphql b/sdk/constructive-sdk/schemas/objects.graphql index 97828c7c0a..b1675dffcd 100644 --- a/sdk/constructive-sdk/schemas/objects.graphql +++ b/sdk/constructive-sdk/schemas/objects.graphql @@ -732,6 +732,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -743,6 +748,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -767,7 +785,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -794,7 +812,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -839,7 +857,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -860,7 +878,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -891,11 +909,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -904,7 +922,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -935,7 +953,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -952,7 +970,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -960,7 +978,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -969,13 +987,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -1001,7 +1017,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -1011,22 +1027,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" diff --git a/sdk/constructive-sdk/schemas/remote.graphql b/sdk/constructive-sdk/schemas/remote.graphql index 8fae919c48..5481ac1847 100644 --- a/sdk/constructive-sdk/schemas/remote.graphql +++ b/sdk/constructive-sdk/schemas/remote.graphql @@ -1558,6 +1558,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -1569,6 +1574,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -1593,7 +1611,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -1620,7 +1638,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -1665,7 +1683,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -1686,7 +1704,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -1717,11 +1735,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -1730,7 +1748,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -1761,7 +1779,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -1778,7 +1796,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -1786,7 +1804,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -1795,13 +1813,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -1827,7 +1843,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -1837,22 +1853,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" @@ -2028,6 +2049,7 @@ type Query { Metadata about the database schema, including tables, fields, indexes, and constraints. Useful for code generation tools. """ _meta: MetaSchema + currentDatabaseId: UUID """Reads and enables pagination through a set of `MachineMessage`.""" machineMessages( diff --git a/sdk/constructive-sdk/schemas/storage.graphql b/sdk/constructive-sdk/schemas/storage.graphql index c7dec0428d..f1639134c0 100644 --- a/sdk/constructive-sdk/schemas/storage.graphql +++ b/sdk/constructive-sdk/schemas/storage.graphql @@ -1571,6 +1571,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -1582,6 +1587,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -1606,7 +1624,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -1633,7 +1651,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -1678,7 +1696,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -1699,7 +1717,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -1730,11 +1748,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -1743,7 +1761,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -1774,7 +1792,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -1791,7 +1809,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -1799,7 +1817,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -1808,13 +1826,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -1840,7 +1856,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -1850,22 +1866,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" diff --git a/sdk/constructive-sdk/schemas/usage.graphql b/sdk/constructive-sdk/schemas/usage.graphql index 10ae242d21..b6fde82726 100644 --- a/sdk/constructive-sdk/schemas/usage.graphql +++ b/sdk/constructive-sdk/schemas/usage.graphql @@ -3269,6 +3269,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -3280,6 +3285,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -3304,7 +3322,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -3331,7 +3349,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -3376,7 +3394,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -3397,7 +3415,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -3428,11 +3446,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -3441,7 +3459,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -3472,7 +3490,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -3489,7 +3507,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -3497,7 +3515,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -3506,13 +3524,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -3538,7 +3554,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -3548,22 +3564,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)""" diff --git a/sdk/constructive-sdk/src/api/README.md b/sdk/constructive-sdk/src/api/README.md index bb5f974e11..42825b6cda 100644 --- a/sdk/constructive-sdk/src/api/README.md +++ b/sdk/constructive-sdk/src/api/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 90 -- **Custom queries:** 18 -- **Custom mutations:** 31 +- **Tables:** 91 +- **Custom queries:** 14 +- **Custom mutations:** 29 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/api/orm/README.md b/sdk/constructive-sdk/src/api/orm/README.md index 02e465c85e..66090e441e 100644 --- a/sdk/constructive-sdk/src/api/orm/README.md +++ b/sdk/constructive-sdk/src/api/orm/README.md @@ -70,6 +70,7 @@ const db = createClient({ | `platformGetSitePreviewsRecord` | findMany, findOne, create, update, delete | | `platformManagedDomain` | findMany, findOne, create, update, delete | | `platformPage` | findMany, findOne, create, update, delete | +| `platformReservedSubdomain` | findMany, findOne, create, update, delete | | `platformSiteAppLink` | findMany, findOne, create, update, delete | | `platformSite` | findMany, findOne, create, update, delete | | `platformSiteDeepLink` | findMany, findOne, create, update, delete | @@ -126,7 +127,6 @@ CRUD operations for Api records. | `config` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `dbname` | String | Yes | | `id` | UUID | No | | `isPublished` | Boolean | Yes | | `name` | String | Yes | @@ -137,13 +137,13 @@ CRUD operations for Api records. ```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(); +const items = await db.api.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: 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(); +const item = await db.api.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: 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(); +const created = await db.api.create({ data: { anonRole: '', config: '', databaseId: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); // Update const updated = await db.api.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); @@ -1601,7 +1601,6 @@ CRUD operations for PlatformApi records. | `anonRole` | String | Yes | | `config` | JSON | Yes | | `createdAt` | Datetime | No | -| `dbname` | String | Yes | | `id` | UUID | No | | `isPublished` | Boolean | Yes | | `name` | String | Yes | @@ -1612,13 +1611,13 @@ CRUD operations for PlatformApi records. ```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(); +const items = await db.platformApi.findMany({ select: { anonRole: true, config: true, createdAt: 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(); +const item = await db.platformApi.findOne({ id: '', select: { anonRole: true, config: true, createdAt: 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(); +const created = await db.platformApi.create({ data: { anonRole: '', config: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformApi.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); @@ -2100,6 +2099,42 @@ const updated = await db.platformPage.update({ where: { id: '' }, data: { const deleted = await db.platformPage.delete({ where: { id: '' } }).execute(); ``` +### `db.platformReservedSubdomain` + +CRUD operations for PlatformReservedSubdomain records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `createdByPrincipal` | UUID | Yes | +| `id` | UUID | No | +| `label` | String | Yes | +| `match` | String | Yes | +| `reason` | String | Yes | +| `updatedAt` | Datetime | No | +| `updatedByPrincipal` | UUID | Yes | + +**Operations:** + +```typescript +// List all platformReservedSubdomain records +const items = await db.platformReservedSubdomain.findMany({ select: { createdAt: true, createdByPrincipal: true, id: true, label: true, match: true, reason: true, updatedAt: true, updatedByPrincipal: true } }).execute(); + +// Get one by id +const item = await db.platformReservedSubdomain.findOne({ id: '', select: { createdAt: true, createdByPrincipal: true, id: true, label: true, match: true, reason: true, updatedAt: true, updatedByPrincipal: true } }).execute(); + +// Create +const created = await db.platformReservedSubdomain.create({ data: { createdByPrincipal: '', label: '', match: '', reason: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformReservedSubdomain.update({ where: { id: '' }, data: { createdByPrincipal: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformReservedSubdomain.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformSiteAppLink` CRUD operations for PlatformSiteAppLink records. @@ -3706,21 +3741,6 @@ const deleted = await db.webauthnSetting.delete({ where: { id: '' } }).exe ## Custom Operations -### `db.query.apiSchemaNames` - -apiSchemaNames - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `targetApiId` | UUID | - -```typescript -const result = await db.query.apiSchemaNames({ targetApiId: '' }).execute(); -``` - ### `db.query.applyRegistryDefaults` applyRegistryDefaults @@ -3891,54 +3911,6 @@ platformVerifySitePreviewToken const result = await db.query.platformVerifySitePreviewToken({ siteId: '', token: '' }).execute(); ``` -### `db.query.resolveDeepLink` - -resolveDeepLink - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `linkSlug` | String | - | `targetSiteId` | UUID | - -```typescript -const result = await db.query.resolveDeepLink({ linkSlug: '', targetSiteId: '' }).execute(); -``` - -### `db.query.resolveRoute` - -resolveRoute - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `requestHost` | String | - | `requestMethod` | String | - | `requestPath` | String | - -```typescript -const result = await db.query.resolveRoute({ requestHost: '', requestMethod: '', requestPath: '' }).execute(); -``` - -### `db.query.resolveSiteAppLinks` - -resolveSiteAppLinks - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `targetSiteId` | UUID | - -```typescript -const result = await db.query.resolveSiteAppLinks({ targetSiteId: '' }).execute(); -``` - ### `db.query.sitesDeepLinkUrl` sitesDeepLinkUrl @@ -4031,21 +4003,6 @@ cancelDatabaseTransfer const result = await db.mutation.cancelDatabaseTransfer({ input: { transferId: '' } }).execute(); ``` -### `db.mutation.createFunctionFromSource` - -Creates a `Function` from its `CREATE FUNCTION` source text. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | CreateFunctionFromSourceInput (required) | - -```typescript -const result = await db.mutation.createFunctionFromSource({ input: { apiExposed: '', databaseId: '', schemaId: '', source: '' } }).execute(); -``` - ### `db.mutation.deleteSitePreview` deleteSitePreview @@ -4447,18 +4404,3 @@ unsuspendDatabase ```typescript const result = await db.mutation.unsuspendDatabase({ input: { databaseId: '', reason: '' } }).execute(); ``` - -### `db.mutation.updateFunctionFromSource` - -Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | UpdateFunctionFromSourceInput (required) | - -```typescript -const result = await db.mutation.updateFunctionFromSource({ input: { id: '', source: '' } }).execute(); -``` diff --git a/sdk/constructive-sdk/src/api/orm/index.ts b/sdk/constructive-sdk/src/api/orm/index.ts index 038b8785ac..eb190bc93d 100644 --- a/sdk/constructive-sdk/src/api/orm/index.ts +++ b/sdk/constructive-sdk/src/api/orm/index.ts @@ -54,6 +54,7 @@ import { PlatformEmailSiteIdentityModel } from './models/platformEmailSiteIdenti import { PlatformGetSitePreviewsRecordModel } from './models/platformGetSitePreviewsRecord'; import { PlatformManagedDomainModel } from './models/platformManagedDomain'; import { PlatformPageModel } from './models/platformPage'; +import { PlatformReservedSubdomainModel } from './models/platformReservedSubdomain'; import { PlatformSiteAppLinkModel } from './models/platformSiteAppLink'; import { PlatformSiteModel } from './models/platformSite'; import { PlatformSiteDeepLinkModel } from './models/platformSiteDeepLink'; @@ -179,6 +180,7 @@ export function createClient(config: OrmClientConfig) { platformGetSitePreviewsRecord: new PlatformGetSitePreviewsRecordModel(client), platformManagedDomain: new PlatformManagedDomainModel(client), platformPage: new PlatformPageModel(client), + platformReservedSubdomain: new PlatformReservedSubdomainModel(client), platformSiteAppLink: new PlatformSiteAppLinkModel(client), platformSite: new PlatformSiteModel(client), platformSiteDeepLink: new PlatformSiteDeepLinkModel(client), diff --git a/sdk/constructive-sdk/src/api/orm/input-types.ts b/sdk/constructive-sdk/src/api/orm/input-types.ts index f4e5da7908..38d819c123 100644 --- a/sdk/constructive-sdk/src/api/orm/input-types.ts +++ b/sdk/constructive-sdk/src/api/orm/input-types.ts @@ -245,8 +245,6 @@ export interface Api { 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; @@ -945,8 +943,6 @@ export interface PlatformApi { /** 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; @@ -1229,6 +1225,20 @@ export interface PlatformPage { /** Timestamp of last modification */ updatedAt?: string | null; } +/** Subdomain labels no tenant may claim under a platform apex */ +export interface PlatformReservedSubdomain { + createdAt?: string | null; + createdByPrincipal?: string | null; + id: string; + /** Lowercase subdomain label, or the label prefix/suffix the match names */ + label?: string | null; + /** How the label matches a claimed label: exact, prefix or suffix */ + match?: string | null; + /** Why the label is reserved (free text, e.g. platform, brand, lookalike) */ + reason?: string | null; + updatedAt?: string | null; + updatedByPrincipal?: string | null; +} /** Per-host native-app association for a site surface: which app-owned store identity this host serves, and the path patterns it claims (joined with the store identity to render AASA / assetlinks.json) */ export interface PlatformSiteAppLink { /** App-owned store identity this association serves (app_store_identities row in this scope's app plane; the association carries no store facts of its own) */ @@ -2203,6 +2213,7 @@ export interface PlatformManagedDomainRelations { export interface PlatformPageRelations { site?: PlatformSite | null; } +export interface PlatformReservedSubdomainRelations {} export interface PlatformSiteAppLinkRelations { site?: PlatformSite | null; } @@ -2490,6 +2501,8 @@ export type PlatformGetSitePreviewsRecordWithRelations = PlatformGetSitePreviews export type PlatformManagedDomainWithRelations = PlatformManagedDomain & PlatformManagedDomainRelations; export type PlatformPageWithRelations = PlatformPage & PlatformPageRelations; +export type PlatformReservedSubdomainWithRelations = PlatformReservedSubdomain & + PlatformReservedSubdomainRelations; export type PlatformSiteAppLinkWithRelations = PlatformSiteAppLink & PlatformSiteAppLinkRelations; export type PlatformSiteWithRelations = PlatformSite & PlatformSiteRelations; export type PlatformSiteDeepLinkWithRelations = PlatformSiteDeepLink & @@ -2543,7 +2556,6 @@ export type ApiSelect = { config?: boolean; createdAt?: boolean; databaseId?: boolean; - dbname?: boolean; id?: boolean; isPublished?: boolean; name?: boolean; @@ -3547,7 +3559,6 @@ export type PlatformApiSelect = { anonRole?: boolean; config?: boolean; createdAt?: boolean; - dbname?: boolean; id?: boolean; isPublished?: boolean; name?: boolean; @@ -3802,6 +3813,16 @@ export type PlatformPageSelect = { select: PlatformSiteSelect; }; }; +export type PlatformReservedSubdomainSelect = { + createdAt?: boolean; + createdByPrincipal?: boolean; + id?: boolean; + label?: boolean; + match?: boolean; + reason?: boolean; + updatedAt?: boolean; + updatedByPrincipal?: boolean; +}; export type PlatformSiteAppLinkSelect = { appStoreIdentityId?: boolean; createdAt?: boolean; @@ -4949,8 +4970,6 @@ export interface ApiFilter { 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. */ @@ -6478,8 +6497,6 @@ export interface PlatformApiFilter { 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. */ @@ -6936,6 +6953,30 @@ export interface PlatformPageFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface PlatformReservedSubdomainFilter { + /** Checks for all expressions in this list. */ + and?: PlatformReservedSubdomainFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `label` field. */ + label?: StringFilter; + /** Filter by the object’s `match` field. */ + match?: StringFilter; + /** Negates the expression. */ + not?: PlatformReservedSubdomainFilter; + /** Checks for any expressions in this list. */ + or?: PlatformReservedSubdomainFilter[]; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} export interface PlatformSiteAppLinkFilter { /** Checks for all expressions in this list. */ and?: PlatformSiteAppLinkFilter[]; @@ -8650,8 +8691,6 @@ export type ApiOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLISHED_ASC' @@ -9726,8 +9765,6 @@ export type PlatformApiOrderBy = | 'CONFIG_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLISHED_ASC' @@ -10063,6 +10100,26 @@ export type PlatformPageOrderBy = | 'STORE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type PlatformReservedSubdomainOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LABEL_ASC' + | 'LABEL_DESC' + | 'MATCH_ASC' + | 'MATCH_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REASON_ASC' + | 'REASON_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; export type PlatformSiteAppLinkOrderBy = | 'APP_STORE_IDENTITY_ID_ASC' | 'APP_STORE_IDENTITY_ID_DESC' @@ -11144,7 +11201,6 @@ export interface CreateApiInput { anonRole?: string; config?: Record; databaseId: string; - dbname?: string; isPublished?: boolean; name: string; roleName?: string; @@ -11154,7 +11210,6 @@ export interface ApiPatch { anonRole?: string | null; config?: Record | null; databaseId?: string | null; - dbname?: string | null; isPublished?: boolean | null; name?: string | null; roleName?: string | null; @@ -12479,7 +12534,6 @@ export interface CreatePlatformApiInput { platformApi: { anonRole?: string; config?: Record; - dbname?: string; isPublished?: boolean; name: string; roleName?: string; @@ -12488,7 +12542,6 @@ export interface CreatePlatformApiInput { export interface PlatformApiPatch { anonRole?: string | null; config?: Record | null; - dbname?: string | null; isPublished?: boolean | null; name?: string | null; roleName?: string | null; @@ -12902,6 +12955,32 @@ export interface DeletePlatformPageInput { clientMutationId?: string; id: string; } +export interface CreatePlatformReservedSubdomainInput { + clientMutationId?: string; + platformReservedSubdomain: { + createdByPrincipal?: string; + label: string; + match?: string; + reason?: string; + updatedByPrincipal?: string; + }; +} +export interface PlatformReservedSubdomainPatch { + createdByPrincipal?: string | null; + label?: string | null; + match?: string | null; + reason?: string | null; + updatedByPrincipal?: string | null; +} +export interface UpdatePlatformReservedSubdomainInput { + clientMutationId?: string; + id: string; + platformReservedSubdomainPatch: PlatformReservedSubdomainPatch; +} +export interface DeletePlatformReservedSubdomainInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformSiteAppLinkInput { clientMutationId?: string; platformSiteAppLink: { @@ -14423,15 +14502,6 @@ export interface CancelDatabaseTransferInput { clientMutationId?: string; transferId?: string; } -/** Author a function from its `CREATE FUNCTION` source text. */ -export interface CreateFunctionFromSourceInput { - apiExposed?: boolean; - clientMutationId?: string; - databaseId: string; - schemaId: string; - /** One `CREATE FUNCTION` statement (LANGUAGE plpgsql or sql). */ - source: string; -} export interface DeleteSitePreviewInput { clientMutationId?: string; targetName?: string; @@ -14599,13 +14669,6 @@ export interface UnsuspendDatabaseInput { databaseId?: string; reason?: string; } -/** Replace a function's definition from its `CREATE FUNCTION` source text. */ -export interface UpdateFunctionFromSourceInput { - clientMutationId?: string; - id: string; - /** One `CREATE FUNCTION` statement (LANGUAGE plpgsql or sql). */ - source: string; -} /** A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ export interface ApiToManyApiSchemaFilter { /** Filters to entities where every related entity matches. */ @@ -15627,8 +15690,6 @@ export interface ApiInput { 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; @@ -16319,8 +16380,6 @@ export interface PlatformApiInput { /** 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; @@ -16599,6 +16658,20 @@ export interface PlatformPageInput { /** Timestamp of last modification */ updatedAt?: string; } +/** An input for mutations affecting `PlatformReservedSubdomain` */ +export interface PlatformReservedSubdomainInput { + createdAt?: string; + createdByPrincipal?: string; + id?: string; + /** Lowercase subdomain label, or the label prefix/suffix the match names */ + label: string; + /** How the label matches a claimed label: exact, prefix or suffix */ + match?: string; + /** Why the label is reserved (free text, e.g. platform, brand, lookalike) */ + reason?: string; + updatedAt?: string; + updatedByPrincipal?: string; +} /** An input for mutations affecting `PlatformSiteAppLink` */ export interface PlatformSiteAppLinkInput { /** App-owned store identity this association serves (app_store_identities row in this scope's app plane; the association carries no store facts of its own) */ @@ -19675,8 +19748,6 @@ export interface ApiFilter { 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. */ @@ -20445,8 +20516,6 @@ export interface PlatformApiFilter { 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. */ @@ -21069,44 +21138,6 @@ export interface BigIntFilter { notIn?: string[]; } // ============ Payload/Return Types (for custom operations) ============ -export interface ResolveRouteRecord { - domainId?: string | null; - hostname?: string | null; - matchedPath?: string | null; - matchedWildcard?: boolean | null; - method?: string | null; - priority?: number | null; - resolvedConfig?: Record | null; - routeBindingId?: string | null; - servingLane?: string | null; - targetCatalogId?: string | null; - targetModule?: string | null; - targetOwnerKey?: string | null; - targetOwnerScope?: string | null; - targetSourceId?: string | null; - tlsSecretName?: string | null; - tlsStatus?: string | null; - verificationStatus?: string | null; -} -export type ResolveRouteRecordSelect = { - domainId?: boolean; - hostname?: boolean; - matchedPath?: boolean; - matchedWildcard?: boolean; - method?: boolean; - priority?: boolean; - resolvedConfig?: boolean; - routeBindingId?: boolean; - servingLane?: boolean; - targetCatalogId?: boolean; - targetModule?: boolean; - targetOwnerKey?: boolean; - targetOwnerScope?: boolean; - targetSourceId?: boolean; - tlsSecretName?: boolean; - tlsStatus?: boolean; - verificationStatus?: boolean; -}; export interface AcceptDatabaseTransferPayload { clientMutationId?: string | null; result?: boolean | null; @@ -21129,21 +21160,6 @@ export type CancelDatabaseTransferPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface CreateFunctionPayload { - clientMutationId?: string | null; - /** The `Function` that was created by this mutation. */ - function?: Function | null; - functionEdge?: FunctionEdge | null; -} -export type CreateFunctionPayloadSelect = { - clientMutationId?: boolean; - function?: { - select: FunctionSelect; - }; - functionEdge?: { - select: FunctionEdgeSelect; - }; -}; export interface DeleteSitePreviewPayload { clientMutationId?: string | null; } @@ -21411,21 +21427,6 @@ export type UnsuspendDatabasePayloadSelect = { select: DatabaseSelect; }; }; -export interface UpdateFunctionPayload { - clientMutationId?: string | null; - /** The `Function` that was updated by this mutation. */ - function?: Function | null; - functionEdge?: FunctionEdge | null; -} -export type UpdateFunctionPayloadSelect = { - clientMutationId?: boolean; - function?: { - select: FunctionSelect; - }; - functionEdge?: { - select: FunctionEdgeSelect; - }; -}; export interface CreateApiPayload { /** The `Api` that was created by this mutation. */ api?: Api | null; @@ -22596,6 +22597,36 @@ export type DeleteFullTextSearchPayloadSelect = { select: FullTextSearchEdgeSelect; }; }; +export interface CreateFunctionPayload { + clientMutationId?: string | null; + /** The `Function` that was created by this mutation. */ + function?: Function | null; + functionEdge?: FunctionEdge | null; +} +export type CreateFunctionPayloadSelect = { + clientMutationId?: boolean; + function?: { + select: FunctionSelect; + }; + functionEdge?: { + select: FunctionEdgeSelect; + }; +}; +export interface UpdateFunctionPayload { + clientMutationId?: string | null; + /** The `Function` that was updated by this mutation. */ + function?: Function | null; + functionEdge?: FunctionEdge | null; +} +export type UpdateFunctionPayloadSelect = { + clientMutationId?: boolean; + function?: { + select: FunctionSelect; + }; + functionEdge?: { + select: FunctionEdgeSelect; + }; +}; export interface DeleteFunctionPayload { clientMutationId?: string | null; /** The `Function` that was deleted by this mutation. */ @@ -23421,6 +23452,51 @@ export type DeletePlatformPagePayloadSelect = { select: PlatformPageEdgeSelect; }; }; +export interface CreatePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was created by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} +export type CreatePlatformReservedSubdomainPayloadSelect = { + clientMutationId?: boolean; + platformReservedSubdomain?: { + select: PlatformReservedSubdomainSelect; + }; + platformReservedSubdomainEdge?: { + select: PlatformReservedSubdomainEdgeSelect; + }; +}; +export interface UpdatePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was updated by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} +export type UpdatePlatformReservedSubdomainPayloadSelect = { + clientMutationId?: boolean; + platformReservedSubdomain?: { + select: PlatformReservedSubdomainSelect; + }; + platformReservedSubdomainEdge?: { + select: PlatformReservedSubdomainEdgeSelect; + }; +}; +export interface DeletePlatformReservedSubdomainPayload { + clientMutationId?: string | null; + /** The `PlatformReservedSubdomain` that was deleted by this mutation. */ + platformReservedSubdomain?: PlatformReservedSubdomain | null; + platformReservedSubdomainEdge?: PlatformReservedSubdomainEdge | null; +} +export type DeletePlatformReservedSubdomainPayloadSelect = { + clientMutationId?: boolean; + platformReservedSubdomain?: { + select: PlatformReservedSubdomainSelect; + }; + platformReservedSubdomainEdge?: { + select: PlatformReservedSubdomainEdgeSelect; + }; +}; export interface CreatePlatformSiteAppLinkPayload { clientMutationId?: string | null; /** The `PlatformSiteAppLink` that was created by this mutation. */ @@ -25221,18 +25297,6 @@ export type DeleteWebauthnSettingPayloadSelect = { select: WebauthnSettingEdgeSelect; }; }; -/** A `Function` edge in the connection. */ -export interface FunctionEdge { - cursor?: string | null; - /** The `Function` at the end of the edge. */ - node?: Function | null; -} -export type FunctionEdgeSelect = { - cursor?: boolean; - node?: { - select: FunctionSelect; - }; -}; /** A `Domain` edge in the connection. */ export interface DomainEdge { cursor?: string | null; @@ -25725,6 +25789,18 @@ export type FullTextSearchEdgeSelect = { select: FullTextSearchSelect; }; }; +/** A `Function` edge in the connection. */ +export interface FunctionEdge { + cursor?: string | null; + /** The `Function` at the end of the edge. */ + node?: Function | null; +} +export type FunctionEdgeSelect = { + cursor?: boolean; + node?: { + select: FunctionSelect; + }; +}; /** A `IdentityProviderRegistry` edge in the connection. */ export interface IdentityProviderRegistryEdge { cursor?: string | null; @@ -25929,6 +26005,18 @@ export type PlatformPageEdgeSelect = { select: PlatformPageSelect; }; }; +/** A `PlatformReservedSubdomain` edge in the connection. */ +export interface PlatformReservedSubdomainEdge { + cursor?: string | null; + /** The `PlatformReservedSubdomain` at the end of the edge. */ + node?: PlatformReservedSubdomain | null; +} +export type PlatformReservedSubdomainEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformReservedSubdomainSelect; + }; +}; /** A `PlatformSiteAppLink` edge in the connection. */ export interface PlatformSiteAppLinkEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/api/orm/models/index.ts b/sdk/constructive-sdk/src/api/orm/models/index.ts index 207f507c84..3cd2ba5b52 100644 --- a/sdk/constructive-sdk/src/api/orm/models/index.ts +++ b/sdk/constructive-sdk/src/api/orm/models/index.ts @@ -52,6 +52,7 @@ export { PlatformEmailSiteIdentityModel } from './platformEmailSiteIdentity'; export { PlatformGetSitePreviewsRecordModel } from './platformGetSitePreviewsRecord'; export { PlatformManagedDomainModel } from './platformManagedDomain'; export { PlatformPageModel } from './platformPage'; +export { PlatformReservedSubdomainModel } from './platformReservedSubdomain'; export { PlatformSiteAppLinkModel } from './platformSiteAppLink'; export { PlatformSiteModel } from './platformSite'; export { PlatformSiteDeepLinkModel } from './platformSiteDeepLink'; diff --git a/sdk/constructive-sdk/src/api/orm/models/platformReservedSubdomain.ts b/sdk/constructive-sdk/src/api/orm/models/platformReservedSubdomain.ts new file mode 100644 index 0000000000..ab3f3b97e5 --- /dev/null +++ b/sdk/constructive-sdk/src/api/orm/models/platformReservedSubdomain.ts @@ -0,0 +1,247 @@ +/** + * PlatformReservedSubdomain 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 { + PlatformReservedSubdomain, + PlatformReservedSubdomainWithRelations, + PlatformReservedSubdomainSelect, + PlatformReservedSubdomainFilter, + PlatformReservedSubdomainOrderBy, + CreatePlatformReservedSubdomainInput, + UpdatePlatformReservedSubdomainInput, + PlatformReservedSubdomainPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformReservedSubdomainModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformReservedSubdomains: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformReservedSubdomain', + 'platformReservedSubdomains', + 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, + }, + 'PlatformReservedSubdomainFilter', + 'PlatformReservedSubdomainOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformReservedSubdomain', + fieldName: 'platformReservedSubdomains', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformReservedSubdomain: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformReservedSubdomain', + 'platformReservedSubdomains', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformReservedSubdomainFilter', + 'PlatformReservedSubdomainOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformReservedSubdomain', + fieldName: 'platformReservedSubdomain', + document, + variables, + transform: (data: { + platformReservedSubdomains?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformReservedSubdomain: data.platformReservedSubdomains?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformReservedSubdomain: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformReservedSubdomain', + 'platformReservedSubdomains', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformReservedSubdomainFilter', + 'PlatformReservedSubdomainOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformReservedSubdomain', + fieldName: 'platformReservedSubdomain', + document, + variables, + transform: (data: { + platformReservedSubdomains?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformReservedSubdomain: data.platformReservedSubdomains?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformReservedSubdomain', + 'createPlatformReservedSubdomain', + 'platformReservedSubdomain', + args.select, + args.data, + 'CreatePlatformReservedSubdomainInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformReservedSubdomain', + fieldName: 'createPlatformReservedSubdomain', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformReservedSubdomainPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformReservedSubdomain', + 'updatePlatformReservedSubdomain', + 'platformReservedSubdomain', + args.select, + args.where.id, + args.data, + 'UpdatePlatformReservedSubdomainInput', + 'id', + 'platformReservedSubdomainPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformReservedSubdomain', + fieldName: 'updatePlatformReservedSubdomain', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformReservedSubdomain: { + platformReservedSubdomain: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformReservedSubdomain', + 'deletePlatformReservedSubdomain', + 'platformReservedSubdomain', + { + id: args.where.id, + }, + 'DeletePlatformReservedSubdomainInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformReservedSubdomain', + fieldName: 'deletePlatformReservedSubdomain', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/api/orm/mutation/index.ts b/sdk/constructive-sdk/src/api/orm/mutation/index.ts index 0afacc078c..2e33f95824 100644 --- a/sdk/constructive-sdk/src/api/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/api/orm/mutation/index.ts @@ -10,7 +10,6 @@ import type { AcceptDatabaseTransferInput, ApplyRlsInput, CancelDatabaseTransferInput, - CreateFunctionFromSourceInput, DeleteSitePreviewInput, DomainsAssignSubdomainInput, MintSitePreviewTokenInput, @@ -37,11 +36,9 @@ import type { SitesProvisionStaticSiteInput, SuspendDatabaseInput, UnsuspendDatabaseInput, - UpdateFunctionFromSourceInput, AcceptDatabaseTransferPayload, ApplyRlsPayload, CancelDatabaseTransferPayload, - CreateFunctionPayload, DeleteSitePreviewPayload, DomainsAssignSubdomainPayload, MintSitePreviewTokenPayload, @@ -68,11 +65,9 @@ import type { SitesProvisionStaticSitePayload, SuspendDatabasePayload, UnsuspendDatabasePayload, - UpdateFunctionPayload, AcceptDatabaseTransferPayloadSelect, ApplyRlsPayloadSelect, CancelDatabaseTransferPayloadSelect, - CreateFunctionPayloadSelect, DeleteSitePreviewPayloadSelect, DomainsAssignSubdomainPayloadSelect, MintSitePreviewTokenPayloadSelect, @@ -99,7 +94,6 @@ import type { SitesProvisionStaticSitePayloadSelect, SuspendDatabasePayloadSelect, UnsuspendDatabasePayloadSelect, - UpdateFunctionPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface AcceptDatabaseTransferVariables { @@ -111,13 +105,6 @@ export interface ApplyRlsVariables { export interface CancelDatabaseTransferVariables { input: CancelDatabaseTransferInput; } -/** - * Variables for createFunctionFromSource - * Creates a `Function` from its `CREATE FUNCTION` source text. - */ -export interface CreateFunctionFromSourceVariables { - input: CreateFunctionFromSourceInput; -} export interface DeleteSitePreviewVariables { input: DeleteSitePreviewInput; } @@ -216,13 +203,6 @@ export interface SuspendDatabaseVariables { export interface UnsuspendDatabaseVariables { input: UnsuspendDatabaseInput; } -/** - * Variables for updateFunctionFromSource - * Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. - */ -export interface UpdateFunctionFromSourceVariables { - input: UpdateFunctionFromSourceInput; -} export function createMutationOperations(client: OrmClient) { return { acceptDatabaseTransfer: ( @@ -312,35 +292,6 @@ export function createMutationOperations(client: OrmClient) { 'CancelDatabaseTransferPayload' ), }), - createFunctionFromSource: ( - args: CreateFunctionFromSourceVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - createFunctionFromSource: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'CreateFunctionFromSource', - fieldName: 'createFunctionFromSource', - ...buildCustomDocument( - 'mutation', - 'CreateFunctionFromSource', - 'createFunctionFromSource', - options.select, - args, - [ - { - name: 'input', - type: 'CreateFunctionFromSourceInput!', - }, - ], - connectionFieldsMap, - 'CreateFunctionPayload' - ), - }), deleteSitePreview: ( args: DeleteSitePreviewVariables, options: { @@ -1113,34 +1064,5 @@ export function createMutationOperations(client: OrmClient) { 'UnsuspendDatabasePayload' ), }), - updateFunctionFromSource: ( - args: UpdateFunctionFromSourceVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - updateFunctionFromSource: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'UpdateFunctionFromSource', - fieldName: 'updateFunctionFromSource', - ...buildCustomDocument( - 'mutation', - 'UpdateFunctionFromSource', - 'updateFunctionFromSource', - options.select, - args, - [ - { - name: 'input', - type: 'UpdateFunctionFromSourceInput!', - }, - ], - connectionFieldsMap, - 'UpdateFunctionPayload' - ), - }), }; } diff --git a/sdk/constructive-sdk/src/api/orm/query/index.ts b/sdk/constructive-sdk/src/api/orm/query/index.ts index 12ea7b4e72..cfae605185 100644 --- a/sdk/constructive-sdk/src/api/orm/query/index.ts +++ b/sdk/constructive-sdk/src/api/orm/query/index.ts @@ -6,11 +6,7 @@ import { OrmClient } from '../client'; import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; -import type { ResolveRouteRecord, ResolveRouteRecordSelect } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export interface ApiSchemaNamesVariables { - targetApiId?: string; -} export interface ApplyRegistryDefaultsVariables { data?: unknown; nodeType?: string; @@ -50,18 +46,6 @@ export interface PlatformVerifySitePreviewTokenVariables { siteId?: string; token?: string; } -export interface ResolveDeepLinkVariables { - linkSlug?: string; - targetSiteId?: string; -} -export interface ResolveRouteVariables { - requestHost?: string; - requestMethod?: string; - requestPath?: string; -} -export interface ResolveSiteAppLinksVariables { - targetSiteId?: string; -} export interface SitesDeepLinkUrlVariables { linkSlug?: string; targetSiteId?: string; @@ -75,35 +59,6 @@ export interface VerifySitePreviewTokenVariables { } export function createQueryOperations(client: OrmClient) { return { - apiSchemaNames: ( - args: ApiSchemaNamesVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - apiSchemaNames: unknown | null; - }>({ - client, - operation: 'query', - operationName: 'ApiSchemaNames', - fieldName: 'apiSchemaNames', - ...buildCustomDocument( - 'query', - 'ApiSchemaNames', - 'apiSchemaNames', - options?.select, - args, - [ - { - name: 'targetApiId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), applyRegistryDefaults: ( args: ApplyRegistryDefaultsVariables, options?: { @@ -449,105 +404,6 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - resolveDeepLink: ( - args: ResolveDeepLinkVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveDeepLink: unknown | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveDeepLink', - fieldName: 'resolveDeepLink', - ...buildCustomDocument( - 'query', - 'ResolveDeepLink', - 'resolveDeepLink', - options?.select, - args, - [ - { - name: 'linkSlug', - type: 'String', - }, - { - name: 'targetSiteId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), - resolveRoute: ( - args: ResolveRouteVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - resolveRoute: InferSelectResult | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveRoute', - fieldName: 'resolveRoute', - ...buildCustomDocument( - 'query', - 'ResolveRoute', - 'resolveRoute', - options.select, - args, - [ - { - name: 'requestHost', - type: 'String', - }, - { - name: 'requestMethod', - type: 'String', - }, - { - name: 'requestPath', - type: 'String', - }, - ], - connectionFieldsMap, - 'ResolveRouteRecord' - ), - }), - resolveSiteAppLinks: ( - args: ResolveSiteAppLinksVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveSiteAppLinks: unknown | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveSiteAppLinks', - fieldName: 'resolveSiteAppLinks', - ...buildCustomDocument( - 'query', - 'ResolveSiteAppLinks', - 'resolveSiteAppLinks', - options?.select, - args, - [ - { - name: 'targetSiteId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), sitesDeepLinkUrl: ( args: SitesDeepLinkUrlVariables, options?: { diff --git a/sdk/constructive-sdk/src/auth/README.md b/sdk/constructive-sdk/src/auth/README.md index 2a8205f6cc..e15b5187ee 100644 --- a/sdk/constructive-sdk/src/auth/README.md +++ b/sdk/constructive-sdk/src/auth/README.md @@ -9,8 +9,8 @@ ## Overview - **Tables:** 15 -- **Custom queries:** 6 -- **Custom mutations:** 55 +- **Custom queries:** 7 +- **Custom mutations:** 56 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/auth/orm/README.md b/sdk/constructive-sdk/src/auth/orm/README.md index 6e93f55c69..ea78b8958e 100644 --- a/sdk/constructive-sdk/src/auth/orm/README.md +++ b/sdk/constructive-sdk/src/auth/orm/README.md @@ -662,6 +662,17 @@ requireStepUp const result = await db.query.requireStepUp({ stepUpType: '' }).execute(); ``` +### `db.query.signInOptions` + +signInOptions + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.signInOptions().execute(); +``` + ### `db.mutation.approveDevice` approveDevice @@ -739,7 +750,7 @@ const result = await db.mutation.confirmTotpSetup({ input: { totpValue: '' }).execute(); ``` +### `db.mutation.exchangeNativeHandoff` + +exchangeNativeHandoff + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ExchangeNativeHandoffInput (required) | + +```typescript +const result = await db.mutation.exchangeNativeHandoff({ input: { code: '', codeVerifier: '', credentialKind: '' } }).execute(); +``` + ### `db.mutation.extendTokenExpires` extendTokenExpires @@ -1084,7 +1110,7 @@ requestMagicLink | `input` | RequestMagicLinkInput (required) | ```typescript -const result = await db.mutation.requestMagicLink({ input: { email: '', next: '' } }).execute(); +const result = await db.mutation.requestMagicLink({ input: { codeChallenge: '', email: '', nativeRedirectUri: '', next: '' } }).execute(); ``` ### `db.mutation.resetPassword` @@ -1249,7 +1275,7 @@ setPassword | `input` | SetPasswordInput (required) | ```typescript -const result = await db.mutation.setPassword({ input: { currentPassword: '', newPassword: '' } }).execute(); +const result = await db.mutation.setPassword({ input: { currentPassword: '', newPassword: '', signOutOtherSessions: '' } }).execute(); ``` ### `db.mutation.setPrincipalEntities` diff --git a/sdk/constructive-sdk/src/auth/orm/input-types.ts b/sdk/constructive-sdk/src/auth/orm/input-types.ts index 1289140d59..f2a533f238 100644 --- a/sdk/constructive-sdk/src/auth/orm/input-types.ts +++ b/sdk/constructive-sdk/src/auth/orm/input-types.ts @@ -2122,6 +2122,12 @@ export interface EnableSmsMfaInput { export interface EnableTotpInput { clientMutationId?: string; } +export interface ExchangeNativeHandoffInput { + clientMutationId?: string; + code?: string; + codeVerifier?: string; + credentialKind?: string; +} export interface ExtendTokenExpiresInput { amount?: IntervalInput; clientMutationId?: string; @@ -2167,7 +2173,9 @@ export interface RequestCrossOriginTokenInput { } export interface RequestMagicLinkInput { clientMutationId?: string; + codeChallenge?: string; email?: string; + nativeRedirectUri?: string; next?: string; } export interface ResetPasswordInput { @@ -2218,6 +2226,7 @@ export interface SetPasswordInput { clientMutationId?: string; currentPassword?: string; newPassword?: string; + signOutOtherSessions?: boolean; } export interface SetPrincipalEntitiesInput { clientMutationId?: string; @@ -3646,6 +3655,46 @@ export type GetMfaStatusRecordSelect = { smsMfaEnabled?: boolean; totpEnabled?: boolean; }; +export interface SignInOptionsRecord { + allowAnonymousSessions?: boolean | null; + allowEmailOtpSignIn?: boolean | null; + allowIdentitySignIn?: boolean | null; + allowIdentitySignUp?: boolean | null; + allowMagicLinkSignIn?: boolean | null; + allowMagicLinkSignUp?: boolean | null; + allowPasswordSignIn?: boolean | null; + allowPasswordSignUp?: boolean | null; + allowSignUp?: boolean | null; + allowSmsSignIn?: boolean | null; + allowSmsSignUp?: boolean | null; + allowWebauthnSignIn?: boolean | null; + allowWebauthnSignUp?: boolean | null; + allowWebauthnUsernameless?: boolean | null; + enableCaptcha?: boolean | null; + identityProviders?: Record | null; + requireMfa?: boolean | null; + signUpRequiresInvite?: boolean | null; +} +export type SignInOptionsRecordSelect = { + allowAnonymousSessions?: boolean; + allowEmailOtpSignIn?: boolean; + allowIdentitySignIn?: boolean; + allowIdentitySignUp?: boolean; + allowMagicLinkSignIn?: boolean; + allowMagicLinkSignUp?: boolean; + allowPasswordSignIn?: boolean; + allowPasswordSignUp?: boolean; + allowSignUp?: boolean; + allowSmsSignIn?: boolean; + allowSmsSignUp?: boolean; + allowWebauthnSignIn?: boolean; + allowWebauthnSignUp?: boolean; + allowWebauthnUsernameless?: boolean; + enableCaptcha?: boolean; + identityProviders?: boolean; + requireMfa?: boolean; + signUpRequiresInvite?: boolean; +}; export interface ApproveDevicePayload { clientMutationId?: string | null; result?: boolean | null; @@ -3802,6 +3851,16 @@ export type EnableTotpPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface ExchangeNativeHandoffPayload { + clientMutationId?: string | null; + result?: ExchangeNativeHandoffRecord | null; +} +export type ExchangeNativeHandoffPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: ExchangeNativeHandoffRecordSelect; + }; +}; export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; @@ -4558,6 +4617,22 @@ export type CreateOrgApiKeyRecordSelect = { expiresAt?: boolean; keyId?: boolean; }; +export interface ExchangeNativeHandoffRecord { + accessToken?: string | null; + accessTokenExpiresAt?: string | null; + id?: string | null; + isVerified?: boolean | null; + totpEnabled?: boolean | null; + userId?: string | null; +} +export type ExchangeNativeHandoffRecordSelect = { + accessToken?: boolean; + accessTokenExpiresAt?: boolean; + id?: boolean; + isVerified?: boolean; + totpEnabled?: boolean; + userId?: boolean; +}; export interface ExtendTokenExpiresRecord { expiresAt?: string | null; id?: string | null; @@ -4645,18 +4720,22 @@ export type SignInCrossOriginRecordSelect = { export interface SignInMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; + codeChallenge?: string | null; deviceApprovalRequired?: boolean | null; mfaChallengeToken?: string | null; mfaRequired?: boolean | null; + nativeRedirectUri?: string | null; outDeviceToken?: string | null; userId?: string | null; } export type SignInMagicLinkRecordSelect = { accessToken?: boolean; accessTokenExpiresAt?: boolean; + codeChallenge?: boolean; deviceApprovalRequired?: boolean; mfaChallengeToken?: boolean; mfaRequired?: boolean; + nativeRedirectUri?: boolean; outDeviceToken?: boolean; userId?: boolean; }; @@ -4681,12 +4760,16 @@ export type SignInSmsOtpRecordSelect = { export interface SignUpMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; + codeChallenge?: string | null; + nativeRedirectUri?: string | null; outDeviceToken?: string | null; userId?: string | null; } export type SignUpMagicLinkRecordSelect = { accessToken?: boolean; accessTokenExpiresAt?: boolean; + codeChallenge?: boolean; + nativeRedirectUri?: boolean; outDeviceToken?: boolean; userId?: boolean; }; diff --git a/sdk/constructive-sdk/src/auth/orm/mutation/index.ts b/sdk/constructive-sdk/src/auth/orm/mutation/index.ts index 39394d78e4..b8c511d386 100644 --- a/sdk/constructive-sdk/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/mutation/index.ts @@ -26,6 +26,7 @@ import type { EnableEmailMfaInput, EnableSmsMfaInput, EnableTotpInput, + ExchangeNativeHandoffInput, ExtendTokenExpiresInput, ForgotPasswordInput, GenerateBackupCodesInput, @@ -81,6 +82,7 @@ import type { EnableEmailMfaPayload, EnableSmsMfaPayload, EnableTotpPayload, + ExchangeNativeHandoffPayload, ExtendTokenExpiresPayload, ForgotPasswordPayload, GenerateBackupCodesPayload, @@ -136,6 +138,7 @@ import type { EnableEmailMfaPayloadSelect, EnableSmsMfaPayloadSelect, EnableTotpPayloadSelect, + ExchangeNativeHandoffPayloadSelect, ExtendTokenExpiresPayloadSelect, ForgotPasswordPayloadSelect, GenerateBackupCodesPayloadSelect, @@ -189,6 +192,10 @@ export interface ConfirmDeleteAccountVariables { export interface ConfirmTotpSetupVariables { input: ConfirmTotpSetupInput; } +/** + * Variables for createApiKey + * Mint an API key for the current user; the plaintext key is returned once. access_level: full_access (default) or read_only. mfa_level: none (default) or verified; verified needs a fresh MFA proof on the calling session. A key minted while authenticated by another API key never outlives that key. + */ export interface CreateApiKeyVariables { input: CreateApiKeyInput; } @@ -231,6 +238,9 @@ export interface EnableSmsMfaVariables { export interface EnableTotpVariables { input: EnableTotpInput; } +export interface ExchangeNativeHandoffVariables { + input: ExchangeNativeHandoffInput; +} export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; } @@ -901,6 +911,35 @@ export function createMutationOperations(client: OrmClient) { 'EnableTotpPayload' ), }), + exchangeNativeHandoff: ( + args: ExchangeNativeHandoffVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + exchangeNativeHandoff: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ExchangeNativeHandoff', + fieldName: 'exchangeNativeHandoff', + ...buildCustomDocument( + 'mutation', + 'ExchangeNativeHandoff', + 'exchangeNativeHandoff', + options.select, + args, + [ + { + name: 'input', + type: 'ExchangeNativeHandoffInput!', + }, + ], + connectionFieldsMap, + 'ExchangeNativeHandoffPayload' + ), + }), extendTokenExpires: ( args: ExtendTokenExpiresVariables, options: { diff --git a/sdk/constructive-sdk/src/auth/orm/query/index.ts b/sdk/constructive-sdk/src/auth/orm/query/index.ts index 671fb80d21..aa77870a50 100644 --- a/sdk/constructive-sdk/src/auth/orm/query/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/query/index.ts @@ -9,8 +9,10 @@ import type { InferSelectResult, StrictSelect } from '../select-types'; import type { User, GetMfaStatusRecord, + SignInOptionsRecord, UserSelect, GetMfaStatusRecordSelect, + SignInOptionsRecordSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface RequireStepUpVariables { @@ -150,5 +152,28 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + signInOptions: ( + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + signInOptions: InferSelectResult | null; + }>({ + client, + operation: 'query', + operationName: 'SignInOptions', + fieldName: 'signInOptions', + ...buildCustomDocument( + 'query', + 'SignInOptions', + 'signInOptions', + options.select, + undefined, + [], + connectionFieldsMap, + 'SignInOptionsRecord' + ), + }), }; } diff --git a/sdk/constructive-sdk/src/compute/orm/README.md b/sdk/constructive-sdk/src/compute/orm/README.md index 68d50bcb97..6737465511 100644 --- a/sdk/constructive-sdk/src/compute/orm/README.md +++ b/sdk/constructive-sdk/src/compute/orm/README.md @@ -23,7 +23,6 @@ const db = createClient({ |-------|------------| | `build` | findMany, findOne, create, update, delete | | `buildStep` | findMany, findOne, create, update, delete | -| `builderBinding` | findMany, findOne, create, update, delete | | `contentPreset` | findMany, findOne, create, update, delete | | `databaseFunctionGraph` | findMany, findOne, create, update, delete | | `databaseFunctionGraphExecutionCancelRequest` | findMany, findOne, create, update, delete | @@ -67,7 +66,6 @@ const db = createClient({ | `namespaceEvent` | findMany, findOne, create, update, delete | | `platformBuild` | findMany, findOne, create, update, delete | | `platformBuildStep` | findMany, findOne, create, update, delete | -| `platformBuilderBinding` | findMany, findOne, create, update, delete | | `platformFunctionApiBinding` | findMany, findOne, create, update, delete | | `platformFunctionCapabilityBinding` | findMany, findOne, create, update, delete | | `platformFunctionDefinition` | findMany, findOne, create, update, delete | @@ -114,6 +112,7 @@ const db = createClient({ | `platformResourcesHealth` | findMany, findOne, create, update, delete | | `platformResourcesRequirementsState` | findMany, findOne, create, update, delete | | `platformResourcesResolvedRequirement` | findMany, findOne, create, update, delete | +| `platformServiceBinding` | findMany, findOne, create, update, delete | | `platformWebhookEndpoint` | findMany, findOne, create, update, delete | | `platformWebhookEvent` | findMany, findOne, create, update, delete | | `proposalComment` | findMany, findOne, create, update, delete | @@ -142,6 +141,7 @@ const db = createClient({ | `resourcesHealth` | findMany, findOne, create, update, delete | | `resourcesRequirementsState` | findMany, findOne, create, update, delete | | `resourcesResolvedRequirement` | findMany, findOne, create, update, delete | +| `serviceBinding` | findMany, findOne, create, update, delete | | `webhookEndpoint` | findMany, findOne, create, update, delete | | `webhookEvent` | findMany, findOne, create, update, delete | @@ -242,49 +242,6 @@ const updated = await db.buildStep.update({ where: { id: '' }, data: { bui const deleted = await db.buildStep.delete({ where: { id: '' } }).execute(); ``` -### `db.builderBinding` - -CRUD operations for BuilderBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `createdAt` | Datetime | No | -| `createdBy` | UUID | Yes | -| `createdByPrincipal` | UUID | Yes | -| `databaseId` | UUID | Yes | -| `id` | UUID | No | -| `installationId` | UUID | Yes | -| `lastError` | String | Yes | -| `metadata` | JSON | Yes | -| `namespaceId` | UUID | Yes | -| `observedHost` | String | Yes | -| `realm` | String | Yes | -| `status` | String | Yes | -| `updatedAt` | Datetime | No | -| `updatedBy` | UUID | Yes | -| `updatedByPrincipal` | UUID | Yes | - -**Operations:** - -```typescript -// List all builderBinding records -const items = await db.builderBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Get one by id -const item = await db.builderBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Create -const created = await db.builderBinding.create({ data: { createdBy: '', createdByPrincipal: '', databaseId: '', installationId: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.builderBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.builderBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.contentPreset` CRUD operations for ContentPreset records. @@ -2002,48 +1959,6 @@ const updated = await db.platformBuildStep.update({ where: { id: '' }, dat const deleted = await db.platformBuildStep.delete({ where: { id: '' } }).execute(); ``` -### `db.platformBuilderBinding` - -CRUD operations for PlatformBuilderBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `createdAt` | Datetime | No | -| `createdBy` | UUID | Yes | -| `createdByPrincipal` | UUID | Yes | -| `id` | UUID | No | -| `installationId` | UUID | Yes | -| `lastError` | String | Yes | -| `metadata` | JSON | Yes | -| `namespaceId` | UUID | Yes | -| `observedHost` | String | Yes | -| `realm` | String | Yes | -| `status` | String | Yes | -| `updatedAt` | Datetime | No | -| `updatedBy` | UUID | Yes | -| `updatedByPrincipal` | UUID | Yes | - -**Operations:** - -```typescript -// List all platformBuilderBinding records -const items = await db.platformBuilderBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Get one by id -const item = await db.platformBuilderBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); - -// Create -const created = await db.platformBuilderBinding.create({ data: { createdBy: '', createdByPrincipal: '', installationId: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.platformBuilderBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.platformBuilderBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.platformFunctionApiBinding` CRUD operations for PlatformFunctionApiBinding records. @@ -4038,6 +3953,50 @@ const updated = await db.platformResourcesResolvedRequirement.update({ where: { const deleted = await db.platformResourcesResolvedRequirement.delete({ where: { id: '' } }).execute(); ``` +### `db.platformServiceBinding` + +CRUD operations for PlatformServiceBinding records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `createdByPrincipal` | UUID | Yes | +| `id` | UUID | No | +| `installationId` | UUID | Yes | +| `installationScope` | String | Yes | +| `kind` | String | Yes | +| `lastError` | String | Yes | +| `metadata` | JSON | Yes | +| `namespaceId` | UUID | Yes | +| `observedHost` | String | Yes | +| `realm` | String | Yes | +| `status` | String | Yes | +| `updatedAt` | Datetime | No | +| `updatedBy` | UUID | Yes | +| `updatedByPrincipal` | UUID | Yes | + +**Operations:** + +```typescript +// List all platformServiceBinding records +const items = await db.platformServiceBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Get one by id +const item = await db.platformServiceBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Create +const created = await db.platformServiceBinding.create({ data: { createdBy: '', createdByPrincipal: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformServiceBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformServiceBinding.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformWebhookEndpoint` CRUD operations for PlatformWebhookEndpoint records. @@ -5325,6 +5284,51 @@ const updated = await db.resourcesResolvedRequirement.update({ where: { id: '' } }).execute(); ``` +### `db.serviceBinding` + +CRUD operations for ServiceBinding records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `createdByPrincipal` | UUID | Yes | +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `installationId` | UUID | Yes | +| `installationScope` | String | Yes | +| `kind` | String | Yes | +| `lastError` | String | Yes | +| `metadata` | JSON | Yes | +| `namespaceId` | UUID | Yes | +| `observedHost` | String | Yes | +| `realm` | String | Yes | +| `status` | String | Yes | +| `updatedAt` | Datetime | No | +| `updatedBy` | UUID | Yes | +| `updatedByPrincipal` | UUID | Yes | + +**Operations:** + +```typescript +// List all serviceBinding records +const items = await db.serviceBinding.findMany({ select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Get one by id +const item = await db.serviceBinding.findOne({ id: '', select: { createdAt: true, createdBy: true, createdByPrincipal: true, databaseId: true, id: true, installationId: true, installationScope: true, kind: true, lastError: true, metadata: true, namespaceId: true, observedHost: true, realm: true, status: true, updatedAt: true, updatedBy: true, updatedByPrincipal: true } }).execute(); + +// Create +const created = await db.serviceBinding.create({ data: { createdBy: '', createdByPrincipal: '', databaseId: '', installationId: '', installationScope: '', kind: '', lastError: '', metadata: '', namespaceId: '', observedHost: '', realm: '', status: '', updatedBy: '', updatedByPrincipal: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.serviceBinding.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.serviceBinding.delete({ where: { id: '' } }).execute(); +``` + ### `db.webhookEndpoint` CRUD operations for WebhookEndpoint records. diff --git a/sdk/constructive-sdk/src/compute/orm/index.ts b/sdk/constructive-sdk/src/compute/orm/index.ts index 01033dc125..bc4368881e 100644 --- a/sdk/constructive-sdk/src/compute/orm/index.ts +++ b/sdk/constructive-sdk/src/compute/orm/index.ts @@ -7,7 +7,6 @@ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; import { BuildModel } from './models/build'; import { BuildStepModel } from './models/buildStep'; -import { BuilderBindingModel } from './models/builderBinding'; import { ContentPresetModel } from './models/contentPreset'; import { DatabaseFunctionGraphModel } from './models/databaseFunctionGraph'; import { DatabaseFunctionGraphExecutionCancelRequestModel } from './models/databaseFunctionGraphExecutionCancelRequest'; @@ -51,7 +50,6 @@ import { NamespaceModel } from './models/namespace'; import { NamespaceEventModel } from './models/namespaceEvent'; import { PlatformBuildModel } from './models/platformBuild'; import { PlatformBuildStepModel } from './models/platformBuildStep'; -import { PlatformBuilderBindingModel } from './models/platformBuilderBinding'; import { PlatformFunctionApiBindingModel } from './models/platformFunctionApiBinding'; import { PlatformFunctionCapabilityBindingModel } from './models/platformFunctionCapabilityBinding'; import { PlatformFunctionDefinitionModel } from './models/platformFunctionDefinition'; @@ -98,6 +96,7 @@ import { PlatformResourceUtilizationModel } from './models/platformResourceUtili import { PlatformResourcesHealthModel } from './models/platformResourcesHealth'; import { PlatformResourcesRequirementsStateModel } from './models/platformResourcesRequirementsState'; import { PlatformResourcesResolvedRequirementModel } from './models/platformResourcesResolvedRequirement'; +import { PlatformServiceBindingModel } from './models/platformServiceBinding'; import { PlatformWebhookEndpointModel } from './models/platformWebhookEndpoint'; import { PlatformWebhookEventModel } from './models/platformWebhookEvent'; import { ProposalCommentModel } from './models/proposalComment'; @@ -126,6 +125,7 @@ import { ResourceUtilizationModel } from './models/resourceUtilization'; import { ResourcesHealthModel } from './models/resourcesHealth'; import { ResourcesRequirementsStateModel } from './models/resourcesRequirementsState'; import { ResourcesResolvedRequirementModel } from './models/resourcesResolvedRequirement'; +import { ServiceBindingModel } from './models/serviceBinding'; import { WebhookEndpointModel } from './models/webhookEndpoint'; import { WebhookEventModel } from './models/webhookEvent'; import { createQueryOperations } from './query'; @@ -165,7 +165,6 @@ export function createClient(config: OrmClientConfig) { return { build: new BuildModel(client), buildStep: new BuildStepModel(client), - builderBinding: new BuilderBindingModel(client), contentPreset: new ContentPresetModel(client), databaseFunctionGraph: new DatabaseFunctionGraphModel(client), databaseFunctionGraphExecutionCancelRequest: @@ -212,7 +211,6 @@ export function createClient(config: OrmClientConfig) { namespaceEvent: new NamespaceEventModel(client), platformBuild: new PlatformBuildModel(client), platformBuildStep: new PlatformBuildStepModel(client), - platformBuilderBinding: new PlatformBuilderBindingModel(client), platformFunctionApiBinding: new PlatformFunctionApiBindingModel(client), platformFunctionCapabilityBinding: new PlatformFunctionCapabilityBindingModel(client), platformFunctionDefinition: new PlatformFunctionDefinitionModel(client), @@ -259,6 +257,7 @@ export function createClient(config: OrmClientConfig) { platformResourcesHealth: new PlatformResourcesHealthModel(client), platformResourcesRequirementsState: new PlatformResourcesRequirementsStateModel(client), platformResourcesResolvedRequirement: new PlatformResourcesResolvedRequirementModel(client), + platformServiceBinding: new PlatformServiceBindingModel(client), platformWebhookEndpoint: new PlatformWebhookEndpointModel(client), platformWebhookEvent: new PlatformWebhookEventModel(client), proposalComment: new ProposalCommentModel(client), @@ -287,6 +286,7 @@ export function createClient(config: OrmClientConfig) { resourcesHealth: new ResourcesHealthModel(client), resourcesRequirementsState: new ResourcesRequirementsStateModel(client), resourcesResolvedRequirement: new ResourcesResolvedRequirementModel(client), + serviceBinding: new ServiceBindingModel(client), webhookEndpoint: new WebhookEndpointModel(client), webhookEvent: new WebhookEventModel(client), query: createQueryOperations(client), diff --git a/sdk/constructive-sdk/src/compute/orm/input-types.ts b/sdk/constructive-sdk/src/compute/orm/input-types.ts index c4f3a14a61..147bcb6cbd 100644 --- a/sdk/constructive-sdk/src/compute/orm/input-types.ts +++ b/sdk/constructive-sdk/src/compute/orm/input-types.ts @@ -315,32 +315,6 @@ export interface BuildStep { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record | null; } -/** Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST */ -export interface BuilderBinding { - createdAt?: string | null; - createdBy?: string | null; - createdByPrincipal?: string | null; - /** Database that owns this resource (database-scoped isolation) */ - databaseId?: string | null; - id: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId?: string | null; - /** Most recent projection failure */ - lastError?: string | null; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record | null; - /** Namespace whose builds use this BuildKit installation */ - namespaceId?: string | null; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string | null; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string | null; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string | null; - updatedAt?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} /** Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store */ export interface ContentPreset { /** Whether this preset is selectable at provision time */ @@ -1447,30 +1421,6 @@ export interface PlatformBuildStep { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record | null; } -/** Binds a namespace to an installed BuildKit resource for a lane (realm) — the reconciler projects its in-cluster Service address as BUILDKIT_HOST */ -export interface PlatformBuilderBinding { - createdAt?: string | null; - createdBy?: string | null; - createdByPrincipal?: string | null; - id: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId?: string | null; - /** Most recent projection failure */ - lastError?: string | null; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record | null; - /** Namespace whose builds use this BuildKit installation */ - namespaceId?: string | null; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string | null; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string | null; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string | null; - updatedAt?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} /** Join table binding function definitions to API endpoints with per-binding alias and config */ export interface PlatformFunctionApiBinding { /** Binding alias (e.g. default, staging, production) */ @@ -2720,6 +2670,34 @@ export interface PlatformResourcesResolvedRequirement { secretsObjectName?: string | null; slug?: string | null; } +/** Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config */ +export interface PlatformServiceBinding { + createdAt?: string | null; + createdBy?: string | null; + createdByPrincipal?: string | null; + id: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId?: string | null; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope?: string | null; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind?: string | null; + /** Most recent projection failure */ + lastError?: string | null; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record | null; + /** Namespace whose builds use this BuildKit installation */ + namespaceId?: string | null; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string | null; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string | null; + /** Projection state of the bound address: pending, active, failed */ + status?: string | null; + updatedAt?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} /** Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window */ export interface PlatformWebhookEndpoint { /** Whether this endpoint currently accepts deliveries */ @@ -3533,6 +3511,36 @@ export interface ResourcesResolvedRequirement { secretsObjectName?: string | null; slug?: string | null; } +/** Binds a namespace to an installed platform service (BuildKit, hosted Git) for a lane (realm) — the reconciler projects its in-cluster Service address into the namespace config */ +export interface ServiceBinding { + createdAt?: string | null; + createdBy?: string | null; + createdByPrincipal?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + id: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId?: string | null; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope?: string | null; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind?: string | null; + /** Most recent projection failure */ + lastError?: string | null; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record | null; + /** Namespace whose builds use this BuildKit installation */ + namespaceId?: string | null; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string | null; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string | null; + /** Projection state of the bound address: pending, active, failed */ + status?: string | null; + updatedAt?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} /** Webhook route authority: (host, path) -> function task_identifier invoked through the webhook channel, with provider, signing-secret reference, and replay window */ export interface WebhookEndpoint { /** Whether this endpoint currently accepts deliveries */ @@ -3607,9 +3615,6 @@ export interface BuildRelations { workflow?: RepositoryWorkflow | null; } export interface BuildStepRelations {} -export interface BuilderBindingRelations { - namespace?: Namespace | null; -} export interface ContentPresetRelations {} export interface DatabaseFunctionGraphRelations { databaseFunctionGraphExecutionsByGraphId?: ConnectionResult; @@ -3683,12 +3688,12 @@ export interface InfraRefRelations {} export interface InfraStoreRelations {} export interface IntegrationProviderRelations {} export interface NamespaceRelations { - builderBindings?: ConnectionResult; functionDeployments?: ConnectionResult; registryBindings?: ConnectionResult; resourceDefinitions?: ConnectionResult; resourceInstallations?: ConnectionResult; resources?: ConnectionResult; + serviceBindings?: ConnectionResult; webhookEndpoints?: ConnectionResult; } export interface NamespaceEventRelations {} @@ -3699,9 +3704,6 @@ export interface PlatformBuildRelations { workflow?: PlatformRepositoryWorkflow | null; } export interface PlatformBuildStepRelations {} -export interface PlatformBuilderBindingRelations { - namespace?: PlatformNamespace | null; -} export interface PlatformFunctionApiBindingRelations { functionDefinition?: PlatformFunctionDefinition | null; platformFunctionInvocationsByApiBindingId?: ConnectionResult; @@ -3742,12 +3744,12 @@ export interface PlatformInfraStoreRelations {} export interface PlatformK8sResourceKindRelations {} export interface PlatformK8sSpecRuleRelations {} export interface PlatformNamespaceRelations { - platformBuilderBindingsByNamespaceId?: ConnectionResult; platformFunctionDeploymentsByNamespaceId?: ConnectionResult; platformRegistryBindingsByNamespaceId?: ConnectionResult; platformResourceDefinitionsByNamespaceId?: ConnectionResult; platformResourceInstallationsByNamespaceId?: ConnectionResult; platformResourcesByNamespaceId?: ConnectionResult; + platformServiceBindingsByNamespaceId?: ConnectionResult; platformWebhookEndpointsByNamespaceId?: ConnectionResult; } export interface PlatformNamespaceEventRelations {} @@ -3839,6 +3841,9 @@ export interface PlatformResourceUtilizationRelations {} export interface PlatformResourcesHealthRelations {} export interface PlatformResourcesRequirementsStateRelations {} export interface PlatformResourcesResolvedRequirementRelations {} +export interface PlatformServiceBindingRelations { + namespace?: PlatformNamespace | null; +} export interface PlatformWebhookEndpointRelations { functionDefinition?: PlatformFunctionDefinition | null; namespace?: PlatformNamespace | null; @@ -3935,6 +3940,9 @@ export interface ResourceUtilizationRelations {} export interface ResourcesHealthRelations {} export interface ResourcesRequirementsStateRelations {} export interface ResourcesResolvedRequirementRelations {} +export interface ServiceBindingRelations { + namespace?: Namespace | null; +} export interface WebhookEndpointRelations { functionDefinition?: FunctionDefinition | null; namespace?: Namespace | null; @@ -3946,7 +3954,6 @@ export interface WebhookEventRelations { // ============ Entity Types With Relations ============ export type BuildWithRelations = Build & BuildRelations; export type BuildStepWithRelations = BuildStep & BuildStepRelations; -export type BuilderBindingWithRelations = BuilderBinding & BuilderBindingRelations; export type ContentPresetWithRelations = ContentPreset & ContentPresetRelations; export type DatabaseFunctionGraphWithRelations = DatabaseFunctionGraph & DatabaseFunctionGraphRelations; @@ -4007,8 +4014,6 @@ export type NamespaceWithRelations = Namespace & NamespaceRelations; export type NamespaceEventWithRelations = NamespaceEvent & NamespaceEventRelations; export type PlatformBuildWithRelations = PlatformBuild & PlatformBuildRelations; export type PlatformBuildStepWithRelations = PlatformBuildStep & PlatformBuildStepRelations; -export type PlatformBuilderBindingWithRelations = PlatformBuilderBinding & - PlatformBuilderBindingRelations; export type PlatformFunctionApiBindingWithRelations = PlatformFunctionApiBinding & PlatformFunctionApiBindingRelations; export type PlatformFunctionCapabilityBindingWithRelations = PlatformFunctionCapabilityBinding & @@ -4089,6 +4094,8 @@ export type PlatformResourcesRequirementsStateWithRelations = PlatformResourcesR PlatformResourcesRequirementsStateRelations; export type PlatformResourcesResolvedRequirementWithRelations = PlatformResourcesResolvedRequirement & PlatformResourcesResolvedRequirementRelations; +export type PlatformServiceBindingWithRelations = PlatformServiceBinding & + PlatformServiceBindingRelations; export type PlatformWebhookEndpointWithRelations = PlatformWebhookEndpoint & PlatformWebhookEndpointRelations; export type PlatformWebhookEventWithRelations = PlatformWebhookEvent & @@ -4126,6 +4133,7 @@ export type ResourcesRequirementsStateWithRelations = ResourcesRequirementsState ResourcesRequirementsStateRelations; export type ResourcesResolvedRequirementWithRelations = ResourcesResolvedRequirement & ResourcesResolvedRequirementRelations; +export type ServiceBindingWithRelations = ServiceBinding & ServiceBindingRelations; export type WebhookEndpointWithRelations = WebhookEndpoint & WebhookEndpointRelations; export type WebhookEventWithRelations = WebhookEvent & WebhookEventRelations; // ============ Entity Select Types ============ @@ -4184,26 +4192,6 @@ export type BuildStepSelect = { status?: boolean; summary?: boolean; }; -export type BuilderBindingSelect = { - createdAt?: boolean; - createdBy?: boolean; - createdByPrincipal?: boolean; - databaseId?: boolean; - id?: boolean; - installationId?: boolean; - lastError?: boolean; - metadata?: boolean; - namespaceId?: boolean; - observedHost?: boolean; - realm?: boolean; - status?: boolean; - updatedAt?: boolean; - updatedBy?: boolean; - updatedByPrincipal?: boolean; - namespace?: { - select: NamespaceSelect; - }; -}; export type ContentPresetSelect = { active?: boolean; commitId?: boolean; @@ -4850,12 +4838,6 @@ export type NamespaceSelect = { namespaceName?: boolean; status?: boolean; updatedAt?: boolean; - builderBindings?: { - select: BuilderBindingSelect; - first?: number; - filter?: BuilderBindingFilter; - orderBy?: BuilderBindingOrderBy[]; - }; functionDeployments?: { select: FunctionDeploymentSelect; first?: number; @@ -4886,6 +4868,12 @@ export type NamespaceSelect = { filter?: ResourceFilter; orderBy?: ResourceOrderBy[]; }; + serviceBindings?: { + select: ServiceBindingSelect; + first?: number; + filter?: ServiceBindingFilter; + orderBy?: ServiceBindingOrderBy[]; + }; webhookEndpoints?: { select: WebhookEndpointSelect; first?: number; @@ -4956,25 +4944,6 @@ export type PlatformBuildStepSelect = { status?: boolean; summary?: boolean; }; -export type PlatformBuilderBindingSelect = { - createdAt?: boolean; - createdBy?: boolean; - createdByPrincipal?: boolean; - id?: boolean; - installationId?: boolean; - lastError?: boolean; - metadata?: boolean; - namespaceId?: boolean; - observedHost?: boolean; - realm?: boolean; - status?: boolean; - updatedAt?: boolean; - updatedBy?: boolean; - updatedByPrincipal?: boolean; - namespace?: { - select: PlatformNamespaceSelect; - }; -}; export type PlatformFunctionApiBindingSelect = { alias?: boolean; apiId?: boolean; @@ -5313,12 +5282,6 @@ export type PlatformNamespaceSelect = { namespaceName?: boolean; status?: boolean; updatedAt?: boolean; - platformBuilderBindingsByNamespaceId?: { - select: PlatformBuilderBindingSelect; - first?: number; - filter?: PlatformBuilderBindingFilter; - orderBy?: PlatformBuilderBindingOrderBy[]; - }; platformFunctionDeploymentsByNamespaceId?: { select: PlatformFunctionDeploymentSelect; first?: number; @@ -5349,6 +5312,12 @@ export type PlatformNamespaceSelect = { filter?: PlatformResourceFilter; orderBy?: PlatformResourceOrderBy[]; }; + platformServiceBindingsByNamespaceId?: { + select: PlatformServiceBindingSelect; + first?: number; + filter?: PlatformServiceBindingFilter; + orderBy?: PlatformServiceBindingOrderBy[]; + }; platformWebhookEndpointsByNamespaceId?: { select: PlatformWebhookEndpointSelect; first?: number; @@ -6049,6 +6018,27 @@ export type PlatformResourcesResolvedRequirementSelect = { secretsObjectName?: boolean; slug?: boolean; }; +export type PlatformServiceBindingSelect = { + createdAt?: boolean; + createdBy?: boolean; + createdByPrincipal?: boolean; + id?: boolean; + installationId?: boolean; + installationScope?: boolean; + kind?: boolean; + lastError?: boolean; + metadata?: boolean; + namespaceId?: boolean; + observedHost?: boolean; + realm?: boolean; + status?: boolean; + updatedAt?: boolean; + updatedBy?: boolean; + updatedByPrincipal?: boolean; + namespace?: { + select: PlatformNamespaceSelect; + }; +}; export type PlatformWebhookEndpointSelect = { active?: boolean; createdAt?: boolean; @@ -6800,6 +6790,28 @@ export type ResourcesResolvedRequirementSelect = { secretsObjectName?: boolean; slug?: boolean; }; +export type ServiceBindingSelect = { + createdAt?: boolean; + createdBy?: boolean; + createdByPrincipal?: boolean; + databaseId?: boolean; + id?: boolean; + installationId?: boolean; + installationScope?: boolean; + kind?: boolean; + lastError?: boolean; + metadata?: boolean; + namespaceId?: boolean; + observedHost?: boolean; + realm?: boolean; + status?: boolean; + updatedAt?: boolean; + updatedBy?: boolean; + updatedByPrincipal?: boolean; + namespace?: { + select: NamespaceSelect; + }; +}; export type WebhookEndpointSelect = { active?: boolean; createdAt?: boolean; @@ -6957,46 +6969,6 @@ export interface BuildStepFilter { /** Filter by the object’s `summary` field. */ summary?: JSONFilter; } -export interface BuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: BuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: NamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: BuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: BuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} export interface ContentPresetFilter { /** Filter by the object’s `active` field. */ active?: BooleanFilter; @@ -8271,10 +8243,6 @@ export interface NamespaceFilter { and?: NamespaceFilter[]; /** Filter by the object’s `annotations` field. */ annotations?: JSONFilter; - /** Filter by the object’s `builderBindings` relation. */ - builderBindings?: NamespaceToManyBuilderBindingFilter; - /** `builderBindings` exist. */ - builderBindingsExist?: boolean; /** Filter by the object’s `clusterId` field. */ clusterId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -8321,6 +8289,10 @@ export interface NamespaceFilter { resources?: NamespaceToManyResourceFilter; /** `resources` exist. */ resourcesExist?: boolean; + /** Filter by the object’s `serviceBindings` relation. */ + serviceBindings?: NamespaceToManyServiceBindingFilter; + /** `serviceBindings` exist. */ + serviceBindingsExist?: boolean; /** Filter by the object’s `status` field. */ status?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -8458,44 +8430,6 @@ export interface PlatformBuildStepFilter { /** Filter by the object’s `summary` field. */ summary?: JSONFilter; } -export interface PlatformBuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: PlatformNamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: PlatformBuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} export interface PlatformFunctionApiBindingFilter { /** Filter by the object’s `alias` field. */ alias?: StringFilter; @@ -9166,10 +9100,6 @@ export interface PlatformNamespaceFilter { not?: PlatformNamespaceFilter; /** Checks for any expressions in this list. */ or?: PlatformNamespaceFilter[]; - /** Filter by the object’s `platformBuilderBindingsByNamespaceId` relation. */ - platformBuilderBindingsByNamespaceId?: PlatformNamespaceToManyPlatformBuilderBindingFilter; - /** `platformBuilderBindingsByNamespaceId` exist. */ - platformBuilderBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformFunctionDeploymentsByNamespaceId` relation. */ platformFunctionDeploymentsByNamespaceId?: PlatformNamespaceToManyPlatformFunctionDeploymentFilter; /** `platformFunctionDeploymentsByNamespaceId` exist. */ @@ -9190,6 +9120,10 @@ export interface PlatformNamespaceFilter { platformResourcesByNamespaceId?: PlatformNamespaceToManyPlatformResourceFilter; /** `platformResourcesByNamespaceId` exist. */ platformResourcesByNamespaceIdExist?: boolean; + /** Filter by the object’s `platformServiceBindingsByNamespaceId` relation. */ + platformServiceBindingsByNamespaceId?: PlatformNamespaceToManyPlatformServiceBindingFilter; + /** `platformServiceBindingsByNamespaceId` exist. */ + platformServiceBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformWebhookEndpointsByNamespaceId` relation. */ platformWebhookEndpointsByNamespaceId?: PlatformNamespaceToManyPlatformWebhookEndpointFilter; /** `platformWebhookEndpointsByNamespaceId` exist. */ @@ -10447,6 +10381,48 @@ export interface PlatformResourcesResolvedRequirementFilter { /** Filter by the object’s `slug` field. */ slug?: StringFilter; } +export interface PlatformServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} export interface PlatformWebhookEndpointFilter { /** Filter by the object’s `active` field. */ active?: BooleanFilter; @@ -11795,6 +11771,50 @@ export interface ResourcesResolvedRequirementFilter { /** Filter by the object’s `slug` field. */ slug?: StringFilter; } +export interface ServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: ServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: NamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: ServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: ServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} export interface WebhookEndpointFilter { /** Filter by the object’s `active` field. */ active?: BooleanFilter; @@ -11966,40 +11986,6 @@ export type BuildStepOrderBy = | 'STATUS_DESC' | 'SUMMARY_ASC' | 'SUMMARY_DESC'; -export type BuilderBindingOrderBy = - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_BY_PRINCIPAL_ASC' - | 'CREATED_BY_PRINCIPAL_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'INSTALLATION_ID_ASC' - | 'INSTALLATION_ID_DESC' - | 'LAST_ERROR_ASC' - | 'LAST_ERROR_DESC' - | 'METADATA_ASC' - | 'METADATA_DESC' - | 'NAMESPACE_ID_ASC' - | 'NAMESPACE_ID_DESC' - | 'NATURAL' - | 'OBSERVED_HOST_ASC' - | 'OBSERVED_HOST_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'REALM_ASC' - | 'REALM_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'UPDATED_BY_ASC' - | 'UPDATED_BY_DESC' - | 'UPDATED_BY_PRINCIPAL_ASC' - | 'UPDATED_BY_PRINCIPAL_DESC'; export type ContentPresetOrderBy = | 'ACTIVE_ASC' | 'ACTIVE_DESC' @@ -13198,38 +13184,6 @@ export type PlatformBuildStepOrderBy = | 'STATUS_DESC' | 'SUMMARY_ASC' | 'SUMMARY_DESC'; -export type PlatformBuilderBindingOrderBy = - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_BY_PRINCIPAL_ASC' - | 'CREATED_BY_PRINCIPAL_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'INSTALLATION_ID_ASC' - | 'INSTALLATION_ID_DESC' - | 'LAST_ERROR_ASC' - | 'LAST_ERROR_DESC' - | 'METADATA_ASC' - | 'METADATA_DESC' - | 'NAMESPACE_ID_ASC' - | 'NAMESPACE_ID_DESC' - | 'NATURAL' - | 'OBSERVED_HOST_ASC' - | 'OBSERVED_HOST_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'REALM_ASC' - | 'REALM_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'UPDATED_BY_ASC' - | 'UPDATED_BY_DESC' - | 'UPDATED_BY_PRINCIPAL_ASC' - | 'UPDATED_BY_PRINCIPAL_DESC'; export type PlatformFunctionApiBindingOrderBy = | 'ALIAS_ASC' | 'ALIAS_DESC' @@ -14766,6 +14720,42 @@ export type PlatformResourcesResolvedRequirementOrderBy = | 'SECRETS_OBJECT_NAME_DESC' | 'SLUG_ASC' | 'SLUG_DESC'; +export type PlatformServiceBindingOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'INSTALLATION_ID_ASC' + | 'INSTALLATION_ID_DESC' + | 'INSTALLATION_SCOPE_ASC' + | 'INSTALLATION_SCOPE_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'NATURAL' + | 'OBSERVED_HOST_ASC' + | 'OBSERVED_HOST_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; export type PlatformWebhookEndpointOrderBy = | 'ACTIVE_ASC' | 'ACTIVE_DESC' @@ -15824,6 +15814,44 @@ export type ResourcesResolvedRequirementOrderBy = | 'SECRETS_OBJECT_NAME_DESC' | 'SLUG_ASC' | 'SLUG_DESC'; +export type ServiceBindingOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_BY_PRINCIPAL_ASC' + | 'CREATED_BY_PRINCIPAL_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'INSTALLATION_ID_ASC' + | 'INSTALLATION_ID_DESC' + | 'INSTALLATION_SCOPE_ASC' + | 'INSTALLATION_SCOPE_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'NATURAL' + | 'OBSERVED_HOST_ASC' + | 'OBSERVED_HOST_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'UPDATED_BY_PRINCIPAL_ASC' + | 'UPDATED_BY_PRINCIPAL_DESC'; export type WebhookEndpointOrderBy = | 'ACTIVE_ASC' | 'ACTIVE_DESC' @@ -15992,46 +16020,6 @@ export interface DeleteBuildStepInput { clientMutationId?: string; id: string; } -export interface CreateBuilderBindingInput { - clientMutationId?: string; - builderBinding: { - createdBy?: string; - createdByPrincipal?: string; - databaseId: string; - installationId: string; - lastError?: string; - metadata?: Record; - namespaceId: string; - observedHost?: string; - realm?: string; - status?: string; - updatedBy?: string; - updatedByPrincipal?: string; - }; -} -export interface BuilderBindingPatch { - createdBy?: string | null; - createdByPrincipal?: string | null; - databaseId?: string | null; - installationId?: string | null; - lastError?: string | null; - metadata?: Record | null; - namespaceId?: string | null; - observedHost?: string | null; - realm?: string | null; - status?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} -export interface UpdateBuilderBindingInput { - clientMutationId?: string; - id: string; - builderBindingPatch: BuilderBindingPatch; -} -export interface DeleteBuilderBindingInput { - clientMutationId?: string; - id: string; -} export interface CreateContentPresetInput { clientMutationId?: string; contentPreset: { @@ -17568,44 +17556,6 @@ export interface DeletePlatformBuildStepInput { clientMutationId?: string; id: string; } -export interface CreatePlatformBuilderBindingInput { - clientMutationId?: string; - platformBuilderBinding: { - createdBy?: string; - createdByPrincipal?: string; - installationId: string; - lastError?: string; - metadata?: Record; - namespaceId: string; - observedHost?: string; - realm?: string; - status?: string; - updatedBy?: string; - updatedByPrincipal?: string; - }; -} -export interface PlatformBuilderBindingPatch { - createdBy?: string | null; - createdByPrincipal?: string | null; - installationId?: string | null; - lastError?: string | null; - metadata?: Record | null; - namespaceId?: string | null; - observedHost?: string | null; - realm?: string | null; - status?: string | null; - updatedBy?: string | null; - updatedByPrincipal?: string | null; -} -export interface UpdatePlatformBuilderBindingInput { - clientMutationId?: string; - id: string; - platformBuilderBindingPatch: PlatformBuilderBindingPatch; -} -export interface DeletePlatformBuilderBindingInput { - clientMutationId?: string; - id: string; -} export interface CreatePlatformFunctionApiBindingInput { clientMutationId?: string; platformFunctionApiBinding: { @@ -19398,6 +19348,48 @@ export interface DeletePlatformResourcesResolvedRequirementInput { clientMutationId?: string; id: string; } +export interface CreatePlatformServiceBindingInput { + clientMutationId?: string; + platformServiceBinding: { + createdBy?: string; + createdByPrincipal?: string; + installationId: string; + installationScope: string; + kind: string; + lastError?: string; + metadata?: Record; + namespaceId: string; + observedHost?: string; + realm?: string; + status?: string; + updatedBy?: string; + updatedByPrincipal?: string; + }; +} +export interface PlatformServiceBindingPatch { + createdBy?: string | null; + createdByPrincipal?: string | null; + installationId?: string | null; + installationScope?: string | null; + kind?: string | null; + lastError?: string | null; + metadata?: Record | null; + namespaceId?: string | null; + observedHost?: string | null; + realm?: string | null; + status?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} +export interface UpdatePlatformServiceBindingInput { + clientMutationId?: string; + id: string; + platformServiceBindingPatch: PlatformServiceBindingPatch; +} +export interface DeletePlatformServiceBindingInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformWebhookEndpointInput { clientMutationId?: string; platformWebhookEndpoint: { @@ -20579,6 +20571,50 @@ export interface DeleteResourcesResolvedRequirementInput { clientMutationId?: string; id: string; } +export interface CreateServiceBindingInput { + clientMutationId?: string; + serviceBinding: { + createdBy?: string; + createdByPrincipal?: string; + databaseId: string; + installationId: string; + installationScope: string; + kind: string; + lastError?: string; + metadata?: Record; + namespaceId: string; + observedHost?: string; + realm?: string; + status?: string; + updatedBy?: string; + updatedByPrincipal?: string; + }; +} +export interface ServiceBindingPatch { + createdBy?: string | null; + createdByPrincipal?: string | null; + databaseId?: string | null; + installationId?: string | null; + installationScope?: string | null; + kind?: string | null; + lastError?: string | null; + metadata?: Record | null; + namespaceId?: string | null; + observedHost?: string | null; + realm?: string | null; + status?: string | null; + updatedBy?: string | null; + updatedByPrincipal?: string | null; +} +export interface UpdateServiceBindingInput { + clientMutationId?: string; + id: string; + serviceBindingPatch: ServiceBindingPatch; +} +export interface DeleteServiceBindingInput { + clientMutationId?: string; + id: string; +} export interface CreateWebhookEndpointInput { clientMutationId?: string; webhookEndpoint: { @@ -20682,12 +20718,12 @@ export const connectionFieldsMap = { imageGrants: 'ImageGrant', }, Namespace: { - builderBindings: 'BuilderBinding', functionDeployments: 'FunctionDeployment', registryBindings: 'RegistryBinding', resourceDefinitions: 'ResourceDefinition', resourceInstallations: 'ResourceInstallation', resources: 'Resource', + serviceBindings: 'ServiceBinding', webhookEndpoints: 'WebhookEndpoint', }, PlatformFunctionApiBinding: { @@ -20703,12 +20739,12 @@ export const connectionFieldsMap = { platformImageGrantsByImageId: 'PlatformImageGrant', }, PlatformNamespace: { - platformBuilderBindingsByNamespaceId: 'PlatformBuilderBinding', platformFunctionDeploymentsByNamespaceId: 'PlatformFunctionDeployment', platformRegistryBindingsByNamespaceId: 'PlatformRegistryBinding', platformResourceDefinitionsByNamespaceId: 'PlatformResourceDefinition', platformResourceInstallationsByNamespaceId: 'PlatformResourceInstallation', platformResourcesByNamespaceId: 'PlatformResource', + platformServiceBindingsByNamespaceId: 'PlatformServiceBinding', platformWebhookEndpointsByNamespaceId: 'PlatformWebhookEndpoint', }, PlatformProposalComment: { @@ -21488,15 +21524,6 @@ export interface ConstructiveInternalTypeImageFilter { /** Not included in the specified list. */ notIn?: ConstructiveInternalTypeImage[]; } -/** A filter to be used against many `BuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface NamespaceToManyBuilderBindingFilter { - /** Filters to entities where every related entity matches. */ - every?: BuilderBindingFilter; - /** Filters to entities where no related entity matches. */ - none?: BuilderBindingFilter; - /** Filters to entities where at least one related entity matches. */ - some?: BuilderBindingFilter; -} /** A filter to be used against many `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface NamespaceToManyFunctionDeploymentFilter { /** Filters to entities where every related entity matches. */ @@ -21542,6 +21569,15 @@ export interface NamespaceToManyResourceFilter { /** Filters to entities where at least one related entity matches. */ some?: ResourceFilter; } +/** A filter to be used against many `ServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface NamespaceToManyServiceBindingFilter { + /** Filters to entities where every related entity matches. */ + every?: ServiceBindingFilter; + /** Filters to entities where no related entity matches. */ + none?: ServiceBindingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: ServiceBindingFilter; +} /** A filter to be used against many `WebhookEndpoint` object types. All fields are combined with a logical ‘and.’ */ export interface NamespaceToManyWebhookEndpointFilter { /** Filters to entities where every related entity matches. */ @@ -21605,15 +21641,6 @@ export interface PlatformImageToManyPlatformImageGrantFilter { /** Filters to entities where at least one related entity matches. */ some?: PlatformImageGrantFilter; } -/** A filter to be used against many `PlatformBuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformNamespaceToManyPlatformBuilderBindingFilter { - /** Filters to entities where every related entity matches. */ - every?: PlatformBuilderBindingFilter; - /** Filters to entities where no related entity matches. */ - none?: PlatformBuilderBindingFilter; - /** Filters to entities where at least one related entity matches. */ - some?: PlatformBuilderBindingFilter; -} /** A filter to be used against many `PlatformFunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformNamespaceToManyPlatformFunctionDeploymentFilter { /** Filters to entities where every related entity matches. */ @@ -21659,6 +21686,15 @@ export interface PlatformNamespaceToManyPlatformResourceFilter { /** Filters to entities where at least one related entity matches. */ some?: PlatformResourceFilter; } +/** A filter to be used against many `PlatformServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyPlatformServiceBindingFilter { + /** Filters to entities where every related entity matches. */ + every?: PlatformServiceBindingFilter; + /** Filters to entities where no related entity matches. */ + none?: PlatformServiceBindingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlatformServiceBindingFilter; +} /** A filter to be used against many `PlatformWebhookEndpoint` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformNamespaceToManyPlatformWebhookEndpointFilter { /** Filters to entities where every related entity matches. */ @@ -22322,32 +22358,6 @@ export interface BuildStepInput { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record; } -/** An input for mutations affecting `BuilderBinding` */ -export interface BuilderBindingInput { - createdAt?: string; - createdBy?: string; - createdByPrincipal?: string; - /** Database that owns this resource (database-scoped isolation) */ - databaseId: string; - id?: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId: string; - /** Most recent projection failure */ - lastError?: string; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record; - /** Namespace whose builds use this BuildKit installation */ - namespaceId: string; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string; - updatedAt?: string; - updatedBy?: string; - updatedByPrincipal?: string; -} /** An input for mutations affecting `ContentPreset` */ export interface ContentPresetInput { /** Whether this preset is selectable at provision time */ @@ -23384,30 +23394,6 @@ export interface PlatformBuildStepInput { /** Parsed detail: failure message, assertion diff, counts, annotations */ summary?: Record; } -/** An input for mutations affecting `PlatformBuilderBinding` */ -export interface PlatformBuilderBindingInput { - createdAt?: string; - createdBy?: string; - createdByPrincipal?: string; - id?: string; - /** BuildKit resource installation serving this binding; may belong to another resource scope */ - installationId: string; - /** Most recent projection failure */ - lastError?: string; - /** Reconciler detail (projection timestamps and diagnostics) */ - metadata?: Record; - /** Namespace whose builds use this BuildKit installation */ - namespaceId: string; - /** BuildKit address last projected into the namespace (NULL = never projected) */ - observedHost?: string; - /** Lane this binding applies to (NULL = the scope's default lane) */ - realm?: string; - /** Projection state of BUILDKIT_HOST: pending, active, failed */ - status?: string; - updatedAt?: string; - updatedBy?: string; - updatedByPrincipal?: string; -} /** An input for mutations affecting `PlatformFunctionApiBinding` */ export interface PlatformFunctionApiBindingInput { /** Binding alias (e.g. default, staging, production) */ @@ -24460,6 +24446,34 @@ export interface PlatformResourceUsageSummaryInput { /** Number of raw samples aggregated into this summary */ sampleCount?: number; } +/** An input for mutations affecting `PlatformServiceBinding` */ +export interface PlatformServiceBindingInput { + createdAt?: string; + createdBy?: string; + createdByPrincipal?: string; + id?: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId: string; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope: string; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind: string; + /** Most recent projection failure */ + lastError?: string; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record; + /** Namespace whose builds use this BuildKit installation */ + namespaceId: string; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string; + /** Projection state of the bound address: pending, active, failed */ + status?: string; + updatedAt?: string; + updatedBy?: string; + updatedByPrincipal?: string; +} /** An input for mutations affecting `PlatformWebhookEndpoint` */ export interface PlatformWebhookEndpointInput { /** Whether this endpoint currently accepts deliveries */ @@ -25056,6 +25070,36 @@ export interface ResourceUsageSummaryInput { /** Number of raw samples aggregated into this summary */ sampleCount?: number; } +/** An input for mutations affecting `ServiceBinding` */ +export interface ServiceBindingInput { + createdAt?: string; + createdBy?: string; + createdByPrincipal?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + id?: string; + /** Resource installation serving this binding, in the installations table of installation_scope */ + installationId: string; + /** Scope whose installations table holds installation_id: this scope or platform */ + installationScope: string; + /** Service this binding projects: builder (BUILDKIT_HOST) or git (GIT_PROVIDER + GIT_SERVICE_URL) */ + kind: string; + /** Most recent projection failure */ + lastError?: string; + /** Reconciler detail (projection timestamps and diagnostics) */ + metadata?: Record; + /** Namespace whose builds use this BuildKit installation */ + namespaceId: string; + /** Service address last projected into the namespace (NULL = never projected) */ + observedHost?: string; + /** Lane this binding applies to (NULL = the scope's default lane) */ + realm?: string; + /** Projection state of the bound address: pending, active, failed */ + status?: string; + updatedAt?: string; + updatedBy?: string; + updatedByPrincipal?: string; +} /** An input for mutations affecting `WebhookEndpoint` */ export interface WebhookEndpointInput { /** Whether this endpoint currently accepts deliveries */ @@ -25874,47 +25918,6 @@ export interface ImageGrantFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } -/** A filter to be used against `BuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface BuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: BuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: NamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: BuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: BuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} /** A filter to be used against `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionDeploymentFilter { /** Checks for all expressions in this list. */ @@ -26214,6 +26217,51 @@ export interface ResourceFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } +/** A filter to be used against `ServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface ServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: ServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: NamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: ServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: ServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} /** A filter to be used against `PlatformFunctionInvocation` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformFunctionInvocationFilter { /** Filter by the object’s `actorId` field. */ @@ -26456,45 +26504,6 @@ export interface PlatformImageGrantFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } -/** A filter to be used against `PlatformBuilderBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformBuilderBindingFilter { - /** Checks for all expressions in this list. */ - and?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `createdByPrincipal` field. */ - createdByPrincipal?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `lastError` field. */ - lastError?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Filter by the object’s `namespace` relation. */ - namespace?: PlatformNamespaceFilter; - /** Filter by the object’s `namespaceId` field. */ - namespaceId?: UUIDFilter; - /** Negates the expression. */ - not?: PlatformBuilderBindingFilter; - /** Filter by the object’s `observedHost` field. */ - observedHost?: StringFilter; - /** Checks for any expressions in this list. */ - or?: PlatformBuilderBindingFilter[]; - /** Filter by the object’s `realm` field. */ - realm?: StringFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `updatedByPrincipal` field. */ - updatedByPrincipal?: UUIDFilter; -} /** A filter to be used against `PlatformFunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformFunctionDeploymentFilter { /** Checks for all expressions in this list. */ @@ -26784,6 +26793,49 @@ export interface PlatformResourceFilter { /** Filter by the object’s `updatedByPrincipal` field. */ updatedByPrincipal?: UUIDFilter; } +/** A filter to be used against `PlatformServiceBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformServiceBindingFilter { + /** Checks for all expressions in this list. */ + and?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdByPrincipal` field. */ + createdByPrincipal?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationScope` field. */ + installationScope?: StringFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformServiceBindingFilter; + /** Filter by the object’s `observedHost` field. */ + observedHost?: StringFilter; + /** Checks for any expressions in this list. */ + or?: PlatformServiceBindingFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `updatedByPrincipal` field. */ + updatedByPrincipal?: UUIDFilter; +} /** A filter to be used against `PlatformProposalReaction` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformProposalReactionFilter { /** Filter by the object’s `actorId` field. */ @@ -28502,10 +28554,6 @@ export interface NamespaceFilter { and?: NamespaceFilter[]; /** Filter by the object’s `annotations` field. */ annotations?: JSONFilter; - /** Filter by the object’s `builderBindings` relation. */ - builderBindings?: NamespaceToManyBuilderBindingFilter; - /** `builderBindings` exist. */ - builderBindingsExist?: boolean; /** Filter by the object’s `clusterId` field. */ clusterId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -28552,6 +28600,10 @@ export interface NamespaceFilter { resources?: NamespaceToManyResourceFilter; /** `resources` exist. */ resourcesExist?: boolean; + /** Filter by the object’s `serviceBindings` relation. */ + serviceBindings?: NamespaceToManyServiceBindingFilter; + /** `serviceBindings` exist. */ + serviceBindingsExist?: boolean; /** Filter by the object’s `status` field. */ status?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -28786,10 +28838,6 @@ export interface PlatformNamespaceFilter { not?: PlatformNamespaceFilter; /** Checks for any expressions in this list. */ or?: PlatformNamespaceFilter[]; - /** Filter by the object’s `platformBuilderBindingsByNamespaceId` relation. */ - platformBuilderBindingsByNamespaceId?: PlatformNamespaceToManyPlatformBuilderBindingFilter; - /** `platformBuilderBindingsByNamespaceId` exist. */ - platformBuilderBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformFunctionDeploymentsByNamespaceId` relation. */ platformFunctionDeploymentsByNamespaceId?: PlatformNamespaceToManyPlatformFunctionDeploymentFilter; /** `platformFunctionDeploymentsByNamespaceId` exist. */ @@ -28810,6 +28858,10 @@ export interface PlatformNamespaceFilter { platformResourcesByNamespaceId?: PlatformNamespaceToManyPlatformResourceFilter; /** `platformResourcesByNamespaceId` exist. */ platformResourcesByNamespaceIdExist?: boolean; + /** Filter by the object’s `platformServiceBindingsByNamespaceId` relation. */ + platformServiceBindingsByNamespaceId?: PlatformNamespaceToManyPlatformServiceBindingFilter; + /** `platformServiceBindingsByNamespaceId` exist. */ + platformServiceBindingsByNamespaceIdExist?: boolean; /** Filter by the object’s `platformWebhookEndpointsByNamespaceId` relation. */ platformWebhookEndpointsByNamespaceId?: PlatformNamespaceToManyPlatformWebhookEndpointFilter; /** `platformWebhookEndpointsByNamespaceId` exist. */ @@ -29563,51 +29615,6 @@ export type DeleteBuildStepPayloadSelect = { }; clientMutationId?: boolean; }; -export interface CreateBuilderBindingPayload { - /** The `BuilderBinding` that was created by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} -export type CreateBuilderBindingPayloadSelect = { - builderBinding?: { - select: BuilderBindingSelect; - }; - builderBindingEdge?: { - select: BuilderBindingEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface UpdateBuilderBindingPayload { - /** The `BuilderBinding` that was updated by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} -export type UpdateBuilderBindingPayloadSelect = { - builderBinding?: { - select: BuilderBindingSelect; - }; - builderBindingEdge?: { - select: BuilderBindingEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface DeleteBuilderBindingPayload { - /** The `BuilderBinding` that was deleted by this mutation. */ - builderBinding?: BuilderBinding | null; - builderBindingEdge?: BuilderBindingEdge | null; - clientMutationId?: string | null; -} -export type DeleteBuilderBindingPayloadSelect = { - builderBinding?: { - select: BuilderBindingSelect; - }; - builderBindingEdge?: { - select: BuilderBindingEdgeSelect; - }; - clientMutationId?: boolean; -}; export interface CreateContentPresetPayload { clientMutationId?: string | null; /** The `ContentPreset` that was created by this mutation. */ @@ -31386,51 +31393,6 @@ export type DeletePlatformBuildStepPayloadSelect = { select: PlatformBuildStepEdgeSelect; }; }; -export interface CreatePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was created by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} -export type CreatePlatformBuilderBindingPayloadSelect = { - clientMutationId?: boolean; - platformBuilderBinding?: { - select: PlatformBuilderBindingSelect; - }; - platformBuilderBindingEdge?: { - select: PlatformBuilderBindingEdgeSelect; - }; -}; -export interface UpdatePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was updated by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} -export type UpdatePlatformBuilderBindingPayloadSelect = { - clientMutationId?: boolean; - platformBuilderBinding?: { - select: PlatformBuilderBindingSelect; - }; - platformBuilderBindingEdge?: { - select: PlatformBuilderBindingEdgeSelect; - }; -}; -export interface DeletePlatformBuilderBindingPayload { - clientMutationId?: string | null; - /** The `PlatformBuilderBinding` that was deleted by this mutation. */ - platformBuilderBinding?: PlatformBuilderBinding | null; - platformBuilderBindingEdge?: PlatformBuilderBindingEdge | null; -} -export type DeletePlatformBuilderBindingPayloadSelect = { - clientMutationId?: boolean; - platformBuilderBinding?: { - select: PlatformBuilderBindingSelect; - }; - platformBuilderBindingEdge?: { - select: PlatformBuilderBindingEdgeSelect; - }; -}; export interface CreatePlatformFunctionApiBindingPayload { clientMutationId?: string | null; /** The `PlatformFunctionApiBinding` that was created by this mutation. */ @@ -33186,6 +33148,51 @@ export type DeletePlatformResourceUsageSummaryPayloadSelect = { select: PlatformResourceUsageSummaryEdgeSelect; }; }; +export interface CreatePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was created by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} +export type CreatePlatformServiceBindingPayloadSelect = { + clientMutationId?: boolean; + platformServiceBinding?: { + select: PlatformServiceBindingSelect; + }; + platformServiceBindingEdge?: { + select: PlatformServiceBindingEdgeSelect; + }; +}; +export interface UpdatePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was updated by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} +export type UpdatePlatformServiceBindingPayloadSelect = { + clientMutationId?: boolean; + platformServiceBinding?: { + select: PlatformServiceBindingSelect; + }; + platformServiceBindingEdge?: { + select: PlatformServiceBindingEdgeSelect; + }; +}; +export interface DeletePlatformServiceBindingPayload { + clientMutationId?: string | null; + /** The `PlatformServiceBinding` that was deleted by this mutation. */ + platformServiceBinding?: PlatformServiceBinding | null; + platformServiceBindingEdge?: PlatformServiceBindingEdge | null; +} +export type DeletePlatformServiceBindingPayloadSelect = { + clientMutationId?: boolean; + platformServiceBinding?: { + select: PlatformServiceBindingSelect; + }; + platformServiceBindingEdge?: { + select: PlatformServiceBindingEdgeSelect; + }; +}; export interface CreatePlatformWebhookEndpointPayload { clientMutationId?: string | null; /** The `PlatformWebhookEndpoint` that was created by this mutation. */ @@ -34176,6 +34183,51 @@ export type DeleteResourceUsageSummaryPayloadSelect = { select: ResourceUsageSummaryEdgeSelect; }; }; +export interface CreateServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was created by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} +export type CreateServiceBindingPayloadSelect = { + clientMutationId?: boolean; + serviceBinding?: { + select: ServiceBindingSelect; + }; + serviceBindingEdge?: { + select: ServiceBindingEdgeSelect; + }; +}; +export interface UpdateServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was updated by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} +export type UpdateServiceBindingPayloadSelect = { + clientMutationId?: boolean; + serviceBinding?: { + select: ServiceBindingSelect; + }; + serviceBindingEdge?: { + select: ServiceBindingEdgeSelect; + }; +}; +export interface DeleteServiceBindingPayload { + clientMutationId?: string | null; + /** The `ServiceBinding` that was deleted by this mutation. */ + serviceBinding?: ServiceBinding | null; + serviceBindingEdge?: ServiceBindingEdge | null; +} +export type DeleteServiceBindingPayloadSelect = { + clientMutationId?: boolean; + serviceBinding?: { + select: ServiceBindingSelect; + }; + serviceBindingEdge?: { + select: ServiceBindingEdgeSelect; + }; +}; export interface CreateWebhookEndpointPayload { clientMutationId?: string | null; /** The `WebhookEndpoint` that was created by this mutation. */ @@ -34362,18 +34414,6 @@ export type BuildStepEdgeSelect = { select: BuildStepSelect; }; }; -/** A `BuilderBinding` edge in the connection. */ -export interface BuilderBindingEdge { - cursor?: string | null; - /** The `BuilderBinding` at the end of the edge. */ - node?: BuilderBinding | null; -} -export type BuilderBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: BuilderBindingSelect; - }; -}; /** A `ContentPreset` edge in the connection. */ export interface ContentPresetEdge { cursor?: string | null; @@ -34806,18 +34846,6 @@ export type PlatformBuildStepEdgeSelect = { select: PlatformBuildStepSelect; }; }; -/** A `PlatformBuilderBinding` edge in the connection. */ -export interface PlatformBuilderBindingEdge { - cursor?: string | null; - /** The `PlatformBuilderBinding` at the end of the edge. */ - node?: PlatformBuilderBinding | null; -} -export type PlatformBuilderBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformBuilderBindingSelect; - }; -}; /** A `PlatformFunctionApiBinding` edge in the connection. */ export interface PlatformFunctionApiBindingEdge { cursor?: string | null; @@ -35262,6 +35290,18 @@ export type PlatformResourceUsageSummaryEdgeSelect = { select: PlatformResourceUsageSummarySelect; }; }; +/** A `PlatformServiceBinding` edge in the connection. */ +export interface PlatformServiceBindingEdge { + cursor?: string | null; + /** The `PlatformServiceBinding` at the end of the edge. */ + node?: PlatformServiceBinding | null; +} +export type PlatformServiceBindingEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformServiceBindingSelect; + }; +}; /** A `PlatformWebhookEndpoint` edge in the connection. */ export interface PlatformWebhookEndpointEdge { cursor?: string | null; @@ -35526,6 +35566,18 @@ export type ResourceUsageSummaryEdgeSelect = { select: ResourceUsageSummarySelect; }; }; +/** A `ServiceBinding` edge in the connection. */ +export interface ServiceBindingEdge { + cursor?: string | null; + /** The `ServiceBinding` at the end of the edge. */ + node?: ServiceBinding | null; +} +export type ServiceBindingEdgeSelect = { + cursor?: boolean; + node?: { + select: ServiceBindingSelect; + }; +}; /** A `WebhookEndpoint` edge in the connection. */ export interface WebhookEndpointEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/compute/orm/models/index.ts b/sdk/constructive-sdk/src/compute/orm/models/index.ts index 3b2af275ae..dfb31b3c70 100644 --- a/sdk/constructive-sdk/src/compute/orm/models/index.ts +++ b/sdk/constructive-sdk/src/compute/orm/models/index.ts @@ -5,7 +5,6 @@ */ export { BuildModel } from './build'; export { BuildStepModel } from './buildStep'; -export { BuilderBindingModel } from './builderBinding'; export { ContentPresetModel } from './contentPreset'; export { DatabaseFunctionGraphModel } from './databaseFunctionGraph'; export { DatabaseFunctionGraphExecutionCancelRequestModel } from './databaseFunctionGraphExecutionCancelRequest'; @@ -49,7 +48,6 @@ export { NamespaceModel } from './namespace'; export { NamespaceEventModel } from './namespaceEvent'; export { PlatformBuildModel } from './platformBuild'; export { PlatformBuildStepModel } from './platformBuildStep'; -export { PlatformBuilderBindingModel } from './platformBuilderBinding'; export { PlatformFunctionApiBindingModel } from './platformFunctionApiBinding'; export { PlatformFunctionCapabilityBindingModel } from './platformFunctionCapabilityBinding'; export { PlatformFunctionDefinitionModel } from './platformFunctionDefinition'; @@ -96,6 +94,7 @@ export { PlatformResourceUtilizationModel } from './platformResourceUtilization' export { PlatformResourcesHealthModel } from './platformResourcesHealth'; export { PlatformResourcesRequirementsStateModel } from './platformResourcesRequirementsState'; export { PlatformResourcesResolvedRequirementModel } from './platformResourcesResolvedRequirement'; +export { PlatformServiceBindingModel } from './platformServiceBinding'; export { PlatformWebhookEndpointModel } from './platformWebhookEndpoint'; export { PlatformWebhookEventModel } from './platformWebhookEvent'; export { ProposalCommentModel } from './proposalComment'; @@ -124,5 +123,6 @@ export { ResourceUtilizationModel } from './resourceUtilization'; export { ResourcesHealthModel } from './resourcesHealth'; export { ResourcesRequirementsStateModel } from './resourcesRequirementsState'; export { ResourcesResolvedRequirementModel } from './resourcesResolvedRequirement'; +export { ServiceBindingModel } from './serviceBinding'; export { WebhookEndpointModel } from './webhookEndpoint'; export { WebhookEventModel } from './webhookEvent'; diff --git a/sdk/constructive-sdk/src/compute/orm/models/platformBuilderBinding.ts b/sdk/constructive-sdk/src/compute/orm/models/platformBuilderBinding.ts deleted file mode 100644 index 09a8daa1ed..0000000000 --- a/sdk/constructive-sdk/src/compute/orm/models/platformBuilderBinding.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * PlatformBuilderBinding 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 { - PlatformBuilderBinding, - PlatformBuilderBindingWithRelations, - PlatformBuilderBindingSelect, - PlatformBuilderBindingFilter, - PlatformBuilderBindingOrderBy, - CreatePlatformBuilderBindingInput, - UpdatePlatformBuilderBindingInput, - PlatformBuilderBindingPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class PlatformBuilderBindingModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - platformBuilderBindings: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'PlatformBuilderBinding', - 'platformBuilderBindings', - 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, - }, - 'PlatformBuilderBindingFilter', - 'PlatformBuilderBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'PlatformBuilderBinding', - fieldName: 'platformBuilderBindings', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - platformBuilderBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'PlatformBuilderBinding', - 'platformBuilderBindings', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'PlatformBuilderBindingFilter', - 'PlatformBuilderBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'PlatformBuilderBinding', - fieldName: 'platformBuilderBinding', - document, - variables, - transform: (data: { - platformBuilderBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - platformBuilderBinding: data.platformBuilderBindings?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - platformBuilderBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'PlatformBuilderBinding', - 'platformBuilderBindings', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'PlatformBuilderBindingFilter', - 'PlatformBuilderBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'PlatformBuilderBinding', - fieldName: 'platformBuilderBinding', - document, - variables, - transform: (data: { - platformBuilderBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - platformBuilderBinding: data.platformBuilderBindings?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createPlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'PlatformBuilderBinding', - 'createPlatformBuilderBinding', - 'platformBuilderBinding', - args.select, - args.data, - 'CreatePlatformBuilderBindingInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'PlatformBuilderBinding', - fieldName: 'createPlatformBuilderBinding', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - PlatformBuilderBindingPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updatePlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'PlatformBuilderBinding', - 'updatePlatformBuilderBinding', - 'platformBuilderBinding', - args.select, - args.where.id, - args.data, - 'UpdatePlatformBuilderBindingInput', - 'id', - 'platformBuilderBindingPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'PlatformBuilderBinding', - fieldName: 'updatePlatformBuilderBinding', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deletePlatformBuilderBinding: { - platformBuilderBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'PlatformBuilderBinding', - 'deletePlatformBuilderBinding', - 'platformBuilderBinding', - { - id: args.where.id, - }, - 'DeletePlatformBuilderBindingInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'PlatformBuilderBinding', - fieldName: 'deletePlatformBuilderBinding', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/compute/orm/models/platformServiceBinding.ts b/sdk/constructive-sdk/src/compute/orm/models/platformServiceBinding.ts new file mode 100644 index 0000000000..e50381b94d --- /dev/null +++ b/sdk/constructive-sdk/src/compute/orm/models/platformServiceBinding.ts @@ -0,0 +1,247 @@ +/** + * PlatformServiceBinding 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 { + PlatformServiceBinding, + PlatformServiceBindingWithRelations, + PlatformServiceBindingSelect, + PlatformServiceBindingFilter, + PlatformServiceBindingOrderBy, + CreatePlatformServiceBindingInput, + UpdatePlatformServiceBindingInput, + PlatformServiceBindingPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformServiceBindingModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformServiceBindings: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformServiceBinding', + 'platformServiceBindings', + 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, + }, + 'PlatformServiceBindingFilter', + 'PlatformServiceBindingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformServiceBinding', + fieldName: 'platformServiceBindings', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformServiceBinding: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformServiceBinding', + 'platformServiceBindings', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformServiceBindingFilter', + 'PlatformServiceBindingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformServiceBinding', + fieldName: 'platformServiceBinding', + document, + variables, + transform: (data: { + platformServiceBindings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformServiceBinding: data.platformServiceBindings?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformServiceBinding: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformServiceBinding', + 'platformServiceBindings', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformServiceBindingFilter', + 'PlatformServiceBindingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformServiceBinding', + fieldName: 'platformServiceBinding', + document, + variables, + transform: (data: { + platformServiceBindings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformServiceBinding: data.platformServiceBindings?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformServiceBinding', + 'createPlatformServiceBinding', + 'platformServiceBinding', + args.select, + args.data, + 'CreatePlatformServiceBindingInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformServiceBinding', + fieldName: 'createPlatformServiceBinding', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformServiceBindingPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformServiceBinding', + 'updatePlatformServiceBinding', + 'platformServiceBinding', + args.select, + args.where.id, + args.data, + 'UpdatePlatformServiceBindingInput', + 'id', + 'platformServiceBindingPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformServiceBinding', + fieldName: 'updatePlatformServiceBinding', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformServiceBinding: { + platformServiceBinding: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformServiceBinding', + 'deletePlatformServiceBinding', + 'platformServiceBinding', + { + id: args.where.id, + }, + 'DeletePlatformServiceBindingInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformServiceBinding', + fieldName: 'deletePlatformServiceBinding', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/compute/orm/models/builderBinding.ts b/sdk/constructive-sdk/src/compute/orm/models/serviceBinding.ts similarity index 53% rename from sdk/constructive-react/src/compute/orm/models/builderBinding.ts rename to sdk/constructive-sdk/src/compute/orm/models/serviceBinding.ts index 0d5d7843e3..be7061a21b 100644 --- a/sdk/constructive-react/src/compute/orm/models/builderBinding.ts +++ b/sdk/constructive-sdk/src/compute/orm/models/serviceBinding.ts @@ -1,5 +1,5 @@ /** - * BuilderBinding model for ORM client + * ServiceBinding 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 { - BuilderBinding, - BuilderBindingWithRelations, - BuilderBindingSelect, - BuilderBindingFilter, - BuilderBindingOrderBy, - CreateBuilderBindingInput, - UpdateBuilderBindingInput, - BuilderBindingPatch, + ServiceBinding, + ServiceBindingWithRelations, + ServiceBindingSelect, + ServiceBindingFilter, + ServiceBindingOrderBy, + CreateServiceBindingInput, + UpdateServiceBindingInput, + ServiceBindingPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class BuilderBindingModel { +export class ServiceBindingModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - builderBindings: ConnectionResult>; + serviceBindings: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'BuilderBinding', - 'builderBindings', + 'ServiceBinding', + 'serviceBindings', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class BuilderBindingModel { before: args?.before, offset: args?.offset, }, - 'BuilderBindingFilter', - 'BuilderBindingOrderBy', + 'ServiceBindingFilter', + 'ServiceBindingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'BuilderBinding', - fieldName: 'builderBindings', + operationName: 'ServiceBinding', + fieldName: 'serviceBindings', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - builderBinding: InferSelectResult | null; + serviceBinding: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'BuilderBinding', - 'builderBindings', + 'ServiceBinding', + 'serviceBindings', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'BuilderBindingFilter', - 'BuilderBindingOrderBy', + 'ServiceBindingFilter', + 'ServiceBindingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'BuilderBinding', - fieldName: 'builderBinding', + operationName: 'ServiceBinding', + fieldName: 'serviceBinding', document, variables, transform: (data: { - builderBindings?: { - nodes?: InferSelectResult[]; + serviceBindings?: { + nodes?: InferSelectResult[]; }; }) => ({ - builderBinding: data.builderBindings?.nodes?.[0] ?? null, + serviceBinding: data.serviceBindings?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - builderBinding: InferSelectResult | null; + serviceBinding: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'BuilderBinding', - 'builderBindings', + 'ServiceBinding', + 'serviceBindings', args.select, { where: { @@ -124,91 +124,91 @@ export class BuilderBindingModel { }, first: 1, }, - 'BuilderBindingFilter', - 'BuilderBindingOrderBy', + 'ServiceBindingFilter', + 'ServiceBindingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'BuilderBinding', - fieldName: 'builderBinding', + operationName: 'ServiceBinding', + fieldName: 'serviceBinding', document, variables, transform: (data: { - builderBindings?: { - nodes?: InferSelectResult[]; + serviceBindings?: { + nodes?: InferSelectResult[]; }; }) => ({ - builderBinding: data.builderBindings?.nodes?.[0] ?? null, + serviceBinding: data.serviceBindings?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createBuilderBinding: { - builderBinding: InferSelectResult; + createServiceBinding: { + serviceBinding: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'BuilderBinding', - 'createBuilderBinding', - 'builderBinding', + 'ServiceBinding', + 'createServiceBinding', + 'serviceBinding', args.select, args.data, - 'CreateBuilderBindingInput', + 'CreateServiceBindingInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'BuilderBinding', - fieldName: 'createBuilderBinding', + operationName: 'ServiceBinding', + fieldName: 'createServiceBinding', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - BuilderBindingPatch + ServiceBindingPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateBuilderBinding: { - builderBinding: InferSelectResult; + updateServiceBinding: { + serviceBinding: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'BuilderBinding', - 'updateBuilderBinding', - 'builderBinding', + 'ServiceBinding', + 'updateServiceBinding', + 'serviceBinding', args.select, args.where.id, args.data, - 'UpdateBuilderBindingInput', + 'UpdateServiceBindingInput', 'id', - 'builderBindingPatch', + 'serviceBindingPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'BuilderBinding', - fieldName: 'updateBuilderBinding', + operationName: 'ServiceBinding', + fieldName: 'updateServiceBinding', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class BuilderBindingModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteBuilderBinding: { - builderBinding: InferSelectResult; + deleteServiceBinding: { + serviceBinding: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'BuilderBinding', - 'deleteBuilderBinding', - 'builderBinding', + 'ServiceBinding', + 'deleteServiceBinding', + 'serviceBinding', { id: args.where.id, }, - 'DeleteBuilderBindingInput', + 'DeleteServiceBindingInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'BuilderBinding', - fieldName: 'deleteBuilderBinding', + operationName: 'ServiceBinding', + fieldName: 'deleteServiceBinding', document, variables, }); diff --git a/sdk/constructive-sdk/src/modules/orm/README.md b/sdk/constructive-sdk/src/modules/orm/README.md index 73e6574eaa..a40a540fb0 100644 --- a/sdk/constructive-sdk/src/modules/orm/README.md +++ b/sdk/constructive-sdk/src/modules/orm/README.md @@ -498,6 +498,7 @@ CRUD operations for BlueprintConstruction records. | `constructedDefinition` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | +| `error` | JSON | Yes | | `id` | UUID | No | | `schemaId` | UUID | Yes | | `status` | String | Yes | @@ -508,13 +509,13 @@ CRUD operations for BlueprintConstruction records. ```typescript // List all blueprintConstruction records -const items = await db.blueprintConstruction.findMany({ select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); +const items = await db.blueprintConstruction.findMany({ select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.blueprintConstruction.findOne({ id: '', select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); +const item = await db.blueprintConstruction.findOne({ id: '', select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); // Create -const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); +const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', error: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); // Update const updated = await db.blueprintConstruction.update({ where: { id: '' }, data: { blueprintId: '' }, select: { id: true } }).execute(); @@ -1396,6 +1397,7 @@ CRUD operations for DomainModule records. | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | | `defaultCapabilities` | String | Yes | +| `defaultReservedSubdomains` | JSON | Yes | | `domainEventsTableId` | UUID | Yes | | `domainEventsTableName` | String | Yes | | `domainVerificationsTableId` | UUID | Yes | @@ -1414,20 +1416,23 @@ CRUD operations for DomainModule records. | `privateSchemaName` | String | Yes | | `provisions` | JSON | Yes | | `publicSchemaName` | String | Yes | +| `reservedSubdomainsTableId` | UUID | Yes | +| `reservedSubdomainsTableName` | String | Yes | | `schemaId` | UUID | Yes | | `scope` | String | Yes | +| `sweepUnverifiedDomainsFunction` | String | Yes | **Operations:** ```typescript // List all domainModule records -const items = await db.domainModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.domainModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, reservedSubdomainsTableId: true, reservedSubdomainsTableName: true, schemaId: true, scope: true, sweepUnverifiedDomainsFunction: true } }).execute(); // Get one by id -const item = await db.domainModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.domainModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, defaultReservedSubdomains: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, reservedSubdomainsTableId: true, reservedSubdomainsTableName: true, schemaId: true, scope: true, sweepUnverifiedDomainsFunction: true } }).execute(); // Create -const created = await db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', defaultReservedSubdomains: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', reservedSubdomainsTableId: '', reservedSubdomainsTableName: '', schemaId: '', scope: '', sweepUnverifiedDomainsFunction: '' }, select: { id: true } }).execute(); // Update const updated = await db.domainModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -3435,8 +3440,6 @@ CRUD operations for ResourceModule records. | Field | Type | Editable | |-------|------|----------| | `apiName` | String | Yes | -| `builderBindingsTableId` | UUID | Yes | -| `builderBindingsTableName` | String | Yes | | `databaseId` | UUID | Yes | | `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | @@ -3474,18 +3477,20 @@ CRUD operations for ResourceModule records. | `rollupResourceUsageSummaryFunction` | String | Yes | | `schemaId` | UUID | Yes | | `scope` | String | Yes | +| `serviceBindingsTableId` | UUID | Yes | +| `serviceBindingsTableName` | String | Yes | **Operations:** ```typescript // List all resourceModule records -const items = await db.resourceModule.findMany({ select: { apiName: true, builderBindingsTableId: true, builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); +const items = await db.resourceModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, serviceBindingsTableId: true, serviceBindingsTableName: true } }).execute(); // Get one by id -const item = await db.resourceModule.findOne({ id: '', select: { apiName: true, builderBindingsTableId: true, builderBindingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); +const item = await db.resourceModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, registryBindingsTableId: true, registryBindingsTableName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true, serviceBindingsTableId: true, serviceBindingsTableName: true } }).execute(); // Create -const created = await db.resourceModule.create({ data: { apiName: '', builderBindingsTableId: '', builderBindingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.resourceModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', registryBindingsTableId: '', registryBindingsTableName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '', serviceBindingsTableId: '', serviceBindingsTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.resourceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -4340,7 +4345,7 @@ const deleted = await db.webhookModule.delete({ where: { id: '' } }).execu ### `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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. +Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-sdk/src/modules/orm/input-types.ts b/sdk/constructive-sdk/src/modules/orm/input-types.ts index ca44c2dad1..d4cde53664 100644 --- a/sdk/constructive-sdk/src/modules/orm/input-types.ts +++ b/sdk/constructive-sdk/src/modules/orm/input-types.ts @@ -461,7 +461,7 @@ export interface Blueprint { /** Timestamp when this blueprint was last modified. */ updatedAt?: string | null; } -/** Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts. */ +/** Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here as pending and a blueprint:construct job builds it in the background. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts, including failed ones. */ export interface BlueprintConstruction { /** The blueprint that was constructed. */ blueprintId?: string | null; @@ -473,11 +473,13 @@ export interface BlueprintConstruction { createdAt?: string | null; /** The database the blueprint was constructed into. */ databaseId?: string | null; + /** The coded error ({"code", "context", "class"} as raised through errors.raise_error, or {"code": , "message"} for a database error) a failed construction ended with. NULL unless status is failed. */ + error?: Record | null; /** Unique identifier for this construction attempt. */ id: string; /** The default schema used for tables that did not specify an explicit schema_name. NULL if not yet resolved. */ schemaId?: string | null; - /** Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. A failed construction raises and rolls back, so it leaves no row. */ + /** Execution state of this construction attempt. pending: enqueued, the blueprint:construct job has not started. constructing: the job is executing. constructed: successfully completed. failed: the job raised; the build rolled back and error carries its coded error. */ status?: string | null; /** Mapping of table names to created table UUIDs, populated after successful construction. Format: {"products": "uuid", "categories": "uuid", ...}. Defaults to empty object. */ tableMap?: Record | null; @@ -908,6 +910,7 @@ export interface DomainModule { catalogModuleId?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + defaultReservedSubdomains?: Record | null; domainEventsTableId?: string | null; domainEventsTableName?: string | null; domainVerificationsTableId?: string | null; @@ -926,8 +929,11 @@ export interface DomainModule { privateSchemaName?: string | null; provisions?: Record | null; publicSchemaName?: string | null; + reservedSubdomainsTableId?: string | null; + reservedSubdomainsTableName?: string | null; schemaId?: string | null; scope?: string | null; + sweepUnverifiedDomainsFunction?: string | null; } export interface EmailSenderModule { apiName?: string | null; @@ -2214,8 +2220,6 @@ export interface RepositoryModule { } export interface ResourceModule { apiName?: string | null; - builderBindingsTableId?: string | null; - builderBindingsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; entityField?: string | null; @@ -2253,6 +2257,8 @@ export interface ResourceModule { rollupResourceUsageSummaryFunction?: string | null; schemaId?: string | null; scope?: string | null; + serviceBindingsTableId?: string | null; + serviceBindingsTableName?: string | null; } export interface RlsModule { apiName?: string | null; @@ -3158,6 +3164,7 @@ export type BlueprintConstructionSelect = { constructedDefinition?: boolean; createdAt?: boolean; databaseId?: boolean; + error?: boolean; id?: boolean; schemaId?: boolean; status?: boolean; @@ -3599,6 +3606,7 @@ export type DomainModuleSelect = { catalogModuleId?: boolean; databaseId?: boolean; defaultCapabilities?: boolean; + defaultReservedSubdomains?: boolean; domainEventsTableId?: boolean; domainEventsTableName?: boolean; domainVerificationsTableId?: boolean; @@ -3617,8 +3625,11 @@ export type DomainModuleSelect = { privateSchemaName?: boolean; provisions?: boolean; publicSchemaName?: boolean; + reservedSubdomainsTableId?: boolean; + reservedSubdomainsTableName?: boolean; schemaId?: boolean; scope?: boolean; + sweepUnverifiedDomainsFunction?: boolean; catalogModule?: { select: CatalogModuleSelect; }; @@ -4666,8 +4677,6 @@ export type RepositoryModuleSelect = { }; export type ResourceModuleSelect = { apiName?: boolean; - builderBindingsTableId?: boolean; - builderBindingsTableName?: boolean; databaseId?: boolean; defaultCapabilities?: boolean; entityField?: boolean; @@ -4705,6 +4714,8 @@ export type ResourceModuleSelect = { rollupResourceUsageSummaryFunction?: boolean; schemaId?: boolean; scope?: boolean; + serviceBindingsTableId?: boolean; + serviceBindingsTableName?: boolean; merkleStoreModule?: { select: MerkleStoreModuleSelect; }; @@ -5589,6 +5600,8 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `error` field. */ + error?: JSONFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -6471,6 +6484,8 @@ export interface DomainModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ defaultCapabilities?: StringListFilter; + /** Filter by the object’s `defaultReservedSubdomains` field. */ + defaultReservedSubdomains?: JSONFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -6511,6 +6526,10 @@ export interface DomainModuleFilter { provisions?: JSONFilter; /** Filter by the object’s `publicSchemaName` field. */ publicSchemaName?: StringFilter; + /** Filter by the object’s `reservedSubdomainsTableId` field. */ + reservedSubdomainsTableId?: UUIDFilter; + /** Filter by the object’s `reservedSubdomainsTableName` field. */ + reservedSubdomainsTableName?: StringFilter; /** Filter by the object’s `routeModules` relation. */ routeModules?: DomainModuleToManyRouteModuleFilter; /** `routeModules` exist. */ @@ -6519,6 +6538,8 @@ export interface DomainModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `sweepUnverifiedDomainsFunction` field. */ + sweepUnverifiedDomainsFunction?: StringFilter; } export interface EmailSenderModuleFilter { /** Checks for all expressions in this list. */ @@ -8619,10 +8640,6 @@ export interface ResourceModuleFilter { and?: ResourceModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; - /** Filter by the object’s `builderBindingsTableId` field. */ - builderBindingsTableId?: UUIDFilter; - /** Filter by the object’s `builderBindingsTableName` field. */ - builderBindingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ @@ -8709,6 +8726,10 @@ export interface ResourceModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `serviceBindingsTableId` field. */ + serviceBindingsTableId?: UUIDFilter; + /** Filter by the object’s `serviceBindingsTableName` field. */ + serviceBindingsTableName?: StringFilter; } export interface RlsModuleFilter { /** Checks for all expressions in this list. */ @@ -9968,6 +9989,8 @@ export type BlueprintConstructionOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'ERROR_ASC' + | 'ERROR_DESC' | 'ID_ASC' | 'ID_DESC' | 'NATURAL' @@ -10724,6 +10747,8 @@ export type DomainModuleOrderBy = | 'DATABASE_ID_DESC' | 'DEFAULT_CAPABILITIES_ASC' | 'DEFAULT_CAPABILITIES_DESC' + | 'DEFAULT_RESERVED_SUBDOMAINS_ASC' + | 'DEFAULT_RESERVED_SUBDOMAINS_DESC' | 'DOMAINS_TABLE_ID_ASC' | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' @@ -10763,10 +10788,16 @@ export type DomainModuleOrderBy = | 'PROVISIONS_DESC' | 'PUBLIC_SCHEMA_NAME_ASC' | 'PUBLIC_SCHEMA_NAME_DESC' + | 'RESERVED_SUBDOMAINS_TABLE_ID_ASC' + | 'RESERVED_SUBDOMAINS_TABLE_ID_DESC' + | 'RESERVED_SUBDOMAINS_TABLE_NAME_ASC' + | 'RESERVED_SUBDOMAINS_TABLE_NAME_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' - | 'SCOPE_DESC'; + | 'SCOPE_DESC' + | 'SWEEP_UNVERIFIED_DOMAINS_FUNCTION_ASC' + | 'SWEEP_UNVERIFIED_DOMAINS_FUNCTION_DESC'; export type EmailSenderModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -12618,10 +12649,6 @@ export type RepositoryModuleOrderBy = export type ResourceModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' - | 'BUILDER_BINDINGS_TABLE_ID_ASC' - | 'BUILDER_BINDINGS_TABLE_ID_DESC' - | 'BUILDER_BINDINGS_TABLE_NAME_ASC' - | 'BUILDER_BINDINGS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'DEFAULT_CAPABILITIES_ASC' @@ -12698,7 +12725,11 @@ export type ResourceModuleOrderBy = | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' - | 'SCOPE_DESC'; + | 'SCOPE_DESC' + | 'SERVICE_BINDINGS_TABLE_ID_ASC' + | 'SERVICE_BINDINGS_TABLE_ID_DESC' + | 'SERVICE_BINDINGS_TABLE_NAME_ASC' + | 'SERVICE_BINDINGS_TABLE_NAME_DESC'; export type RlsModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -13893,6 +13924,7 @@ export interface CreateBlueprintConstructionInput { constructedAt?: string; constructedDefinition?: Record; databaseId: string; + error?: Record; schemaId?: string; status?: string; tableMap?: Record; @@ -13903,6 +13935,7 @@ export interface BlueprintConstructionPatch { constructedAt?: string | null; constructedDefinition?: Record | null; databaseId?: string | null; + error?: Record | null; schemaId?: string | null; status?: string | null; tableMap?: Record | null; @@ -14827,6 +14860,7 @@ export interface CreateDomainModuleInput { catalogModuleId?: string; databaseId: string; defaultCapabilities?: string[]; + defaultReservedSubdomains?: Record; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -14844,8 +14878,11 @@ export interface CreateDomainModuleInput { privateSchemaName?: string; provisions?: Record; publicSchemaName?: string; + reservedSubdomainsTableId?: string; + reservedSubdomainsTableName?: string; schemaId?: string; scope: string; + sweepUnverifiedDomainsFunction?: string; }; } export interface DomainModulePatch { @@ -14853,6 +14890,7 @@ export interface DomainModulePatch { catalogModuleId?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + defaultReservedSubdomains?: Record | null; domainEventsTableId?: string | null; domainEventsTableName?: string | null; domainVerificationsTableId?: string | null; @@ -14870,8 +14908,11 @@ export interface DomainModulePatch { privateSchemaName?: string | null; provisions?: Record | null; publicSchemaName?: string | null; + reservedSubdomainsTableId?: string | null; + reservedSubdomainsTableName?: string | null; schemaId?: string | null; scope?: string | null; + sweepUnverifiedDomainsFunction?: string | null; } export interface UpdateDomainModuleInput { clientMutationId?: string; @@ -17132,8 +17173,6 @@ export interface CreateResourceModuleInput { clientMutationId?: string; resourceModule: { apiName?: string; - builderBindingsTableId?: string; - builderBindingsTableName?: string; databaseId: string; defaultCapabilities?: string[]; entityField?: string; @@ -17170,12 +17209,12 @@ export interface CreateResourceModuleInput { rollupResourceUsageSummaryFunction?: string; schemaId?: string; scope: string; + serviceBindingsTableId?: string; + serviceBindingsTableName?: string; }; } export interface ResourceModulePatch { apiName?: string | null; - builderBindingsTableId?: string | null; - builderBindingsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; entityField?: string | null; @@ -17212,6 +17251,8 @@ export interface ResourceModulePatch { rollupResourceUsageSummaryFunction?: string | null; schemaId?: string | null; scope?: string | null; + serviceBindingsTableId?: string | null; + serviceBindingsTableName?: string | null; } export interface UpdateResourceModuleInput { clientMutationId?: string; @@ -18741,11 +18782,13 @@ export interface BlueprintConstructionInput { createdAt?: string; /** The database the blueprint was constructed into. */ databaseId: string; + /** The coded error ({"code", "context", "class"} as raised through errors.raise_error, or {"code": , "message"} for a database error) a failed construction ended with. NULL unless status is failed. */ + error?: Record; /** Unique identifier for this construction attempt. */ id?: string; /** The default schema used for tables that did not specify an explicit schema_name. NULL if not yet resolved. */ schemaId?: string; - /** Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. A failed construction raises and rolls back, so it leaves no row. */ + /** Execution state of this construction attempt. pending: enqueued, the blueprint:construct job has not started. constructing: the job is executing. constructed: successfully completed. failed: the job raised; the build rolled back and error carries its coded error. */ status?: string; /** Mapping of table names to created table UUIDs, populated after successful construction. Format: {"products": "uuid", "categories": "uuid", ...}. Defaults to empty object. */ tableMap?: Record; @@ -19211,6 +19254,7 @@ export interface DomainModuleInput { catalogModuleId?: string; databaseId: string; defaultCapabilities?: string[]; + defaultReservedSubdomains?: Record; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -19229,8 +19273,11 @@ export interface DomainModuleInput { privateSchemaName?: string; provisions?: Record; publicSchemaName?: string; + reservedSubdomainsTableId?: string; + reservedSubdomainsTableName?: string; schemaId?: string; scope: string; + sweepUnverifiedDomainsFunction?: string; } /** An input for mutations affecting `EmailSenderModule` */ export interface EmailSenderModuleInput { @@ -20507,8 +20554,6 @@ export interface RepositoryModuleInput { /** An input for mutations affecting `ResourceModule` */ export interface ResourceModuleInput { apiName?: string; - builderBindingsTableId?: string; - builderBindingsTableName?: string; databaseId: string; defaultCapabilities?: string[]; entityField?: string; @@ -20546,6 +20591,8 @@ export interface ResourceModuleInput { rollupResourceUsageSummaryFunction?: string; schemaId?: string; scope: string; + serviceBindingsTableId?: string; + serviceBindingsTableName?: string; } /** An input for mutations affecting `RlsModule` */ export interface RlsModuleInput { @@ -20945,6 +20992,8 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `error` field. */ + error?: JSONFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -21223,6 +21272,8 @@ export interface DomainModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ defaultCapabilities?: StringListFilter; + /** Filter by the object’s `defaultReservedSubdomains` field. */ + defaultReservedSubdomains?: JSONFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -21263,6 +21314,10 @@ export interface DomainModuleFilter { provisions?: JSONFilter; /** Filter by the object’s `publicSchemaName` field. */ publicSchemaName?: StringFilter; + /** Filter by the object’s `reservedSubdomainsTableId` field. */ + reservedSubdomainsTableId?: UUIDFilter; + /** Filter by the object’s `reservedSubdomainsTableName` field. */ + reservedSubdomainsTableName?: StringFilter; /** Filter by the object’s `routeModules` relation. */ routeModules?: DomainModuleToManyRouteModuleFilter; /** `routeModules` exist. */ @@ -21271,6 +21326,8 @@ export interface DomainModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `sweepUnverifiedDomainsFunction` field. */ + sweepUnverifiedDomainsFunction?: StringFilter; } /** A filter to be used against `RouteModule` object types. All fields are combined with a logical ‘and.’ */ export interface RouteModuleFilter { @@ -21884,10 +21941,6 @@ export interface ResourceModuleFilter { and?: ResourceModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; - /** Filter by the object’s `builderBindingsTableId` field. */ - builderBindingsTableId?: UUIDFilter; - /** Filter by the object’s `builderBindingsTableName` field. */ - builderBindingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; /** Filter by the object’s `defaultCapabilities` field. */ @@ -21974,6 +22027,10 @@ export interface ResourceModuleFilter { schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; + /** Filter by the object’s `serviceBindingsTableId` field. */ + serviceBindingsTableId?: UUIDFilter; + /** Filter by the object’s `serviceBindingsTableName` field. */ + serviceBindingsTableName?: StringFilter; } /** A filter to be used against `EmailSenderModule` object types. All fields are combined with a logical ‘and.’ */ export interface EmailSenderModuleFilter { diff --git a/sdk/constructive-sdk/src/modules/orm/mutation/index.ts b/sdk/constructive-sdk/src/modules/orm/mutation/index.ts index e59de99a2e..26ad9b2410 100644 --- a/sdk/constructive-sdk/src/modules/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/modules/orm/mutation/index.ts @@ -20,7 +20,7 @@ import type { import { connectionFieldsMap } from '../input-types'; /** * Variables for 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). A table entry either names its table (table_name plus optional schema_name) or references one an installed module generated ("module": {"type": "agent", "scope": "org", "table": "message"}), which resolves through the module row's recorded table ids and raises when it matches nothing instead of creating an empty table. 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. A failure raises its coded error to the caller and rolls back the whole construction, including the construction record. + * Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. */ export interface ConstructBlueprintVariables { input: ConstructBlueprintInput; diff --git a/sdk/constructive-sdk/src/remote/README.md b/sdk/constructive-sdk/src/remote/README.md index ca5555a4bf..e329aef3fc 100644 --- a/sdk/constructive-sdk/src/remote/README.md +++ b/sdk/constructive-sdk/src/remote/README.md @@ -9,7 +9,7 @@ ## Overview - **Tables:** 3 -- **Custom queries:** 0 +- **Custom queries:** 1 - **Custom mutations:** 2 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/remote/orm/README.md b/sdk/constructive-sdk/src/remote/orm/README.md index eb2fdd09aa..b76819b71e 100644 --- a/sdk/constructive-sdk/src/remote/orm/README.md +++ b/sdk/constructive-sdk/src/remote/orm/README.md @@ -169,6 +169,17 @@ const deleted = await db.machineSession.delete({ where: { id: '' } }).exec ## Custom Operations +### `db.query.currentDatabaseId` + +currentDatabaseId + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.currentDatabaseId().execute(); +``` + ### `db.mutation.machinesEnroll` machinesEnroll diff --git a/sdk/constructive-sdk/src/remote/orm/index.ts b/sdk/constructive-sdk/src/remote/orm/index.ts index e166dd236a..554ce59ad1 100644 --- a/sdk/constructive-sdk/src/remote/orm/index.ts +++ b/sdk/constructive-sdk/src/remote/orm/index.ts @@ -8,12 +8,14 @@ import type { OrmClientConfig } from './client'; import { MachineModel } from './models/machine'; import { MachineMessageModel } from './models/machineMessage'; import { MachineSessionModel } from './models/machineSession'; +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 @@ -44,6 +46,7 @@ export function createClient(config: OrmClientConfig) { machine: new MachineModel(client), machineMessage: new MachineMessageModel(client), machineSession: new MachineSessionModel(client), + query: createQueryOperations(client), mutation: createMutationOperations(client), }; } diff --git a/sdk/constructive-sdk/src/remote/orm/query/index.ts b/sdk/constructive-sdk/src/remote/orm/query/index.ts new file mode 100644 index 0000000000..901e0de080 --- /dev/null +++ b/sdk/constructive-sdk/src/remote/orm/query/index.ts @@ -0,0 +1,32 @@ +/** + * 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'; +export function createQueryOperations(client: OrmClient) { + return { + currentDatabaseId: (options?: { select?: Record }) => + new QueryBuilder<{ + currentDatabaseId: string | null; + }>({ + client, + operation: 'query', + operationName: 'CurrentDatabaseId', + fieldName: 'currentDatabaseId', + ...buildCustomDocument( + 'query', + 'CurrentDatabaseId', + 'currentDatabaseId', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), + }; +} diff --git a/sdk/migrate-client/schemas/migrate.graphql b/sdk/migrate-client/schemas/migrate.graphql index 89b7681259..749588caef 100644 --- a/sdk/migrate-client/schemas/migrate.graphql +++ b/sdk/migrate-client/schemas/migrate.graphql @@ -309,6 +309,11 @@ type MetaEnum { """Information about a table field/column""" type MetaField { + """ + Values this field accepts, when the set is fixed; null otherwise. Set on a table's own fields only. + """ + allowedValues: [String!] + """PostgreSQL column name""" columnName: String! description: String @@ -320,6 +325,19 @@ type MetaField { isNotNull: Boolean! isPrimaryKey: Boolean! + """ + Whether a create must provide this field. Set on a table's own fields only. + """ + isRequiredOnCreate: Boolean + + """Whether a create may set this field. Set on a table's own fields only.""" + isWritableOnCreate: Boolean + + """ + Whether an update may change this field. Set on a table's own fields only. + """ + isWritableOnUpdate: Boolean + """Final GraphQL field name""" name: String! type: MetaType! @@ -344,7 +362,7 @@ type MetaHasRelation { type: String } -"""i18n metadata for a table with @i18n tag""" +"""i18n metadata for a translatable table""" type MetaI18n { """Fields that are translatable""" translatableFields: [MetaI18nField!]! @@ -371,7 +389,7 @@ type MetaIndex { name: String! } -"""Table inflection names""" +"""Type and field names generated for this table""" type MetaInflection { allRows: String! conditionType: String! @@ -416,7 +434,7 @@ type MetaQuery { update: String } -"""Realtime metadata for a table with @realtime tag""" +"""Realtime metadata for a table with change subscriptions""" type MetaRealtime { """The generated subscription field name (e.g. onPostChanged)""" subscriptionFieldName: String! @@ -437,7 +455,7 @@ type MetaRelations { } """ -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +How a client must serialize and parse a scalar whose wire format gqlType alone does not settle. Null for plain scalars whose wire format is obvious from gqlType. """ type MetaScalarEncoding { """For 'vector': declared length, else null.""" @@ -468,11 +486,11 @@ type MetaSchema { """Provisioning scope metadata for a table""" type MetaScope { - """SQL name of the entity table for entity scopes, else null""" + """Name of the entity table for entity scopes, else null""" entityTable: String """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + Field name of the scope key (e.g. databaseId, orgId), null for global tiers """ keyColumn: String @@ -481,7 +499,7 @@ type MetaScope { """ scope: String! - """Provenance of the scope metadata (always 'smartTag')""" + """Where this scope metadata comes from""" source: String! """Coarse bucket: 'global', 'database', or 'entity'""" @@ -512,7 +530,7 @@ type MetaSearchColumn { name: String! } -"""Per-table search configuration from @searchConfig smart tag""" +"""Per-table search configuration""" type MetaSearchConfig { """Exponential decay factor per day""" boostRecencyDecay: Float @@ -529,7 +547,7 @@ type MetaSearchConfig { """Storage metadata for a table""" type MetaStorage { - """GraphQL type name of the plane's buckets table""" + """GraphQL type name of the paired buckets table""" bucketsType: String! """ @@ -537,7 +555,7 @@ type MetaStorage { """ downloadUrlField: String - """GraphQL type name of the plane's files table""" + """GraphQL type name of the paired files table""" filesType: String! """Whether this table is a storage buckets table""" @@ -546,13 +564,11 @@ type MetaStorage { """Whether this table is a storage files table""" isFilesTable: Boolean! - """The plane's GraphQL upload surface""" + """Upload mutations and types for this storage""" upload: MetaStorageUpload! } -""" -The GraphQL upload surface of a storage plane, derived from the registry facts the presigned-url plugin emits from -""" +"""The upload mutations and types for a storage table pair""" type MetaStorageUpload { """Per-file input type inside the bulk input""" bulkFileInputType: String! @@ -578,7 +594,7 @@ type MetaStorageUpload { """Payload type of the single upload mutation""" payloadType: String! - """Whether the upload input requires ownerId (entity-keyed plane)""" + """Whether the upload input requires ownerId""" requiresOwnerId: Boolean! } @@ -588,22 +604,27 @@ type MetaTable { fields: [MetaField!]! foreignKeyConstraints: [MetaForeignKeyConstraint!]! - """i18n metadata (null if no @i18n tag)""" + """i18n metadata (null if the table is not translatable)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! + """ + Whether this table only links rows of two other tables; the link appears in their manyToMany relations + """ + isJunction: Boolean! + """Final GraphQL output type name""" name: String! primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! query: MetaQuery! - """Realtime metadata (null if no @realtime tag)""" + """Realtime metadata (null if the table has no change subscriptions)""" realtime: MetaRealtime relations: MetaRelations! schemaName: String! - """Provisioning scope metadata (null if no @scope tag)""" + """Provisioning scope metadata (null if the table has no scope)""" scope: MetaScope """Search metadata (null if no search configured)"""