From c1fabd912e3691b657e0a9363dd5d8bf8f5980a3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 20 Oct 2026 07:37:03 +0000 Subject: [PATCH] chore: update schemas and regenerate all SDK clients Auto-generated by schema-propagation workflow. Source: constructive-db@ad119b86821 --- .../cli-admin/references/provision-bucket.md | 9 +- .../cli-agent/references/provision-bucket.md | 9 +- .agents/skills/cli-api/SKILL.md | 9 +- .../references/create-function-from-source.md | 19 + .../references/email-shared-account.md | 19 + .../cli-api/references/managed-domain.md | 6 +- .../references/platform-managed-domain.md | 6 +- .../cli-api/references/provision-bucket.md | 9 +- .../cli-api/references/unique-constraint.md | 6 +- .../references/update-function-from-source.md | 19 + .../cli-auth/references/provision-bucket.md | 9 +- .../cli-auth/references/request-magic-link.md | 4 +- .agents/skills/cli-auth/references/sign-up.md | 4 +- .../references/function-invocation.md | 6 +- .../platform-function-invocation.md | 6 +- .../references/provision-bucket.md | 9 +- .../cli-config/references/provision-bucket.md | 9 +- .../cli-infra/references/provision-bucket.md | 9 +- .../references/billing-provider-module.md | 6 +- .../references/blueprint-construction.md | 6 +- .../cli-modules/references/catalog-module.md | 6 +- .../references/construct-blueprint.md | 2 +- .../references/provision-bucket.md | 9 +- .../cli-modules/references/storage-module.md | 6 +- .../references/provision-bucket.md | 9 +- .../cli-remote/references/provision-bucket.md | 9 +- .../skills/cli-storage/references/bucket.md | 6 +- .../cli-storage/references/platform-bucket.md | 6 +- .../references/provision-bucket.md | 9 +- .../cli-storage/references/upload-files.md | 2 +- .../references/upload-platform-files.md | 2 +- .../cli-usage/references/provision-bucket.md | 9 +- .../references/provision-bucket.md | 9 +- .../references/provision-bucket.md | 9 +- .agents/skills/hooks-api/SKILL.md | 9 +- .../references/create-function-from-source.md | 20 + .../references/email-shared-account.md | 19 + .../hooks-api/references/managed-domain.md | 8 +- .../references/platform-managed-domain.md | 8 +- .../hooks-api/references/provision-bucket.md | 9 +- .../hooks-api/references/unique-constraint.md | 8 +- .../references/update-function-from-source.md | 20 + .../hooks-auth/references/provision-bucket.md | 9 +- .../references/request-magic-link.md | 4 +- .../skills/hooks-auth/references/sign-up.md | 4 +- .../references/function-invocation.md | 8 +- .../platform-function-invocation.md | 8 +- .../references/provision-bucket.md | 9 +- .../references/provision-bucket.md | 9 +- .../references/provision-bucket.md | 9 +- .../references/billing-provider-module.md | 8 +- .../references/blueprint-construction.md | 8 +- .../references/catalog-module.md | 8 +- .../references/construct-blueprint.md | 2 +- .../references/provision-bucket.md | 9 +- .../references/storage-module.md | 8 +- .../references/provision-bucket.md | 9 +- .../references/provision-bucket.md | 9 +- .../skills/hooks-storage/references/bucket.md | 8 +- .../references/platform-bucket.md | 8 +- .../references/provision-bucket.md | 9 +- .../hooks-storage/references/upload-files.md | 2 +- .../references/upload-platform-files.md | 2 +- .../references/provision-bucket.md | 9 +- .../orm-admin/references/provision-bucket.md | 9 +- .../orm-agent/references/provision-bucket.md | 9 +- .agents/skills/orm-api/SKILL.md | 9 +- .../references/create-function-from-source.md | 19 + .../references/email-shared-account.md | 19 + .../orm-api/references/managed-domain.md | 4 +- .../references/platform-managed-domain.md | 4 +- .../orm-api/references/provision-bucket.md | 9 +- .../orm-api/references/unique-constraint.md | 4 +- .../references/update-function-from-source.md | 19 + .../orm-auth/references/provision-bucket.md | 9 +- .../orm-auth/references/request-magic-link.md | 4 +- .agents/skills/orm-auth/references/sign-up.md | 4 +- .../references/function-invocation.md | 4 +- .../platform-function-invocation.md | 4 +- .../references/provision-bucket.md | 9 +- .../orm-config/references/provision-bucket.md | 9 +- .../orm-infra/references/provision-bucket.md | 9 +- .../references/billing-provider-module.md | 4 +- .../references/blueprint-construction.md | 4 +- .../orm-modules/references/catalog-module.md | 4 +- .../references/construct-blueprint.md | 2 +- .../references/provision-bucket.md | 9 +- .../orm-modules/references/storage-module.md | 4 +- .../references/provision-bucket.md | 9 +- .../orm-remote/references/provision-bucket.md | 9 +- .../skills/orm-storage/references/bucket.md | 4 +- .../orm-storage/references/platform-bucket.md | 4 +- .../references/provision-bucket.md | 9 +- .../orm-storage/references/upload-files.md | 2 +- .../references/upload-platform-files.md | 2 +- .../orm-usage/references/provision-bucket.md | 9 +- pgpm/export/src/meta-export-tables.json | 9 + sdk/constructive-cli/src/admin/cli/README.md | 18 +- .../src/admin/cli/commands.ts | 2 +- .../admin/cli/commands/provision-bucket.ts | 2 +- sdk/constructive-cli/src/admin/orm/README.md | 9 +- .../src/admin/orm/input-types.ts | 8 +- .../src/admin/orm/mutation/index.ts | 9 +- sdk/constructive-cli/src/agent/cli/README.md | 18 +- .../src/agent/cli/commands.ts | 2 +- .../agent/cli/commands/provision-bucket.ts | 2 +- sdk/constructive-cli/src/agent/orm/README.md | 9 +- .../src/agent/orm/input-types.ts | 8 +- .../src/agent/orm/mutation/index.ts | 9 +- sdk/constructive-cli/src/api/README.md | 6 +- sdk/constructive-cli/src/api/cli/README.md | 133 ++- sdk/constructive-cli/src/api/cli/commands.ts | 12 +- .../commands/create-function-from-source.ts | 53 ++ .../api/cli/commands/email-shared-account.ts | 30 + .../src/api/cli/commands/hostname-binding.ts | 409 --------- .../src/api/cli/commands/managed-domain.ts | 22 + .../cli/commands/platform-managed-domain.ts | 22 + .../src/api/cli/commands/provision-bucket.ts | 2 +- .../src/api/cli/commands/route-binding.ts | 497 ---------- .../src/api/cli/commands/unique-constraint.ts | 22 + .../commands/update-function-from-source.ts | 53 ++ sdk/constructive-cli/src/api/orm/README.md | 153 ++- sdk/constructive-cli/src/api/orm/index.ts | 4 - .../src/api/orm/input-types.ts | 587 ++---------- .../src/api/orm/models/hostnameBinding.ts | 245 ----- .../src/api/orm/models/index.ts | 2 - .../src/api/orm/models/routeBinding.ts | 245 ----- .../src/api/orm/mutation/index.ts | 87 +- .../src/api/orm/query/index.ts | 19 + sdk/constructive-cli/src/auth/cli/README.md | 22 +- sdk/constructive-cli/src/auth/cli/commands.ts | 2 +- .../src/auth/cli/commands/provision-bucket.ts | 2 +- sdk/constructive-cli/src/auth/orm/README.md | 13 +- .../src/auth/orm/input-types.ts | 34 +- .../src/auth/orm/mutation/index.ts | 9 +- .../src/compute/cli/README.md | 26 +- .../src/compute/cli/commands.ts | 2 +- .../cli/commands/function-invocation.ts | 44 + .../commands/platform-function-invocation.ts | 44 + .../compute/cli/commands/provision-bucket.ts | 2 +- .../src/compute/orm/README.md | 25 +- .../src/compute/orm/input-types.ts | 60 +- .../src/compute/orm/mutation/index.ts | 9 +- sdk/constructive-cli/src/config/cli/README.md | 18 +- .../src/config/cli/commands.ts | 2 +- .../config/cli/commands/provision-bucket.ts | 2 +- sdk/constructive-cli/src/config/orm/README.md | 9 +- .../src/config/orm/input-types.ts | 8 +- .../src/config/orm/mutation/index.ts | 9 +- sdk/constructive-cli/src/infra/cli/README.md | 18 +- .../src/infra/cli/commands.ts | 2 +- .../infra/cli/commands/provision-bucket.ts | 2 +- sdk/constructive-cli/src/infra/orm/README.md | 9 +- .../src/infra/orm/input-types.ts | 8 +- .../src/infra/orm/mutation/index.ts | 9 +- .../src/modules/cli/README.md | 39 +- .../src/modules/cli/commands.ts | 2 +- .../cli/commands/billing-provider-module.ts | 110 +++ .../cli/commands/blueprint-construction.ts | 22 - .../modules/cli/commands/catalog-module.ts | 44 + .../cli/commands/construct-blueprint.ts | 2 +- .../modules/cli/commands/provision-bucket.ts | 2 +- .../modules/cli/commands/storage-module.ts | 22 + .../src/modules/orm/README.md | 44 +- .../src/modules/orm/input-types.ts | 103 ++- .../src/modules/orm/mutation/index.ts | 11 +- .../src/objects/cli/README.md | 18 +- .../src/objects/cli/commands.ts | 2 +- .../objects/cli/commands/provision-bucket.ts | 2 +- .../src/objects/orm/README.md | 9 +- .../src/objects/orm/input-types.ts | 8 +- .../src/objects/orm/mutation/index.ts | 9 +- sdk/constructive-cli/src/remote/cli/README.md | 18 +- .../src/remote/cli/commands.ts | 2 +- .../remote/cli/commands/provision-bucket.ts | 2 +- sdk/constructive-cli/src/remote/orm/README.md | 9 +- .../src/remote/orm/input-types.ts | 8 +- .../src/remote/orm/mutation/index.ts | 9 +- .../src/storage/cli/README.md | 34 +- .../src/storage/cli/commands.ts | 2 +- .../src/storage/cli/commands/bucket.ts | 23 + .../storage/cli/commands/platform-bucket.ts | 23 + .../storage/cli/commands/provision-bucket.ts | 2 +- .../src/storage/cli/commands/upload-files.ts | 2 +- .../cli/commands/upload-platform-files.ts | 2 +- .../src/storage/orm/README.md | 29 +- .../src/storage/orm/input-types.ts | 40 +- .../src/storage/orm/mutation/index.ts | 13 +- sdk/constructive-cli/src/usage/cli/README.md | 18 +- .../src/usage/cli/commands.ts | 2 +- .../usage/cli/commands/provision-bucket.ts | 2 +- sdk/constructive-cli/src/usage/orm/README.md | 9 +- .../src/usage/orm/input-types.ts | 8 +- .../src/usage/orm/mutation/index.ts | 9 +- .../src/admin/hooks/README.md | 18 +- .../src/admin/orm/README.md | 9 +- .../src/admin/orm/input-types.ts | 8 +- .../src/admin/orm/mutation/index.ts | 9 +- .../src/admin/schema-types.ts | 6 +- .../src/agent/hooks/README.md | 18 +- .../src/agent/orm/README.md | 9 +- .../src/agent/orm/input-types.ts | 8 +- .../src/agent/orm/mutation/index.ts | 9 +- .../src/agent/schema-types.ts | 6 +- sdk/constructive-react/src/api/README.md | 6 +- .../src/api/hooks/README.md | 120 +-- sdk/constructive-react/src/api/hooks/index.ts | 2 +- .../src/api/hooks/invalidation.ts | 52 -- .../src/api/hooks/mutation-keys.ts | 32 +- .../src/api/hooks/mutations/index.ts | 8 +- .../useCreateFunctionFromSourceMutation.ts | 55 ++ .../useCreateHostnameBindingMutation.ts | 91 -- .../useCreateRouteBindingMutation.ts | 88 -- .../useDeleteHostnameBindingMutation.ts | 98 -- .../useDeleteRouteBindingMutation.ts | 98 -- .../useUpdateFunctionFromSourceMutation.ts | 55 ++ .../useUpdateHostnameBindingMutation.ts | 116 --- .../useUpdateRouteBindingMutation.ts | 110 --- .../src/api/hooks/queries/index.ts | 5 +- .../queries/useEmailSharedAccountQuery.ts | 90 ++ .../hooks/queries/useHostnameBindingQuery.ts | 138 --- .../hooks/queries/useHostnameBindingsQuery.ts | 163 ---- .../api/hooks/queries/useRouteBindingQuery.ts | 138 --- .../hooks/queries/useRouteBindingsQuery.ts | 145 --- .../src/api/hooks/query-keys.ts | 21 +- sdk/constructive-react/src/api/orm/README.md | 153 ++- sdk/constructive-react/src/api/orm/index.ts | 4 - .../src/api/orm/input-types.ts | 587 ++---------- .../src/api/orm/models/hostnameBinding.ts | 245 ----- .../src/api/orm/models/index.ts | 2 - .../src/api/orm/models/routeBinding.ts | 245 ----- .../src/api/orm/mutation/index.ts | 87 +- .../src/api/orm/query/index.ts | 19 + .../src/api/schema-types.ts | 366 +------- sdk/constructive-react/src/api/types.ts | 31 +- .../src/auth/hooks/README.md | 18 +- sdk/constructive-react/src/auth/orm/README.md | 13 +- .../src/auth/orm/input-types.ts | 34 +- .../src/auth/orm/mutation/index.ts | 9 +- .../src/auth/schema-types.ts | 20 +- .../src/compute/hooks/README.md | 30 +- .../src/compute/orm/README.md | 25 +- .../src/compute/orm/input-types.ts | 60 +- .../src/compute/orm/mutation/index.ts | 9 +- .../src/compute/schema-types.ts | 38 +- sdk/constructive-react/src/compute/types.ts | 4 + .../src/config/hooks/README.md | 18 +- .../src/config/orm/README.md | 9 +- .../src/config/orm/input-types.ts | 8 +- .../src/config/orm/mutation/index.ts | 9 +- .../src/config/schema-types.ts | 6 +- .../src/infra/hooks/README.md | 18 +- .../src/infra/orm/README.md | 9 +- .../src/infra/orm/input-types.ts | 8 +- .../src/infra/orm/mutation/index.ts | 9 +- .../src/infra/schema-types.ts | 6 +- .../src/modules/hooks/README.md | 46 +- .../src/modules/orm/README.md | 44 +- .../src/modules/orm/input-types.ts | 103 ++- .../src/modules/orm/mutation/index.ts | 11 +- .../src/modules/schema-types.ts | 66 +- sdk/constructive-react/src/modules/types.ts | 9 +- .../src/objects/hooks/README.md | 18 +- .../src/objects/orm/README.md | 9 +- .../src/objects/orm/input-types.ts | 8 +- .../src/objects/orm/mutation/index.ts | 9 +- .../src/objects/schema-types.ts | 6 +- .../src/remote/hooks/README.md | 18 +- .../src/remote/orm/README.md | 9 +- .../src/remote/orm/input-types.ts | 8 +- .../src/remote/orm/mutation/index.ts | 9 +- .../src/remote/schema-types.ts | 6 +- .../src/storage/hooks/README.md | 38 +- .../src/storage/orm/README.md | 29 +- .../src/storage/orm/input-types.ts | 40 +- .../src/storage/orm/mutation/index.ts | 13 +- .../src/storage/schema-types.ts | 22 +- sdk/constructive-react/src/storage/types.ts | 4 + .../src/usage/hooks/README.md | 18 +- .../src/usage/orm/README.md | 9 +- .../src/usage/orm/input-types.ts | 8 +- .../src/usage/orm/mutation/index.ts | 9 +- .../src/usage/schema-types.ts | 6 +- sdk/constructive-sdk/schemas/admin.graphql | 17 +- sdk/constructive-sdk/schemas/agent.graphql | 17 +- sdk/constructive-sdk/schemas/api.graphql | 869 ++---------------- sdk/constructive-sdk/schemas/auth.graphql | 32 +- sdk/constructive-sdk/schemas/cluster.graphql | 26 +- sdk/constructive-sdk/schemas/compute.graphql | 85 +- sdk/constructive-sdk/schemas/config.graphql | 17 +- sdk/constructive-sdk/schemas/infra.graphql | 17 +- sdk/constructive-sdk/schemas/modules.graphql | 109 ++- sdk/constructive-sdk/schemas/objects.graphql | 17 +- sdk/constructive-sdk/schemas/remote.graphql | 17 +- sdk/constructive-sdk/schemas/storage.graphql | 71 +- sdk/constructive-sdk/schemas/usage.graphql | 17 +- sdk/constructive-sdk/src/admin/orm/README.md | 9 +- .../src/admin/orm/input-types.ts | 8 +- .../src/admin/orm/mutation/index.ts | 9 +- sdk/constructive-sdk/src/agent/orm/README.md | 9 +- .../src/agent/orm/input-types.ts | 8 +- .../src/agent/orm/mutation/index.ts | 9 +- sdk/constructive-sdk/src/api/README.md | 6 +- sdk/constructive-sdk/src/api/orm/README.md | 153 ++- sdk/constructive-sdk/src/api/orm/index.ts | 4 - .../src/api/orm/input-types.ts | 587 ++---------- .../src/api/orm/models/hostnameBinding.ts | 245 ----- .../src/api/orm/models/index.ts | 2 - .../src/api/orm/models/routeBinding.ts | 245 ----- .../src/api/orm/mutation/index.ts | 87 +- .../src/api/orm/query/index.ts | 19 + sdk/constructive-sdk/src/auth/orm/README.md | 13 +- .../src/auth/orm/input-types.ts | 34 +- .../src/auth/orm/mutation/index.ts | 9 +- .../src/compute/orm/README.md | 25 +- .../src/compute/orm/input-types.ts | 60 +- .../src/compute/orm/mutation/index.ts | 9 +- sdk/constructive-sdk/src/config/orm/README.md | 9 +- .../src/config/orm/input-types.ts | 8 +- .../src/config/orm/mutation/index.ts | 9 +- sdk/constructive-sdk/src/infra/orm/README.md | 9 +- .../src/infra/orm/input-types.ts | 8 +- .../src/infra/orm/mutation/index.ts | 9 +- .../src/modules/orm/README.md | 44 +- .../src/modules/orm/input-types.ts | 103 ++- .../src/modules/orm/mutation/index.ts | 11 +- .../src/objects/orm/README.md | 9 +- .../src/objects/orm/input-types.ts | 8 +- .../src/objects/orm/mutation/index.ts | 9 +- sdk/constructive-sdk/src/remote/orm/README.md | 9 +- .../src/remote/orm/input-types.ts | 8 +- .../src/remote/orm/mutation/index.ts | 9 +- .../src/storage/orm/README.md | 29 +- .../src/storage/orm/input-types.ts | 40 +- .../src/storage/orm/mutation/index.ts | 13 +- sdk/constructive-sdk/src/usage/orm/README.md | 9 +- .../src/usage/orm/input-types.ts | 8 +- .../src/usage/orm/mutation/index.ts | 9 +- sdk/migrate-client/schemas/migrate.graphql | 17 +- sdk/migrate-client/src/migrate/orm/README.md | 9 +- .../src/migrate/orm/input-types.ts | 8 +- .../src/migrate/orm/mutation/index.ts | 9 +- 342 files changed, 4152 insertions(+), 8104 deletions(-) create mode 100644 .agents/skills/cli-api/references/create-function-from-source.md create mode 100644 .agents/skills/cli-api/references/email-shared-account.md create mode 100644 .agents/skills/cli-api/references/update-function-from-source.md create mode 100644 .agents/skills/hooks-api/references/create-function-from-source.md create mode 100644 .agents/skills/hooks-api/references/email-shared-account.md create mode 100644 .agents/skills/hooks-api/references/update-function-from-source.md create mode 100644 .agents/skills/orm-api/references/create-function-from-source.md create mode 100644 .agents/skills/orm-api/references/email-shared-account.md create mode 100644 .agents/skills/orm-api/references/update-function-from-source.md create mode 100644 sdk/constructive-cli/src/api/cli/commands/create-function-from-source.ts create mode 100644 sdk/constructive-cli/src/api/cli/commands/email-shared-account.ts delete mode 100644 sdk/constructive-cli/src/api/cli/commands/hostname-binding.ts delete mode 100644 sdk/constructive-cli/src/api/cli/commands/route-binding.ts create mode 100644 sdk/constructive-cli/src/api/cli/commands/update-function-from-source.ts delete mode 100644 sdk/constructive-cli/src/api/orm/models/hostnameBinding.ts delete mode 100644 sdk/constructive-cli/src/api/orm/models/routeBinding.ts create mode 100644 sdk/constructive-react/src/api/hooks/mutations/useCreateFunctionFromSourceMutation.ts delete mode 100644 sdk/constructive-react/src/api/hooks/mutations/useCreateHostnameBindingMutation.ts delete mode 100644 sdk/constructive-react/src/api/hooks/mutations/useCreateRouteBindingMutation.ts delete mode 100644 sdk/constructive-react/src/api/hooks/mutations/useDeleteHostnameBindingMutation.ts delete mode 100644 sdk/constructive-react/src/api/hooks/mutations/useDeleteRouteBindingMutation.ts create mode 100644 sdk/constructive-react/src/api/hooks/mutations/useUpdateFunctionFromSourceMutation.ts delete mode 100644 sdk/constructive-react/src/api/hooks/mutations/useUpdateHostnameBindingMutation.ts delete mode 100644 sdk/constructive-react/src/api/hooks/mutations/useUpdateRouteBindingMutation.ts create mode 100644 sdk/constructive-react/src/api/hooks/queries/useEmailSharedAccountQuery.ts delete mode 100644 sdk/constructive-react/src/api/hooks/queries/useHostnameBindingQuery.ts delete mode 100644 sdk/constructive-react/src/api/hooks/queries/useHostnameBindingsQuery.ts delete mode 100644 sdk/constructive-react/src/api/hooks/queries/useRouteBindingQuery.ts delete mode 100644 sdk/constructive-react/src/api/hooks/queries/useRouteBindingsQuery.ts delete mode 100644 sdk/constructive-react/src/api/orm/models/hostnameBinding.ts delete mode 100644 sdk/constructive-react/src/api/orm/models/routeBinding.ts delete mode 100644 sdk/constructive-sdk/src/api/orm/models/hostnameBinding.ts delete mode 100644 sdk/constructive-sdk/src/api/orm/models/routeBinding.ts diff --git a/.agents/skills/cli-admin/references/provision-bucket.md b/.agents/skills/cli-admin/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-admin/references/provision-bucket.md +++ b/.agents/skills/cli-admin/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/cli-agent/references/provision-bucket.md b/.agents/skills/cli-agent/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-agent/references/provision-bucket.md +++ b/.agents/skills/cli-agent/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/cli-api/SKILL.md b/.agents/skills/cli-api/SKILL.md index 17f77d205d..a9fc2f456a 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 92 tables and 46 custom operations +description: CLI tool (csdk) for the api API — provides CRUD commands for 90 tables and 49 custom operations --- # cli-api -CLI tool (csdk) for the api API — provides CRUD commands for 92 tables and 46 custom operations +CLI tool (csdk) for the api API — provides CRUD commands for 90 tables and 49 custom operations ## Usage @@ -85,7 +85,6 @@ See the `references/` directory for detailed per-entity API documentation: - [full-text-search](references/full-text-search.md) - [function](references/function.md) - [get-site-previews-record](references/get-site-previews-record.md) -- [hostname-binding](references/hostname-binding.md) - [identity-provider-registry](references/identity-provider-registry.md) - [index](references/index.md) - [list-suspended-databases-record](references/list-suspended-databases-record.md) @@ -120,7 +119,6 @@ See the `references/` directory for detailed per-entity API documentation: - [pubkey-setting](references/pubkey-setting.md) - [redirect](references/redirect.md) - [rls-setting](references/rls-setting.md) -- [route-binding](references/route-binding.md) - [route](references/route.md) - [schema](references/schema.md) - [schema-grant](references/schema-grant.md) @@ -150,6 +148,7 @@ See the `references/` directory for detailed per-entity API documentation: - [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) - [get-site-release-manifest](references/get-site-release-manifest.md) - [page-published](references/page-published.md) @@ -168,6 +167,7 @@ See the `references/` directory for detailed per-entity API documentation: - [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,3 +194,4 @@ 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/create-function-from-source.md b/.agents/skills/cli-api/references/create-function-from-source.md new file mode 100644 index 0000000000..db6d05b67a --- /dev/null +++ b/.agents/skills/cli-api/references/create-function-from-source.md @@ -0,0 +1,19 @@ +# createFunctionFromSource + + + +Creates a `Function` from its `CREATE FUNCTION` source text. + +## Usage + +```bash +csdk create-function-from-source --input.apiExposed --input.clientMutationId --input.databaseId --input.schemaId --input.source +``` + +## Examples + +### Run createFunctionFromSource + +```bash +csdk create-function-from-source --input.apiExposed --input.clientMutationId --input.databaseId --input.schemaId --input.source +``` diff --git a/.agents/skills/cli-api/references/email-shared-account.md b/.agents/skills/cli-api/references/email-shared-account.md new file mode 100644 index 0000000000..9710c3b7fc --- /dev/null +++ b/.agents/skills/cli-api/references/email-shared-account.md @@ -0,0 +1,19 @@ +# emailSharedAccount + + + +Execute the emailSharedAccount query + +## Usage + +```bash +csdk email-shared-account +``` + +## Examples + +### Run emailSharedAccount + +```bash +csdk email-shared-account +``` diff --git a/.agents/skills/cli-api/references/managed-domain.md b/.agents/skills/cli-api/references/managed-domain.md index ad953c3c51..ca9e7f00c1 100644 --- a/.agents/skills/cli-api/references/managed-domain.md +++ b/.agents/skills/cli-api/references/managed-domain.md @@ -12,8 +12,8 @@ csdk managed-domain list --where.. --orderBy csdk managed-domain list --limit 10 --after csdk managed-domain find-first --where.. csdk managed-domain get --id -csdk managed-domain create --databaseId --domain [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--isWildcard ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] -csdk managed-domain update --id [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--databaseId ] [--domain ] [--isWildcard ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] +csdk managed-domain create --databaseId --domain [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--isWildcard ] [--publicPort ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] +csdk managed-domain update --id [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--databaseId ] [--domain ] [--isWildcard ] [--publicPort ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] csdk managed-domain delete --id ``` @@ -58,7 +58,7 @@ csdk managed-domain list --where.id.equalTo --orderBy ID_ASC ### Create a managedDomain ```bash -csdk managed-domain create --databaseId --domain [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--isWildcard ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] +csdk managed-domain create --databaseId --domain [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--isWildcard ] [--publicPort ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] ``` ### Get a managedDomain by id diff --git a/.agents/skills/cli-api/references/platform-managed-domain.md b/.agents/skills/cli-api/references/platform-managed-domain.md index d44126c5ac..5a359cabeb 100644 --- a/.agents/skills/cli-api/references/platform-managed-domain.md +++ b/.agents/skills/cli-api/references/platform-managed-domain.md @@ -12,8 +12,8 @@ csdk platform-managed-domain list --where.. --orderBy csdk platform-managed-domain find-first --where.. csdk platform-managed-domain get --id -csdk platform-managed-domain create --domain [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--isWildcard ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] -csdk platform-managed-domain update --id [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--domain ] [--isWildcard ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] +csdk platform-managed-domain create --domain [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--isWildcard ] [--publicPort ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] +csdk platform-managed-domain update --id [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--domain ] [--isWildcard ] [--publicPort ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] csdk platform-managed-domain delete --id ``` @@ -58,7 +58,7 @@ csdk platform-managed-domain list --where.id.equalTo --orderBy ID_ASC ### Create a platformManagedDomain ```bash -csdk platform-managed-domain create --domain [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--isWildcard ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] +csdk platform-managed-domain create --domain [--allowPublicUsage ] [--annotations ] [--certStatus ] [--createdByPrincipal ] [--isWildcard ] [--publicPort ] [--tlsReadyAt ] [--tlsStatus ] [--updatedByPrincipal ] [--verificationStatus ] [--verifiedAt ] ``` ### Get a platformManagedDomain by id diff --git a/.agents/skills/cli-api/references/provision-bucket.md b/.agents/skills/cli-api/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-api/references/provision-bucket.md +++ b/.agents/skills/cli-api/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/cli-api/references/unique-constraint.md b/.agents/skills/cli-api/references/unique-constraint.md index 3eb9fcb429..2bdae7569d 100644 --- a/.agents/skills/cli-api/references/unique-constraint.md +++ b/.agents/skills/cli-api/references/unique-constraint.md @@ -12,8 +12,8 @@ csdk unique-constraint list --where.. --orderBy csdk unique-constraint list --limit 10 --after csdk unique-constraint find-first --where.. csdk unique-constraint get --id -csdk unique-constraint create --fieldIds --tableId [--category ] [--databaseId ] [--description ] [--initiallyDeferred ] [--isDeferrable ] [--name ] [--smartTags ] [--tags ] [--type ] [--withoutOverlaps ] -csdk unique-constraint update --id [--category ] [--databaseId ] [--description ] [--fieldIds ] [--initiallyDeferred ] [--isDeferrable ] [--name ] [--smartTags ] [--tableId ] [--tags ] [--type ] [--withoutOverlaps ] +csdk unique-constraint create --fieldIds --tableId [--category ] [--databaseId ] [--description ] [--initiallyDeferred ] [--isDeferrable ] [--name ] [--nullsNotDistinct ] [--smartTags ] [--tags ] [--type ] [--withoutOverlaps ] +csdk unique-constraint update --id [--category ] [--databaseId ] [--description ] [--fieldIds ] [--initiallyDeferred ] [--isDeferrable ] [--name ] [--nullsNotDistinct ] [--smartTags ] [--tableId ] [--tags ] [--type ] [--withoutOverlaps ] csdk unique-constraint delete --id ``` @@ -58,7 +58,7 @@ csdk unique-constraint list --where.id.equalTo --orderBy ID_ASC ### Create a uniqueConstraint ```bash -csdk unique-constraint create --fieldIds --tableId [--category ] [--databaseId ] [--description ] [--initiallyDeferred ] [--isDeferrable ] [--name ] [--smartTags ] [--tags ] [--type ] [--withoutOverlaps ] +csdk unique-constraint create --fieldIds --tableId [--category ] [--databaseId ] [--description ] [--initiallyDeferred ] [--isDeferrable ] [--name ] [--nullsNotDistinct ] [--smartTags ] [--tags ] [--type ] [--withoutOverlaps ] ``` ### Get a uniqueConstraint by id diff --git a/.agents/skills/cli-api/references/update-function-from-source.md b/.agents/skills/cli-api/references/update-function-from-source.md new file mode 100644 index 0000000000..a182914a12 --- /dev/null +++ b/.agents/skills/cli-api/references/update-function-from-source.md @@ -0,0 +1,19 @@ +# updateFunctionFromSource + + + +Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. + +## Usage + +```bash +csdk update-function-from-source --input.clientMutationId --input.id --input.source +``` + +## Examples + +### Run updateFunctionFromSource + +```bash +csdk update-function-from-source --input.clientMutationId --input.id --input.source +``` diff --git a/.agents/skills/cli-auth/references/provision-bucket.md b/.agents/skills/cli-auth/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-auth/references/provision-bucket.md +++ b/.agents/skills/cli-auth/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/cli-auth/references/request-magic-link.md b/.agents/skills/cli-auth/references/request-magic-link.md index a59161e151..b46352f88e 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 +csdk request-magic-link --input.clientMutationId --input.email --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 +csdk request-magic-link --input.clientMutationId --input.email --input.next ``` diff --git a/.agents/skills/cli-auth/references/sign-up.md b/.agents/skills/cli-auth/references/sign-up.md index 779a9578e0..c467209e8b 100644 --- a/.agents/skills/cli-auth/references/sign-up.md +++ b/.agents/skills/cli-auth/references/sign-up.md @@ -7,7 +7,7 @@ Execute the signUp mutation ## Usage ```bash -csdk sign-up --input.clientMutationId --input.credentialKind --input.csrfToken --input.deviceToken --input.email --input.inviteToken --input.password --input.rememberMe +csdk sign-up --input.clientMutationId --input.csrfToken --input.email --input.inviteToken --input.password ``` ## Examples @@ -15,5 +15,5 @@ csdk sign-up --input.clientMutationId --input.credentialKind - ### Run signUp ```bash -csdk sign-up --input.clientMutationId --input.credentialKind --input.csrfToken --input.deviceToken --input.email --input.inviteToken --input.password --input.rememberMe +csdk sign-up --input.clientMutationId --input.csrfToken --input.email --input.inviteToken --input.password ``` diff --git a/.agents/skills/cli-compute/references/function-invocation.md b/.agents/skills/cli-compute/references/function-invocation.md index 453b6af02d..c5b7f93118 100644 --- a/.agents/skills/cli-compute/references/function-invocation.md +++ b/.agents/skills/cli-compute/references/function-invocation.md @@ -12,8 +12,8 @@ csdk function-invocation list --where.. --orderBy csdk function-invocation list --limit 10 --after csdk function-invocation find-first --where.. csdk function-invocation get --id -csdk function-invocation create --channel --databaseId --taskIdentifier [--actorId ] [--apiBindingId ] [--completedAt ] [--createdByPrincipal ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--result ] [--startedAt ] [--status ] -csdk function-invocation update --id [--actorId ] [--apiBindingId ] [--channel ] [--completedAt ] [--createdByPrincipal ] [--databaseId ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--result ] [--startedAt ] [--status ] [--taskIdentifier ] +csdk function-invocation create --channel --databaseId --taskIdentifier [--actorId ] [--apiBindingId ] [--completedAt ] [--createdByPrincipal ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--jobKey ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--queueName ] [--result ] [--startedAt ] [--status ] +csdk function-invocation update --id [--actorId ] [--apiBindingId ] [--channel ] [--completedAt ] [--createdByPrincipal ] [--databaseId ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--jobKey ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--queueName ] [--result ] [--startedAt ] [--status ] [--taskIdentifier ] csdk function-invocation delete --id ``` @@ -58,7 +58,7 @@ csdk function-invocation list --where.id.equalTo --orderBy ID_ASC ### Create a functionInvocation ```bash -csdk function-invocation create --channel --databaseId --taskIdentifier [--actorId ] [--apiBindingId ] [--completedAt ] [--createdByPrincipal ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--result ] [--startedAt ] [--status ] +csdk function-invocation create --channel --databaseId --taskIdentifier [--actorId ] [--apiBindingId ] [--completedAt ] [--createdByPrincipal ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--jobKey ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--queueName ] [--result ] [--startedAt ] [--status ] ``` ### Get a functionInvocation by id diff --git a/.agents/skills/cli-compute/references/platform-function-invocation.md b/.agents/skills/cli-compute/references/platform-function-invocation.md index ba457f116e..3633e76ded 100644 --- a/.agents/skills/cli-compute/references/platform-function-invocation.md +++ b/.agents/skills/cli-compute/references/platform-function-invocation.md @@ -12,8 +12,8 @@ csdk platform-function-invocation list --where.. --orderBy csdk platform-function-invocation find-first --where.. csdk platform-function-invocation get --id -csdk platform-function-invocation create --channel --taskIdentifier [--actorId ] [--apiBindingId ] [--completedAt ] [--createdByPrincipal ] [--databaseId ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--result ] [--startedAt ] [--status ] -csdk platform-function-invocation update --id [--actorId ] [--apiBindingId ] [--channel ] [--completedAt ] [--createdByPrincipal ] [--databaseId ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--result ] [--startedAt ] [--status ] [--taskIdentifier ] +csdk platform-function-invocation create --channel --taskIdentifier [--actorId ] [--apiBindingId ] [--completedAt ] [--createdByPrincipal ] [--databaseId ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--jobKey ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--queueName ] [--result ] [--startedAt ] [--status ] +csdk platform-function-invocation update --id [--actorId ] [--apiBindingId ] [--channel ] [--completedAt ] [--createdByPrincipal ] [--databaseId ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--jobKey ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--queueName ] [--result ] [--startedAt ] [--status ] [--taskIdentifier ] csdk platform-function-invocation delete --id ``` @@ -58,7 +58,7 @@ csdk platform-function-invocation list --where.id.equalTo --orderBy ID_A ### Create a platformFunctionInvocation ```bash -csdk platform-function-invocation create --channel --taskIdentifier [--actorId ] [--apiBindingId ] [--completedAt ] [--createdByPrincipal ] [--databaseId ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--result ] [--startedAt ] [--status ] +csdk platform-function-invocation create --channel --taskIdentifier [--actorId ] [--apiBindingId ] [--completedAt ] [--createdByPrincipal ] [--databaseId ] [--definitionScope ] [--durationMs ] [--entityId ] [--entityType ] [--error ] [--functionDefinitionId ] [--graphExecutionId ] [--jobId ] [--jobKey ] [--organizationId ] [--parentInvocationId ] [--payload ] [--principalId ] [--provenance ] [--queueName ] [--result ] [--startedAt ] [--status ] ``` ### Get a platformFunctionInvocation by id diff --git a/.agents/skills/cli-compute/references/provision-bucket.md b/.agents/skills/cli-compute/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-compute/references/provision-bucket.md +++ b/.agents/skills/cli-compute/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/cli-config/references/provision-bucket.md b/.agents/skills/cli-config/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-config/references/provision-bucket.md +++ b/.agents/skills/cli-config/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/cli-infra/references/provision-bucket.md b/.agents/skills/cli-infra/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-infra/references/provision-bucket.md +++ b/.agents/skills/cli-infra/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/cli-modules/references/billing-provider-module.md b/.agents/skills/cli-modules/references/billing-provider-module.md index af2d81272d..0409f1c26f 100644 --- a/.agents/skills/cli-modules/references/billing-provider-module.md +++ b/.agents/skills/cli-modules/references/billing-provider-module.md @@ -12,8 +12,8 @@ csdk billing-provider-module list --where.. --orderBy csdk billing-provider-module find-first --where.. csdk billing-provider-module get --id -csdk billing-provider-module create --databaseId [--activatePlanSubscriptionFunction ] [--apiName ] [--applyProviderObservationFunction ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingDisputesTableId ] [--billingDisputesTableName ] [--billingHealthTableId ] [--billingHealthTableName ] [--billingInvoicesTableId ] [--billingInvoicesTableName ] [--billingOperationsTableId ] [--billingOperationsTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingProviderStateTableId ] [--billingProviderStateTableName ] [--billingRefundsTableId ] [--billingRefundsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--bindCheckoutSessionFunction ] [--clearScheduledChangeFunction ] [--finishBillingOperationFunction ] [--getActivePlanPricingFunction ] [--getActivePlanSubscriptionFunction ] [--getBillingCustomerFunction ] [--getBillingPriceFunction ] [--getBillingProductFunction ] [--getBillingProviderStateFunction ] [--getBillingSubscriptionByEntityFunction ] [--getBillingSubscriptionByExternalIdFunction ] [--getBillingSubscriptionFunction ] [--getFallbackFreePlanFunction ] [--getPlanPricingByExternalPriceFunction ] [--hasDueReconciliationsFunction ] [--listDueReconciliationsFunction ] [--listPendingUsageSyncFunction ] [--markUsageSyncedFunction ] [--prefix ] [--prepareScheduledChangeFunction ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--recordBillingHealthFunction ] [--recordDisputeFunction ] [--recordRefundFunction ] [--reserveBillingOperationFunction ] [--schemaId ] [--subscriptionsTableId ] [--sweepOverdueSubscriptionsFunction ] [--upsertBillingCustomerFunction ] [--upsertBillingPriceFunction ] [--upsertBillingProductFunction ] [--upsertBillingSubscriptionFunction ] [--upsertInvoiceFunction ] [--usageSyncShardCount ] -csdk billing-provider-module update --id [--activatePlanSubscriptionFunction ] [--apiName ] [--applyProviderObservationFunction ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingDisputesTableId ] [--billingDisputesTableName ] [--billingHealthTableId ] [--billingHealthTableName ] [--billingInvoicesTableId ] [--billingInvoicesTableName ] [--billingOperationsTableId ] [--billingOperationsTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingProviderStateTableId ] [--billingProviderStateTableName ] [--billingRefundsTableId ] [--billingRefundsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--bindCheckoutSessionFunction ] [--clearScheduledChangeFunction ] [--databaseId ] [--finishBillingOperationFunction ] [--getActivePlanPricingFunction ] [--getActivePlanSubscriptionFunction ] [--getBillingCustomerFunction ] [--getBillingPriceFunction ] [--getBillingProductFunction ] [--getBillingProviderStateFunction ] [--getBillingSubscriptionByEntityFunction ] [--getBillingSubscriptionByExternalIdFunction ] [--getBillingSubscriptionFunction ] [--getFallbackFreePlanFunction ] [--getPlanPricingByExternalPriceFunction ] [--hasDueReconciliationsFunction ] [--listDueReconciliationsFunction ] [--listPendingUsageSyncFunction ] [--markUsageSyncedFunction ] [--prefix ] [--prepareScheduledChangeFunction ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--recordBillingHealthFunction ] [--recordDisputeFunction ] [--recordRefundFunction ] [--reserveBillingOperationFunction ] [--schemaId ] [--subscriptionsTableId ] [--sweepOverdueSubscriptionsFunction ] [--upsertBillingCustomerFunction ] [--upsertBillingPriceFunction ] [--upsertBillingProductFunction ] [--upsertBillingSubscriptionFunction ] [--upsertInvoiceFunction ] [--usageSyncShardCount ] +csdk billing-provider-module create --databaseId [--activatePlanSubscriptionFunction ] [--apiName ] [--applyProviderObservationFunction ] [--billingConnectionTableId ] [--billingConnectionTableName ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingDisputesTableId ] [--billingDisputesTableName ] [--billingHealthTableId ] [--billingHealthTableName ] [--billingInvoicesTableId ] [--billingInvoicesTableName ] [--billingOperationsTableId ] [--billingOperationsTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingProviderConnectedFunction ] [--billingProviderKeyFunction ] [--billingProviderStateTableId ] [--billingProviderStateTableName ] [--billingRefundsTableId ] [--billingRefundsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--bindCheckoutSessionFunction ] [--clearScheduledChangeFunction ] [--finishBillingOperationFunction ] [--getActivePlanPricingFunction ] [--getActivePlanSubscriptionFunction ] [--getBillingCustomerFunction ] [--getBillingPriceFunction ] [--getBillingProductFunction ] [--getBillingProviderStateFunction ] [--getBillingSubscriptionByEntityFunction ] [--getBillingSubscriptionByExternalIdFunction ] [--getBillingSubscriptionFunction ] [--getFallbackFreePlanFunction ] [--getPlanPricingByExternalPriceFunction ] [--hasDueReconciliationsFunction ] [--listDueReconciliationsFunction ] [--listPendingUsageSyncFunction ] [--markUsageSyncedFunction ] [--prefix ] [--prepareScheduledChangeFunction ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--recordBillingConnectionFunction ] [--recordBillingHealthFunction ] [--recordDisputeFunction ] [--recordRefundFunction ] [--reserveBillingOperationFunction ] [--schemaId ] [--subscriptionsTableId ] [--sweepOverdueSubscriptionsFunction ] [--upsertBillingCustomerFunction ] [--upsertBillingPriceFunction ] [--upsertBillingProductFunction ] [--upsertBillingSubscriptionFunction ] [--upsertInvoiceFunction ] [--usageSyncShardCount ] +csdk billing-provider-module update --id [--activatePlanSubscriptionFunction ] [--apiName ] [--applyProviderObservationFunction ] [--billingConnectionTableId ] [--billingConnectionTableName ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingDisputesTableId ] [--billingDisputesTableName ] [--billingHealthTableId ] [--billingHealthTableName ] [--billingInvoicesTableId ] [--billingInvoicesTableName ] [--billingOperationsTableId ] [--billingOperationsTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingProviderConnectedFunction ] [--billingProviderKeyFunction ] [--billingProviderStateTableId ] [--billingProviderStateTableName ] [--billingRefundsTableId ] [--billingRefundsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--bindCheckoutSessionFunction ] [--clearScheduledChangeFunction ] [--databaseId ] [--finishBillingOperationFunction ] [--getActivePlanPricingFunction ] [--getActivePlanSubscriptionFunction ] [--getBillingCustomerFunction ] [--getBillingPriceFunction ] [--getBillingProductFunction ] [--getBillingProviderStateFunction ] [--getBillingSubscriptionByEntityFunction ] [--getBillingSubscriptionByExternalIdFunction ] [--getBillingSubscriptionFunction ] [--getFallbackFreePlanFunction ] [--getPlanPricingByExternalPriceFunction ] [--hasDueReconciliationsFunction ] [--listDueReconciliationsFunction ] [--listPendingUsageSyncFunction ] [--markUsageSyncedFunction ] [--prefix ] [--prepareScheduledChangeFunction ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--recordBillingConnectionFunction ] [--recordBillingHealthFunction ] [--recordDisputeFunction ] [--recordRefundFunction ] [--reserveBillingOperationFunction ] [--schemaId ] [--subscriptionsTableId ] [--sweepOverdueSubscriptionsFunction ] [--upsertBillingCustomerFunction ] [--upsertBillingPriceFunction ] [--upsertBillingProductFunction ] [--upsertBillingSubscriptionFunction ] [--upsertInvoiceFunction ] [--usageSyncShardCount ] csdk billing-provider-module delete --id ``` @@ -58,7 +58,7 @@ csdk billing-provider-module list --where.id.equalTo --orderBy ID_ASC ### Create a billingProviderModule ```bash -csdk billing-provider-module create --databaseId [--activatePlanSubscriptionFunction ] [--apiName ] [--applyProviderObservationFunction ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingDisputesTableId ] [--billingDisputesTableName ] [--billingHealthTableId ] [--billingHealthTableName ] [--billingInvoicesTableId ] [--billingInvoicesTableName ] [--billingOperationsTableId ] [--billingOperationsTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingProviderStateTableId ] [--billingProviderStateTableName ] [--billingRefundsTableId ] [--billingRefundsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--bindCheckoutSessionFunction ] [--clearScheduledChangeFunction ] [--finishBillingOperationFunction ] [--getActivePlanPricingFunction ] [--getActivePlanSubscriptionFunction ] [--getBillingCustomerFunction ] [--getBillingPriceFunction ] [--getBillingProductFunction ] [--getBillingProviderStateFunction ] [--getBillingSubscriptionByEntityFunction ] [--getBillingSubscriptionByExternalIdFunction ] [--getBillingSubscriptionFunction ] [--getFallbackFreePlanFunction ] [--getPlanPricingByExternalPriceFunction ] [--hasDueReconciliationsFunction ] [--listDueReconciliationsFunction ] [--listPendingUsageSyncFunction ] [--markUsageSyncedFunction ] [--prefix ] [--prepareScheduledChangeFunction ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--recordBillingHealthFunction ] [--recordDisputeFunction ] [--recordRefundFunction ] [--reserveBillingOperationFunction ] [--schemaId ] [--subscriptionsTableId ] [--sweepOverdueSubscriptionsFunction ] [--upsertBillingCustomerFunction ] [--upsertBillingPriceFunction ] [--upsertBillingProductFunction ] [--upsertBillingSubscriptionFunction ] [--upsertInvoiceFunction ] [--usageSyncShardCount ] +csdk billing-provider-module create --databaseId [--activatePlanSubscriptionFunction ] [--apiName ] [--applyProviderObservationFunction ] [--billingConnectionTableId ] [--billingConnectionTableName ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingDisputesTableId ] [--billingDisputesTableName ] [--billingHealthTableId ] [--billingHealthTableName ] [--billingInvoicesTableId ] [--billingInvoicesTableName ] [--billingOperationsTableId ] [--billingOperationsTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingProviderConnectedFunction ] [--billingProviderKeyFunction ] [--billingProviderStateTableId ] [--billingProviderStateTableName ] [--billingRefundsTableId ] [--billingRefundsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--bindCheckoutSessionFunction ] [--clearScheduledChangeFunction ] [--finishBillingOperationFunction ] [--getActivePlanPricingFunction ] [--getActivePlanSubscriptionFunction ] [--getBillingCustomerFunction ] [--getBillingPriceFunction ] [--getBillingProductFunction ] [--getBillingProviderStateFunction ] [--getBillingSubscriptionByEntityFunction ] [--getBillingSubscriptionByExternalIdFunction ] [--getBillingSubscriptionFunction ] [--getFallbackFreePlanFunction ] [--getPlanPricingByExternalPriceFunction ] [--hasDueReconciliationsFunction ] [--listDueReconciliationsFunction ] [--listPendingUsageSyncFunction ] [--markUsageSyncedFunction ] [--prefix ] [--prepareScheduledChangeFunction ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--recordBillingConnectionFunction ] [--recordBillingHealthFunction ] [--recordDisputeFunction ] [--recordRefundFunction ] [--reserveBillingOperationFunction ] [--schemaId ] [--subscriptionsTableId ] [--sweepOverdueSubscriptionsFunction ] [--upsertBillingCustomerFunction ] [--upsertBillingPriceFunction ] [--upsertBillingProductFunction ] [--upsertBillingSubscriptionFunction ] [--upsertInvoiceFunction ] [--usageSyncShardCount ] ``` ### Get a billingProviderModule by id diff --git a/.agents/skills/cli-modules/references/blueprint-construction.md b/.agents/skills/cli-modules/references/blueprint-construction.md index 936d4438a9..697a91ecc1 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 ] [--errorDetails ] [--schemaId ] [--status ] [--tableMap ] -csdk blueprint-construction update --id [--blueprintId ] [--constructedAt ] [--constructedDefinition ] [--databaseId ] [--errorDetails ] [--schemaId ] [--status ] [--tableMap ] +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 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 ] [--errorDetails ] [--schemaId ] [--status ] [--tableMap ] +csdk blueprint-construction create --blueprintId --databaseId [--constructedAt ] [--constructedDefinition ] [--schemaId ] [--status ] [--tableMap ] ``` ### Get a blueprintConstruction by id diff --git a/.agents/skills/cli-modules/references/catalog-module.md b/.agents/skills/cli-modules/references/catalog-module.md index 64a42db31e..1f57dc95b5 100644 --- a/.agents/skills/cli-modules/references/catalog-module.md +++ b/.agents/skills/cli-modules/references/catalog-module.md @@ -12,8 +12,8 @@ csdk catalog-module list --where.. --orderBy csdk catalog-module list --limit 10 --after csdk catalog-module find-first --where.. csdk catalog-module get --id -csdk catalog-module create --databaseId --scope [--apiName ] [--apisTableId ] [--apisTableName ] [--appStoreIdentitiesTableId ] [--appStoreIdentitiesTableName ] [--appsTableId ] [--appsTableName ] [--bindingsTableId ] [--bindingsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--defaultCapabilities ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--imagesTableId ] [--imagesTableName ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--redirectsTableId ] [--redirectsTableName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] -csdk catalog-module update --id [--apiName ] [--apisTableId ] [--apisTableName ] [--appStoreIdentitiesTableId ] [--appStoreIdentitiesTableName ] [--appsTableId ] [--appsTableName ] [--bindingsTableId ] [--bindingsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--databaseId ] [--defaultCapabilities ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--imagesTableId ] [--imagesTableName ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--redirectsTableId ] [--redirectsTableName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--scope ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] +csdk catalog-module create --databaseId --scope [--apiName ] [--apisTableId ] [--apisTableName ] [--appStoreIdentitiesTableId ] [--appStoreIdentitiesTableName ] [--appsTableId ] [--appsTableName ] [--bindingsTableId ] [--bindingsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--defaultCapabilities ] [--domainVerificationsTableId ] [--domainVerificationsTableName ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--imagesTableId ] [--imagesTableName ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--redirectsTableId ] [--redirectsTableName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] +csdk catalog-module update --id [--apiName ] [--apisTableId ] [--apisTableName ] [--appStoreIdentitiesTableId ] [--appStoreIdentitiesTableName ] [--appsTableId ] [--appsTableName ] [--bindingsTableId ] [--bindingsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--databaseId ] [--defaultCapabilities ] [--domainVerificationsTableId ] [--domainVerificationsTableName ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--imagesTableId ] [--imagesTableName ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--redirectsTableId ] [--redirectsTableName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--scope ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] csdk catalog-module delete --id ``` @@ -58,7 +58,7 @@ csdk catalog-module list --where.id.equalTo --orderBy ID_ASC ### Create a catalogModule ```bash -csdk catalog-module create --databaseId --scope [--apiName ] [--apisTableId ] [--apisTableName ] [--appStoreIdentitiesTableId ] [--appStoreIdentitiesTableName ] [--appsTableId ] [--appsTableName ] [--bindingsTableId ] [--bindingsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--defaultCapabilities ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--imagesTableId ] [--imagesTableName ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--redirectsTableId ] [--redirectsTableName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] +csdk catalog-module create --databaseId --scope [--apiName ] [--apisTableId ] [--apisTableName ] [--appStoreIdentitiesTableId ] [--appStoreIdentitiesTableName ] [--appsTableId ] [--appsTableName ] [--bindingsTableId ] [--bindingsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--defaultCapabilities ] [--domainVerificationsTableId ] [--domainVerificationsTableName ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--imagesTableId ] [--imagesTableName ] [--managedDomainsTableId ] [--managedDomainsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--redirectsTableId ] [--redirectsTableName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] ``` ### Get a catalogModule by id diff --git a/.agents/skills/cli-modules/references/construct-blueprint.md b/.agents/skills/cli-modules/references/construct-blueprint.md index 6fd45a6753..9ff5c9623f 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 on success, NULL on failure. +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. ## Usage diff --git a/.agents/skills/cli-modules/references/provision-bucket.md b/.agents/skills/cli-modules/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-modules/references/provision-bucket.md +++ b/.agents/skills/cli-modules/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/cli-modules/references/storage-module.md b/.agents/skills/cli-modules/references/storage-module.md index 4d4f655476..2e02f73639 100644 --- a/.agents/skills/cli-modules/references/storage-module.md +++ b/.agents/skills/cli-modules/references/storage-module.md @@ -12,8 +12,8 @@ csdk storage-module list --where.. --orderBy csdk storage-module list --limit 10 --after csdk storage-module find-first --where.. csdk storage-module get --id -csdk storage-module create --databaseId --scope [--allowedOrigins ] [--apiName ] [--bucketsTableId ] [--bucketsTableName ] [--cacheTtlSeconds ] [--catalogModuleId ] [--confirmUploadDelay ] [--defaultCapabilities ] [--defaultMaxFileSize ] [--downloadUrlExpirySeconds ] [--endpoint ] [--entityField ] [--entityTableId ] [--fileEventsTableId ] [--filesTableId ] [--filesTableName ] [--hasAuditLog ] [--hasConfirmUpload ] [--hasContentHash ] [--hasCustomKeys ] [--hasPathShares ] [--hasVersioning ] [--key ] [--maxBulkFiles ] [--maxBulkTotalSize ] [--maxFilenameLength ] [--pathSharesTableId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provider ] [--provisions ] [--publicSchemaName ] [--publicUrlPrefix ] [--restrictReads ] [--schemaId ] [--uploadUrlExpirySeconds ] -csdk storage-module update --id [--allowedOrigins ] [--apiName ] [--bucketsTableId ] [--bucketsTableName ] [--cacheTtlSeconds ] [--catalogModuleId ] [--confirmUploadDelay ] [--databaseId ] [--defaultCapabilities ] [--defaultMaxFileSize ] [--downloadUrlExpirySeconds ] [--endpoint ] [--entityField ] [--entityTableId ] [--fileEventsTableId ] [--filesTableId ] [--filesTableName ] [--hasAuditLog ] [--hasConfirmUpload ] [--hasContentHash ] [--hasCustomKeys ] [--hasPathShares ] [--hasVersioning ] [--key ] [--maxBulkFiles ] [--maxBulkTotalSize ] [--maxFilenameLength ] [--pathSharesTableId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provider ] [--provisions ] [--publicSchemaName ] [--publicUrlPrefix ] [--restrictReads ] [--schemaId ] [--scope ] [--uploadUrlExpirySeconds ] +csdk storage-module create --databaseId --scope [--allowedOrigins ] [--apiName ] [--bucketsTableId ] [--bucketsTableName ] [--cacheTtlSeconds ] [--catalogModuleId ] [--confirmUploadDelay ] [--defaultCapabilities ] [--defaultMaxFileSize ] [--downloadUrlExpirySeconds ] [--endpoint ] [--entityField ] [--entityTableId ] [--fileEventsTableId ] [--filesTableId ] [--filesTableName ] [--hasAuditLog ] [--hasConfirmUpload ] [--hasContentHash ] [--hasCustomKeys ] [--hasPathShares ] [--hasVersioning ] [--key ] [--maxBulkFiles ] [--maxBulkTotalSize ] [--maxFilenameLength ] [--pathSharesTableId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provider ] [--provisions ] [--publicSchemaName ] [--publicUrlPrefix ] [--region ] [--restrictReads ] [--schemaId ] [--uploadUrlExpirySeconds ] +csdk storage-module update --id [--allowedOrigins ] [--apiName ] [--bucketsTableId ] [--bucketsTableName ] [--cacheTtlSeconds ] [--catalogModuleId ] [--confirmUploadDelay ] [--databaseId ] [--defaultCapabilities ] [--defaultMaxFileSize ] [--downloadUrlExpirySeconds ] [--endpoint ] [--entityField ] [--entityTableId ] [--fileEventsTableId ] [--filesTableId ] [--filesTableName ] [--hasAuditLog ] [--hasConfirmUpload ] [--hasContentHash ] [--hasCustomKeys ] [--hasPathShares ] [--hasVersioning ] [--key ] [--maxBulkFiles ] [--maxBulkTotalSize ] [--maxFilenameLength ] [--pathSharesTableId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provider ] [--provisions ] [--publicSchemaName ] [--publicUrlPrefix ] [--region ] [--restrictReads ] [--schemaId ] [--scope ] [--uploadUrlExpirySeconds ] csdk storage-module delete --id ``` @@ -58,7 +58,7 @@ csdk storage-module list --where.id.equalTo --orderBy ID_ASC ### Create a storageModule ```bash -csdk storage-module create --databaseId --scope [--allowedOrigins ] [--apiName ] [--bucketsTableId ] [--bucketsTableName ] [--cacheTtlSeconds ] [--catalogModuleId ] [--confirmUploadDelay ] [--defaultCapabilities ] [--defaultMaxFileSize ] [--downloadUrlExpirySeconds ] [--endpoint ] [--entityField ] [--entityTableId ] [--fileEventsTableId ] [--filesTableId ] [--filesTableName ] [--hasAuditLog ] [--hasConfirmUpload ] [--hasContentHash ] [--hasCustomKeys ] [--hasPathShares ] [--hasVersioning ] [--key ] [--maxBulkFiles ] [--maxBulkTotalSize ] [--maxFilenameLength ] [--pathSharesTableId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provider ] [--provisions ] [--publicSchemaName ] [--publicUrlPrefix ] [--restrictReads ] [--schemaId ] [--uploadUrlExpirySeconds ] +csdk storage-module create --databaseId --scope [--allowedOrigins ] [--apiName ] [--bucketsTableId ] [--bucketsTableName ] [--cacheTtlSeconds ] [--catalogModuleId ] [--confirmUploadDelay ] [--defaultCapabilities ] [--defaultMaxFileSize ] [--downloadUrlExpirySeconds ] [--endpoint ] [--entityField ] [--entityTableId ] [--fileEventsTableId ] [--filesTableId ] [--filesTableName ] [--hasAuditLog ] [--hasConfirmUpload ] [--hasContentHash ] [--hasCustomKeys ] [--hasPathShares ] [--hasVersioning ] [--key ] [--maxBulkFiles ] [--maxBulkTotalSize ] [--maxFilenameLength ] [--pathSharesTableId ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provider ] [--provisions ] [--publicSchemaName ] [--publicUrlPrefix ] [--region ] [--restrictReads ] [--schemaId ] [--uploadUrlExpirySeconds ] ``` ### Get a storageModule by id diff --git a/.agents/skills/cli-objects/references/provision-bucket.md b/.agents/skills/cli-objects/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-objects/references/provision-bucket.md +++ b/.agents/skills/cli-objects/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/cli-remote/references/provision-bucket.md b/.agents/skills/cli-remote/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-remote/references/provision-bucket.md +++ b/.agents/skills/cli-remote/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/cli-storage/references/bucket.md b/.agents/skills/cli-storage/references/bucket.md index 588f86e5cf..162daa76e2 100644 --- a/.agents/skills/cli-storage/references/bucket.md +++ b/.agents/skills/cli-storage/references/bucket.md @@ -12,8 +12,8 @@ csdk bucket list --where.. --orderBy csdk bucket list --limit 10 --after csdk bucket find-first --where.. csdk bucket get --id -csdk bucket create --actorId --databaseId --key [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--description ] [--destinationBucketId ] [--isPublic ] [--maxFileSize ] [--physicalName ] [--stagingTtl ] [--tags ] [--type ] -csdk bucket update --id [--actorId ] [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--databaseId ] [--description ] [--destinationBucketId ] [--isPublic ] [--key ] [--maxFileSize ] [--physicalName ] [--stagingTtl ] [--tags ] [--type ] +csdk bucket create --actorId --databaseId --key [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--description ] [--destinationBucketId ] [--isPublic ] [--maxFileSize ] [--physicalName ] [--provisionRequestedAt ] [--stagingTtl ] [--tags ] [--type ] +csdk bucket update --id [--actorId ] [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--databaseId ] [--description ] [--destinationBucketId ] [--isPublic ] [--key ] [--maxFileSize ] [--physicalName ] [--provisionRequestedAt ] [--stagingTtl ] [--tags ] [--type ] csdk bucket delete --id ``` @@ -58,7 +58,7 @@ csdk bucket list --where.id.equalTo --orderBy ID_ASC ### Create a bucket ```bash -csdk bucket create --actorId --databaseId --key [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--description ] [--destinationBucketId ] [--isPublic ] [--maxFileSize ] [--physicalName ] [--stagingTtl ] [--tags ] [--type ] +csdk bucket create --actorId --databaseId --key [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--description ] [--destinationBucketId ] [--isPublic ] [--maxFileSize ] [--physicalName ] [--provisionRequestedAt ] [--stagingTtl ] [--tags ] [--type ] ``` ### Get a bucket by id diff --git a/.agents/skills/cli-storage/references/platform-bucket.md b/.agents/skills/cli-storage/references/platform-bucket.md index fcbaa51c2c..83fdf12cb0 100644 --- a/.agents/skills/cli-storage/references/platform-bucket.md +++ b/.agents/skills/cli-storage/references/platform-bucket.md @@ -12,8 +12,8 @@ csdk platform-bucket list --where.. --orderBy csdk platform-bucket list --limit 10 --after csdk platform-bucket find-first --where.. csdk platform-bucket get --id -csdk platform-bucket create --actorId --key [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--description ] [--destinationBucketId ] [--isPublic ] [--maxFileSize ] [--physicalName ] [--stagingTtl ] [--tags ] [--type ] -csdk platform-bucket update --id [--actorId ] [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--description ] [--destinationBucketId ] [--isPublic ] [--key ] [--maxFileSize ] [--physicalName ] [--stagingTtl ] [--tags ] [--type ] +csdk platform-bucket create --actorId --key [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--description ] [--destinationBucketId ] [--isPublic ] [--maxFileSize ] [--physicalName ] [--provisionRequestedAt ] [--stagingTtl ] [--tags ] [--type ] +csdk platform-bucket update --id [--actorId ] [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--description ] [--destinationBucketId ] [--isPublic ] [--key ] [--maxFileSize ] [--physicalName ] [--provisionRequestedAt ] [--stagingTtl ] [--tags ] [--type ] csdk platform-bucket delete --id ``` @@ -58,7 +58,7 @@ csdk platform-bucket list --where.id.equalTo --orderBy ID_ASC ### Create a platformBucket ```bash -csdk platform-bucket create --actorId --key [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--description ] [--destinationBucketId ] [--isPublic ] [--maxFileSize ] [--physicalName ] [--stagingTtl ] [--tags ] [--type ] +csdk platform-bucket create --actorId --key [--allowCustomKeys ] [--allowedMimeTypes ] [--allowedOrigins ] [--description ] [--destinationBucketId ] [--isPublic ] [--maxFileSize ] [--physicalName ] [--provisionRequestedAt ] [--stagingTtl ] [--tags ] [--type ] ``` ### Get a platformBucket by id diff --git a/.agents/skills/cli-storage/references/provision-bucket.md b/.agents/skills/cli-storage/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-storage/references/provision-bucket.md +++ b/.agents/skills/cli-storage/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/cli-storage/references/upload-files.md b/.agents/skills/cli-storage/references/upload-files.md index 897b012d42..a10316506f 100644 --- a/.agents/skills/cli-storage/references/upload-files.md +++ b/.agents/skills/cli-storage/references/upload-files.md @@ -2,7 +2,7 @@ -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. ## Usage diff --git a/.agents/skills/cli-storage/references/upload-platform-files.md b/.agents/skills/cli-storage/references/upload-platform-files.md index 8a67e7a0ad..2e853969e6 100644 --- a/.agents/skills/cli-storage/references/upload-platform-files.md +++ b/.agents/skills/cli-storage/references/upload-platform-files.md @@ -2,7 +2,7 @@ -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. ## Usage diff --git a/.agents/skills/cli-usage/references/provision-bucket.md b/.agents/skills/cli-usage/references/provision-bucket.md index 5fbe38a003..91bb1eca39 100644 --- a/.agents/skills/cli-usage/references/provision-bucket.md +++ b/.agents/skills/cli-usage/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-admin/references/provision-bucket.md b/.agents/skills/hooks-admin/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-admin/references/provision-bucket.md +++ b/.agents/skills/hooks-admin/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-agent/references/provision-bucket.md b/.agents/skills/hooks-agent/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-agent/references/provision-bucket.md +++ b/.agents/skills/hooks-agent/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-api/SKILL.md b/.agents/skills/hooks-api/SKILL.md index d6f56b834a..ddadf430a3 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 92 tables and 46 custom operations +description: React Query hooks for the api API — provides typed query and mutation hooks for 90 tables and 49 custom operations --- # hooks-api -React Query hooks for the api API — provides typed query and mutation hooks for 92 tables and 46 custom operations +React Query hooks for the api API — provides typed query and mutation hooks for 90 tables and 49 custom operations ## Usage @@ -67,7 +67,6 @@ See the `references/` directory for detailed per-entity API documentation: - [full-text-search](references/full-text-search.md) - [function](references/function.md) - [get-site-previews-record](references/get-site-previews-record.md) -- [hostname-binding](references/hostname-binding.md) - [identity-provider-registry](references/identity-provider-registry.md) - [index](references/index.md) - [list-suspended-databases-record](references/list-suspended-databases-record.md) @@ -102,7 +101,6 @@ See the `references/` directory for detailed per-entity API documentation: - [pubkey-setting](references/pubkey-setting.md) - [redirect](references/redirect.md) - [rls-setting](references/rls-setting.md) -- [route-binding](references/route-binding.md) - [route](references/route.md) - [schema](references/schema.md) - [schema-grant](references/schema-grant.md) @@ -132,6 +130,7 @@ See the `references/` directory for detailed per-entity API documentation: - [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) - [get-site-release-manifest](references/get-site-release-manifest.md) - [page-published](references/page-published.md) @@ -150,6 +149,7 @@ See the `references/` directory for detailed per-entity API documentation: - [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,3 +176,4 @@ 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/create-function-from-source.md b/.agents/skills/hooks-api/references/create-function-from-source.md new file mode 100644 index 0000000000..2b56f5a2d8 --- /dev/null +++ b/.agents/skills/hooks-api/references/create-function-from-source.md @@ -0,0 +1,20 @@ +# createFunctionFromSource + + + +Creates a `Function` from its `CREATE FUNCTION` source text. + +## Usage + +```typescript +const { mutate } = useCreateFunctionFromSourceMutation(); mutate({ input: { apiExposed: '', databaseId: '', schemaId: '', source: '' } }); +``` + +## Examples + +### Use useCreateFunctionFromSourceMutation + +```typescript +const { mutate, isLoading } = useCreateFunctionFromSourceMutation(); +mutate({ input: { apiExposed: '', databaseId: '', schemaId: '', source: '' } }); +``` diff --git a/.agents/skills/hooks-api/references/email-shared-account.md b/.agents/skills/hooks-api/references/email-shared-account.md new file mode 100644 index 0000000000..31ee8e25f2 --- /dev/null +++ b/.agents/skills/hooks-api/references/email-shared-account.md @@ -0,0 +1,19 @@ +# emailSharedAccount + + + +React Query query hook for emailSharedAccount + +## Usage + +```typescript +useEmailSharedAccountQuery() +``` + +## Examples + +### Use useEmailSharedAccountQuery + +```typescript +const { data, isLoading } = useEmailSharedAccountQuery(); +``` diff --git a/.agents/skills/hooks-api/references/managed-domain.md b/.agents/skills/hooks-api/references/managed-domain.md index f44fe8c981..282fc84531 100644 --- a/.agents/skills/hooks-api/references/managed-domain.md +++ b/.agents/skills/hooks-api/references/managed-domain.md @@ -7,8 +7,8 @@ Platform-operated hostnames whose DNS and certificate lifecycle the platform dri ## Usage ```typescript -useManagedDomainsQuery({ selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } } }) -useManagedDomainQuery({ id: '', selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } } }) +useManagedDomainsQuery({ selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } } }) +useManagedDomainQuery({ id: '', selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } } }) useCreateManagedDomainMutation({ selection: { fields: { id: true } } }) useUpdateManagedDomainMutation({ selection: { fields: { id: true } } }) useDeleteManagedDomainMutation({}) @@ -20,7 +20,7 @@ useDeleteManagedDomainMutation({}) ```typescript const { data, isLoading } = useManagedDomainsQuery({ - selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, + selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useManagedDomainsQuery({ const { mutate } = useCreateManagedDomainMutation({ selection: { fields: { id: true } }, }); -mutate({ allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }); +mutate({ allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }); ``` diff --git a/.agents/skills/hooks-api/references/platform-managed-domain.md b/.agents/skills/hooks-api/references/platform-managed-domain.md index a8dbe6a037..bf0acf7e53 100644 --- a/.agents/skills/hooks-api/references/platform-managed-domain.md +++ b/.agents/skills/hooks-api/references/platform-managed-domain.md @@ -7,8 +7,8 @@ Platform-operated hostnames whose DNS and certificate lifecycle the platform dri ## Usage ```typescript -usePlatformManagedDomainsQuery({ selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } } }) -usePlatformManagedDomainQuery({ id: '', selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } } }) +usePlatformManagedDomainsQuery({ selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } } }) +usePlatformManagedDomainQuery({ id: '', selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } } }) useCreatePlatformManagedDomainMutation({ selection: { fields: { id: true } } }) useUpdatePlatformManagedDomainMutation({ selection: { fields: { id: true } } }) useDeletePlatformManagedDomainMutation({}) @@ -20,7 +20,7 @@ useDeletePlatformManagedDomainMutation({}) ```typescript const { data, isLoading } = usePlatformManagedDomainsQuery({ - selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, + selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = usePlatformManagedDomainsQuery({ const { mutate } = useCreatePlatformManagedDomainMutation({ selection: { fields: { id: true } }, }); -mutate({ allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }); +mutate({ allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }); ``` diff --git a/.agents/skills/hooks-api/references/provision-bucket.md b/.agents/skills/hooks-api/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-api/references/provision-bucket.md +++ b/.agents/skills/hooks-api/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-api/references/unique-constraint.md b/.agents/skills/hooks-api/references/unique-constraint.md index 5060d2dfdf..b606cf263d 100644 --- a/.agents/skills/hooks-api/references/unique-constraint.md +++ b/.agents/skills/hooks-api/references/unique-constraint.md @@ -7,8 +7,8 @@ React Query hooks for UniqueConstraint data operations ## Usage ```typescript -useUniqueConstraintsQuery({ selection: { fields: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } } }) -useUniqueConstraintQuery({ id: '', selection: { fields: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } } }) +useUniqueConstraintsQuery({ selection: { fields: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } } }) +useUniqueConstraintQuery({ id: '', selection: { fields: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } } }) useCreateUniqueConstraintMutation({ selection: { fields: { id: true } } }) useUpdateUniqueConstraintMutation({ selection: { fields: { id: true } } }) useDeleteUniqueConstraintMutation({}) @@ -20,7 +20,7 @@ useDeleteUniqueConstraintMutation({}) ```typescript const { data, isLoading } = useUniqueConstraintsQuery({ - selection: { fields: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }, + selection: { fields: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useUniqueConstraintsQuery({ const { mutate } = useCreateUniqueConstraintMutation({ selection: { fields: { id: true } }, }); -mutate({ category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }); +mutate({ category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', nullsNotDistinct: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }); ``` diff --git a/.agents/skills/hooks-api/references/update-function-from-source.md b/.agents/skills/hooks-api/references/update-function-from-source.md new file mode 100644 index 0000000000..fc46160416 --- /dev/null +++ b/.agents/skills/hooks-api/references/update-function-from-source.md @@ -0,0 +1,20 @@ +# updateFunctionFromSource + + + +Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. + +## Usage + +```typescript +const { mutate } = useUpdateFunctionFromSourceMutation(); mutate({ input: { id: '', source: '' } }); +``` + +## Examples + +### Use useUpdateFunctionFromSourceMutation + +```typescript +const { mutate, isLoading } = useUpdateFunctionFromSourceMutation(); +mutate({ input: { id: '', source: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/provision-bucket.md b/.agents/skills/hooks-auth/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-auth/references/provision-bucket.md +++ b/.agents/skills/hooks-auth/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-auth/references/request-magic-link.md b/.agents/skills/hooks-auth/references/request-magic-link.md index bbd5cb6368..249240c4d5 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: '' } }); +const { mutate } = useRequestMagicLinkMutation(); mutate({ input: { email: '', next: '' } }); ``` ## Examples @@ -16,5 +16,5 @@ const { mutate } = useRequestMagicLinkMutation(); mutate({ input: { email: '' } }); +mutate({ input: { email: '', next: '' } }); ``` diff --git a/.agents/skills/hooks-auth/references/sign-up.md b/.agents/skills/hooks-auth/references/sign-up.md index 77dd7bb654..06852d4e22 100644 --- a/.agents/skills/hooks-auth/references/sign-up.md +++ b/.agents/skills/hooks-auth/references/sign-up.md @@ -7,7 +7,7 @@ React Query mutation hook for signUp ## Usage ```typescript -const { mutate } = useSignUpMutation(); mutate({ input: '' }); +const { mutate } = useSignUpMutation(); mutate({ input: { csrfToken: '', email: '', inviteToken: '', password: '' } }); ``` ## Examples @@ -16,5 +16,5 @@ const { mutate } = useSignUpMutation(); mutate({ input: '' }); ```typescript const { mutate, isLoading } = useSignUpMutation(); -mutate({ input: '' }); +mutate({ input: { csrfToken: '', email: '', inviteToken: '', password: '' } }); ``` diff --git a/.agents/skills/hooks-compute/references/function-invocation.md b/.agents/skills/hooks-compute/references/function-invocation.md index 0b60e17b6a..e5ad28f983 100644 --- a/.agents/skills/hooks-compute/references/function-invocation.md +++ b/.agents/skills/hooks-compute/references/function-invocation.md @@ -7,8 +7,8 @@ Function invocation log — INSERT to call a function (business-layer, metered). ## Usage ```typescript -useFunctionInvocationsQuery({ selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } } }) -useFunctionInvocationQuery({ id: '', selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } } }) +useFunctionInvocationsQuery({ selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } } }) +useFunctionInvocationQuery({ id: '', selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } } }) useCreateFunctionInvocationMutation({ selection: { fields: { id: true } } }) useUpdateFunctionInvocationMutation({ selection: { fields: { id: true } } }) useDeleteFunctionInvocationMutation({}) @@ -20,7 +20,7 @@ useDeleteFunctionInvocationMutation({}) ```typescript const { data, isLoading } = useFunctionInvocationsQuery({ - selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }, + selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useFunctionInvocationsQuery({ const { mutate } = useCreateFunctionInvocationMutation({ selection: { fields: { id: true } }, }); -mutate({ actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }); +mutate({ actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/platform-function-invocation.md b/.agents/skills/hooks-compute/references/platform-function-invocation.md index c2628cdaed..3d885cdbf6 100644 --- a/.agents/skills/hooks-compute/references/platform-function-invocation.md +++ b/.agents/skills/hooks-compute/references/platform-function-invocation.md @@ -7,8 +7,8 @@ Function invocation log — INSERT to call a function (business-layer, metered). ## Usage ```typescript -usePlatformFunctionInvocationsQuery({ selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } } }) -usePlatformFunctionInvocationQuery({ id: '', selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } } }) +usePlatformFunctionInvocationsQuery({ selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } } }) +usePlatformFunctionInvocationQuery({ id: '', selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } } }) useCreatePlatformFunctionInvocationMutation({ selection: { fields: { id: true } } }) useUpdatePlatformFunctionInvocationMutation({ selection: { fields: { id: true } } }) useDeletePlatformFunctionInvocationMutation({}) @@ -20,7 +20,7 @@ useDeletePlatformFunctionInvocationMutation({}) ```typescript const { data, isLoading } = usePlatformFunctionInvocationsQuery({ - selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }, + selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = usePlatformFunctionInvocationsQuery({ const { mutate } = useCreatePlatformFunctionInvocationMutation({ selection: { fields: { id: true } }, }); -mutate({ actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }); +mutate({ actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/provision-bucket.md b/.agents/skills/hooks-compute/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-compute/references/provision-bucket.md +++ b/.agents/skills/hooks-compute/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-config/references/provision-bucket.md b/.agents/skills/hooks-config/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-config/references/provision-bucket.md +++ b/.agents/skills/hooks-config/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-infra/references/provision-bucket.md b/.agents/skills/hooks-infra/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-infra/references/provision-bucket.md +++ b/.agents/skills/hooks-infra/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-modules/references/billing-provider-module.md b/.agents/skills/hooks-modules/references/billing-provider-module.md index cd8e0547ea..8fe7b7605a 100644 --- a/.agents/skills/hooks-modules/references/billing-provider-module.md +++ b/.agents/skills/hooks-modules/references/billing-provider-module.md @@ -7,8 +7,8 @@ React Query hooks for BillingProviderModule data operations ## Usage ```typescript -useBillingProviderModulesQuery({ selection: { fields: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } } }) -useBillingProviderModuleQuery({ id: '', selection: { fields: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } } }) +useBillingProviderModulesQuery({ selection: { fields: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingConnectionTableId: true, billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderConnectedFunction: true, billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } } }) +useBillingProviderModuleQuery({ id: '', selection: { fields: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingConnectionTableId: true, billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderConnectedFunction: true, billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } } }) useCreateBillingProviderModuleMutation({ selection: { fields: { id: true } } }) useUpdateBillingProviderModuleMutation({ selection: { fields: { id: true } } }) useDeleteBillingProviderModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteBillingProviderModuleMutation({}) ```typescript const { data, isLoading } = useBillingProviderModulesQuery({ - selection: { fields: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }, + selection: { fields: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingConnectionTableId: true, billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderConnectedFunction: true, billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useBillingProviderModulesQuery({ const { mutate } = useCreateBillingProviderModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }); +mutate({ activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingConnectionTableId: '', billingConnectionTableName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderConnectedFunction: '', billingProviderKeyFunction: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingConnectionFunction: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/blueprint-construction.md b/.agents/skills/hooks-modules/references/blueprint-construction.md index 775e4028b4..62644e566a 100644 --- a/.agents/skills/hooks-modules/references/blueprint-construction.md +++ b/.agents/skills/hooks-modules/references/blueprint-construction.md @@ -7,8 +7,8 @@ Tracks individual construction attempts of a blueprint. Each time construct_blue ## Usage ```typescript -useBlueprintConstructionsQuery({ selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, errorDetails: 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, errorDetails: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } } }) +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 } } }) 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, errorDetails: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }, + selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: 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: '', errorDetails: '', schemaId: '', status: '', tableMap: '' }); +mutate({ blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/catalog-module.md b/.agents/skills/hooks-modules/references/catalog-module.md index 2f4a72b07b..755ddde0a4 100644 --- a/.agents/skills/hooks-modules/references/catalog-module.md +++ b/.agents/skills/hooks-modules/references/catalog-module.md @@ -7,8 +7,8 @@ React Query hooks for CatalogModule data operations ## Usage ```typescript -useCatalogModulesQuery({ selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) -useCatalogModuleQuery({ id: '', selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) +useCatalogModulesQuery({ selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) +useCatalogModuleQuery({ id: '', selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) useCreateCatalogModuleMutation({ selection: { fields: { id: true } } }) useUpdateCatalogModuleMutation({ selection: { fields: { id: true } } }) useDeleteCatalogModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteCatalogModuleMutation({}) ```typescript const { data, isLoading } = useCatalogModulesQuery({ - selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, + selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useCatalogModulesQuery({ const { mutate } = useCreateCatalogModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); +mutate({ apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/construct-blueprint.md b/.agents/skills/hooks-modules/references/construct-blueprint.md index cfcd8feaa2..d36ddac233 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 on success, NULL on failure. +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. ## Usage diff --git a/.agents/skills/hooks-modules/references/provision-bucket.md b/.agents/skills/hooks-modules/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-modules/references/provision-bucket.md +++ b/.agents/skills/hooks-modules/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-modules/references/storage-module.md b/.agents/skills/hooks-modules/references/storage-module.md index deb56cb29d..772da59447 100644 --- a/.agents/skills/hooks-modules/references/storage-module.md +++ b/.agents/skills/hooks-modules/references/storage-module.md @@ -7,8 +7,8 @@ React Query hooks for StorageModule data operations ## Usage ```typescript -useStorageModulesQuery({ selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } } }) -useStorageModuleQuery({ id: '', selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } } }) +useStorageModulesQuery({ selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, region: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } } }) +useStorageModuleQuery({ id: '', selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, region: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } } }) useCreateStorageModuleMutation({ selection: { fields: { id: true } } }) useUpdateStorageModuleMutation({ selection: { fields: { id: true } } }) useDeleteStorageModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteStorageModuleMutation({}) ```typescript const { data, isLoading } = useStorageModulesQuery({ - selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, + selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, region: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useStorageModulesQuery({ const { mutate } = useCreateStorageModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }); +mutate({ allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', region: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }); ``` diff --git a/.agents/skills/hooks-objects/references/provision-bucket.md b/.agents/skills/hooks-objects/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-objects/references/provision-bucket.md +++ b/.agents/skills/hooks-objects/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-remote/references/provision-bucket.md b/.agents/skills/hooks-remote/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-remote/references/provision-bucket.md +++ b/.agents/skills/hooks-remote/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-storage/references/bucket.md b/.agents/skills/hooks-storage/references/bucket.md index d30b108458..173a93e46c 100644 --- a/.agents/skills/hooks-storage/references/bucket.md +++ b/.agents/skills/hooks-storage/references/bucket.md @@ -7,8 +7,8 @@ Logical storage containers that group files with shared access policies and CDN ## Usage ```typescript -useBucketsQuery({ selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } } }) -useBucketQuery({ id: '', selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } } }) +useBucketsQuery({ selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } } }) +useBucketQuery({ id: '', selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } } }) useCreateBucketMutation({ selection: { fields: { id: true } } }) useUpdateBucketMutation({ selection: { fields: { id: true } } }) useDeleteBucketMutation({}) @@ -20,7 +20,7 @@ useDeleteBucketMutation({}) ```typescript const { data, isLoading } = useBucketsQuery({ - selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, + selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useBucketsQuery({ const { mutate } = useCreateBucketMutation({ selection: { fields: { id: true } }, }); -mutate({ actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }); +mutate({ actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }); ``` diff --git a/.agents/skills/hooks-storage/references/platform-bucket.md b/.agents/skills/hooks-storage/references/platform-bucket.md index 0c11336c9a..3e596aef10 100644 --- a/.agents/skills/hooks-storage/references/platform-bucket.md +++ b/.agents/skills/hooks-storage/references/platform-bucket.md @@ -7,8 +7,8 @@ Logical storage containers that group files with shared access policies and CDN ## Usage ```typescript -usePlatformBucketsQuery({ selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } } }) -usePlatformBucketQuery({ id: '', selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } } }) +usePlatformBucketsQuery({ selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } } }) +usePlatformBucketQuery({ id: '', selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } } }) useCreatePlatformBucketMutation({ selection: { fields: { id: true } } }) useUpdatePlatformBucketMutation({ selection: { fields: { id: true } } }) useDeletePlatformBucketMutation({}) @@ -20,7 +20,7 @@ useDeletePlatformBucketMutation({}) ```typescript const { data, isLoading } = usePlatformBucketsQuery({ - selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, + selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = usePlatformBucketsQuery({ const { mutate } = useCreatePlatformBucketMutation({ selection: { fields: { id: true } }, }); -mutate({ actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }); +mutate({ actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }); ``` diff --git a/.agents/skills/hooks-storage/references/provision-bucket.md b/.agents/skills/hooks-storage/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-storage/references/provision-bucket.md +++ b/.agents/skills/hooks-storage/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/hooks-storage/references/upload-files.md b/.agents/skills/hooks-storage/references/upload-files.md index 76e752fbbb..8ad18d676f 100644 --- a/.agents/skills/hooks-storage/references/upload-files.md +++ b/.agents/skills/hooks-storage/references/upload-files.md @@ -2,7 +2,7 @@ -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. ## Usage diff --git a/.agents/skills/hooks-storage/references/upload-platform-files.md b/.agents/skills/hooks-storage/references/upload-platform-files.md index 50b86d89f7..513a96bc18 100644 --- a/.agents/skills/hooks-storage/references/upload-platform-files.md +++ b/.agents/skills/hooks-storage/references/upload-platform-files.md @@ -2,7 +2,7 @@ -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. ## Usage diff --git a/.agents/skills/hooks-usage/references/provision-bucket.md b/.agents/skills/hooks-usage/references/provision-bucket.md index 92740fefbd..90294c7ad6 100644 --- a/.agents/skills/hooks-usage/references/provision-bucket.md +++ b/.agents/skills/hooks-usage/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-admin/references/provision-bucket.md b/.agents/skills/orm-admin/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-admin/references/provision-bucket.md +++ b/.agents/skills/orm-admin/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-agent/references/provision-bucket.md b/.agents/skills/orm-agent/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-agent/references/provision-bucket.md +++ b/.agents/skills/orm-agent/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-api/SKILL.md b/.agents/skills/orm-api/SKILL.md index 95c9726a9c..4c61e2919f 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 92 tables and 46 custom operations +description: ORM client for the api API — provides typed CRUD operations for 90 tables and 49 custom operations --- # orm-api -ORM client for the api API — provides typed CRUD operations for 92 tables and 46 custom operations +ORM client for the api API — provides typed CRUD operations for 90 tables and 49 custom operations ## Usage @@ -66,7 +66,6 @@ See the `references/` directory for detailed per-entity API documentation: - [full-text-search](references/full-text-search.md) - [function](references/function.md) - [get-site-previews-record](references/get-site-previews-record.md) -- [hostname-binding](references/hostname-binding.md) - [identity-provider-registry](references/identity-provider-registry.md) - [index](references/index.md) - [list-suspended-databases-record](references/list-suspended-databases-record.md) @@ -101,7 +100,6 @@ See the `references/` directory for detailed per-entity API documentation: - [pubkey-setting](references/pubkey-setting.md) - [redirect](references/redirect.md) - [rls-setting](references/rls-setting.md) -- [route-binding](references/route-binding.md) - [route](references/route.md) - [schema](references/schema.md) - [schema-grant](references/schema-grant.md) @@ -131,6 +129,7 @@ See the `references/` directory for detailed per-entity API documentation: - [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) - [get-site-release-manifest](references/get-site-release-manifest.md) - [page-published](references/page-published.md) @@ -149,6 +148,7 @@ See the `references/` directory for detailed per-entity API documentation: - [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,3 +175,4 @@ 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/create-function-from-source.md b/.agents/skills/orm-api/references/create-function-from-source.md new file mode 100644 index 0000000000..eff9bcb4c6 --- /dev/null +++ b/.agents/skills/orm-api/references/create-function-from-source.md @@ -0,0 +1,19 @@ +# createFunctionFromSource + + + +Creates a `Function` from its `CREATE FUNCTION` source text. + +## Usage + +```typescript +db.mutation.createFunctionFromSource({ input: { apiExposed: '', databaseId: '', schemaId: '', source: '' } }).execute() +``` + +## Examples + +### Run createFunctionFromSource + +```typescript +const result = await db.mutation.createFunctionFromSource({ input: { apiExposed: '', databaseId: '', schemaId: '', source: '' } }).execute(); +``` diff --git a/.agents/skills/orm-api/references/email-shared-account.md b/.agents/skills/orm-api/references/email-shared-account.md new file mode 100644 index 0000000000..1b6c193aa5 --- /dev/null +++ b/.agents/skills/orm-api/references/email-shared-account.md @@ -0,0 +1,19 @@ +# emailSharedAccount + + + +Execute the emailSharedAccount query + +## Usage + +```typescript +db.query.emailSharedAccount().execute() +``` + +## Examples + +### Run emailSharedAccount + +```typescript +const result = await db.query.emailSharedAccount().execute(); +``` diff --git a/.agents/skills/orm-api/references/managed-domain.md b/.agents/skills/orm-api/references/managed-domain.md index d9ec52f3fa..c84f624d5b 100644 --- a/.agents/skills/orm-api/references/managed-domain.md +++ b/.agents/skills/orm-api/references/managed-domain.md @@ -9,7 +9,7 @@ Platform-operated hostnames whose DNS and certificate lifecycle the platform dri ```typescript db.managedDomain.findMany({ select: { id: true } }).execute() db.managedDomain.findOne({ id: '', select: { id: true } }).execute() -db.managedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute() +db.managedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute() db.managedDomain.update({ where: { id: '' }, data: { allowPublicUsage: '' }, select: { id: true } }).execute() db.managedDomain.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.managedDomain.findMany({ ```typescript const item = await db.managedDomain.create({ - data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, + data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/platform-managed-domain.md b/.agents/skills/orm-api/references/platform-managed-domain.md index 0ed864c9c5..6f561db1fd 100644 --- a/.agents/skills/orm-api/references/platform-managed-domain.md +++ b/.agents/skills/orm-api/references/platform-managed-domain.md @@ -9,7 +9,7 @@ Platform-operated hostnames whose DNS and certificate lifecycle the platform dri ```typescript db.platformManagedDomain.findMany({ select: { id: true } }).execute() db.platformManagedDomain.findOne({ id: '', select: { id: true } }).execute() -db.platformManagedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute() +db.platformManagedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute() db.platformManagedDomain.update({ where: { id: '' }, data: { allowPublicUsage: '' }, select: { id: true } }).execute() db.platformManagedDomain.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.platformManagedDomain.findMany({ ```typescript const item = await db.platformManagedDomain.create({ - data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, + data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/provision-bucket.md b/.agents/skills/orm-api/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-api/references/provision-bucket.md +++ b/.agents/skills/orm-api/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-api/references/unique-constraint.md b/.agents/skills/orm-api/references/unique-constraint.md index d8a9a3c4a1..fda04f9082 100644 --- a/.agents/skills/orm-api/references/unique-constraint.md +++ b/.agents/skills/orm-api/references/unique-constraint.md @@ -9,7 +9,7 @@ ORM operations for UniqueConstraint records ```typescript db.uniqueConstraint.findMany({ select: { id: true } }).execute() db.uniqueConstraint.findOne({ id: '', select: { id: true } }).execute() -db.uniqueConstraint.create({ data: { category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }, select: { id: true } }).execute() +db.uniqueConstraint.create({ data: { category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', nullsNotDistinct: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }, select: { id: true } }).execute() db.uniqueConstraint.update({ where: { id: '' }, data: { category: '' }, select: { id: true } }).execute() db.uniqueConstraint.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.uniqueConstraint.findMany({ ```typescript const item = await db.uniqueConstraint.create({ - data: { category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }, + data: { category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', nullsNotDistinct: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/update-function-from-source.md b/.agents/skills/orm-api/references/update-function-from-source.md new file mode 100644 index 0000000000..44cb7be849 --- /dev/null +++ b/.agents/skills/orm-api/references/update-function-from-source.md @@ -0,0 +1,19 @@ +# updateFunctionFromSource + + + +Replaces a `Function`'s definition from its source text; its database, schema and exposure are unchanged. + +## Usage + +```typescript +db.mutation.updateFunctionFromSource({ input: { id: '', source: '' } }).execute() +``` + +## Examples + +### Run updateFunctionFromSource + +```typescript +const result = await db.mutation.updateFunctionFromSource({ input: { id: '', source: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/provision-bucket.md b/.agents/skills/orm-auth/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-auth/references/provision-bucket.md +++ b/.agents/skills/orm-auth/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-auth/references/request-magic-link.md b/.agents/skills/orm-auth/references/request-magic-link.md index 788739a21b..091a0e1f41 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: '' } }).execute() +db.mutation.requestMagicLink({ input: { email: '', next: '' } }).execute() ``` ## Examples @@ -15,5 +15,5 @@ db.mutation.requestMagicLink({ input: { email: '' } }).execute() ### Run requestMagicLink ```typescript -const result = await db.mutation.requestMagicLink({ input: { email: '' } }).execute(); +const result = await db.mutation.requestMagicLink({ input: { email: '', next: '' } }).execute(); ``` diff --git a/.agents/skills/orm-auth/references/sign-up.md b/.agents/skills/orm-auth/references/sign-up.md index e0416150e0..338bfc94f5 100644 --- a/.agents/skills/orm-auth/references/sign-up.md +++ b/.agents/skills/orm-auth/references/sign-up.md @@ -7,7 +7,7 @@ Execute the signUp mutation ## Usage ```typescript -db.mutation.signUp({ input: '' }).execute() +db.mutation.signUp({ input: { csrfToken: '', email: '', inviteToken: '', password: '' } }).execute() ``` ## Examples @@ -15,5 +15,5 @@ db.mutation.signUp({ input: '' }).execute() ### Run signUp ```typescript -const result = await db.mutation.signUp({ input: '' }).execute(); +const result = await db.mutation.signUp({ input: { csrfToken: '', email: '', inviteToken: '', password: '' } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/function-invocation.md b/.agents/skills/orm-compute/references/function-invocation.md index 17d6901999..60c5bbc995 100644 --- a/.agents/skills/orm-compute/references/function-invocation.md +++ b/.agents/skills/orm-compute/references/function-invocation.md @@ -9,7 +9,7 @@ Function invocation log — INSERT to call a function (business-layer, metered). ```typescript db.functionInvocation.findMany({ select: { id: true } }).execute() db.functionInvocation.findOne({ id: '', select: { id: true } }).execute() -db.functionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute() +db.functionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute() db.functionInvocation.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute() db.functionInvocation.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.functionInvocation.findMany({ ```typescript const item = await db.functionInvocation.create({ - data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, + data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/platform-function-invocation.md b/.agents/skills/orm-compute/references/platform-function-invocation.md index 812c8c4c33..99f11bbaa0 100644 --- a/.agents/skills/orm-compute/references/platform-function-invocation.md +++ b/.agents/skills/orm-compute/references/platform-function-invocation.md @@ -9,7 +9,7 @@ Function invocation log — INSERT to call a function (business-layer, metered). ```typescript db.platformFunctionInvocation.findMany({ select: { id: true } }).execute() db.platformFunctionInvocation.findOne({ id: '', select: { id: true } }).execute() -db.platformFunctionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute() +db.platformFunctionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute() db.platformFunctionInvocation.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute() db.platformFunctionInvocation.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.platformFunctionInvocation.findMany({ ```typescript const item = await db.platformFunctionInvocation.create({ - data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, + data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/provision-bucket.md b/.agents/skills/orm-compute/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-compute/references/provision-bucket.md +++ b/.agents/skills/orm-compute/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-config/references/provision-bucket.md b/.agents/skills/orm-config/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-config/references/provision-bucket.md +++ b/.agents/skills/orm-config/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-infra/references/provision-bucket.md b/.agents/skills/orm-infra/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-infra/references/provision-bucket.md +++ b/.agents/skills/orm-infra/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-modules/references/billing-provider-module.md b/.agents/skills/orm-modules/references/billing-provider-module.md index d31eb39888..3d4755e528 100644 --- a/.agents/skills/orm-modules/references/billing-provider-module.md +++ b/.agents/skills/orm-modules/references/billing-provider-module.md @@ -9,7 +9,7 @@ ORM operations for BillingProviderModule records ```typescript db.billingProviderModule.findMany({ select: { id: true } }).execute() db.billingProviderModule.findOne({ id: '', select: { id: true } }).execute() -db.billingProviderModule.create({ data: { activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }, select: { id: true } }).execute() +db.billingProviderModule.create({ data: { activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingConnectionTableId: '', billingConnectionTableName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderConnectedFunction: '', billingProviderKeyFunction: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingConnectionFunction: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }, select: { id: true } }).execute() db.billingProviderModule.update({ where: { id: '' }, data: { activatePlanSubscriptionFunction: '' }, select: { id: true } }).execute() db.billingProviderModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.billingProviderModule.findMany({ ```typescript const item = await db.billingProviderModule.create({ - data: { activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }, + data: { activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingConnectionTableId: '', billingConnectionTableName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderConnectedFunction: '', billingProviderKeyFunction: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingConnectionFunction: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }, 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 0b188255b8..9c081fe747 100644 --- a/.agents/skills/orm-modules/references/blueprint-construction.md +++ b/.agents/skills/orm-modules/references/blueprint-construction.md @@ -9,7 +9,7 @@ Tracks individual construction attempts of a blueprint. Each time construct_blue ```typescript db.blueprintConstruction.findMany({ select: { id: true } }).execute() db.blueprintConstruction.findOne({ id: '', select: { id: true } }).execute() -db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', errorDetails: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute() +db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', 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: '', errorDetails: '', schemaId: '', status: '', tableMap: '' }, + data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/catalog-module.md b/.agents/skills/orm-modules/references/catalog-module.md index 381e09510f..7999195275 100644 --- a/.agents/skills/orm-modules/references/catalog-module.md +++ b/.agents/skills/orm-modules/references/catalog-module.md @@ -9,7 +9,7 @@ ORM operations for CatalogModule records ```typescript db.catalogModule.findMany({ select: { id: true } }).execute() db.catalogModule.findOne({ id: '', select: { id: true } }).execute() -db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute() +db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute() db.catalogModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.catalogModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.catalogModule.findMany({ ```typescript const item = await db.catalogModule.create({ - data: { apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, + data: { apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/construct-blueprint.md b/.agents/skills/orm-modules/references/construct-blueprint.md index bfed517f3a..7e05c41c57 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 on success, NULL on failure. +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. ## Usage diff --git a/.agents/skills/orm-modules/references/provision-bucket.md b/.agents/skills/orm-modules/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-modules/references/provision-bucket.md +++ b/.agents/skills/orm-modules/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-modules/references/storage-module.md b/.agents/skills/orm-modules/references/storage-module.md index 2ad969d248..f3e3acf8a7 100644 --- a/.agents/skills/orm-modules/references/storage-module.md +++ b/.agents/skills/orm-modules/references/storage-module.md @@ -9,7 +9,7 @@ ORM operations for StorageModule records ```typescript db.storageModule.findMany({ select: { id: true } }).execute() db.storageModule.findOne({ id: '', select: { id: true } }).execute() -db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute() +db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', region: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute() db.storageModule.update({ where: { id: '' }, data: { allowedOrigins: '' }, select: { id: true } }).execute() db.storageModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.storageModule.findMany({ ```typescript const item = await db.storageModule.create({ - data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, + data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', region: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-objects/references/provision-bucket.md b/.agents/skills/orm-objects/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-objects/references/provision-bucket.md +++ b/.agents/skills/orm-objects/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-remote/references/provision-bucket.md b/.agents/skills/orm-remote/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-remote/references/provision-bucket.md +++ b/.agents/skills/orm-remote/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-storage/references/bucket.md b/.agents/skills/orm-storage/references/bucket.md index 64d1d95245..01a2080eb1 100644 --- a/.agents/skills/orm-storage/references/bucket.md +++ b/.agents/skills/orm-storage/references/bucket.md @@ -9,7 +9,7 @@ Logical storage containers that group files with shared access policies and CDN ```typescript db.bucket.findMany({ select: { id: true } }).execute() db.bucket.findOne({ id: '', select: { id: true } }).execute() -db.bucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute() +db.bucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute() db.bucket.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute() db.bucket.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.bucket.findMany({ ```typescript const item = await db.bucket.create({ - data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }, + data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-storage/references/platform-bucket.md b/.agents/skills/orm-storage/references/platform-bucket.md index 5518235f61..b189a23075 100644 --- a/.agents/skills/orm-storage/references/platform-bucket.md +++ b/.agents/skills/orm-storage/references/platform-bucket.md @@ -9,7 +9,7 @@ Logical storage containers that group files with shared access policies and CDN ```typescript db.platformBucket.findMany({ select: { id: true } }).execute() db.platformBucket.findOne({ id: '', select: { id: true } }).execute() -db.platformBucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute() +db.platformBucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute() db.platformBucket.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute() db.platformBucket.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.platformBucket.findMany({ ```typescript const item = await db.platformBucket.create({ - data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }, + data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-storage/references/provision-bucket.md b/.agents/skills/orm-storage/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-storage/references/provision-bucket.md +++ b/.agents/skills/orm-storage/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/.agents/skills/orm-storage/references/upload-files.md b/.agents/skills/orm-storage/references/upload-files.md index 7be60502e9..811de7b398 100644 --- a/.agents/skills/orm-storage/references/upload-files.md +++ b/.agents/skills/orm-storage/references/upload-files.md @@ -2,7 +2,7 @@ -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. ## Usage diff --git a/.agents/skills/orm-storage/references/upload-platform-files.md b/.agents/skills/orm-storage/references/upload-platform-files.md index fbfa1b5e8f..06e61a442a 100644 --- a/.agents/skills/orm-storage/references/upload-platform-files.md +++ b/.agents/skills/orm-storage/references/upload-platform-files.md @@ -2,7 +2,7 @@ -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. ## Usage diff --git a/.agents/skills/orm-usage/references/provision-bucket.md b/.agents/skills/orm-usage/references/provision-bucket.md index eaefc02f2f..9faeee2696 100644 --- a/.agents/skills/orm-usage/references/provision-bucket.md +++ b/.agents/skills/orm-usage/references/provision-bucket.md @@ -3,10 +3,11 @@ Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. ## Usage diff --git a/pgpm/export/src/meta-export-tables.json b/pgpm/export/src/meta-export-tables.json index 40baf327d3..9f8ef36e9f 100644 --- a/pgpm/export/src/meta-export-tables.json +++ b/pgpm/export/src/meta-export-tables.json @@ -751,6 +751,11 @@ "schema": "catalog_private", "table": "buckets" }, + { + "key": "catalog_private.domain_verifications", + "schema": "catalog_private", + "table": "domain_verifications" + }, { "key": "catalog_private.domains", "schema": "catalog_private", @@ -855,6 +860,10 @@ "created_at", "updated_at" ], + "catalog_private.domain_verifications": [ + "created_at", + "updated_at" + ], "catalog_private.domains": [ "created_at", "updated_at" diff --git a/sdk/constructive-cli/src/admin/cli/README.md b/sdk/constructive-cli/src/admin/cli/README.md index d87287b02e..54c0915d77 100644 --- a/sdk/constructive-cli/src/admin/cli/README.md +++ b/sdk/constructive-cli/src/admin/cli/README.md @@ -61,10 +61,11 @@ csdk auth set-token | `provision-app-user` | provisionAppUser | | `provision-app-users-bulk` | provisionAppUsersBulk | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `provision-org-user` | provisionOrgUser | | `provision-org-users-bulk` | provisionOrgUsersBulk | | `submit-app-invite-code` | submitAppInviteCode | @@ -1004,10 +1005,11 @@ provisionAppUsersBulk ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/admin/cli/commands.ts b/sdk/constructive-cli/src/admin/cli/commands.ts index 6d71452fab..1c97a2be6d 100644 --- a/sdk/constructive-cli/src/admin/cli/commands.ts +++ b/sdk/constructive-cli/src/admin/cli/commands.ts @@ -96,7 +96,7 @@ const createCommandMap: () => Record< 'submit-org-invite-code': submitOrgInviteCodeCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n app-admin-grant appAdminGrant CRUD operations\n app-capability-default-capability appCapabilityDefaultCapability CRUD operations\n app-capability-default-grant appCapabilityDefaultGrant CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n app-grant appGrant CRUD operations\n app-invite appInvite CRUD operations\n app-membership appMembership CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n membership-type membershipType CRUD operations\n my-pending-app-invites-record myPendingAppInvitesRecord CRUD operations\n my-pending-org-invites-record myPendingOrgInvitesRecord CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-capability-default-capability orgCapabilityDefaultCapability CRUD operations\n org-capability-default-grant orgCapabilityDefaultGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n org-grant orgGrant CRUD operations\n org-invite orgInvite CRUD operations\n org-member orgMember CRUD operations\n org-member-profile orgMemberProfile CRUD operations\n org-membership orgMembership CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n org-membership-setting orgMembershipSetting CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n get-organization-id getOrganizationId\n org-is-manager-of orgIsManagerOf\n accept-app-invite acceptAppInvite\n accept-org-invite acceptOrgInvite\n provision-app-user provisionAppUser\n provision-app-users-bulk provisionAppUsersBulk\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n provision-org-user provisionOrgUser\n provision-org-users-bulk provisionOrgUsersBulk\n submit-app-invite-code submitAppInviteCode\n submit-org-invite-code submitOrgInviteCode\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 app-admin-grant appAdminGrant CRUD operations\n app-capability-default-capability appCapabilityDefaultCapability CRUD operations\n app-capability-default-grant appCapabilityDefaultGrant CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n app-grant appGrant CRUD operations\n app-invite appInvite CRUD operations\n app-membership appMembership CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n membership-type membershipType CRUD operations\n my-pending-app-invites-record myPendingAppInvitesRecord CRUD operations\n my-pending-org-invites-record myPendingOrgInvitesRecord CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-capability-default-capability orgCapabilityDefaultCapability CRUD operations\n org-capability-default-grant orgCapabilityDefaultGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n org-grant orgGrant CRUD operations\n org-invite orgInvite CRUD operations\n org-member orgMember CRUD operations\n org-member-profile orgMemberProfile CRUD operations\n org-membership orgMembership CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n org-membership-setting orgMembershipSetting CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n get-organization-id getOrganizationId\n org-is-manager-of orgIsManagerOf\n accept-app-invite acceptAppInvite\n accept-org-invite acceptOrgInvite\n provision-app-user provisionAppUser\n provision-app-users-bulk provisionAppUsersBulk\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-org-user provisionOrgUser\n provision-org-users-bulk provisionOrgUsersBulk\n submit-app-invite-code submitAppInviteCode\n submit-org-invite-code submitOrgInviteCode\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/admin/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/admin/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/admin/orm/README.md b/sdk/constructive-cli/src/admin/orm/README.md index 72b44660f4..0a5e8c1664 100644 --- a/sdk/constructive-cli/src/admin/orm/README.md +++ b/sdk/constructive-cli/src/admin/orm/README.md @@ -1171,10 +1171,11 @@ const result = await db.mutation.provisionAppUsersBulk({ input: { users: ' ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/admin/orm/input-types.ts b/sdk/constructive-cli/src/admin/orm/input-types.ts index dc19216eb3..9bc1f6a8e9 100644 --- a/sdk/constructive-cli/src/admin/orm/input-types.ts +++ b/sdk/constructive-cli/src/admin/orm/input-types.ts @@ -3753,19 +3753,19 @@ export type ProvisionAppUsersBulkPayloadSelect = { }; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface ProvisionOrgUserPayload { clientMutationId?: string | null; diff --git a/sdk/constructive-cli/src/admin/orm/mutation/index.ts b/sdk/constructive-cli/src/admin/orm/mutation/index.ts index aab974f285..026cab2abe 100644 --- a/sdk/constructive-cli/src/admin/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/admin/orm/mutation/index.ts @@ -51,10 +51,11 @@ export interface ProvisionAppUsersBulkVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-cli/src/agent/cli/README.md b/sdk/constructive-cli/src/agent/cli/README.md index 76cdeac758..99b5135a32 100644 --- a/sdk/constructive-cli/src/agent/cli/README.md +++ b/sdk/constructive-cli/src/agent/cli/README.md @@ -51,10 +51,11 @@ csdk auth set-token | `platform-agent-task` | platformAgentTask CRUD operations | | `platform-agent-thread` | platformAgentThread CRUD operations | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | ## Infrastructure Commands @@ -1182,10 +1183,11 @@ CRUD operations for PlatformAgentThread records. ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/agent/cli/commands.ts b/sdk/constructive-cli/src/agent/cli/commands.ts index 35cdbc2745..a5769053fb 100644 --- a/sdk/constructive-cli/src/agent/cli/commands.ts +++ b/sdk/constructive-cli/src/agent/cli/commands.ts @@ -68,7 +68,7 @@ const createCommandMap: () => Record< 'provision-bucket': provisionBucketCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n agent agent CRUD operations\n agent-event agentEvent CRUD operations\n agent-message agentMessage CRUD operations\n agent-persona agentPersona CRUD operations\n agent-plan agentPlan CRUD operations\n agent-prompt agentPrompt CRUD operations\n agent-resource-chunk agentResourceChunk CRUD operations\n agent-resource agentResource CRUD operations\n agent-run agentRun CRUD operations\n agent-run-workspace agentRunWorkspace CRUD operations\n agent-task agentTask CRUD operations\n agent-thread agentThread CRUD operations\n platform-agent platformAgent CRUD operations\n platform-agent-event platformAgentEvent CRUD operations\n platform-agent-message platformAgentMessage CRUD operations\n platform-agent-persona platformAgentPersona CRUD operations\n platform-agent-plan platformAgentPlan CRUD operations\n platform-agent-prompt platformAgentPrompt CRUD operations\n platform-agent-resource-chunk platformAgentResourceChunk CRUD operations\n platform-agent-resource platformAgentResource CRUD operations\n platform-agent-run platformAgentRun CRUD operations\n platform-agent-run-workspace platformAgentRunWorkspace CRUD operations\n platform-agent-task platformAgentTask CRUD operations\n platform-agent-thread platformAgentThread CRUD operations\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\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 agent CRUD operations\n agent-event agentEvent CRUD operations\n agent-message agentMessage CRUD operations\n agent-persona agentPersona CRUD operations\n agent-plan agentPlan CRUD operations\n agent-prompt agentPrompt CRUD operations\n agent-resource-chunk agentResourceChunk CRUD operations\n agent-resource agentResource CRUD operations\n agent-run agentRun CRUD operations\n agent-run-workspace agentRunWorkspace CRUD operations\n agent-task agentTask CRUD operations\n agent-thread agentThread CRUD operations\n platform-agent platformAgent CRUD operations\n platform-agent-event platformAgentEvent CRUD operations\n platform-agent-message platformAgentMessage CRUD operations\n platform-agent-persona platformAgentPersona CRUD operations\n platform-agent-plan platformAgentPlan CRUD operations\n platform-agent-prompt platformAgentPrompt CRUD operations\n platform-agent-resource-chunk platformAgentResourceChunk CRUD operations\n platform-agent-resource platformAgentResource CRUD operations\n platform-agent-run platformAgentRun CRUD operations\n platform-agent-run-workspace platformAgentRunWorkspace CRUD operations\n platform-agent-task platformAgentTask CRUD operations\n platform-agent-thread platformAgentThread CRUD operations\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/agent/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/agent/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/agent/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/agent/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/agent/orm/README.md b/sdk/constructive-cli/src/agent/orm/README.md index e9f31a411e..a201a35f2d 100644 --- a/sdk/constructive-cli/src/agent/orm/README.md +++ b/sdk/constructive-cli/src/agent/orm/README.md @@ -1120,10 +1120,11 @@ const deleted = await db.platformAgentThread.delete({ where: { id: '' } }) ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/agent/orm/input-types.ts b/sdk/constructive-cli/src/agent/orm/input-types.ts index 09297a55e7..203bbeda25 100644 --- a/sdk/constructive-cli/src/agent/orm/input-types.ts +++ b/sdk/constructive-cli/src/agent/orm/input-types.ts @@ -7257,19 +7257,19 @@ export interface FullTextFilter { } // ============ Payload/Return Types (for custom operations) ============ export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface CreateAgentPayload { /** The `Agent` that was created by this mutation. */ diff --git a/sdk/constructive-cli/src/agent/orm/mutation/index.ts b/sdk/constructive-cli/src/agent/orm/mutation/index.ts index 5491e16cd0..ed171c95f7 100644 --- a/sdk/constructive-cli/src/agent/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/agent/orm/mutation/index.ts @@ -15,10 +15,11 @@ import { connectionFieldsMap } from '../input-types'; /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-cli/src/api/README.md b/sdk/constructive-cli/src/api/README.md index 1b82e21f6a..ed2d731670 100644 --- a/sdk/constructive-cli/src/api/README.md +++ b/sdk/constructive-cli/src/api/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 92 -- **Custom queries:** 17 -- **Custom mutations:** 29 +- **Tables:** 90 +- **Custom queries:** 18 +- **Custom mutations:** 31 **Generators:** ORM, CLI diff --git a/sdk/constructive-cli/src/api/cli/README.md b/sdk/constructive-cli/src/api/cli/README.md index 14a1453729..11b2d3237c 100644 --- a/sdk/constructive-cli/src/api/cli/README.md +++ b/sdk/constructive-cli/src/api/cli/README.md @@ -55,7 +55,6 @@ csdk auth set-token | `full-text-search` | fullTextSearch CRUD operations | | `function` | function CRUD operations | | `get-site-previews-record` | getSitePreviewsRecord CRUD operations | -| `hostname-binding` | hostnameBinding CRUD operations | | `identity-provider-registry` | identityProviderRegistry CRUD operations | | `index` | index CRUD operations | | `list-suspended-databases-record` | listSuspendedDatabasesRecord CRUD operations | @@ -90,7 +89,6 @@ csdk auth set-token | `pubkey-setting` | pubkeySetting CRUD operations | | `redirect` | redirect CRUD operations | | `rls-setting` | rlsSetting CRUD operations | -| `route-binding` | routeBinding CRUD operations | | `route` | route CRUD operations | | `schema` | schema CRUD operations | | `schema-grant` | schemaGrant CRUD operations | @@ -120,6 +118,7 @@ csdk auth set-token | `webauthn-setting` | webauthnSetting CRUD operations | | `api-schema-names` | apiSchemaNames | | `apply-registry-defaults` | applyRegistryDefaults | +| `email-shared-account` | emailSharedAccount | | `get-site-preview-commit` | getSitePreviewCommit | | `get-site-release-manifest` | getSiteReleaseManifest | | `page-published` | pagePublished | @@ -138,6 +137,7 @@ csdk auth set-token | `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 | @@ -153,10 +153,11 @@ csdk auth set-token | `platform-sites-install-mantra` | platformSitesInstallMantra | | `platform-sites-provision-static-site` | platformSitesProvisionStaticSite | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `provision-site-preview` | provisionSitePreview | | `reject-database-transfer` | rejectDatabaseTransfer | | `request-database` | Requests a database and returns a ticket (database_provision_module row) to poll. @@ -175,6 +176,7 @@ 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 @@ -1212,37 +1214,6 @@ CRUD operations for GetSitePreviewsRecord records. **Required create fields:** `commitId`, `name` -### `hostname-binding` - -CRUD operations for HostnameBinding records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all hostnameBinding records | -| `find-first` | Find first matching hostnameBinding record | -| `get` | Get a hostnameBinding by id | -| `create` | Create a new hostnameBinding | -| `update` | Update an existing hostnameBinding | -| `delete` | Delete a hostnameBinding | - -**Fields:** - -| Field | Type | -|-------|------| -| `domainId` | UUID | -| `hostname` | String | -| `id` | UUID | -| `isWildcard` | Boolean | -| `managed` | Boolean | -| `parentHostname` | String | -| `tlsSecretName` | String | -| `tlsStatus` | String | -| `updatedAt` | Datetime | -| `verificationStatus` | String | - -**Required create fields:** `domainId`, `hostname` -**Optional create fields (backend defaults):** `isWildcard`, `managed`, `parentHostname`, `tlsSecretName`, `tlsStatus`, `verificationStatus` - ### `identity-provider-registry` CRUD operations for IdentityProviderRegistry records. @@ -1362,6 +1333,7 @@ CRUD operations for ManagedDomain records. | `domain` | String | | `id` | UUID | | `isWildcard` | Boolean | +| `publicPort` | Int | | `tlsReadyAt` | Datetime | | `tlsStatus` | String | | `updatedAt` | Datetime | @@ -1370,7 +1342,7 @@ CRUD operations for ManagedDomain records. | `verifiedAt` | Datetime | **Required create fields:** `databaseId`, `domain` -**Optional create fields (backend defaults):** `allowPublicUsage`, `annotations`, `certStatus`, `createdByPrincipal`, `isWildcard`, `tlsReadyAt`, `tlsStatus`, `updatedByPrincipal`, `verificationStatus`, `verifiedAt` +**Optional create fields (backend defaults):** `allowPublicUsage`, `annotations`, `certStatus`, `createdByPrincipal`, `isWildcard`, `publicPort`, `tlsReadyAt`, `tlsStatus`, `updatedByPrincipal`, `verificationStatus`, `verifiedAt` ### `node-type-registry` @@ -1839,6 +1811,7 @@ CRUD operations for PlatformManagedDomain records. | `domain` | String | | `id` | UUID | | `isWildcard` | Boolean | +| `publicPort` | Int | | `tlsReadyAt` | Datetime | | `tlsStatus` | String | | `updatedAt` | Datetime | @@ -1847,7 +1820,7 @@ CRUD operations for PlatformManagedDomain records. | `verifiedAt` | Datetime | **Required create fields:** `domain` -**Optional create fields (backend defaults):** `allowPublicUsage`, `annotations`, `certStatus`, `createdByPrincipal`, `isWildcard`, `tlsReadyAt`, `tlsStatus`, `updatedByPrincipal`, `verificationStatus`, `verifiedAt` +**Optional create fields (backend defaults):** `allowPublicUsage`, `annotations`, `certStatus`, `createdByPrincipal`, `isWildcard`, `publicPort`, `tlsReadyAt`, `tlsStatus`, `updatedByPrincipal`, `verificationStatus`, `verifiedAt` ### `platform-page` @@ -2322,41 +2295,6 @@ CRUD operations for RlsSetting records. **Required create fields:** `databaseId` **Optional create fields (backend defaults):** `authenticateFunctionId`, `authenticateSchemaId`, `authenticateStrictFunctionId`, `currentIpAddressFunctionId`, `currentRoleFunctionId`, `currentRoleIdFunctionId`, `currentUserAgentFunctionId`, `roleSchemaId` -### `route-binding` - -CRUD operations for RouteBinding records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all routeBinding records | -| `find-first` | Find first matching routeBinding record | -| `get` | Get a routeBinding by id | -| `create` | Create a new routeBinding | -| `update` | Update an existing routeBinding | -| `delete` | Delete a routeBinding | - -**Fields:** - -| Field | Type | -|-------|------| -| `domainId` | UUID | -| `id` | UUID | -| `isActive` | Boolean | -| `method` | String | -| `path` | String | -| `priority` | Int | -| `servingSiteId` | UUID | -| `targetApiId` | UUID | -| `targetBucketId` | UUID | -| `targetFunctionId` | UUID | -| `targetRedirectId` | UUID | -| `targetServiceId` | UUID | -| `targetSiteId` | UUID | -| `updatedAt` | Datetime | - -**Required create fields:** `domainId`, `path` -**Optional create fields (backend defaults):** `isActive`, `method`, `priority`, `servingSiteId`, `targetApiId`, `targetBucketId`, `targetFunctionId`, `targetRedirectId`, `targetServiceId`, `targetSiteId` - ### `route` CRUD operations for Route records. @@ -3029,6 +2967,7 @@ CRUD operations for UniqueConstraint records. | `initiallyDeferred` | Boolean | | `isDeferrable` | Boolean | | `name` | String | +| `nullsNotDistinct` | Boolean | | `smartTags` | JSON | | `tableId` | UUID | | `tags` | String | @@ -3037,7 +2976,7 @@ CRUD operations for UniqueConstraint records. | `withoutOverlaps` | Boolean | **Required create fields:** `fieldIds`, `tableId` -**Optional create fields (backend defaults):** `category`, `databaseId`, `description`, `initiallyDeferred`, `isDeferrable`, `name`, `smartTags`, `tags`, `type`, `withoutOverlaps` +**Optional create fields (backend defaults):** `category`, `databaseId`, `description`, `initiallyDeferred`, `isDeferrable`, `name`, `nullsNotDistinct`, `smartTags`, `tags`, `type`, `withoutOverlaps` ### `view-behavior` @@ -3252,6 +3191,13 @@ applyRegistryDefaults | `--data` | JSON | | `--nodeType` | String | +### `email-shared-account` + +emailSharedAccount + +- **Type:** query +- **Arguments:** none + ### `get-site-preview-commit` getSitePreviewCommit @@ -3472,6 +3418,21 @@ 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 @@ -3676,10 +3637,11 @@ platformSitesProvisionStaticSite ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** @@ -3853,6 +3815,19 @@ 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 3c7c701e97..407d060a60 100644 --- a/sdk/constructive-cli/src/api/cli/commands.ts +++ b/sdk/constructive-cli/src/api/cli/commands.ts @@ -35,7 +35,6 @@ import foreignKeyConstraintCmd from './commands/foreign-key-constraint'; import fullTextSearchCmd from './commands/full-text-search'; import functionCmd from './commands/function'; import getSitePreviewsRecordCmd from './commands/get-site-previews-record'; -import hostnameBindingCmd from './commands/hostname-binding'; import identityProviderRegistryCmd from './commands/identity-provider-registry'; import indexCmd from './commands/index'; import listSuspendedDatabasesRecordCmd from './commands/list-suspended-databases-record'; @@ -70,7 +69,6 @@ import primaryKeyConstraintCmd from './commands/primary-key-constraint'; import pubkeySettingCmd from './commands/pubkey-setting'; import redirectCmd from './commands/redirect'; import rlsSettingCmd from './commands/rls-setting'; -import routeBindingCmd from './commands/route-binding'; import routeCmd from './commands/route'; import schemaCmd from './commands/schema'; import schemaGrantCmd from './commands/schema-grant'; @@ -100,6 +98,7 @@ 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'; import getSiteReleaseManifestCmd from './commands/get-site-release-manifest'; import pagePublishedCmd from './commands/page-published'; @@ -118,6 +117,7 @@ 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,6 +144,7 @@ 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, ( @@ -183,7 +184,6 @@ const createCommandMap: () => Record< 'full-text-search': fullTextSearchCmd, function: functionCmd, 'get-site-previews-record': getSitePreviewsRecordCmd, - 'hostname-binding': hostnameBindingCmd, 'identity-provider-registry': identityProviderRegistryCmd, index: indexCmd, 'list-suspended-databases-record': listSuspendedDatabasesRecordCmd, @@ -218,7 +218,6 @@ const createCommandMap: () => Record< 'pubkey-setting': pubkeySettingCmd, redirect: redirectCmd, 'rls-setting': rlsSettingCmd, - 'route-binding': routeBindingCmd, route: routeCmd, schema: schemaCmd, 'schema-grant': schemaGrantCmd, @@ -248,6 +247,7 @@ const createCommandMap: () => Record< 'webauthn-setting': webauthnSettingCmd, 'api-schema-names': apiSchemaNamesCmd, 'apply-registry-defaults': applyRegistryDefaultsCmd, + 'email-shared-account': emailSharedAccountCmd, 'get-site-preview-commit': getSitePreviewCommitCmd, 'get-site-release-manifest': getSiteReleaseManifestCmd, 'page-published': pagePublishedCmd, @@ -266,6 +266,7 @@ const createCommandMap: () => Record< '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, @@ -292,9 +293,10 @@ 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 hostname-binding hostnameBinding 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-binding routeBinding CRUD operations\n route route CRUD operations\n schema schema CRUD operations\n schema-grant schemaGrant CRUD operations\n site-app-link siteAppLink CRUD operations\n site site CRUD operations\n site-deep-link siteDeepLink CRUD operations\n site-error-page siteErrorPage CRUD operations\n site-metadatum siteMetadatum CRUD operations\n site-module siteModule CRUD operations\n site-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 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 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.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\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"; + "\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"; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/api/cli/commands/create-function-from-source.ts b/sdk/constructive-cli/src/api/cli/commands/create-function-from-source.ts new file mode 100644 index 0000000000..2b8332aa48 --- /dev/null +++ b/sdk/constructive-cli/src/api/cli/commands/create-function-from-source.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation createFunctionFromSource + * @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'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + 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' + ); + 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 + .createFunctionFromSource( + parsedAnswers as unknown as CreateFunctionFromSourceVariables, + { + select: selectFields, + } as unknown as { + select: CreateFunctionPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: createFunctionFromSource'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/api/cli/commands/email-shared-account.ts b/sdk/constructive-cli/src/api/cli/commands/email-shared-account.ts new file mode 100644 index 0000000000..ef265d2f10 --- /dev/null +++ b/sdk/constructive-cli/src/api/cli/commands/email-shared-account.ts @@ -0,0 +1,30 @@ +/** + * CLI command for query emailSharedAccount + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'email-shared-account - emailSharedAccount\n\nUsage: email-shared-account [OPTIONS]\n' + ); + process.exit(0); + } + const client = getClient(); + const result = await client.query.emailSharedAccount().execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: emailSharedAccount'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/api/cli/commands/hostname-binding.ts b/sdk/constructive-cli/src/api/cli/commands/hostname-binding.ts deleted file mode 100644 index fae7b2e3e8..0000000000 --- a/sdk/constructive-cli/src/api/cli/commands/hostname-binding.ts +++ /dev/null @@ -1,409 +0,0 @@ -/** - * CLI commands for HostnameBinding - * @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 { - CreateHostnameBindingInput, - HostnameBindingPatch, - HostnameBindingSelect, - HostnameBindingFilter, - HostnameBindingOrderBy, -} from '../../orm/input-types'; -import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; -const fieldSchema: FieldSchema = { - domainId: 'uuid', - hostname: 'string', - id: 'uuid', - isWildcard: 'boolean', - managed: 'boolean', - parentHostname: 'string', - tlsSecretName: 'string', - tlsStatus: 'string', - updatedAt: 'string', - verificationStatus: 'string', -}; -const usage = - '\nhostname-binding \n\nCommands:\n list List hostnameBinding records\n find-first Find first matching hostnameBinding record\n get Get a hostnameBinding by ID\n create Create a new hostnameBinding\n update Update an existing hostnameBinding\n delete Delete a hostnameBinding\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 = { - domainId: true, - hostname: true, - id: true, - isWildcard: true, - managed: true, - parentHostname: true, - tlsSecretName: true, - tlsStatus: true, - updatedAt: true, - verificationStatus: true, - }; - const findManyArgs = parseFindManyArgs< - FindManyArgs & { - select: HostnameBindingSelect; - } - >(argv, defaultSelect); - const client = getClient(); - const result = await client.hostnameBinding.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 = { - domainId: true, - hostname: true, - id: true, - isWildcard: true, - managed: true, - parentHostname: true, - tlsSecretName: true, - tlsStatus: true, - updatedAt: true, - verificationStatus: true, - }; - const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { - select: HostnameBindingSelect; - } - >(argv, defaultSelect); - const client = getClient(); - const result = await client.hostnameBinding.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.hostnameBinding - .findOne({ - id: answers.id as string, - select: { - domainId: true, - hostname: true, - id: true, - isWildcard: true, - managed: true, - parentHostname: true, - tlsSecretName: true, - tlsStatus: true, - updatedAt: true, - verificationStatus: 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: 'domainId', - message: 'domainId', - required: true, - }, - { - type: 'text', - name: 'hostname', - message: 'hostname', - required: true, - }, - { - type: 'boolean', - name: 'isWildcard', - message: 'isWildcard', - required: false, - skipPrompt: true, - }, - { - type: 'boolean', - name: 'managed', - message: 'managed', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'parentHostname', - message: 'parentHostname', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'tlsSecretName', - message: 'tlsSecretName', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'tlsStatus', - message: 'tlsStatus', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'verificationStatus', - message: 'verificationStatus', - required: false, - skipPrompt: true, - }, - ]); - const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined( - answers, - fieldSchema - ) as CreateHostnameBindingInput['hostnameBinding']; - const client = getClient(); - const result = await client.hostnameBinding - .create({ - data: { - domainId: cleanedData.domainId, - hostname: cleanedData.hostname, - isWildcard: cleanedData.isWildcard, - managed: cleanedData.managed, - parentHostname: cleanedData.parentHostname, - tlsSecretName: cleanedData.tlsSecretName, - tlsStatus: cleanedData.tlsStatus, - verificationStatus: cleanedData.verificationStatus, - }, - select: { - domainId: true, - hostname: true, - id: true, - isWildcard: true, - managed: true, - parentHostname: true, - tlsSecretName: true, - tlsStatus: true, - updatedAt: true, - verificationStatus: 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: 'domainId', - message: 'domainId', - required: false, - }, - { - type: 'text', - name: 'hostname', - message: 'hostname', - required: false, - }, - { - type: 'boolean', - name: 'isWildcard', - message: 'isWildcard', - required: false, - skipPrompt: true, - }, - { - type: 'boolean', - name: 'managed', - message: 'managed', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'parentHostname', - message: 'parentHostname', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'tlsSecretName', - message: 'tlsSecretName', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'tlsStatus', - message: 'tlsStatus', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'verificationStatus', - message: 'verificationStatus', - required: false, - skipPrompt: true, - }, - ]); - const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined(answers, fieldSchema) as HostnameBindingPatch; - const client = getClient(); - const result = await client.hostnameBinding - .update({ - where: { - id: answers.id as string, - }, - data: { - domainId: cleanedData.domainId, - hostname: cleanedData.hostname, - isWildcard: cleanedData.isWildcard, - managed: cleanedData.managed, - parentHostname: cleanedData.parentHostname, - tlsSecretName: cleanedData.tlsSecretName, - tlsStatus: cleanedData.tlsStatus, - verificationStatus: cleanedData.verificationStatus, - }, - select: { - domainId: true, - hostname: true, - id: true, - isWildcard: true, - managed: true, - parentHostname: true, - tlsSecretName: true, - tlsStatus: true, - updatedAt: true, - verificationStatus: 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.hostnameBinding - .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/managed-domain.ts b/sdk/constructive-cli/src/api/cli/commands/managed-domain.ts index 12c4f69f53..39ad7475f0 100644 --- a/sdk/constructive-cli/src/api/cli/commands/managed-domain.ts +++ b/sdk/constructive-cli/src/api/cli/commands/managed-domain.ts @@ -25,6 +25,7 @@ const fieldSchema: FieldSchema = { domain: 'string', id: 'uuid', isWildcard: 'boolean', + publicPort: 'int', tlsReadyAt: 'string', tlsStatus: 'string', updatedAt: 'string', @@ -92,6 +93,7 @@ async function handleList(argv: Partial>, _prompter: Inq domain: true, id: true, isWildcard: true, + publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, @@ -127,6 +129,7 @@ async function handleFindFirst(argv: Partial>, _prompter domain: true, id: true, isWildcard: true, + publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, @@ -174,6 +177,7 @@ async function handleGet(argv: Partial>, prompter: Inqui domain: true, id: true, isWildcard: true, + publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, @@ -242,6 +246,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'publicPort', + message: 'publicPort', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'tlsReadyAt', @@ -294,6 +305,7 @@ async function handleCreate(argv: Partial>, prompter: In databaseId: cleanedData.databaseId, domain: cleanedData.domain, isWildcard: cleanedData.isWildcard, + publicPort: cleanedData.publicPort, tlsReadyAt: cleanedData.tlsReadyAt, tlsStatus: cleanedData.tlsStatus, updatedByPrincipal: cleanedData.updatedByPrincipal, @@ -310,6 +322,7 @@ async function handleCreate(argv: Partial>, prompter: In domain: true, id: true, isWildcard: true, + publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, @@ -384,6 +397,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'publicPort', + message: 'publicPort', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'tlsReadyAt', @@ -436,6 +456,7 @@ async function handleUpdate(argv: Partial>, prompter: In databaseId: cleanedData.databaseId, domain: cleanedData.domain, isWildcard: cleanedData.isWildcard, + publicPort: cleanedData.publicPort, tlsReadyAt: cleanedData.tlsReadyAt, tlsStatus: cleanedData.tlsStatus, updatedByPrincipal: cleanedData.updatedByPrincipal, @@ -452,6 +473,7 @@ async function handleUpdate(argv: Partial>, prompter: In domain: true, id: true, isWildcard: true, + publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/platform-managed-domain.ts b/sdk/constructive-cli/src/api/cli/commands/platform-managed-domain.ts index 07528518ae..61f8e05ab0 100644 --- a/sdk/constructive-cli/src/api/cli/commands/platform-managed-domain.ts +++ b/sdk/constructive-cli/src/api/cli/commands/platform-managed-domain.ts @@ -24,6 +24,7 @@ const fieldSchema: FieldSchema = { domain: 'string', id: 'uuid', isWildcard: 'boolean', + publicPort: 'int', tlsReadyAt: 'string', tlsStatus: 'string', updatedAt: 'string', @@ -90,6 +91,7 @@ async function handleList(argv: Partial>, _prompter: Inq domain: true, id: true, isWildcard: true, + publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, @@ -128,6 +130,7 @@ async function handleFindFirst(argv: Partial>, _prompter domain: true, id: true, isWildcard: true, + publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, @@ -178,6 +181,7 @@ async function handleGet(argv: Partial>, prompter: Inqui domain: true, id: true, isWildcard: true, + publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, @@ -240,6 +244,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'publicPort', + message: 'publicPort', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'tlsReadyAt', @@ -291,6 +302,7 @@ async function handleCreate(argv: Partial>, prompter: In createdByPrincipal: cleanedData.createdByPrincipal, domain: cleanedData.domain, isWildcard: cleanedData.isWildcard, + publicPort: cleanedData.publicPort, tlsReadyAt: cleanedData.tlsReadyAt, tlsStatus: cleanedData.tlsStatus, updatedByPrincipal: cleanedData.updatedByPrincipal, @@ -306,6 +318,7 @@ async function handleCreate(argv: Partial>, prompter: In domain: true, id: true, isWildcard: true, + publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, @@ -374,6 +387,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'publicPort', + message: 'publicPort', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'tlsReadyAt', @@ -425,6 +445,7 @@ async function handleUpdate(argv: Partial>, prompter: In createdByPrincipal: cleanedData.createdByPrincipal, domain: cleanedData.domain, isWildcard: cleanedData.isWildcard, + publicPort: cleanedData.publicPort, tlsReadyAt: cleanedData.tlsReadyAt, tlsStatus: cleanedData.tlsStatus, updatedByPrincipal: cleanedData.updatedByPrincipal, @@ -440,6 +461,7 @@ async function handleUpdate(argv: Partial>, prompter: In domain: true, id: true, isWildcard: true, + publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/api/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/api/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/api/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/api/cli/commands/route-binding.ts b/sdk/constructive-cli/src/api/cli/commands/route-binding.ts deleted file mode 100644 index bb62d9067b..0000000000 --- a/sdk/constructive-cli/src/api/cli/commands/route-binding.ts +++ /dev/null @@ -1,497 +0,0 @@ -/** - * CLI commands for RouteBinding - * @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 { - CreateRouteBindingInput, - RouteBindingPatch, - RouteBindingSelect, - RouteBindingFilter, - RouteBindingOrderBy, -} from '../../orm/input-types'; -import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; -const fieldSchema: FieldSchema = { - domainId: 'uuid', - id: 'uuid', - isActive: 'boolean', - method: 'string', - path: 'string', - priority: 'int', - servingSiteId: 'uuid', - targetApiId: 'uuid', - targetBucketId: 'uuid', - targetFunctionId: 'uuid', - targetRedirectId: 'uuid', - targetServiceId: 'uuid', - targetSiteId: 'uuid', - updatedAt: 'string', -}; -const usage = - '\nroute-binding \n\nCommands:\n list List routeBinding records\n find-first Find first matching routeBinding record\n get Get a routeBinding by ID\n create Create a new routeBinding\n update Update an existing routeBinding\n delete Delete a routeBinding\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 = { - domainId: true, - id: true, - isActive: true, - method: true, - path: true, - priority: true, - servingSiteId: true, - targetApiId: true, - targetBucketId: true, - targetFunctionId: true, - targetRedirectId: true, - targetServiceId: true, - targetSiteId: true, - updatedAt: true, - }; - const findManyArgs = parseFindManyArgs< - FindManyArgs & { - select: RouteBindingSelect; - } - >(argv, defaultSelect); - const client = getClient(); - const result = await client.routeBinding.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 = { - domainId: true, - id: true, - isActive: true, - method: true, - path: true, - priority: true, - servingSiteId: true, - targetApiId: true, - targetBucketId: true, - targetFunctionId: true, - targetRedirectId: true, - targetServiceId: true, - targetSiteId: true, - updatedAt: true, - }; - const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { - select: RouteBindingSelect; - } - >(argv, defaultSelect); - const client = getClient(); - const result = await client.routeBinding.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.routeBinding - .findOne({ - id: answers.id as string, - select: { - domainId: true, - id: true, - isActive: true, - method: true, - path: true, - priority: true, - servingSiteId: true, - targetApiId: true, - targetBucketId: true, - targetFunctionId: true, - targetRedirectId: true, - targetServiceId: true, - targetSiteId: true, - updatedAt: 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: 'domainId', - message: 'domainId', - required: true, - }, - { - type: 'boolean', - name: 'isActive', - message: 'isActive', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'method', - message: 'method', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'path', - message: 'path', - required: true, - }, - { - type: 'text', - name: 'priority', - message: 'priority', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'servingSiteId', - message: 'servingSiteId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetApiId', - message: 'targetApiId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetBucketId', - message: 'targetBucketId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetFunctionId', - message: 'targetFunctionId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetRedirectId', - message: 'targetRedirectId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetServiceId', - message: 'targetServiceId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetSiteId', - message: 'targetSiteId', - required: false, - skipPrompt: true, - }, - ]); - const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined( - answers, - fieldSchema - ) as CreateRouteBindingInput['routeBinding']; - const client = getClient(); - const result = await client.routeBinding - .create({ - data: { - domainId: cleanedData.domainId, - isActive: cleanedData.isActive, - method: cleanedData.method, - path: cleanedData.path, - priority: cleanedData.priority, - servingSiteId: cleanedData.servingSiteId, - targetApiId: cleanedData.targetApiId, - targetBucketId: cleanedData.targetBucketId, - targetFunctionId: cleanedData.targetFunctionId, - targetRedirectId: cleanedData.targetRedirectId, - targetServiceId: cleanedData.targetServiceId, - targetSiteId: cleanedData.targetSiteId, - }, - select: { - domainId: true, - id: true, - isActive: true, - method: true, - path: true, - priority: true, - servingSiteId: true, - targetApiId: true, - targetBucketId: true, - targetFunctionId: true, - targetRedirectId: true, - targetServiceId: true, - targetSiteId: true, - updatedAt: 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: 'domainId', - message: 'domainId', - required: false, - }, - { - type: 'boolean', - name: 'isActive', - message: 'isActive', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'method', - message: 'method', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'path', - message: 'path', - required: false, - }, - { - type: 'text', - name: 'priority', - message: 'priority', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'servingSiteId', - message: 'servingSiteId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetApiId', - message: 'targetApiId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetBucketId', - message: 'targetBucketId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetFunctionId', - message: 'targetFunctionId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetRedirectId', - message: 'targetRedirectId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetServiceId', - message: 'targetServiceId', - required: false, - skipPrompt: true, - }, - { - type: 'text', - name: 'targetSiteId', - message: 'targetSiteId', - required: false, - skipPrompt: true, - }, - ]); - const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined(answers, fieldSchema) as RouteBindingPatch; - const client = getClient(); - const result = await client.routeBinding - .update({ - where: { - id: answers.id as string, - }, - data: { - domainId: cleanedData.domainId, - isActive: cleanedData.isActive, - method: cleanedData.method, - path: cleanedData.path, - priority: cleanedData.priority, - servingSiteId: cleanedData.servingSiteId, - targetApiId: cleanedData.targetApiId, - targetBucketId: cleanedData.targetBucketId, - targetFunctionId: cleanedData.targetFunctionId, - targetRedirectId: cleanedData.targetRedirectId, - targetServiceId: cleanedData.targetServiceId, - targetSiteId: cleanedData.targetSiteId, - }, - select: { - domainId: true, - id: true, - isActive: true, - method: true, - path: true, - priority: true, - servingSiteId: true, - targetApiId: true, - targetBucketId: true, - targetFunctionId: true, - targetRedirectId: true, - targetServiceId: true, - targetSiteId: true, - updatedAt: 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.routeBinding - .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/unique-constraint.ts b/sdk/constructive-cli/src/api/cli/commands/unique-constraint.ts index 7c45f37692..2203e2e7c1 100644 --- a/sdk/constructive-cli/src/api/cli/commands/unique-constraint.ts +++ b/sdk/constructive-cli/src/api/cli/commands/unique-constraint.ts @@ -25,6 +25,7 @@ const fieldSchema: FieldSchema = { initiallyDeferred: 'boolean', isDeferrable: 'boolean', name: 'string', + nullsNotDistinct: 'boolean', smartTags: 'json', tableId: 'uuid', tags: 'string', @@ -92,6 +93,7 @@ async function handleList(argv: Partial>, _prompter: Inq initiallyDeferred: true, isDeferrable: true, name: true, + nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, @@ -127,6 +129,7 @@ async function handleFindFirst(argv: Partial>, _prompter initiallyDeferred: true, isDeferrable: true, name: true, + nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, @@ -174,6 +177,7 @@ async function handleGet(argv: Partial>, prompter: Inqui initiallyDeferred: true, isDeferrable: true, name: true, + nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, @@ -243,6 +247,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'boolean', + name: 'nullsNotDistinct', + message: 'nullsNotDistinct', + required: false, + skipPrompt: true, + }, { type: 'json', name: 'smartTags', @@ -294,6 +305,7 @@ async function handleCreate(argv: Partial>, prompter: In initiallyDeferred: cleanedData.initiallyDeferred, isDeferrable: cleanedData.isDeferrable, name: cleanedData.name, + nullsNotDistinct: cleanedData.nullsNotDistinct, smartTags: cleanedData.smartTags, tableId: cleanedData.tableId, tags: cleanedData.tags, @@ -310,6 +322,7 @@ async function handleCreate(argv: Partial>, prompter: In initiallyDeferred: true, isDeferrable: true, name: true, + nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, @@ -385,6 +398,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'boolean', + name: 'nullsNotDistinct', + message: 'nullsNotDistinct', + required: false, + skipPrompt: true, + }, { type: 'json', name: 'smartTags', @@ -436,6 +456,7 @@ async function handleUpdate(argv: Partial>, prompter: In initiallyDeferred: cleanedData.initiallyDeferred, isDeferrable: cleanedData.isDeferrable, name: cleanedData.name, + nullsNotDistinct: cleanedData.nullsNotDistinct, smartTags: cleanedData.smartTags, tableId: cleanedData.tableId, tags: cleanedData.tags, @@ -452,6 +473,7 @@ async function handleUpdate(argv: Partial>, prompter: In initiallyDeferred: true, isDeferrable: true, name: true, + nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, 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 new file mode 100644 index 0000000000..04179d5675 --- /dev/null +++ b/sdk/constructive-cli/src/api/cli/commands/update-function-from-source.ts @@ -0,0 +1,53 @@ +/** + * 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 2439802945..02e465c85e 100644 --- a/sdk/constructive-cli/src/api/orm/README.md +++ b/sdk/constructive-cli/src/api/orm/README.md @@ -50,7 +50,6 @@ const db = createClient({ | `fullTextSearch` | findMany, findOne, create, update, delete | | `function` | findMany, findOne, create, update, delete | | `getSitePreviewsRecord` | findMany, findOne, create, update, delete | -| `hostnameBinding` | findMany, findOne, create, update, delete | | `identityProviderRegistry` | findMany, findOne, create, update, delete | | `index` | findMany, findOne, create, update, delete | | `listSuspendedDatabasesRecord` | findMany, findOne, create, update, delete | @@ -85,7 +84,6 @@ const db = createClient({ | `pubkeySetting` | findMany, findOne, create, update, delete | | `redirect` | findMany, findOne, create, update, delete | | `rlsSetting` | findMany, findOne, create, update, delete | -| `routeBinding` | findMany, findOne, create, update, delete | | `route` | findMany, findOne, create, update, delete | | `schema` | findMany, findOne, create, update, delete | | `schemaGrant` | findMany, findOne, create, update, delete | @@ -1319,44 +1317,6 @@ const updated = await db.getSitePreviewsRecord.update({ where: { id: '' }, const deleted = await db.getSitePreviewsRecord.delete({ where: { id: '' } }).execute(); ``` -### `db.hostnameBinding` - -CRUD operations for HostnameBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `domainId` | UUID | Yes | -| `hostname` | String | Yes | -| `id` | UUID | No | -| `isWildcard` | Boolean | Yes | -| `managed` | Boolean | Yes | -| `parentHostname` | String | Yes | -| `tlsSecretName` | String | Yes | -| `tlsStatus` | String | Yes | -| `updatedAt` | Datetime | No | -| `verificationStatus` | String | Yes | - -**Operations:** - -```typescript -// List all hostnameBinding records -const items = await db.hostnameBinding.findMany({ select: { domainId: true, hostname: true, id: true, isWildcard: true, managed: true, parentHostname: true, tlsSecretName: true, tlsStatus: true, updatedAt: true, verificationStatus: true } }).execute(); - -// Get one by id -const item = await db.hostnameBinding.findOne({ id: '', select: { domainId: true, hostname: true, id: true, isWildcard: true, managed: true, parentHostname: true, tlsSecretName: true, tlsStatus: true, updatedAt: true, verificationStatus: true } }).execute(); - -// Create -const created = await db.hostnameBinding.create({ data: { domainId: '', hostname: '', isWildcard: '', managed: '', parentHostname: '', tlsSecretName: '', tlsStatus: '', verificationStatus: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.hostnameBinding.update({ where: { id: '' }, data: { domainId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.hostnameBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.identityProviderRegistry` CRUD operations for IdentityProviderRegistry records. @@ -1489,6 +1449,7 @@ CRUD operations for ManagedDomain records. | `domain` | String | Yes | | `id` | UUID | No | | `isWildcard` | Boolean | Yes | +| `publicPort` | Int | Yes | | `tlsReadyAt` | Datetime | Yes | | `tlsStatus` | String | Yes | | `updatedAt` | Datetime | No | @@ -1500,13 +1461,13 @@ CRUD operations for ManagedDomain records. ```typescript // List all managedDomain records -const items = await db.managedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const items = await db.managedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Get one by id -const item = await db.managedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const item = await db.managedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Create -const created = await db.managedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); +const created = await db.managedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); // Update const updated = await db.managedDomain.update({ where: { id: '' }, data: { allowPublicUsage: '' }, select: { id: true } }).execute(); @@ -2075,6 +2036,7 @@ CRUD operations for PlatformManagedDomain records. | `domain` | String | Yes | | `id` | UUID | No | | `isWildcard` | Boolean | Yes | +| `publicPort` | Int | Yes | | `tlsReadyAt` | Datetime | Yes | | `tlsStatus` | String | Yes | | `updatedAt` | Datetime | No | @@ -2086,13 +2048,13 @@ CRUD operations for PlatformManagedDomain records. ```typescript // List all platformManagedDomain records -const items = await db.platformManagedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const items = await db.platformManagedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Get one by id -const item = await db.platformManagedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const item = await db.platformManagedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Create -const created = await db.platformManagedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); +const created = await db.platformManagedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformManagedDomain.update({ where: { id: '' }, data: { allowPublicUsage: '' }, select: { id: true } }).execute(); @@ -2680,48 +2642,6 @@ const updated = await db.rlsSetting.update({ where: { id: '' }, data: { au const deleted = await db.rlsSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.routeBinding` - -CRUD operations for RouteBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `domainId` | UUID | Yes | -| `id` | UUID | No | -| `isActive` | Boolean | Yes | -| `method` | String | Yes | -| `path` | String | Yes | -| `priority` | Int | Yes | -| `servingSiteId` | UUID | Yes | -| `targetApiId` | UUID | Yes | -| `targetBucketId` | UUID | Yes | -| `targetFunctionId` | UUID | Yes | -| `targetRedirectId` | UUID | Yes | -| `targetServiceId` | UUID | Yes | -| `targetSiteId` | UUID | Yes | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all routeBinding records -const items = await db.routeBinding.findMany({ select: { domainId: true, id: true, isActive: true, method: true, path: true, priority: true, servingSiteId: true, targetApiId: true, targetBucketId: true, targetFunctionId: true, targetRedirectId: true, targetServiceId: true, targetSiteId: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.routeBinding.findOne({ id: '', select: { domainId: true, id: true, isActive: true, method: true, path: true, priority: true, servingSiteId: true, targetApiId: true, targetBucketId: true, targetFunctionId: true, targetRedirectId: true, targetServiceId: true, targetSiteId: true, updatedAt: true } }).execute(); - -// Create -const created = await db.routeBinding.create({ data: { domainId: '', isActive: '', method: '', path: '', priority: '', servingSiteId: '', targetApiId: '', targetBucketId: '', targetFunctionId: '', targetRedirectId: '', targetServiceId: '', targetSiteId: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.routeBinding.update({ where: { id: '' }, data: { domainId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.routeBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.route` CRUD operations for Route records. @@ -3527,6 +3447,7 @@ CRUD operations for UniqueConstraint records. | `initiallyDeferred` | Boolean | Yes | | `isDeferrable` | Boolean | Yes | | `name` | String | Yes | +| `nullsNotDistinct` | Boolean | Yes | | `smartTags` | JSON | Yes | | `tableId` | UUID | Yes | | `tags` | String | Yes | @@ -3538,13 +3459,13 @@ CRUD operations for UniqueConstraint records. ```typescript // List all uniqueConstraint records -const items = await db.uniqueConstraint.findMany({ select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); +const items = await db.uniqueConstraint.findMany({ select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); // Get one by id -const item = await db.uniqueConstraint.findOne({ id: '', select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); +const item = await db.uniqueConstraint.findOne({ id: '', select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); // Create -const created = await db.uniqueConstraint.create({ data: { category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }, select: { id: true } }).execute(); +const created = await db.uniqueConstraint.create({ data: { category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', nullsNotDistinct: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }, select: { id: true } }).execute(); // Update const updated = await db.uniqueConstraint.update({ where: { id: '' }, data: { category: '' }, select: { id: true } }).execute(); @@ -3816,6 +3737,17 @@ applyRegistryDefaults const result = await db.query.applyRegistryDefaults({ data: '', nodeType: '' }).execute(); ``` +### `db.query.emailSharedAccount` + +emailSharedAccount + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.emailSharedAccount().execute(); +``` + ### `db.query.getSitePreviewCommit` getSitePreviewCommit @@ -4099,6 +4031,21 @@ 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 @@ -4312,10 +4259,11 @@ const result = await db.mutation.platformSitesProvisionStaticSite({ input: '', 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 444db1275d..038b8785ac 100644 --- a/sdk/constructive-cli/src/api/orm/index.ts +++ b/sdk/constructive-cli/src/api/orm/index.ts @@ -34,7 +34,6 @@ import { ForeignKeyConstraintModel } from './models/foreignKeyConstraint'; import { FullTextSearchModel } from './models/fullTextSearch'; import { FunctionModel } from './models/function'; import { GetSitePreviewsRecordModel } from './models/getSitePreviewsRecord'; -import { HostnameBindingModel } from './models/hostnameBinding'; import { IdentityProviderRegistryModel } from './models/identityProviderRegistry'; import { IndexModel } from './models/index'; import { ListSuspendedDatabasesRecordModel } from './models/listSuspendedDatabasesRecord'; @@ -69,7 +68,6 @@ import { PrimaryKeyConstraintModel } from './models/primaryKeyConstraint'; import { PubkeySettingModel } from './models/pubkeySetting'; import { RedirectModel } from './models/redirect'; import { RlsSettingModel } from './models/rlsSetting'; -import { RouteBindingModel } from './models/routeBinding'; import { RouteModel } from './models/route'; import { SchemaModel } from './models/schema'; import { SchemaGrantModel } from './models/schemaGrant'; @@ -161,7 +159,6 @@ export function createClient(config: OrmClientConfig) { fullTextSearch: new FullTextSearchModel(client), function: new FunctionModel(client), getSitePreviewsRecord: new GetSitePreviewsRecordModel(client), - hostnameBinding: new HostnameBindingModel(client), identityProviderRegistry: new IdentityProviderRegistryModel(client), index: new IndexModel(client), listSuspendedDatabasesRecord: new ListSuspendedDatabasesRecordModel(client), @@ -196,7 +193,6 @@ export function createClient(config: OrmClientConfig) { pubkeySetting: new PubkeySettingModel(client), redirect: new RedirectModel(client), rlsSetting: new RlsSettingModel(client), - routeBinding: new RouteBindingModel(client), route: new RouteModel(client), schema: new SchemaModel(client), schemaGrant: new SchemaGrantModel(client), diff --git a/sdk/constructive-cli/src/api/orm/input-types.ts b/sdk/constructive-cli/src/api/orm/input-types.ts index ff96fdb8a4..f4e5da7908 100644 --- a/sdk/constructive-cli/src/api/orm/input-types.ts +++ b/sdk/constructive-cli/src/api/orm/input-types.ts @@ -824,28 +824,6 @@ export interface GetSitePreviewsRecord { commitId?: string | null; name?: string | null; } -/** Compiled hostname index maintained by domain sync triggers; read only through the resolver */ -export interface HostnameBinding { - /** Domain row this binding was compiled from */ - domainId?: string | null; - /** Lowercase hostname (exact or *.parent wildcard) */ - hostname?: string | null; - id: string; - /** Whether this binding is a wildcard claim */ - isWildcard?: boolean | null; - /** Whether the platform drives this hostname's lifecycle */ - managed?: boolean | null; - /** Parent hostname a wildcard binding covers */ - parentHostname?: string | null; - /** TLS secret name compiled from the domain row */ - tlsSecretName?: string | null; - /** Certificate lifecycle state compiled from the domain row */ - tlsStatus?: string | null; - /** When this binding was last recompiled */ - updatedAt?: string | null; - /** Ownership verification state compiled from the domain row */ - verificationStatus?: string | null; -} export interface IdentityProviderRegistry { authorizationUrl?: string | null; displayName?: string | null; @@ -900,6 +878,8 @@ export interface ManagedDomain { id: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean | null; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number | null; /** When TLS last became ready */ tlsReadyAt?: string | null; /** TLS provisioning state for this managed hostname */ @@ -1215,6 +1195,8 @@ export interface PlatformManagedDomain { id: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean | null; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number | null; /** When TLS last became ready */ tlsReadyAt?: string | null; /** TLS provisioning state for this managed hostname */ @@ -1518,36 +1500,6 @@ export interface RlsSetting { roleSchemaId?: string | null; updatedAt?: string | null; } -/** Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver */ -export interface RouteBinding { - /** Domain row the source route binds */ - domainId?: string | null; - id: string; - /** Active flag compiled from the source route */ - isActive?: boolean | null; - /** HTTP method this binding matches; NULL matches any method */ - method?: string | null; - /** Path prefix this binding matches */ - path?: string | null; - /** Priority compiled from the source route */ - priority?: number | null; - /** Site whose surface the source route serves; NULL when it serves no site */ - servingSiteId?: string | null; - /** Api catalog row the source route targets */ - targetApiId?: string | null; - /** Bucket catalog row the source route targets */ - targetBucketId?: string | null; - /** Function catalog row the source route targets */ - targetFunctionId?: string | null; - /** Redirect catalog row the source route targets */ - targetRedirectId?: string | null; - /** Resource catalog row (a Service resource) the source route targets */ - targetServiceId?: string | null; - /** Site catalog row the source route targets */ - targetSiteId?: string | null; - /** When this binding was last recompiled */ - updatedAt?: string | null; -} /** Routes binding a domain hostname and path to a typed catalog target */ export interface Route { /** Whether this route answers callers with no identity. Requires the target function to declare anonymous_callable; default false = an identity is required */ @@ -1917,6 +1869,7 @@ export interface UniqueConstraint { initiallyDeferred?: boolean | null; isDeferrable?: boolean | null; name?: string | null; + nullsNotDistinct?: boolean | null; smartTags?: Record | null; tableId?: string | null; tags?: string[] | null; @@ -2184,7 +2137,6 @@ export interface FunctionRelations { triggers?: ConnectionResult; } export interface GetSitePreviewsRecordRelations {} -export interface HostnameBindingRelations {} export interface IdentityProviderRegistryRelations {} export interface IndexRelations { database?: Database | null; @@ -2317,7 +2269,6 @@ export interface RlsSettingRelations { currentUserAgentFunction?: Function | null; roleSchema?: Schema | null; } -export interface RouteBindingRelations {} export interface RouteRelations { domain?: Domain | null; servingSite?: Site | null; @@ -2511,7 +2462,6 @@ export type FullTextSearchWithRelations = FullTextSearch & FullTextSearchRelatio export type FunctionWithRelations = Function & FunctionRelations; export type GetSitePreviewsRecordWithRelations = GetSitePreviewsRecord & GetSitePreviewsRecordRelations; -export type HostnameBindingWithRelations = HostnameBinding & HostnameBindingRelations; export type IdentityProviderRegistryWithRelations = IdentityProviderRegistry & IdentityProviderRegistryRelations; export type IndexWithRelations = Index & IndexRelations; @@ -2559,7 +2509,6 @@ export type PrimaryKeyConstraintWithRelations = PrimaryKeyConstraint & export type PubkeySettingWithRelations = PubkeySetting & PubkeySettingRelations; export type RedirectWithRelations = Redirect & RedirectRelations; export type RlsSettingWithRelations = RlsSetting & RlsSettingRelations; -export type RouteBindingWithRelations = RouteBinding & RouteBindingRelations; export type RouteWithRelations = Route & RouteRelations; export type SchemaWithRelations = Schema & SchemaRelations; export type SchemaGrantWithRelations = SchemaGrant & SchemaGrantRelations; @@ -3473,18 +3422,6 @@ export type GetSitePreviewsRecordSelect = { commitId?: boolean; name?: boolean; }; -export type HostnameBindingSelect = { - domainId?: boolean; - hostname?: boolean; - id?: boolean; - isWildcard?: boolean; - managed?: boolean; - parentHostname?: boolean; - tlsSecretName?: boolean; - tlsStatus?: boolean; - updatedAt?: boolean; - verificationStatus?: boolean; -}; export type IdentityProviderRegistrySelect = { authorizationUrl?: boolean; displayName?: boolean; @@ -3538,6 +3475,7 @@ export type ManagedDomainSelect = { domain?: boolean; id?: boolean; isWildcard?: boolean; + publicPort?: boolean; tlsReadyAt?: boolean; tlsStatus?: boolean; updatedAt?: boolean; @@ -3830,6 +3768,7 @@ export type PlatformManagedDomainSelect = { domain?: boolean; id?: boolean; isWildcard?: boolean; + publicPort?: boolean; tlsReadyAt?: boolean; tlsStatus?: boolean; updatedAt?: boolean; @@ -4176,22 +4115,6 @@ export type RlsSettingSelect = { select: SchemaSelect; }; }; -export type RouteBindingSelect = { - domainId?: boolean; - id?: boolean; - isActive?: boolean; - method?: boolean; - path?: boolean; - priority?: boolean; - servingSiteId?: boolean; - targetApiId?: boolean; - targetBucketId?: boolean; - targetFunctionId?: boolean; - targetRedirectId?: boolean; - targetServiceId?: boolean; - targetSiteId?: boolean; - updatedAt?: boolean; -}; export type RouteSelect = { anonymous?: boolean; config?: boolean; @@ -4821,6 +4744,7 @@ export type UniqueConstraintSelect = { initiallyDeferred?: boolean; isDeferrable?: boolean; name?: boolean; + nullsNotDistinct?: boolean; smartTags?: boolean; tableId?: boolean; tags?: boolean; @@ -6323,34 +6247,6 @@ export interface GetSitePreviewsRecordFilter { or?: GetSitePreviewsRecordFilter[]; not?: GetSitePreviewsRecordFilter; } -export interface HostnameBindingFilter { - /** Checks for all expressions in this list. */ - and?: HostnameBindingFilter[]; - /** Filter by the object’s `domainId` field. */ - domainId?: UUIDFilter; - /** Filter by the object’s `hostname` field. */ - hostname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isWildcard` field. */ - isWildcard?: BooleanFilter; - /** Filter by the object’s `managed` field. */ - managed?: BooleanFilter; - /** Negates the expression. */ - not?: HostnameBindingFilter; - /** Checks for any expressions in this list. */ - or?: HostnameBindingFilter[]; - /** Filter by the object’s `parentHostname` field. */ - parentHostname?: StringFilter; - /** Filter by the object’s `tlsSecretName` field. */ - tlsSecretName?: StringFilter; - /** Filter by the object’s `tlsStatus` field. */ - tlsStatus?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `verificationStatus` field. */ - verificationStatus?: StringFilter; -} export interface IdentityProviderRegistryFilter { /** Checks for all expressions in this list. */ and?: IdentityProviderRegistryFilter[]; @@ -6466,6 +6362,8 @@ export interface ManagedDomainFilter { not?: ManagedDomainFilter; /** Checks for any expressions in this list. */ or?: ManagedDomainFilter[]; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -6995,6 +6893,8 @@ export interface PlatformManagedDomainFilter { platformDomainVerificationsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainVerificationFilter; /** `platformDomainVerificationsByManagedDomainId` exist. */ platformDomainVerificationsByManagedDomainIdExist?: boolean; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -7574,42 +7474,6 @@ export interface RlsSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface RouteBindingFilter { - /** Checks for all expressions in this list. */ - and?: RouteBindingFilter[]; - /** Filter by the object’s `domainId` field. */ - domainId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isActive` field. */ - isActive?: BooleanFilter; - /** Filter by the object’s `method` field. */ - method?: StringFilter; - /** Negates the expression. */ - not?: RouteBindingFilter; - /** Checks for any expressions in this list. */ - or?: RouteBindingFilter[]; - /** Filter by the object’s `path` field. */ - path?: StringFilter; - /** Filter by the object’s `priority` field. */ - priority?: IntFilter; - /** Filter by the object’s `servingSiteId` field. */ - servingSiteId?: UUIDFilter; - /** Filter by the object’s `targetApiId` field. */ - targetApiId?: UUIDFilter; - /** Filter by the object’s `targetBucketId` field. */ - targetBucketId?: UUIDFilter; - /** Filter by the object’s `targetFunctionId` field. */ - targetFunctionId?: UUIDFilter; - /** Filter by the object’s `targetRedirectId` field. */ - targetRedirectId?: UUIDFilter; - /** Filter by the object’s `targetServiceId` field. */ - targetServiceId?: UUIDFilter; - /** Filter by the object’s `targetSiteId` field. */ - targetSiteId?: UUIDFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} export interface RouteFilter { /** Checks for all expressions in this list. */ and?: RouteFilter[]; @@ -8503,6 +8367,8 @@ export interface UniqueConstraintFilter { name?: StringFilter; /** Negates the expression. */ not?: UniqueConstraintFilter; + /** Filter by the object’s `nullsNotDistinct` field. */ + nullsNotDistinct?: BooleanFilter; /** Checks for any expressions in this list. */ or?: UniqueConstraintFilter[]; /** Filter by the object’s `smartTags` field. */ @@ -9671,30 +9537,6 @@ export type GetSitePreviewsRecordsOrderBy = | 'COMMIT_ID_DESC' | 'NAME_ASC' | 'NAME_DESC'; -export type HostnameBindingOrderBy = - | 'DOMAIN_ID_ASC' - | 'DOMAIN_ID_DESC' - | 'HOSTNAME_ASC' - | 'HOSTNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_WILDCARD_ASC' - | 'IS_WILDCARD_DESC' - | 'MANAGED_ASC' - | 'MANAGED_DESC' - | 'NATURAL' - | 'PARENT_HOSTNAME_ASC' - | 'PARENT_HOSTNAME_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'TLS_SECRET_NAME_ASC' - | 'TLS_SECRET_NAME_DESC' - | 'TLS_STATUS_ASC' - | 'TLS_STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'VERIFICATION_STATUS_ASC' - | 'VERIFICATION_STATUS_DESC'; export type IdentityProviderRegistryOrderBy = | 'AUTHORIZATION_URL_ASC' | 'AUTHORIZATION_URL_DESC' @@ -9791,6 +9633,8 @@ export type ManagedDomainOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PUBLIC_PORT_ASC' + | 'PUBLIC_PORT_DESC' | 'TLS_READY_AT_ASC' | 'TLS_READY_AT_DESC' | 'TLS_STATUS_ASC' @@ -10183,6 +10027,8 @@ export type PlatformManagedDomainOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PUBLIC_PORT_ASC' + | 'PUBLIC_PORT_DESC' | 'TLS_READY_AT_ASC' | 'TLS_READY_AT_DESC' | 'TLS_STATUS_ASC' @@ -10573,38 +10419,6 @@ export type RlsSettingOrderBy = | 'ROLE_SCHEMA_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type RouteBindingOrderBy = - | 'DOMAIN_ID_ASC' - | 'DOMAIN_ID_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_ACTIVE_ASC' - | 'IS_ACTIVE_DESC' - | 'METHOD_ASC' - | 'METHOD_DESC' - | 'NATURAL' - | 'PATH_ASC' - | 'PATH_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'PRIORITY_ASC' - | 'PRIORITY_DESC' - | 'SERVING_SITE_ID_ASC' - | 'SERVING_SITE_ID_DESC' - | 'TARGET_API_ID_ASC' - | 'TARGET_API_ID_DESC' - | 'TARGET_BUCKET_ID_ASC' - | 'TARGET_BUCKET_ID_DESC' - | 'TARGET_FUNCTION_ID_ASC' - | 'TARGET_FUNCTION_ID_DESC' - | 'TARGET_REDIRECT_ID_ASC' - | 'TARGET_REDIRECT_ID_DESC' - | 'TARGET_SERVICE_ID_ASC' - | 'TARGET_SERVICE_ID_DESC' - | 'TARGET_SITE_ID_ASC' - | 'TARGET_SITE_ID_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type RouteOrderBy = | 'ANONYMOUS_ASC' | 'ANONYMOUS_DESC' @@ -11159,6 +10973,8 @@ export type UniqueConstraintOrderBy = | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' + | 'NULLS_NOT_DISTINCT_ASC' + | 'NULLS_NOT_DISTINCT_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'SMART_TAGS_ASC' @@ -12418,38 +12234,6 @@ export interface DeleteGetSitePreviewsRecordInput { clientMutationId?: string; id: string; } -export interface CreateHostnameBindingInput { - clientMutationId?: string; - hostnameBinding: { - domainId: string; - hostname: string; - isWildcard?: boolean; - managed?: boolean; - parentHostname?: string; - tlsSecretName?: string; - tlsStatus?: string; - verificationStatus?: string; - }; -} -export interface HostnameBindingPatch { - domainId?: string | null; - hostname?: string | null; - isWildcard?: boolean | null; - managed?: boolean | null; - parentHostname?: string | null; - tlsSecretName?: string | null; - tlsStatus?: string | null; - verificationStatus?: string | null; -} -export interface UpdateHostnameBindingInput { - clientMutationId?: string; - id: string; - hostnameBindingPatch: HostnameBindingPatch; -} -export interface DeleteHostnameBindingInput { - clientMutationId?: string; - id: string; -} export interface CreateIdentityProviderRegistryInput { clientMutationId?: string; identityProviderRegistry: { @@ -12562,6 +12346,7 @@ export interface CreateManagedDomainInput { databaseId: string; domain: string; isWildcard?: boolean; + publicPort?: number; tlsReadyAt?: string; tlsStatus?: string; updatedByPrincipal?: string; @@ -12577,6 +12362,7 @@ export interface ManagedDomainPatch { databaseId?: string | null; domain?: string | null; isWildcard?: boolean | null; + publicPort?: number | null; tlsReadyAt?: string | null; tlsStatus?: string | null; updatedByPrincipal?: string | null; @@ -13057,6 +12843,7 @@ export interface CreatePlatformManagedDomainInput { createdByPrincipal?: string; domain: string; isWildcard?: boolean; + publicPort?: number; tlsReadyAt?: string; tlsStatus?: string; updatedByPrincipal?: string; @@ -13071,6 +12858,7 @@ export interface PlatformManagedDomainPatch { createdByPrincipal?: string | null; domain?: string | null; isWildcard?: boolean | null; + publicPort?: number | null; tlsReadyAt?: string | null; tlsStatus?: string | null; updatedByPrincipal?: string | null; @@ -13558,46 +13346,6 @@ export interface DeleteRlsSettingInput { clientMutationId?: string; id: string; } -export interface CreateRouteBindingInput { - clientMutationId?: string; - routeBinding: { - domainId: string; - isActive?: boolean; - method?: string; - path: string; - priority?: number; - servingSiteId?: string; - targetApiId?: string; - targetBucketId?: string; - targetFunctionId?: string; - targetRedirectId?: string; - targetServiceId?: string; - targetSiteId?: string; - }; -} -export interface RouteBindingPatch { - domainId?: string | null; - isActive?: boolean | null; - method?: string | null; - path?: string | null; - priority?: number | null; - servingSiteId?: string | null; - targetApiId?: string | null; - targetBucketId?: string | null; - targetFunctionId?: string | null; - targetRedirectId?: string | null; - targetServiceId?: string | null; - targetSiteId?: string | null; -} -export interface UpdateRouteBindingInput { - clientMutationId?: string; - id: string; - routeBindingPatch: RouteBindingPatch; -} -export interface DeleteRouteBindingInput { - clientMutationId?: string; - id: string; -} export interface CreateRouteInput { clientMutationId?: string; route: { @@ -14270,6 +14018,7 @@ export interface CreateUniqueConstraintInput { initiallyDeferred?: boolean; isDeferrable?: boolean; name?: string; + nullsNotDistinct?: boolean; smartTags?: Record; tableId: string; tags?: string[]; @@ -14285,6 +14034,7 @@ export interface UniqueConstraintPatch { initiallyDeferred?: boolean | null; isDeferrable?: boolean | null; name?: string | null; + nullsNotDistinct?: boolean | null; smartTags?: Record | null; tableId?: string | null; tags?: string[] | null; @@ -14673,6 +14423,15 @@ 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; @@ -14840,6 +14599,13 @@ 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. */ @@ -16435,28 +16201,6 @@ export interface FunctionInput { tags?: string[]; volatility?: string; } -/** An input for mutations affecting `HostnameBinding` */ -export interface HostnameBindingInput { - /** Domain row this binding was compiled from */ - domainId: string; - /** Lowercase hostname (exact or *.parent wildcard) */ - hostname: string; - id?: string; - /** Whether this binding is a wildcard claim */ - isWildcard?: boolean; - /** Whether the platform drives this hostname's lifecycle */ - managed?: boolean; - /** Parent hostname a wildcard binding covers */ - parentHostname?: string; - /** TLS secret name compiled from the domain row */ - tlsSecretName?: string; - /** Certificate lifecycle state compiled from the domain row */ - tlsStatus?: string; - /** When this binding was last recompiled */ - updatedAt?: string; - /** Ownership verification state compiled from the domain row */ - verificationStatus?: string; -} /** An input for mutations affecting `IdentityProviderRegistry` */ export interface IdentityProviderRegistryInput { authorizationUrl?: string; @@ -16506,6 +16250,8 @@ export interface ManagedDomainInput { id?: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number; /** When TLS last became ready */ tlsReadyAt?: string; /** TLS provisioning state for this managed hostname */ @@ -16819,6 +16565,8 @@ export interface PlatformManagedDomainInput { id?: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number; /** When TLS last became ready */ tlsReadyAt?: string; /** TLS provisioning state for this managed hostname */ @@ -17124,36 +16872,6 @@ export interface RlsSettingInput { roleSchemaId?: string; updatedAt?: string; } -/** An input for mutations affecting `RouteBinding` */ -export interface RouteBindingInput { - /** Domain row the source route binds */ - domainId: string; - id?: string; - /** Active flag compiled from the source route */ - isActive?: boolean; - /** HTTP method this binding matches; NULL matches any method */ - method?: string; - /** Path prefix this binding matches */ - path: string; - /** Priority compiled from the source route */ - priority?: number; - /** Site whose surface the source route serves; NULL when it serves no site */ - servingSiteId?: string; - /** Api catalog row the source route targets */ - targetApiId?: string; - /** Bucket catalog row the source route targets */ - targetBucketId?: string; - /** Function catalog row the source route targets */ - targetFunctionId?: string; - /** Redirect catalog row the source route targets */ - targetRedirectId?: string; - /** Resource catalog row (a Service resource) the source route targets */ - targetServiceId?: string; - /** Site catalog row the source route targets */ - targetSiteId?: string; - /** When this binding was last recompiled */ - updatedAt?: string; -} /** An input for mutations affecting `Route` */ export interface RouteInput { /** Whether this route answers callers with no identity. Requires the target function to declare anonymous_callable; default false = an identity is required */ @@ -17518,6 +17236,7 @@ export interface UniqueConstraintInput { initiallyDeferred?: boolean; isDeferrable?: boolean; name?: string; + nullsNotDistinct?: boolean; smartTags?: Record; tableId: string; tags?: string[]; @@ -19002,6 +18721,8 @@ export interface UniqueConstraintFilter { name?: StringFilter; /** Negates the expression. */ not?: UniqueConstraintFilter; + /** Filter by the object’s `nullsNotDistinct` field. */ + nullsNotDistinct?: BooleanFilter; /** Checks for any expressions in this list. */ or?: UniqueConstraintFilter[]; /** Filter by the object’s `smartTags` field. */ @@ -20540,6 +20261,8 @@ export interface ManagedDomainFilter { not?: ManagedDomainFilter; /** Checks for any expressions in this list. */ or?: ManagedDomainFilter[]; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -20832,6 +20555,8 @@ export interface PlatformManagedDomainFilter { platformDomainVerificationsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainVerificationFilter; /** `platformDomainVerificationsByManagedDomainId` exist. */ platformDomainVerificationsByManagedDomainIdExist?: boolean; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -21404,6 +21129,21 @@ 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; } @@ -21539,19 +21279,19 @@ export type PlatformSitesProvisionStaticSitePayloadSelect = { }; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface ProvisionSitePreviewPayload { clientMutationId?: string | null; @@ -21671,6 +21411,21 @@ 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; @@ -22841,36 +22596,6 @@ 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. */ @@ -22886,51 +22611,6 @@ export type DeleteFunctionPayloadSelect = { select: FunctionEdgeSelect; }; }; -export interface CreateHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was created by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} -export type CreateHostnameBindingPayloadSelect = { - clientMutationId?: boolean; - hostnameBinding?: { - select: HostnameBindingSelect; - }; - hostnameBindingEdge?: { - select: HostnameBindingEdgeSelect; - }; -}; -export interface UpdateHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was updated by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} -export type UpdateHostnameBindingPayloadSelect = { - clientMutationId?: boolean; - hostnameBinding?: { - select: HostnameBindingSelect; - }; - hostnameBindingEdge?: { - select: HostnameBindingEdgeSelect; - }; -}; -export interface DeleteHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was deleted by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} -export type DeleteHostnameBindingPayloadSelect = { - clientMutationId?: boolean; - hostnameBinding?: { - select: HostnameBindingSelect; - }; - hostnameBindingEdge?: { - select: HostnameBindingEdgeSelect; - }; -}; export interface CreateIdentityProviderRegistryPayload { clientMutationId?: string | null; /** The `IdentityProviderRegistry` that was created by this mutation. */ @@ -24371,51 +24051,6 @@ export type DeleteRlsSettingPayloadSelect = { select: RlsSettingEdgeSelect; }; }; -export interface CreateRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was created by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} -export type CreateRouteBindingPayloadSelect = { - clientMutationId?: boolean; - routeBinding?: { - select: RouteBindingSelect; - }; - routeBindingEdge?: { - select: RouteBindingEdgeSelect; - }; -}; -export interface UpdateRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was updated by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} -export type UpdateRouteBindingPayloadSelect = { - clientMutationId?: boolean; - routeBinding?: { - select: RouteBindingSelect; - }; - routeBindingEdge?: { - select: RouteBindingEdgeSelect; - }; -}; -export interface DeleteRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was deleted by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} -export type DeleteRouteBindingPayloadSelect = { - clientMutationId?: boolean; - routeBinding?: { - select: RouteBindingSelect; - }; - routeBindingEdge?: { - select: RouteBindingEdgeSelect; - }; -}; export interface CreateRoutePayload { clientMutationId?: string | null; /** The `Route` that was created by this mutation. */ @@ -25586,6 +25221,18 @@ 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; @@ -26078,30 +25725,6 @@ 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 `HostnameBinding` edge in the connection. */ -export interface HostnameBindingEdge { - cursor?: string | null; - /** The `HostnameBinding` at the end of the edge. */ - node?: HostnameBinding | null; -} -export type HostnameBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: HostnameBindingSelect; - }; -}; /** A `IdentityProviderRegistry` edge in the connection. */ export interface IdentityProviderRegistryEdge { cursor?: string | null; @@ -26462,18 +26085,6 @@ export type RlsSettingEdgeSelect = { select: RlsSettingSelect; }; }; -/** A `RouteBinding` edge in the connection. */ -export interface RouteBindingEdge { - cursor?: string | null; - /** The `RouteBinding` at the end of the edge. */ - node?: RouteBinding | null; -} -export type RouteBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: RouteBindingSelect; - }; -}; /** A `Schema` edge in the connection. */ export interface SchemaEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/api/orm/models/hostnameBinding.ts b/sdk/constructive-cli/src/api/orm/models/hostnameBinding.ts deleted file mode 100644 index f720f177ad..0000000000 --- a/sdk/constructive-cli/src/api/orm/models/hostnameBinding.ts +++ /dev/null @@ -1,245 +0,0 @@ -/** - * HostnameBinding 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 { - HostnameBinding, - HostnameBindingWithRelations, - HostnameBindingSelect, - HostnameBindingFilter, - HostnameBindingOrderBy, - CreateHostnameBindingInput, - UpdateHostnameBindingInput, - HostnameBindingPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class HostnameBindingModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - hostnameBindings: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'HostnameBinding', - 'hostnameBindings', - 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, - }, - 'HostnameBindingFilter', - 'HostnameBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'HostnameBinding', - fieldName: 'hostnameBindings', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - hostnameBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'HostnameBinding', - 'hostnameBindings', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'HostnameBindingFilter', - 'HostnameBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'HostnameBinding', - fieldName: 'hostnameBinding', - document, - variables, - transform: (data: { - hostnameBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - hostnameBinding: data.hostnameBindings?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - hostnameBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'HostnameBinding', - 'hostnameBindings', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'HostnameBindingFilter', - 'HostnameBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'HostnameBinding', - fieldName: 'hostnameBinding', - document, - variables, - transform: (data: { - hostnameBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - hostnameBinding: data.hostnameBindings?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'HostnameBinding', - 'createHostnameBinding', - 'hostnameBinding', - args.select, - args.data, - 'CreateHostnameBindingInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'HostnameBinding', - fieldName: 'createHostnameBinding', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - HostnameBindingPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'HostnameBinding', - 'updateHostnameBinding', - 'hostnameBinding', - args.select, - args.where.id, - args.data, - 'UpdateHostnameBindingInput', - 'id', - 'hostnameBindingPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'HostnameBinding', - fieldName: 'updateHostnameBinding', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'HostnameBinding', - 'deleteHostnameBinding', - 'hostnameBinding', - { - id: args.where.id, - }, - 'DeleteHostnameBindingInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'HostnameBinding', - fieldName: 'deleteHostnameBinding', - document, - variables, - }); - } -} diff --git a/sdk/constructive-cli/src/api/orm/models/index.ts b/sdk/constructive-cli/src/api/orm/models/index.ts index 0ef42de592..207f507c84 100644 --- a/sdk/constructive-cli/src/api/orm/models/index.ts +++ b/sdk/constructive-cli/src/api/orm/models/index.ts @@ -32,7 +32,6 @@ export { ForeignKeyConstraintModel } from './foreignKeyConstraint'; export { FullTextSearchModel } from './fullTextSearch'; export { FunctionModel } from './function'; export { GetSitePreviewsRecordModel } from './getSitePreviewsRecord'; -export { HostnameBindingModel } from './hostnameBinding'; export { IdentityProviderRegistryModel } from './identityProviderRegistry'; export { IndexModel } from './indexModel'; export { ListSuspendedDatabasesRecordModel } from './listSuspendedDatabasesRecord'; @@ -67,7 +66,6 @@ export { PrimaryKeyConstraintModel } from './primaryKeyConstraint'; export { PubkeySettingModel } from './pubkeySetting'; export { RedirectModel } from './redirect'; export { RlsSettingModel } from './rlsSetting'; -export { RouteBindingModel } from './routeBinding'; export { RouteModel } from './route'; export { SchemaModel } from './schema'; export { SchemaGrantModel } from './schemaGrant'; diff --git a/sdk/constructive-cli/src/api/orm/models/routeBinding.ts b/sdk/constructive-cli/src/api/orm/models/routeBinding.ts deleted file mode 100644 index 3389ee7e37..0000000000 --- a/sdk/constructive-cli/src/api/orm/models/routeBinding.ts +++ /dev/null @@ -1,245 +0,0 @@ -/** - * RouteBinding 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 { - RouteBinding, - RouteBindingWithRelations, - RouteBindingSelect, - RouteBindingFilter, - RouteBindingOrderBy, - CreateRouteBindingInput, - UpdateRouteBindingInput, - RouteBindingPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class RouteBindingModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - routeBindings: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'RouteBinding', - 'routeBindings', - 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, - }, - 'RouteBindingFilter', - 'RouteBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'RouteBinding', - fieldName: 'routeBindings', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - routeBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'RouteBinding', - 'routeBindings', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'RouteBindingFilter', - 'RouteBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'RouteBinding', - fieldName: 'routeBinding', - document, - variables, - transform: (data: { - routeBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - routeBinding: data.routeBindings?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - routeBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'RouteBinding', - 'routeBindings', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'RouteBindingFilter', - 'RouteBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'RouteBinding', - fieldName: 'routeBinding', - document, - variables, - transform: (data: { - routeBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - routeBinding: data.routeBindings?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createRouteBinding: { - routeBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'RouteBinding', - 'createRouteBinding', - 'routeBinding', - args.select, - args.data, - 'CreateRouteBindingInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'RouteBinding', - fieldName: 'createRouteBinding', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - RouteBindingPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateRouteBinding: { - routeBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'RouteBinding', - 'updateRouteBinding', - 'routeBinding', - args.select, - args.where.id, - args.data, - 'UpdateRouteBindingInput', - 'id', - 'routeBindingPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'RouteBinding', - fieldName: 'updateRouteBinding', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteRouteBinding: { - routeBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'RouteBinding', - 'deleteRouteBinding', - 'routeBinding', - { - id: args.where.id, - }, - 'DeleteRouteBindingInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'RouteBinding', - fieldName: 'deleteRouteBinding', - 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 e38f6845a3..0afacc078c 100644 --- a/sdk/constructive-cli/src/api/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/api/orm/mutation/index.ts @@ -10,6 +10,7 @@ import type { AcceptDatabaseTransferInput, ApplyRlsInput, CancelDatabaseTransferInput, + CreateFunctionFromSourceInput, DeleteSitePreviewInput, DomainsAssignSubdomainInput, MintSitePreviewTokenInput, @@ -36,9 +37,11 @@ import type { SitesProvisionStaticSiteInput, SuspendDatabaseInput, UnsuspendDatabaseInput, + UpdateFunctionFromSourceInput, AcceptDatabaseTransferPayload, ApplyRlsPayload, CancelDatabaseTransferPayload, + CreateFunctionPayload, DeleteSitePreviewPayload, DomainsAssignSubdomainPayload, MintSitePreviewTokenPayload, @@ -65,9 +68,11 @@ import type { SitesProvisionStaticSitePayload, SuspendDatabasePayload, UnsuspendDatabasePayload, + UpdateFunctionPayload, AcceptDatabaseTransferPayloadSelect, ApplyRlsPayloadSelect, CancelDatabaseTransferPayloadSelect, + CreateFunctionPayloadSelect, DeleteSitePreviewPayloadSelect, DomainsAssignSubdomainPayloadSelect, MintSitePreviewTokenPayloadSelect, @@ -94,6 +99,7 @@ import type { SitesProvisionStaticSitePayloadSelect, SuspendDatabasePayloadSelect, UnsuspendDatabasePayloadSelect, + UpdateFunctionPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface AcceptDatabaseTransferVariables { @@ -105,6 +111,13 @@ 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; } @@ -150,10 +163,11 @@ export interface PlatformSitesProvisionStaticSiteVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; @@ -202,6 +216,13 @@ 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: ( @@ -291,6 +312,35 @@ 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: { @@ -1063,5 +1113,34 @@ 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 0c2a655e71..12ea7b4e72 100644 --- a/sdk/constructive-cli/src/api/orm/query/index.ts +++ b/sdk/constructive-cli/src/api/orm/query/index.ts @@ -137,6 +137,25 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + emailSharedAccount: (options?: { select?: Record }) => + new QueryBuilder<{ + emailSharedAccount: unknown | null; + }>({ + client, + operation: 'query', + operationName: 'EmailSharedAccount', + fieldName: 'emailSharedAccount', + ...buildCustomDocument( + 'query', + 'EmailSharedAccount', + 'emailSharedAccount', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), getSitePreviewCommit: ( args: GetSitePreviewCommitVariables, options?: { diff --git a/sdk/constructive-cli/src/auth/cli/README.md b/sdk/constructive-cli/src/auth/cli/README.md index cec7ef1151..d9ee9099f5 100644 --- a/sdk/constructive-cli/src/auth/cli/README.md +++ b/sdk/constructive-cli/src/auth/cli/README.md @@ -72,10 +72,11 @@ csdk auth set-token | `link-identity` | linkIdentity | | `mint-access-token` | mintAccessToken | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `refresh-access-token` | refreshAccessToken | | `request-cross-origin-token` | requestCrossOriginToken | | `request-magic-link` | requestMagicLink | @@ -975,10 +976,11 @@ mintAccessToken ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** @@ -1026,6 +1028,7 @@ requestMagicLink |----------|------| | `--input.clientMutationId` | String | | `--input.email` | String | + | `--input.next` | String | ### `reset-password` @@ -1276,13 +1279,10 @@ signUp | Argument | Type | |----------|------| | `--input.clientMutationId` | String | - | `--input.credentialKind` | String | | `--input.csrfToken` | String | - | `--input.deviceToken` | String | | `--input.email` | String | | `--input.inviteToken` | String | | `--input.password` | String | - | `--input.rememberMe` | Boolean | ### `sign-up-magic-link` diff --git a/sdk/constructive-cli/src/auth/cli/commands.ts b/sdk/constructive-cli/src/auth/cli/commands.ts index d80dec1f69..15a3a321e7 100644 --- a/sdk/constructive-cli/src/auth/cli/commands.ts +++ b/sdk/constructive-cli/src/auth/cli/commands.ts @@ -170,7 +170,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.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\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 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"; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/auth/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/auth/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/auth/orm/README.md b/sdk/constructive-cli/src/auth/orm/README.md index 3943dd4aac..6e93f55c69 100644 --- a/sdk/constructive-cli/src/auth/orm/README.md +++ b/sdk/constructive-cli/src/auth/orm/README.md @@ -1025,10 +1025,11 @@ const result = await db.mutation.mintAccessToken({ input: { accessTtl: '' } }).execute(); +const result = await db.mutation.requestMagicLink({ input: { email: '', next: '' } }).execute(); ``` ### `db.mutation.resetPassword` @@ -1368,7 +1369,7 @@ signUp | `input` | SignUpInput (required) | ```typescript -const result = await db.mutation.signUp({ input: '' }).execute(); +const result = await db.mutation.signUp({ input: { csrfToken: '', email: '', inviteToken: '', password: '' } }).execute(); ``` ### `db.mutation.signUpMagicLink` diff --git a/sdk/constructive-cli/src/auth/orm/input-types.ts b/sdk/constructive-cli/src/auth/orm/input-types.ts index 82e2d1a346..1289140d59 100644 --- a/sdk/constructive-cli/src/auth/orm/input-types.ts +++ b/sdk/constructive-cli/src/auth/orm/input-types.ts @@ -2168,6 +2168,7 @@ export interface RequestCrossOriginTokenInput { export interface RequestMagicLinkInput { clientMutationId?: string; email?: string; + next?: string; } export interface ResetPasswordInput { clientMutationId?: string; @@ -2266,13 +2267,10 @@ export interface SignOutInput { } export interface SignUpInput { clientMutationId?: string; - credentialKind?: string; csrfToken?: string; - deviceToken?: string; email?: string; inviteToken?: string; password?: string; - rememberMe?: boolean; } export interface SignUpMagicLinkInput { clientMutationId?: string; @@ -3847,19 +3845,19 @@ export type MintAccessTokenPayloadSelect = { }; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface RefreshAccessTokenPayload { clientMutationId?: string | null; @@ -4037,13 +4035,9 @@ export type SignOutPayloadSelect = { }; export interface SignUpPayload { clientMutationId?: string | null; - result?: SignUpRecord | null; } export type SignUpPayloadSelect = { clientMutationId?: boolean; - result?: { - select: SignUpRecordSelect; - }; }; export interface SignUpMagicLinkPayload { clientMutationId?: string | null; @@ -4684,24 +4678,6 @@ export type SignInSmsOtpRecordSelect = { outDeviceToken?: boolean; userId?: boolean; }; -export interface SignUpRecord { - accessToken?: string | null; - accessTokenExpiresAt?: string | null; - id?: string | null; - isVerified?: boolean | null; - outDeviceToken?: string | null; - totpEnabled?: boolean | null; - userId?: string | null; -} -export type SignUpRecordSelect = { - accessToken?: boolean; - accessTokenExpiresAt?: boolean; - id?: boolean; - isVerified?: boolean; - outDeviceToken?: boolean; - totpEnabled?: boolean; - userId?: boolean; -}; export interface SignUpMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; diff --git a/sdk/constructive-cli/src/auth/orm/mutation/index.ts b/sdk/constructive-cli/src/auth/orm/mutation/index.ts index 855a8a7466..39394d78e4 100644 --- a/sdk/constructive-cli/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/auth/orm/mutation/index.ts @@ -249,10 +249,11 @@ export interface MintAccessTokenVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-cli/src/compute/cli/README.md b/sdk/constructive-cli/src/compute/cli/README.md index a2dd3ec78b..bd769d9599 100644 --- a/sdk/constructive-cli/src/compute/cli/README.md +++ b/sdk/constructive-cli/src/compute/cli/README.md @@ -203,10 +203,11 @@ csdk auth set-token | `platform-resource-installations-uninstall` | platformResourceInstallationsUninstall | | `platform-resource-installations-upgrade` | platformResourceInstallationsUpgrade | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `resource-installations-install` | resourceInstallationsInstall | | `resource-installations-rollback` | resourceInstallationsRollback | | `resource-installations-uninstall` | resourceInstallationsUninstall | @@ -1334,18 +1335,20 @@ CRUD operations for FunctionInvocation records. | `graphExecutionId` | UUID | | `id` | UUID | | `jobId` | BigInt | +| `jobKey` | String | | `organizationId` | UUID | | `parentInvocationId` | UUID | | `payload` | JSON | | `principalId` | UUID | | `provenance` | JSON | +| `queueName` | String | | `result` | JSON | | `startedAt` | Datetime | | `status` | String | | `taskIdentifier` | String | **Required create fields:** `channel`, `databaseId`, `taskIdentifier` -**Optional create fields (backend defaults):** `actorId`, `apiBindingId`, `completedAt`, `createdByPrincipal`, `definitionScope`, `durationMs`, `entityId`, `entityType`, `error`, `functionDefinitionId`, `graphExecutionId`, `jobId`, `organizationId`, `parentInvocationId`, `payload`, `principalId`, `provenance`, `result`, `startedAt`, `status` +**Optional create fields (backend defaults):** `actorId`, `apiBindingId`, `completedAt`, `createdByPrincipal`, `definitionScope`, `durationMs`, `entityId`, `entityType`, `error`, `functionDefinitionId`, `graphExecutionId`, `jobId`, `jobKey`, `organizationId`, `parentInvocationId`, `payload`, `principalId`, `provenance`, `queueName`, `result`, `startedAt`, `status` ### `function-schedule` @@ -2114,18 +2117,20 @@ CRUD operations for PlatformFunctionInvocation records. | `graphExecutionId` | UUID | | `id` | UUID | | `jobId` | BigInt | +| `jobKey` | String | | `organizationId` | UUID | | `parentInvocationId` | UUID | | `payload` | JSON | | `principalId` | UUID | | `provenance` | JSON | +| `queueName` | String | | `result` | JSON | | `startedAt` | Datetime | | `status` | String | | `taskIdentifier` | String | **Required create fields:** `channel`, `taskIdentifier` -**Optional create fields (backend defaults):** `actorId`, `apiBindingId`, `completedAt`, `createdByPrincipal`, `databaseId`, `definitionScope`, `durationMs`, `entityId`, `entityType`, `error`, `functionDefinitionId`, `graphExecutionId`, `jobId`, `organizationId`, `parentInvocationId`, `payload`, `principalId`, `provenance`, `result`, `startedAt`, `status` +**Optional create fields (backend defaults):** `actorId`, `apiBindingId`, `completedAt`, `createdByPrincipal`, `databaseId`, `definitionScope`, `durationMs`, `entityId`, `entityType`, `error`, `functionDefinitionId`, `graphExecutionId`, `jobId`, `jobKey`, `organizationId`, `parentInvocationId`, `payload`, `principalId`, `provenance`, `queueName`, `result`, `startedAt`, `status` ### `platform-function-schedule` @@ -6050,10 +6055,11 @@ platformResourceInstallationsUpgrade ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/compute/cli/commands.ts b/sdk/constructive-cli/src/compute/cli/commands.ts index 23138afa36..78aee3f9d0 100644 --- a/sdk/constructive-cli/src/compute/cli/commands.ts +++ b/sdk/constructive-cli/src/compute/cli/commands.ts @@ -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.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\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 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"; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/compute/cli/commands/function-invocation.ts b/sdk/constructive-cli/src/compute/cli/commands/function-invocation.ts index bb33451f00..68bf38f43b 100644 --- a/sdk/constructive-cli/src/compute/cli/commands/function-invocation.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/function-invocation.ts @@ -32,11 +32,13 @@ const fieldSchema: FieldSchema = { graphExecutionId: 'uuid', id: 'uuid', jobId: 'int', + jobKey: 'string', organizationId: 'uuid', parentInvocationId: 'uuid', payload: 'json', principalId: 'uuid', provenance: 'json', + queueName: 'string', result: 'json', startedAt: 'string', status: 'string', @@ -109,11 +111,13 @@ async function handleList(argv: Partial>, _prompter: Inq graphExecutionId: true, id: true, jobId: true, + jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, + queueName: true, result: true, startedAt: true, status: true, @@ -158,11 +162,13 @@ async function handleFindFirst(argv: Partial>, _prompter graphExecutionId: true, id: true, jobId: true, + jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, + queueName: true, result: true, startedAt: true, status: true, @@ -219,11 +225,13 @@ async function handleGet(argv: Partial>, prompter: Inqui graphExecutionId: true, id: true, jobId: true, + jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, + queueName: true, result: true, startedAt: true, status: true, @@ -339,6 +347,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'jobKey', + message: 'jobKey', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'organizationId', @@ -374,6 +389,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'queueName', + message: 'queueName', + required: false, + skipPrompt: true, + }, { type: 'json', name: 'result', @@ -425,11 +447,13 @@ async function handleCreate(argv: Partial>, prompter: In functionDefinitionId: cleanedData.functionDefinitionId, graphExecutionId: cleanedData.graphExecutionId, jobId: cleanedData.jobId, + jobKey: cleanedData.jobKey, organizationId: cleanedData.organizationId, parentInvocationId: cleanedData.parentInvocationId, payload: cleanedData.payload, principalId: cleanedData.principalId, provenance: cleanedData.provenance, + queueName: cleanedData.queueName, result: cleanedData.result, startedAt: cleanedData.startedAt, status: cleanedData.status, @@ -452,11 +476,13 @@ async function handleCreate(argv: Partial>, prompter: In graphExecutionId: true, id: true, jobId: true, + jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, + queueName: true, result: true, startedAt: true, status: true, @@ -584,6 +610,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'jobKey', + message: 'jobKey', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'organizationId', @@ -619,6 +652,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'queueName', + message: 'queueName', + required: false, + skipPrompt: true, + }, { type: 'json', name: 'result', @@ -671,11 +711,13 @@ async function handleUpdate(argv: Partial>, prompter: In functionDefinitionId: cleanedData.functionDefinitionId, graphExecutionId: cleanedData.graphExecutionId, jobId: cleanedData.jobId, + jobKey: cleanedData.jobKey, organizationId: cleanedData.organizationId, parentInvocationId: cleanedData.parentInvocationId, payload: cleanedData.payload, principalId: cleanedData.principalId, provenance: cleanedData.provenance, + queueName: cleanedData.queueName, result: cleanedData.result, startedAt: cleanedData.startedAt, status: cleanedData.status, @@ -698,11 +740,13 @@ async function handleUpdate(argv: Partial>, prompter: In graphExecutionId: true, id: true, jobId: true, + jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, + queueName: true, result: true, startedAt: true, status: true, diff --git a/sdk/constructive-cli/src/compute/cli/commands/platform-function-invocation.ts b/sdk/constructive-cli/src/compute/cli/commands/platform-function-invocation.ts index ccdab0b105..91332083c7 100644 --- a/sdk/constructive-cli/src/compute/cli/commands/platform-function-invocation.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/platform-function-invocation.ts @@ -32,11 +32,13 @@ const fieldSchema: FieldSchema = { graphExecutionId: 'uuid', id: 'uuid', jobId: 'int', + jobKey: 'string', organizationId: 'uuid', parentInvocationId: 'uuid', payload: 'json', principalId: 'uuid', provenance: 'json', + queueName: 'string', result: 'json', startedAt: 'string', status: 'string', @@ -109,11 +111,13 @@ async function handleList(argv: Partial>, _prompter: Inq graphExecutionId: true, id: true, jobId: true, + jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, + queueName: true, result: true, startedAt: true, status: true, @@ -158,11 +162,13 @@ async function handleFindFirst(argv: Partial>, _prompter graphExecutionId: true, id: true, jobId: true, + jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, + queueName: true, result: true, startedAt: true, status: true, @@ -219,11 +225,13 @@ async function handleGet(argv: Partial>, prompter: Inqui graphExecutionId: true, id: true, jobId: true, + jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, + queueName: true, result: true, startedAt: true, status: true, @@ -340,6 +348,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'jobKey', + message: 'jobKey', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'organizationId', @@ -375,6 +390,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'queueName', + message: 'queueName', + required: false, + skipPrompt: true, + }, { type: 'json', name: 'result', @@ -426,11 +448,13 @@ async function handleCreate(argv: Partial>, prompter: In functionDefinitionId: cleanedData.functionDefinitionId, graphExecutionId: cleanedData.graphExecutionId, jobId: cleanedData.jobId, + jobKey: cleanedData.jobKey, organizationId: cleanedData.organizationId, parentInvocationId: cleanedData.parentInvocationId, payload: cleanedData.payload, principalId: cleanedData.principalId, provenance: cleanedData.provenance, + queueName: cleanedData.queueName, result: cleanedData.result, startedAt: cleanedData.startedAt, status: cleanedData.status, @@ -453,11 +477,13 @@ async function handleCreate(argv: Partial>, prompter: In graphExecutionId: true, id: true, jobId: true, + jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, + queueName: true, result: true, startedAt: true, status: true, @@ -586,6 +612,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'jobKey', + message: 'jobKey', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'organizationId', @@ -621,6 +654,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'queueName', + message: 'queueName', + required: false, + skipPrompt: true, + }, { type: 'json', name: 'result', @@ -673,11 +713,13 @@ async function handleUpdate(argv: Partial>, prompter: In functionDefinitionId: cleanedData.functionDefinitionId, graphExecutionId: cleanedData.graphExecutionId, jobId: cleanedData.jobId, + jobKey: cleanedData.jobKey, organizationId: cleanedData.organizationId, parentInvocationId: cleanedData.parentInvocationId, payload: cleanedData.payload, principalId: cleanedData.principalId, provenance: cleanedData.provenance, + queueName: cleanedData.queueName, result: cleanedData.result, startedAt: cleanedData.startedAt, status: cleanedData.status, @@ -700,11 +742,13 @@ async function handleUpdate(argv: Partial>, prompter: In graphExecutionId: true, id: true, jobId: true, + jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, + queueName: true, result: true, startedAt: true, status: true, diff --git a/sdk/constructive-cli/src/compute/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/compute/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/compute/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/compute/orm/README.md b/sdk/constructive-cli/src/compute/orm/README.md index 59b61e3661..68d50bcb97 100644 --- a/sdk/constructive-cli/src/compute/orm/README.md +++ b/sdk/constructive-cli/src/compute/orm/README.md @@ -1435,11 +1435,13 @@ CRUD operations for FunctionInvocation records. | `graphExecutionId` | UUID | Yes | | `id` | UUID | No | | `jobId` | BigInt | Yes | +| `jobKey` | String | Yes | | `organizationId` | UUID | Yes | | `parentInvocationId` | UUID | Yes | | `payload` | JSON | Yes | | `principalId` | UUID | Yes | | `provenance` | JSON | Yes | +| `queueName` | String | Yes | | `result` | JSON | Yes | | `startedAt` | Datetime | Yes | | `status` | String | Yes | @@ -1449,13 +1451,13 @@ CRUD operations for FunctionInvocation records. ```typescript // List all functionInvocation records -const items = await db.functionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const items = await db.functionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Get one by id -const item = await db.functionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const item = await db.functionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Create -const created = await db.functionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); +const created = await db.functionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionInvocation.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -2378,11 +2380,13 @@ CRUD operations for PlatformFunctionInvocation records. | `graphExecutionId` | UUID | Yes | | `id` | UUID | No | | `jobId` | BigInt | Yes | +| `jobKey` | String | Yes | | `organizationId` | UUID | Yes | | `parentInvocationId` | UUID | Yes | | `payload` | JSON | Yes | | `principalId` | UUID | Yes | | `provenance` | JSON | Yes | +| `queueName` | String | Yes | | `result` | JSON | Yes | | `startedAt` | Datetime | Yes | | `status` | String | Yes | @@ -2392,13 +2396,13 @@ CRUD operations for PlatformFunctionInvocation records. ```typescript // List all platformFunctionInvocation records -const items = await db.platformFunctionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const items = await db.platformFunctionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Get one by id -const item = await db.platformFunctionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const item = await db.platformFunctionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Create -const created = await db.platformFunctionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionInvocation.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -6206,10 +6210,11 @@ const result = await db.mutation.platformResourceInstallationsUpgrade({ input: { ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/compute/orm/input-types.ts b/sdk/constructive-cli/src/compute/orm/input-types.ts index 141f6826bd..c4f3a14a61 100644 --- a/sdk/constructive-cli/src/compute/orm/input-types.ts +++ b/sdk/constructive-cli/src/compute/orm/input-types.ts @@ -1124,6 +1124,8 @@ export interface FunctionInvocation { id: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string | null; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string | null; /** Organization identity propagated with the invocation */ organizationId?: string | null; /** Parent invocation when this is a child node of a flow graph execution */ @@ -1134,6 +1136,8 @@ export interface FunctionInvocation { principalId?: string | null; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record | null; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string | null; /** Function return value (success) or structured error (failure) */ result?: Record | null; /** When execution started */ @@ -1738,6 +1742,8 @@ export interface PlatformFunctionInvocation { id: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string | null; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string | null; /** Organization identity propagated with the invocation */ organizationId?: string | null; /** Parent invocation when this is a child node of a flow graph execution */ @@ -1748,6 +1754,8 @@ export interface PlatformFunctionInvocation { principalId?: string | null; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record | null; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string | null; /** Function return value (success) or structured error (failure) */ result?: Record | null; /** When execution started */ @@ -4695,11 +4703,13 @@ export type FunctionInvocationSelect = { graphExecutionId?: boolean; id?: boolean; jobId?: boolean; + jobKey?: boolean; organizationId?: boolean; parentInvocationId?: boolean; payload?: boolean; principalId?: boolean; provenance?: boolean; + queueName?: boolean; result?: boolean; startedAt?: boolean; status?: boolean; @@ -5154,11 +5164,13 @@ export type PlatformFunctionInvocationSelect = { graphExecutionId?: boolean; id?: boolean; jobId?: boolean; + jobKey?: boolean; organizationId?: boolean; parentInvocationId?: boolean; payload?: boolean; principalId?: boolean; provenance?: boolean; + queueName?: boolean; result?: boolean; startedAt?: boolean; status?: boolean; @@ -7983,6 +7995,8 @@ export interface FunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: FunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -7997,6 +8011,8 @@ export interface FunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -8835,6 +8851,8 @@ export interface PlatformFunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: PlatformFunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -8849,6 +8867,8 @@ export interface PlatformFunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -12809,6 +12829,8 @@ export type FunctionInvocationOrderBy = | 'ID_DESC' | 'JOB_ID_ASC' | 'JOB_ID_DESC' + | 'JOB_KEY_ASC' + | 'JOB_KEY_DESC' | 'NATURAL' | 'ORGANIZATION_ID_ASC' | 'ORGANIZATION_ID_DESC' @@ -12822,6 +12844,8 @@ export type FunctionInvocationOrderBy = | 'PRINCIPAL_ID_DESC' | 'PROVENANCE_ASC' | 'PROVENANCE_DESC' + | 'QUEUE_NAME_ASC' + | 'QUEUE_NAME_DESC' | 'RESULT_ASC' | 'RESULT_DESC' | 'STARTED_AT_ASC' @@ -13499,6 +13523,8 @@ export type PlatformFunctionInvocationOrderBy = | 'ID_DESC' | 'JOB_ID_ASC' | 'JOB_ID_DESC' + | 'JOB_KEY_ASC' + | 'JOB_KEY_DESC' | 'NATURAL' | 'ORGANIZATION_ID_ASC' | 'ORGANIZATION_ID_DESC' @@ -13512,6 +13538,8 @@ export type PlatformFunctionInvocationOrderBy = | 'PRINCIPAL_ID_DESC' | 'PROVENANCE_ASC' | 'PROVENANCE_DESC' + | 'QUEUE_NAME_ASC' + | 'QUEUE_NAME_DESC' | 'RESULT_ASC' | 'RESULT_DESC' | 'STARTED_AT_ASC' @@ -17031,11 +17059,13 @@ export interface CreateFunctionInvocationInput { functionDefinitionId?: string; graphExecutionId?: string; jobId?: string; + jobKey?: string; organizationId?: string; parentInvocationId?: string; payload?: Record; principalId?: string; provenance?: Record; + queueName?: string; result?: Record; startedAt?: string; status?: string; @@ -17057,11 +17087,13 @@ export interface FunctionInvocationPatch { functionDefinitionId?: string | null; graphExecutionId?: string | null; jobId?: string | null; + jobKey?: string | null; organizationId?: string | null; parentInvocationId?: string | null; payload?: Record | null; principalId?: string | null; provenance?: Record | null; + queueName?: string | null; result?: Record | null; startedAt?: string | null; status?: string | null; @@ -17889,11 +17921,13 @@ export interface CreatePlatformFunctionInvocationInput { functionDefinitionId?: string; graphExecutionId?: string; jobId?: string; + jobKey?: string; organizationId?: string; parentInvocationId?: string; payload?: Record; principalId?: string; provenance?: Record; + queueName?: string; result?: Record; startedAt?: string; status?: string; @@ -17915,11 +17949,13 @@ export interface PlatformFunctionInvocationPatch { functionDefinitionId?: string | null; graphExecutionId?: string | null; jobId?: string | null; + jobKey?: string | null; organizationId?: string | null; parentInvocationId?: string | null; payload?: Record | null; principalId?: string | null; provenance?: Record | null; + queueName?: string | null; result?: Record | null; startedAt?: string | null; status?: string | null; @@ -23033,6 +23069,8 @@ export interface FunctionInvocationInput { id?: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string; /** Organization identity propagated with the invocation */ organizationId?: string; /** Parent invocation when this is a child node of a flow graph execution */ @@ -23043,6 +23081,8 @@ export interface FunctionInvocationInput { principalId?: string; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string; /** Function return value (success) or structured error (failure) */ result?: Record; /** When execution started */ @@ -23629,6 +23669,8 @@ export interface PlatformFunctionInvocationInput { id?: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string; /** Organization identity propagated with the invocation */ organizationId?: string; /** Parent invocation when this is a child node of a flow graph execution */ @@ -23639,6 +23681,8 @@ export interface PlatformFunctionInvocationInput { principalId?: string; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string; /** Function return value (success) or structured error (failure) */ result?: Record; /** When execution started */ @@ -25363,6 +25407,8 @@ export interface FunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: FunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -25377,6 +25423,8 @@ export interface FunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -26206,6 +26254,8 @@ export interface PlatformFunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: PlatformFunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -26220,6 +26270,8 @@ export interface PlatformFunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -29321,19 +29373,19 @@ export type PlatformResourceInstallationsUpgradePayloadSelect = { clientMutationId?: boolean; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface ResourceInstallationsInstallPayload { clientMutationId?: string | null; diff --git a/sdk/constructive-cli/src/compute/orm/mutation/index.ts b/sdk/constructive-cli/src/compute/orm/mutation/index.ts index 44a0f3f0bd..48ca756e41 100644 --- a/sdk/constructive-cli/src/compute/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/compute/orm/mutation/index.ts @@ -351,10 +351,11 @@ export interface PlatformResourceInstallationsUpgradeVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-cli/src/config/cli/README.md b/sdk/constructive-cli/src/config/cli/README.md index ac13337d38..7c20cf8de5 100644 --- a/sdk/constructive-cli/src/config/cli/README.md +++ b/sdk/constructive-cli/src/config/cli/README.md @@ -56,10 +56,11 @@ csdk auth set-token | `platform-secrets-rotate` | platformSecretsRotate | | `platform-secrets-set` | platformSecretsSet | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | ## Infrastructure Commands @@ -697,10 +698,11 @@ platformSecretsSet ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/config/cli/commands.ts b/sdk/constructive-cli/src/config/cli/commands.ts index 25fad8ea1d..bc7523f6d7 100644 --- a/sdk/constructive-cli/src/config/cli/commands.ts +++ b/sdk/constructive-cli/src/config/cli/commands.ts @@ -78,7 +78,7 @@ const createCommandMap: () => Record< 'provision-bucket': provisionBucketCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n app-internal-secret appInternalSecret CRUD operations\n config config CRUD operations\n internal-config internalConfig CRUD operations\n internal-secret internalSecret CRUD operations\n platform-config platformConfig CRUD operations\n platform-internal-config platformInternalConfig CRUD operations\n platform-internal-secret platformInternalSecret CRUD operations\n platform-secret platformSecret CRUD operations\n secret secret CRUD operations\n internal-secrets-del _internalSecretsDel\n internal-secrets-remove-array _internalSecretsRemoveArray\n internal-secrets-rotate _internalSecretsRotate\n internal-secrets-set _internalSecretsSet\n secrets-del _secretsDel\n secrets-remove-array _secretsRemoveArray\n secrets-rotate _secretsRotate\n secrets-set _secretsSet\n app-internal-secrets-del appInternalSecretsDel\n app-internal-secrets-remove-array appInternalSecretsRemoveArray\n app-internal-secrets-rotate appInternalSecretsRotate\n app-internal-secrets-set appInternalSecretsSet\n platform-internal-secrets-del platformInternalSecretsDel\n platform-internal-secrets-remove-array platformInternalSecretsRemoveArray\n platform-internal-secrets-rotate platformInternalSecretsRotate\n platform-internal-secrets-set platformInternalSecretsSet\n platform-secrets-del platformSecretsDel\n platform-secrets-remove-array platformSecretsRemoveArray\n platform-secrets-rotate platformSecretsRotate\n platform-secrets-set platformSecretsSet\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\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 app-internal-secret appInternalSecret CRUD operations\n config config CRUD operations\n internal-config internalConfig CRUD operations\n internal-secret internalSecret CRUD operations\n platform-config platformConfig CRUD operations\n platform-internal-config platformInternalConfig CRUD operations\n platform-internal-secret platformInternalSecret CRUD operations\n platform-secret platformSecret CRUD operations\n secret secret CRUD operations\n internal-secrets-del _internalSecretsDel\n internal-secrets-remove-array _internalSecretsRemoveArray\n internal-secrets-rotate _internalSecretsRotate\n internal-secrets-set _internalSecretsSet\n secrets-del _secretsDel\n secrets-remove-array _secretsRemoveArray\n secrets-rotate _secretsRotate\n secrets-set _secretsSet\n app-internal-secrets-del appInternalSecretsDel\n app-internal-secrets-remove-array appInternalSecretsRemoveArray\n app-internal-secrets-rotate appInternalSecretsRotate\n app-internal-secrets-set appInternalSecretsSet\n platform-internal-secrets-del platformInternalSecretsDel\n platform-internal-secrets-remove-array platformInternalSecretsRemoveArray\n platform-internal-secrets-rotate platformInternalSecretsRotate\n platform-internal-secrets-set platformInternalSecretsSet\n platform-secrets-del platformSecretsDel\n platform-secrets-remove-array platformSecretsRemoveArray\n platform-secrets-rotate platformSecretsRotate\n platform-secrets-set platformSecretsSet\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/config/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/config/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/config/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/config/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/config/orm/README.md b/sdk/constructive-cli/src/config/orm/README.md index 2cd850a467..8e9c44033d 100644 --- a/sdk/constructive-cli/src/config/orm/README.md +++ b/sdk/constructive-cli/src/config/orm/README.md @@ -698,10 +698,11 @@ const result = await db.mutation.platformSecretsSet({ input: ' | `platform-infra-set-data-at-path` | platformInfraSetDataAtPath | | `platform-infra-set-many-and-commit` | platformInfraSetManyAndCommit | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | ## Infrastructure Commands @@ -513,10 +514,11 @@ platformInfraSetManyAndCommit ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/infra/cli/commands.ts b/sdk/constructive-cli/src/infra/cli/commands.ts index e274b094ee..2a80d3113d 100644 --- a/sdk/constructive-cli/src/infra/cli/commands.ts +++ b/sdk/constructive-cli/src/infra/cli/commands.ts @@ -54,7 +54,7 @@ const createCommandMap: () => Record< 'provision-bucket': provisionBucketCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n content-preset contentPreset CRUD operations\n db-preset dbPreset CRUD operations\n namespace namespace CRUD operations\n namespace-event namespaceEvent CRUD operations\n platform-infra-commit platformInfraCommit CRUD operations\n platform-infra-get-all-tree-nodes-record platformInfraGetAllTreeNodesRecord CRUD operations\n platform-infra-object platformInfraObject CRUD operations\n platform-infra-ref platformInfraRef CRUD operations\n platform-infra-store platformInfraStore CRUD operations\n platform-namespace platformNamespace CRUD operations\n platform-namespace-event platformNamespaceEvent CRUD operations\n platform-infra-init-empty-repo platformInfraInitEmptyRepo\n platform-infra-insert-node-at-path platformInfraInsertNodeAtPath\n platform-infra-insert-nodes-at-paths platformInfraInsertNodesAtPaths\n platform-infra-set-and-commit platformInfraSetAndCommit\n platform-infra-set-data-at-path platformInfraSetDataAtPath\n platform-infra-set-many-and-commit platformInfraSetManyAndCommit\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\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 content-preset contentPreset CRUD operations\n db-preset dbPreset CRUD operations\n namespace namespace CRUD operations\n namespace-event namespaceEvent CRUD operations\n platform-infra-commit platformInfraCommit CRUD operations\n platform-infra-get-all-tree-nodes-record platformInfraGetAllTreeNodesRecord CRUD operations\n platform-infra-object platformInfraObject CRUD operations\n platform-infra-ref platformInfraRef CRUD operations\n platform-infra-store platformInfraStore CRUD operations\n platform-namespace platformNamespace CRUD operations\n platform-namespace-event platformNamespaceEvent CRUD operations\n platform-infra-init-empty-repo platformInfraInitEmptyRepo\n platform-infra-insert-node-at-path platformInfraInsertNodeAtPath\n platform-infra-insert-nodes-at-paths platformInfraInsertNodesAtPaths\n platform-infra-set-and-commit platformInfraSetAndCommit\n platform-infra-set-data-at-path platformInfraSetDataAtPath\n platform-infra-set-many-and-commit platformInfraSetManyAndCommit\n provision-bucket 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/infra/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/infra/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/infra/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/infra/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/infra/orm/README.md b/sdk/constructive-cli/src/infra/orm/README.md index 322c4f138f..63c0b0f3e5 100644 --- a/sdk/constructive-cli/src/infra/orm/README.md +++ b/sdk/constructive-cli/src/infra/orm/README.md @@ -529,10 +529,11 @@ const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entrie ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/infra/orm/input-types.ts b/sdk/constructive-cli/src/infra/orm/input-types.ts index d3a13bcb63..10a6c604ec 100644 --- a/sdk/constructive-cli/src/infra/orm/input-types.ts +++ b/sdk/constructive-cli/src/infra/orm/input-types.ts @@ -1720,19 +1720,19 @@ export type PlatformInfraSetManyAndCommitPayloadSelect = { }; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface CreateContentPresetPayload { clientMutationId?: string | null; diff --git a/sdk/constructive-cli/src/infra/orm/mutation/index.ts b/sdk/constructive-cli/src/infra/orm/mutation/index.ts index 96dd8ca742..b26e9f8747 100644 --- a/sdk/constructive-cli/src/infra/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/infra/orm/mutation/index.ts @@ -51,10 +51,11 @@ export interface PlatformInfraSetManyAndCommitVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-cli/src/modules/cli/README.md b/sdk/constructive-cli/src/modules/cli/README.md index c2c78aef03..1334f3510d 100644 --- a/sdk/constructive-cli/src/modules/cli/README.md +++ b/sdk/constructive-cli/src/modules/cli/README.md @@ -114,13 +114,14 @@ 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 on success, NULL on failure. | +| `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. | | `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. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | ## Infrastructure Commands @@ -389,6 +390,8 @@ CRUD operations for BillingProviderModule records. | `activatePlanSubscriptionFunction` | String | | `apiName` | String | | `applyProviderObservationFunction` | String | +| `billingConnectionTableId` | UUID | +| `billingConnectionTableName` | String | | `billingCustomersTableId` | UUID | | `billingCustomersTableName` | String | | `billingDisputesTableId` | UUID | @@ -403,6 +406,8 @@ CRUD operations for BillingProviderModule records. | `billingPricesTableName` | String | | `billingProductsTableId` | UUID | | `billingProductsTableName` | String | +| `billingProviderConnectedFunction` | String | +| `billingProviderKeyFunction` | String | | `billingProviderStateTableId` | UUID | | `billingProviderStateTableName` | String | | `billingRefundsTableId` | UUID | @@ -439,6 +444,7 @@ CRUD operations for BillingProviderModule records. | `processBillingEventFunction` | String | | `productsTableId` | UUID | | `provider` | String | +| `recordBillingConnectionFunction` | String | | `recordBillingHealthFunction` | String | | `recordDisputeFunction` | String | | `recordRefundFunction` | String | @@ -454,7 +460,7 @@ CRUD operations for BillingProviderModule records. | `usageSyncShardCount` | Int | **Required create fields:** `databaseId` -**Optional create fields (backend defaults):** `activatePlanSubscriptionFunction`, `apiName`, `applyProviderObservationFunction`, `billingCustomersTableId`, `billingCustomersTableName`, `billingDisputesTableId`, `billingDisputesTableName`, `billingHealthTableId`, `billingHealthTableName`, `billingInvoicesTableId`, `billingInvoicesTableName`, `billingOperationsTableId`, `billingOperationsTableName`, `billingPricesTableId`, `billingPricesTableName`, `billingProductsTableId`, `billingProductsTableName`, `billingProviderStateTableId`, `billingProviderStateTableName`, `billingRefundsTableId`, `billingRefundsTableName`, `billingSubscriptionsTableId`, `billingSubscriptionsTableName`, `billingWebhookEventsTableId`, `billingWebhookEventsTableName`, `bindCheckoutSessionFunction`, `clearScheduledChangeFunction`, `finishBillingOperationFunction`, `getActivePlanPricingFunction`, `getActivePlanSubscriptionFunction`, `getBillingCustomerFunction`, `getBillingPriceFunction`, `getBillingProductFunction`, `getBillingProviderStateFunction`, `getBillingSubscriptionByEntityFunction`, `getBillingSubscriptionByExternalIdFunction`, `getBillingSubscriptionFunction`, `getFallbackFreePlanFunction`, `getPlanPricingByExternalPriceFunction`, `hasDueReconciliationsFunction`, `listDueReconciliationsFunction`, `listPendingUsageSyncFunction`, `markUsageSyncedFunction`, `prefix`, `prepareScheduledChangeFunction`, `pricesTableId`, `privateApiName`, `privateSchemaId`, `processBillingEventFunction`, `productsTableId`, `provider`, `recordBillingHealthFunction`, `recordDisputeFunction`, `recordRefundFunction`, `reserveBillingOperationFunction`, `schemaId`, `subscriptionsTableId`, `sweepOverdueSubscriptionsFunction`, `upsertBillingCustomerFunction`, `upsertBillingPriceFunction`, `upsertBillingProductFunction`, `upsertBillingSubscriptionFunction`, `upsertInvoiceFunction`, `usageSyncShardCount` +**Optional create fields (backend defaults):** `activatePlanSubscriptionFunction`, `apiName`, `applyProviderObservationFunction`, `billingConnectionTableId`, `billingConnectionTableName`, `billingCustomersTableId`, `billingCustomersTableName`, `billingDisputesTableId`, `billingDisputesTableName`, `billingHealthTableId`, `billingHealthTableName`, `billingInvoicesTableId`, `billingInvoicesTableName`, `billingOperationsTableId`, `billingOperationsTableName`, `billingPricesTableId`, `billingPricesTableName`, `billingProductsTableId`, `billingProductsTableName`, `billingProviderConnectedFunction`, `billingProviderKeyFunction`, `billingProviderStateTableId`, `billingProviderStateTableName`, `billingRefundsTableId`, `billingRefundsTableName`, `billingSubscriptionsTableId`, `billingSubscriptionsTableName`, `billingWebhookEventsTableId`, `billingWebhookEventsTableName`, `bindCheckoutSessionFunction`, `clearScheduledChangeFunction`, `finishBillingOperationFunction`, `getActivePlanPricingFunction`, `getActivePlanSubscriptionFunction`, `getBillingCustomerFunction`, `getBillingPriceFunction`, `getBillingProductFunction`, `getBillingProviderStateFunction`, `getBillingSubscriptionByEntityFunction`, `getBillingSubscriptionByExternalIdFunction`, `getBillingSubscriptionFunction`, `getFallbackFreePlanFunction`, `getPlanPricingByExternalPriceFunction`, `hasDueReconciliationsFunction`, `listDueReconciliationsFunction`, `listPendingUsageSyncFunction`, `markUsageSyncedFunction`, `prefix`, `prepareScheduledChangeFunction`, `pricesTableId`, `privateApiName`, `privateSchemaId`, `processBillingEventFunction`, `productsTableId`, `provider`, `recordBillingConnectionFunction`, `recordBillingHealthFunction`, `recordDisputeFunction`, `recordRefundFunction`, `reserveBillingOperationFunction`, `schemaId`, `subscriptionsTableId`, `sweepOverdueSubscriptionsFunction`, `upsertBillingCustomerFunction`, `upsertBillingPriceFunction`, `upsertBillingProductFunction`, `upsertBillingSubscriptionFunction`, `upsertInvoiceFunction`, `usageSyncShardCount` ### `blueprint` @@ -511,7 +517,6 @@ CRUD operations for BlueprintConstruction records. | `constructedDefinition` | JSON | | `createdAt` | Datetime | | `databaseId` | UUID | -| `errorDetails` | String | | `id` | UUID | | `schemaId` | UUID | | `status` | String | @@ -519,7 +524,7 @@ CRUD operations for BlueprintConstruction records. | `updatedAt` | Datetime | **Required create fields:** `blueprintId`, `databaseId` -**Optional create fields (backend defaults):** `constructedAt`, `constructedDefinition`, `errorDetails`, `schemaId`, `status`, `tableMap` +**Optional create fields (backend defaults):** `constructedAt`, `constructedDefinition`, `schemaId`, `status`, `tableMap` ### `blueprint-template` @@ -635,6 +640,8 @@ CRUD operations for CatalogModule records. | `bucketsTableName` | String | | `databaseId` | UUID | | `defaultCapabilities` | String | +| `domainVerificationsTableId` | UUID | +| `domainVerificationsTableName` | String | | `domainsTableId` | UUID | | `domainsTableName` | String | | `entityTableId` | UUID | @@ -673,7 +680,7 @@ CRUD operations for CatalogModule records. | `sitesWebConfigTableName` | String | **Required create fields:** `databaseId`, `scope` -**Optional create fields (backend defaults):** `apiName`, `apisTableId`, `apisTableName`, `appStoreIdentitiesTableId`, `appStoreIdentitiesTableName`, `appsTableId`, `appsTableName`, `bindingsTableId`, `bindingsTableName`, `bucketsTableId`, `bucketsTableName`, `defaultCapabilities`, `domainsTableId`, `domainsTableName`, `entityTableId`, `functionsTableId`, `functionsTableName`, `imagesTableId`, `imagesTableName`, `managedDomainsTableId`, `managedDomainsTableName`, `namespacesTableId`, `namespacesTableName`, `policies`, `privateApiName`, `provisions`, `publicSchemaName`, `redirectsTableId`, `redirectsTableName`, `resourceDefinitionsTableId`, `resourceDefinitionsTableName`, `resourceInstallationsTableId`, `resourceInstallationsTableName`, `resourcesTableId`, `resourcesTableName`, `schemaId`, `sitesAppLinksTableId`, `sitesAppLinksTableName`, `sitesDeepLinksTableId`, `sitesDeepLinksTableName`, `sitesErrorPagesTableId`, `sitesErrorPagesTableName`, `sitesTableId`, `sitesTableName`, `sitesWebConfigTableId`, `sitesWebConfigTableName` +**Optional create fields (backend defaults):** `apiName`, `apisTableId`, `apisTableName`, `appStoreIdentitiesTableId`, `appStoreIdentitiesTableName`, `appsTableId`, `appsTableName`, `bindingsTableId`, `bindingsTableName`, `bucketsTableId`, `bucketsTableName`, `defaultCapabilities`, `domainVerificationsTableId`, `domainVerificationsTableName`, `domainsTableId`, `domainsTableName`, `entityTableId`, `functionsTableId`, `functionsTableName`, `imagesTableId`, `imagesTableName`, `managedDomainsTableId`, `managedDomainsTableName`, `namespacesTableId`, `namespacesTableName`, `policies`, `privateApiName`, `provisions`, `publicSchemaName`, `redirectsTableId`, `redirectsTableName`, `resourceDefinitionsTableId`, `resourceDefinitionsTableName`, `resourceInstallationsTableId`, `resourceInstallationsTableName`, `resourcesTableId`, `resourcesTableName`, `schemaId`, `sitesAppLinksTableId`, `sitesAppLinksTableName`, `sitesDeepLinksTableId`, `sitesDeepLinksTableName`, `sitesErrorPagesTableId`, `sitesErrorPagesTableName`, `sitesTableId`, `sitesTableName`, `sitesWebConfigTableId`, `sitesWebConfigTableName` ### `cluster-module` @@ -3410,13 +3417,14 @@ CRUD operations for StorageModule records. | `provisions` | JSON | | `publicSchemaName` | String | | `publicUrlPrefix` | String | +| `region` | String | | `restrictReads` | Boolean | | `schemaId` | UUID | | `scope` | String | | `uploadUrlExpirySeconds` | Int | **Required create fields:** `databaseId`, `scope` -**Optional create fields (backend defaults):** `allowedOrigins`, `apiName`, `bucketsTableId`, `bucketsTableName`, `cacheTtlSeconds`, `catalogModuleId`, `confirmUploadDelay`, `defaultCapabilities`, `defaultMaxFileSize`, `downloadUrlExpirySeconds`, `endpoint`, `entityField`, `entityTableId`, `fileEventsTableId`, `filesTableId`, `filesTableName`, `hasAuditLog`, `hasConfirmUpload`, `hasContentHash`, `hasCustomKeys`, `hasPathShares`, `hasVersioning`, `key`, `maxBulkFiles`, `maxBulkTotalSize`, `maxFilenameLength`, `pathSharesTableId`, `policies`, `prefix`, `privateApiName`, `privateSchemaId`, `privateSchemaName`, `provider`, `provisions`, `publicSchemaName`, `publicUrlPrefix`, `restrictReads`, `schemaId`, `uploadUrlExpirySeconds` +**Optional create fields (backend defaults):** `allowedOrigins`, `apiName`, `bucketsTableId`, `bucketsTableName`, `cacheTtlSeconds`, `catalogModuleId`, `confirmUploadDelay`, `defaultCapabilities`, `defaultMaxFileSize`, `downloadUrlExpirySeconds`, `endpoint`, `entityField`, `entityTableId`, `fileEventsTableId`, `filesTableId`, `filesTableName`, `hasAuditLog`, `hasConfirmUpload`, `hasContentHash`, `hasCustomKeys`, `hasPathShares`, `hasVersioning`, `key`, `maxBulkFiles`, `maxBulkTotalSize`, `maxFilenameLength`, `pathSharesTableId`, `policies`, `prefix`, `privateApiName`, `privateSchemaId`, `privateSchemaName`, `provider`, `provisions`, `publicSchemaName`, `publicUrlPrefix`, `region`, `restrictReads`, `schemaId`, `uploadUrlExpirySeconds` ### `transfer-log-module` @@ -3767,7 +3775,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 on success, NULL on failure. +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. - **Type:** mutation - **Arguments:** @@ -3797,10 +3805,11 @@ Creates a new blueprint by copying a template definition. Checks visibility: own ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/modules/cli/commands.ts b/sdk/constructive-cli/src/modules/cli/commands.ts index c6dddcb1f8..3f3384e5d4 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 on success, NULL on failure.\n copy-template-to-blueprint Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID.\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\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 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'; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/modules/cli/commands/billing-provider-module.ts b/sdk/constructive-cli/src/modules/cli/commands/billing-provider-module.ts index d40123f79f..89e0c07992 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/billing-provider-module.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/billing-provider-module.ts @@ -19,6 +19,8 @@ const fieldSchema: FieldSchema = { activatePlanSubscriptionFunction: 'string', apiName: 'string', applyProviderObservationFunction: 'string', + billingConnectionTableId: 'uuid', + billingConnectionTableName: 'string', billingCustomersTableId: 'uuid', billingCustomersTableName: 'string', billingDisputesTableId: 'uuid', @@ -33,6 +35,8 @@ const fieldSchema: FieldSchema = { billingPricesTableName: 'string', billingProductsTableId: 'uuid', billingProductsTableName: 'string', + billingProviderConnectedFunction: 'string', + billingProviderKeyFunction: 'string', billingProviderStateTableId: 'uuid', billingProviderStateTableName: 'string', billingRefundsTableId: 'uuid', @@ -69,6 +73,7 @@ const fieldSchema: FieldSchema = { processBillingEventFunction: 'string', productsTableId: 'uuid', provider: 'string', + recordBillingConnectionFunction: 'string', recordBillingHealthFunction: 'string', recordDisputeFunction: 'string', recordRefundFunction: 'string', @@ -137,6 +142,8 @@ async function handleList(argv: Partial>, _prompter: Inq activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, + billingConnectionTableId: true, + billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, @@ -151,6 +158,8 @@ async function handleList(argv: Partial>, _prompter: Inq billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, + billingProviderConnectedFunction: true, + billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, @@ -187,6 +196,7 @@ async function handleList(argv: Partial>, _prompter: Inq processBillingEventFunction: true, productsTableId: true, provider: true, + recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, @@ -227,6 +237,8 @@ async function handleFindFirst(argv: Partial>, _prompter activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, + billingConnectionTableId: true, + billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, @@ -241,6 +253,8 @@ async function handleFindFirst(argv: Partial>, _prompter billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, + billingProviderConnectedFunction: true, + billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, @@ -277,6 +291,7 @@ async function handleFindFirst(argv: Partial>, _prompter processBillingEventFunction: true, productsTableId: true, provider: true, + recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, @@ -329,6 +344,8 @@ async function handleGet(argv: Partial>, prompter: Inqui activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, + billingConnectionTableId: true, + billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, @@ -343,6 +360,8 @@ async function handleGet(argv: Partial>, prompter: Inqui billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, + billingProviderConnectedFunction: true, + billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, @@ -379,6 +398,7 @@ async function handleGet(argv: Partial>, prompter: Inqui processBillingEventFunction: true, productsTableId: true, provider: true, + recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, @@ -428,6 +448,20 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'billingConnectionTableId', + message: 'billingConnectionTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'billingConnectionTableName', + message: 'billingConnectionTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'billingCustomersTableId', @@ -526,6 +560,20 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'billingProviderConnectedFunction', + message: 'billingProviderConnectedFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'billingProviderKeyFunction', + message: 'billingProviderKeyFunction', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'billingProviderStateTableId', @@ -770,6 +818,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'recordBillingConnectionFunction', + message: 'recordBillingConnectionFunction', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'recordBillingHealthFunction', @@ -874,6 +929,8 @@ async function handleCreate(argv: Partial>, prompter: In activatePlanSubscriptionFunction: cleanedData.activatePlanSubscriptionFunction, apiName: cleanedData.apiName, applyProviderObservationFunction: cleanedData.applyProviderObservationFunction, + billingConnectionTableId: cleanedData.billingConnectionTableId, + billingConnectionTableName: cleanedData.billingConnectionTableName, billingCustomersTableId: cleanedData.billingCustomersTableId, billingCustomersTableName: cleanedData.billingCustomersTableName, billingDisputesTableId: cleanedData.billingDisputesTableId, @@ -888,6 +945,8 @@ async function handleCreate(argv: Partial>, prompter: In billingPricesTableName: cleanedData.billingPricesTableName, billingProductsTableId: cleanedData.billingProductsTableId, billingProductsTableName: cleanedData.billingProductsTableName, + billingProviderConnectedFunction: cleanedData.billingProviderConnectedFunction, + billingProviderKeyFunction: cleanedData.billingProviderKeyFunction, billingProviderStateTableId: cleanedData.billingProviderStateTableId, billingProviderStateTableName: cleanedData.billingProviderStateTableName, billingRefundsTableId: cleanedData.billingRefundsTableId, @@ -925,6 +984,7 @@ async function handleCreate(argv: Partial>, prompter: In processBillingEventFunction: cleanedData.processBillingEventFunction, productsTableId: cleanedData.productsTableId, provider: cleanedData.provider, + recordBillingConnectionFunction: cleanedData.recordBillingConnectionFunction, recordBillingHealthFunction: cleanedData.recordBillingHealthFunction, recordDisputeFunction: cleanedData.recordDisputeFunction, recordRefundFunction: cleanedData.recordRefundFunction, @@ -943,6 +1003,8 @@ async function handleCreate(argv: Partial>, prompter: In activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, + billingConnectionTableId: true, + billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, @@ -957,6 +1019,8 @@ async function handleCreate(argv: Partial>, prompter: In billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, + billingProviderConnectedFunction: true, + billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, @@ -993,6 +1057,7 @@ async function handleCreate(argv: Partial>, prompter: In processBillingEventFunction: true, productsTableId: true, provider: true, + recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, @@ -1048,6 +1113,20 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'billingConnectionTableId', + message: 'billingConnectionTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'billingConnectionTableName', + message: 'billingConnectionTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'billingCustomersTableId', @@ -1146,6 +1225,20 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'billingProviderConnectedFunction', + message: 'billingProviderConnectedFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'billingProviderKeyFunction', + message: 'billingProviderKeyFunction', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'billingProviderStateTableId', @@ -1390,6 +1483,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'recordBillingConnectionFunction', + message: 'recordBillingConnectionFunction', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'recordBillingHealthFunction', @@ -1494,6 +1594,8 @@ async function handleUpdate(argv: Partial>, prompter: In activatePlanSubscriptionFunction: cleanedData.activatePlanSubscriptionFunction, apiName: cleanedData.apiName, applyProviderObservationFunction: cleanedData.applyProviderObservationFunction, + billingConnectionTableId: cleanedData.billingConnectionTableId, + billingConnectionTableName: cleanedData.billingConnectionTableName, billingCustomersTableId: cleanedData.billingCustomersTableId, billingCustomersTableName: cleanedData.billingCustomersTableName, billingDisputesTableId: cleanedData.billingDisputesTableId, @@ -1508,6 +1610,8 @@ async function handleUpdate(argv: Partial>, prompter: In billingPricesTableName: cleanedData.billingPricesTableName, billingProductsTableId: cleanedData.billingProductsTableId, billingProductsTableName: cleanedData.billingProductsTableName, + billingProviderConnectedFunction: cleanedData.billingProviderConnectedFunction, + billingProviderKeyFunction: cleanedData.billingProviderKeyFunction, billingProviderStateTableId: cleanedData.billingProviderStateTableId, billingProviderStateTableName: cleanedData.billingProviderStateTableName, billingRefundsTableId: cleanedData.billingRefundsTableId, @@ -1545,6 +1649,7 @@ async function handleUpdate(argv: Partial>, prompter: In processBillingEventFunction: cleanedData.processBillingEventFunction, productsTableId: cleanedData.productsTableId, provider: cleanedData.provider, + recordBillingConnectionFunction: cleanedData.recordBillingConnectionFunction, recordBillingHealthFunction: cleanedData.recordBillingHealthFunction, recordDisputeFunction: cleanedData.recordDisputeFunction, recordRefundFunction: cleanedData.recordRefundFunction, @@ -1563,6 +1668,8 @@ async function handleUpdate(argv: Partial>, prompter: In activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, + billingConnectionTableId: true, + billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, @@ -1577,6 +1684,8 @@ async function handleUpdate(argv: Partial>, prompter: In billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, + billingProviderConnectedFunction: true, + billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, @@ -1613,6 +1722,7 @@ async function handleUpdate(argv: Partial>, prompter: In processBillingEventFunction: true, productsTableId: true, provider: true, + recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, 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 3e24933007..0a5f93fccd 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/blueprint-construction.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/blueprint-construction.ts @@ -21,7 +21,6 @@ const fieldSchema: FieldSchema = { constructedDefinition: 'json', createdAt: 'string', databaseId: 'uuid', - errorDetails: 'string', id: 'uuid', schemaId: 'uuid', status: 'string', @@ -84,7 +83,6 @@ async function handleList(argv: Partial>, _prompter: Inq constructedDefinition: true, createdAt: true, databaseId: true, - errorDetails: true, id: true, schemaId: true, status: true, @@ -119,7 +117,6 @@ async function handleFindFirst(argv: Partial>, _prompter constructedDefinition: true, createdAt: true, databaseId: true, - errorDetails: true, id: true, schemaId: true, status: true, @@ -166,7 +163,6 @@ async function handleGet(argv: Partial>, prompter: Inqui constructedDefinition: true, createdAt: true, databaseId: true, - errorDetails: true, id: true, schemaId: true, status: true, @@ -213,13 +209,6 @@ async function handleCreate(argv: Partial>, prompter: In message: 'databaseId', required: true, }, - { - type: 'text', - name: 'errorDetails', - message: 'errorDetails', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'schemaId', @@ -255,7 +244,6 @@ async function handleCreate(argv: Partial>, prompter: In constructedAt: cleanedData.constructedAt, constructedDefinition: cleanedData.constructedDefinition, databaseId: cleanedData.databaseId, - errorDetails: cleanedData.errorDetails, schemaId: cleanedData.schemaId, status: cleanedData.status, tableMap: cleanedData.tableMap, @@ -266,7 +254,6 @@ async function handleCreate(argv: Partial>, prompter: In constructedDefinition: true, createdAt: true, databaseId: true, - errorDetails: true, id: true, schemaId: true, status: true, @@ -319,13 +306,6 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'databaseId', required: false, }, - { - type: 'text', - name: 'errorDetails', - message: 'errorDetails', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'schemaId', @@ -361,7 +341,6 @@ async function handleUpdate(argv: Partial>, prompter: In constructedAt: cleanedData.constructedAt, constructedDefinition: cleanedData.constructedDefinition, databaseId: cleanedData.databaseId, - errorDetails: cleanedData.errorDetails, schemaId: cleanedData.schemaId, status: cleanedData.status, tableMap: cleanedData.tableMap, @@ -372,7 +351,6 @@ async function handleUpdate(argv: Partial>, prompter: In constructedDefinition: true, createdAt: true, databaseId: true, - errorDetails: true, id: true, schemaId: true, status: true, diff --git a/sdk/constructive-cli/src/modules/cli/commands/catalog-module.ts b/sdk/constructive-cli/src/modules/cli/commands/catalog-module.ts index 2d09a0f459..c7314f40ac 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/catalog-module.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/catalog-module.ts @@ -29,6 +29,8 @@ const fieldSchema: FieldSchema = { bucketsTableName: 'string', databaseId: 'uuid', defaultCapabilities: 'string', + domainVerificationsTableId: 'uuid', + domainVerificationsTableName: 'string', domainsTableId: 'uuid', domainsTableName: 'string', entityTableId: 'uuid', @@ -130,6 +132,8 @@ async function handleList(argv: Partial>, _prompter: Inq bucketsTableName: true, databaseId: true, defaultCapabilities: true, + domainVerificationsTableId: true, + domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, @@ -199,6 +203,8 @@ async function handleFindFirst(argv: Partial>, _prompter bucketsTableName: true, databaseId: true, defaultCapabilities: true, + domainVerificationsTableId: true, + domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, @@ -280,6 +286,8 @@ async function handleGet(argv: Partial>, prompter: Inqui bucketsTableName: true, databaseId: true, defaultCapabilities: true, + domainVerificationsTableId: true, + domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, @@ -421,6 +429,20 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'domainVerificationsTableId', + message: 'domainVerificationsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'domainVerificationsTableName', + message: 'domainVerificationsTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'domainsTableId', @@ -688,6 +710,8 @@ async function handleCreate(argv: Partial>, prompter: In bucketsTableName: cleanedData.bucketsTableName, databaseId: cleanedData.databaseId, defaultCapabilities: cleanedData.defaultCapabilities, + domainVerificationsTableId: cleanedData.domainVerificationsTableId, + domainVerificationsTableName: cleanedData.domainVerificationsTableName, domainsTableId: cleanedData.domainsTableId, domainsTableName: cleanedData.domainsTableName, entityTableId: cleanedData.entityTableId, @@ -738,6 +762,8 @@ async function handleCreate(argv: Partial>, prompter: In bucketsTableName: true, databaseId: true, defaultCapabilities: true, + domainVerificationsTableId: true, + domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, @@ -885,6 +911,20 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'domainVerificationsTableId', + message: 'domainVerificationsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'domainVerificationsTableName', + message: 'domainVerificationsTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'domainsTableId', @@ -1152,6 +1192,8 @@ async function handleUpdate(argv: Partial>, prompter: In bucketsTableName: cleanedData.bucketsTableName, databaseId: cleanedData.databaseId, defaultCapabilities: cleanedData.defaultCapabilities, + domainVerificationsTableId: cleanedData.domainVerificationsTableId, + domainVerificationsTableName: cleanedData.domainVerificationsTableName, domainsTableId: cleanedData.domainsTableId, domainsTableName: cleanedData.domainsTableName, entityTableId: cleanedData.entityTableId, @@ -1202,6 +1244,8 @@ async function handleUpdate(argv: Partial>, prompter: In bucketsTableName: true, databaseId: true, defaultCapabilities: true, + domainVerificationsTableId: true, + domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: 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 915aa0f01a..da487655b6 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 on success, NULL on failure.\n\nUsage: construct-blueprint [OPTIONS]\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\nUsage: construct-blueprint [OPTIONS]\n' ); process.exit(0); } diff --git a/sdk/constructive-cli/src/modules/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/modules/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/modules/cli/commands/storage-module.ts b/sdk/constructive-cli/src/modules/cli/commands/storage-module.ts index 86898301fa..dfd0941682 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/storage-module.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/storage-module.ts @@ -54,6 +54,7 @@ const fieldSchema: FieldSchema = { provisions: 'json', publicSchemaName: 'string', publicUrlPrefix: 'string', + region: 'string', restrictReads: 'boolean', schemaId: 'uuid', scope: 'string', @@ -148,6 +149,7 @@ async function handleList(argv: Partial>, _prompter: Inq provisions: true, publicSchemaName: true, publicUrlPrefix: true, + region: true, restrictReads: true, schemaId: true, scope: true, @@ -210,6 +212,7 @@ async function handleFindFirst(argv: Partial>, _prompter provisions: true, publicSchemaName: true, publicUrlPrefix: true, + region: true, restrictReads: true, schemaId: true, scope: true, @@ -284,6 +287,7 @@ async function handleGet(argv: Partial>, prompter: Inqui provisions: true, publicSchemaName: true, publicUrlPrefix: true, + region: true, restrictReads: true, schemaId: true, scope: true, @@ -561,6 +565,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'region', + message: 'region', + required: false, + skipPrompt: true, + }, { type: 'boolean', name: 'restrictReads', @@ -635,6 +646,7 @@ async function handleCreate(argv: Partial>, prompter: In provisions: cleanedData.provisions, publicSchemaName: cleanedData.publicSchemaName, publicUrlPrefix: cleanedData.publicUrlPrefix, + region: cleanedData.region, restrictReads: cleanedData.restrictReads, schemaId: cleanedData.schemaId, scope: cleanedData.scope, @@ -679,6 +691,7 @@ async function handleCreate(argv: Partial>, prompter: In provisions: true, publicSchemaName: true, publicUrlPrefix: true, + region: true, restrictReads: true, schemaId: true, scope: true, @@ -962,6 +975,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'region', + message: 'region', + required: false, + skipPrompt: true, + }, { type: 'boolean', name: 'restrictReads', @@ -1036,6 +1056,7 @@ async function handleUpdate(argv: Partial>, prompter: In provisions: cleanedData.provisions, publicSchemaName: cleanedData.publicSchemaName, publicUrlPrefix: cleanedData.publicUrlPrefix, + region: cleanedData.region, restrictReads: cleanedData.restrictReads, schemaId: cleanedData.schemaId, scope: cleanedData.scope, @@ -1080,6 +1101,7 @@ async function handleUpdate(argv: Partial>, prompter: In provisions: true, publicSchemaName: true, publicUrlPrefix: true, + region: true, restrictReads: true, schemaId: true, scope: true, diff --git a/sdk/constructive-cli/src/modules/orm/README.md b/sdk/constructive-cli/src/modules/orm/README.md index 10eaf83b29..73e6574eaa 100644 --- a/sdk/constructive-cli/src/modules/orm/README.md +++ b/sdk/constructive-cli/src/modules/orm/README.md @@ -357,6 +357,8 @@ CRUD operations for BillingProviderModule records. | `activatePlanSubscriptionFunction` | String | Yes | | `apiName` | String | Yes | | `applyProviderObservationFunction` | String | Yes | +| `billingConnectionTableId` | UUID | Yes | +| `billingConnectionTableName` | String | Yes | | `billingCustomersTableId` | UUID | Yes | | `billingCustomersTableName` | String | Yes | | `billingDisputesTableId` | UUID | Yes | @@ -371,6 +373,8 @@ CRUD operations for BillingProviderModule records. | `billingPricesTableName` | String | Yes | | `billingProductsTableId` | UUID | Yes | | `billingProductsTableName` | String | Yes | +| `billingProviderConnectedFunction` | String | Yes | +| `billingProviderKeyFunction` | String | Yes | | `billingProviderStateTableId` | UUID | Yes | | `billingProviderStateTableName` | String | Yes | | `billingRefundsTableId` | UUID | Yes | @@ -407,6 +411,7 @@ CRUD operations for BillingProviderModule records. | `processBillingEventFunction` | String | Yes | | `productsTableId` | UUID | Yes | | `provider` | String | Yes | +| `recordBillingConnectionFunction` | String | Yes | | `recordBillingHealthFunction` | String | Yes | | `recordDisputeFunction` | String | Yes | | `recordRefundFunction` | String | Yes | @@ -425,13 +430,13 @@ CRUD operations for BillingProviderModule records. ```typescript // List all billingProviderModule records -const items = await db.billingProviderModule.findMany({ select: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }).execute(); +const items = await db.billingProviderModule.findMany({ select: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingConnectionTableId: true, billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderConnectedFunction: true, billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }).execute(); // Get one by id -const item = await db.billingProviderModule.findOne({ id: '', select: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }).execute(); +const item = await db.billingProviderModule.findOne({ id: '', select: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingConnectionTableId: true, billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderConnectedFunction: true, billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }).execute(); // Create -const created = await db.billingProviderModule.create({ data: { activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }, select: { id: true } }).execute(); +const created = await db.billingProviderModule.create({ data: { activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingConnectionTableId: '', billingConnectionTableName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderConnectedFunction: '', billingProviderKeyFunction: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingConnectionFunction: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }, select: { id: true } }).execute(); // Update const updated = await db.billingProviderModule.update({ where: { id: '' }, data: { activatePlanSubscriptionFunction: '' }, select: { id: true } }).execute(); @@ -493,7 +498,6 @@ CRUD operations for BlueprintConstruction records. | `constructedDefinition` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `errorDetails` | String | Yes | | `id` | UUID | No | | `schemaId` | UUID | Yes | | `status` | String | Yes | @@ -504,13 +508,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, errorDetails: 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, 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, errorDetails: 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, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); // Create -const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', errorDetails: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); +const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); // Update const updated = await db.blueprintConstruction.update({ where: { id: '' }, data: { blueprintId: '' }, select: { id: true } }).execute(); @@ -638,6 +642,8 @@ CRUD operations for CatalogModule records. | `bucketsTableName` | String | Yes | | `databaseId` | UUID | Yes | | `defaultCapabilities` | String | Yes | +| `domainVerificationsTableId` | UUID | Yes | +| `domainVerificationsTableName` | String | Yes | | `domainsTableId` | UUID | Yes | | `domainsTableName` | String | Yes | | `entityTableId` | UUID | Yes | @@ -679,13 +685,13 @@ CRUD operations for CatalogModule records. ```typescript // List all catalogModule records -const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Get one by id -const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Create -const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); +const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.catalogModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -3890,6 +3896,7 @@ CRUD operations for StorageModule records. | `provisions` | JSON | Yes | | `publicSchemaName` | String | Yes | | `publicUrlPrefix` | String | Yes | +| `region` | String | Yes | | `restrictReads` | Boolean | Yes | | `schemaId` | UUID | Yes | | `scope` | String | Yes | @@ -3899,13 +3906,13 @@ CRUD operations for StorageModule records. ```typescript // List all storageModule records -const items = await db.storageModule.findMany({ select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); +const items = await db.storageModule.findMany({ select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, region: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); // Get one by id -const item = await db.storageModule.findOne({ id: '', select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); +const item = await db.storageModule.findOne({ id: '', select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, region: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); // Create -const created = await db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); +const created = await db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', region: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.storageModule.update({ where: { id: '' }, data: { allowedOrigins: '' }, select: { id: true } }).execute(); @@ -4333,7 +4340,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 on success, NULL on failure. +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. - **Type:** mutation - **Arguments:** @@ -4364,10 +4371,11 @@ const result = await db.mutation.copyTemplateToBlueprint({ input: { databaseId: ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **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 4a8fcc7f04..ca44c2dad1 100644 --- a/sdk/constructive-cli/src/modules/orm/input-types.ts +++ b/sdk/constructive-cli/src/modules/orm/input-types.ts @@ -365,6 +365,8 @@ export interface BillingProviderModule { activatePlanSubscriptionFunction?: string | null; apiName?: string | null; applyProviderObservationFunction?: string | null; + billingConnectionTableId?: string | null; + billingConnectionTableName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; billingDisputesTableId?: string | null; @@ -379,6 +381,8 @@ export interface BillingProviderModule { billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingProviderConnectedFunction?: string | null; + billingProviderKeyFunction?: string | null; billingProviderStateTableId?: string | null; billingProviderStateTableName?: string | null; billingRefundsTableId?: string | null; @@ -415,6 +419,7 @@ export interface BillingProviderModule { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordBillingConnectionFunction?: string | null; recordBillingHealthFunction?: string | null; recordDisputeFunction?: string | null; recordRefundFunction?: string | null; @@ -468,13 +473,11 @@ export interface BlueprintConstruction { createdAt?: string | null; /** The database the blueprint was constructed into. */ databaseId?: string | null; - /** Error message from a failed construction attempt. NULL unless status is failed. */ - errorDetails?: string | 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. failed: execution failed (see error_details). */ + /** 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. */ 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; @@ -562,6 +565,8 @@ export interface CatalogModule { bucketsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + domainVerificationsTableId?: string | null; + domainVerificationsTableName?: string | null; domainsTableId?: string | null; domainsTableName?: string | null; entityTableId?: string | null; @@ -2452,6 +2457,7 @@ export interface StorageModule { provisions?: Record | null; publicSchemaName?: string | null; publicUrlPrefix?: string | null; + region?: string | null; restrictReads?: boolean | null; schemaId?: string | null; scope?: string | null; @@ -3054,6 +3060,8 @@ export type BillingProviderModuleSelect = { activatePlanSubscriptionFunction?: boolean; apiName?: boolean; applyProviderObservationFunction?: boolean; + billingConnectionTableId?: boolean; + billingConnectionTableName?: boolean; billingCustomersTableId?: boolean; billingCustomersTableName?: boolean; billingDisputesTableId?: boolean; @@ -3068,6 +3076,8 @@ export type BillingProviderModuleSelect = { billingPricesTableName?: boolean; billingProductsTableId?: boolean; billingProductsTableName?: boolean; + billingProviderConnectedFunction?: boolean; + billingProviderKeyFunction?: boolean; billingProviderStateTableId?: boolean; billingProviderStateTableName?: boolean; billingRefundsTableId?: boolean; @@ -3104,6 +3114,7 @@ export type BillingProviderModuleSelect = { processBillingEventFunction?: boolean; productsTableId?: boolean; provider?: boolean; + recordBillingConnectionFunction?: boolean; recordBillingHealthFunction?: boolean; recordDisputeFunction?: boolean; recordRefundFunction?: boolean; @@ -3147,7 +3158,6 @@ export type BlueprintConstructionSelect = { constructedDefinition?: boolean; createdAt?: boolean; databaseId?: boolean; - errorDetails?: boolean; id?: boolean; schemaId?: boolean; status?: boolean; @@ -3238,6 +3248,8 @@ export type CatalogModuleSelect = { bucketsTableName?: boolean; databaseId?: boolean; defaultCapabilities?: boolean; + domainVerificationsTableId?: boolean; + domainVerificationsTableName?: boolean; domainsTableId?: boolean; domainsTableName?: boolean; entityTableId?: boolean; @@ -4908,6 +4920,7 @@ export type StorageModuleSelect = { provisions?: boolean; publicSchemaName?: boolean; publicUrlPrefix?: boolean; + region?: boolean; restrictReads?: boolean; schemaId?: boolean; scope?: boolean; @@ -5380,6 +5393,10 @@ export interface BillingProviderModuleFilter { apiName?: StringFilter; /** Filter by the object’s `applyProviderObservationFunction` field. */ applyProviderObservationFunction?: StringFilter; + /** Filter by the object’s `billingConnectionTableId` field. */ + billingConnectionTableId?: UUIDFilter; + /** Filter by the object’s `billingConnectionTableName` field. */ + billingConnectionTableName?: StringFilter; /** Filter by the object’s `billingCustomersTableId` field. */ billingCustomersTableId?: UUIDFilter; /** Filter by the object’s `billingCustomersTableName` field. */ @@ -5408,6 +5425,10 @@ export interface BillingProviderModuleFilter { billingProductsTableId?: UUIDFilter; /** Filter by the object’s `billingProductsTableName` field. */ billingProductsTableName?: StringFilter; + /** Filter by the object’s `billingProviderConnectedFunction` field. */ + billingProviderConnectedFunction?: StringFilter; + /** Filter by the object’s `billingProviderKeyFunction` field. */ + billingProviderKeyFunction?: StringFilter; /** Filter by the object’s `billingProviderStateTableId` field. */ billingProviderStateTableId?: UUIDFilter; /** Filter by the object’s `billingProviderStateTableName` field. */ @@ -5484,6 +5505,8 @@ export interface BillingProviderModuleFilter { productsTableId?: UUIDFilter; /** Filter by the object’s `provider` field. */ provider?: StringFilter; + /** Filter by the object’s `recordBillingConnectionFunction` field. */ + recordBillingConnectionFunction?: StringFilter; /** Filter by the object’s `recordBillingHealthFunction` field. */ recordBillingHealthFunction?: StringFilter; /** Filter by the object’s `recordDisputeFunction` field. */ @@ -5566,8 +5589,6 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `errorDetails` field. */ - errorDetails?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -5740,6 +5761,10 @@ export interface CatalogModuleFilter { domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ domainModulesExist?: boolean; + /** Filter by the object’s `domainVerificationsTableId` field. */ + domainVerificationsTableId?: UUIDFilter; + /** Filter by the object’s `domainVerificationsTableName` field. */ + domainVerificationsTableName?: StringFilter; /** Filter by the object’s `domainsTableId` field. */ domainsTableId?: UUIDFilter; /** Filter by the object’s `domainsTableName` field. */ @@ -9120,6 +9145,8 @@ export interface StorageModuleFilter { publicSchemaName?: StringFilter; /** Filter by the object’s `publicUrlPrefix` field. */ publicUrlPrefix?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; /** Filter by the object’s `restrictReads` field. */ restrictReads?: BooleanFilter; /** Filter by the object’s `schemaId` field. */ @@ -9763,6 +9790,10 @@ export type BillingProviderModuleOrderBy = | 'API_NAME_DESC' | 'APPLY_PROVIDER_OBSERVATION_FUNCTION_ASC' | 'APPLY_PROVIDER_OBSERVATION_FUNCTION_DESC' + | 'BILLING_CONNECTION_TABLE_ID_ASC' + | 'BILLING_CONNECTION_TABLE_ID_DESC' + | 'BILLING_CONNECTION_TABLE_NAME_ASC' + | 'BILLING_CONNECTION_TABLE_NAME_DESC' | 'BILLING_CUSTOMERS_TABLE_ID_ASC' | 'BILLING_CUSTOMERS_TABLE_ID_DESC' | 'BILLING_CUSTOMERS_TABLE_NAME_ASC' @@ -9791,6 +9822,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_PRODUCTS_TABLE_ID_DESC' | 'BILLING_PRODUCTS_TABLE_NAME_ASC' | 'BILLING_PRODUCTS_TABLE_NAME_DESC' + | 'BILLING_PROVIDER_CONNECTED_FUNCTION_ASC' + | 'BILLING_PROVIDER_CONNECTED_FUNCTION_DESC' + | 'BILLING_PROVIDER_KEY_FUNCTION_ASC' + | 'BILLING_PROVIDER_KEY_FUNCTION_DESC' | 'BILLING_PROVIDER_STATE_TABLE_ID_ASC' | 'BILLING_PROVIDER_STATE_TABLE_ID_DESC' | 'BILLING_PROVIDER_STATE_TABLE_NAME_ASC' @@ -9866,6 +9901,8 @@ export type BillingProviderModuleOrderBy = | 'PRODUCTS_TABLE_ID_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' + | 'RECORD_BILLING_CONNECTION_FUNCTION_ASC' + | 'RECORD_BILLING_CONNECTION_FUNCTION_DESC' | 'RECORD_BILLING_HEALTH_FUNCTION_ASC' | 'RECORD_BILLING_HEALTH_FUNCTION_DESC' | 'RECORD_DISPUTE_FUNCTION_ASC' @@ -9931,8 +9968,6 @@ export type BlueprintConstructionOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'ERROR_DETAILS_ASC' - | 'ERROR_DETAILS_DESC' | 'ID_ASC' | 'ID_DESC' | 'NATURAL' @@ -10069,6 +10104,10 @@ export type CatalogModuleOrderBy = | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' | 'DOMAINS_TABLE_NAME_DESC' + | 'DOMAIN_VERIFICATIONS_TABLE_ID_ASC' + | 'DOMAIN_VERIFICATIONS_TABLE_ID_DESC' + | 'DOMAIN_VERIFICATIONS_TABLE_NAME_ASC' + | 'DOMAIN_VERIFICATIONS_TABLE_NAME_DESC' | 'ENTITY_TABLE_ID_ASC' | 'ENTITY_TABLE_ID_DESC' | 'FUNCTIONS_TABLE_ID_ASC' @@ -13036,6 +13075,8 @@ export type StorageModuleOrderBy = | 'PUBLIC_SCHEMA_NAME_DESC' | 'PUBLIC_URL_PREFIX_ASC' | 'PUBLIC_URL_PREFIX_DESC' + | 'REGION_ASC' + | 'REGION_DESC' | 'RESTRICT_READS_ASC' | 'RESTRICT_READS_DESC' | 'SCHEMA_ID_ASC' @@ -13661,6 +13702,8 @@ export interface CreateBillingProviderModuleInput { activatePlanSubscriptionFunction?: string; apiName?: string; applyProviderObservationFunction?: string; + billingConnectionTableId?: string; + billingConnectionTableName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; billingDisputesTableId?: string; @@ -13675,6 +13718,8 @@ export interface CreateBillingProviderModuleInput { billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingProviderConnectedFunction?: string; + billingProviderKeyFunction?: string; billingProviderStateTableId?: string; billingProviderStateTableName?: string; billingRefundsTableId?: string; @@ -13710,6 +13755,7 @@ export interface CreateBillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordBillingConnectionFunction?: string; recordBillingHealthFunction?: string; recordDisputeFunction?: string; recordRefundFunction?: string; @@ -13729,6 +13775,8 @@ export interface BillingProviderModulePatch { activatePlanSubscriptionFunction?: string | null; apiName?: string | null; applyProviderObservationFunction?: string | null; + billingConnectionTableId?: string | null; + billingConnectionTableName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; billingDisputesTableId?: string | null; @@ -13743,6 +13791,8 @@ export interface BillingProviderModulePatch { billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingProviderConnectedFunction?: string | null; + billingProviderKeyFunction?: string | null; billingProviderStateTableId?: string | null; billingProviderStateTableName?: string | null; billingRefundsTableId?: string | null; @@ -13778,6 +13828,7 @@ export interface BillingProviderModulePatch { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordBillingConnectionFunction?: string | null; recordBillingHealthFunction?: string | null; recordDisputeFunction?: string | null; recordRefundFunction?: string | null; @@ -13842,7 +13893,6 @@ export interface CreateBlueprintConstructionInput { constructedAt?: string; constructedDefinition?: Record; databaseId: string; - errorDetails?: string; schemaId?: string; status?: string; tableMap?: Record; @@ -13853,7 +13903,6 @@ export interface BlueprintConstructionPatch { constructedAt?: string | null; constructedDefinition?: Record | null; databaseId?: string | null; - errorDetails?: string | null; schemaId?: string | null; status?: string | null; tableMap?: Record | null; @@ -13991,6 +14040,8 @@ export interface CreateCatalogModuleInput { bucketsTableName?: string; databaseId: string; defaultCapabilities?: string[]; + domainVerificationsTableId?: string; + domainVerificationsTableName?: string; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -14042,6 +14093,8 @@ export interface CatalogModulePatch { bucketsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + domainVerificationsTableId?: string | null; + domainVerificationsTableName?: string | null; domainsTableId?: string | null; domainsTableName?: string | null; entityTableId?: string | null; @@ -17585,6 +17638,7 @@ export interface CreateStorageModuleInput { provisions?: Record; publicSchemaName?: string; publicUrlPrefix?: string; + region?: string; restrictReads?: boolean; schemaId?: string; scope: string; @@ -17629,6 +17683,7 @@ export interface StorageModulePatch { provisions?: Record | null; publicSchemaName?: string | null; publicUrlPrefix?: string | null; + region?: string | null; restrictReads?: boolean | null; schemaId?: string | null; scope?: string | null; @@ -18578,6 +18633,8 @@ export interface BillingProviderModuleInput { activatePlanSubscriptionFunction?: string; apiName?: string; applyProviderObservationFunction?: string; + billingConnectionTableId?: string; + billingConnectionTableName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; billingDisputesTableId?: string; @@ -18592,6 +18649,8 @@ export interface BillingProviderModuleInput { billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingProviderConnectedFunction?: string; + billingProviderKeyFunction?: string; billingProviderStateTableId?: string; billingProviderStateTableName?: string; billingRefundsTableId?: string; @@ -18628,6 +18687,7 @@ export interface BillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordBillingConnectionFunction?: string; recordBillingHealthFunction?: string; recordDisputeFunction?: string; recordRefundFunction?: string; @@ -18681,13 +18741,11 @@ export interface BlueprintConstructionInput { createdAt?: string; /** The database the blueprint was constructed into. */ databaseId: string; - /** Error message from a failed construction attempt. NULL unless status is failed. */ - errorDetails?: string; /** 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. failed: execution failed (see error_details). */ + /** 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. */ 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; @@ -18777,6 +18835,8 @@ export interface CatalogModuleInput { bucketsTableName?: string; databaseId: string; defaultCapabilities?: string[]; + domainVerificationsTableId?: string; + domainVerificationsTableName?: string; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -20697,6 +20757,7 @@ export interface StorageModuleInput { provisions?: Record; publicSchemaName?: string; publicUrlPrefix?: string; + region?: string; restrictReads?: boolean; schemaId?: string; scope: string; @@ -20884,8 +20945,6 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `errorDetails` field. */ - errorDetails?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -22348,6 +22407,10 @@ export interface CatalogModuleFilter { domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ domainModulesExist?: boolean; + /** Filter by the object’s `domainVerificationsTableId` field. */ + domainVerificationsTableId?: UUIDFilter; + /** Filter by the object’s `domainVerificationsTableName` field. */ + domainVerificationsTableName?: StringFilter; /** Filter by the object’s `domainsTableId` field. */ domainsTableId?: UUIDFilter; /** Filter by the object’s `domainsTableName` field. */ @@ -22814,6 +22877,8 @@ export interface StorageModuleFilter { publicSchemaName?: StringFilter; /** Filter by the object’s `publicUrlPrefix` field. */ publicUrlPrefix?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; /** Filter by the object’s `restrictReads` field. */ restrictReads?: BooleanFilter; /** Filter by the object’s `schemaId` field. */ @@ -22866,19 +22931,19 @@ export type CopyTemplateToBlueprintPayloadSelect = { result?: boolean; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface CreateAgentModulePayload { /** The `AgentModule` that was created by this mutation. */ diff --git a/sdk/constructive-cli/src/modules/orm/mutation/index.ts b/sdk/constructive-cli/src/modules/orm/mutation/index.ts index 6cda508cf6..e59de99a2e 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 on success, NULL on failure. + * 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. */ export interface ConstructBlueprintVariables { input: ConstructBlueprintInput; @@ -35,10 +35,11 @@ export interface CopyTemplateToBlueprintVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-cli/src/objects/cli/README.md b/sdk/constructive-cli/src/objects/cli/README.md index a85bd2fd36..d32e2e93d9 100644 --- a/sdk/constructive-cli/src/objects/cli/README.md +++ b/sdk/constructive-cli/src/objects/cli/README.md @@ -35,10 +35,11 @@ csdk auth set-token | `insert-node-at-path` | insertNodeAtPath | | `insert-nodes-at-paths` | insertNodesAtPaths | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `set-and-commit` | setAndCommit | | `set-data-at-path` | setDataAtPath | | `set-many-and-commit` | setManyAndCommit | @@ -267,10 +268,11 @@ insertNodesAtPaths ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/objects/cli/commands.ts b/sdk/constructive-cli/src/objects/cli/commands.ts index 1937931d34..38ca833354 100644 --- a/sdk/constructive-cli/src/objects/cli/commands.ts +++ b/sdk/constructive-cli/src/objects/cli/commands.ts @@ -42,7 +42,7 @@ const createCommandMap: () => Record< 'set-many-and-commit': setManyAndCommitCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n commit commit CRUD operations\n get-all-tree-nodes-record getAllTreeNodesRecord CRUD operations\n object object CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n init-empty-repo initEmptyRepo\n insert-node-at-path insertNodeAtPath\n insert-nodes-at-paths insertNodesAtPaths\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n set-and-commit setAndCommit\n set-data-at-path setDataAtPath\n set-many-and-commit setManyAndCommit\n\n --help, -h Show this help message\n --version, -v Show version\n'; + "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n commit commit CRUD operations\n get-all-tree-nodes-record getAllTreeNodesRecord CRUD operations\n object object CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n init-empty-repo initEmptyRepo\n insert-node-at-path insertNodeAtPath\n insert-nodes-at-paths insertNodesAtPaths\n provision-bucket 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 set-and-commit setAndCommit\n set-data-at-path setDataAtPath\n set-many-and-commit setManyAndCommit\n\n --help, -h Show this help message\n --version, -v Show version\n"; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/objects/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/objects/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/objects/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/objects/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/objects/orm/README.md b/sdk/constructive-cli/src/objects/orm/README.md index d56b4a6254..866cd6f1ef 100644 --- a/sdk/constructive-cli/src/objects/orm/README.md +++ b/sdk/constructive-cli/src/objects/orm/README.md @@ -246,10 +246,11 @@ const result = await db.mutation.insertNodesAtPaths({ input: ' | `machine-session` | machineSession CRUD operations | | `machines-enroll` | machinesEnroll | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | ## Infrastructure Commands @@ -217,10 +218,11 @@ machinesEnroll ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/remote/cli/commands.ts b/sdk/constructive-cli/src/remote/cli/commands.ts index 71cb98f77f..e51b43e0e5 100644 --- a/sdk/constructive-cli/src/remote/cli/commands.ts +++ b/sdk/constructive-cli/src/remote/cli/commands.ts @@ -28,7 +28,7 @@ const createCommandMap: () => Record< '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.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\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 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/remote/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/remote/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/remote/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/remote/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/remote/orm/README.md b/sdk/constructive-cli/src/remote/orm/README.md index da9b9fbf02..eb2fdd09aa 100644 --- a/sdk/constructive-cli/src/remote/orm/README.md +++ b/sdk/constructive-cli/src/remote/orm/README.md @@ -187,10 +187,11 @@ const result = await db.mutation.machinesEnroll({ input: { entityId: '', i ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/remote/orm/input-types.ts b/sdk/constructive-cli/src/remote/orm/input-types.ts index 5de4f639ba..c69a2483d7 100644 --- a/sdk/constructive-cli/src/remote/orm/input-types.ts +++ b/sdk/constructive-cli/src/remote/orm/input-types.ts @@ -1447,19 +1447,19 @@ export type MachinesEnrollPayloadSelect = { result?: boolean; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface CreateMachinePayload { clientMutationId?: string | null; diff --git a/sdk/constructive-cli/src/remote/orm/mutation/index.ts b/sdk/constructive-cli/src/remote/orm/mutation/index.ts index 7108c9c67c..b9bbf8ec3a 100644 --- a/sdk/constructive-cli/src/remote/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/remote/orm/mutation/index.ts @@ -21,10 +21,11 @@ export interface MachinesEnrollVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-cli/src/storage/cli/README.md b/sdk/constructive-cli/src/storage/cli/README.md index 81c0a7402a..9074edd5bb 100644 --- a/sdk/constructive-cli/src/storage/cli/README.md +++ b/sdk/constructive-cli/src/storage/cli/README.md @@ -33,14 +33,15 @@ csdk auth set-token | `files-rename` | filesRename | | `platform-files-rename` | platformFilesRename | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `upload-file` | Upload a file: resolves the bucket by key, creates the file row, and returns a presigned PUT URL. | -| `upload-files` | Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. | +| `upload-files` | Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. | | `upload-platform-file` | Upload a file: resolves the bucket by key, creates the file row, and returns a presigned PUT URL. | -| `upload-platform-files` | Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. | +| `upload-platform-files` | Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. | ## Infrastructure Commands @@ -111,15 +112,17 @@ CRUD operations for Bucket records. | `id` | UUID | | `isPublic` | Boolean | | `key` | String | +| `maxBulkFiles` | Int | | `maxFileSize` | BigInt | | `physicalName` | String | +| `provisionRequestedAt` | Datetime | | `stagingTtl` | Interval | | `tags` | String | | `type` | BucketType | | `updatedAt` | Datetime | **Required create fields:** `actorId`, `databaseId`, `key` -**Optional create fields (backend defaults):** `allowCustomKeys`, `allowedMimeTypes`, `allowedOrigins`, `description`, `destinationBucketId`, `isPublic`, `maxFileSize`, `physicalName`, `stagingTtl`, `tags`, `type` +**Optional create fields (backend defaults):** `allowCustomKeys`, `allowedMimeTypes`, `allowedOrigins`, `description`, `destinationBucketId`, `isPublic`, `maxFileSize`, `physicalName`, `provisionRequestedAt`, `stagingTtl`, `tags`, `type` ### `file` @@ -189,15 +192,17 @@ CRUD operations for PlatformBucket records. | `id` | UUID | | `isPublic` | Boolean | | `key` | String | +| `maxBulkFiles` | Int | | `maxFileSize` | BigInt | | `physicalName` | String | +| `provisionRequestedAt` | Datetime | | `stagingTtl` | Interval | | `tags` | String | | `type` | BucketType | | `updatedAt` | Datetime | **Required create fields:** `actorId`, `key` -**Optional create fields (backend defaults):** `allowCustomKeys`, `allowedMimeTypes`, `allowedOrigins`, `description`, `destinationBucketId`, `isPublic`, `maxFileSize`, `physicalName`, `stagingTtl`, `tags`, `type` +**Optional create fields (backend defaults):** `allowCustomKeys`, `allowedMimeTypes`, `allowedOrigins`, `description`, `destinationBucketId`, `isPublic`, `maxFileSize`, `physicalName`, `provisionRequestedAt`, `stagingTtl`, `tags`, `type` ### `platform-file` @@ -270,10 +275,11 @@ platformFilesRename ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** @@ -302,7 +308,7 @@ Upload a file: resolves the bucket by key, creates the file row, and returns a p ### `upload-files` -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. - **Type:** mutation - **Arguments:** @@ -332,7 +338,7 @@ Upload a file: resolves the bucket by key, creates the file row, and returns a p ### `upload-platform-files` -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/storage/cli/commands.ts b/sdk/constructive-cli/src/storage/cli/commands.ts index cccd55c4c7..fd15e0511a 100644 --- a/sdk/constructive-cli/src/storage/cli/commands.ts +++ b/sdk/constructive-cli/src/storage/cli/commands.ts @@ -40,7 +40,7 @@ const createCommandMap: () => Record< 'upload-platform-files': uploadPlatformFilesCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n bucket bucket CRUD operations\n file file CRUD operations\n platform-bucket platformBucket CRUD operations\n platform-file platformFile CRUD operations\n files-rename filesRename\n platform-files-rename platformFilesRename\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n upload-file Upload a file: resolves the bucket by key, creates the file row, and returns a presigned PUT URL.\n upload-files Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each.\n upload-platform-file Upload a file: resolves the bucket by key, creates the file row, and returns a presigned PUT URL.\n upload-platform-files Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each.\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 bucket bucket CRUD operations\n file file CRUD operations\n platform-bucket platformBucket CRUD operations\n platform-file platformFile CRUD operations\n files-rename filesRename\n platform-files-rename platformFilesRename\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 upload-file Upload a file: resolves the bucket by key, creates the file row, and returns a presigned PUT URL.\n upload-files Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call.\n upload-platform-file Upload a file: resolves the bucket by key, creates the file row, and returns a presigned PUT URL.\n upload-platform-files Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call.\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/storage/cli/commands/bucket.ts b/sdk/constructive-cli/src/storage/cli/commands/bucket.ts index aedb8aafa5..b2ddd87364 100644 --- a/sdk/constructive-cli/src/storage/cli/commands/bucket.ts +++ b/sdk/constructive-cli/src/storage/cli/commands/bucket.ts @@ -27,8 +27,10 @@ const fieldSchema: FieldSchema = { id: 'uuid', isPublic: 'boolean', key: 'string', + maxBulkFiles: 'int', maxFileSize: 'int', physicalName: 'string', + provisionRequestedAt: 'string', stagingTtl: 'string', tags: 'string', type: 'string', @@ -98,6 +100,7 @@ async function handleList(argv: Partial>, _prompter: Inq key: true, maxFileSize: true, physicalName: true, + provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, @@ -135,6 +138,7 @@ async function handleFindFirst(argv: Partial>, _prompter key: true, maxFileSize: true, physicalName: true, + provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, @@ -184,6 +188,7 @@ async function handleGet(argv: Partial>, prompter: Inqui key: true, maxFileSize: true, physicalName: true, + provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, @@ -277,6 +282,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'provisionRequestedAt', + message: 'provisionRequestedAt', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'stagingTtl', @@ -316,6 +328,7 @@ async function handleCreate(argv: Partial>, prompter: In key: cleanedData.key, maxFileSize: cleanedData.maxFileSize, physicalName: cleanedData.physicalName, + provisionRequestedAt: cleanedData.provisionRequestedAt, stagingTtl: cleanedData.stagingTtl, tags: cleanedData.tags, type: cleanedData.type, @@ -334,6 +347,7 @@ async function handleCreate(argv: Partial>, prompter: In key: true, maxFileSize: true, physicalName: true, + provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, @@ -433,6 +447,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'provisionRequestedAt', + message: 'provisionRequestedAt', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'stagingTtl', @@ -475,6 +496,7 @@ async function handleUpdate(argv: Partial>, prompter: In key: cleanedData.key, maxFileSize: cleanedData.maxFileSize, physicalName: cleanedData.physicalName, + provisionRequestedAt: cleanedData.provisionRequestedAt, stagingTtl: cleanedData.stagingTtl, tags: cleanedData.tags, type: cleanedData.type, @@ -493,6 +515,7 @@ async function handleUpdate(argv: Partial>, prompter: In key: true, maxFileSize: true, physicalName: true, + provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, diff --git a/sdk/constructive-cli/src/storage/cli/commands/platform-bucket.ts b/sdk/constructive-cli/src/storage/cli/commands/platform-bucket.ts index cb123ae821..af9b5e90ac 100644 --- a/sdk/constructive-cli/src/storage/cli/commands/platform-bucket.ts +++ b/sdk/constructive-cli/src/storage/cli/commands/platform-bucket.ts @@ -26,8 +26,10 @@ const fieldSchema: FieldSchema = { id: 'uuid', isPublic: 'boolean', key: 'string', + maxBulkFiles: 'int', maxFileSize: 'int', physicalName: 'string', + provisionRequestedAt: 'string', stagingTtl: 'string', tags: 'string', type: 'string', @@ -96,6 +98,7 @@ async function handleList(argv: Partial>, _prompter: Inq key: true, maxFileSize: true, physicalName: true, + provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, @@ -132,6 +135,7 @@ async function handleFindFirst(argv: Partial>, _prompter key: true, maxFileSize: true, physicalName: true, + provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, @@ -180,6 +184,7 @@ async function handleGet(argv: Partial>, prompter: Inqui key: true, maxFileSize: true, physicalName: true, + provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, @@ -267,6 +272,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'provisionRequestedAt', + message: 'provisionRequestedAt', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'stagingTtl', @@ -308,6 +320,7 @@ async function handleCreate(argv: Partial>, prompter: In key: cleanedData.key, maxFileSize: cleanedData.maxFileSize, physicalName: cleanedData.physicalName, + provisionRequestedAt: cleanedData.provisionRequestedAt, stagingTtl: cleanedData.stagingTtl, tags: cleanedData.tags, type: cleanedData.type, @@ -325,6 +338,7 @@ async function handleCreate(argv: Partial>, prompter: In key: true, maxFileSize: true, physicalName: true, + provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, @@ -418,6 +432,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'provisionRequestedAt', + message: 'provisionRequestedAt', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'stagingTtl', @@ -459,6 +480,7 @@ async function handleUpdate(argv: Partial>, prompter: In key: cleanedData.key, maxFileSize: cleanedData.maxFileSize, physicalName: cleanedData.physicalName, + provisionRequestedAt: cleanedData.provisionRequestedAt, stagingTtl: cleanedData.stagingTtl, tags: cleanedData.tags, type: cleanedData.type, @@ -476,6 +498,7 @@ async function handleUpdate(argv: Partial>, prompter: In key: true, maxFileSize: true, physicalName: true, + provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, diff --git a/sdk/constructive-cli/src/storage/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/storage/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/storage/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/storage/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/storage/cli/commands/upload-files.ts b/sdk/constructive-cli/src/storage/cli/commands/upload-files.ts index d68f275a68..3d439c0af9 100644 --- a/sdk/constructive-cli/src/storage/cli/commands/upload-files.ts +++ b/sdk/constructive-cli/src/storage/cli/commands/upload-files.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'upload-files - Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each.\n\nUsage: upload-files [OPTIONS]\n' + "upload-files - Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call.\n\nUsage: upload-files [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/storage/cli/commands/upload-platform-files.ts b/sdk/constructive-cli/src/storage/cli/commands/upload-platform-files.ts index d4228d8b81..2ffa8b8b9d 100644 --- a/sdk/constructive-cli/src/storage/cli/commands/upload-platform-files.ts +++ b/sdk/constructive-cli/src/storage/cli/commands/upload-platform-files.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'upload-platform-files - Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each.\n\nUsage: upload-platform-files [OPTIONS]\n' + "upload-platform-files - Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call.\n\nUsage: upload-platform-files [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/storage/orm/README.md b/sdk/constructive-cli/src/storage/orm/README.md index a72925c67d..a4e42cc98d 100644 --- a/sdk/constructive-cli/src/storage/orm/README.md +++ b/sdk/constructive-cli/src/storage/orm/README.md @@ -47,8 +47,10 @@ CRUD operations for Bucket records. | `id` | UUID | No | | `isPublic` | Boolean | Yes | | `key` | String | Yes | +| `maxBulkFiles` | Int | Yes | | `maxFileSize` | BigInt | Yes | | `physicalName` | String | Yes | +| `provisionRequestedAt` | Datetime | Yes | | `stagingTtl` | Interval | Yes | | `tags` | String | Yes | | `type` | BucketType | Yes | @@ -58,13 +60,13 @@ CRUD operations for Bucket records. ```typescript // List all bucket records -const items = await db.bucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const items = await db.bucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.bucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const item = await db.bucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Create -const created = await db.bucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); +const created = await db.bucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); // Update const updated = await db.bucket.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -139,8 +141,10 @@ CRUD operations for PlatformBucket records. | `id` | UUID | No | | `isPublic` | Boolean | Yes | | `key` | String | Yes | +| `maxBulkFiles` | Int | Yes | | `maxFileSize` | BigInt | Yes | | `physicalName` | String | Yes | +| `provisionRequestedAt` | Datetime | Yes | | `stagingTtl` | Interval | Yes | | `tags` | String | Yes | | `type` | BucketType | Yes | @@ -150,13 +154,13 @@ CRUD operations for PlatformBucket records. ```typescript // List all platformBucket records -const items = await db.platformBucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const items = await db.platformBucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.platformBucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const item = await db.platformBucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Create -const created = await db.platformBucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); +const created = await db.platformBucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformBucket.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -247,10 +251,11 @@ const result = await db.mutation.platformFilesRename({ input: { fileId: '' ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** @@ -280,7 +285,7 @@ const result = await db.mutation.uploadFile({ input: '' }).exec ### `db.mutation.uploadFiles` -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. - **Type:** mutation - **Arguments:** @@ -310,7 +315,7 @@ const result = await db.mutation.uploadPlatformFile({ input: ' | `capture-app-limit-defaults` | captureAppLimitDefaults | | `capture-org-limit-defaults` | captureOrgLimitDefaults | | `provision-bucket` | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `seed-app-limit-caps-defaults` | seedAppLimitCapsDefaults | | `seed-app-limit-defaults` | seedAppLimitDefaults | | `seed-org-limit-caps-defaults` | seedOrgLimitCapsDefaults | @@ -621,10 +622,11 @@ captureOrgLimitDefaults ### `provision-bucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/usage/cli/commands.ts b/sdk/constructive-cli/src/usage/cli/commands.ts index d997f5cb77..cdba1bcf3e 100644 --- a/sdk/constructive-cli/src/usage/cli/commands.ts +++ b/sdk/constructive-cli/src/usage/cli/commands.ts @@ -68,7 +68,7 @@ const createCommandMap: () => Record< 'seed-org-limit-defaults': seedOrgLimitDefaultsCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n app-limit-cap appLimitCap CRUD operations\n app-limit-caps-default appLimitCapsDefault CRUD operations\n app-limit appLimit CRUD operations\n app-limit-credit-code appLimitCreditCode CRUD operations\n app-limit-credit-code-item appLimitCreditCodeItem CRUD operations\n app-limit-credit appLimitCredit CRUD operations\n app-limit-credit-redemption appLimitCreditRedemption CRUD operations\n app-limit-default appLimitDefault CRUD operations\n app-limit-event appLimitEvent CRUD operations\n app-limit-warning appLimitWarning CRUD operations\n org-limit-aggregate orgLimitAggregate CRUD operations\n org-limit-cap orgLimitCap CRUD operations\n org-limit-caps-default orgLimitCapsDefault CRUD operations\n org-limit orgLimit CRUD operations\n org-limit-credit orgLimitCredit CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n org-limit-event orgLimitEvent CRUD operations\n org-limit-warning orgLimitWarning CRUD operations\n capture-app-limit-defaults captureAppLimitDefaults\n capture-org-limit-defaults captureOrgLimitDefaults\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n seed-app-limit-caps-defaults seedAppLimitCapsDefaults\n seed-app-limit-defaults seedAppLimitDefaults\n seed-org-limit-caps-defaults seedOrgLimitCapsDefaults\n seed-org-limit-defaults seedOrgLimitDefaults\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 app-limit-cap appLimitCap CRUD operations\n app-limit-caps-default appLimitCapsDefault CRUD operations\n app-limit appLimit CRUD operations\n app-limit-credit-code appLimitCreditCode CRUD operations\n app-limit-credit-code-item appLimitCreditCodeItem CRUD operations\n app-limit-credit appLimitCredit CRUD operations\n app-limit-credit-redemption appLimitCreditRedemption CRUD operations\n app-limit-default appLimitDefault CRUD operations\n app-limit-event appLimitEvent CRUD operations\n app-limit-warning appLimitWarning CRUD operations\n org-limit-aggregate orgLimitAggregate CRUD operations\n org-limit-cap orgLimitCap CRUD operations\n org-limit-caps-default orgLimitCapsDefault CRUD operations\n org-limit orgLimit CRUD operations\n org-limit-credit orgLimitCredit CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n org-limit-event orgLimitEvent CRUD operations\n org-limit-warning orgLimitWarning CRUD operations\n capture-app-limit-defaults captureAppLimitDefaults\n capture-org-limit-defaults captureOrgLimitDefaults\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 seed-app-limit-caps-defaults seedAppLimitCapsDefaults\n seed-app-limit-defaults seedAppLimitDefaults\n seed-org-limit-caps-defaults seedOrgLimitCapsDefaults\n seed-org-limit-defaults seedOrgLimitDefaults\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/usage/cli/commands/provision-bucket.ts b/sdk/constructive-cli/src/usage/cli/commands/provision-bucket.ts index 0c54313d78..adc4f74c2f 100644 --- a/sdk/constructive-cli/src/usage/cli/commands/provision-bucket.ts +++ b/sdk/constructive-cli/src/usage/cli/commands/provision-bucket.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n\nUsage: provision-bucket [OPTIONS]\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\nUsage: provision-bucket [OPTIONS]\n" ); process.exit(0); } diff --git a/sdk/constructive-cli/src/usage/orm/README.md b/sdk/constructive-cli/src/usage/orm/README.md index 945acdcb20..d9d68539b7 100644 --- a/sdk/constructive-cli/src/usage/orm/README.md +++ b/sdk/constructive-cli/src/usage/orm/README.md @@ -703,10 +703,11 @@ const result = await db.query.captureOrgLimitDefaults().execute(); ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-cli/src/usage/orm/input-types.ts b/sdk/constructive-cli/src/usage/orm/input-types.ts index 98fcbd6020..8b9bc4f3ed 100644 --- a/sdk/constructive-cli/src/usage/orm/input-types.ts +++ b/sdk/constructive-cli/src/usage/orm/input-types.ts @@ -2856,19 +2856,19 @@ export interface DatetimeFilter { } // ============ Payload/Return Types (for custom operations) ============ export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface SeedAppLimitCapsDefaultsPayload { clientMutationId?: string | null; diff --git a/sdk/constructive-cli/src/usage/orm/mutation/index.ts b/sdk/constructive-cli/src/usage/orm/mutation/index.ts index 4c768de780..efa329cb55 100644 --- a/sdk/constructive-cli/src/usage/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/usage/orm/mutation/index.ts @@ -27,10 +27,11 @@ import { connectionFieldsMap } from '../input-types'; /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-react/src/admin/hooks/README.md b/sdk/constructive-react/src/admin/hooks/README.md index 68cf8f9a1a..9ec9e73be9 100644 --- a/sdk/constructive-react/src/admin/hooks/README.md +++ b/sdk/constructive-react/src/admin/hooks/README.md @@ -173,10 +173,11 @@ function App() { | `useProvisionAppUserMutation` | Mutation | provisionAppUser | | `useProvisionAppUsersBulkMutation` | Mutation | provisionAppUsersBulk | | `useProvisionBucketMutation` | Mutation | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `useProvisionOrgUserMutation` | Mutation | provisionOrgUser | | `useProvisionOrgUsersBulkMutation` | Mutation | provisionOrgUsersBulk | | `useSubmitAppInviteCodeMutation` | Mutation | submitAppInviteCode | @@ -835,10 +836,11 @@ provisionAppUsersBulk ### `useProvisionBucketMutation` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/admin/orm/README.md b/sdk/constructive-react/src/admin/orm/README.md index 72b44660f4..0a5e8c1664 100644 --- a/sdk/constructive-react/src/admin/orm/README.md +++ b/sdk/constructive-react/src/admin/orm/README.md @@ -1171,10 +1171,11 @@ const result = await db.mutation.provisionAppUsersBulk({ input: { users: ' ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/admin/orm/input-types.ts b/sdk/constructive-react/src/admin/orm/input-types.ts index dc19216eb3..9bc1f6a8e9 100644 --- a/sdk/constructive-react/src/admin/orm/input-types.ts +++ b/sdk/constructive-react/src/admin/orm/input-types.ts @@ -3753,19 +3753,19 @@ export type ProvisionAppUsersBulkPayloadSelect = { }; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface ProvisionOrgUserPayload { clientMutationId?: string | null; diff --git a/sdk/constructive-react/src/admin/orm/mutation/index.ts b/sdk/constructive-react/src/admin/orm/mutation/index.ts index aab974f285..026cab2abe 100644 --- a/sdk/constructive-react/src/admin/orm/mutation/index.ts +++ b/sdk/constructive-react/src/admin/orm/mutation/index.ts @@ -51,10 +51,11 @@ export interface ProvisionAppUsersBulkVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-react/src/admin/schema-types.ts b/sdk/constructive-react/src/admin/schema-types.ts index 326dd33c88..eb45142cdc 100644 --- a/sdk/constructive-react/src/admin/schema-types.ts +++ b/sdk/constructive-react/src/admin/schema-types.ts @@ -3178,13 +3178,13 @@ export interface ProvisionAppUsersBulkPayload { result?: ProvisionAppUsersBulkRecord[] | null; } export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export interface ProvisionOrgUserPayload { clientMutationId?: string | null; diff --git a/sdk/constructive-react/src/agent/hooks/README.md b/sdk/constructive-react/src/agent/hooks/README.md index 7954677969..d6393fc930 100644 --- a/sdk/constructive-react/src/agent/hooks/README.md +++ b/sdk/constructive-react/src/agent/hooks/README.md @@ -153,10 +153,11 @@ function App() { | `useUpdatePlatformAgentThreadMutation` | Mutation | Top-level AI/LLM conversation thread | | `useDeletePlatformAgentThreadMutation` | Mutation | Top-level AI/LLM conversation thread | | `useProvisionBucketMutation` | Mutation | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | ## Table Hooks @@ -669,10 +670,11 @@ create({ agentId: '', archivedAt: '', isArchived: '', m ### `useProvisionBucketMutation` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/agent/orm/README.md b/sdk/constructive-react/src/agent/orm/README.md index e9f31a411e..a201a35f2d 100644 --- a/sdk/constructive-react/src/agent/orm/README.md +++ b/sdk/constructive-react/src/agent/orm/README.md @@ -1120,10 +1120,11 @@ const deleted = await db.platformAgentThread.delete({ where: { id: '' } }) ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/agent/orm/input-types.ts b/sdk/constructive-react/src/agent/orm/input-types.ts index 09297a55e7..203bbeda25 100644 --- a/sdk/constructive-react/src/agent/orm/input-types.ts +++ b/sdk/constructive-react/src/agent/orm/input-types.ts @@ -7257,19 +7257,19 @@ export interface FullTextFilter { } // ============ Payload/Return Types (for custom operations) ============ export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface CreateAgentPayload { /** The `Agent` that was created by this mutation. */ diff --git a/sdk/constructive-react/src/agent/orm/mutation/index.ts b/sdk/constructive-react/src/agent/orm/mutation/index.ts index 5491e16cd0..ed171c95f7 100644 --- a/sdk/constructive-react/src/agent/orm/mutation/index.ts +++ b/sdk/constructive-react/src/agent/orm/mutation/index.ts @@ -15,10 +15,11 @@ import { connectionFieldsMap } from '../input-types'; /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-react/src/agent/schema-types.ts b/sdk/constructive-react/src/agent/schema-types.ts index 514dd2d858..11db8cff08 100644 --- a/sdk/constructive-react/src/agent/schema-types.ts +++ b/sdk/constructive-react/src/agent/schema-types.ts @@ -4600,13 +4600,13 @@ export interface DeletePlatformAgentThreadPayload { platformAgentThreadEdge?: PlatformAgentThreadEdge | null; } export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export interface UpdateAgentPayload { /** The `Agent` that was updated by this mutation. */ diff --git a/sdk/constructive-react/src/api/README.md b/sdk/constructive-react/src/api/README.md index 54fdc105c4..ed648007ba 100644 --- a/sdk/constructive-react/src/api/README.md +++ b/sdk/constructive-react/src/api/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 92 -- **Custom queries:** 17 -- **Custom mutations:** 29 +- **Tables:** 90 +- **Custom queries:** 18 +- **Custom mutations:** 31 **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 ec1c0feccb..b723c91d0a 100644 --- a/sdk/constructive-react/src/api/hooks/README.md +++ b/sdk/constructive-react/src/api/hooks/README.md @@ -174,11 +174,6 @@ function App() { | `useDeleteFunctionMutation` | Mutation | Delete a function | | `useGetSitePreviewsQuery` | Query | List all getSitePreviews | | `useCreateGetSitePreviewsRecordMutation` | Mutation | Create a getSitePreviewsRecord | -| `useHostnameBindingsQuery` | Query | Compiled hostname index maintained by domain sync triggers; read only through the resolver | -| `useHostnameBindingQuery` | Query | Compiled hostname index maintained by domain sync triggers; read only through the resolver | -| `useCreateHostnameBindingMutation` | Mutation | Compiled hostname index maintained by domain sync triggers; read only through the resolver | -| `useUpdateHostnameBindingMutation` | Mutation | Compiled hostname index maintained by domain sync triggers; read only through the resolver | -| `useDeleteHostnameBindingMutation` | Mutation | Compiled hostname index maintained by domain sync triggers; read only through the resolver | | `useIdentityProviderRegistriesQuery` | Query | List all identityProviderRegistries | | `useIdentityProviderRegistryQuery` | Query | Get one identityProviderRegistry | | `useCreateIdentityProviderRegistryMutation` | Mutation | Create a identityProviderRegistry | @@ -346,11 +341,6 @@ function App() { | `useCreateRlsSettingMutation` | Mutation | RLS module runtime configuration; typed references to the authenticate/current_role function plumbing | | `useUpdateRlsSettingMutation` | Mutation | RLS module runtime configuration; typed references to the authenticate/current_role function plumbing | | `useDeleteRlsSettingMutation` | Mutation | RLS module runtime configuration; typed references to the authenticate/current_role function plumbing | -| `useRouteBindingsQuery` | Query | Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver | -| `useRouteBindingQuery` | Query | Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver | -| `useCreateRouteBindingMutation` | Mutation | Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver | -| `useUpdateRouteBindingMutation` | Mutation | Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver | -| `useDeleteRouteBindingMutation` | Mutation | Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver | | `useRoutesQuery` | Query | Routes binding a domain hostname and path to a typed catalog target | | `useRouteQuery` | Query | Routes binding a domain hostname and path to a typed catalog target | | `useCreateRouteMutation` | Mutation | Routes binding a domain hostname and path to a typed catalog target | @@ -488,6 +478,7 @@ function App() { | `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 | | `useGetSiteReleaseManifestQuery` | Query | getSiteReleaseManifest | | `usePagePublishedQuery` | Query | pagePublished | @@ -506,6 +497,7 @@ function App() { | `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 | @@ -521,10 +513,11 @@ function App() { | `usePlatformSitesInstallMantraMutation` | Mutation | platformSitesInstallMantra | | `usePlatformSitesProvisionStaticSiteMutation` | Mutation | platformSitesProvisionStaticSite | | `useProvisionBucketMutation` | Mutation | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `useProvisionSitePreviewMutation` | Mutation | provisionSitePreview | | `useRejectDatabaseTransferMutation` | Mutation | rejectDatabaseTransfer | | `useRequestDatabaseMutation` | Mutation | Requests a database and returns a ticket (database_provision_module row) to poll. @@ -543,6 +536,7 @@ 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 @@ -1149,27 +1143,6 @@ const { mutate: create } = useCreateGetSitePreviewsRecordMutation({ create({ commitId: '', name: '' }); ``` -### HostnameBinding - -```typescript -// List all hostnameBindings -const { data, isLoading } = useHostnameBindingsQuery({ - selection: { fields: { domainId: true, hostname: true, id: true, isWildcard: true, managed: true, parentHostname: true, tlsSecretName: true, tlsStatus: true, updatedAt: true, verificationStatus: true } }, -}); - -// Get one hostnameBinding -const { data: item } = useHostnameBindingQuery({ - id: '', - selection: { fields: { domainId: true, hostname: true, id: true, isWildcard: true, managed: true, parentHostname: true, tlsSecretName: true, tlsStatus: true, updatedAt: true, verificationStatus: true } }, -}); - -// Create a hostnameBinding -const { mutate: create } = useCreateHostnameBindingMutation({ - selection: { fields: { id: true } }, -}); -create({ domainId: '', hostname: '', isWildcard: '', managed: '', parentHostname: '', tlsSecretName: '', tlsStatus: '', verificationStatus: '' }); -``` - ### IdentityProviderRegistry ```typescript @@ -1238,20 +1211,20 @@ create({ name: '', ownerId: '', suspendedAt: '', suspend ```typescript // List all managedDomains const { data, isLoading } = useManagedDomainsQuery({ - selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, + selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, }); // Get one managedDomain const { data: item } = useManagedDomainQuery({ id: '', - selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, + selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, }); // Create a managedDomain const { mutate: create } = useCreateManagedDomainMutation({ selection: { fields: { id: true } }, }); -create({ allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }); +create({ allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }); ``` ### NodeTypeRegistry @@ -1547,20 +1520,20 @@ create({ commitId: '', name: '' }); ```typescript // List all platformManagedDomains const { data, isLoading } = usePlatformManagedDomainsQuery({ - selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, + selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, }); // Get one platformManagedDomain const { data: item } = usePlatformManagedDomainQuery({ id: '', - selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, + selection: { fields: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }, }); // Create a platformManagedDomain const { mutate: create } = useCreatePlatformManagedDomainMutation({ selection: { fields: { id: true } }, }); -create({ allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }); +create({ allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }); ``` ### PlatformPage @@ -1878,27 +1851,6 @@ const { mutate: create } = useCreateRlsSettingMutation({ create({ authenticateFunctionId: '', authenticateSchemaId: '', authenticateStrictFunctionId: '', currentIpAddressFunctionId: '', currentRoleFunctionId: '', currentRoleIdFunctionId: '', currentUserAgentFunctionId: '', databaseId: '', roleSchemaId: '' }); ``` -### RouteBinding - -```typescript -// List all routeBindings -const { data, isLoading } = useRouteBindingsQuery({ - selection: { fields: { domainId: true, id: true, isActive: true, method: true, path: true, priority: true, servingSiteId: true, targetApiId: true, targetBucketId: true, targetFunctionId: true, targetRedirectId: true, targetServiceId: true, targetSiteId: true, updatedAt: true } }, -}); - -// Get one routeBinding -const { data: item } = useRouteBindingQuery({ - id: '', - selection: { fields: { domainId: true, id: true, isActive: true, method: true, path: true, priority: true, servingSiteId: true, targetApiId: true, targetBucketId: true, targetFunctionId: true, targetRedirectId: true, targetServiceId: true, targetSiteId: true, updatedAt: true } }, -}); - -// Create a routeBinding -const { mutate: create } = useCreateRouteBindingMutation({ - selection: { fields: { id: true } }, -}); -create({ domainId: '', isActive: '', method: '', path: '', priority: '', servingSiteId: '', targetApiId: '', targetBucketId: '', targetFunctionId: '', targetRedirectId: '', targetServiceId: '', targetSiteId: '' }); -``` - ### Route ```typescript @@ -2324,20 +2276,20 @@ create({ databaseId: '', modifier: '', scope: '', sortOrde ```typescript // List all uniqueConstraints const { data, isLoading } = useUniqueConstraintsQuery({ - selection: { fields: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }, + selection: { fields: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }, }); // Get one uniqueConstraint const { data: item } = useUniqueConstraintQuery({ id: '', - selection: { fields: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }, + selection: { fields: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }, }); // Create a uniqueConstraint const { mutate: create } = useCreateUniqueConstraintMutation({ selection: { fields: { id: true } }, }); -create({ category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }); +create({ category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', nullsNotDistinct: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }); ``` ### ViewBehavior @@ -2491,6 +2443,13 @@ applyRegistryDefaults | `data` | JSON | | `nodeType` | String | +### `useEmailSharedAccountQuery` + +emailSharedAccount + +- **Type:** query +- **Arguments:** none + ### `useGetSitePreviewCommitQuery` getSitePreviewCommit @@ -2702,6 +2661,17 @@ cancelDatabaseTransfer |----------|------| | `input` | CancelDatabaseTransferInput (required) | +### `useCreateFunctionFromSourceMutation` + +Creates a `Function` from its `CREATE FUNCTION` source text. + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateFunctionFromSourceInput (required) | + ### `useDeleteSitePreviewMutation` deleteSitePreview @@ -2859,10 +2829,11 @@ platformSitesProvisionStaticSite ### `useProvisionBucketMutation` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** @@ -2998,3 +2969,14 @@ 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 cd2cf49f88..e69ef19c9e 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, HostnameBinding, 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, RouteBinding, 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, 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 39374ac61d..64a35bc6ca 100644 --- a/sdk/constructive-react/src/api/hooks/invalidation.ts +++ b/sdk/constructive-react/src/api/hooks/invalidation.ts @@ -44,7 +44,6 @@ import { fullTextSearchKeys, functionKeys, getSitePreviewsRecordKeys, - hostnameBindingKeys, identityProviderRegistryKeys, indexKeys, listSuspendedDatabasesRecordKeys, @@ -79,7 +78,6 @@ import { pubkeySettingKeys, redirectKeys, rlsSettingKeys, - routeBindingKeys, routeKeys, schemaKeys, schemaGrantKeys, @@ -600,23 +598,6 @@ export const invalidate = { queryKey: getSitePreviewsRecordKeys.detail(id), }), }, - /** Invalidate hostnameBinding queries */ hostnameBinding: { - /** Invalidate all hostnameBinding queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: hostnameBindingKeys.all, - }), - /** Invalidate hostnameBinding list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: hostnameBindingKeys.lists(), - }), - /** Invalidate a specific hostnameBinding */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: hostnameBindingKeys.detail(id), - }), - }, /** Invalidate identityProviderRegistry queries */ identityProviderRegistry: { /** Invalidate all identityProviderRegistry queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1185,23 +1166,6 @@ export const invalidate = { queryKey: rlsSettingKeys.detail(id), }), }, - /** Invalidate routeBinding queries */ routeBinding: { - /** Invalidate all routeBinding queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: routeBindingKeys.all, - }), - /** Invalidate routeBinding list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: routeBindingKeys.lists(), - }), - /** Invalidate a specific routeBinding */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: routeBindingKeys.detail(id), - }), - }, /** Invalidate route queries */ route: { /** Invalidate all route queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1861,14 +1825,6 @@ export const remove = { queryKey: getSitePreviewsRecordKeys.detail(id), }); }, - /** Remove hostnameBinding from cache */ hostnameBinding: ( - queryClient: QueryClient, - id: string | number - ) => { - queryClient.removeQueries({ - queryKey: hostnameBindingKeys.detail(id), - }); - }, /** Remove identityProviderRegistry from cache */ identityProviderRegistry: ( queryClient: QueryClient, id: string | number @@ -2126,14 +2082,6 @@ export const remove = { queryKey: rlsSettingKeys.detail(id), }); }, - /** Remove routeBinding from cache */ routeBinding: ( - queryClient: QueryClient, - id: string | number - ) => { - queryClient.removeQueries({ - queryKey: routeBindingKeys.detail(id), - }); - }, /** Remove route from cache */ route: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: routeKeys.detail(id), diff --git a/sdk/constructive-react/src/api/hooks/mutation-keys.ts b/sdk/constructive-react/src/api/hooks/mutation-keys.ts index 6f6f69253a..8f71c0e390 100644 --- a/sdk/constructive-react/src/api/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/api/hooks/mutation-keys.ts @@ -275,15 +275,6 @@ export const getSitePreviewsRecordMutationKeys = { /** Delete getSitePreviewsRecord mutation key */ delete: (id: string | number) => ['mutation', 'getsitepreviewsrecord', 'delete', id] as const, } as const; -export const hostnameBindingMutationKeys = { - /** All hostnameBinding mutation keys */ all: ['mutation', 'hostnamebinding'] as const, - /** Create hostnameBinding mutation key */ create: () => - ['mutation', 'hostnamebinding', 'create'] as const, - /** Update hostnameBinding mutation key */ update: (id: string | number) => - ['mutation', 'hostnamebinding', 'update', id] as const, - /** Delete hostnameBinding mutation key */ delete: (id: string | number) => - ['mutation', 'hostnamebinding', 'delete', id] as const, -} as const; export const identityProviderRegistryMutationKeys = { /** All identityProviderRegistry mutation keys */ all: [ 'mutation', @@ -617,15 +608,6 @@ export const rlsSettingMutationKeys = { /** Delete rlsSetting mutation key */ delete: (id: string | number) => ['mutation', 'rlssetting', 'delete', id] as const, } as const; -export const routeBindingMutationKeys = { - /** All routeBinding mutation keys */ all: ['mutation', 'routebinding'] as const, - /** Create routeBinding mutation key */ create: () => - ['mutation', 'routebinding', 'create'] as const, - /** Update routeBinding mutation key */ update: (id: string | number) => - ['mutation', 'routebinding', 'update', id] as const, - /** Delete routeBinding mutation key */ delete: (id: string | number) => - ['mutation', 'routebinding', 'delete', id] as const, -} as const; export const routeMutationKeys = { /** All route mutation keys */ all: ['mutation', 'route'] as const, /** Create route mutation key */ create: () => ['mutation', 'route', 'create'] as const, @@ -877,6 +859,12 @@ 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) @@ -1005,6 +993,12 @@ 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; /** @@ -1058,7 +1052,6 @@ export const mutationKeys = { fullTextSearch: fullTextSearchMutationKeys, function: functionMutationKeys, getSitePreviewsRecord: getSitePreviewsRecordMutationKeys, - hostnameBinding: hostnameBindingMutationKeys, identityProviderRegistry: identityProviderRegistryMutationKeys, index: indexMutationKeys, listSuspendedDatabasesRecord: listSuspendedDatabasesRecordMutationKeys, @@ -1093,7 +1086,6 @@ export const mutationKeys = { pubkeySetting: pubkeySettingMutationKeys, redirect: redirectMutationKeys, rlsSetting: rlsSettingMutationKeys, - routeBinding: routeBindingMutationKeys, route: routeMutationKeys, schema: schemaMutationKeys, schemaGrant: schemaGrantMutationKeys, diff --git a/sdk/constructive-react/src/api/hooks/mutations/index.ts b/sdk/constructive-react/src/api/hooks/mutations/index.ts index 2dfe6981f9..213cbbadd2 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/index.ts @@ -86,9 +86,6 @@ export * from './useCreateFunctionMutation'; export * from './useUpdateFunctionMutation'; export * from './useDeleteFunctionMutation'; export * from './useCreateGetSitePreviewsRecordMutation'; -export * from './useCreateHostnameBindingMutation'; -export * from './useUpdateHostnameBindingMutation'; -export * from './useDeleteHostnameBindingMutation'; export * from './useCreateIdentityProviderRegistryMutation'; export * from './useUpdateIdentityProviderRegistryMutation'; export * from './useDeleteIdentityProviderRegistryMutation'; @@ -187,9 +184,6 @@ export * from './useDeleteRedirectMutation'; export * from './useCreateRlsSettingMutation'; export * from './useUpdateRlsSettingMutation'; export * from './useDeleteRlsSettingMutation'; -export * from './useCreateRouteBindingMutation'; -export * from './useUpdateRouteBindingMutation'; -export * from './useDeleteRouteBindingMutation'; export * from './useCreateRouteMutation'; export * from './useUpdateRouteMutation'; export * from './useDeleteRouteMutation'; @@ -272,6 +266,7 @@ export * from './useDeleteWebauthnSettingMutation'; export * from './useAcceptDatabaseTransferMutation'; export * from './useApplyRlsMutation'; export * from './useCancelDatabaseTransferMutation'; +export * from './useCreateFunctionFromSourceMutation'; export * from './useDeleteSitePreviewMutation'; export * from './useDomainsAssignSubdomainMutation'; export * from './useMintSitePreviewTokenMutation'; @@ -298,3 +293,4 @@ 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 new file mode 100644 index 0000000000..10c785d907 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreateFunctionFromSourceMutation.ts @@ -0,0 +1,55 @@ +/** + * 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/useCreateHostnameBindingMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateHostnameBindingMutation.ts deleted file mode 100644 index fc63661581..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useCreateHostnameBindingMutation.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * @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 { hostnameBindingKeys } from '../query-keys'; -import { hostnameBindingMutationKeys } from '../mutation-keys'; -import type { - HostnameBindingSelect, - HostnameBindingWithRelations, - CreateHostnameBindingInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - HostnameBindingSelect, - HostnameBindingWithRelations, - CreateHostnameBindingInput, -} from '../../orm/input-types'; -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateHostnameBindingMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateHostnameBindingMutation( - params: { - selection: { - fields: S & HostnameBindingSelect; - } & HookStrictSelect, HostnameBindingSelect>; - } & Omit< - UseMutationOptions< - { - createHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }, - Error, - CreateHostnameBindingInput['hostnameBinding'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }, - Error, - CreateHostnameBindingInput['hostnameBinding'] ->; -export function useCreateHostnameBindingMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: hostnameBindingMutationKeys.create(), - mutationFn: (data: CreateHostnameBindingInput['hostnameBinding']) => - getClient() - .hostnameBinding.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: hostnameBindingKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreateRouteBindingMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateRouteBindingMutation.ts deleted file mode 100644 index 82421aa2f0..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useCreateRouteBindingMutation.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * @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 { routeBindingKeys } from '../query-keys'; -import { routeBindingMutationKeys } from '../mutation-keys'; -import type { - RouteBindingSelect, - RouteBindingWithRelations, - CreateRouteBindingInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - RouteBindingSelect, - RouteBindingWithRelations, - CreateRouteBindingInput, -} from '../../orm/input-types'; -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateRouteBindingMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateRouteBindingMutation( - params: { - selection: { - fields: S & RouteBindingSelect; - } & HookStrictSelect, RouteBindingSelect>; - } & Omit< - UseMutationOptions< - { - createRouteBinding: { - routeBinding: InferSelectResult; - }; - }, - Error, - CreateRouteBindingInput['routeBinding'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createRouteBinding: { - routeBinding: InferSelectResult; - }; - }, - Error, - CreateRouteBindingInput['routeBinding'] ->; -export function useCreateRouteBindingMutation( - params: { - selection: SelectionConfig; - } & Omit, 'mutationFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: routeBindingMutationKeys.create(), - mutationFn: (data: CreateRouteBindingInput['routeBinding']) => - getClient() - .routeBinding.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: routeBindingKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeleteHostnameBindingMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeleteHostnameBindingMutation.ts deleted file mode 100644 index 4df36c41ed..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useDeleteHostnameBindingMutation.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * @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 { hostnameBindingKeys } from '../query-keys'; -import { hostnameBindingMutationKeys } from '../mutation-keys'; -import type { HostnameBindingSelect, HostnameBindingWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { HostnameBindingSelect, HostnameBindingWithRelations } from '../../orm/input-types'; -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * - * @example - * ```tsx - * const { mutate, isPending } = useDeleteHostnameBindingMutation({ - * selection: { fields: { id: true } }, - * }); - * - * mutate({ id: 'value-to-delete' }); - * ``` - */ -export function useDeleteHostnameBindingMutation( - params: { - selection: { - fields: S & HostnameBindingSelect; - } & HookStrictSelect, HostnameBindingSelect>; - } & Omit< - UseMutationOptions< - { - deleteHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - deleteHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - } ->; -export function useDeleteHostnameBindingMutation( - 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: hostnameBindingMutationKeys.all, - mutationFn: ({ id }: { id: string }) => - getClient() - .hostnameBinding.delete({ - where: { - id, - }, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.removeQueries({ - queryKey: hostnameBindingKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: hostnameBindingKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeleteRouteBindingMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeleteRouteBindingMutation.ts deleted file mode 100644 index e158ed3966..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useDeleteRouteBindingMutation.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * @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 { routeBindingKeys } from '../query-keys'; -import { routeBindingMutationKeys } from '../mutation-keys'; -import type { RouteBindingSelect, RouteBindingWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { RouteBindingSelect, RouteBindingWithRelations } from '../../orm/input-types'; -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * - * @example - * ```tsx - * const { mutate, isPending } = useDeleteRouteBindingMutation({ - * selection: { fields: { id: true } }, - * }); - * - * mutate({ id: 'value-to-delete' }); - * ``` - */ -export function useDeleteRouteBindingMutation( - params: { - selection: { - fields: S & RouteBindingSelect; - } & HookStrictSelect, RouteBindingSelect>; - } & Omit< - UseMutationOptions< - { - deleteRouteBinding: { - routeBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - deleteRouteBinding: { - routeBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - } ->; -export function useDeleteRouteBindingMutation( - 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: routeBindingMutationKeys.all, - mutationFn: ({ id }: { id: string }) => - getClient() - .routeBinding.delete({ - where: { - id, - }, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.removeQueries({ - queryKey: routeBindingKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: routeBindingKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdateFunctionFromSourceMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdateFunctionFromSourceMutation.ts new file mode 100644 index 0000000000..9b6a7cf46a --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdateFunctionFromSourceMutation.ts @@ -0,0 +1,55 @@ +/** + * 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/useUpdateHostnameBindingMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdateHostnameBindingMutation.ts deleted file mode 100644 index a0eb04cd9f..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useUpdateHostnameBindingMutation.ts +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * @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 { hostnameBindingKeys } from '../query-keys'; -import { hostnameBindingMutationKeys } from '../mutation-keys'; -import type { - HostnameBindingSelect, - HostnameBindingWithRelations, - HostnameBindingPatch, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - HostnameBindingSelect, - HostnameBindingWithRelations, - HostnameBindingPatch, -} from '../../orm/input-types'; -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * - * @example - * ```tsx - * const { mutate, isPending } = useUpdateHostnameBindingMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ id: 'value-here', hostnameBindingPatch: { name: 'Updated' } }); - * ``` - */ -export function useUpdateHostnameBindingMutation( - params: { - selection: { - fields: S & HostnameBindingSelect; - } & HookStrictSelect, HostnameBindingSelect>; - } & Omit< - UseMutationOptions< - { - updateHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - hostnameBindingPatch: HostnameBindingPatch; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - updateHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - hostnameBindingPatch: HostnameBindingPatch; - } ->; -export function useUpdateHostnameBindingMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - { - id: string; - hostnameBindingPatch: HostnameBindingPatch; - } - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: hostnameBindingMutationKeys.all, - mutationFn: ({ - id, - hostnameBindingPatch, - }: { - id: string; - hostnameBindingPatch: HostnameBindingPatch; - }) => - getClient() - .hostnameBinding.update({ - where: { - id, - }, - data: hostnameBindingPatch, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.invalidateQueries({ - queryKey: hostnameBindingKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: hostnameBindingKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdateRouteBindingMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdateRouteBindingMutation.ts deleted file mode 100644 index cb3950c98c..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useUpdateRouteBindingMutation.ts +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * @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 { routeBindingKeys } from '../query-keys'; -import { routeBindingMutationKeys } from '../mutation-keys'; -import type { - RouteBindingSelect, - RouteBindingWithRelations, - RouteBindingPatch, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - RouteBindingSelect, - RouteBindingWithRelations, - RouteBindingPatch, -} from '../../orm/input-types'; -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * - * @example - * ```tsx - * const { mutate, isPending } = useUpdateRouteBindingMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ id: 'value-here', routeBindingPatch: { name: 'Updated' } }); - * ``` - */ -export function useUpdateRouteBindingMutation( - params: { - selection: { - fields: S & RouteBindingSelect; - } & HookStrictSelect, RouteBindingSelect>; - } & Omit< - UseMutationOptions< - { - updateRouteBinding: { - routeBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - routeBindingPatch: RouteBindingPatch; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - updateRouteBinding: { - routeBinding: InferSelectResult; - }; - }, - Error, - { - id: string; - routeBindingPatch: RouteBindingPatch; - } ->; -export function useUpdateRouteBindingMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - { - id: string; - routeBindingPatch: RouteBindingPatch; - } - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: routeBindingMutationKeys.all, - mutationFn: ({ id, routeBindingPatch }: { id: string; routeBindingPatch: RouteBindingPatch }) => - getClient() - .routeBinding.update({ - where: { - id, - }, - data: routeBindingPatch, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.invalidateQueries({ - queryKey: routeBindingKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: routeBindingKeys.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 c9c9cffe3a..b57ad83438 100644 --- a/sdk/constructive-react/src/api/hooks/queries/index.ts +++ b/sdk/constructive-react/src/api/hooks/queries/index.ts @@ -60,8 +60,6 @@ export * from './useFullTextSearchQuery'; export * from './useFunctionsQuery'; export * from './useFunctionQuery'; export * from './useGetSitePreviewsQuery'; -export * from './useHostnameBindingsQuery'; -export * from './useHostnameBindingQuery'; export * from './useIdentityProviderRegistriesQuery'; export * from './useIdentityProviderRegistryQuery'; export * from './useIndicesQuery'; @@ -129,8 +127,6 @@ export * from './useRedirectsQuery'; export * from './useRedirectQuery'; export * from './useRlsSettingsQuery'; export * from './useRlsSettingQuery'; -export * from './useRouteBindingsQuery'; -export * from './useRouteBindingQuery'; export * from './useRoutesQuery'; export * from './useRouteQuery'; export * from './useSchemasQuery'; @@ -187,6 +183,7 @@ export * from './useWebauthnSettingsQuery'; export * from './useWebauthnSettingQuery'; export * from './useApiSchemaNamesQuery'; export * from './useApplyRegistryDefaultsQuery'; +export * from './useEmailSharedAccountQuery'; export * from './useGetSitePreviewCommitQuery'; export * from './useGetSiteReleaseManifestQuery'; export * from './usePagePublishedQuery'; diff --git a/sdk/constructive-react/src/api/hooks/queries/useEmailSharedAccountQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useEmailSharedAccountQuery.ts new file mode 100644 index 0000000000..7ce392c4b9 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useEmailSharedAccountQuery.ts @@ -0,0 +1,90 @@ +/** + * Custom query hook for emailSharedAccount + * @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 emailSharedAccountQueryKey = customQueryKeys.emailSharedAccount; +/** + * Query hook for emailSharedAccount + * + * @example + * ```tsx + * const { data, isLoading } = useEmailSharedAccountQuery(); + * + * if (data?.emailSharedAccount) { + * console.log(data.emailSharedAccount); + * } + * ``` + */ +export function useEmailSharedAccountQuery< + TData = { + emailSharedAccount: unknown | null; + }, +>( + params?: Omit< + UseQueryOptions< + { + emailSharedAccount: unknown | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEmailSharedAccountQuery< + TData = { + emailSharedAccount: unknown | null; + }, +>( + params?: Omit< + UseQueryOptions< + { + emailSharedAccount: unknown | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const queryOptions = params ?? {}; + return useQuery({ + queryKey: emailSharedAccountQueryKey(), + queryFn: () => getClient().query.emailSharedAccount().unwrap(), + ...queryOptions, + }); +} +/** + * Fetch emailSharedAccount without React hooks + * + * @example + * ```ts + * const data = await fetchEmailSharedAccountQuery(); + * ``` + */ +export async function fetchEmailSharedAccountQuery() { + return getClient().query.emailSharedAccount().unwrap(); +} +/** + * Prefetch emailSharedAccount for SSR or cache warming + * + * @example + * ```ts + * await prefetchEmailSharedAccountQuery(queryClient); + * ``` + */ +export async function prefetchEmailSharedAccountQuery(queryClient: QueryClient): Promise { + await queryClient.prefetchQuery({ + queryKey: emailSharedAccountQueryKey(), + queryFn: () => getClient().query.emailSharedAccount().unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useHostnameBindingQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useHostnameBindingQuery.ts deleted file mode 100644 index d3c7621390..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useHostnameBindingQuery.ts +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * @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 { hostnameBindingKeys } from '../query-keys'; -import type { HostnameBindingSelect, HostnameBindingWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { HostnameBindingSelect, HostnameBindingWithRelations } from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const hostnameBindingQueryKey = hostnameBindingKeys.detail; -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * - * @example - * ```tsx - * const { data, isLoading } = useHostnameBindingQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function useHostnameBindingQuery< - S extends HostnameBindingSelect, - TData = { - hostnameBinding: InferSelectResult | null; - }, ->( - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, HostnameBindingSelect>; - } & Omit< - UseQueryOptions< - { - hostnameBinding: InferSelectResult | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useHostnameBindingQuery( - params: { - id: string; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: hostnameBindingKeys.detail(params.id), - queryFn: () => - getClient() - .hostnameBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * - * @example - * ```ts - * const data = await fetchHostnameBindingQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchHostnameBindingQuery(params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, HostnameBindingSelect>; -}): Promise<{ - hostnameBinding: InferSelectResult | null; -}>; -export async function fetchHostnameBindingQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .hostnameBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * - * @example - * ```ts - * await prefetchHostnameBindingQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchHostnameBindingQuery( - queryClient: QueryClient, - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, HostnameBindingSelect>; - } -): Promise; -export async function prefetchHostnameBindingQuery( - queryClient: QueryClient, - params: { - id: string; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: hostnameBindingKeys.detail(params.id), - queryFn: () => - getClient() - .hostnameBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/queries/useHostnameBindingsQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useHostnameBindingsQuery.ts deleted file mode 100644 index 44c53bc7a6..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useHostnameBindingsQuery.ts +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * @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 { hostnameBindingKeys } from '../query-keys'; -import type { - HostnameBindingSelect, - HostnameBindingWithRelations, - HostnameBindingFilter, - HostnameBindingOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - HostnameBindingSelect, - HostnameBindingWithRelations, - HostnameBindingFilter, - HostnameBindingOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const hostnameBindingsQueryKey = hostnameBindingKeys.list; -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * - * @example - * ```tsx - * const { data, isLoading } = useHostnameBindingsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useHostnameBindingsQuery< - S extends HostnameBindingSelect, - TData = { - hostnameBindings: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, HostnameBindingSelect>; - } & Omit< - UseQueryOptions< - { - hostnameBindings: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useHostnameBindingsQuery( - params: { - selection: ListSelectionConfig< - HostnameBindingSelect, - HostnameBindingFilter, - HostnameBindingOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - HostnameBindingSelect, - HostnameBindingFilter, - HostnameBindingOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: hostnameBindingKeys.list(args), - queryFn: () => getClient().hostnameBinding.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * - * @example - * ```ts - * const data = await fetchHostnameBindingsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchHostnameBindingsQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, HostnameBindingSelect>; -}): Promise<{ - hostnameBindings: ConnectionResult>; -}>; -export async function fetchHostnameBindingsQuery(params: { - selection: ListSelectionConfig< - HostnameBindingSelect, - HostnameBindingFilter, - HostnameBindingOrderBy - >; -}) { - const args = buildListSelectionArgs< - HostnameBindingSelect, - HostnameBindingFilter, - HostnameBindingOrderBy - >(params.selection); - return getClient().hostnameBinding.findMany(args).unwrap(); -} -/** - * Compiled hostname index maintained by domain sync triggers; read only through the resolver - * - * @example - * ```ts - * await prefetchHostnameBindingsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchHostnameBindingsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, HostnameBindingSelect>; - } -): Promise; -export async function prefetchHostnameBindingsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - HostnameBindingSelect, - HostnameBindingFilter, - HostnameBindingOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - HostnameBindingSelect, - HostnameBindingFilter, - HostnameBindingOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: hostnameBindingKeys.list(args), - queryFn: () => getClient().hostnameBinding.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/queries/useRouteBindingQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useRouteBindingQuery.ts deleted file mode 100644 index 5a322c858f..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useRouteBindingQuery.ts +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * @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 { routeBindingKeys } from '../query-keys'; -import type { RouteBindingSelect, RouteBindingWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { RouteBindingSelect, RouteBindingWithRelations } from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const routeBindingQueryKey = routeBindingKeys.detail; -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * - * @example - * ```tsx - * const { data, isLoading } = useRouteBindingQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function useRouteBindingQuery< - S extends RouteBindingSelect, - TData = { - routeBinding: InferSelectResult | null; - }, ->( - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, RouteBindingSelect>; - } & Omit< - UseQueryOptions< - { - routeBinding: InferSelectResult | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useRouteBindingQuery( - params: { - id: string; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: routeBindingKeys.detail(params.id), - queryFn: () => - getClient() - .routeBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * - * @example - * ```ts - * const data = await fetchRouteBindingQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchRouteBindingQuery(params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, RouteBindingSelect>; -}): Promise<{ - routeBinding: InferSelectResult | null; -}>; -export async function fetchRouteBindingQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .routeBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * - * @example - * ```ts - * await prefetchRouteBindingQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchRouteBindingQuery( - queryClient: QueryClient, - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, RouteBindingSelect>; - } -): Promise; -export async function prefetchRouteBindingQuery( - queryClient: QueryClient, - params: { - id: string; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: routeBindingKeys.detail(params.id), - queryFn: () => - getClient() - .routeBinding.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/queries/useRouteBindingsQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useRouteBindingsQuery.ts deleted file mode 100644 index f2915aa8ab..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useRouteBindingsQuery.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * @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 { routeBindingKeys } from '../query-keys'; -import type { - RouteBindingSelect, - RouteBindingWithRelations, - RouteBindingFilter, - RouteBindingOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - RouteBindingSelect, - RouteBindingWithRelations, - RouteBindingFilter, - RouteBindingOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const routeBindingsQueryKey = routeBindingKeys.list; -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * - * @example - * ```tsx - * const { data, isLoading } = useRouteBindingsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useRouteBindingsQuery< - S extends RouteBindingSelect, - TData = { - routeBindings: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, RouteBindingSelect>; - } & Omit< - UseQueryOptions< - { - routeBindings: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useRouteBindingsQuery( - params: { - selection: ListSelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs( - params.selection - ); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: routeBindingKeys.list(args), - queryFn: () => getClient().routeBinding.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * - * @example - * ```ts - * const data = await fetchRouteBindingsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchRouteBindingsQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, RouteBindingSelect>; -}): Promise<{ - routeBindings: ConnectionResult>; -}>; -export async function fetchRouteBindingsQuery(params: { - selection: ListSelectionConfig; -}) { - const args = buildListSelectionArgs( - params.selection - ); - return getClient().routeBinding.findMany(args).unwrap(); -} -/** - * Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver - * - * @example - * ```ts - * await prefetchRouteBindingsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchRouteBindingsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, RouteBindingSelect>; - } -): Promise; -export async function prefetchRouteBindingsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig; - } -): Promise { - const args = buildListSelectionArgs( - params.selection - ); - await queryClient.prefetchQuery({ - queryKey: routeBindingKeys.list(args), - queryFn: () => getClient().routeBinding.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/query-keys.ts b/sdk/constructive-react/src/api/hooks/query-keys.ts index 4e0998b79d..c534c4c09a 100644 --- a/sdk/constructive-react/src/api/hooks/query-keys.ts +++ b/sdk/constructive-react/src/api/hooks/query-keys.ts @@ -281,15 +281,6 @@ export const getSitePreviewsRecordKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...getSitePreviewsRecordKeys.details(), id] as const, } as const; -export const hostnameBindingKeys = { - /** All hostnameBinding queries */ all: ['hostnamebinding'] as const, - /** List query keys */ lists: () => [...hostnameBindingKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...hostnameBindingKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...hostnameBindingKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...hostnameBindingKeys.details(), id] as const, -} as const; export const identityProviderRegistryKeys = { /** All identityProviderRegistry queries */ all: ['identityproviderregistry'] as const, /** List query keys */ lists: () => [...identityProviderRegistryKeys.all, 'list'] as const, @@ -600,15 +591,6 @@ export const rlsSettingKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...rlsSettingKeys.details(), id] as const, } as const; -export const routeBindingKeys = { - /** All routeBinding queries */ all: ['routebinding'] as const, - /** List query keys */ lists: () => [...routeBindingKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...routeBindingKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...routeBindingKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...routeBindingKeys.details(), id] as const, -} as const; export const routeKeys = { /** All route queries */ all: ['route'] as const, /** List query keys */ lists: () => [...routeKeys.all, 'list'] as const, @@ -862,6 +844,7 @@ export const customQueryKeys = { ['apiSchemaNames', variables] as const, /** Query key for applyRegistryDefaults */ applyRegistryDefaults: (variables?: object) => ['applyRegistryDefaults', variables] as const, + /** Query key for emailSharedAccount */ emailSharedAccount: () => ['emailSharedAccount'] as const, /** Query key for getSitePreviewCommit */ getSitePreviewCommit: (variables?: object) => ['getSitePreviewCommit', variables] as const, /** Query key for getSiteReleaseManifest */ getSiteReleaseManifest: (variables?: object) => @@ -948,7 +931,6 @@ export const queryKeys = { fullTextSearch: fullTextSearchKeys, function: functionKeys, getSitePreviewsRecord: getSitePreviewsRecordKeys, - hostnameBinding: hostnameBindingKeys, identityProviderRegistry: identityProviderRegistryKeys, index: indexKeys, listSuspendedDatabasesRecord: listSuspendedDatabasesRecordKeys, @@ -983,7 +965,6 @@ export const queryKeys = { pubkeySetting: pubkeySettingKeys, redirect: redirectKeys, rlsSetting: rlsSettingKeys, - routeBinding: routeBindingKeys, route: routeKeys, schema: schemaKeys, schemaGrant: schemaGrantKeys, diff --git a/sdk/constructive-react/src/api/orm/README.md b/sdk/constructive-react/src/api/orm/README.md index 2439802945..02e465c85e 100644 --- a/sdk/constructive-react/src/api/orm/README.md +++ b/sdk/constructive-react/src/api/orm/README.md @@ -50,7 +50,6 @@ const db = createClient({ | `fullTextSearch` | findMany, findOne, create, update, delete | | `function` | findMany, findOne, create, update, delete | | `getSitePreviewsRecord` | findMany, findOne, create, update, delete | -| `hostnameBinding` | findMany, findOne, create, update, delete | | `identityProviderRegistry` | findMany, findOne, create, update, delete | | `index` | findMany, findOne, create, update, delete | | `listSuspendedDatabasesRecord` | findMany, findOne, create, update, delete | @@ -85,7 +84,6 @@ const db = createClient({ | `pubkeySetting` | findMany, findOne, create, update, delete | | `redirect` | findMany, findOne, create, update, delete | | `rlsSetting` | findMany, findOne, create, update, delete | -| `routeBinding` | findMany, findOne, create, update, delete | | `route` | findMany, findOne, create, update, delete | | `schema` | findMany, findOne, create, update, delete | | `schemaGrant` | findMany, findOne, create, update, delete | @@ -1319,44 +1317,6 @@ const updated = await db.getSitePreviewsRecord.update({ where: { id: '' }, const deleted = await db.getSitePreviewsRecord.delete({ where: { id: '' } }).execute(); ``` -### `db.hostnameBinding` - -CRUD operations for HostnameBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `domainId` | UUID | Yes | -| `hostname` | String | Yes | -| `id` | UUID | No | -| `isWildcard` | Boolean | Yes | -| `managed` | Boolean | Yes | -| `parentHostname` | String | Yes | -| `tlsSecretName` | String | Yes | -| `tlsStatus` | String | Yes | -| `updatedAt` | Datetime | No | -| `verificationStatus` | String | Yes | - -**Operations:** - -```typescript -// List all hostnameBinding records -const items = await db.hostnameBinding.findMany({ select: { domainId: true, hostname: true, id: true, isWildcard: true, managed: true, parentHostname: true, tlsSecretName: true, tlsStatus: true, updatedAt: true, verificationStatus: true } }).execute(); - -// Get one by id -const item = await db.hostnameBinding.findOne({ id: '', select: { domainId: true, hostname: true, id: true, isWildcard: true, managed: true, parentHostname: true, tlsSecretName: true, tlsStatus: true, updatedAt: true, verificationStatus: true } }).execute(); - -// Create -const created = await db.hostnameBinding.create({ data: { domainId: '', hostname: '', isWildcard: '', managed: '', parentHostname: '', tlsSecretName: '', tlsStatus: '', verificationStatus: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.hostnameBinding.update({ where: { id: '' }, data: { domainId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.hostnameBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.identityProviderRegistry` CRUD operations for IdentityProviderRegistry records. @@ -1489,6 +1449,7 @@ CRUD operations for ManagedDomain records. | `domain` | String | Yes | | `id` | UUID | No | | `isWildcard` | Boolean | Yes | +| `publicPort` | Int | Yes | | `tlsReadyAt` | Datetime | Yes | | `tlsStatus` | String | Yes | | `updatedAt` | Datetime | No | @@ -1500,13 +1461,13 @@ CRUD operations for ManagedDomain records. ```typescript // List all managedDomain records -const items = await db.managedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const items = await db.managedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Get one by id -const item = await db.managedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const item = await db.managedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Create -const created = await db.managedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); +const created = await db.managedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); // Update const updated = await db.managedDomain.update({ where: { id: '' }, data: { allowPublicUsage: '' }, select: { id: true } }).execute(); @@ -2075,6 +2036,7 @@ CRUD operations for PlatformManagedDomain records. | `domain` | String | Yes | | `id` | UUID | No | | `isWildcard` | Boolean | Yes | +| `publicPort` | Int | Yes | | `tlsReadyAt` | Datetime | Yes | | `tlsStatus` | String | Yes | | `updatedAt` | Datetime | No | @@ -2086,13 +2048,13 @@ CRUD operations for PlatformManagedDomain records. ```typescript // List all platformManagedDomain records -const items = await db.platformManagedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const items = await db.platformManagedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Get one by id -const item = await db.platformManagedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const item = await db.platformManagedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Create -const created = await db.platformManagedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); +const created = await db.platformManagedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformManagedDomain.update({ where: { id: '' }, data: { allowPublicUsage: '' }, select: { id: true } }).execute(); @@ -2680,48 +2642,6 @@ const updated = await db.rlsSetting.update({ where: { id: '' }, data: { au const deleted = await db.rlsSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.routeBinding` - -CRUD operations for RouteBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `domainId` | UUID | Yes | -| `id` | UUID | No | -| `isActive` | Boolean | Yes | -| `method` | String | Yes | -| `path` | String | Yes | -| `priority` | Int | Yes | -| `servingSiteId` | UUID | Yes | -| `targetApiId` | UUID | Yes | -| `targetBucketId` | UUID | Yes | -| `targetFunctionId` | UUID | Yes | -| `targetRedirectId` | UUID | Yes | -| `targetServiceId` | UUID | Yes | -| `targetSiteId` | UUID | Yes | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all routeBinding records -const items = await db.routeBinding.findMany({ select: { domainId: true, id: true, isActive: true, method: true, path: true, priority: true, servingSiteId: true, targetApiId: true, targetBucketId: true, targetFunctionId: true, targetRedirectId: true, targetServiceId: true, targetSiteId: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.routeBinding.findOne({ id: '', select: { domainId: true, id: true, isActive: true, method: true, path: true, priority: true, servingSiteId: true, targetApiId: true, targetBucketId: true, targetFunctionId: true, targetRedirectId: true, targetServiceId: true, targetSiteId: true, updatedAt: true } }).execute(); - -// Create -const created = await db.routeBinding.create({ data: { domainId: '', isActive: '', method: '', path: '', priority: '', servingSiteId: '', targetApiId: '', targetBucketId: '', targetFunctionId: '', targetRedirectId: '', targetServiceId: '', targetSiteId: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.routeBinding.update({ where: { id: '' }, data: { domainId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.routeBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.route` CRUD operations for Route records. @@ -3527,6 +3447,7 @@ CRUD operations for UniqueConstraint records. | `initiallyDeferred` | Boolean | Yes | | `isDeferrable` | Boolean | Yes | | `name` | String | Yes | +| `nullsNotDistinct` | Boolean | Yes | | `smartTags` | JSON | Yes | | `tableId` | UUID | Yes | | `tags` | String | Yes | @@ -3538,13 +3459,13 @@ CRUD operations for UniqueConstraint records. ```typescript // List all uniqueConstraint records -const items = await db.uniqueConstraint.findMany({ select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); +const items = await db.uniqueConstraint.findMany({ select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); // Get one by id -const item = await db.uniqueConstraint.findOne({ id: '', select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); +const item = await db.uniqueConstraint.findOne({ id: '', select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); // Create -const created = await db.uniqueConstraint.create({ data: { category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }, select: { id: true } }).execute(); +const created = await db.uniqueConstraint.create({ data: { category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', nullsNotDistinct: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }, select: { id: true } }).execute(); // Update const updated = await db.uniqueConstraint.update({ where: { id: '' }, data: { category: '' }, select: { id: true } }).execute(); @@ -3816,6 +3737,17 @@ applyRegistryDefaults const result = await db.query.applyRegistryDefaults({ data: '', nodeType: '' }).execute(); ``` +### `db.query.emailSharedAccount` + +emailSharedAccount + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.emailSharedAccount().execute(); +``` + ### `db.query.getSitePreviewCommit` getSitePreviewCommit @@ -4099,6 +4031,21 @@ 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 @@ -4312,10 +4259,11 @@ const result = await db.mutation.platformSitesProvisionStaticSite({ input: '', 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 444db1275d..038b8785ac 100644 --- a/sdk/constructive-react/src/api/orm/index.ts +++ b/sdk/constructive-react/src/api/orm/index.ts @@ -34,7 +34,6 @@ import { ForeignKeyConstraintModel } from './models/foreignKeyConstraint'; import { FullTextSearchModel } from './models/fullTextSearch'; import { FunctionModel } from './models/function'; import { GetSitePreviewsRecordModel } from './models/getSitePreviewsRecord'; -import { HostnameBindingModel } from './models/hostnameBinding'; import { IdentityProviderRegistryModel } from './models/identityProviderRegistry'; import { IndexModel } from './models/index'; import { ListSuspendedDatabasesRecordModel } from './models/listSuspendedDatabasesRecord'; @@ -69,7 +68,6 @@ import { PrimaryKeyConstraintModel } from './models/primaryKeyConstraint'; import { PubkeySettingModel } from './models/pubkeySetting'; import { RedirectModel } from './models/redirect'; import { RlsSettingModel } from './models/rlsSetting'; -import { RouteBindingModel } from './models/routeBinding'; import { RouteModel } from './models/route'; import { SchemaModel } from './models/schema'; import { SchemaGrantModel } from './models/schemaGrant'; @@ -161,7 +159,6 @@ export function createClient(config: OrmClientConfig) { fullTextSearch: new FullTextSearchModel(client), function: new FunctionModel(client), getSitePreviewsRecord: new GetSitePreviewsRecordModel(client), - hostnameBinding: new HostnameBindingModel(client), identityProviderRegistry: new IdentityProviderRegistryModel(client), index: new IndexModel(client), listSuspendedDatabasesRecord: new ListSuspendedDatabasesRecordModel(client), @@ -196,7 +193,6 @@ export function createClient(config: OrmClientConfig) { pubkeySetting: new PubkeySettingModel(client), redirect: new RedirectModel(client), rlsSetting: new RlsSettingModel(client), - routeBinding: new RouteBindingModel(client), route: new RouteModel(client), schema: new SchemaModel(client), schemaGrant: new SchemaGrantModel(client), diff --git a/sdk/constructive-react/src/api/orm/input-types.ts b/sdk/constructive-react/src/api/orm/input-types.ts index ff96fdb8a4..f4e5da7908 100644 --- a/sdk/constructive-react/src/api/orm/input-types.ts +++ b/sdk/constructive-react/src/api/orm/input-types.ts @@ -824,28 +824,6 @@ export interface GetSitePreviewsRecord { commitId?: string | null; name?: string | null; } -/** Compiled hostname index maintained by domain sync triggers; read only through the resolver */ -export interface HostnameBinding { - /** Domain row this binding was compiled from */ - domainId?: string | null; - /** Lowercase hostname (exact or *.parent wildcard) */ - hostname?: string | null; - id: string; - /** Whether this binding is a wildcard claim */ - isWildcard?: boolean | null; - /** Whether the platform drives this hostname's lifecycle */ - managed?: boolean | null; - /** Parent hostname a wildcard binding covers */ - parentHostname?: string | null; - /** TLS secret name compiled from the domain row */ - tlsSecretName?: string | null; - /** Certificate lifecycle state compiled from the domain row */ - tlsStatus?: string | null; - /** When this binding was last recompiled */ - updatedAt?: string | null; - /** Ownership verification state compiled from the domain row */ - verificationStatus?: string | null; -} export interface IdentityProviderRegistry { authorizationUrl?: string | null; displayName?: string | null; @@ -900,6 +878,8 @@ export interface ManagedDomain { id: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean | null; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number | null; /** When TLS last became ready */ tlsReadyAt?: string | null; /** TLS provisioning state for this managed hostname */ @@ -1215,6 +1195,8 @@ export interface PlatformManagedDomain { id: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean | null; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number | null; /** When TLS last became ready */ tlsReadyAt?: string | null; /** TLS provisioning state for this managed hostname */ @@ -1518,36 +1500,6 @@ export interface RlsSetting { roleSchemaId?: string | null; updatedAt?: string | null; } -/** Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver */ -export interface RouteBinding { - /** Domain row the source route binds */ - domainId?: string | null; - id: string; - /** Active flag compiled from the source route */ - isActive?: boolean | null; - /** HTTP method this binding matches; NULL matches any method */ - method?: string | null; - /** Path prefix this binding matches */ - path?: string | null; - /** Priority compiled from the source route */ - priority?: number | null; - /** Site whose surface the source route serves; NULL when it serves no site */ - servingSiteId?: string | null; - /** Api catalog row the source route targets */ - targetApiId?: string | null; - /** Bucket catalog row the source route targets */ - targetBucketId?: string | null; - /** Function catalog row the source route targets */ - targetFunctionId?: string | null; - /** Redirect catalog row the source route targets */ - targetRedirectId?: string | null; - /** Resource catalog row (a Service resource) the source route targets */ - targetServiceId?: string | null; - /** Site catalog row the source route targets */ - targetSiteId?: string | null; - /** When this binding was last recompiled */ - updatedAt?: string | null; -} /** Routes binding a domain hostname and path to a typed catalog target */ export interface Route { /** Whether this route answers callers with no identity. Requires the target function to declare anonymous_callable; default false = an identity is required */ @@ -1917,6 +1869,7 @@ export interface UniqueConstraint { initiallyDeferred?: boolean | null; isDeferrable?: boolean | null; name?: string | null; + nullsNotDistinct?: boolean | null; smartTags?: Record | null; tableId?: string | null; tags?: string[] | null; @@ -2184,7 +2137,6 @@ export interface FunctionRelations { triggers?: ConnectionResult; } export interface GetSitePreviewsRecordRelations {} -export interface HostnameBindingRelations {} export interface IdentityProviderRegistryRelations {} export interface IndexRelations { database?: Database | null; @@ -2317,7 +2269,6 @@ export interface RlsSettingRelations { currentUserAgentFunction?: Function | null; roleSchema?: Schema | null; } -export interface RouteBindingRelations {} export interface RouteRelations { domain?: Domain | null; servingSite?: Site | null; @@ -2511,7 +2462,6 @@ export type FullTextSearchWithRelations = FullTextSearch & FullTextSearchRelatio export type FunctionWithRelations = Function & FunctionRelations; export type GetSitePreviewsRecordWithRelations = GetSitePreviewsRecord & GetSitePreviewsRecordRelations; -export type HostnameBindingWithRelations = HostnameBinding & HostnameBindingRelations; export type IdentityProviderRegistryWithRelations = IdentityProviderRegistry & IdentityProviderRegistryRelations; export type IndexWithRelations = Index & IndexRelations; @@ -2559,7 +2509,6 @@ export type PrimaryKeyConstraintWithRelations = PrimaryKeyConstraint & export type PubkeySettingWithRelations = PubkeySetting & PubkeySettingRelations; export type RedirectWithRelations = Redirect & RedirectRelations; export type RlsSettingWithRelations = RlsSetting & RlsSettingRelations; -export type RouteBindingWithRelations = RouteBinding & RouteBindingRelations; export type RouteWithRelations = Route & RouteRelations; export type SchemaWithRelations = Schema & SchemaRelations; export type SchemaGrantWithRelations = SchemaGrant & SchemaGrantRelations; @@ -3473,18 +3422,6 @@ export type GetSitePreviewsRecordSelect = { commitId?: boolean; name?: boolean; }; -export type HostnameBindingSelect = { - domainId?: boolean; - hostname?: boolean; - id?: boolean; - isWildcard?: boolean; - managed?: boolean; - parentHostname?: boolean; - tlsSecretName?: boolean; - tlsStatus?: boolean; - updatedAt?: boolean; - verificationStatus?: boolean; -}; export type IdentityProviderRegistrySelect = { authorizationUrl?: boolean; displayName?: boolean; @@ -3538,6 +3475,7 @@ export type ManagedDomainSelect = { domain?: boolean; id?: boolean; isWildcard?: boolean; + publicPort?: boolean; tlsReadyAt?: boolean; tlsStatus?: boolean; updatedAt?: boolean; @@ -3830,6 +3768,7 @@ export type PlatformManagedDomainSelect = { domain?: boolean; id?: boolean; isWildcard?: boolean; + publicPort?: boolean; tlsReadyAt?: boolean; tlsStatus?: boolean; updatedAt?: boolean; @@ -4176,22 +4115,6 @@ export type RlsSettingSelect = { select: SchemaSelect; }; }; -export type RouteBindingSelect = { - domainId?: boolean; - id?: boolean; - isActive?: boolean; - method?: boolean; - path?: boolean; - priority?: boolean; - servingSiteId?: boolean; - targetApiId?: boolean; - targetBucketId?: boolean; - targetFunctionId?: boolean; - targetRedirectId?: boolean; - targetServiceId?: boolean; - targetSiteId?: boolean; - updatedAt?: boolean; -}; export type RouteSelect = { anonymous?: boolean; config?: boolean; @@ -4821,6 +4744,7 @@ export type UniqueConstraintSelect = { initiallyDeferred?: boolean; isDeferrable?: boolean; name?: boolean; + nullsNotDistinct?: boolean; smartTags?: boolean; tableId?: boolean; tags?: boolean; @@ -6323,34 +6247,6 @@ export interface GetSitePreviewsRecordFilter { or?: GetSitePreviewsRecordFilter[]; not?: GetSitePreviewsRecordFilter; } -export interface HostnameBindingFilter { - /** Checks for all expressions in this list. */ - and?: HostnameBindingFilter[]; - /** Filter by the object’s `domainId` field. */ - domainId?: UUIDFilter; - /** Filter by the object’s `hostname` field. */ - hostname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isWildcard` field. */ - isWildcard?: BooleanFilter; - /** Filter by the object’s `managed` field. */ - managed?: BooleanFilter; - /** Negates the expression. */ - not?: HostnameBindingFilter; - /** Checks for any expressions in this list. */ - or?: HostnameBindingFilter[]; - /** Filter by the object’s `parentHostname` field. */ - parentHostname?: StringFilter; - /** Filter by the object’s `tlsSecretName` field. */ - tlsSecretName?: StringFilter; - /** Filter by the object’s `tlsStatus` field. */ - tlsStatus?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `verificationStatus` field. */ - verificationStatus?: StringFilter; -} export interface IdentityProviderRegistryFilter { /** Checks for all expressions in this list. */ and?: IdentityProviderRegistryFilter[]; @@ -6466,6 +6362,8 @@ export interface ManagedDomainFilter { not?: ManagedDomainFilter; /** Checks for any expressions in this list. */ or?: ManagedDomainFilter[]; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -6995,6 +6893,8 @@ export interface PlatformManagedDomainFilter { platformDomainVerificationsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainVerificationFilter; /** `platformDomainVerificationsByManagedDomainId` exist. */ platformDomainVerificationsByManagedDomainIdExist?: boolean; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -7574,42 +7474,6 @@ export interface RlsSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface RouteBindingFilter { - /** Checks for all expressions in this list. */ - and?: RouteBindingFilter[]; - /** Filter by the object’s `domainId` field. */ - domainId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isActive` field. */ - isActive?: BooleanFilter; - /** Filter by the object’s `method` field. */ - method?: StringFilter; - /** Negates the expression. */ - not?: RouteBindingFilter; - /** Checks for any expressions in this list. */ - or?: RouteBindingFilter[]; - /** Filter by the object’s `path` field. */ - path?: StringFilter; - /** Filter by the object’s `priority` field. */ - priority?: IntFilter; - /** Filter by the object’s `servingSiteId` field. */ - servingSiteId?: UUIDFilter; - /** Filter by the object’s `targetApiId` field. */ - targetApiId?: UUIDFilter; - /** Filter by the object’s `targetBucketId` field. */ - targetBucketId?: UUIDFilter; - /** Filter by the object’s `targetFunctionId` field. */ - targetFunctionId?: UUIDFilter; - /** Filter by the object’s `targetRedirectId` field. */ - targetRedirectId?: UUIDFilter; - /** Filter by the object’s `targetServiceId` field. */ - targetServiceId?: UUIDFilter; - /** Filter by the object’s `targetSiteId` field. */ - targetSiteId?: UUIDFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} export interface RouteFilter { /** Checks for all expressions in this list. */ and?: RouteFilter[]; @@ -8503,6 +8367,8 @@ export interface UniqueConstraintFilter { name?: StringFilter; /** Negates the expression. */ not?: UniqueConstraintFilter; + /** Filter by the object’s `nullsNotDistinct` field. */ + nullsNotDistinct?: BooleanFilter; /** Checks for any expressions in this list. */ or?: UniqueConstraintFilter[]; /** Filter by the object’s `smartTags` field. */ @@ -9671,30 +9537,6 @@ export type GetSitePreviewsRecordsOrderBy = | 'COMMIT_ID_DESC' | 'NAME_ASC' | 'NAME_DESC'; -export type HostnameBindingOrderBy = - | 'DOMAIN_ID_ASC' - | 'DOMAIN_ID_DESC' - | 'HOSTNAME_ASC' - | 'HOSTNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_WILDCARD_ASC' - | 'IS_WILDCARD_DESC' - | 'MANAGED_ASC' - | 'MANAGED_DESC' - | 'NATURAL' - | 'PARENT_HOSTNAME_ASC' - | 'PARENT_HOSTNAME_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'TLS_SECRET_NAME_ASC' - | 'TLS_SECRET_NAME_DESC' - | 'TLS_STATUS_ASC' - | 'TLS_STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'VERIFICATION_STATUS_ASC' - | 'VERIFICATION_STATUS_DESC'; export type IdentityProviderRegistryOrderBy = | 'AUTHORIZATION_URL_ASC' | 'AUTHORIZATION_URL_DESC' @@ -9791,6 +9633,8 @@ export type ManagedDomainOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PUBLIC_PORT_ASC' + | 'PUBLIC_PORT_DESC' | 'TLS_READY_AT_ASC' | 'TLS_READY_AT_DESC' | 'TLS_STATUS_ASC' @@ -10183,6 +10027,8 @@ export type PlatformManagedDomainOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PUBLIC_PORT_ASC' + | 'PUBLIC_PORT_DESC' | 'TLS_READY_AT_ASC' | 'TLS_READY_AT_DESC' | 'TLS_STATUS_ASC' @@ -10573,38 +10419,6 @@ export type RlsSettingOrderBy = | 'ROLE_SCHEMA_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type RouteBindingOrderBy = - | 'DOMAIN_ID_ASC' - | 'DOMAIN_ID_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_ACTIVE_ASC' - | 'IS_ACTIVE_DESC' - | 'METHOD_ASC' - | 'METHOD_DESC' - | 'NATURAL' - | 'PATH_ASC' - | 'PATH_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'PRIORITY_ASC' - | 'PRIORITY_DESC' - | 'SERVING_SITE_ID_ASC' - | 'SERVING_SITE_ID_DESC' - | 'TARGET_API_ID_ASC' - | 'TARGET_API_ID_DESC' - | 'TARGET_BUCKET_ID_ASC' - | 'TARGET_BUCKET_ID_DESC' - | 'TARGET_FUNCTION_ID_ASC' - | 'TARGET_FUNCTION_ID_DESC' - | 'TARGET_REDIRECT_ID_ASC' - | 'TARGET_REDIRECT_ID_DESC' - | 'TARGET_SERVICE_ID_ASC' - | 'TARGET_SERVICE_ID_DESC' - | 'TARGET_SITE_ID_ASC' - | 'TARGET_SITE_ID_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type RouteOrderBy = | 'ANONYMOUS_ASC' | 'ANONYMOUS_DESC' @@ -11159,6 +10973,8 @@ export type UniqueConstraintOrderBy = | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' + | 'NULLS_NOT_DISTINCT_ASC' + | 'NULLS_NOT_DISTINCT_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'SMART_TAGS_ASC' @@ -12418,38 +12234,6 @@ export interface DeleteGetSitePreviewsRecordInput { clientMutationId?: string; id: string; } -export interface CreateHostnameBindingInput { - clientMutationId?: string; - hostnameBinding: { - domainId: string; - hostname: string; - isWildcard?: boolean; - managed?: boolean; - parentHostname?: string; - tlsSecretName?: string; - tlsStatus?: string; - verificationStatus?: string; - }; -} -export interface HostnameBindingPatch { - domainId?: string | null; - hostname?: string | null; - isWildcard?: boolean | null; - managed?: boolean | null; - parentHostname?: string | null; - tlsSecretName?: string | null; - tlsStatus?: string | null; - verificationStatus?: string | null; -} -export interface UpdateHostnameBindingInput { - clientMutationId?: string; - id: string; - hostnameBindingPatch: HostnameBindingPatch; -} -export interface DeleteHostnameBindingInput { - clientMutationId?: string; - id: string; -} export interface CreateIdentityProviderRegistryInput { clientMutationId?: string; identityProviderRegistry: { @@ -12562,6 +12346,7 @@ export interface CreateManagedDomainInput { databaseId: string; domain: string; isWildcard?: boolean; + publicPort?: number; tlsReadyAt?: string; tlsStatus?: string; updatedByPrincipal?: string; @@ -12577,6 +12362,7 @@ export interface ManagedDomainPatch { databaseId?: string | null; domain?: string | null; isWildcard?: boolean | null; + publicPort?: number | null; tlsReadyAt?: string | null; tlsStatus?: string | null; updatedByPrincipal?: string | null; @@ -13057,6 +12843,7 @@ export interface CreatePlatformManagedDomainInput { createdByPrincipal?: string; domain: string; isWildcard?: boolean; + publicPort?: number; tlsReadyAt?: string; tlsStatus?: string; updatedByPrincipal?: string; @@ -13071,6 +12858,7 @@ export interface PlatformManagedDomainPatch { createdByPrincipal?: string | null; domain?: string | null; isWildcard?: boolean | null; + publicPort?: number | null; tlsReadyAt?: string | null; tlsStatus?: string | null; updatedByPrincipal?: string | null; @@ -13558,46 +13346,6 @@ export interface DeleteRlsSettingInput { clientMutationId?: string; id: string; } -export interface CreateRouteBindingInput { - clientMutationId?: string; - routeBinding: { - domainId: string; - isActive?: boolean; - method?: string; - path: string; - priority?: number; - servingSiteId?: string; - targetApiId?: string; - targetBucketId?: string; - targetFunctionId?: string; - targetRedirectId?: string; - targetServiceId?: string; - targetSiteId?: string; - }; -} -export interface RouteBindingPatch { - domainId?: string | null; - isActive?: boolean | null; - method?: string | null; - path?: string | null; - priority?: number | null; - servingSiteId?: string | null; - targetApiId?: string | null; - targetBucketId?: string | null; - targetFunctionId?: string | null; - targetRedirectId?: string | null; - targetServiceId?: string | null; - targetSiteId?: string | null; -} -export interface UpdateRouteBindingInput { - clientMutationId?: string; - id: string; - routeBindingPatch: RouteBindingPatch; -} -export interface DeleteRouteBindingInput { - clientMutationId?: string; - id: string; -} export interface CreateRouteInput { clientMutationId?: string; route: { @@ -14270,6 +14018,7 @@ export interface CreateUniqueConstraintInput { initiallyDeferred?: boolean; isDeferrable?: boolean; name?: string; + nullsNotDistinct?: boolean; smartTags?: Record; tableId: string; tags?: string[]; @@ -14285,6 +14034,7 @@ export interface UniqueConstraintPatch { initiallyDeferred?: boolean | null; isDeferrable?: boolean | null; name?: string | null; + nullsNotDistinct?: boolean | null; smartTags?: Record | null; tableId?: string | null; tags?: string[] | null; @@ -14673,6 +14423,15 @@ 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; @@ -14840,6 +14599,13 @@ 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. */ @@ -16435,28 +16201,6 @@ export interface FunctionInput { tags?: string[]; volatility?: string; } -/** An input for mutations affecting `HostnameBinding` */ -export interface HostnameBindingInput { - /** Domain row this binding was compiled from */ - domainId: string; - /** Lowercase hostname (exact or *.parent wildcard) */ - hostname: string; - id?: string; - /** Whether this binding is a wildcard claim */ - isWildcard?: boolean; - /** Whether the platform drives this hostname's lifecycle */ - managed?: boolean; - /** Parent hostname a wildcard binding covers */ - parentHostname?: string; - /** TLS secret name compiled from the domain row */ - tlsSecretName?: string; - /** Certificate lifecycle state compiled from the domain row */ - tlsStatus?: string; - /** When this binding was last recompiled */ - updatedAt?: string; - /** Ownership verification state compiled from the domain row */ - verificationStatus?: string; -} /** An input for mutations affecting `IdentityProviderRegistry` */ export interface IdentityProviderRegistryInput { authorizationUrl?: string; @@ -16506,6 +16250,8 @@ export interface ManagedDomainInput { id?: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number; /** When TLS last became ready */ tlsReadyAt?: string; /** TLS provisioning state for this managed hostname */ @@ -16819,6 +16565,8 @@ export interface PlatformManagedDomainInput { id?: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number; /** When TLS last became ready */ tlsReadyAt?: string; /** TLS provisioning state for this managed hostname */ @@ -17124,36 +16872,6 @@ export interface RlsSettingInput { roleSchemaId?: string; updatedAt?: string; } -/** An input for mutations affecting `RouteBinding` */ -export interface RouteBindingInput { - /** Domain row the source route binds */ - domainId: string; - id?: string; - /** Active flag compiled from the source route */ - isActive?: boolean; - /** HTTP method this binding matches; NULL matches any method */ - method?: string; - /** Path prefix this binding matches */ - path: string; - /** Priority compiled from the source route */ - priority?: number; - /** Site whose surface the source route serves; NULL when it serves no site */ - servingSiteId?: string; - /** Api catalog row the source route targets */ - targetApiId?: string; - /** Bucket catalog row the source route targets */ - targetBucketId?: string; - /** Function catalog row the source route targets */ - targetFunctionId?: string; - /** Redirect catalog row the source route targets */ - targetRedirectId?: string; - /** Resource catalog row (a Service resource) the source route targets */ - targetServiceId?: string; - /** Site catalog row the source route targets */ - targetSiteId?: string; - /** When this binding was last recompiled */ - updatedAt?: string; -} /** An input for mutations affecting `Route` */ export interface RouteInput { /** Whether this route answers callers with no identity. Requires the target function to declare anonymous_callable; default false = an identity is required */ @@ -17518,6 +17236,7 @@ export interface UniqueConstraintInput { initiallyDeferred?: boolean; isDeferrable?: boolean; name?: string; + nullsNotDistinct?: boolean; smartTags?: Record; tableId: string; tags?: string[]; @@ -19002,6 +18721,8 @@ export interface UniqueConstraintFilter { name?: StringFilter; /** Negates the expression. */ not?: UniqueConstraintFilter; + /** Filter by the object’s `nullsNotDistinct` field. */ + nullsNotDistinct?: BooleanFilter; /** Checks for any expressions in this list. */ or?: UniqueConstraintFilter[]; /** Filter by the object’s `smartTags` field. */ @@ -20540,6 +20261,8 @@ export interface ManagedDomainFilter { not?: ManagedDomainFilter; /** Checks for any expressions in this list. */ or?: ManagedDomainFilter[]; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -20832,6 +20555,8 @@ export interface PlatformManagedDomainFilter { platformDomainVerificationsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainVerificationFilter; /** `platformDomainVerificationsByManagedDomainId` exist. */ platformDomainVerificationsByManagedDomainIdExist?: boolean; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -21404,6 +21129,21 @@ 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; } @@ -21539,19 +21279,19 @@ export type PlatformSitesProvisionStaticSitePayloadSelect = { }; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface ProvisionSitePreviewPayload { clientMutationId?: string | null; @@ -21671,6 +21411,21 @@ 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; @@ -22841,36 +22596,6 @@ 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. */ @@ -22886,51 +22611,6 @@ export type DeleteFunctionPayloadSelect = { select: FunctionEdgeSelect; }; }; -export interface CreateHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was created by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} -export type CreateHostnameBindingPayloadSelect = { - clientMutationId?: boolean; - hostnameBinding?: { - select: HostnameBindingSelect; - }; - hostnameBindingEdge?: { - select: HostnameBindingEdgeSelect; - }; -}; -export interface UpdateHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was updated by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} -export type UpdateHostnameBindingPayloadSelect = { - clientMutationId?: boolean; - hostnameBinding?: { - select: HostnameBindingSelect; - }; - hostnameBindingEdge?: { - select: HostnameBindingEdgeSelect; - }; -}; -export interface DeleteHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was deleted by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} -export type DeleteHostnameBindingPayloadSelect = { - clientMutationId?: boolean; - hostnameBinding?: { - select: HostnameBindingSelect; - }; - hostnameBindingEdge?: { - select: HostnameBindingEdgeSelect; - }; -}; export interface CreateIdentityProviderRegistryPayload { clientMutationId?: string | null; /** The `IdentityProviderRegistry` that was created by this mutation. */ @@ -24371,51 +24051,6 @@ export type DeleteRlsSettingPayloadSelect = { select: RlsSettingEdgeSelect; }; }; -export interface CreateRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was created by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} -export type CreateRouteBindingPayloadSelect = { - clientMutationId?: boolean; - routeBinding?: { - select: RouteBindingSelect; - }; - routeBindingEdge?: { - select: RouteBindingEdgeSelect; - }; -}; -export interface UpdateRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was updated by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} -export type UpdateRouteBindingPayloadSelect = { - clientMutationId?: boolean; - routeBinding?: { - select: RouteBindingSelect; - }; - routeBindingEdge?: { - select: RouteBindingEdgeSelect; - }; -}; -export interface DeleteRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was deleted by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} -export type DeleteRouteBindingPayloadSelect = { - clientMutationId?: boolean; - routeBinding?: { - select: RouteBindingSelect; - }; - routeBindingEdge?: { - select: RouteBindingEdgeSelect; - }; -}; export interface CreateRoutePayload { clientMutationId?: string | null; /** The `Route` that was created by this mutation. */ @@ -25586,6 +25221,18 @@ 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; @@ -26078,30 +25725,6 @@ 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 `HostnameBinding` edge in the connection. */ -export interface HostnameBindingEdge { - cursor?: string | null; - /** The `HostnameBinding` at the end of the edge. */ - node?: HostnameBinding | null; -} -export type HostnameBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: HostnameBindingSelect; - }; -}; /** A `IdentityProviderRegistry` edge in the connection. */ export interface IdentityProviderRegistryEdge { cursor?: string | null; @@ -26462,18 +26085,6 @@ export type RlsSettingEdgeSelect = { select: RlsSettingSelect; }; }; -/** A `RouteBinding` edge in the connection. */ -export interface RouteBindingEdge { - cursor?: string | null; - /** The `RouteBinding` at the end of the edge. */ - node?: RouteBinding | null; -} -export type RouteBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: RouteBindingSelect; - }; -}; /** A `Schema` edge in the connection. */ export interface SchemaEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/api/orm/models/hostnameBinding.ts b/sdk/constructive-react/src/api/orm/models/hostnameBinding.ts deleted file mode 100644 index f720f177ad..0000000000 --- a/sdk/constructive-react/src/api/orm/models/hostnameBinding.ts +++ /dev/null @@ -1,245 +0,0 @@ -/** - * HostnameBinding 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 { - HostnameBinding, - HostnameBindingWithRelations, - HostnameBindingSelect, - HostnameBindingFilter, - HostnameBindingOrderBy, - CreateHostnameBindingInput, - UpdateHostnameBindingInput, - HostnameBindingPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class HostnameBindingModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - hostnameBindings: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'HostnameBinding', - 'hostnameBindings', - 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, - }, - 'HostnameBindingFilter', - 'HostnameBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'HostnameBinding', - fieldName: 'hostnameBindings', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - hostnameBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'HostnameBinding', - 'hostnameBindings', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'HostnameBindingFilter', - 'HostnameBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'HostnameBinding', - fieldName: 'hostnameBinding', - document, - variables, - transform: (data: { - hostnameBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - hostnameBinding: data.hostnameBindings?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - hostnameBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'HostnameBinding', - 'hostnameBindings', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'HostnameBindingFilter', - 'HostnameBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'HostnameBinding', - fieldName: 'hostnameBinding', - document, - variables, - transform: (data: { - hostnameBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - hostnameBinding: data.hostnameBindings?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'HostnameBinding', - 'createHostnameBinding', - 'hostnameBinding', - args.select, - args.data, - 'CreateHostnameBindingInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'HostnameBinding', - fieldName: 'createHostnameBinding', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - HostnameBindingPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'HostnameBinding', - 'updateHostnameBinding', - 'hostnameBinding', - args.select, - args.where.id, - args.data, - 'UpdateHostnameBindingInput', - 'id', - 'hostnameBindingPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'HostnameBinding', - fieldName: 'updateHostnameBinding', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'HostnameBinding', - 'deleteHostnameBinding', - 'hostnameBinding', - { - id: args.where.id, - }, - 'DeleteHostnameBindingInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'HostnameBinding', - fieldName: 'deleteHostnameBinding', - document, - variables, - }); - } -} diff --git a/sdk/constructive-react/src/api/orm/models/index.ts b/sdk/constructive-react/src/api/orm/models/index.ts index 0ef42de592..207f507c84 100644 --- a/sdk/constructive-react/src/api/orm/models/index.ts +++ b/sdk/constructive-react/src/api/orm/models/index.ts @@ -32,7 +32,6 @@ export { ForeignKeyConstraintModel } from './foreignKeyConstraint'; export { FullTextSearchModel } from './fullTextSearch'; export { FunctionModel } from './function'; export { GetSitePreviewsRecordModel } from './getSitePreviewsRecord'; -export { HostnameBindingModel } from './hostnameBinding'; export { IdentityProviderRegistryModel } from './identityProviderRegistry'; export { IndexModel } from './indexModel'; export { ListSuspendedDatabasesRecordModel } from './listSuspendedDatabasesRecord'; @@ -67,7 +66,6 @@ export { PrimaryKeyConstraintModel } from './primaryKeyConstraint'; export { PubkeySettingModel } from './pubkeySetting'; export { RedirectModel } from './redirect'; export { RlsSettingModel } from './rlsSetting'; -export { RouteBindingModel } from './routeBinding'; export { RouteModel } from './route'; export { SchemaModel } from './schema'; export { SchemaGrantModel } from './schemaGrant'; diff --git a/sdk/constructive-react/src/api/orm/models/routeBinding.ts b/sdk/constructive-react/src/api/orm/models/routeBinding.ts deleted file mode 100644 index 3389ee7e37..0000000000 --- a/sdk/constructive-react/src/api/orm/models/routeBinding.ts +++ /dev/null @@ -1,245 +0,0 @@ -/** - * RouteBinding 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 { - RouteBinding, - RouteBindingWithRelations, - RouteBindingSelect, - RouteBindingFilter, - RouteBindingOrderBy, - CreateRouteBindingInput, - UpdateRouteBindingInput, - RouteBindingPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class RouteBindingModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - routeBindings: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'RouteBinding', - 'routeBindings', - 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, - }, - 'RouteBindingFilter', - 'RouteBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'RouteBinding', - fieldName: 'routeBindings', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - routeBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'RouteBinding', - 'routeBindings', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'RouteBindingFilter', - 'RouteBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'RouteBinding', - fieldName: 'routeBinding', - document, - variables, - transform: (data: { - routeBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - routeBinding: data.routeBindings?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - routeBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'RouteBinding', - 'routeBindings', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'RouteBindingFilter', - 'RouteBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'RouteBinding', - fieldName: 'routeBinding', - document, - variables, - transform: (data: { - routeBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - routeBinding: data.routeBindings?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createRouteBinding: { - routeBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'RouteBinding', - 'createRouteBinding', - 'routeBinding', - args.select, - args.data, - 'CreateRouteBindingInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'RouteBinding', - fieldName: 'createRouteBinding', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - RouteBindingPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateRouteBinding: { - routeBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'RouteBinding', - 'updateRouteBinding', - 'routeBinding', - args.select, - args.where.id, - args.data, - 'UpdateRouteBindingInput', - 'id', - 'routeBindingPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'RouteBinding', - fieldName: 'updateRouteBinding', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteRouteBinding: { - routeBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'RouteBinding', - 'deleteRouteBinding', - 'routeBinding', - { - id: args.where.id, - }, - 'DeleteRouteBindingInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'RouteBinding', - fieldName: 'deleteRouteBinding', - 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 e38f6845a3..0afacc078c 100644 --- a/sdk/constructive-react/src/api/orm/mutation/index.ts +++ b/sdk/constructive-react/src/api/orm/mutation/index.ts @@ -10,6 +10,7 @@ import type { AcceptDatabaseTransferInput, ApplyRlsInput, CancelDatabaseTransferInput, + CreateFunctionFromSourceInput, DeleteSitePreviewInput, DomainsAssignSubdomainInput, MintSitePreviewTokenInput, @@ -36,9 +37,11 @@ import type { SitesProvisionStaticSiteInput, SuspendDatabaseInput, UnsuspendDatabaseInput, + UpdateFunctionFromSourceInput, AcceptDatabaseTransferPayload, ApplyRlsPayload, CancelDatabaseTransferPayload, + CreateFunctionPayload, DeleteSitePreviewPayload, DomainsAssignSubdomainPayload, MintSitePreviewTokenPayload, @@ -65,9 +68,11 @@ import type { SitesProvisionStaticSitePayload, SuspendDatabasePayload, UnsuspendDatabasePayload, + UpdateFunctionPayload, AcceptDatabaseTransferPayloadSelect, ApplyRlsPayloadSelect, CancelDatabaseTransferPayloadSelect, + CreateFunctionPayloadSelect, DeleteSitePreviewPayloadSelect, DomainsAssignSubdomainPayloadSelect, MintSitePreviewTokenPayloadSelect, @@ -94,6 +99,7 @@ import type { SitesProvisionStaticSitePayloadSelect, SuspendDatabasePayloadSelect, UnsuspendDatabasePayloadSelect, + UpdateFunctionPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface AcceptDatabaseTransferVariables { @@ -105,6 +111,13 @@ 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; } @@ -150,10 +163,11 @@ export interface PlatformSitesProvisionStaticSiteVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; @@ -202,6 +216,13 @@ 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: ( @@ -291,6 +312,35 @@ 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: { @@ -1063,5 +1113,34 @@ 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 0c2a655e71..12ea7b4e72 100644 --- a/sdk/constructive-react/src/api/orm/query/index.ts +++ b/sdk/constructive-react/src/api/orm/query/index.ts @@ -137,6 +137,25 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + emailSharedAccount: (options?: { select?: Record }) => + new QueryBuilder<{ + emailSharedAccount: unknown | null; + }>({ + client, + operation: 'query', + operationName: 'EmailSharedAccount', + fieldName: 'emailSharedAccount', + ...buildCustomDocument( + 'query', + 'EmailSharedAccount', + 'emailSharedAccount', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), getSitePreviewCommit: ( args: GetSitePreviewCommitVariables, options?: { diff --git a/sdk/constructive-react/src/api/schema-types.ts b/sdk/constructive-react/src/api/schema-types.ts index a96993b34a..eb20b05828 100644 --- a/sdk/constructive-react/src/api/schema-types.ts +++ b/sdk/constructive-react/src/api/schema-types.ts @@ -34,7 +34,6 @@ import type { FullTextSearch, Function, GetSitePreviewsRecord, - HostnameBinding, IdentityProviderRegistry, Index, ListSuspendedDatabasesRecord, @@ -70,7 +69,6 @@ import type { Redirect, RlsSetting, Route, - RouteBinding, Schema, SchemaGrant, Site, @@ -1033,31 +1031,6 @@ export type FunctionOrderBy = | 'TAGS_DESC' | 'VOLATILITY_ASC' | 'VOLATILITY_DESC'; -/** Methods to use when ordering `HostnameBinding`. */ -export type HostnameBindingOrderBy = - | 'DOMAIN_ID_ASC' - | 'DOMAIN_ID_DESC' - | 'HOSTNAME_ASC' - | 'HOSTNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_WILDCARD_ASC' - | 'IS_WILDCARD_DESC' - | 'MANAGED_ASC' - | 'MANAGED_DESC' - | 'NATURAL' - | 'PARENT_HOSTNAME_ASC' - | 'PARENT_HOSTNAME_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'TLS_SECRET_NAME_ASC' - | 'TLS_SECRET_NAME_DESC' - | 'TLS_STATUS_ASC' - | 'TLS_STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'VERIFICATION_STATUS_ASC' - | 'VERIFICATION_STATUS_DESC'; /** Methods to use when ordering `IdentityProviderRegistry`. */ export type IdentityProviderRegistryOrderBy = | 'AUTHORIZATION_URL_ASC' @@ -1143,6 +1116,8 @@ export type ManagedDomainOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PUBLIC_PORT_ASC' + | 'PUBLIC_PORT_DESC' | 'TLS_READY_AT_ASC' | 'TLS_READY_AT_DESC' | 'TLS_STATUS_ASC' @@ -1542,6 +1517,8 @@ export type PlatformManagedDomainOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PUBLIC_PORT_ASC' + | 'PUBLIC_PORT_DESC' | 'TLS_READY_AT_ASC' | 'TLS_READY_AT_DESC' | 'TLS_STATUS_ASC' @@ -1947,39 +1924,6 @@ export type RlsSettingOrderBy = | 'ROLE_SCHEMA_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `RouteBinding`. */ -export type RouteBindingOrderBy = - | 'DOMAIN_ID_ASC' - | 'DOMAIN_ID_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_ACTIVE_ASC' - | 'IS_ACTIVE_DESC' - | 'METHOD_ASC' - | 'METHOD_DESC' - | 'NATURAL' - | 'PATH_ASC' - | 'PATH_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'PRIORITY_ASC' - | 'PRIORITY_DESC' - | 'SERVING_SITE_ID_ASC' - | 'SERVING_SITE_ID_DESC' - | 'TARGET_API_ID_ASC' - | 'TARGET_API_ID_DESC' - | 'TARGET_BUCKET_ID_ASC' - | 'TARGET_BUCKET_ID_DESC' - | 'TARGET_FUNCTION_ID_ASC' - | 'TARGET_FUNCTION_ID_DESC' - | 'TARGET_REDIRECT_ID_ASC' - | 'TARGET_REDIRECT_ID_DESC' - | 'TARGET_SERVICE_ID_ASC' - | 'TARGET_SERVICE_ID_DESC' - | 'TARGET_SITE_ID_ASC' - | 'TARGET_SITE_ID_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; /** Methods to use when ordering `Route`. */ export type RouteOrderBy = | 'ANONYMOUS_ASC' @@ -2555,6 +2499,8 @@ export type UniqueConstraintOrderBy = | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' + | 'NULLS_NOT_DISTINCT_ASC' + | 'NULLS_NOT_DISTINCT_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'SMART_TAGS_ASC' @@ -3488,16 +3434,20 @@ 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. */ function: FunctionInput; } -export interface CreateHostnameBindingInput { - clientMutationId?: string; - /** The `HostnameBinding` to be created by this mutation. */ - hostnameBinding: HostnameBindingInput; -} export interface CreateIdentityProviderRegistryInput { clientMutationId?: string; /** The `IdentityProviderRegistry` to be created by this mutation. */ @@ -3658,11 +3608,6 @@ export interface CreateRlsSettingInput { /** The `RlsSetting` to be created by this mutation. */ rlsSetting: RlsSettingInput; } -export interface CreateRouteBindingInput { - clientMutationId?: string; - /** The `RouteBinding` to be created by this mutation. */ - routeBinding: RouteBindingInput; -} export interface CreateRouteInput { clientMutationId?: string; /** The `Route` to be created by this mutation. */ @@ -4721,10 +4666,6 @@ export interface DeleteFunctionInput { clientMutationId?: string; id: string; } -export interface DeleteHostnameBindingInput { - clientMutationId?: string; - id: string; -} export interface DeleteIdentityProviderRegistryInput { clientMutationId?: string; slug: string; @@ -4855,10 +4796,6 @@ export interface DeleteRlsSettingInput { clientMutationId?: string; id: string; } -export interface DeleteRouteBindingInput { - clientMutationId?: string; - id: string; -} export interface DeleteRouteInput { clientMutationId?: string; id: string; @@ -6528,79 +6465,6 @@ export interface FunctionToManyTriggerFilter { /** Filters to entities where at least one related entity matches. */ some?: TriggerFilter; } -/** A filter to be used against `HostnameBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface HostnameBindingFilter { - /** Checks for all expressions in this list. */ - and?: HostnameBindingFilter[]; - /** Filter by the object’s `domainId` field. */ - domainId?: UUIDFilter; - /** Filter by the object’s `hostname` field. */ - hostname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isWildcard` field. */ - isWildcard?: BooleanFilter; - /** Filter by the object’s `managed` field. */ - managed?: BooleanFilter; - /** Negates the expression. */ - not?: HostnameBindingFilter; - /** Checks for any expressions in this list. */ - or?: HostnameBindingFilter[]; - /** Filter by the object’s `parentHostname` field. */ - parentHostname?: StringFilter; - /** Filter by the object’s `tlsSecretName` field. */ - tlsSecretName?: StringFilter; - /** Filter by the object’s `tlsStatus` field. */ - tlsStatus?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `verificationStatus` field. */ - verificationStatus?: StringFilter; -} -/** An input for mutations affecting `HostnameBinding` */ -export interface HostnameBindingInput { - /** Domain row this binding was compiled from */ - domainId: string; - /** Lowercase hostname (exact or *.parent wildcard) */ - hostname: string; - id?: string; - /** Whether this binding is a wildcard claim */ - isWildcard?: boolean; - /** Whether the platform drives this hostname's lifecycle */ - managed?: boolean; - /** Parent hostname a wildcard binding covers */ - parentHostname?: string; - /** TLS secret name compiled from the domain row */ - tlsSecretName?: string; - /** Certificate lifecycle state compiled from the domain row */ - tlsStatus?: string; - /** When this binding was last recompiled */ - updatedAt?: string; - /** Ownership verification state compiled from the domain row */ - verificationStatus?: string; -} -/** Represents an update to a `HostnameBinding`. Fields that are set will be updated. */ -export interface HostnameBindingPatch { - /** Domain row this binding was compiled from */ - domainId?: string; - /** Lowercase hostname (exact or *.parent wildcard) */ - hostname?: string; - id?: string; - /** Whether this binding is a wildcard claim */ - isWildcard?: boolean; - /** Whether the platform drives this hostname's lifecycle */ - managed?: boolean; - /** Parent hostname a wildcard binding covers */ - parentHostname?: string; - /** TLS secret name compiled from the domain row */ - tlsSecretName?: string; - /** Certificate lifecycle state compiled from the domain row */ - tlsStatus?: string; - /** When this binding was last recompiled */ - updatedAt?: string; - /** Ownership verification state compiled from the domain row */ - verificationStatus?: string; -} /** A filter to be used against `IdentityProviderRegistry` object types. All fields are combined with a logical ‘and.’ */ export interface IdentityProviderRegistryFilter { /** Checks for all expressions in this list. */ @@ -6773,6 +6637,8 @@ export interface ManagedDomainFilter { not?: ManagedDomainFilter; /** Checks for any expressions in this list. */ or?: ManagedDomainFilter[]; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -6803,6 +6669,8 @@ export interface ManagedDomainInput { id?: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number; /** When TLS last became ready */ tlsReadyAt?: string; /** TLS provisioning state for this managed hostname */ @@ -6831,6 +6699,8 @@ export interface ManagedDomainPatch { id?: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number; /** When TLS last became ready */ tlsReadyAt?: string; /** TLS provisioning state for this managed hostname */ @@ -8051,6 +7921,8 @@ export interface PlatformManagedDomainFilter { platformDomainVerificationsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainVerificationFilter; /** `platformDomainVerificationsByManagedDomainId` exist. */ platformDomainVerificationsByManagedDomainIdExist?: boolean; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -8079,6 +7951,8 @@ export interface PlatformManagedDomainInput { id?: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number; /** When TLS last became ready */ tlsReadyAt?: string; /** TLS provisioning state for this managed hostname */ @@ -8105,6 +7979,8 @@ export interface PlatformManagedDomainPatch { id?: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number; /** When TLS last became ready */ tlsReadyAt?: string; /** TLS provisioning state for this managed hostname */ @@ -9458,103 +9334,6 @@ export interface RlsSettingPatch { roleSchemaId?: string; updatedAt?: string; } -/** A filter to be used against `RouteBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface RouteBindingFilter { - /** Checks for all expressions in this list. */ - and?: RouteBindingFilter[]; - /** Filter by the object’s `domainId` field. */ - domainId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isActive` field. */ - isActive?: BooleanFilter; - /** Filter by the object’s `method` field. */ - method?: StringFilter; - /** Negates the expression. */ - not?: RouteBindingFilter; - /** Checks for any expressions in this list. */ - or?: RouteBindingFilter[]; - /** Filter by the object’s `path` field. */ - path?: StringFilter; - /** Filter by the object’s `priority` field. */ - priority?: IntFilter; - /** Filter by the object’s `servingSiteId` field. */ - servingSiteId?: UUIDFilter; - /** Filter by the object’s `targetApiId` field. */ - targetApiId?: UUIDFilter; - /** Filter by the object’s `targetBucketId` field. */ - targetBucketId?: UUIDFilter; - /** Filter by the object’s `targetFunctionId` field. */ - targetFunctionId?: UUIDFilter; - /** Filter by the object’s `targetRedirectId` field. */ - targetRedirectId?: UUIDFilter; - /** Filter by the object’s `targetServiceId` field. */ - targetServiceId?: UUIDFilter; - /** Filter by the object’s `targetSiteId` field. */ - targetSiteId?: UUIDFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} -/** An input for mutations affecting `RouteBinding` */ -export interface RouteBindingInput { - /** Domain row the source route binds */ - domainId: string; - id?: string; - /** Active flag compiled from the source route */ - isActive?: boolean; - /** HTTP method this binding matches; NULL matches any method */ - method?: string; - /** Path prefix this binding matches */ - path: string; - /** Priority compiled from the source route */ - priority?: number; - /** Site whose surface the source route serves; NULL when it serves no site */ - servingSiteId?: string; - /** Api catalog row the source route targets */ - targetApiId?: string; - /** Bucket catalog row the source route targets */ - targetBucketId?: string; - /** Function catalog row the source route targets */ - targetFunctionId?: string; - /** Redirect catalog row the source route targets */ - targetRedirectId?: string; - /** Resource catalog row (a Service resource) the source route targets */ - targetServiceId?: string; - /** Site catalog row the source route targets */ - targetSiteId?: string; - /** When this binding was last recompiled */ - updatedAt?: string; -} -/** Represents an update to a `RouteBinding`. Fields that are set will be updated. */ -export interface RouteBindingPatch { - /** Domain row the source route binds */ - domainId?: string; - id?: string; - /** Active flag compiled from the source route */ - isActive?: boolean; - /** HTTP method this binding matches; NULL matches any method */ - method?: string; - /** Path prefix this binding matches */ - path?: string; - /** Priority compiled from the source route */ - priority?: number; - /** Site whose surface the source route serves; NULL when it serves no site */ - servingSiteId?: string; - /** Api catalog row the source route targets */ - targetApiId?: string; - /** Bucket catalog row the source route targets */ - targetBucketId?: string; - /** Function catalog row the source route targets */ - targetFunctionId?: string; - /** Redirect catalog row the source route targets */ - targetRedirectId?: string; - /** Resource catalog row (a Service resource) the source route targets */ - targetServiceId?: string; - /** Site catalog row the source route targets */ - targetSiteId?: string; - /** When this binding was last recompiled */ - updatedAt?: string; -} /** A filter to be used against `Route` object types. All fields are combined with a logical ‘and.’ */ export interface RouteFilter { /** Checks for all expressions in this list. */ @@ -11541,6 +11320,8 @@ export interface UniqueConstraintFilter { name?: StringFilter; /** Negates the expression. */ not?: UniqueConstraintFilter; + /** Filter by the object’s `nullsNotDistinct` field. */ + nullsNotDistinct?: BooleanFilter; /** Checks for any expressions in this list. */ or?: UniqueConstraintFilter[]; /** Filter by the object’s `smartTags` field. */ @@ -11573,6 +11354,7 @@ export interface UniqueConstraintInput { initiallyDeferred?: boolean; isDeferrable?: boolean; name?: string; + nullsNotDistinct?: boolean; smartTags?: unknown; tableId: string; tags?: string[]; @@ -11591,6 +11373,7 @@ export interface UniqueConstraintPatch { initiallyDeferred?: boolean; isDeferrable?: boolean; name?: string; + nullsNotDistinct?: boolean; smartTags?: unknown; tableId?: string; tags?: string[]; @@ -11768,16 +11551,17 @@ export interface UpdateFullTextSearchInput { fullTextSearchPatch: FullTextSearchPatch; id: string; } -export interface UpdateFunctionInput { +/** Replace a function's definition from its `CREATE FUNCTION` source text. */ +export interface UpdateFunctionFromSourceInput { clientMutationId?: string; - /** An object where the defined keys will be set on the `Function` being updated. */ - functionPatch: FunctionPatch; id: string; + /** One `CREATE FUNCTION` statement (LANGUAGE plpgsql or sql). */ + source: string; } -export interface UpdateHostnameBindingInput { +export interface UpdateFunctionInput { clientMutationId?: string; - /** An object where the defined keys will be set on the `HostnameBinding` being updated. */ - hostnameBindingPatch: HostnameBindingPatch; + /** An object where the defined keys will be set on the `Function` being updated. */ + functionPatch: FunctionPatch; id: string; } export interface UpdateIdentityProviderRegistryInput { @@ -11974,12 +11758,6 @@ export interface UpdateRlsSettingInput { /** An object where the defined keys will be set on the `RlsSetting` being updated. */ rlsSettingPatch: RlsSettingPatch; } -export interface UpdateRouteBindingInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `RouteBinding` being updated. */ - routeBindingPatch: RouteBindingPatch; -} export interface UpdateRouteInput { clientMutationId?: string; id: string; @@ -12833,13 +12611,6 @@ export interface GetSitePreviewsConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `HostnameBinding` values. */ -export interface HostnameBindingConnection { - edges: HostnameBindingEdge[]; - nodes: HostnameBinding[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `IdentityProviderRegistry` values. */ export interface IdentityProviderRegistryConnection { edges: IdentityProviderRegistryEdge[]; @@ -13097,13 +12868,6 @@ export interface RlsSettingConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `RouteBinding` values. */ -export interface RouteBindingConnection { - edges: RouteBindingEdge[]; - nodes: RouteBinding[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `Route` values. */ export interface RouteConnection { edges: RouteEdge[]; @@ -13466,12 +13230,6 @@ export interface CreateFunctionPayload { function?: Function | null; functionEdge?: FunctionEdge | null; } -export interface CreateHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was created by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} export interface CreateIdentityProviderRegistryPayload { clientMutationId?: string | null; /** The `IdentityProviderRegistry` that was created by this mutation. */ @@ -13670,12 +13428,6 @@ export interface CreateRoutePayload { route?: Route | null; routeEdge?: RouteEdge | null; } -export interface CreateRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was created by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} export interface CreateSchemaPayload { clientMutationId?: string | null; /** The `Schema` that was created by this mutation. */ @@ -13988,12 +13740,6 @@ export interface DeleteFunctionPayload { function?: Function | null; functionEdge?: FunctionEdge | null; } -export interface DeleteHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was deleted by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} export interface DeleteIdentityProviderRegistryPayload { clientMutationId?: string | null; /** The `IdentityProviderRegistry` that was deleted by this mutation. */ @@ -14192,12 +13938,6 @@ export interface DeleteRoutePayload { route?: Route | null; routeEdge?: RouteEdge | null; } -export interface DeleteRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was deleted by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} export interface DeleteSchemaPayload { clientMutationId?: string | null; /** The `Schema` that was deleted by this mutation. */ @@ -14406,13 +14146,13 @@ export interface PlatformSitesProvisionStaticSitePayload { result?: PlatformRoute | null; } export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export interface ProvisionSitePreviewPayload { clientMutationId?: string | null; @@ -14624,12 +14364,6 @@ export interface UpdateFunctionPayload { function?: Function | null; functionEdge?: FunctionEdge | null; } -export interface UpdateHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was updated by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} export interface UpdateIdentityProviderRegistryPayload { clientMutationId?: string | null; /** The `IdentityProviderRegistry` that was updated by this mutation. */ @@ -14828,12 +14562,6 @@ export interface UpdateRoutePayload { route?: Route | null; routeEdge?: RouteEdge | null; } -export interface UpdateRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was updated by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} export interface UpdateSchemaPayload { clientMutationId?: string | null; /** The `Schema` that was updated by this mutation. */ @@ -15196,12 +14924,6 @@ export interface GetSitePreviewsEdge { /** The `GetSitePreviewsRecord` at the end of the edge. */ node?: GetSitePreviewsRecord | null; } -/** A `HostnameBinding` edge in the connection. */ -export interface HostnameBindingEdge { - cursor?: string | null; - /** The `HostnameBinding` at the end of the edge. */ - node?: HostnameBinding | null; -} /** A `IdentityProviderRegistry` edge in the connection. */ export interface IdentityProviderRegistryEdge { cursor?: string | null; @@ -15406,12 +15128,6 @@ export interface RlsSettingEdge { /** The `RlsSetting` at the end of the edge. */ node?: RlsSetting | null; } -/** A `RouteBinding` edge in the connection. */ -export interface RouteBindingEdge { - cursor?: string | null; - /** The `RouteBinding` at the end of the edge. */ - node?: RouteBinding | null; -} /** A `Route` edge in the connection. */ export interface RouteEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/api/types.ts b/sdk/constructive-react/src/api/types.ts index 2809c2fd40..89bc1cf1c7 100644 --- a/sdk/constructive-react/src/api/types.ts +++ b/sdk/constructive-react/src/api/types.ts @@ -454,18 +454,6 @@ export interface GetSitePreviewsRecord { commitId: string | null; name: string | null; } -export interface HostnameBinding { - domainId: string | null; - hostname: string | null; - id: string | null; - isWildcard: boolean | null; - managed: boolean | null; - parentHostname: string | null; - tlsSecretName: string | null; - tlsStatus: string | null; - updatedAt: string | null; - verificationStatus: string | null; -} export interface IdentityProviderRegistry { authorizationUrl: string | null; displayName: string | null; @@ -513,6 +501,7 @@ export interface ManagedDomain { domain: string | null; id: string | null; isWildcard: boolean | null; + publicPort: number | null; tlsReadyAt: string | null; tlsStatus: string | null; updatedAt: string | null; @@ -709,6 +698,7 @@ export interface PlatformManagedDomain { domain: string | null; id: string | null; isWildcard: boolean | null; + publicPort: number | null; tlsReadyAt: string | null; tlsStatus: string | null; updatedAt: string | null; @@ -905,22 +895,6 @@ export interface RlsSetting { roleSchemaId: string | null; updatedAt: string | null; } -export interface RouteBinding { - domainId: string | null; - id: string | null; - isActive: boolean | null; - method: string | null; - path: string | null; - priority: number | null; - servingSiteId: string | null; - targetApiId: string | null; - targetBucketId: string | null; - targetFunctionId: string | null; - targetRedirectId: string | null; - targetServiceId: string | null; - targetSiteId: string | null; - updatedAt: string | null; -} export interface Route { anonymous: boolean | null; config: unknown | null; @@ -1199,6 +1173,7 @@ export interface UniqueConstraint { initiallyDeferred: boolean | null; isDeferrable: boolean | null; name: string | null; + nullsNotDistinct: boolean | null; smartTags: unknown | null; tableId: string | null; tags: string[] | null; diff --git a/sdk/constructive-react/src/auth/hooks/README.md b/sdk/constructive-react/src/auth/hooks/README.md index 5ee11ced5e..5cf4da76c9 100644 --- a/sdk/constructive-react/src/auth/hooks/README.md +++ b/sdk/constructive-react/src/auth/hooks/README.md @@ -135,10 +135,11 @@ function App() { | `useLinkIdentityMutation` | Mutation | linkIdentity | | `useMintAccessTokenMutation` | Mutation | mintAccessToken | | `useProvisionBucketMutation` | Mutation | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `useRefreshAccessTokenMutation` | Mutation | refreshAccessToken | | `useRequestCrossOriginTokenMutation` | Mutation | requestCrossOriginToken | | `useRequestMagicLinkMutation` | Mutation | requestMagicLink | @@ -796,10 +797,11 @@ mintAccessToken ### `useProvisionBucketMutation` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/auth/orm/README.md b/sdk/constructive-react/src/auth/orm/README.md index 3943dd4aac..6e93f55c69 100644 --- a/sdk/constructive-react/src/auth/orm/README.md +++ b/sdk/constructive-react/src/auth/orm/README.md @@ -1025,10 +1025,11 @@ const result = await db.mutation.mintAccessToken({ input: { accessTtl: '' } }).execute(); +const result = await db.mutation.requestMagicLink({ input: { email: '', next: '' } }).execute(); ``` ### `db.mutation.resetPassword` @@ -1368,7 +1369,7 @@ signUp | `input` | SignUpInput (required) | ```typescript -const result = await db.mutation.signUp({ input: '' }).execute(); +const result = await db.mutation.signUp({ input: { csrfToken: '', email: '', inviteToken: '', password: '' } }).execute(); ``` ### `db.mutation.signUpMagicLink` diff --git a/sdk/constructive-react/src/auth/orm/input-types.ts b/sdk/constructive-react/src/auth/orm/input-types.ts index 82e2d1a346..1289140d59 100644 --- a/sdk/constructive-react/src/auth/orm/input-types.ts +++ b/sdk/constructive-react/src/auth/orm/input-types.ts @@ -2168,6 +2168,7 @@ export interface RequestCrossOriginTokenInput { export interface RequestMagicLinkInput { clientMutationId?: string; email?: string; + next?: string; } export interface ResetPasswordInput { clientMutationId?: string; @@ -2266,13 +2267,10 @@ export interface SignOutInput { } export interface SignUpInput { clientMutationId?: string; - credentialKind?: string; csrfToken?: string; - deviceToken?: string; email?: string; inviteToken?: string; password?: string; - rememberMe?: boolean; } export interface SignUpMagicLinkInput { clientMutationId?: string; @@ -3847,19 +3845,19 @@ export type MintAccessTokenPayloadSelect = { }; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface RefreshAccessTokenPayload { clientMutationId?: string | null; @@ -4037,13 +4035,9 @@ export type SignOutPayloadSelect = { }; export interface SignUpPayload { clientMutationId?: string | null; - result?: SignUpRecord | null; } export type SignUpPayloadSelect = { clientMutationId?: boolean; - result?: { - select: SignUpRecordSelect; - }; }; export interface SignUpMagicLinkPayload { clientMutationId?: string | null; @@ -4684,24 +4678,6 @@ export type SignInSmsOtpRecordSelect = { outDeviceToken?: boolean; userId?: boolean; }; -export interface SignUpRecord { - accessToken?: string | null; - accessTokenExpiresAt?: string | null; - id?: string | null; - isVerified?: boolean | null; - outDeviceToken?: string | null; - totpEnabled?: boolean | null; - userId?: string | null; -} -export type SignUpRecordSelect = { - accessToken?: boolean; - accessTokenExpiresAt?: boolean; - id?: boolean; - isVerified?: boolean; - outDeviceToken?: boolean; - totpEnabled?: boolean; - userId?: boolean; -}; export interface SignUpMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; diff --git a/sdk/constructive-react/src/auth/orm/mutation/index.ts b/sdk/constructive-react/src/auth/orm/mutation/index.ts index 855a8a7466..39394d78e4 100644 --- a/sdk/constructive-react/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-react/src/auth/orm/mutation/index.ts @@ -249,10 +249,11 @@ export interface MintAccessTokenVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-react/src/auth/schema-types.ts b/sdk/constructive-react/src/auth/schema-types.ts index 93c2e2367c..7c40ace397 100644 --- a/sdk/constructive-react/src/auth/schema-types.ts +++ b/sdk/constructive-react/src/auth/schema-types.ts @@ -1293,6 +1293,7 @@ export interface RequestCrossOriginTokenInput { export interface RequestMagicLinkInput { clientMutationId?: string; email?: string; + next?: string; } export interface ResetPasswordInput { clientMutationId?: string; @@ -1414,13 +1415,10 @@ export interface SignOutInput { } export interface SignUpInput { clientMutationId?: string; - credentialKind?: string; csrfToken?: string; - deviceToken?: string; email?: string; inviteToken?: string; password?: string; - rememberMe?: boolean; } export interface SignUpMagicLinkInput { clientMutationId?: string; @@ -2316,13 +2314,13 @@ export interface MintAccessTokenPayload { result?: MintAccessTokenRecord | null; } export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export interface RefreshAccessTokenPayload { clientMutationId?: string | null; @@ -2408,7 +2406,6 @@ export interface SignOutPayload { } export interface SignUpPayload { clientMutationId?: string | null; - result?: SignUpRecord | null; } export interface SignUpMagicLinkPayload { clientMutationId?: string | null; @@ -2703,15 +2700,6 @@ export interface SignInSmsOtpRecord { outDeviceToken?: string | null; userId?: string | null; } -export interface SignUpRecord { - accessToken?: string | null; - accessTokenExpiresAt?: string | null; - id?: string | null; - isVerified?: boolean | null; - outDeviceToken?: string | null; - totpEnabled?: boolean | null; - userId?: string | null; -} export interface SignUpMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; diff --git a/sdk/constructive-react/src/compute/hooks/README.md b/sdk/constructive-react/src/compute/hooks/README.md index dd423cf1e7..f023257150 100644 --- a/sdk/constructive-react/src/compute/hooks/README.md +++ b/sdk/constructive-react/src/compute/hooks/README.md @@ -659,10 +659,11 @@ function App() { | `usePlatformResourceInstallationsUninstallMutation` | Mutation | platformResourceInstallationsUninstall | | `usePlatformResourceInstallationsUpgradeMutation` | Mutation | platformResourceInstallationsUpgrade | | `useProvisionBucketMutation` | Mutation | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `useResourceInstallationsInstallMutation` | Mutation | resourceInstallationsInstall | | `useResourceInstallationsRollbackMutation` | Mutation | resourceInstallationsRollback | | `useResourceInstallationsUninstallMutation` | Mutation | resourceInstallationsUninstall | @@ -1326,20 +1327,20 @@ create({ actorId: '', attempt: '', databaseId: '', durationMs: ```typescript // List all functionInvocations const { data, isLoading } = useFunctionInvocationsQuery({ - selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }, + selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }, }); // Get one functionInvocation const { data: item } = useFunctionInvocationQuery({ id: '', - selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }, + selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }, }); // Create a functionInvocation const { mutate: create } = useCreateFunctionInvocationMutation({ selection: { fields: { id: true } }, }); -create({ actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }); +create({ actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }); ``` ### FunctionSchedule @@ -1797,20 +1798,20 @@ create({ actorId: '', attempt: '', durationMs: '', error: '', - selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }, + selection: { fields: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }, }); // Create a platformFunctionInvocation const { mutate: create } = useCreatePlatformFunctionInvocationMutation({ selection: { fields: { id: true } }, }); -create({ actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }); +create({ actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }); ``` ### PlatformFunctionSchedule @@ -3763,10 +3764,11 @@ platformResourceInstallationsUpgrade ### `useProvisionBucketMutation` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/compute/orm/README.md b/sdk/constructive-react/src/compute/orm/README.md index 59b61e3661..68d50bcb97 100644 --- a/sdk/constructive-react/src/compute/orm/README.md +++ b/sdk/constructive-react/src/compute/orm/README.md @@ -1435,11 +1435,13 @@ CRUD operations for FunctionInvocation records. | `graphExecutionId` | UUID | Yes | | `id` | UUID | No | | `jobId` | BigInt | Yes | +| `jobKey` | String | Yes | | `organizationId` | UUID | Yes | | `parentInvocationId` | UUID | Yes | | `payload` | JSON | Yes | | `principalId` | UUID | Yes | | `provenance` | JSON | Yes | +| `queueName` | String | Yes | | `result` | JSON | Yes | | `startedAt` | Datetime | Yes | | `status` | String | Yes | @@ -1449,13 +1451,13 @@ CRUD operations for FunctionInvocation records. ```typescript // List all functionInvocation records -const items = await db.functionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const items = await db.functionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Get one by id -const item = await db.functionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const item = await db.functionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Create -const created = await db.functionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); +const created = await db.functionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionInvocation.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -2378,11 +2380,13 @@ CRUD operations for PlatformFunctionInvocation records. | `graphExecutionId` | UUID | Yes | | `id` | UUID | No | | `jobId` | BigInt | Yes | +| `jobKey` | String | Yes | | `organizationId` | UUID | Yes | | `parentInvocationId` | UUID | Yes | | `payload` | JSON | Yes | | `principalId` | UUID | Yes | | `provenance` | JSON | Yes | +| `queueName` | String | Yes | | `result` | JSON | Yes | | `startedAt` | Datetime | Yes | | `status` | String | Yes | @@ -2392,13 +2396,13 @@ CRUD operations for PlatformFunctionInvocation records. ```typescript // List all platformFunctionInvocation records -const items = await db.platformFunctionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const items = await db.platformFunctionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Get one by id -const item = await db.platformFunctionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const item = await db.platformFunctionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Create -const created = await db.platformFunctionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionInvocation.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -6206,10 +6210,11 @@ const result = await db.mutation.platformResourceInstallationsUpgrade({ input: { ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/compute/orm/input-types.ts b/sdk/constructive-react/src/compute/orm/input-types.ts index 141f6826bd..c4f3a14a61 100644 --- a/sdk/constructive-react/src/compute/orm/input-types.ts +++ b/sdk/constructive-react/src/compute/orm/input-types.ts @@ -1124,6 +1124,8 @@ export interface FunctionInvocation { id: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string | null; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string | null; /** Organization identity propagated with the invocation */ organizationId?: string | null; /** Parent invocation when this is a child node of a flow graph execution */ @@ -1134,6 +1136,8 @@ export interface FunctionInvocation { principalId?: string | null; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record | null; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string | null; /** Function return value (success) or structured error (failure) */ result?: Record | null; /** When execution started */ @@ -1738,6 +1742,8 @@ export interface PlatformFunctionInvocation { id: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string | null; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string | null; /** Organization identity propagated with the invocation */ organizationId?: string | null; /** Parent invocation when this is a child node of a flow graph execution */ @@ -1748,6 +1754,8 @@ export interface PlatformFunctionInvocation { principalId?: string | null; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record | null; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string | null; /** Function return value (success) or structured error (failure) */ result?: Record | null; /** When execution started */ @@ -4695,11 +4703,13 @@ export type FunctionInvocationSelect = { graphExecutionId?: boolean; id?: boolean; jobId?: boolean; + jobKey?: boolean; organizationId?: boolean; parentInvocationId?: boolean; payload?: boolean; principalId?: boolean; provenance?: boolean; + queueName?: boolean; result?: boolean; startedAt?: boolean; status?: boolean; @@ -5154,11 +5164,13 @@ export type PlatformFunctionInvocationSelect = { graphExecutionId?: boolean; id?: boolean; jobId?: boolean; + jobKey?: boolean; organizationId?: boolean; parentInvocationId?: boolean; payload?: boolean; principalId?: boolean; provenance?: boolean; + queueName?: boolean; result?: boolean; startedAt?: boolean; status?: boolean; @@ -7983,6 +7995,8 @@ export interface FunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: FunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -7997,6 +8011,8 @@ export interface FunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -8835,6 +8851,8 @@ export interface PlatformFunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: PlatformFunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -8849,6 +8867,8 @@ export interface PlatformFunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -12809,6 +12829,8 @@ export type FunctionInvocationOrderBy = | 'ID_DESC' | 'JOB_ID_ASC' | 'JOB_ID_DESC' + | 'JOB_KEY_ASC' + | 'JOB_KEY_DESC' | 'NATURAL' | 'ORGANIZATION_ID_ASC' | 'ORGANIZATION_ID_DESC' @@ -12822,6 +12844,8 @@ export type FunctionInvocationOrderBy = | 'PRINCIPAL_ID_DESC' | 'PROVENANCE_ASC' | 'PROVENANCE_DESC' + | 'QUEUE_NAME_ASC' + | 'QUEUE_NAME_DESC' | 'RESULT_ASC' | 'RESULT_DESC' | 'STARTED_AT_ASC' @@ -13499,6 +13523,8 @@ export type PlatformFunctionInvocationOrderBy = | 'ID_DESC' | 'JOB_ID_ASC' | 'JOB_ID_DESC' + | 'JOB_KEY_ASC' + | 'JOB_KEY_DESC' | 'NATURAL' | 'ORGANIZATION_ID_ASC' | 'ORGANIZATION_ID_DESC' @@ -13512,6 +13538,8 @@ export type PlatformFunctionInvocationOrderBy = | 'PRINCIPAL_ID_DESC' | 'PROVENANCE_ASC' | 'PROVENANCE_DESC' + | 'QUEUE_NAME_ASC' + | 'QUEUE_NAME_DESC' | 'RESULT_ASC' | 'RESULT_DESC' | 'STARTED_AT_ASC' @@ -17031,11 +17059,13 @@ export interface CreateFunctionInvocationInput { functionDefinitionId?: string; graphExecutionId?: string; jobId?: string; + jobKey?: string; organizationId?: string; parentInvocationId?: string; payload?: Record; principalId?: string; provenance?: Record; + queueName?: string; result?: Record; startedAt?: string; status?: string; @@ -17057,11 +17087,13 @@ export interface FunctionInvocationPatch { functionDefinitionId?: string | null; graphExecutionId?: string | null; jobId?: string | null; + jobKey?: string | null; organizationId?: string | null; parentInvocationId?: string | null; payload?: Record | null; principalId?: string | null; provenance?: Record | null; + queueName?: string | null; result?: Record | null; startedAt?: string | null; status?: string | null; @@ -17889,11 +17921,13 @@ export interface CreatePlatformFunctionInvocationInput { functionDefinitionId?: string; graphExecutionId?: string; jobId?: string; + jobKey?: string; organizationId?: string; parentInvocationId?: string; payload?: Record; principalId?: string; provenance?: Record; + queueName?: string; result?: Record; startedAt?: string; status?: string; @@ -17915,11 +17949,13 @@ export interface PlatformFunctionInvocationPatch { functionDefinitionId?: string | null; graphExecutionId?: string | null; jobId?: string | null; + jobKey?: string | null; organizationId?: string | null; parentInvocationId?: string | null; payload?: Record | null; principalId?: string | null; provenance?: Record | null; + queueName?: string | null; result?: Record | null; startedAt?: string | null; status?: string | null; @@ -23033,6 +23069,8 @@ export interface FunctionInvocationInput { id?: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string; /** Organization identity propagated with the invocation */ organizationId?: string; /** Parent invocation when this is a child node of a flow graph execution */ @@ -23043,6 +23081,8 @@ export interface FunctionInvocationInput { principalId?: string; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string; /** Function return value (success) or structured error (failure) */ result?: Record; /** When execution started */ @@ -23629,6 +23669,8 @@ export interface PlatformFunctionInvocationInput { id?: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string; /** Organization identity propagated with the invocation */ organizationId?: string; /** Parent invocation when this is a child node of a flow graph execution */ @@ -23639,6 +23681,8 @@ export interface PlatformFunctionInvocationInput { principalId?: string; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string; /** Function return value (success) or structured error (failure) */ result?: Record; /** When execution started */ @@ -25363,6 +25407,8 @@ export interface FunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: FunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -25377,6 +25423,8 @@ export interface FunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -26206,6 +26254,8 @@ export interface PlatformFunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: PlatformFunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -26220,6 +26270,8 @@ export interface PlatformFunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -29321,19 +29373,19 @@ export type PlatformResourceInstallationsUpgradePayloadSelect = { clientMutationId?: boolean; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface ResourceInstallationsInstallPayload { clientMutationId?: string | null; diff --git a/sdk/constructive-react/src/compute/orm/mutation/index.ts b/sdk/constructive-react/src/compute/orm/mutation/index.ts index 44a0f3f0bd..48ca756e41 100644 --- a/sdk/constructive-react/src/compute/orm/mutation/index.ts +++ b/sdk/constructive-react/src/compute/orm/mutation/index.ts @@ -351,10 +351,11 @@ export interface PlatformResourceInstallationsUpgradeVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-react/src/compute/schema-types.ts b/sdk/constructive-react/src/compute/schema-types.ts index 529c676078..2e98363daf 100644 --- a/sdk/constructive-react/src/compute/schema-types.ts +++ b/sdk/constructive-react/src/compute/schema-types.ts @@ -1121,6 +1121,8 @@ export type FunctionInvocationOrderBy = | 'ID_DESC' | 'JOB_ID_ASC' | 'JOB_ID_DESC' + | 'JOB_KEY_ASC' + | 'JOB_KEY_DESC' | 'NATURAL' | 'ORGANIZATION_ID_ASC' | 'ORGANIZATION_ID_DESC' @@ -1134,6 +1136,8 @@ export type FunctionInvocationOrderBy = | 'PRINCIPAL_ID_DESC' | 'PROVENANCE_ASC' | 'PROVENANCE_DESC' + | 'QUEUE_NAME_ASC' + | 'QUEUE_NAME_DESC' | 'RESULT_ASC' | 'RESULT_DESC' | 'STARTED_AT_ASC' @@ -1816,6 +1820,8 @@ export type PlatformFunctionInvocationOrderBy = | 'ID_DESC' | 'JOB_ID_ASC' | 'JOB_ID_DESC' + | 'JOB_KEY_ASC' + | 'JOB_KEY_DESC' | 'NATURAL' | 'ORGANIZATION_ID_ASC' | 'ORGANIZATION_ID_DESC' @@ -1829,6 +1835,8 @@ export type PlatformFunctionInvocationOrderBy = | 'PRINCIPAL_ID_DESC' | 'PROVENANCE_ASC' | 'PROVENANCE_DESC' + | 'QUEUE_NAME_ASC' + | 'QUEUE_NAME_DESC' | 'RESULT_ASC' | 'RESULT_DESC' | 'STARTED_AT_ASC' @@ -8556,6 +8564,8 @@ export interface FunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: FunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -8570,6 +8580,8 @@ export interface FunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -8613,6 +8625,8 @@ export interface FunctionInvocationInput { id?: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string; /** Organization identity propagated with the invocation */ organizationId?: string; /** Parent invocation when this is a child node of a flow graph execution */ @@ -8623,6 +8637,8 @@ export interface FunctionInvocationInput { principalId?: string; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: unknown; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string; /** Function return value (success) or structured error (failure) */ result?: unknown; /** When execution started */ @@ -8666,6 +8682,8 @@ export interface FunctionInvocationPatch { id?: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string; /** Organization identity propagated with the invocation */ organizationId?: string; /** Parent invocation when this is a child node of a flow graph execution */ @@ -8676,6 +8694,8 @@ export interface FunctionInvocationPatch { principalId?: string; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: unknown; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string; /** Function return value (success) or structured error (failure) */ result?: unknown; /** When execution started */ @@ -10886,6 +10906,8 @@ export interface PlatformFunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: PlatformFunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -10900,6 +10922,8 @@ export interface PlatformFunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -10943,6 +10967,8 @@ export interface PlatformFunctionInvocationInput { id?: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string; /** Organization identity propagated with the invocation */ organizationId?: string; /** Parent invocation when this is a child node of a flow graph execution */ @@ -10953,6 +10979,8 @@ export interface PlatformFunctionInvocationInput { principalId?: string; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: unknown; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string; /** Function return value (success) or structured error (failure) */ result?: unknown; /** When execution started */ @@ -10996,6 +11024,8 @@ export interface PlatformFunctionInvocationPatch { id?: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string; /** Organization identity propagated with the invocation */ organizationId?: string; /** Parent invocation when this is a child node of a flow graph execution */ @@ -11006,6 +11036,8 @@ export interface PlatformFunctionInvocationPatch { principalId?: string; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: unknown; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string; /** Function return value (success) or structured error (failure) */ result?: unknown; /** When execution started */ @@ -20755,13 +20787,13 @@ export interface PlatformResourceInstallationsUpgradePayload { clientMutationId?: string | null; } export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export interface ResourceInstallationsInstallPayload { clientMutationId?: string | null; diff --git a/sdk/constructive-react/src/compute/types.ts b/sdk/constructive-react/src/compute/types.ts index 5c542c4c2e..d89c25ab4e 100644 --- a/sdk/constructive-react/src/compute/types.ts +++ b/sdk/constructive-react/src/compute/types.ts @@ -482,11 +482,13 @@ export interface FunctionInvocation { graphExecutionId: string | null; id: string | null; jobId: string | null; + jobKey: string | null; organizationId: string | null; parentInvocationId: string | null; payload: unknown | null; principalId: string | null; provenance: unknown | null; + queueName: string | null; result: unknown | null; startedAt: string | null; status: string | null; @@ -827,11 +829,13 @@ export interface PlatformFunctionInvocation { graphExecutionId: string | null; id: string | null; jobId: string | null; + jobKey: string | null; organizationId: string | null; parentInvocationId: string | null; payload: unknown | null; principalId: string | null; provenance: unknown | null; + queueName: string | null; result: unknown | null; startedAt: string | null; status: string | null; diff --git a/sdk/constructive-react/src/config/hooks/README.md b/sdk/constructive-react/src/config/hooks/README.md index b1df3ea41f..6f8bcb8d61 100644 --- a/sdk/constructive-react/src/config/hooks/README.md +++ b/sdk/constructive-react/src/config/hooks/README.md @@ -98,10 +98,11 @@ function App() { | `usePlatformSecretsRotateMutation` | Mutation | platformSecretsRotate | | `usePlatformSecretsSetMutation` | Mutation | platformSecretsSet | | `useProvisionBucketMutation` | Mutation | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | ## Table Hooks @@ -519,10 +520,11 @@ platformSecretsSet ### `useProvisionBucketMutation` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/config/orm/README.md b/sdk/constructive-react/src/config/orm/README.md index 2cd850a467..8e9c44033d 100644 --- a/sdk/constructive-react/src/config/orm/README.md +++ b/sdk/constructive-react/src/config/orm/README.md @@ -698,10 +698,11 @@ const result = await db.mutation.platformSecretsSet({ input: '', balancesTableId: '', balancesTableName: '', - selection: { fields: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }, + selection: { fields: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingConnectionTableId: true, billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderConnectedFunction: true, billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }, }); // Create a billingProviderModule const { mutate: create } = useCreateBillingProviderModuleMutation({ selection: { fields: { id: true } }, }); -create({ activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }); +create({ activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingConnectionTableId: '', billingConnectionTableName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderConnectedFunction: '', billingProviderKeyFunction: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingConnectionFunction: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }); ``` ### Blueprint @@ -778,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, errorDetails: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }, + selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: 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, errorDetails: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }, + selection: { fields: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: 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: '', errorDetails: '', schemaId: '', status: '', tableMap: '' }); +create({ blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }); ``` ### BlueprintTemplate @@ -841,20 +842,20 @@ create({ actorTableId: '', apiName: '', bitlen: '', databaseI ```typescript // List all catalogModules const { data, isLoading } = useCatalogModulesQuery({ - selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, + selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, }); // Get one catalogModule const { data: item } = useCatalogModuleQuery({ id: '', - selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, + selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, }); // Create a catalogModule const { mutate: create } = useCreateCatalogModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); +create({ apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); ``` ### ClusterModule @@ -2269,20 +2270,20 @@ create({ apiName: '', databaseId: '', entityField: '', int ```typescript // List all storageModules const { data, isLoading } = useStorageModulesQuery({ - selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, + selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, region: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, }); // Get one storageModule const { data: item } = useStorageModuleQuery({ id: '', - selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, + selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, region: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, }); // Create a storageModule const { mutate: create } = useCreateStorageModuleMutation({ selection: { fields: { id: true } }, }); -create({ allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }); +create({ allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', region: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }); ``` ### TransferLogModule @@ -2499,7 +2500,7 @@ create({ apiName: '', databaseId: '', defaultCapabilities: '', select: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }).execute(); +const item = await db.billingProviderModule.findOne({ id: '', select: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingConnectionTableId: true, billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderConnectedFunction: true, billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }).execute(); // Create -const created = await db.billingProviderModule.create({ data: { activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }, select: { id: true } }).execute(); +const created = await db.billingProviderModule.create({ data: { activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingConnectionTableId: '', billingConnectionTableName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderConnectedFunction: '', billingProviderKeyFunction: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingConnectionFunction: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }, select: { id: true } }).execute(); // Update const updated = await db.billingProviderModule.update({ where: { id: '' }, data: { activatePlanSubscriptionFunction: '' }, select: { id: true } }).execute(); @@ -493,7 +498,6 @@ CRUD operations for BlueprintConstruction records. | `constructedDefinition` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `errorDetails` | String | Yes | | `id` | UUID | No | | `schemaId` | UUID | Yes | | `status` | String | Yes | @@ -504,13 +508,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, errorDetails: 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, 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, errorDetails: 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, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); // Create -const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', errorDetails: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); +const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); // Update const updated = await db.blueprintConstruction.update({ where: { id: '' }, data: { blueprintId: '' }, select: { id: true } }).execute(); @@ -638,6 +642,8 @@ CRUD operations for CatalogModule records. | `bucketsTableName` | String | Yes | | `databaseId` | UUID | Yes | | `defaultCapabilities` | String | Yes | +| `domainVerificationsTableId` | UUID | Yes | +| `domainVerificationsTableName` | String | Yes | | `domainsTableId` | UUID | Yes | | `domainsTableName` | String | Yes | | `entityTableId` | UUID | Yes | @@ -679,13 +685,13 @@ CRUD operations for CatalogModule records. ```typescript // List all catalogModule records -const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Get one by id -const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Create -const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); +const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.catalogModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -3890,6 +3896,7 @@ CRUD operations for StorageModule records. | `provisions` | JSON | Yes | | `publicSchemaName` | String | Yes | | `publicUrlPrefix` | String | Yes | +| `region` | String | Yes | | `restrictReads` | Boolean | Yes | | `schemaId` | UUID | Yes | | `scope` | String | Yes | @@ -3899,13 +3906,13 @@ CRUD operations for StorageModule records. ```typescript // List all storageModule records -const items = await db.storageModule.findMany({ select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); +const items = await db.storageModule.findMany({ select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, region: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); // Get one by id -const item = await db.storageModule.findOne({ id: '', select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); +const item = await db.storageModule.findOne({ id: '', select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, region: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); // Create -const created = await db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); +const created = await db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', region: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.storageModule.update({ where: { id: '' }, data: { allowedOrigins: '' }, select: { id: true } }).execute(); @@ -4333,7 +4340,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 on success, NULL on failure. +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. - **Type:** mutation - **Arguments:** @@ -4364,10 +4371,11 @@ const result = await db.mutation.copyTemplateToBlueprint({ input: { databaseId: ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **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 4a8fcc7f04..ca44c2dad1 100644 --- a/sdk/constructive-react/src/modules/orm/input-types.ts +++ b/sdk/constructive-react/src/modules/orm/input-types.ts @@ -365,6 +365,8 @@ export interface BillingProviderModule { activatePlanSubscriptionFunction?: string | null; apiName?: string | null; applyProviderObservationFunction?: string | null; + billingConnectionTableId?: string | null; + billingConnectionTableName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; billingDisputesTableId?: string | null; @@ -379,6 +381,8 @@ export interface BillingProviderModule { billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingProviderConnectedFunction?: string | null; + billingProviderKeyFunction?: string | null; billingProviderStateTableId?: string | null; billingProviderStateTableName?: string | null; billingRefundsTableId?: string | null; @@ -415,6 +419,7 @@ export interface BillingProviderModule { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordBillingConnectionFunction?: string | null; recordBillingHealthFunction?: string | null; recordDisputeFunction?: string | null; recordRefundFunction?: string | null; @@ -468,13 +473,11 @@ export interface BlueprintConstruction { createdAt?: string | null; /** The database the blueprint was constructed into. */ databaseId?: string | null; - /** Error message from a failed construction attempt. NULL unless status is failed. */ - errorDetails?: string | 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. failed: execution failed (see error_details). */ + /** 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. */ 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; @@ -562,6 +565,8 @@ export interface CatalogModule { bucketsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + domainVerificationsTableId?: string | null; + domainVerificationsTableName?: string | null; domainsTableId?: string | null; domainsTableName?: string | null; entityTableId?: string | null; @@ -2452,6 +2457,7 @@ export interface StorageModule { provisions?: Record | null; publicSchemaName?: string | null; publicUrlPrefix?: string | null; + region?: string | null; restrictReads?: boolean | null; schemaId?: string | null; scope?: string | null; @@ -3054,6 +3060,8 @@ export type BillingProviderModuleSelect = { activatePlanSubscriptionFunction?: boolean; apiName?: boolean; applyProviderObservationFunction?: boolean; + billingConnectionTableId?: boolean; + billingConnectionTableName?: boolean; billingCustomersTableId?: boolean; billingCustomersTableName?: boolean; billingDisputesTableId?: boolean; @@ -3068,6 +3076,8 @@ export type BillingProviderModuleSelect = { billingPricesTableName?: boolean; billingProductsTableId?: boolean; billingProductsTableName?: boolean; + billingProviderConnectedFunction?: boolean; + billingProviderKeyFunction?: boolean; billingProviderStateTableId?: boolean; billingProviderStateTableName?: boolean; billingRefundsTableId?: boolean; @@ -3104,6 +3114,7 @@ export type BillingProviderModuleSelect = { processBillingEventFunction?: boolean; productsTableId?: boolean; provider?: boolean; + recordBillingConnectionFunction?: boolean; recordBillingHealthFunction?: boolean; recordDisputeFunction?: boolean; recordRefundFunction?: boolean; @@ -3147,7 +3158,6 @@ export type BlueprintConstructionSelect = { constructedDefinition?: boolean; createdAt?: boolean; databaseId?: boolean; - errorDetails?: boolean; id?: boolean; schemaId?: boolean; status?: boolean; @@ -3238,6 +3248,8 @@ export type CatalogModuleSelect = { bucketsTableName?: boolean; databaseId?: boolean; defaultCapabilities?: boolean; + domainVerificationsTableId?: boolean; + domainVerificationsTableName?: boolean; domainsTableId?: boolean; domainsTableName?: boolean; entityTableId?: boolean; @@ -4908,6 +4920,7 @@ export type StorageModuleSelect = { provisions?: boolean; publicSchemaName?: boolean; publicUrlPrefix?: boolean; + region?: boolean; restrictReads?: boolean; schemaId?: boolean; scope?: boolean; @@ -5380,6 +5393,10 @@ export interface BillingProviderModuleFilter { apiName?: StringFilter; /** Filter by the object’s `applyProviderObservationFunction` field. */ applyProviderObservationFunction?: StringFilter; + /** Filter by the object’s `billingConnectionTableId` field. */ + billingConnectionTableId?: UUIDFilter; + /** Filter by the object’s `billingConnectionTableName` field. */ + billingConnectionTableName?: StringFilter; /** Filter by the object’s `billingCustomersTableId` field. */ billingCustomersTableId?: UUIDFilter; /** Filter by the object’s `billingCustomersTableName` field. */ @@ -5408,6 +5425,10 @@ export interface BillingProviderModuleFilter { billingProductsTableId?: UUIDFilter; /** Filter by the object’s `billingProductsTableName` field. */ billingProductsTableName?: StringFilter; + /** Filter by the object’s `billingProviderConnectedFunction` field. */ + billingProviderConnectedFunction?: StringFilter; + /** Filter by the object’s `billingProviderKeyFunction` field. */ + billingProviderKeyFunction?: StringFilter; /** Filter by the object’s `billingProviderStateTableId` field. */ billingProviderStateTableId?: UUIDFilter; /** Filter by the object’s `billingProviderStateTableName` field. */ @@ -5484,6 +5505,8 @@ export interface BillingProviderModuleFilter { productsTableId?: UUIDFilter; /** Filter by the object’s `provider` field. */ provider?: StringFilter; + /** Filter by the object’s `recordBillingConnectionFunction` field. */ + recordBillingConnectionFunction?: StringFilter; /** Filter by the object’s `recordBillingHealthFunction` field. */ recordBillingHealthFunction?: StringFilter; /** Filter by the object’s `recordDisputeFunction` field. */ @@ -5566,8 +5589,6 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `errorDetails` field. */ - errorDetails?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -5740,6 +5761,10 @@ export interface CatalogModuleFilter { domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ domainModulesExist?: boolean; + /** Filter by the object’s `domainVerificationsTableId` field. */ + domainVerificationsTableId?: UUIDFilter; + /** Filter by the object’s `domainVerificationsTableName` field. */ + domainVerificationsTableName?: StringFilter; /** Filter by the object’s `domainsTableId` field. */ domainsTableId?: UUIDFilter; /** Filter by the object’s `domainsTableName` field. */ @@ -9120,6 +9145,8 @@ export interface StorageModuleFilter { publicSchemaName?: StringFilter; /** Filter by the object’s `publicUrlPrefix` field. */ publicUrlPrefix?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; /** Filter by the object’s `restrictReads` field. */ restrictReads?: BooleanFilter; /** Filter by the object’s `schemaId` field. */ @@ -9763,6 +9790,10 @@ export type BillingProviderModuleOrderBy = | 'API_NAME_DESC' | 'APPLY_PROVIDER_OBSERVATION_FUNCTION_ASC' | 'APPLY_PROVIDER_OBSERVATION_FUNCTION_DESC' + | 'BILLING_CONNECTION_TABLE_ID_ASC' + | 'BILLING_CONNECTION_TABLE_ID_DESC' + | 'BILLING_CONNECTION_TABLE_NAME_ASC' + | 'BILLING_CONNECTION_TABLE_NAME_DESC' | 'BILLING_CUSTOMERS_TABLE_ID_ASC' | 'BILLING_CUSTOMERS_TABLE_ID_DESC' | 'BILLING_CUSTOMERS_TABLE_NAME_ASC' @@ -9791,6 +9822,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_PRODUCTS_TABLE_ID_DESC' | 'BILLING_PRODUCTS_TABLE_NAME_ASC' | 'BILLING_PRODUCTS_TABLE_NAME_DESC' + | 'BILLING_PROVIDER_CONNECTED_FUNCTION_ASC' + | 'BILLING_PROVIDER_CONNECTED_FUNCTION_DESC' + | 'BILLING_PROVIDER_KEY_FUNCTION_ASC' + | 'BILLING_PROVIDER_KEY_FUNCTION_DESC' | 'BILLING_PROVIDER_STATE_TABLE_ID_ASC' | 'BILLING_PROVIDER_STATE_TABLE_ID_DESC' | 'BILLING_PROVIDER_STATE_TABLE_NAME_ASC' @@ -9866,6 +9901,8 @@ export type BillingProviderModuleOrderBy = | 'PRODUCTS_TABLE_ID_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' + | 'RECORD_BILLING_CONNECTION_FUNCTION_ASC' + | 'RECORD_BILLING_CONNECTION_FUNCTION_DESC' | 'RECORD_BILLING_HEALTH_FUNCTION_ASC' | 'RECORD_BILLING_HEALTH_FUNCTION_DESC' | 'RECORD_DISPUTE_FUNCTION_ASC' @@ -9931,8 +9968,6 @@ export type BlueprintConstructionOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'ERROR_DETAILS_ASC' - | 'ERROR_DETAILS_DESC' | 'ID_ASC' | 'ID_DESC' | 'NATURAL' @@ -10069,6 +10104,10 @@ export type CatalogModuleOrderBy = | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' | 'DOMAINS_TABLE_NAME_DESC' + | 'DOMAIN_VERIFICATIONS_TABLE_ID_ASC' + | 'DOMAIN_VERIFICATIONS_TABLE_ID_DESC' + | 'DOMAIN_VERIFICATIONS_TABLE_NAME_ASC' + | 'DOMAIN_VERIFICATIONS_TABLE_NAME_DESC' | 'ENTITY_TABLE_ID_ASC' | 'ENTITY_TABLE_ID_DESC' | 'FUNCTIONS_TABLE_ID_ASC' @@ -13036,6 +13075,8 @@ export type StorageModuleOrderBy = | 'PUBLIC_SCHEMA_NAME_DESC' | 'PUBLIC_URL_PREFIX_ASC' | 'PUBLIC_URL_PREFIX_DESC' + | 'REGION_ASC' + | 'REGION_DESC' | 'RESTRICT_READS_ASC' | 'RESTRICT_READS_DESC' | 'SCHEMA_ID_ASC' @@ -13661,6 +13702,8 @@ export interface CreateBillingProviderModuleInput { activatePlanSubscriptionFunction?: string; apiName?: string; applyProviderObservationFunction?: string; + billingConnectionTableId?: string; + billingConnectionTableName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; billingDisputesTableId?: string; @@ -13675,6 +13718,8 @@ export interface CreateBillingProviderModuleInput { billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingProviderConnectedFunction?: string; + billingProviderKeyFunction?: string; billingProviderStateTableId?: string; billingProviderStateTableName?: string; billingRefundsTableId?: string; @@ -13710,6 +13755,7 @@ export interface CreateBillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordBillingConnectionFunction?: string; recordBillingHealthFunction?: string; recordDisputeFunction?: string; recordRefundFunction?: string; @@ -13729,6 +13775,8 @@ export interface BillingProviderModulePatch { activatePlanSubscriptionFunction?: string | null; apiName?: string | null; applyProviderObservationFunction?: string | null; + billingConnectionTableId?: string | null; + billingConnectionTableName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; billingDisputesTableId?: string | null; @@ -13743,6 +13791,8 @@ export interface BillingProviderModulePatch { billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingProviderConnectedFunction?: string | null; + billingProviderKeyFunction?: string | null; billingProviderStateTableId?: string | null; billingProviderStateTableName?: string | null; billingRefundsTableId?: string | null; @@ -13778,6 +13828,7 @@ export interface BillingProviderModulePatch { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordBillingConnectionFunction?: string | null; recordBillingHealthFunction?: string | null; recordDisputeFunction?: string | null; recordRefundFunction?: string | null; @@ -13842,7 +13893,6 @@ export interface CreateBlueprintConstructionInput { constructedAt?: string; constructedDefinition?: Record; databaseId: string; - errorDetails?: string; schemaId?: string; status?: string; tableMap?: Record; @@ -13853,7 +13903,6 @@ export interface BlueprintConstructionPatch { constructedAt?: string | null; constructedDefinition?: Record | null; databaseId?: string | null; - errorDetails?: string | null; schemaId?: string | null; status?: string | null; tableMap?: Record | null; @@ -13991,6 +14040,8 @@ export interface CreateCatalogModuleInput { bucketsTableName?: string; databaseId: string; defaultCapabilities?: string[]; + domainVerificationsTableId?: string; + domainVerificationsTableName?: string; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -14042,6 +14093,8 @@ export interface CatalogModulePatch { bucketsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + domainVerificationsTableId?: string | null; + domainVerificationsTableName?: string | null; domainsTableId?: string | null; domainsTableName?: string | null; entityTableId?: string | null; @@ -17585,6 +17638,7 @@ export interface CreateStorageModuleInput { provisions?: Record; publicSchemaName?: string; publicUrlPrefix?: string; + region?: string; restrictReads?: boolean; schemaId?: string; scope: string; @@ -17629,6 +17683,7 @@ export interface StorageModulePatch { provisions?: Record | null; publicSchemaName?: string | null; publicUrlPrefix?: string | null; + region?: string | null; restrictReads?: boolean | null; schemaId?: string | null; scope?: string | null; @@ -18578,6 +18633,8 @@ export interface BillingProviderModuleInput { activatePlanSubscriptionFunction?: string; apiName?: string; applyProviderObservationFunction?: string; + billingConnectionTableId?: string; + billingConnectionTableName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; billingDisputesTableId?: string; @@ -18592,6 +18649,8 @@ export interface BillingProviderModuleInput { billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingProviderConnectedFunction?: string; + billingProviderKeyFunction?: string; billingProviderStateTableId?: string; billingProviderStateTableName?: string; billingRefundsTableId?: string; @@ -18628,6 +18687,7 @@ export interface BillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordBillingConnectionFunction?: string; recordBillingHealthFunction?: string; recordDisputeFunction?: string; recordRefundFunction?: string; @@ -18681,13 +18741,11 @@ export interface BlueprintConstructionInput { createdAt?: string; /** The database the blueprint was constructed into. */ databaseId: string; - /** Error message from a failed construction attempt. NULL unless status is failed. */ - errorDetails?: string; /** 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. failed: execution failed (see error_details). */ + /** 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. */ 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; @@ -18777,6 +18835,8 @@ export interface CatalogModuleInput { bucketsTableName?: string; databaseId: string; defaultCapabilities?: string[]; + domainVerificationsTableId?: string; + domainVerificationsTableName?: string; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -20697,6 +20757,7 @@ export interface StorageModuleInput { provisions?: Record; publicSchemaName?: string; publicUrlPrefix?: string; + region?: string; restrictReads?: boolean; schemaId?: string; scope: string; @@ -20884,8 +20945,6 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `errorDetails` field. */ - errorDetails?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -22348,6 +22407,10 @@ export interface CatalogModuleFilter { domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ domainModulesExist?: boolean; + /** Filter by the object’s `domainVerificationsTableId` field. */ + domainVerificationsTableId?: UUIDFilter; + /** Filter by the object’s `domainVerificationsTableName` field. */ + domainVerificationsTableName?: StringFilter; /** Filter by the object’s `domainsTableId` field. */ domainsTableId?: UUIDFilter; /** Filter by the object’s `domainsTableName` field. */ @@ -22814,6 +22877,8 @@ export interface StorageModuleFilter { publicSchemaName?: StringFilter; /** Filter by the object’s `publicUrlPrefix` field. */ publicUrlPrefix?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; /** Filter by the object’s `restrictReads` field. */ restrictReads?: BooleanFilter; /** Filter by the object’s `schemaId` field. */ @@ -22866,19 +22931,19 @@ export type CopyTemplateToBlueprintPayloadSelect = { result?: boolean; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface CreateAgentModulePayload { /** The `AgentModule` that was created by this mutation. */ diff --git a/sdk/constructive-react/src/modules/orm/mutation/index.ts b/sdk/constructive-react/src/modules/orm/mutation/index.ts index 6cda508cf6..e59de99a2e 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 on success, NULL on failure. + * 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. */ export interface ConstructBlueprintVariables { input: ConstructBlueprintInput; @@ -35,10 +35,11 @@ export interface CopyTemplateToBlueprintVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-react/src/modules/schema-types.ts b/sdk/constructive-react/src/modules/schema-types.ts index 63f4fd10d1..51f5f63ec2 100644 --- a/sdk/constructive-react/src/modules/schema-types.ts +++ b/sdk/constructive-react/src/modules/schema-types.ts @@ -383,6 +383,10 @@ export type BillingProviderModuleOrderBy = | 'API_NAME_DESC' | 'APPLY_PROVIDER_OBSERVATION_FUNCTION_ASC' | 'APPLY_PROVIDER_OBSERVATION_FUNCTION_DESC' + | 'BILLING_CONNECTION_TABLE_ID_ASC' + | 'BILLING_CONNECTION_TABLE_ID_DESC' + | 'BILLING_CONNECTION_TABLE_NAME_ASC' + | 'BILLING_CONNECTION_TABLE_NAME_DESC' | 'BILLING_CUSTOMERS_TABLE_ID_ASC' | 'BILLING_CUSTOMERS_TABLE_ID_DESC' | 'BILLING_CUSTOMERS_TABLE_NAME_ASC' @@ -411,6 +415,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_PRODUCTS_TABLE_ID_DESC' | 'BILLING_PRODUCTS_TABLE_NAME_ASC' | 'BILLING_PRODUCTS_TABLE_NAME_DESC' + | 'BILLING_PROVIDER_CONNECTED_FUNCTION_ASC' + | 'BILLING_PROVIDER_CONNECTED_FUNCTION_DESC' + | 'BILLING_PROVIDER_KEY_FUNCTION_ASC' + | 'BILLING_PROVIDER_KEY_FUNCTION_DESC' | 'BILLING_PROVIDER_STATE_TABLE_ID_ASC' | 'BILLING_PROVIDER_STATE_TABLE_ID_DESC' | 'BILLING_PROVIDER_STATE_TABLE_NAME_ASC' @@ -486,6 +494,8 @@ export type BillingProviderModuleOrderBy = | 'PRODUCTS_TABLE_ID_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' + | 'RECORD_BILLING_CONNECTION_FUNCTION_ASC' + | 'RECORD_BILLING_CONNECTION_FUNCTION_DESC' | 'RECORD_BILLING_HEALTH_FUNCTION_ASC' | 'RECORD_BILLING_HEALTH_FUNCTION_DESC' | 'RECORD_DISPUTE_FUNCTION_ASC' @@ -524,8 +534,6 @@ export type BlueprintConstructionOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'ERROR_DETAILS_ASC' - | 'ERROR_DETAILS_DESC' | 'ID_ASC' | 'ID_DESC' | 'NATURAL' @@ -694,6 +702,10 @@ export type CatalogModuleOrderBy = | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' | 'DOMAINS_TABLE_NAME_DESC' + | 'DOMAIN_VERIFICATIONS_TABLE_ID_ASC' + | 'DOMAIN_VERIFICATIONS_TABLE_ID_DESC' + | 'DOMAIN_VERIFICATIONS_TABLE_NAME_ASC' + | 'DOMAIN_VERIFICATIONS_TABLE_NAME_DESC' | 'ENTITY_TABLE_ID_ASC' | 'ENTITY_TABLE_ID_DESC' | 'FUNCTIONS_TABLE_ID_ASC' @@ -3729,6 +3741,8 @@ export type StorageModuleOrderBy = | 'PUBLIC_SCHEMA_NAME_DESC' | 'PUBLIC_URL_PREFIX_ASC' | 'PUBLIC_URL_PREFIX_DESC' + | 'REGION_ASC' + | 'REGION_DESC' | 'RESTRICT_READS_ASC' | 'RESTRICT_READS_DESC' | 'SCHEMA_ID_ASC' @@ -4623,6 +4637,10 @@ export interface BillingProviderModuleFilter { apiName?: StringFilter; /** Filter by the object’s `applyProviderObservationFunction` field. */ applyProviderObservationFunction?: StringFilter; + /** Filter by the object’s `billingConnectionTableId` field. */ + billingConnectionTableId?: UUIDFilter; + /** Filter by the object’s `billingConnectionTableName` field. */ + billingConnectionTableName?: StringFilter; /** Filter by the object’s `billingCustomersTableId` field. */ billingCustomersTableId?: UUIDFilter; /** Filter by the object’s `billingCustomersTableName` field. */ @@ -4651,6 +4669,10 @@ export interface BillingProviderModuleFilter { billingProductsTableId?: UUIDFilter; /** Filter by the object’s `billingProductsTableName` field. */ billingProductsTableName?: StringFilter; + /** Filter by the object’s `billingProviderConnectedFunction` field. */ + billingProviderConnectedFunction?: StringFilter; + /** Filter by the object’s `billingProviderKeyFunction` field. */ + billingProviderKeyFunction?: StringFilter; /** Filter by the object’s `billingProviderStateTableId` field. */ billingProviderStateTableId?: UUIDFilter; /** Filter by the object’s `billingProviderStateTableName` field. */ @@ -4727,6 +4749,8 @@ export interface BillingProviderModuleFilter { productsTableId?: UUIDFilter; /** Filter by the object’s `provider` field. */ provider?: StringFilter; + /** Filter by the object’s `recordBillingConnectionFunction` field. */ + recordBillingConnectionFunction?: StringFilter; /** Filter by the object’s `recordBillingHealthFunction` field. */ recordBillingHealthFunction?: StringFilter; /** Filter by the object’s `recordDisputeFunction` field. */ @@ -4759,6 +4783,8 @@ export interface BillingProviderModuleInput { activatePlanSubscriptionFunction?: string; apiName?: string; applyProviderObservationFunction?: string; + billingConnectionTableId?: string; + billingConnectionTableName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; billingDisputesTableId?: string; @@ -4773,6 +4799,8 @@ export interface BillingProviderModuleInput { billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingProviderConnectedFunction?: string; + billingProviderKeyFunction?: string; billingProviderStateTableId?: string; billingProviderStateTableName?: string; billingRefundsTableId?: string; @@ -4809,6 +4837,7 @@ export interface BillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordBillingConnectionFunction?: string; recordBillingHealthFunction?: string; recordDisputeFunction?: string; recordRefundFunction?: string; @@ -4828,6 +4857,8 @@ export interface BillingProviderModulePatch { activatePlanSubscriptionFunction?: string; apiName?: string; applyProviderObservationFunction?: string; + billingConnectionTableId?: string; + billingConnectionTableName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; billingDisputesTableId?: string; @@ -4842,6 +4873,8 @@ export interface BillingProviderModulePatch { billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingProviderConnectedFunction?: string; + billingProviderKeyFunction?: string; billingProviderStateTableId?: string; billingProviderStateTableName?: string; billingRefundsTableId?: string; @@ -4878,6 +4911,7 @@ export interface BillingProviderModulePatch { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordBillingConnectionFunction?: string; recordBillingHealthFunction?: string; recordDisputeFunction?: string; recordRefundFunction?: string; @@ -4908,8 +4942,6 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `errorDetails` field. */ - errorDetails?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -4937,13 +4969,11 @@ export interface BlueprintConstructionInput { createdAt?: string; /** The database the blueprint was constructed into. */ databaseId: string; - /** Error message from a failed construction attempt. NULL unless status is failed. */ - errorDetails?: string; /** 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. failed: execution failed (see error_details). */ + /** 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. */ 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; @@ -4962,13 +4992,11 @@ export interface BlueprintConstructionPatch { createdAt?: string; /** The database the blueprint was constructed into. */ databaseId?: string; - /** Error message from a failed construction attempt. NULL unless status is failed. */ - errorDetails?: string; /** 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. failed: execution failed (see error_details). */ + /** 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. */ 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; @@ -5402,6 +5430,10 @@ export interface CatalogModuleFilter { domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ domainModulesExist?: boolean; + /** Filter by the object’s `domainVerificationsTableId` field. */ + domainVerificationsTableId?: UUIDFilter; + /** Filter by the object’s `domainVerificationsTableName` field. */ + domainVerificationsTableName?: StringFilter; /** Filter by the object’s `domainsTableId` field. */ domainsTableId?: UUIDFilter; /** Filter by the object’s `domainsTableName` field. */ @@ -5502,6 +5534,8 @@ export interface CatalogModuleInput { bucketsTableName?: string; databaseId: string; defaultCapabilities?: string[]; + domainVerificationsTableId?: string; + domainVerificationsTableName?: string; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -5554,6 +5588,8 @@ export interface CatalogModulePatch { bucketsTableName?: string; databaseId?: string; defaultCapabilities?: string[]; + domainVerificationsTableId?: string; + domainVerificationsTableName?: string; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -13703,6 +13739,8 @@ export interface StorageModuleFilter { publicSchemaName?: StringFilter; /** Filter by the object’s `publicUrlPrefix` field. */ publicUrlPrefix?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; /** Filter by the object’s `restrictReads` field. */ restrictReads?: BooleanFilter; /** Filter by the object’s `schemaId` field. */ @@ -13752,6 +13790,7 @@ export interface StorageModuleInput { provisions?: unknown; publicSchemaName?: string; publicUrlPrefix?: string; + region?: string; restrictReads?: boolean; schemaId?: string; scope: string; @@ -13797,6 +13836,7 @@ export interface StorageModulePatch { provisions?: unknown; publicSchemaName?: string; publicUrlPrefix?: string; + region?: string; restrictReads?: boolean; schemaId?: string; scope?: string; @@ -16738,13 +16778,13 @@ export interface DeleteWebhookModulePayload { webhookModuleEdge?: WebhookModuleEdge | null; } export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export interface UpdateAgentModulePayload { /** The `AgentModule` that was updated by this mutation. */ diff --git a/sdk/constructive-react/src/modules/types.ts b/sdk/constructive-react/src/modules/types.ts index 86994c7b40..7f47bb07b1 100644 --- a/sdk/constructive-react/src/modules/types.ts +++ b/sdk/constructive-react/src/modules/types.ts @@ -137,6 +137,8 @@ export interface BillingProviderModule { activatePlanSubscriptionFunction: string | null; apiName: string | null; applyProviderObservationFunction: string | null; + billingConnectionTableId: string | null; + billingConnectionTableName: string | null; billingCustomersTableId: string | null; billingCustomersTableName: string | null; billingDisputesTableId: string | null; @@ -151,6 +153,8 @@ export interface BillingProviderModule { billingPricesTableName: string | null; billingProductsTableId: string | null; billingProductsTableName: string | null; + billingProviderConnectedFunction: string | null; + billingProviderKeyFunction: string | null; billingProviderStateTableId: string | null; billingProviderStateTableName: string | null; billingRefundsTableId: string | null; @@ -187,6 +191,7 @@ export interface BillingProviderModule { processBillingEventFunction: string | null; productsTableId: string | null; provider: string | null; + recordBillingConnectionFunction: string | null; recordBillingHealthFunction: string | null; recordDisputeFunction: string | null; recordRefundFunction: string | null; @@ -221,7 +226,6 @@ export interface BlueprintConstruction { constructedDefinition: unknown | null; createdAt: string | null; databaseId: string | null; - errorDetails: string | null; id: string | null; schemaId: string | null; status: string | null; @@ -288,6 +292,8 @@ export interface CatalogModule { bucketsTableName: string | null; databaseId: string | null; defaultCapabilities: string[] | null; + domainVerificationsTableId: string | null; + domainVerificationsTableName: string | null; domainsTableId: string | null; domainsTableName: string | null; entityTableId: string | null; @@ -1772,6 +1778,7 @@ export interface StorageModule { provisions: unknown | null; publicSchemaName: string | null; publicUrlPrefix: string | null; + region: string | null; restrictReads: boolean | null; schemaId: string | null; scope: string | null; diff --git a/sdk/constructive-react/src/objects/hooks/README.md b/sdk/constructive-react/src/objects/hooks/README.md index ddf1864c9e..54fa125ed7 100644 --- a/sdk/constructive-react/src/objects/hooks/README.md +++ b/sdk/constructive-react/src/objects/hooks/README.md @@ -58,10 +58,11 @@ function App() { | `useInsertNodeAtPathMutation` | Mutation | insertNodeAtPath | | `useInsertNodesAtPathsMutation` | Mutation | insertNodesAtPaths | | `useProvisionBucketMutation` | Mutation | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `useSetAndCommitMutation` | Mutation | setAndCommit | | `useSetDataAtPathMutation` | Mutation | setDataAtPath | | `useSetManyAndCommitMutation` | Mutation | setManyAndCommit | @@ -205,10 +206,11 @@ insertNodesAtPaths ### `useProvisionBucketMutation` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/objects/orm/README.md b/sdk/constructive-react/src/objects/orm/README.md index d56b4a6254..866cd6f1ef 100644 --- a/sdk/constructive-react/src/objects/orm/README.md +++ b/sdk/constructive-react/src/objects/orm/README.md @@ -246,10 +246,11 @@ const result = await db.mutation.insertNodesAtPaths({ input: '', i ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/remote/orm/input-types.ts b/sdk/constructive-react/src/remote/orm/input-types.ts index 5de4f639ba..c69a2483d7 100644 --- a/sdk/constructive-react/src/remote/orm/input-types.ts +++ b/sdk/constructive-react/src/remote/orm/input-types.ts @@ -1447,19 +1447,19 @@ export type MachinesEnrollPayloadSelect = { result?: boolean; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface CreateMachinePayload { clientMutationId?: string | null; diff --git a/sdk/constructive-react/src/remote/orm/mutation/index.ts b/sdk/constructive-react/src/remote/orm/mutation/index.ts index 7108c9c67c..b9bbf8ec3a 100644 --- a/sdk/constructive-react/src/remote/orm/mutation/index.ts +++ b/sdk/constructive-react/src/remote/orm/mutation/index.ts @@ -21,10 +21,11 @@ export interface MachinesEnrollVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-react/src/remote/schema-types.ts b/sdk/constructive-react/src/remote/schema-types.ts index 94345e179a..0ece215dde 100644 --- a/sdk/constructive-react/src/remote/schema-types.ts +++ b/sdk/constructive-react/src/remote/schema-types.ts @@ -664,13 +664,13 @@ export interface MachinesEnrollPayload { result?: string | null; } export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export interface UpdateMachinePayload { clientMutationId?: string | null; diff --git a/sdk/constructive-react/src/storage/hooks/README.md b/sdk/constructive-react/src/storage/hooks/README.md index aad59518df..f98635d8d2 100644 --- a/sdk/constructive-react/src/storage/hooks/README.md +++ b/sdk/constructive-react/src/storage/hooks/README.md @@ -55,14 +55,15 @@ function App() { | `useFilesRenameMutation` | Mutation | filesRename | | `usePlatformFilesRenameMutation` | Mutation | platformFilesRename | | `useProvisionBucketMutation` | Mutation | Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. | +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. | | `useUploadFileMutation` | Mutation | Upload a file: resolves the bucket by key, creates the file row, and returns a presigned PUT URL. | -| `useUploadFilesMutation` | Mutation | Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. | +| `useUploadFilesMutation` | Mutation | Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. | | `useUploadPlatformFileMutation` | Mutation | Upload a file: resolves the bucket by key, creates the file row, and returns a presigned PUT URL. | -| `useUploadPlatformFilesMutation` | Mutation | Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. | +| `useUploadPlatformFilesMutation` | Mutation | Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. | ## Table Hooks @@ -71,20 +72,20 @@ GraphQL errors. | ```typescript // List all buckets const { data, isLoading } = useBucketsQuery({ - selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, + selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, }); // Get one bucket const { data: item } = useBucketQuery({ id: '', - selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, + selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, }); // Create a bucket const { mutate: create } = useCreateBucketMutation({ selection: { fields: { id: true } }, }); -create({ actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }); +create({ actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }); ``` ### File @@ -113,20 +114,20 @@ create({ actorId: '', bucketId: '', contentHash: '', databas ```typescript // List all platformBuckets const { data, isLoading } = usePlatformBucketsQuery({ - selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, + selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, }); // Get one platformBucket const { data: item } = usePlatformBucketQuery({ id: '', - selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, + selection: { fields: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }, }); // Create a platformBucket const { mutate: create } = useCreatePlatformBucketMutation({ selection: { fields: { id: true } }, }); -create({ actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }); +create({ actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }); ``` ### PlatformFile @@ -177,10 +178,11 @@ platformFilesRename ### `useProvisionBucketMutation` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** @@ -202,7 +204,7 @@ Upload a file: resolves the bucket by key, creates the file row, and returns a p ### `useUploadFilesMutation` -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. - **Type:** mutation - **Arguments:** @@ -224,7 +226,7 @@ Upload a file: resolves the bucket by key, creates the file row, and returns a p ### `useUploadPlatformFilesMutation` -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-react/src/storage/orm/README.md b/sdk/constructive-react/src/storage/orm/README.md index a72925c67d..a4e42cc98d 100644 --- a/sdk/constructive-react/src/storage/orm/README.md +++ b/sdk/constructive-react/src/storage/orm/README.md @@ -47,8 +47,10 @@ CRUD operations for Bucket records. | `id` | UUID | No | | `isPublic` | Boolean | Yes | | `key` | String | Yes | +| `maxBulkFiles` | Int | Yes | | `maxFileSize` | BigInt | Yes | | `physicalName` | String | Yes | +| `provisionRequestedAt` | Datetime | Yes | | `stagingTtl` | Interval | Yes | | `tags` | String | Yes | | `type` | BucketType | Yes | @@ -58,13 +60,13 @@ CRUD operations for Bucket records. ```typescript // List all bucket records -const items = await db.bucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const items = await db.bucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.bucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const item = await db.bucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Create -const created = await db.bucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); +const created = await db.bucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); // Update const updated = await db.bucket.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -139,8 +141,10 @@ CRUD operations for PlatformBucket records. | `id` | UUID | No | | `isPublic` | Boolean | Yes | | `key` | String | Yes | +| `maxBulkFiles` | Int | Yes | | `maxFileSize` | BigInt | Yes | | `physicalName` | String | Yes | +| `provisionRequestedAt` | Datetime | Yes | | `stagingTtl` | Interval | Yes | | `tags` | String | Yes | | `type` | BucketType | Yes | @@ -150,13 +154,13 @@ CRUD operations for PlatformBucket records. ```typescript // List all platformBucket records -const items = await db.platformBucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const items = await db.platformBucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.platformBucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const item = await db.platformBucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Create -const created = await db.platformBucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); +const created = await db.platformBucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformBucket.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -247,10 +251,11 @@ const result = await db.mutation.platformFilesRename({ input: { fileId: '' ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** @@ -280,7 +285,7 @@ const result = await db.mutation.uploadFile({ input: '' }).exec ### `db.mutation.uploadFiles` -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. - **Type:** mutation - **Arguments:** @@ -310,7 +315,7 @@ const result = await db.mutation.uploadPlatformFile({ input: ' ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-sdk/src/admin/orm/input-types.ts b/sdk/constructive-sdk/src/admin/orm/input-types.ts index dc19216eb3..9bc1f6a8e9 100644 --- a/sdk/constructive-sdk/src/admin/orm/input-types.ts +++ b/sdk/constructive-sdk/src/admin/orm/input-types.ts @@ -3753,19 +3753,19 @@ export type ProvisionAppUsersBulkPayloadSelect = { }; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface ProvisionOrgUserPayload { clientMutationId?: string | null; diff --git a/sdk/constructive-sdk/src/admin/orm/mutation/index.ts b/sdk/constructive-sdk/src/admin/orm/mutation/index.ts index aab974f285..026cab2abe 100644 --- a/sdk/constructive-sdk/src/admin/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/admin/orm/mutation/index.ts @@ -51,10 +51,11 @@ export interface ProvisionAppUsersBulkVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-sdk/src/agent/orm/README.md b/sdk/constructive-sdk/src/agent/orm/README.md index e9f31a411e..a201a35f2d 100644 --- a/sdk/constructive-sdk/src/agent/orm/README.md +++ b/sdk/constructive-sdk/src/agent/orm/README.md @@ -1120,10 +1120,11 @@ const deleted = await db.platformAgentThread.delete({ where: { id: '' } }) ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-sdk/src/agent/orm/input-types.ts b/sdk/constructive-sdk/src/agent/orm/input-types.ts index 09297a55e7..203bbeda25 100644 --- a/sdk/constructive-sdk/src/agent/orm/input-types.ts +++ b/sdk/constructive-sdk/src/agent/orm/input-types.ts @@ -7257,19 +7257,19 @@ export interface FullTextFilter { } // ============ Payload/Return Types (for custom operations) ============ export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface CreateAgentPayload { /** The `Agent` that was created by this mutation. */ diff --git a/sdk/constructive-sdk/src/agent/orm/mutation/index.ts b/sdk/constructive-sdk/src/agent/orm/mutation/index.ts index 5491e16cd0..ed171c95f7 100644 --- a/sdk/constructive-sdk/src/agent/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/agent/orm/mutation/index.ts @@ -15,10 +15,11 @@ import { connectionFieldsMap } from '../input-types'; /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-sdk/src/api/README.md b/sdk/constructive-sdk/src/api/README.md index cf09acb61d..bb5f974e11 100644 --- a/sdk/constructive-sdk/src/api/README.md +++ b/sdk/constructive-sdk/src/api/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 92 -- **Custom queries:** 17 -- **Custom mutations:** 29 +- **Tables:** 90 +- **Custom queries:** 18 +- **Custom mutations:** 31 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/api/orm/README.md b/sdk/constructive-sdk/src/api/orm/README.md index 2439802945..02e465c85e 100644 --- a/sdk/constructive-sdk/src/api/orm/README.md +++ b/sdk/constructive-sdk/src/api/orm/README.md @@ -50,7 +50,6 @@ const db = createClient({ | `fullTextSearch` | findMany, findOne, create, update, delete | | `function` | findMany, findOne, create, update, delete | | `getSitePreviewsRecord` | findMany, findOne, create, update, delete | -| `hostnameBinding` | findMany, findOne, create, update, delete | | `identityProviderRegistry` | findMany, findOne, create, update, delete | | `index` | findMany, findOne, create, update, delete | | `listSuspendedDatabasesRecord` | findMany, findOne, create, update, delete | @@ -85,7 +84,6 @@ const db = createClient({ | `pubkeySetting` | findMany, findOne, create, update, delete | | `redirect` | findMany, findOne, create, update, delete | | `rlsSetting` | findMany, findOne, create, update, delete | -| `routeBinding` | findMany, findOne, create, update, delete | | `route` | findMany, findOne, create, update, delete | | `schema` | findMany, findOne, create, update, delete | | `schemaGrant` | findMany, findOne, create, update, delete | @@ -1319,44 +1317,6 @@ const updated = await db.getSitePreviewsRecord.update({ where: { id: '' }, const deleted = await db.getSitePreviewsRecord.delete({ where: { id: '' } }).execute(); ``` -### `db.hostnameBinding` - -CRUD operations for HostnameBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `domainId` | UUID | Yes | -| `hostname` | String | Yes | -| `id` | UUID | No | -| `isWildcard` | Boolean | Yes | -| `managed` | Boolean | Yes | -| `parentHostname` | String | Yes | -| `tlsSecretName` | String | Yes | -| `tlsStatus` | String | Yes | -| `updatedAt` | Datetime | No | -| `verificationStatus` | String | Yes | - -**Operations:** - -```typescript -// List all hostnameBinding records -const items = await db.hostnameBinding.findMany({ select: { domainId: true, hostname: true, id: true, isWildcard: true, managed: true, parentHostname: true, tlsSecretName: true, tlsStatus: true, updatedAt: true, verificationStatus: true } }).execute(); - -// Get one by id -const item = await db.hostnameBinding.findOne({ id: '', select: { domainId: true, hostname: true, id: true, isWildcard: true, managed: true, parentHostname: true, tlsSecretName: true, tlsStatus: true, updatedAt: true, verificationStatus: true } }).execute(); - -// Create -const created = await db.hostnameBinding.create({ data: { domainId: '', hostname: '', isWildcard: '', managed: '', parentHostname: '', tlsSecretName: '', tlsStatus: '', verificationStatus: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.hostnameBinding.update({ where: { id: '' }, data: { domainId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.hostnameBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.identityProviderRegistry` CRUD operations for IdentityProviderRegistry records. @@ -1489,6 +1449,7 @@ CRUD operations for ManagedDomain records. | `domain` | String | Yes | | `id` | UUID | No | | `isWildcard` | Boolean | Yes | +| `publicPort` | Int | Yes | | `tlsReadyAt` | Datetime | Yes | | `tlsStatus` | String | Yes | | `updatedAt` | Datetime | No | @@ -1500,13 +1461,13 @@ CRUD operations for ManagedDomain records. ```typescript // List all managedDomain records -const items = await db.managedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const items = await db.managedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Get one by id -const item = await db.managedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const item = await db.managedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, databaseId: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Create -const created = await db.managedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); +const created = await db.managedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', databaseId: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); // Update const updated = await db.managedDomain.update({ where: { id: '' }, data: { allowPublicUsage: '' }, select: { id: true } }).execute(); @@ -2075,6 +2036,7 @@ CRUD operations for PlatformManagedDomain records. | `domain` | String | Yes | | `id` | UUID | No | | `isWildcard` | Boolean | Yes | +| `publicPort` | Int | Yes | | `tlsReadyAt` | Datetime | Yes | | `tlsStatus` | String | Yes | | `updatedAt` | Datetime | No | @@ -2086,13 +2048,13 @@ CRUD operations for PlatformManagedDomain records. ```typescript // List all platformManagedDomain records -const items = await db.platformManagedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const items = await db.platformManagedDomain.findMany({ select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Get one by id -const item = await db.platformManagedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); +const item = await db.platformManagedDomain.findOne({ id: '', select: { allowPublicUsage: true, annotations: true, certStatus: true, createdAt: true, createdByPrincipal: true, domain: true, id: true, isWildcard: true, publicPort: true, tlsReadyAt: true, tlsStatus: true, updatedAt: true, updatedByPrincipal: true, verificationStatus: true, verifiedAt: true } }).execute(); // Create -const created = await db.platformManagedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); +const created = await db.platformManagedDomain.create({ data: { allowPublicUsage: '', annotations: '', certStatus: '', createdByPrincipal: '', domain: '', isWildcard: '', publicPort: '', tlsReadyAt: '', tlsStatus: '', updatedByPrincipal: '', verificationStatus: '', verifiedAt: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformManagedDomain.update({ where: { id: '' }, data: { allowPublicUsage: '' }, select: { id: true } }).execute(); @@ -2680,48 +2642,6 @@ const updated = await db.rlsSetting.update({ where: { id: '' }, data: { au const deleted = await db.rlsSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.routeBinding` - -CRUD operations for RouteBinding records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `domainId` | UUID | Yes | -| `id` | UUID | No | -| `isActive` | Boolean | Yes | -| `method` | String | Yes | -| `path` | String | Yes | -| `priority` | Int | Yes | -| `servingSiteId` | UUID | Yes | -| `targetApiId` | UUID | Yes | -| `targetBucketId` | UUID | Yes | -| `targetFunctionId` | UUID | Yes | -| `targetRedirectId` | UUID | Yes | -| `targetServiceId` | UUID | Yes | -| `targetSiteId` | UUID | Yes | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all routeBinding records -const items = await db.routeBinding.findMany({ select: { domainId: true, id: true, isActive: true, method: true, path: true, priority: true, servingSiteId: true, targetApiId: true, targetBucketId: true, targetFunctionId: true, targetRedirectId: true, targetServiceId: true, targetSiteId: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.routeBinding.findOne({ id: '', select: { domainId: true, id: true, isActive: true, method: true, path: true, priority: true, servingSiteId: true, targetApiId: true, targetBucketId: true, targetFunctionId: true, targetRedirectId: true, targetServiceId: true, targetSiteId: true, updatedAt: true } }).execute(); - -// Create -const created = await db.routeBinding.create({ data: { domainId: '', isActive: '', method: '', path: '', priority: '', servingSiteId: '', targetApiId: '', targetBucketId: '', targetFunctionId: '', targetRedirectId: '', targetServiceId: '', targetSiteId: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.routeBinding.update({ where: { id: '' }, data: { domainId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.routeBinding.delete({ where: { id: '' } }).execute(); -``` - ### `db.route` CRUD operations for Route records. @@ -3527,6 +3447,7 @@ CRUD operations for UniqueConstraint records. | `initiallyDeferred` | Boolean | Yes | | `isDeferrable` | Boolean | Yes | | `name` | String | Yes | +| `nullsNotDistinct` | Boolean | Yes | | `smartTags` | JSON | Yes | | `tableId` | UUID | Yes | | `tags` | String | Yes | @@ -3538,13 +3459,13 @@ CRUD operations for UniqueConstraint records. ```typescript // List all uniqueConstraint records -const items = await db.uniqueConstraint.findMany({ select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); +const items = await db.uniqueConstraint.findMany({ select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); // Get one by id -const item = await db.uniqueConstraint.findOne({ id: '', select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); +const item = await db.uniqueConstraint.findOne({ id: '', select: { category: true, createdAt: true, databaseId: true, description: true, fieldIds: true, id: true, initiallyDeferred: true, isDeferrable: true, name: true, nullsNotDistinct: true, smartTags: true, tableId: true, tags: true, type: true, updatedAt: true, withoutOverlaps: true } }).execute(); // Create -const created = await db.uniqueConstraint.create({ data: { category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }, select: { id: true } }).execute(); +const created = await db.uniqueConstraint.create({ data: { category: '', databaseId: '', description: '', fieldIds: '', initiallyDeferred: '', isDeferrable: '', name: '', nullsNotDistinct: '', smartTags: '', tableId: '', tags: '', type: '', withoutOverlaps: '' }, select: { id: true } }).execute(); // Update const updated = await db.uniqueConstraint.update({ where: { id: '' }, data: { category: '' }, select: { id: true } }).execute(); @@ -3816,6 +3737,17 @@ applyRegistryDefaults const result = await db.query.applyRegistryDefaults({ data: '', nodeType: '' }).execute(); ``` +### `db.query.emailSharedAccount` + +emailSharedAccount + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.emailSharedAccount().execute(); +``` + ### `db.query.getSitePreviewCommit` getSitePreviewCommit @@ -4099,6 +4031,21 @@ 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 @@ -4312,10 +4259,11 @@ const result = await db.mutation.platformSitesProvisionStaticSite({ input: '', 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 444db1275d..038b8785ac 100644 --- a/sdk/constructive-sdk/src/api/orm/index.ts +++ b/sdk/constructive-sdk/src/api/orm/index.ts @@ -34,7 +34,6 @@ import { ForeignKeyConstraintModel } from './models/foreignKeyConstraint'; import { FullTextSearchModel } from './models/fullTextSearch'; import { FunctionModel } from './models/function'; import { GetSitePreviewsRecordModel } from './models/getSitePreviewsRecord'; -import { HostnameBindingModel } from './models/hostnameBinding'; import { IdentityProviderRegistryModel } from './models/identityProviderRegistry'; import { IndexModel } from './models/index'; import { ListSuspendedDatabasesRecordModel } from './models/listSuspendedDatabasesRecord'; @@ -69,7 +68,6 @@ import { PrimaryKeyConstraintModel } from './models/primaryKeyConstraint'; import { PubkeySettingModel } from './models/pubkeySetting'; import { RedirectModel } from './models/redirect'; import { RlsSettingModel } from './models/rlsSetting'; -import { RouteBindingModel } from './models/routeBinding'; import { RouteModel } from './models/route'; import { SchemaModel } from './models/schema'; import { SchemaGrantModel } from './models/schemaGrant'; @@ -161,7 +159,6 @@ export function createClient(config: OrmClientConfig) { fullTextSearch: new FullTextSearchModel(client), function: new FunctionModel(client), getSitePreviewsRecord: new GetSitePreviewsRecordModel(client), - hostnameBinding: new HostnameBindingModel(client), identityProviderRegistry: new IdentityProviderRegistryModel(client), index: new IndexModel(client), listSuspendedDatabasesRecord: new ListSuspendedDatabasesRecordModel(client), @@ -196,7 +193,6 @@ export function createClient(config: OrmClientConfig) { pubkeySetting: new PubkeySettingModel(client), redirect: new RedirectModel(client), rlsSetting: new RlsSettingModel(client), - routeBinding: new RouteBindingModel(client), route: new RouteModel(client), schema: new SchemaModel(client), schemaGrant: new SchemaGrantModel(client), diff --git a/sdk/constructive-sdk/src/api/orm/input-types.ts b/sdk/constructive-sdk/src/api/orm/input-types.ts index ff96fdb8a4..f4e5da7908 100644 --- a/sdk/constructive-sdk/src/api/orm/input-types.ts +++ b/sdk/constructive-sdk/src/api/orm/input-types.ts @@ -824,28 +824,6 @@ export interface GetSitePreviewsRecord { commitId?: string | null; name?: string | null; } -/** Compiled hostname index maintained by domain sync triggers; read only through the resolver */ -export interface HostnameBinding { - /** Domain row this binding was compiled from */ - domainId?: string | null; - /** Lowercase hostname (exact or *.parent wildcard) */ - hostname?: string | null; - id: string; - /** Whether this binding is a wildcard claim */ - isWildcard?: boolean | null; - /** Whether the platform drives this hostname's lifecycle */ - managed?: boolean | null; - /** Parent hostname a wildcard binding covers */ - parentHostname?: string | null; - /** TLS secret name compiled from the domain row */ - tlsSecretName?: string | null; - /** Certificate lifecycle state compiled from the domain row */ - tlsStatus?: string | null; - /** When this binding was last recompiled */ - updatedAt?: string | null; - /** Ownership verification state compiled from the domain row */ - verificationStatus?: string | null; -} export interface IdentityProviderRegistry { authorizationUrl?: string | null; displayName?: string | null; @@ -900,6 +878,8 @@ export interface ManagedDomain { id: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean | null; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number | null; /** When TLS last became ready */ tlsReadyAt?: string | null; /** TLS provisioning state for this managed hostname */ @@ -1215,6 +1195,8 @@ export interface PlatformManagedDomain { id: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean | null; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number | null; /** When TLS last became ready */ tlsReadyAt?: string | null; /** TLS provisioning state for this managed hostname */ @@ -1518,36 +1500,6 @@ export interface RlsSetting { roleSchemaId?: string | null; updatedAt?: string | null; } -/** Compiled route precedence index maintained by route sync triggers; carries typed target ids only, read through the resolver */ -export interface RouteBinding { - /** Domain row the source route binds */ - domainId?: string | null; - id: string; - /** Active flag compiled from the source route */ - isActive?: boolean | null; - /** HTTP method this binding matches; NULL matches any method */ - method?: string | null; - /** Path prefix this binding matches */ - path?: string | null; - /** Priority compiled from the source route */ - priority?: number | null; - /** Site whose surface the source route serves; NULL when it serves no site */ - servingSiteId?: string | null; - /** Api catalog row the source route targets */ - targetApiId?: string | null; - /** Bucket catalog row the source route targets */ - targetBucketId?: string | null; - /** Function catalog row the source route targets */ - targetFunctionId?: string | null; - /** Redirect catalog row the source route targets */ - targetRedirectId?: string | null; - /** Resource catalog row (a Service resource) the source route targets */ - targetServiceId?: string | null; - /** Site catalog row the source route targets */ - targetSiteId?: string | null; - /** When this binding was last recompiled */ - updatedAt?: string | null; -} /** Routes binding a domain hostname and path to a typed catalog target */ export interface Route { /** Whether this route answers callers with no identity. Requires the target function to declare anonymous_callable; default false = an identity is required */ @@ -1917,6 +1869,7 @@ export interface UniqueConstraint { initiallyDeferred?: boolean | null; isDeferrable?: boolean | null; name?: string | null; + nullsNotDistinct?: boolean | null; smartTags?: Record | null; tableId?: string | null; tags?: string[] | null; @@ -2184,7 +2137,6 @@ export interface FunctionRelations { triggers?: ConnectionResult; } export interface GetSitePreviewsRecordRelations {} -export interface HostnameBindingRelations {} export interface IdentityProviderRegistryRelations {} export interface IndexRelations { database?: Database | null; @@ -2317,7 +2269,6 @@ export interface RlsSettingRelations { currentUserAgentFunction?: Function | null; roleSchema?: Schema | null; } -export interface RouteBindingRelations {} export interface RouteRelations { domain?: Domain | null; servingSite?: Site | null; @@ -2511,7 +2462,6 @@ export type FullTextSearchWithRelations = FullTextSearch & FullTextSearchRelatio export type FunctionWithRelations = Function & FunctionRelations; export type GetSitePreviewsRecordWithRelations = GetSitePreviewsRecord & GetSitePreviewsRecordRelations; -export type HostnameBindingWithRelations = HostnameBinding & HostnameBindingRelations; export type IdentityProviderRegistryWithRelations = IdentityProviderRegistry & IdentityProviderRegistryRelations; export type IndexWithRelations = Index & IndexRelations; @@ -2559,7 +2509,6 @@ export type PrimaryKeyConstraintWithRelations = PrimaryKeyConstraint & export type PubkeySettingWithRelations = PubkeySetting & PubkeySettingRelations; export type RedirectWithRelations = Redirect & RedirectRelations; export type RlsSettingWithRelations = RlsSetting & RlsSettingRelations; -export type RouteBindingWithRelations = RouteBinding & RouteBindingRelations; export type RouteWithRelations = Route & RouteRelations; export type SchemaWithRelations = Schema & SchemaRelations; export type SchemaGrantWithRelations = SchemaGrant & SchemaGrantRelations; @@ -3473,18 +3422,6 @@ export type GetSitePreviewsRecordSelect = { commitId?: boolean; name?: boolean; }; -export type HostnameBindingSelect = { - domainId?: boolean; - hostname?: boolean; - id?: boolean; - isWildcard?: boolean; - managed?: boolean; - parentHostname?: boolean; - tlsSecretName?: boolean; - tlsStatus?: boolean; - updatedAt?: boolean; - verificationStatus?: boolean; -}; export type IdentityProviderRegistrySelect = { authorizationUrl?: boolean; displayName?: boolean; @@ -3538,6 +3475,7 @@ export type ManagedDomainSelect = { domain?: boolean; id?: boolean; isWildcard?: boolean; + publicPort?: boolean; tlsReadyAt?: boolean; tlsStatus?: boolean; updatedAt?: boolean; @@ -3830,6 +3768,7 @@ export type PlatformManagedDomainSelect = { domain?: boolean; id?: boolean; isWildcard?: boolean; + publicPort?: boolean; tlsReadyAt?: boolean; tlsStatus?: boolean; updatedAt?: boolean; @@ -4176,22 +4115,6 @@ export type RlsSettingSelect = { select: SchemaSelect; }; }; -export type RouteBindingSelect = { - domainId?: boolean; - id?: boolean; - isActive?: boolean; - method?: boolean; - path?: boolean; - priority?: boolean; - servingSiteId?: boolean; - targetApiId?: boolean; - targetBucketId?: boolean; - targetFunctionId?: boolean; - targetRedirectId?: boolean; - targetServiceId?: boolean; - targetSiteId?: boolean; - updatedAt?: boolean; -}; export type RouteSelect = { anonymous?: boolean; config?: boolean; @@ -4821,6 +4744,7 @@ export type UniqueConstraintSelect = { initiallyDeferred?: boolean; isDeferrable?: boolean; name?: boolean; + nullsNotDistinct?: boolean; smartTags?: boolean; tableId?: boolean; tags?: boolean; @@ -6323,34 +6247,6 @@ export interface GetSitePreviewsRecordFilter { or?: GetSitePreviewsRecordFilter[]; not?: GetSitePreviewsRecordFilter; } -export interface HostnameBindingFilter { - /** Checks for all expressions in this list. */ - and?: HostnameBindingFilter[]; - /** Filter by the object’s `domainId` field. */ - domainId?: UUIDFilter; - /** Filter by the object’s `hostname` field. */ - hostname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isWildcard` field. */ - isWildcard?: BooleanFilter; - /** Filter by the object’s `managed` field. */ - managed?: BooleanFilter; - /** Negates the expression. */ - not?: HostnameBindingFilter; - /** Checks for any expressions in this list. */ - or?: HostnameBindingFilter[]; - /** Filter by the object’s `parentHostname` field. */ - parentHostname?: StringFilter; - /** Filter by the object’s `tlsSecretName` field. */ - tlsSecretName?: StringFilter; - /** Filter by the object’s `tlsStatus` field. */ - tlsStatus?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `verificationStatus` field. */ - verificationStatus?: StringFilter; -} export interface IdentityProviderRegistryFilter { /** Checks for all expressions in this list. */ and?: IdentityProviderRegistryFilter[]; @@ -6466,6 +6362,8 @@ export interface ManagedDomainFilter { not?: ManagedDomainFilter; /** Checks for any expressions in this list. */ or?: ManagedDomainFilter[]; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -6995,6 +6893,8 @@ export interface PlatformManagedDomainFilter { platformDomainVerificationsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainVerificationFilter; /** `platformDomainVerificationsByManagedDomainId` exist. */ platformDomainVerificationsByManagedDomainIdExist?: boolean; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -7574,42 +7474,6 @@ export interface RlsSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface RouteBindingFilter { - /** Checks for all expressions in this list. */ - and?: RouteBindingFilter[]; - /** Filter by the object’s `domainId` field. */ - domainId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isActive` field. */ - isActive?: BooleanFilter; - /** Filter by the object’s `method` field. */ - method?: StringFilter; - /** Negates the expression. */ - not?: RouteBindingFilter; - /** Checks for any expressions in this list. */ - or?: RouteBindingFilter[]; - /** Filter by the object’s `path` field. */ - path?: StringFilter; - /** Filter by the object’s `priority` field. */ - priority?: IntFilter; - /** Filter by the object’s `servingSiteId` field. */ - servingSiteId?: UUIDFilter; - /** Filter by the object’s `targetApiId` field. */ - targetApiId?: UUIDFilter; - /** Filter by the object’s `targetBucketId` field. */ - targetBucketId?: UUIDFilter; - /** Filter by the object’s `targetFunctionId` field. */ - targetFunctionId?: UUIDFilter; - /** Filter by the object’s `targetRedirectId` field. */ - targetRedirectId?: UUIDFilter; - /** Filter by the object’s `targetServiceId` field. */ - targetServiceId?: UUIDFilter; - /** Filter by the object’s `targetSiteId` field. */ - targetSiteId?: UUIDFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} export interface RouteFilter { /** Checks for all expressions in this list. */ and?: RouteFilter[]; @@ -8503,6 +8367,8 @@ export interface UniqueConstraintFilter { name?: StringFilter; /** Negates the expression. */ not?: UniqueConstraintFilter; + /** Filter by the object’s `nullsNotDistinct` field. */ + nullsNotDistinct?: BooleanFilter; /** Checks for any expressions in this list. */ or?: UniqueConstraintFilter[]; /** Filter by the object’s `smartTags` field. */ @@ -9671,30 +9537,6 @@ export type GetSitePreviewsRecordsOrderBy = | 'COMMIT_ID_DESC' | 'NAME_ASC' | 'NAME_DESC'; -export type HostnameBindingOrderBy = - | 'DOMAIN_ID_ASC' - | 'DOMAIN_ID_DESC' - | 'HOSTNAME_ASC' - | 'HOSTNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_WILDCARD_ASC' - | 'IS_WILDCARD_DESC' - | 'MANAGED_ASC' - | 'MANAGED_DESC' - | 'NATURAL' - | 'PARENT_HOSTNAME_ASC' - | 'PARENT_HOSTNAME_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'TLS_SECRET_NAME_ASC' - | 'TLS_SECRET_NAME_DESC' - | 'TLS_STATUS_ASC' - | 'TLS_STATUS_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'VERIFICATION_STATUS_ASC' - | 'VERIFICATION_STATUS_DESC'; export type IdentityProviderRegistryOrderBy = | 'AUTHORIZATION_URL_ASC' | 'AUTHORIZATION_URL_DESC' @@ -9791,6 +9633,8 @@ export type ManagedDomainOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PUBLIC_PORT_ASC' + | 'PUBLIC_PORT_DESC' | 'TLS_READY_AT_ASC' | 'TLS_READY_AT_DESC' | 'TLS_STATUS_ASC' @@ -10183,6 +10027,8 @@ export type PlatformManagedDomainOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PUBLIC_PORT_ASC' + | 'PUBLIC_PORT_DESC' | 'TLS_READY_AT_ASC' | 'TLS_READY_AT_DESC' | 'TLS_STATUS_ASC' @@ -10573,38 +10419,6 @@ export type RlsSettingOrderBy = | 'ROLE_SCHEMA_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type RouteBindingOrderBy = - | 'DOMAIN_ID_ASC' - | 'DOMAIN_ID_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_ACTIVE_ASC' - | 'IS_ACTIVE_DESC' - | 'METHOD_ASC' - | 'METHOD_DESC' - | 'NATURAL' - | 'PATH_ASC' - | 'PATH_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'PRIORITY_ASC' - | 'PRIORITY_DESC' - | 'SERVING_SITE_ID_ASC' - | 'SERVING_SITE_ID_DESC' - | 'TARGET_API_ID_ASC' - | 'TARGET_API_ID_DESC' - | 'TARGET_BUCKET_ID_ASC' - | 'TARGET_BUCKET_ID_DESC' - | 'TARGET_FUNCTION_ID_ASC' - | 'TARGET_FUNCTION_ID_DESC' - | 'TARGET_REDIRECT_ID_ASC' - | 'TARGET_REDIRECT_ID_DESC' - | 'TARGET_SERVICE_ID_ASC' - | 'TARGET_SERVICE_ID_DESC' - | 'TARGET_SITE_ID_ASC' - | 'TARGET_SITE_ID_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type RouteOrderBy = | 'ANONYMOUS_ASC' | 'ANONYMOUS_DESC' @@ -11159,6 +10973,8 @@ export type UniqueConstraintOrderBy = | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' + | 'NULLS_NOT_DISTINCT_ASC' + | 'NULLS_NOT_DISTINCT_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'SMART_TAGS_ASC' @@ -12418,38 +12234,6 @@ export interface DeleteGetSitePreviewsRecordInput { clientMutationId?: string; id: string; } -export interface CreateHostnameBindingInput { - clientMutationId?: string; - hostnameBinding: { - domainId: string; - hostname: string; - isWildcard?: boolean; - managed?: boolean; - parentHostname?: string; - tlsSecretName?: string; - tlsStatus?: string; - verificationStatus?: string; - }; -} -export interface HostnameBindingPatch { - domainId?: string | null; - hostname?: string | null; - isWildcard?: boolean | null; - managed?: boolean | null; - parentHostname?: string | null; - tlsSecretName?: string | null; - tlsStatus?: string | null; - verificationStatus?: string | null; -} -export interface UpdateHostnameBindingInput { - clientMutationId?: string; - id: string; - hostnameBindingPatch: HostnameBindingPatch; -} -export interface DeleteHostnameBindingInput { - clientMutationId?: string; - id: string; -} export interface CreateIdentityProviderRegistryInput { clientMutationId?: string; identityProviderRegistry: { @@ -12562,6 +12346,7 @@ export interface CreateManagedDomainInput { databaseId: string; domain: string; isWildcard?: boolean; + publicPort?: number; tlsReadyAt?: string; tlsStatus?: string; updatedByPrincipal?: string; @@ -12577,6 +12362,7 @@ export interface ManagedDomainPatch { databaseId?: string | null; domain?: string | null; isWildcard?: boolean | null; + publicPort?: number | null; tlsReadyAt?: string | null; tlsStatus?: string | null; updatedByPrincipal?: string | null; @@ -13057,6 +12843,7 @@ export interface CreatePlatformManagedDomainInput { createdByPrincipal?: string; domain: string; isWildcard?: boolean; + publicPort?: number; tlsReadyAt?: string; tlsStatus?: string; updatedByPrincipal?: string; @@ -13071,6 +12858,7 @@ export interface PlatformManagedDomainPatch { createdByPrincipal?: string | null; domain?: string | null; isWildcard?: boolean | null; + publicPort?: number | null; tlsReadyAt?: string | null; tlsStatus?: string | null; updatedByPrincipal?: string | null; @@ -13558,46 +13346,6 @@ export interface DeleteRlsSettingInput { clientMutationId?: string; id: string; } -export interface CreateRouteBindingInput { - clientMutationId?: string; - routeBinding: { - domainId: string; - isActive?: boolean; - method?: string; - path: string; - priority?: number; - servingSiteId?: string; - targetApiId?: string; - targetBucketId?: string; - targetFunctionId?: string; - targetRedirectId?: string; - targetServiceId?: string; - targetSiteId?: string; - }; -} -export interface RouteBindingPatch { - domainId?: string | null; - isActive?: boolean | null; - method?: string | null; - path?: string | null; - priority?: number | null; - servingSiteId?: string | null; - targetApiId?: string | null; - targetBucketId?: string | null; - targetFunctionId?: string | null; - targetRedirectId?: string | null; - targetServiceId?: string | null; - targetSiteId?: string | null; -} -export interface UpdateRouteBindingInput { - clientMutationId?: string; - id: string; - routeBindingPatch: RouteBindingPatch; -} -export interface DeleteRouteBindingInput { - clientMutationId?: string; - id: string; -} export interface CreateRouteInput { clientMutationId?: string; route: { @@ -14270,6 +14018,7 @@ export interface CreateUniqueConstraintInput { initiallyDeferred?: boolean; isDeferrable?: boolean; name?: string; + nullsNotDistinct?: boolean; smartTags?: Record; tableId: string; tags?: string[]; @@ -14285,6 +14034,7 @@ export interface UniqueConstraintPatch { initiallyDeferred?: boolean | null; isDeferrable?: boolean | null; name?: string | null; + nullsNotDistinct?: boolean | null; smartTags?: Record | null; tableId?: string | null; tags?: string[] | null; @@ -14673,6 +14423,15 @@ 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; @@ -14840,6 +14599,13 @@ 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. */ @@ -16435,28 +16201,6 @@ export interface FunctionInput { tags?: string[]; volatility?: string; } -/** An input for mutations affecting `HostnameBinding` */ -export interface HostnameBindingInput { - /** Domain row this binding was compiled from */ - domainId: string; - /** Lowercase hostname (exact or *.parent wildcard) */ - hostname: string; - id?: string; - /** Whether this binding is a wildcard claim */ - isWildcard?: boolean; - /** Whether the platform drives this hostname's lifecycle */ - managed?: boolean; - /** Parent hostname a wildcard binding covers */ - parentHostname?: string; - /** TLS secret name compiled from the domain row */ - tlsSecretName?: string; - /** Certificate lifecycle state compiled from the domain row */ - tlsStatus?: string; - /** When this binding was last recompiled */ - updatedAt?: string; - /** Ownership verification state compiled from the domain row */ - verificationStatus?: string; -} /** An input for mutations affecting `IdentityProviderRegistry` */ export interface IdentityProviderRegistryInput { authorizationUrl?: string; @@ -16506,6 +16250,8 @@ export interface ManagedDomainInput { id?: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number; /** When TLS last became ready */ tlsReadyAt?: string; /** TLS provisioning state for this managed hostname */ @@ -16819,6 +16565,8 @@ export interface PlatformManagedDomainInput { id?: string; /** Whether this managed hostname is a *.parent wildcard */ isWildcard?: boolean; + /** Port the edge serves this hostname on when it is not the scheme default; NULL on a standard edge */ + publicPort?: number; /** When TLS last became ready */ tlsReadyAt?: string; /** TLS provisioning state for this managed hostname */ @@ -17124,36 +16872,6 @@ export interface RlsSettingInput { roleSchemaId?: string; updatedAt?: string; } -/** An input for mutations affecting `RouteBinding` */ -export interface RouteBindingInput { - /** Domain row the source route binds */ - domainId: string; - id?: string; - /** Active flag compiled from the source route */ - isActive?: boolean; - /** HTTP method this binding matches; NULL matches any method */ - method?: string; - /** Path prefix this binding matches */ - path: string; - /** Priority compiled from the source route */ - priority?: number; - /** Site whose surface the source route serves; NULL when it serves no site */ - servingSiteId?: string; - /** Api catalog row the source route targets */ - targetApiId?: string; - /** Bucket catalog row the source route targets */ - targetBucketId?: string; - /** Function catalog row the source route targets */ - targetFunctionId?: string; - /** Redirect catalog row the source route targets */ - targetRedirectId?: string; - /** Resource catalog row (a Service resource) the source route targets */ - targetServiceId?: string; - /** Site catalog row the source route targets */ - targetSiteId?: string; - /** When this binding was last recompiled */ - updatedAt?: string; -} /** An input for mutations affecting `Route` */ export interface RouteInput { /** Whether this route answers callers with no identity. Requires the target function to declare anonymous_callable; default false = an identity is required */ @@ -17518,6 +17236,7 @@ export interface UniqueConstraintInput { initiallyDeferred?: boolean; isDeferrable?: boolean; name?: string; + nullsNotDistinct?: boolean; smartTags?: Record; tableId: string; tags?: string[]; @@ -19002,6 +18721,8 @@ export interface UniqueConstraintFilter { name?: StringFilter; /** Negates the expression. */ not?: UniqueConstraintFilter; + /** Filter by the object’s `nullsNotDistinct` field. */ + nullsNotDistinct?: BooleanFilter; /** Checks for any expressions in this list. */ or?: UniqueConstraintFilter[]; /** Filter by the object’s `smartTags` field. */ @@ -20540,6 +20261,8 @@ export interface ManagedDomainFilter { not?: ManagedDomainFilter; /** Checks for any expressions in this list. */ or?: ManagedDomainFilter[]; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -20832,6 +20555,8 @@ export interface PlatformManagedDomainFilter { platformDomainVerificationsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainVerificationFilter; /** `platformDomainVerificationsByManagedDomainId` exist. */ platformDomainVerificationsByManagedDomainIdExist?: boolean; + /** Filter by the object’s `publicPort` field. */ + publicPort?: IntFilter; /** Filter by the object’s `tlsReadyAt` field. */ tlsReadyAt?: DatetimeFilter; /** Filter by the object’s `tlsStatus` field. */ @@ -21404,6 +21129,21 @@ 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; } @@ -21539,19 +21279,19 @@ export type PlatformSitesProvisionStaticSitePayloadSelect = { }; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface ProvisionSitePreviewPayload { clientMutationId?: string | null; @@ -21671,6 +21411,21 @@ 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; @@ -22841,36 +22596,6 @@ 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. */ @@ -22886,51 +22611,6 @@ export type DeleteFunctionPayloadSelect = { select: FunctionEdgeSelect; }; }; -export interface CreateHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was created by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} -export type CreateHostnameBindingPayloadSelect = { - clientMutationId?: boolean; - hostnameBinding?: { - select: HostnameBindingSelect; - }; - hostnameBindingEdge?: { - select: HostnameBindingEdgeSelect; - }; -}; -export interface UpdateHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was updated by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} -export type UpdateHostnameBindingPayloadSelect = { - clientMutationId?: boolean; - hostnameBinding?: { - select: HostnameBindingSelect; - }; - hostnameBindingEdge?: { - select: HostnameBindingEdgeSelect; - }; -}; -export interface DeleteHostnameBindingPayload { - clientMutationId?: string | null; - /** The `HostnameBinding` that was deleted by this mutation. */ - hostnameBinding?: HostnameBinding | null; - hostnameBindingEdge?: HostnameBindingEdge | null; -} -export type DeleteHostnameBindingPayloadSelect = { - clientMutationId?: boolean; - hostnameBinding?: { - select: HostnameBindingSelect; - }; - hostnameBindingEdge?: { - select: HostnameBindingEdgeSelect; - }; -}; export interface CreateIdentityProviderRegistryPayload { clientMutationId?: string | null; /** The `IdentityProviderRegistry` that was created by this mutation. */ @@ -24371,51 +24051,6 @@ export type DeleteRlsSettingPayloadSelect = { select: RlsSettingEdgeSelect; }; }; -export interface CreateRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was created by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} -export type CreateRouteBindingPayloadSelect = { - clientMutationId?: boolean; - routeBinding?: { - select: RouteBindingSelect; - }; - routeBindingEdge?: { - select: RouteBindingEdgeSelect; - }; -}; -export interface UpdateRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was updated by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} -export type UpdateRouteBindingPayloadSelect = { - clientMutationId?: boolean; - routeBinding?: { - select: RouteBindingSelect; - }; - routeBindingEdge?: { - select: RouteBindingEdgeSelect; - }; -}; -export interface DeleteRouteBindingPayload { - clientMutationId?: string | null; - /** The `RouteBinding` that was deleted by this mutation. */ - routeBinding?: RouteBinding | null; - routeBindingEdge?: RouteBindingEdge | null; -} -export type DeleteRouteBindingPayloadSelect = { - clientMutationId?: boolean; - routeBinding?: { - select: RouteBindingSelect; - }; - routeBindingEdge?: { - select: RouteBindingEdgeSelect; - }; -}; export interface CreateRoutePayload { clientMutationId?: string | null; /** The `Route` that was created by this mutation. */ @@ -25586,6 +25221,18 @@ 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; @@ -26078,30 +25725,6 @@ 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 `HostnameBinding` edge in the connection. */ -export interface HostnameBindingEdge { - cursor?: string | null; - /** The `HostnameBinding` at the end of the edge. */ - node?: HostnameBinding | null; -} -export type HostnameBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: HostnameBindingSelect; - }; -}; /** A `IdentityProviderRegistry` edge in the connection. */ export interface IdentityProviderRegistryEdge { cursor?: string | null; @@ -26462,18 +26085,6 @@ export type RlsSettingEdgeSelect = { select: RlsSettingSelect; }; }; -/** A `RouteBinding` edge in the connection. */ -export interface RouteBindingEdge { - cursor?: string | null; - /** The `RouteBinding` at the end of the edge. */ - node?: RouteBinding | null; -} -export type RouteBindingEdgeSelect = { - cursor?: boolean; - node?: { - select: RouteBindingSelect; - }; -}; /** A `Schema` edge in the connection. */ export interface SchemaEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/api/orm/models/hostnameBinding.ts b/sdk/constructive-sdk/src/api/orm/models/hostnameBinding.ts deleted file mode 100644 index f720f177ad..0000000000 --- a/sdk/constructive-sdk/src/api/orm/models/hostnameBinding.ts +++ /dev/null @@ -1,245 +0,0 @@ -/** - * HostnameBinding 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 { - HostnameBinding, - HostnameBindingWithRelations, - HostnameBindingSelect, - HostnameBindingFilter, - HostnameBindingOrderBy, - CreateHostnameBindingInput, - UpdateHostnameBindingInput, - HostnameBindingPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class HostnameBindingModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - hostnameBindings: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'HostnameBinding', - 'hostnameBindings', - 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, - }, - 'HostnameBindingFilter', - 'HostnameBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'HostnameBinding', - fieldName: 'hostnameBindings', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - hostnameBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'HostnameBinding', - 'hostnameBindings', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'HostnameBindingFilter', - 'HostnameBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'HostnameBinding', - fieldName: 'hostnameBinding', - document, - variables, - transform: (data: { - hostnameBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - hostnameBinding: data.hostnameBindings?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - hostnameBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'HostnameBinding', - 'hostnameBindings', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'HostnameBindingFilter', - 'HostnameBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'HostnameBinding', - fieldName: 'hostnameBinding', - document, - variables, - transform: (data: { - hostnameBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - hostnameBinding: data.hostnameBindings?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'HostnameBinding', - 'createHostnameBinding', - 'hostnameBinding', - args.select, - args.data, - 'CreateHostnameBindingInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'HostnameBinding', - fieldName: 'createHostnameBinding', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - HostnameBindingPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'HostnameBinding', - 'updateHostnameBinding', - 'hostnameBinding', - args.select, - args.where.id, - args.data, - 'UpdateHostnameBindingInput', - 'id', - 'hostnameBindingPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'HostnameBinding', - fieldName: 'updateHostnameBinding', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteHostnameBinding: { - hostnameBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'HostnameBinding', - 'deleteHostnameBinding', - 'hostnameBinding', - { - id: args.where.id, - }, - 'DeleteHostnameBindingInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'HostnameBinding', - fieldName: 'deleteHostnameBinding', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/api/orm/models/index.ts b/sdk/constructive-sdk/src/api/orm/models/index.ts index 0ef42de592..207f507c84 100644 --- a/sdk/constructive-sdk/src/api/orm/models/index.ts +++ b/sdk/constructive-sdk/src/api/orm/models/index.ts @@ -32,7 +32,6 @@ export { ForeignKeyConstraintModel } from './foreignKeyConstraint'; export { FullTextSearchModel } from './fullTextSearch'; export { FunctionModel } from './function'; export { GetSitePreviewsRecordModel } from './getSitePreviewsRecord'; -export { HostnameBindingModel } from './hostnameBinding'; export { IdentityProviderRegistryModel } from './identityProviderRegistry'; export { IndexModel } from './indexModel'; export { ListSuspendedDatabasesRecordModel } from './listSuspendedDatabasesRecord'; @@ -67,7 +66,6 @@ export { PrimaryKeyConstraintModel } from './primaryKeyConstraint'; export { PubkeySettingModel } from './pubkeySetting'; export { RedirectModel } from './redirect'; export { RlsSettingModel } from './rlsSetting'; -export { RouteBindingModel } from './routeBinding'; export { RouteModel } from './route'; export { SchemaModel } from './schema'; export { SchemaGrantModel } from './schemaGrant'; diff --git a/sdk/constructive-sdk/src/api/orm/models/routeBinding.ts b/sdk/constructive-sdk/src/api/orm/models/routeBinding.ts deleted file mode 100644 index 3389ee7e37..0000000000 --- a/sdk/constructive-sdk/src/api/orm/models/routeBinding.ts +++ /dev/null @@ -1,245 +0,0 @@ -/** - * RouteBinding 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 { - RouteBinding, - RouteBindingWithRelations, - RouteBindingSelect, - RouteBindingFilter, - RouteBindingOrderBy, - CreateRouteBindingInput, - UpdateRouteBindingInput, - RouteBindingPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class RouteBindingModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - routeBindings: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'RouteBinding', - 'routeBindings', - 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, - }, - 'RouteBindingFilter', - 'RouteBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'RouteBinding', - fieldName: 'routeBindings', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - routeBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'RouteBinding', - 'routeBindings', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'RouteBindingFilter', - 'RouteBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'RouteBinding', - fieldName: 'routeBinding', - document, - variables, - transform: (data: { - routeBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - routeBinding: data.routeBindings?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - routeBinding: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'RouteBinding', - 'routeBindings', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'RouteBindingFilter', - 'RouteBindingOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'RouteBinding', - fieldName: 'routeBinding', - document, - variables, - transform: (data: { - routeBindings?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - routeBinding: data.routeBindings?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createRouteBinding: { - routeBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'RouteBinding', - 'createRouteBinding', - 'routeBinding', - args.select, - args.data, - 'CreateRouteBindingInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'RouteBinding', - fieldName: 'createRouteBinding', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - RouteBindingPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateRouteBinding: { - routeBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'RouteBinding', - 'updateRouteBinding', - 'routeBinding', - args.select, - args.where.id, - args.data, - 'UpdateRouteBindingInput', - 'id', - 'routeBindingPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'RouteBinding', - fieldName: 'updateRouteBinding', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteRouteBinding: { - routeBinding: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'RouteBinding', - 'deleteRouteBinding', - 'routeBinding', - { - id: args.where.id, - }, - 'DeleteRouteBindingInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'RouteBinding', - fieldName: 'deleteRouteBinding', - 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 e38f6845a3..0afacc078c 100644 --- a/sdk/constructive-sdk/src/api/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/api/orm/mutation/index.ts @@ -10,6 +10,7 @@ import type { AcceptDatabaseTransferInput, ApplyRlsInput, CancelDatabaseTransferInput, + CreateFunctionFromSourceInput, DeleteSitePreviewInput, DomainsAssignSubdomainInput, MintSitePreviewTokenInput, @@ -36,9 +37,11 @@ import type { SitesProvisionStaticSiteInput, SuspendDatabaseInput, UnsuspendDatabaseInput, + UpdateFunctionFromSourceInput, AcceptDatabaseTransferPayload, ApplyRlsPayload, CancelDatabaseTransferPayload, + CreateFunctionPayload, DeleteSitePreviewPayload, DomainsAssignSubdomainPayload, MintSitePreviewTokenPayload, @@ -65,9 +68,11 @@ import type { SitesProvisionStaticSitePayload, SuspendDatabasePayload, UnsuspendDatabasePayload, + UpdateFunctionPayload, AcceptDatabaseTransferPayloadSelect, ApplyRlsPayloadSelect, CancelDatabaseTransferPayloadSelect, + CreateFunctionPayloadSelect, DeleteSitePreviewPayloadSelect, DomainsAssignSubdomainPayloadSelect, MintSitePreviewTokenPayloadSelect, @@ -94,6 +99,7 @@ import type { SitesProvisionStaticSitePayloadSelect, SuspendDatabasePayloadSelect, UnsuspendDatabasePayloadSelect, + UpdateFunctionPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface AcceptDatabaseTransferVariables { @@ -105,6 +111,13 @@ 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; } @@ -150,10 +163,11 @@ export interface PlatformSitesProvisionStaticSiteVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; @@ -202,6 +216,13 @@ 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: ( @@ -291,6 +312,35 @@ 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: { @@ -1063,5 +1113,34 @@ 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 0c2a655e71..12ea7b4e72 100644 --- a/sdk/constructive-sdk/src/api/orm/query/index.ts +++ b/sdk/constructive-sdk/src/api/orm/query/index.ts @@ -137,6 +137,25 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + emailSharedAccount: (options?: { select?: Record }) => + new QueryBuilder<{ + emailSharedAccount: unknown | null; + }>({ + client, + operation: 'query', + operationName: 'EmailSharedAccount', + fieldName: 'emailSharedAccount', + ...buildCustomDocument( + 'query', + 'EmailSharedAccount', + 'emailSharedAccount', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), getSitePreviewCommit: ( args: GetSitePreviewCommitVariables, options?: { diff --git a/sdk/constructive-sdk/src/auth/orm/README.md b/sdk/constructive-sdk/src/auth/orm/README.md index 3943dd4aac..6e93f55c69 100644 --- a/sdk/constructive-sdk/src/auth/orm/README.md +++ b/sdk/constructive-sdk/src/auth/orm/README.md @@ -1025,10 +1025,11 @@ const result = await db.mutation.mintAccessToken({ input: { accessTtl: '' } }).execute(); +const result = await db.mutation.requestMagicLink({ input: { email: '', next: '' } }).execute(); ``` ### `db.mutation.resetPassword` @@ -1368,7 +1369,7 @@ signUp | `input` | SignUpInput (required) | ```typescript -const result = await db.mutation.signUp({ input: '' }).execute(); +const result = await db.mutation.signUp({ input: { csrfToken: '', email: '', inviteToken: '', password: '' } }).execute(); ``` ### `db.mutation.signUpMagicLink` diff --git a/sdk/constructive-sdk/src/auth/orm/input-types.ts b/sdk/constructive-sdk/src/auth/orm/input-types.ts index 82e2d1a346..1289140d59 100644 --- a/sdk/constructive-sdk/src/auth/orm/input-types.ts +++ b/sdk/constructive-sdk/src/auth/orm/input-types.ts @@ -2168,6 +2168,7 @@ export interface RequestCrossOriginTokenInput { export interface RequestMagicLinkInput { clientMutationId?: string; email?: string; + next?: string; } export interface ResetPasswordInput { clientMutationId?: string; @@ -2266,13 +2267,10 @@ export interface SignOutInput { } export interface SignUpInput { clientMutationId?: string; - credentialKind?: string; csrfToken?: string; - deviceToken?: string; email?: string; inviteToken?: string; password?: string; - rememberMe?: boolean; } export interface SignUpMagicLinkInput { clientMutationId?: string; @@ -3847,19 +3845,19 @@ export type MintAccessTokenPayloadSelect = { }; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface RefreshAccessTokenPayload { clientMutationId?: string | null; @@ -4037,13 +4035,9 @@ export type SignOutPayloadSelect = { }; export interface SignUpPayload { clientMutationId?: string | null; - result?: SignUpRecord | null; } export type SignUpPayloadSelect = { clientMutationId?: boolean; - result?: { - select: SignUpRecordSelect; - }; }; export interface SignUpMagicLinkPayload { clientMutationId?: string | null; @@ -4684,24 +4678,6 @@ export type SignInSmsOtpRecordSelect = { outDeviceToken?: boolean; userId?: boolean; }; -export interface SignUpRecord { - accessToken?: string | null; - accessTokenExpiresAt?: string | null; - id?: string | null; - isVerified?: boolean | null; - outDeviceToken?: string | null; - totpEnabled?: boolean | null; - userId?: string | null; -} -export type SignUpRecordSelect = { - accessToken?: boolean; - accessTokenExpiresAt?: boolean; - id?: boolean; - isVerified?: boolean; - outDeviceToken?: boolean; - totpEnabled?: boolean; - userId?: boolean; -}; export interface SignUpMagicLinkRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; diff --git a/sdk/constructive-sdk/src/auth/orm/mutation/index.ts b/sdk/constructive-sdk/src/auth/orm/mutation/index.ts index 855a8a7466..39394d78e4 100644 --- a/sdk/constructive-sdk/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/mutation/index.ts @@ -249,10 +249,11 @@ export interface MintAccessTokenVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-sdk/src/compute/orm/README.md b/sdk/constructive-sdk/src/compute/orm/README.md index 59b61e3661..68d50bcb97 100644 --- a/sdk/constructive-sdk/src/compute/orm/README.md +++ b/sdk/constructive-sdk/src/compute/orm/README.md @@ -1435,11 +1435,13 @@ CRUD operations for FunctionInvocation records. | `graphExecutionId` | UUID | Yes | | `id` | UUID | No | | `jobId` | BigInt | Yes | +| `jobKey` | String | Yes | | `organizationId` | UUID | Yes | | `parentInvocationId` | UUID | Yes | | `payload` | JSON | Yes | | `principalId` | UUID | Yes | | `provenance` | JSON | Yes | +| `queueName` | String | Yes | | `result` | JSON | Yes | | `startedAt` | Datetime | Yes | | `status` | String | Yes | @@ -1449,13 +1451,13 @@ CRUD operations for FunctionInvocation records. ```typescript // List all functionInvocation records -const items = await db.functionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const items = await db.functionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Get one by id -const item = await db.functionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const item = await db.functionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Create -const created = await db.functionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); +const created = await db.functionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionInvocation.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -2378,11 +2380,13 @@ CRUD operations for PlatformFunctionInvocation records. | `graphExecutionId` | UUID | Yes | | `id` | UUID | No | | `jobId` | BigInt | Yes | +| `jobKey` | String | Yes | | `organizationId` | UUID | Yes | | `parentInvocationId` | UUID | Yes | | `payload` | JSON | Yes | | `principalId` | UUID | Yes | | `provenance` | JSON | Yes | +| `queueName` | String | Yes | | `result` | JSON | Yes | | `startedAt` | Datetime | Yes | | `status` | String | Yes | @@ -2392,13 +2396,13 @@ CRUD operations for PlatformFunctionInvocation records. ```typescript // List all platformFunctionInvocation records -const items = await db.platformFunctionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const items = await db.platformFunctionInvocation.findMany({ select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Get one by id -const item = await db.platformFunctionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); +const item = await db.platformFunctionInvocation.findOne({ id: '', select: { actorId: true, apiBindingId: true, channel: true, completedAt: true, createdAt: true, createdByPrincipal: true, databaseId: true, definitionScope: true, durationMs: true, entityId: true, entityType: true, error: true, functionDefinitionId: true, graphExecutionId: true, id: true, jobId: true, jobKey: true, organizationId: true, parentInvocationId: true, payload: true, principalId: true, provenance: true, queueName: true, result: true, startedAt: true, status: true, taskIdentifier: true } }).execute(); // Create -const created = await db.platformFunctionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionInvocation.create({ data: { actorId: '', apiBindingId: '', channel: '', completedAt: '', createdByPrincipal: '', databaseId: '', definitionScope: '', durationMs: '', entityId: '', entityType: '', error: '', functionDefinitionId: '', graphExecutionId: '', jobId: '', jobKey: '', organizationId: '', parentInvocationId: '', payload: '', principalId: '', provenance: '', queueName: '', result: '', startedAt: '', status: '', taskIdentifier: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionInvocation.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -6206,10 +6210,11 @@ const result = await db.mutation.platformResourceInstallationsUpgrade({ input: { ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-sdk/src/compute/orm/input-types.ts b/sdk/constructive-sdk/src/compute/orm/input-types.ts index 141f6826bd..c4f3a14a61 100644 --- a/sdk/constructive-sdk/src/compute/orm/input-types.ts +++ b/sdk/constructive-sdk/src/compute/orm/input-types.ts @@ -1124,6 +1124,8 @@ export interface FunctionInvocation { id: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string | null; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string | null; /** Organization identity propagated with the invocation */ organizationId?: string | null; /** Parent invocation when this is a child node of a flow graph execution */ @@ -1134,6 +1136,8 @@ export interface FunctionInvocation { principalId?: string | null; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record | null; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string | null; /** Function return value (success) or structured error (failure) */ result?: Record | null; /** When execution started */ @@ -1738,6 +1742,8 @@ export interface PlatformFunctionInvocation { id: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string | null; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string | null; /** Organization identity propagated with the invocation */ organizationId?: string | null; /** Parent invocation when this is a child node of a flow graph execution */ @@ -1748,6 +1754,8 @@ export interface PlatformFunctionInvocation { principalId?: string | null; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record | null; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string | null; /** Function return value (success) or structured error (failure) */ result?: Record | null; /** When execution started */ @@ -4695,11 +4703,13 @@ export type FunctionInvocationSelect = { graphExecutionId?: boolean; id?: boolean; jobId?: boolean; + jobKey?: boolean; organizationId?: boolean; parentInvocationId?: boolean; payload?: boolean; principalId?: boolean; provenance?: boolean; + queueName?: boolean; result?: boolean; startedAt?: boolean; status?: boolean; @@ -5154,11 +5164,13 @@ export type PlatformFunctionInvocationSelect = { graphExecutionId?: boolean; id?: boolean; jobId?: boolean; + jobKey?: boolean; organizationId?: boolean; parentInvocationId?: boolean; payload?: boolean; principalId?: boolean; provenance?: boolean; + queueName?: boolean; result?: boolean; startedAt?: boolean; status?: boolean; @@ -7983,6 +7995,8 @@ export interface FunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: FunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -7997,6 +8011,8 @@ export interface FunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -8835,6 +8851,8 @@ export interface PlatformFunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: PlatformFunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -8849,6 +8867,8 @@ export interface PlatformFunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -12809,6 +12829,8 @@ export type FunctionInvocationOrderBy = | 'ID_DESC' | 'JOB_ID_ASC' | 'JOB_ID_DESC' + | 'JOB_KEY_ASC' + | 'JOB_KEY_DESC' | 'NATURAL' | 'ORGANIZATION_ID_ASC' | 'ORGANIZATION_ID_DESC' @@ -12822,6 +12844,8 @@ export type FunctionInvocationOrderBy = | 'PRINCIPAL_ID_DESC' | 'PROVENANCE_ASC' | 'PROVENANCE_DESC' + | 'QUEUE_NAME_ASC' + | 'QUEUE_NAME_DESC' | 'RESULT_ASC' | 'RESULT_DESC' | 'STARTED_AT_ASC' @@ -13499,6 +13523,8 @@ export type PlatformFunctionInvocationOrderBy = | 'ID_DESC' | 'JOB_ID_ASC' | 'JOB_ID_DESC' + | 'JOB_KEY_ASC' + | 'JOB_KEY_DESC' | 'NATURAL' | 'ORGANIZATION_ID_ASC' | 'ORGANIZATION_ID_DESC' @@ -13512,6 +13538,8 @@ export type PlatformFunctionInvocationOrderBy = | 'PRINCIPAL_ID_DESC' | 'PROVENANCE_ASC' | 'PROVENANCE_DESC' + | 'QUEUE_NAME_ASC' + | 'QUEUE_NAME_DESC' | 'RESULT_ASC' | 'RESULT_DESC' | 'STARTED_AT_ASC' @@ -17031,11 +17059,13 @@ export interface CreateFunctionInvocationInput { functionDefinitionId?: string; graphExecutionId?: string; jobId?: string; + jobKey?: string; organizationId?: string; parentInvocationId?: string; payload?: Record; principalId?: string; provenance?: Record; + queueName?: string; result?: Record; startedAt?: string; status?: string; @@ -17057,11 +17087,13 @@ export interface FunctionInvocationPatch { functionDefinitionId?: string | null; graphExecutionId?: string | null; jobId?: string | null; + jobKey?: string | null; organizationId?: string | null; parentInvocationId?: string | null; payload?: Record | null; principalId?: string | null; provenance?: Record | null; + queueName?: string | null; result?: Record | null; startedAt?: string | null; status?: string | null; @@ -17889,11 +17921,13 @@ export interface CreatePlatformFunctionInvocationInput { functionDefinitionId?: string; graphExecutionId?: string; jobId?: string; + jobKey?: string; organizationId?: string; parentInvocationId?: string; payload?: Record; principalId?: string; provenance?: Record; + queueName?: string; result?: Record; startedAt?: string; status?: string; @@ -17915,11 +17949,13 @@ export interface PlatformFunctionInvocationPatch { functionDefinitionId?: string | null; graphExecutionId?: string | null; jobId?: string | null; + jobKey?: string | null; organizationId?: string | null; parentInvocationId?: string | null; payload?: Record | null; principalId?: string | null; provenance?: Record | null; + queueName?: string | null; result?: Record | null; startedAt?: string | null; status?: string | null; @@ -23033,6 +23069,8 @@ export interface FunctionInvocationInput { id?: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string; /** Organization identity propagated with the invocation */ organizationId?: string; /** Parent invocation when this is a child node of a flow graph execution */ @@ -23043,6 +23081,8 @@ export interface FunctionInvocationInput { principalId?: string; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string; /** Function return value (success) or structured error (failure) */ result?: Record; /** When execution started */ @@ -23629,6 +23669,8 @@ export interface PlatformFunctionInvocationInput { id?: string; /** FK to app_jobs.jobs — the underlying transport */ jobId?: string; + /** Job dedupe key: a pending or retrying invocation with this key absorbs repeat requests */ + jobKey?: string; /** Organization identity propagated with the invocation */ organizationId?: string; /** Parent invocation when this is a child node of a flow graph execution */ @@ -23639,6 +23681,8 @@ export interface PlatformFunctionInvocationInput { principalId?: string; /** Non-secret channel-specific invocation provenance (route/binding/event identifiers only) */ provenance?: Record; + /** Job queue: jobs sharing a queue run one at a time, in order */ + queueName?: string; /** Function return value (success) or structured error (failure) */ result?: Record; /** When execution started */ @@ -25363,6 +25407,8 @@ export interface FunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: FunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -25377,6 +25423,8 @@ export interface FunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -26206,6 +26254,8 @@ export interface PlatformFunctionInvocationFilter { id?: UUIDFilter; /** Filter by the object’s `jobId` field. */ jobId?: BigIntFilter; + /** Filter by the object’s `jobKey` field. */ + jobKey?: StringFilter; /** Negates the expression. */ not?: PlatformFunctionInvocationFilter; /** Checks for any expressions in this list. */ @@ -26220,6 +26270,8 @@ export interface PlatformFunctionInvocationFilter { principalId?: UUIDFilter; /** Filter by the object’s `provenance` field. */ provenance?: JSONFilter; + /** Filter by the object’s `queueName` field. */ + queueName?: StringFilter; /** Filter by the object’s `result` field. */ result?: JSONFilter; /** Filter by the object’s `startedAt` field. */ @@ -29321,19 +29373,19 @@ export type PlatformResourceInstallationsUpgradePayloadSelect = { clientMutationId?: boolean; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface ResourceInstallationsInstallPayload { clientMutationId?: string | null; diff --git a/sdk/constructive-sdk/src/compute/orm/mutation/index.ts b/sdk/constructive-sdk/src/compute/orm/mutation/index.ts index 44a0f3f0bd..48ca756e41 100644 --- a/sdk/constructive-sdk/src/compute/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/compute/orm/mutation/index.ts @@ -351,10 +351,11 @@ export interface PlatformResourceInstallationsUpgradeVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-sdk/src/config/orm/README.md b/sdk/constructive-sdk/src/config/orm/README.md index 2cd850a467..8e9c44033d 100644 --- a/sdk/constructive-sdk/src/config/orm/README.md +++ b/sdk/constructive-sdk/src/config/orm/README.md @@ -698,10 +698,11 @@ const result = await db.mutation.platformSecretsSet({ input: '', select: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }).execute(); +const item = await db.billingProviderModule.findOne({ id: '', select: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingConnectionTableId: true, billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderConnectedFunction: true, billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }).execute(); // Create -const created = await db.billingProviderModule.create({ data: { activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }, select: { id: true } }).execute(); +const created = await db.billingProviderModule.create({ data: { activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingConnectionTableId: '', billingConnectionTableName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderConnectedFunction: '', billingProviderKeyFunction: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingConnectionFunction: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }, select: { id: true } }).execute(); // Update const updated = await db.billingProviderModule.update({ where: { id: '' }, data: { activatePlanSubscriptionFunction: '' }, select: { id: true } }).execute(); @@ -493,7 +498,6 @@ CRUD operations for BlueprintConstruction records. | `constructedDefinition` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `errorDetails` | String | Yes | | `id` | UUID | No | | `schemaId` | UUID | Yes | | `status` | String | Yes | @@ -504,13 +508,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, errorDetails: 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, 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, errorDetails: 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, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute(); // Create -const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', errorDetails: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); +const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute(); // Update const updated = await db.blueprintConstruction.update({ where: { id: '' }, data: { blueprintId: '' }, select: { id: true } }).execute(); @@ -638,6 +642,8 @@ CRUD operations for CatalogModule records. | `bucketsTableName` | String | Yes | | `databaseId` | UUID | Yes | | `defaultCapabilities` | String | Yes | +| `domainVerificationsTableId` | UUID | Yes | +| `domainVerificationsTableName` | String | Yes | | `domainsTableId` | UUID | Yes | | `domainsTableName` | String | Yes | | `entityTableId` | UUID | Yes | @@ -679,13 +685,13 @@ CRUD operations for CatalogModule records. ```typescript // List all catalogModule records -const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Get one by id -const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appStoreIdentitiesTableId: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, imagesTableId: true, imagesTableName: true, managedDomainsTableId: true, managedDomainsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, redirectsTableId: true, redirectsTableName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Create -const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); +const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appStoreIdentitiesTableId: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', imagesTableId: '', imagesTableName: '', managedDomainsTableId: '', managedDomainsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', redirectsTableId: '', redirectsTableName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.catalogModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -3890,6 +3896,7 @@ CRUD operations for StorageModule records. | `provisions` | JSON | Yes | | `publicSchemaName` | String | Yes | | `publicUrlPrefix` | String | Yes | +| `region` | String | Yes | | `restrictReads` | Boolean | Yes | | `schemaId` | UUID | Yes | | `scope` | String | Yes | @@ -3899,13 +3906,13 @@ CRUD operations for StorageModule records. ```typescript // List all storageModule records -const items = await db.storageModule.findMany({ select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); +const items = await db.storageModule.findMany({ select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, region: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); // Get one by id -const item = await db.storageModule.findOne({ id: '', select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); +const item = await db.storageModule.findOne({ id: '', select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, key: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, region: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); // Create -const created = await db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); +const created = await db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', key: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', region: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.storageModule.update({ where: { id: '' }, data: { allowedOrigins: '' }, select: { id: true } }).execute(); @@ -4333,7 +4340,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 on success, NULL on failure. +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. - **Type:** mutation - **Arguments:** @@ -4364,10 +4371,11 @@ const result = await db.mutation.copyTemplateToBlueprint({ input: { databaseId: ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **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 4a8fcc7f04..ca44c2dad1 100644 --- a/sdk/constructive-sdk/src/modules/orm/input-types.ts +++ b/sdk/constructive-sdk/src/modules/orm/input-types.ts @@ -365,6 +365,8 @@ export interface BillingProviderModule { activatePlanSubscriptionFunction?: string | null; apiName?: string | null; applyProviderObservationFunction?: string | null; + billingConnectionTableId?: string | null; + billingConnectionTableName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; billingDisputesTableId?: string | null; @@ -379,6 +381,8 @@ export interface BillingProviderModule { billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingProviderConnectedFunction?: string | null; + billingProviderKeyFunction?: string | null; billingProviderStateTableId?: string | null; billingProviderStateTableName?: string | null; billingRefundsTableId?: string | null; @@ -415,6 +419,7 @@ export interface BillingProviderModule { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordBillingConnectionFunction?: string | null; recordBillingHealthFunction?: string | null; recordDisputeFunction?: string | null; recordRefundFunction?: string | null; @@ -468,13 +473,11 @@ export interface BlueprintConstruction { createdAt?: string | null; /** The database the blueprint was constructed into. */ databaseId?: string | null; - /** Error message from a failed construction attempt. NULL unless status is failed. */ - errorDetails?: string | 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. failed: execution failed (see error_details). */ + /** 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. */ 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; @@ -562,6 +565,8 @@ export interface CatalogModule { bucketsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + domainVerificationsTableId?: string | null; + domainVerificationsTableName?: string | null; domainsTableId?: string | null; domainsTableName?: string | null; entityTableId?: string | null; @@ -2452,6 +2457,7 @@ export interface StorageModule { provisions?: Record | null; publicSchemaName?: string | null; publicUrlPrefix?: string | null; + region?: string | null; restrictReads?: boolean | null; schemaId?: string | null; scope?: string | null; @@ -3054,6 +3060,8 @@ export type BillingProviderModuleSelect = { activatePlanSubscriptionFunction?: boolean; apiName?: boolean; applyProviderObservationFunction?: boolean; + billingConnectionTableId?: boolean; + billingConnectionTableName?: boolean; billingCustomersTableId?: boolean; billingCustomersTableName?: boolean; billingDisputesTableId?: boolean; @@ -3068,6 +3076,8 @@ export type BillingProviderModuleSelect = { billingPricesTableName?: boolean; billingProductsTableId?: boolean; billingProductsTableName?: boolean; + billingProviderConnectedFunction?: boolean; + billingProviderKeyFunction?: boolean; billingProviderStateTableId?: boolean; billingProviderStateTableName?: boolean; billingRefundsTableId?: boolean; @@ -3104,6 +3114,7 @@ export type BillingProviderModuleSelect = { processBillingEventFunction?: boolean; productsTableId?: boolean; provider?: boolean; + recordBillingConnectionFunction?: boolean; recordBillingHealthFunction?: boolean; recordDisputeFunction?: boolean; recordRefundFunction?: boolean; @@ -3147,7 +3158,6 @@ export type BlueprintConstructionSelect = { constructedDefinition?: boolean; createdAt?: boolean; databaseId?: boolean; - errorDetails?: boolean; id?: boolean; schemaId?: boolean; status?: boolean; @@ -3238,6 +3248,8 @@ export type CatalogModuleSelect = { bucketsTableName?: boolean; databaseId?: boolean; defaultCapabilities?: boolean; + domainVerificationsTableId?: boolean; + domainVerificationsTableName?: boolean; domainsTableId?: boolean; domainsTableName?: boolean; entityTableId?: boolean; @@ -4908,6 +4920,7 @@ export type StorageModuleSelect = { provisions?: boolean; publicSchemaName?: boolean; publicUrlPrefix?: boolean; + region?: boolean; restrictReads?: boolean; schemaId?: boolean; scope?: boolean; @@ -5380,6 +5393,10 @@ export interface BillingProviderModuleFilter { apiName?: StringFilter; /** Filter by the object’s `applyProviderObservationFunction` field. */ applyProviderObservationFunction?: StringFilter; + /** Filter by the object’s `billingConnectionTableId` field. */ + billingConnectionTableId?: UUIDFilter; + /** Filter by the object’s `billingConnectionTableName` field. */ + billingConnectionTableName?: StringFilter; /** Filter by the object’s `billingCustomersTableId` field. */ billingCustomersTableId?: UUIDFilter; /** Filter by the object’s `billingCustomersTableName` field. */ @@ -5408,6 +5425,10 @@ export interface BillingProviderModuleFilter { billingProductsTableId?: UUIDFilter; /** Filter by the object’s `billingProductsTableName` field. */ billingProductsTableName?: StringFilter; + /** Filter by the object’s `billingProviderConnectedFunction` field. */ + billingProviderConnectedFunction?: StringFilter; + /** Filter by the object’s `billingProviderKeyFunction` field. */ + billingProviderKeyFunction?: StringFilter; /** Filter by the object’s `billingProviderStateTableId` field. */ billingProviderStateTableId?: UUIDFilter; /** Filter by the object’s `billingProviderStateTableName` field. */ @@ -5484,6 +5505,8 @@ export interface BillingProviderModuleFilter { productsTableId?: UUIDFilter; /** Filter by the object’s `provider` field. */ provider?: StringFilter; + /** Filter by the object’s `recordBillingConnectionFunction` field. */ + recordBillingConnectionFunction?: StringFilter; /** Filter by the object’s `recordBillingHealthFunction` field. */ recordBillingHealthFunction?: StringFilter; /** Filter by the object’s `recordDisputeFunction` field. */ @@ -5566,8 +5589,6 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `errorDetails` field. */ - errorDetails?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -5740,6 +5761,10 @@ export interface CatalogModuleFilter { domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ domainModulesExist?: boolean; + /** Filter by the object’s `domainVerificationsTableId` field. */ + domainVerificationsTableId?: UUIDFilter; + /** Filter by the object’s `domainVerificationsTableName` field. */ + domainVerificationsTableName?: StringFilter; /** Filter by the object’s `domainsTableId` field. */ domainsTableId?: UUIDFilter; /** Filter by the object’s `domainsTableName` field. */ @@ -9120,6 +9145,8 @@ export interface StorageModuleFilter { publicSchemaName?: StringFilter; /** Filter by the object’s `publicUrlPrefix` field. */ publicUrlPrefix?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; /** Filter by the object’s `restrictReads` field. */ restrictReads?: BooleanFilter; /** Filter by the object’s `schemaId` field. */ @@ -9763,6 +9790,10 @@ export type BillingProviderModuleOrderBy = | 'API_NAME_DESC' | 'APPLY_PROVIDER_OBSERVATION_FUNCTION_ASC' | 'APPLY_PROVIDER_OBSERVATION_FUNCTION_DESC' + | 'BILLING_CONNECTION_TABLE_ID_ASC' + | 'BILLING_CONNECTION_TABLE_ID_DESC' + | 'BILLING_CONNECTION_TABLE_NAME_ASC' + | 'BILLING_CONNECTION_TABLE_NAME_DESC' | 'BILLING_CUSTOMERS_TABLE_ID_ASC' | 'BILLING_CUSTOMERS_TABLE_ID_DESC' | 'BILLING_CUSTOMERS_TABLE_NAME_ASC' @@ -9791,6 +9822,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_PRODUCTS_TABLE_ID_DESC' | 'BILLING_PRODUCTS_TABLE_NAME_ASC' | 'BILLING_PRODUCTS_TABLE_NAME_DESC' + | 'BILLING_PROVIDER_CONNECTED_FUNCTION_ASC' + | 'BILLING_PROVIDER_CONNECTED_FUNCTION_DESC' + | 'BILLING_PROVIDER_KEY_FUNCTION_ASC' + | 'BILLING_PROVIDER_KEY_FUNCTION_DESC' | 'BILLING_PROVIDER_STATE_TABLE_ID_ASC' | 'BILLING_PROVIDER_STATE_TABLE_ID_DESC' | 'BILLING_PROVIDER_STATE_TABLE_NAME_ASC' @@ -9866,6 +9901,8 @@ export type BillingProviderModuleOrderBy = | 'PRODUCTS_TABLE_ID_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' + | 'RECORD_BILLING_CONNECTION_FUNCTION_ASC' + | 'RECORD_BILLING_CONNECTION_FUNCTION_DESC' | 'RECORD_BILLING_HEALTH_FUNCTION_ASC' | 'RECORD_BILLING_HEALTH_FUNCTION_DESC' | 'RECORD_DISPUTE_FUNCTION_ASC' @@ -9931,8 +9968,6 @@ export type BlueprintConstructionOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'ERROR_DETAILS_ASC' - | 'ERROR_DETAILS_DESC' | 'ID_ASC' | 'ID_DESC' | 'NATURAL' @@ -10069,6 +10104,10 @@ export type CatalogModuleOrderBy = | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' | 'DOMAINS_TABLE_NAME_DESC' + | 'DOMAIN_VERIFICATIONS_TABLE_ID_ASC' + | 'DOMAIN_VERIFICATIONS_TABLE_ID_DESC' + | 'DOMAIN_VERIFICATIONS_TABLE_NAME_ASC' + | 'DOMAIN_VERIFICATIONS_TABLE_NAME_DESC' | 'ENTITY_TABLE_ID_ASC' | 'ENTITY_TABLE_ID_DESC' | 'FUNCTIONS_TABLE_ID_ASC' @@ -13036,6 +13075,8 @@ export type StorageModuleOrderBy = | 'PUBLIC_SCHEMA_NAME_DESC' | 'PUBLIC_URL_PREFIX_ASC' | 'PUBLIC_URL_PREFIX_DESC' + | 'REGION_ASC' + | 'REGION_DESC' | 'RESTRICT_READS_ASC' | 'RESTRICT_READS_DESC' | 'SCHEMA_ID_ASC' @@ -13661,6 +13702,8 @@ export interface CreateBillingProviderModuleInput { activatePlanSubscriptionFunction?: string; apiName?: string; applyProviderObservationFunction?: string; + billingConnectionTableId?: string; + billingConnectionTableName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; billingDisputesTableId?: string; @@ -13675,6 +13718,8 @@ export interface CreateBillingProviderModuleInput { billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingProviderConnectedFunction?: string; + billingProviderKeyFunction?: string; billingProviderStateTableId?: string; billingProviderStateTableName?: string; billingRefundsTableId?: string; @@ -13710,6 +13755,7 @@ export interface CreateBillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordBillingConnectionFunction?: string; recordBillingHealthFunction?: string; recordDisputeFunction?: string; recordRefundFunction?: string; @@ -13729,6 +13775,8 @@ export interface BillingProviderModulePatch { activatePlanSubscriptionFunction?: string | null; apiName?: string | null; applyProviderObservationFunction?: string | null; + billingConnectionTableId?: string | null; + billingConnectionTableName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; billingDisputesTableId?: string | null; @@ -13743,6 +13791,8 @@ export interface BillingProviderModulePatch { billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingProviderConnectedFunction?: string | null; + billingProviderKeyFunction?: string | null; billingProviderStateTableId?: string | null; billingProviderStateTableName?: string | null; billingRefundsTableId?: string | null; @@ -13778,6 +13828,7 @@ export interface BillingProviderModulePatch { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordBillingConnectionFunction?: string | null; recordBillingHealthFunction?: string | null; recordDisputeFunction?: string | null; recordRefundFunction?: string | null; @@ -13842,7 +13893,6 @@ export interface CreateBlueprintConstructionInput { constructedAt?: string; constructedDefinition?: Record; databaseId: string; - errorDetails?: string; schemaId?: string; status?: string; tableMap?: Record; @@ -13853,7 +13903,6 @@ export interface BlueprintConstructionPatch { constructedAt?: string | null; constructedDefinition?: Record | null; databaseId?: string | null; - errorDetails?: string | null; schemaId?: string | null; status?: string | null; tableMap?: Record | null; @@ -13991,6 +14040,8 @@ export interface CreateCatalogModuleInput { bucketsTableName?: string; databaseId: string; defaultCapabilities?: string[]; + domainVerificationsTableId?: string; + domainVerificationsTableName?: string; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -14042,6 +14093,8 @@ export interface CatalogModulePatch { bucketsTableName?: string | null; databaseId?: string | null; defaultCapabilities?: string[] | null; + domainVerificationsTableId?: string | null; + domainVerificationsTableName?: string | null; domainsTableId?: string | null; domainsTableName?: string | null; entityTableId?: string | null; @@ -17585,6 +17638,7 @@ export interface CreateStorageModuleInput { provisions?: Record; publicSchemaName?: string; publicUrlPrefix?: string; + region?: string; restrictReads?: boolean; schemaId?: string; scope: string; @@ -17629,6 +17683,7 @@ export interface StorageModulePatch { provisions?: Record | null; publicSchemaName?: string | null; publicUrlPrefix?: string | null; + region?: string | null; restrictReads?: boolean | null; schemaId?: string | null; scope?: string | null; @@ -18578,6 +18633,8 @@ export interface BillingProviderModuleInput { activatePlanSubscriptionFunction?: string; apiName?: string; applyProviderObservationFunction?: string; + billingConnectionTableId?: string; + billingConnectionTableName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; billingDisputesTableId?: string; @@ -18592,6 +18649,8 @@ export interface BillingProviderModuleInput { billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingProviderConnectedFunction?: string; + billingProviderKeyFunction?: string; billingProviderStateTableId?: string; billingProviderStateTableName?: string; billingRefundsTableId?: string; @@ -18628,6 +18687,7 @@ export interface BillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordBillingConnectionFunction?: string; recordBillingHealthFunction?: string; recordDisputeFunction?: string; recordRefundFunction?: string; @@ -18681,13 +18741,11 @@ export interface BlueprintConstructionInput { createdAt?: string; /** The database the blueprint was constructed into. */ databaseId: string; - /** Error message from a failed construction attempt. NULL unless status is failed. */ - errorDetails?: string; /** 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. failed: execution failed (see error_details). */ + /** 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. */ 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; @@ -18777,6 +18835,8 @@ export interface CatalogModuleInput { bucketsTableName?: string; databaseId: string; defaultCapabilities?: string[]; + domainVerificationsTableId?: string; + domainVerificationsTableName?: string; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -20697,6 +20757,7 @@ export interface StorageModuleInput { provisions?: Record; publicSchemaName?: string; publicUrlPrefix?: string; + region?: string; restrictReads?: boolean; schemaId?: string; scope: string; @@ -20884,8 +20945,6 @@ export interface BlueprintConstructionFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `errorDetails` field. */ - errorDetails?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -22348,6 +22407,10 @@ export interface CatalogModuleFilter { domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ domainModulesExist?: boolean; + /** Filter by the object’s `domainVerificationsTableId` field. */ + domainVerificationsTableId?: UUIDFilter; + /** Filter by the object’s `domainVerificationsTableName` field. */ + domainVerificationsTableName?: StringFilter; /** Filter by the object’s `domainsTableId` field. */ domainsTableId?: UUIDFilter; /** Filter by the object’s `domainsTableName` field. */ @@ -22814,6 +22877,8 @@ export interface StorageModuleFilter { publicSchemaName?: StringFilter; /** Filter by the object’s `publicUrlPrefix` field. */ publicUrlPrefix?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; /** Filter by the object’s `restrictReads` field. */ restrictReads?: BooleanFilter; /** Filter by the object’s `schemaId` field. */ @@ -22866,19 +22931,19 @@ export type CopyTemplateToBlueprintPayloadSelect = { result?: boolean; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface CreateAgentModulePayload { /** The `AgentModule` that was created by this mutation. */ diff --git a/sdk/constructive-sdk/src/modules/orm/mutation/index.ts b/sdk/constructive-sdk/src/modules/orm/mutation/index.ts index 6cda508cf6..e59de99a2e 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 on success, NULL on failure. + * 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. */ export interface ConstructBlueprintVariables { input: ConstructBlueprintInput; @@ -35,10 +35,11 @@ export interface CopyTemplateToBlueprintVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-sdk/src/objects/orm/README.md b/sdk/constructive-sdk/src/objects/orm/README.md index d56b4a6254..866cd6f1ef 100644 --- a/sdk/constructive-sdk/src/objects/orm/README.md +++ b/sdk/constructive-sdk/src/objects/orm/README.md @@ -246,10 +246,11 @@ const result = await db.mutation.insertNodesAtPaths({ input: '', i ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/constructive-sdk/src/remote/orm/input-types.ts b/sdk/constructive-sdk/src/remote/orm/input-types.ts index 5de4f639ba..c69a2483d7 100644 --- a/sdk/constructive-sdk/src/remote/orm/input-types.ts +++ b/sdk/constructive-sdk/src/remote/orm/input-types.ts @@ -1447,19 +1447,19 @@ export type MachinesEnrollPayloadSelect = { result?: boolean; }; export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; export interface CreateMachinePayload { clientMutationId?: string | null; diff --git a/sdk/constructive-sdk/src/remote/orm/mutation/index.ts b/sdk/constructive-sdk/src/remote/orm/mutation/index.ts index 7108c9c67c..b9bbf8ec3a 100644 --- a/sdk/constructive-sdk/src/remote/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/remote/orm/mutation/index.ts @@ -21,10 +21,11 @@ export interface MachinesEnrollVariables { /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; diff --git a/sdk/constructive-sdk/src/storage/orm/README.md b/sdk/constructive-sdk/src/storage/orm/README.md index a72925c67d..a4e42cc98d 100644 --- a/sdk/constructive-sdk/src/storage/orm/README.md +++ b/sdk/constructive-sdk/src/storage/orm/README.md @@ -47,8 +47,10 @@ CRUD operations for Bucket records. | `id` | UUID | No | | `isPublic` | Boolean | Yes | | `key` | String | Yes | +| `maxBulkFiles` | Int | Yes | | `maxFileSize` | BigInt | Yes | | `physicalName` | String | Yes | +| `provisionRequestedAt` | Datetime | Yes | | `stagingTtl` | Interval | Yes | | `tags` | String | Yes | | `type` | BucketType | Yes | @@ -58,13 +60,13 @@ CRUD operations for Bucket records. ```typescript // List all bucket records -const items = await db.bucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const items = await db.bucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.bucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const item = await db.bucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, databaseId: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Create -const created = await db.bucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); +const created = await db.bucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', databaseId: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); // Update const updated = await db.bucket.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -139,8 +141,10 @@ CRUD operations for PlatformBucket records. | `id` | UUID | No | | `isPublic` | Boolean | Yes | | `key` | String | Yes | +| `maxBulkFiles` | Int | Yes | | `maxFileSize` | BigInt | Yes | | `physicalName` | String | Yes | +| `provisionRequestedAt` | Datetime | Yes | | `stagingTtl` | Interval | Yes | | `tags` | String | Yes | | `type` | BucketType | Yes | @@ -150,13 +154,13 @@ CRUD operations for PlatformBucket records. ```typescript // List all platformBucket records -const items = await db.platformBucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const items = await db.platformBucket.findMany({ select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.platformBucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxFileSize: true, physicalName: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); +const item = await db.platformBucket.findOne({ id: '', select: { actorId: true, allowCustomKeys: true, allowedMimeTypes: true, allowedOrigins: true, createdAt: true, description: true, destinationBucketId: true, id: true, isPublic: true, key: true, maxBulkFiles: true, maxFileSize: true, physicalName: true, provisionRequestedAt: true, stagingTtl: true, tags: true, type: true, updatedAt: true } }).execute(); // Create -const created = await db.platformBucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxFileSize: '', physicalName: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); +const created = await db.platformBucket.create({ data: { actorId: '', allowCustomKeys: '', allowedMimeTypes: '', allowedOrigins: '', description: '', destinationBucketId: '', isPublic: '', key: '', maxBulkFiles: '', maxFileSize: '', physicalName: '', provisionRequestedAt: '', stagingTtl: '', tags: '', type: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformBucket.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -247,10 +251,11 @@ const result = await db.mutation.platformFilesRename({ input: { fileId: '' ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** @@ -280,7 +285,7 @@ const result = await db.mutation.uploadFile({ input: '' }).exec ### `db.mutation.uploadFiles` -Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. +Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call. - **Type:** mutation - **Arguments:** @@ -310,7 +315,7 @@ const result = await db.mutation.uploadPlatformFile({ input: '' } }).execute(); ### `db.mutation.provisionBucket` Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. - **Type:** mutation - **Arguments:** diff --git a/sdk/migrate-client/src/migrate/orm/input-types.ts b/sdk/migrate-client/src/migrate/orm/input-types.ts index 413ebefbef..5e0de6561d 100644 --- a/sdk/migrate-client/src/migrate/orm/input-types.ts +++ b/sdk/migrate-client/src/migrate/orm/input-types.ts @@ -525,17 +525,17 @@ export interface ProvisionBucketInput { } // ============ Payload/Return Types (for custom operations) ============ export interface ProvisionBucketPayload { - /** The logical bucket row that was queued for reconciliation. */ + /** The logical bucket row whose reconciliation was requested. */ bucketId: string; bucketKey: string; - /** The reconciler job enqueued to provision this bucket. */ - jobId: string; /** The physical bucket name already recorded, or null when reconciliation has not completed. */ physicalName?: string | null; + /** When reconciliation was last requested for this bucket. */ + provisionRequestedAt: string; } export type ProvisionBucketPayloadSelect = { bucketId?: boolean; bucketKey?: boolean; - jobId?: boolean; physicalName?: boolean; + provisionRequestedAt?: boolean; }; diff --git a/sdk/migrate-client/src/migrate/orm/mutation/index.ts b/sdk/migrate-client/src/migrate/orm/mutation/index.ts index 5491e16cd0..ed171c95f7 100644 --- a/sdk/migrate-client/src/migrate/orm/mutation/index.ts +++ b/sdk/migrate-client/src/migrate/orm/mutation/index.ts @@ -15,10 +15,11 @@ import { connectionFieldsMap } from '../input-types'; /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. -Reads the bucket config via RLS, then enqueues the same -storage:provision_bucket job used by the INSERT trigger. This is -idempotent for an already-reconciled bucket; enqueue failures become -GraphQL errors. +Records the request on the bucket row via RLS; the bucket's job +trigger then enqueues the same storage:provision_bucket job used on +INSERT, and repeated requests collapse into one pending job. This is +idempotent for an already-reconciled bucket; failures become GraphQL +errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput;