From 99f116c013a3b56eb83f384253ea2fcfbac4843a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 3 Jul 2026 09:19:35 +0000 Subject: [PATCH] chore: update schemas and regenerate all SDK clients Auto-generated by schema-propagation workflow. Source: constructive-db@d2c4599906 --- .agents/skills/cli-api/references/api.md | 6 +- .../cli-api/references/check-constraint.md | 6 +- .../cli-api/references/composite-type.md | 6 +- .../cli-api/references/database-setting.md | 6 +- .agents/skills/cli-api/references/domain.md | 6 +- .agents/skills/cli-api/references/enum.md | 6 +- .agents/skills/cli-api/references/field.md | 6 +- .../references/foreign-key-constraint.md | 6 +- .agents/skills/cli-api/references/index.md | 6 +- .agents/skills/cli-api/references/policy.md | 6 +- .../references/primary-key-constraint.md | 6 +- .agents/skills/cli-api/references/schema.md | 6 +- .agents/skills/cli-api/references/site.md | 6 +- .../cli-api/references/spatial-relation.md | 6 +- .agents/skills/cli-api/references/table.md | 6 +- .agents/skills/cli-api/references/trigger.md | 6 +- .../cli-api/references/unique-constraint.md | 6 +- .agents/skills/cli-api/references/view.md | 6 +- .agents/skills/cli-auth/SKILL.md | 28 +- .../cli-auth/references/create-api-key.md | 4 +- .../cli-auth/references/create-org-api-key.md | 19 + .../references/create-org-principal.md | 19 + .../references/delete-org-principal.md | 19 + .../cli-auth/references/org-api-key-list.md | 68 + .../cli-auth/references/principal-entity.md | 68 + .../references/principal-scope-override.md | 68 + .../skills/cli-auth/references/principal.md | 68 + .../cli-auth/references/revoke-org-api-key.md | 19 + .agents/skills/cli-compute/SKILL.md | 12 +- .../references/function-graph-execution.md | 6 +- .../cli-compute/references/function-graph.md | 6 +- .../references/import-graph-json.md | 4 +- .../references/platform-namespace-event.md | 68 + .../references/platform-namespace.md | 68 + .../cli-compute/references/resource-event.md | 68 + .../skills/cli-compute/references/resource.md | 68 + .agents/skills/cli-modules/SKILL.md | 10 +- .../references/merkle-store-module.md | 6 +- .../references/principal-auth-module.md | 68 + .../cli-modules/references/resource-module.md | 68 + .agents/skills/hooks-api/references/api.md | 8 +- .../hooks-api/references/check-constraint.md | 8 +- .../hooks-api/references/composite-type.md | 8 +- .../hooks-api/references/database-setting.md | 8 +- .agents/skills/hooks-api/references/domain.md | 8 +- .agents/skills/hooks-api/references/enum.md | 8 +- .agents/skills/hooks-api/references/field.md | 8 +- .../references/foreign-key-constraint.md | 8 +- .agents/skills/hooks-api/references/index.md | 8 +- .agents/skills/hooks-api/references/policy.md | 8 +- .../references/primary-key-constraint.md | 8 +- .agents/skills/hooks-api/references/schema.md | 8 +- .agents/skills/hooks-api/references/site.md | 8 +- .../hooks-api/references/spatial-relation.md | 8 +- .agents/skills/hooks-api/references/table.md | 8 +- .../skills/hooks-api/references/trigger.md | 8 +- .../hooks-api/references/unique-constraint.md | 8 +- .agents/skills/hooks-api/references/view.md | 8 +- .agents/skills/hooks-auth/SKILL.md | 20 +- .../hooks-auth/references/create-api-key.md | 4 +- .../references/create-org-api-key.md | 20 + .../references/create-org-principal.md | 20 + .../references/delete-org-principal.md | 20 + .../hooks-auth/references/org-api-key-list.md | 34 + .../hooks-auth/references/principal-entity.md | 34 + .../references/principal-scope-override.md | 34 + .../skills/hooks-auth/references/principal.md | 34 + .../references/revoke-org-api-key.md | 20 + .agents/skills/hooks-compute/SKILL.md | 12 +- .../references/function-graph-execution.md | 8 +- .../references/function-graph.md | 8 +- .../references/platform-namespace-event.md | 34 + .../references/platform-namespace.md | 34 + .../references/resource-event.md | 34 + .../hooks-compute/references/resource.md | 34 + .agents/skills/hooks-modules/SKILL.md | 10 +- .../references/merkle-store-module.md | 8 +- .../references/principal-auth-module.md | 34 + .../references/resource-module.md | 34 + .agents/skills/orm-api/references/api.md | 4 +- .../orm-api/references/check-constraint.md | 4 +- .../orm-api/references/composite-type.md | 4 +- .../orm-api/references/database-setting.md | 4 +- .agents/skills/orm-api/references/domain.md | 4 +- .agents/skills/orm-api/references/enum.md | 4 +- .agents/skills/orm-api/references/field.md | 4 +- .../references/foreign-key-constraint.md | 4 +- .agents/skills/orm-api/references/index.md | 4 +- .agents/skills/orm-api/references/policy.md | 4 +- .../references/primary-key-constraint.md | 4 +- .agents/skills/orm-api/references/schema.md | 4 +- .agents/skills/orm-api/references/site.md | 4 +- .../orm-api/references/spatial-relation.md | 4 +- .agents/skills/orm-api/references/table.md | 4 +- .agents/skills/orm-api/references/trigger.md | 4 +- .../orm-api/references/unique-constraint.md | 4 +- .agents/skills/orm-api/references/view.md | 4 +- .agents/skills/orm-auth/SKILL.md | 18 +- .../orm-auth/references/create-api-key.md | 4 +- .../orm-auth/references/create-org-api-key.md | 19 + .../references/create-org-principal.md | 19 + .../references/delete-org-principal.md | 19 + .../orm-auth/references/org-api-key-list.md | 34 + .../orm-auth/references/principal-entity.md | 34 + .../references/principal-scope-override.md | 34 + .../skills/orm-auth/references/principal.md | 34 + .../orm-auth/references/revoke-org-api-key.md | 19 + .agents/skills/orm-compute/SKILL.md | 14 +- .../references/function-graph-execution.md | 4 +- .../orm-compute/references/function-graph.md | 4 +- .../references/platform-namespace-event.md | 34 + .../references/platform-namespace.md | 34 + .../orm-compute/references/resource-event.md | 34 + .../skills/orm-compute/references/resource.md | 34 + .agents/skills/orm-modules/SKILL.md | 10 +- .../references/merkle-store-module.md | 4 +- .../references/principal-auth-module.md | 34 + .../orm-modules/references/resource-module.md | 34 + sdk/constructive-cli/src/api/cli/README.md | 59 +- .../src/api/cli/commands/api.ts | 44 + .../src/api/cli/commands/check-constraint.ts | 22 - .../src/api/cli/commands/composite-type.ts | 22 - .../src/api/cli/commands/database-setting.ts | 44 + .../src/api/cli/commands/domain.ts | 66 + .../src/api/cli/commands/enum.ts | 22 - .../src/api/cli/commands/field.ts | 22 - .../cli/commands/foreign-key-constraint.ts | 22 - .../src/api/cli/commands/index.ts | 22 - .../src/api/cli/commands/policy.ts | 22 - .../cli/commands/primary-key-constraint.ts | 22 - .../src/api/cli/commands/schema.ts | 22 - .../src/api/cli/commands/site.ts | 44 + .../src/api/cli/commands/spatial-relation.ts | 22 - .../src/api/cli/commands/table.ts | 22 - .../src/api/cli/commands/trigger.ts | 22 - .../src/api/cli/commands/unique-constraint.ts | 22 - .../src/api/cli/commands/view.ts | 22 - sdk/constructive-cli/src/api/orm/README.md | 131 +- .../src/api/orm/input-types.ts | 333 +- sdk/constructive-cli/src/auth/README.md | 4 +- sdk/constructive-cli/src/auth/cli/README.md | 192 +- sdk/constructive-cli/src/auth/cli/commands.ts | 22 +- .../auth/cli/commands/create-org-api-key.ts | 51 + .../auth/cli/commands/create-org-principal.ts | 53 + .../auth/cli/commands/delete-org-principal.ts | 53 + .../src/auth/cli/commands/org-api-key-list.ts | 248 + .../src/auth/cli/commands/principal-entity.ts | 303 ++ .../cli/commands/principal-scope-override.ts | 203 + .../src/auth/cli/commands/principal.ts | 274 ++ .../auth/cli/commands/revoke-org-api-key.ts | 51 + sdk/constructive-cli/src/auth/orm/README.md | 225 +- sdk/constructive-cli/src/auth/orm/index.ts | 8 + .../src/auth/orm/input-types.ts | 1079 ++++- .../src/auth/orm/models/index.ts | 4 + .../src/auth/orm/models/orgApiKeyList.ts | 174 + .../src/auth/orm/models/principal.ts | 208 + .../src/auth/orm/models/principalEntity.ts | 245 + .../auth/orm/models/principalScopeOverride.ts | 176 + .../src/auth/orm/mutation/index.ts | 140 + .../src/auth/orm/query/index.ts | 24 +- sdk/constructive-cli/src/compute/README.md | 2 +- .../src/compute/cli/README.md | 222 +- .../src/compute/cli/commands.ts | 18 +- .../cli/commands/function-graph-execution.ts | 22 - .../compute/cli/commands/function-graph.ts | 20 - .../cli/commands/platform-namespace-event.ts | 539 +++ .../cli/commands/platform-namespace.ts | 457 ++ .../compute/cli/commands/resource-event.ts | 377 ++ .../src/compute/cli/commands/resource.ts | 538 +++ .../src/compute/orm/README.md | 237 +- sdk/constructive-cli/src/compute/orm/index.ts | 12 +- .../src/compute/orm/input-types.ts | 1539 ++++++- .../src/compute/orm/models/index.ts | 6 +- .../compute/orm/models/platformNamespace.ts | 245 + .../orm/models/platformNamespaceEvent.ts | 252 ++ .../src/compute/orm/models/resource.ts | 245 + .../src/compute/orm/models/resourceEvent.ts | 250 ++ .../src/compute/orm/mutation/index.ts | 70 +- sdk/constructive-cli/src/modules/README.md | 2 +- .../src/modules/cli/README.md | 222 +- .../src/modules/cli/commands.ts | 14 +- .../cli/commands/merkle-store-module.ts | 22 + .../cli/commands/principal-auth-module.ts | 611 +++ .../modules/cli/commands/resource-module.ts | 625 +++ .../src/modules/orm/README.md | 242 +- sdk/constructive-cli/src/modules/orm/index.ts | 12 +- .../src/modules/orm/input-types.ts | 1568 ++++--- .../src/modules/orm/models/index.ts | 6 +- .../modules/orm/models/principalAuthModule.ts | 245 + .../src/modules/orm/models/resourceModule.ts | 245 + .../src/api/hooks/README.md | 108 +- sdk/constructive-react/src/api/orm/README.md | 131 +- .../src/api/orm/input-types.ts | 333 +- .../src/api/schema-types.ts | 1368 +++--- sdk/constructive-react/src/api/types.ts | 23 +- sdk/constructive-react/src/auth/README.md | 4 +- .../src/auth/hooks/README.md | 162 +- .../src/auth/hooks/index.ts | 2 +- .../src/auth/hooks/invalidation.ts | 101 + .../src/auth/hooks/mutation-keys.ts | 58 + .../src/auth/hooks/mutations/index.ts | 11 + .../useCreateOrgApiKeyListMutation.ts | 88 + .../mutations/useCreateOrgApiKeyMutation.ts | 55 + .../useCreateOrgPrincipalMutation.ts | 58 + .../useCreatePrincipalEntityMutation.ts | 91 + .../mutations/useCreatePrincipalMutation.ts | 88 + ...useCreatePrincipalScopeOverrideMutation.ts | 91 + .../useDeleteOrgPrincipalMutation.ts | 58 + .../useDeletePrincipalEntityMutation.ts | 98 + .../mutations/useDeletePrincipalMutation.ts | 98 + .../mutations/useRevokeOrgApiKeyMutation.ts | 55 + .../useUpdatePrincipalEntityMutation.ts | 116 + .../src/auth/hooks/queries/index.ts | 10 +- .../hooks/queries/useOrgApiKeyListQuery.ts | 138 + .../hooks/queries/useOrgApiKeyListsQuery.ts | 151 + .../queries/usePrincipalEntitiesQuery.ts | 163 + .../hooks/queries/usePrincipalEntityQuery.ts | 138 + .../auth/hooks/queries/usePrincipalQuery.ts | 138 + .../queries/usePrincipalScopeOverrideQuery.ts | 146 + .../usePrincipalScopeOverridesQuery.ts | 180 + .../auth/hooks/queries/usePrincipalsQuery.ts | 145 + .../src/auth/hooks/query-keys.ts | 42 +- sdk/constructive-react/src/auth/orm/README.md | 225 +- sdk/constructive-react/src/auth/orm/index.ts | 8 + .../src/auth/orm/input-types.ts | 1079 ++++- .../src/auth/orm/models/index.ts | 4 + .../src/auth/orm/models/orgApiKeyList.ts | 174 + .../src/auth/orm/models/principal.ts | 208 + .../src/auth/orm/models/principalEntity.ts | 245 + .../auth/orm/models/principalScopeOverride.ts | 176 + .../src/auth/orm/mutation/index.ts | 140 + .../src/auth/orm/query/index.ts | 24 +- .../src/auth/schema-types.ts | 652 ++- sdk/constructive-react/src/auth/types.ts | 43 + sdk/constructive-react/src/compute/README.md | 2 +- .../src/compute/hooks/README.md | 160 +- .../src/compute/hooks/index.ts | 2 +- .../src/compute/hooks/invalidation.ts | 118 +- .../src/compute/hooks/mutation-keys.ts | 68 +- .../src/compute/hooks/mutations/index.ts | 20 +- ...useCreatePlatformNamespaceEventMutation.ts | 91 + .../useCreatePlatformNamespaceMutation.ts | 91 + .../useCreateResourceEventMutation.ts | 88 + .../mutations/useCreateResourceMutation.ts | 88 + ...useDeletePlatformNamespaceEventMutation.ts | 108 + .../useDeletePlatformNamespaceMutation.ts | 104 + .../useDeleteResourceEventMutation.ts | 102 + .../mutations/useDeleteResourceMutation.ts | 98 + ...useUpdatePlatformNamespaceEventMutation.ts | 122 + .../useUpdatePlatformNamespaceMutation.ts | 116 + .../useUpdateResourceEventMutation.ts | 122 + .../mutations/useUpdateResourceMutation.ts | 102 + .../src/compute/hooks/queries/index.ts | 12 +- .../queries/usePlatformNamespaceEventQuery.ts | 146 + .../usePlatformNamespaceEventsQuery.ts | 180 + .../queries/usePlatformNamespaceQuery.ts | 144 + .../queries/usePlatformNamespacesQuery.ts | 163 + .../hooks/queries/useResourceEventQuery.ts | 138 + .../hooks/queries/useResourceEventsQuery.ts | 151 + .../compute/hooks/queries/useResourceQuery.ts | 138 + .../hooks/queries/useResourcesQuery.ts | 145 + .../src/compute/hooks/query-keys.ts | 54 +- .../src/compute/orm/README.md | 237 +- .../src/compute/orm/index.ts | 12 +- .../src/compute/orm/input-types.ts | 1539 ++++++- .../src/compute/orm/models/index.ts | 6 +- .../compute/orm/models/platformNamespace.ts | 245 + .../orm/models/platformNamespaceEvent.ts | 252 ++ .../src/compute/orm/models/resource.ts | 245 + .../src/compute/orm/models/resourceEvent.ts | 250 ++ .../src/compute/orm/mutation/index.ts | 70 +- .../src/compute/schema-types.ts | 1000 ++++- sdk/constructive-react/src/compute/types.ts | 83 +- sdk/constructive-react/src/modules/README.md | 2 +- .../src/modules/hooks/README.md | 152 +- .../src/modules/hooks/index.ts | 2 +- .../src/modules/hooks/invalidation.ts | 128 +- .../src/modules/hooks/mutation-keys.ts | 60 +- .../src/modules/hooks/mutations/index.ts | 18 +- .../useCreatePrincipalAuthModuleMutation.ts | 91 + .../useCreateResourceModuleMutation.ts | 91 + .../useDeletePrincipalAuthModuleMutation.ts | 104 + .../useDeleteResourceModuleMutation.ts | 98 + .../useUpdatePrincipalAuthModuleMutation.ts | 116 + .../useUpdateResourceModuleMutation.ts | 116 + .../src/modules/hooks/queries/index.ts | 12 +- .../queries/usePrincipalAuthModuleQuery.ts | 144 + .../queries/usePrincipalAuthModulesQuery.ts | 174 + .../hooks/queries/useResourceModuleQuery.ts | 138 + .../hooks/queries/useResourceModulesQuery.ts | 159 + .../src/modules/hooks/query-keys.ts | 60 +- .../src/modules/orm/README.md | 242 +- .../src/modules/orm/index.ts | 12 +- .../src/modules/orm/input-types.ts | 1568 ++++--- .../src/modules/orm/models/index.ts | 6 +- .../modules/orm/models/principalAuthModule.ts | 245 + .../src/modules/orm/models/resourceModule.ts | 245 + .../src/modules/schema-types.ts | 838 +++- sdk/constructive-react/src/modules/types.ts | 108 +- sdk/constructive-sdk/schemas/api.graphql | 4000 +++++++++-------- sdk/constructive-sdk/schemas/auth.graphql | 2073 +++++++-- sdk/constructive-sdk/schemas/compute.graphql | 2391 ++++++++-- sdk/constructive-sdk/schemas/modules.graphql | 2184 ++++++--- sdk/constructive-sdk/src/api/orm/README.md | 131 +- .../src/api/orm/input-types.ts | 333 +- sdk/constructive-sdk/src/auth/README.md | 4 +- sdk/constructive-sdk/src/auth/orm/README.md | 225 +- sdk/constructive-sdk/src/auth/orm/index.ts | 8 + .../src/auth/orm/input-types.ts | 1079 ++++- .../src/auth/orm/models/index.ts | 4 + .../src/auth/orm/models/orgApiKeyList.ts | 174 + .../src/auth/orm/models/principal.ts | 208 + .../src/auth/orm/models/principalEntity.ts | 245 + .../auth/orm/models/principalScopeOverride.ts | 176 + .../src/auth/orm/mutation/index.ts | 140 + .../src/auth/orm/query/index.ts | 24 +- sdk/constructive-sdk/src/compute/README.md | 2 +- .../src/compute/orm/README.md | 237 +- sdk/constructive-sdk/src/compute/orm/index.ts | 12 +- .../src/compute/orm/input-types.ts | 1539 ++++++- .../src/compute/orm/models/index.ts | 6 +- .../compute/orm/models/platformNamespace.ts | 245 + .../orm/models/platformNamespaceEvent.ts | 252 ++ .../src/compute/orm/models/resource.ts | 245 + .../src/compute/orm/models/resourceEvent.ts | 250 ++ .../src/compute/orm/mutation/index.ts | 70 +- sdk/constructive-sdk/src/modules/README.md | 2 +- .../src/modules/orm/README.md | 242 +- sdk/constructive-sdk/src/modules/orm/index.ts | 12 +- .../src/modules/orm/input-types.ts | 1568 ++++--- .../src/modules/orm/models/index.ts | 6 +- .../modules/orm/models/principalAuthModule.ts | 245 + .../src/modules/orm/models/resourceModule.ts | 245 + 333 files changed, 43958 insertions(+), 9537 deletions(-) create mode 100644 .agents/skills/cli-auth/references/create-org-api-key.md create mode 100644 .agents/skills/cli-auth/references/create-org-principal.md create mode 100644 .agents/skills/cli-auth/references/delete-org-principal.md create mode 100644 .agents/skills/cli-auth/references/org-api-key-list.md create mode 100644 .agents/skills/cli-auth/references/principal-entity.md create mode 100644 .agents/skills/cli-auth/references/principal-scope-override.md create mode 100644 .agents/skills/cli-auth/references/principal.md create mode 100644 .agents/skills/cli-auth/references/revoke-org-api-key.md create mode 100644 .agents/skills/cli-compute/references/platform-namespace-event.md create mode 100644 .agents/skills/cli-compute/references/platform-namespace.md create mode 100644 .agents/skills/cli-compute/references/resource-event.md create mode 100644 .agents/skills/cli-compute/references/resource.md create mode 100644 .agents/skills/cli-modules/references/principal-auth-module.md create mode 100644 .agents/skills/cli-modules/references/resource-module.md create mode 100644 .agents/skills/hooks-auth/references/create-org-api-key.md create mode 100644 .agents/skills/hooks-auth/references/create-org-principal.md create mode 100644 .agents/skills/hooks-auth/references/delete-org-principal.md create mode 100644 .agents/skills/hooks-auth/references/org-api-key-list.md create mode 100644 .agents/skills/hooks-auth/references/principal-entity.md create mode 100644 .agents/skills/hooks-auth/references/principal-scope-override.md create mode 100644 .agents/skills/hooks-auth/references/principal.md create mode 100644 .agents/skills/hooks-auth/references/revoke-org-api-key.md create mode 100644 .agents/skills/hooks-compute/references/platform-namespace-event.md create mode 100644 .agents/skills/hooks-compute/references/platform-namespace.md create mode 100644 .agents/skills/hooks-compute/references/resource-event.md create mode 100644 .agents/skills/hooks-compute/references/resource.md create mode 100644 .agents/skills/hooks-modules/references/principal-auth-module.md create mode 100644 .agents/skills/hooks-modules/references/resource-module.md create mode 100644 .agents/skills/orm-auth/references/create-org-api-key.md create mode 100644 .agents/skills/orm-auth/references/create-org-principal.md create mode 100644 .agents/skills/orm-auth/references/delete-org-principal.md create mode 100644 .agents/skills/orm-auth/references/org-api-key-list.md create mode 100644 .agents/skills/orm-auth/references/principal-entity.md create mode 100644 .agents/skills/orm-auth/references/principal-scope-override.md create mode 100644 .agents/skills/orm-auth/references/principal.md create mode 100644 .agents/skills/orm-auth/references/revoke-org-api-key.md create mode 100644 .agents/skills/orm-compute/references/platform-namespace-event.md create mode 100644 .agents/skills/orm-compute/references/platform-namespace.md create mode 100644 .agents/skills/orm-compute/references/resource-event.md create mode 100644 .agents/skills/orm-compute/references/resource.md create mode 100644 .agents/skills/orm-modules/references/principal-auth-module.md create mode 100644 .agents/skills/orm-modules/references/resource-module.md create mode 100644 sdk/constructive-cli/src/auth/cli/commands/create-org-api-key.ts create mode 100644 sdk/constructive-cli/src/auth/cli/commands/create-org-principal.ts create mode 100644 sdk/constructive-cli/src/auth/cli/commands/delete-org-principal.ts create mode 100644 sdk/constructive-cli/src/auth/cli/commands/org-api-key-list.ts create mode 100644 sdk/constructive-cli/src/auth/cli/commands/principal-entity.ts create mode 100644 sdk/constructive-cli/src/auth/cli/commands/principal-scope-override.ts create mode 100644 sdk/constructive-cli/src/auth/cli/commands/principal.ts create mode 100644 sdk/constructive-cli/src/auth/cli/commands/revoke-org-api-key.ts create mode 100644 sdk/constructive-cli/src/auth/orm/models/orgApiKeyList.ts create mode 100644 sdk/constructive-cli/src/auth/orm/models/principal.ts create mode 100644 sdk/constructive-cli/src/auth/orm/models/principalEntity.ts create mode 100644 sdk/constructive-cli/src/auth/orm/models/principalScopeOverride.ts create mode 100644 sdk/constructive-cli/src/compute/cli/commands/platform-namespace-event.ts create mode 100644 sdk/constructive-cli/src/compute/cli/commands/platform-namespace.ts create mode 100644 sdk/constructive-cli/src/compute/cli/commands/resource-event.ts create mode 100644 sdk/constructive-cli/src/compute/cli/commands/resource.ts create mode 100644 sdk/constructive-cli/src/compute/orm/models/platformNamespace.ts create mode 100644 sdk/constructive-cli/src/compute/orm/models/platformNamespaceEvent.ts create mode 100644 sdk/constructive-cli/src/compute/orm/models/resource.ts create mode 100644 sdk/constructive-cli/src/compute/orm/models/resourceEvent.ts create mode 100644 sdk/constructive-cli/src/modules/cli/commands/principal-auth-module.ts create mode 100644 sdk/constructive-cli/src/modules/cli/commands/resource-module.ts create mode 100644 sdk/constructive-cli/src/modules/orm/models/principalAuthModule.ts create mode 100644 sdk/constructive-cli/src/modules/orm/models/resourceModule.ts create mode 100644 sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgApiKeyListMutation.ts create mode 100644 sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgApiKeyMutation.ts create mode 100644 sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgPrincipalMutation.ts create mode 100644 sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalEntityMutation.ts create mode 100644 sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalMutation.ts create mode 100644 sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalScopeOverrideMutation.ts create mode 100644 sdk/constructive-react/src/auth/hooks/mutations/useDeleteOrgPrincipalMutation.ts create mode 100644 sdk/constructive-react/src/auth/hooks/mutations/useDeletePrincipalEntityMutation.ts create mode 100644 sdk/constructive-react/src/auth/hooks/mutations/useDeletePrincipalMutation.ts create mode 100644 sdk/constructive-react/src/auth/hooks/mutations/useRevokeOrgApiKeyMutation.ts create mode 100644 sdk/constructive-react/src/auth/hooks/mutations/useUpdatePrincipalEntityMutation.ts create mode 100644 sdk/constructive-react/src/auth/hooks/queries/useOrgApiKeyListQuery.ts create mode 100644 sdk/constructive-react/src/auth/hooks/queries/useOrgApiKeyListsQuery.ts create mode 100644 sdk/constructive-react/src/auth/hooks/queries/usePrincipalEntitiesQuery.ts create mode 100644 sdk/constructive-react/src/auth/hooks/queries/usePrincipalEntityQuery.ts create mode 100644 sdk/constructive-react/src/auth/hooks/queries/usePrincipalQuery.ts create mode 100644 sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverrideQuery.ts create mode 100644 sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverridesQuery.ts create mode 100644 sdk/constructive-react/src/auth/hooks/queries/usePrincipalsQuery.ts create mode 100644 sdk/constructive-react/src/auth/orm/models/orgApiKeyList.ts create mode 100644 sdk/constructive-react/src/auth/orm/models/principal.ts create mode 100644 sdk/constructive-react/src/auth/orm/models/principalEntity.ts create mode 100644 sdk/constructive-react/src/auth/orm/models/principalScopeOverride.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformNamespaceEventMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformNamespaceMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useCreateResourceEventMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useCreateResourceMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformNamespaceEventMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformNamespaceMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useDeleteResourceEventMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useDeleteResourceMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformNamespaceEventMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformNamespaceMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useUpdateResourceEventMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/mutations/useUpdateResourceMutation.ts create mode 100644 sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceEventQuery.ts create mode 100644 sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceEventsQuery.ts create mode 100644 sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceQuery.ts create mode 100644 sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespacesQuery.ts create mode 100644 sdk/constructive-react/src/compute/hooks/queries/useResourceEventQuery.ts create mode 100644 sdk/constructive-react/src/compute/hooks/queries/useResourceEventsQuery.ts create mode 100644 sdk/constructive-react/src/compute/hooks/queries/useResourceQuery.ts create mode 100644 sdk/constructive-react/src/compute/hooks/queries/useResourcesQuery.ts create mode 100644 sdk/constructive-react/src/compute/orm/models/platformNamespace.ts create mode 100644 sdk/constructive-react/src/compute/orm/models/platformNamespaceEvent.ts create mode 100644 sdk/constructive-react/src/compute/orm/models/resource.ts create mode 100644 sdk/constructive-react/src/compute/orm/models/resourceEvent.ts create mode 100644 sdk/constructive-react/src/modules/hooks/mutations/useCreatePrincipalAuthModuleMutation.ts create mode 100644 sdk/constructive-react/src/modules/hooks/mutations/useCreateResourceModuleMutation.ts create mode 100644 sdk/constructive-react/src/modules/hooks/mutations/useDeletePrincipalAuthModuleMutation.ts create mode 100644 sdk/constructive-react/src/modules/hooks/mutations/useDeleteResourceModuleMutation.ts create mode 100644 sdk/constructive-react/src/modules/hooks/mutations/useUpdatePrincipalAuthModuleMutation.ts create mode 100644 sdk/constructive-react/src/modules/hooks/mutations/useUpdateResourceModuleMutation.ts create mode 100644 sdk/constructive-react/src/modules/hooks/queries/usePrincipalAuthModuleQuery.ts create mode 100644 sdk/constructive-react/src/modules/hooks/queries/usePrincipalAuthModulesQuery.ts create mode 100644 sdk/constructive-react/src/modules/hooks/queries/useResourceModuleQuery.ts create mode 100644 sdk/constructive-react/src/modules/hooks/queries/useResourceModulesQuery.ts create mode 100644 sdk/constructive-react/src/modules/orm/models/principalAuthModule.ts create mode 100644 sdk/constructive-react/src/modules/orm/models/resourceModule.ts create mode 100644 sdk/constructive-sdk/src/auth/orm/models/orgApiKeyList.ts create mode 100644 sdk/constructive-sdk/src/auth/orm/models/principal.ts create mode 100644 sdk/constructive-sdk/src/auth/orm/models/principalEntity.ts create mode 100644 sdk/constructive-sdk/src/auth/orm/models/principalScopeOverride.ts create mode 100644 sdk/constructive-sdk/src/compute/orm/models/platformNamespace.ts create mode 100644 sdk/constructive-sdk/src/compute/orm/models/platformNamespaceEvent.ts create mode 100644 sdk/constructive-sdk/src/compute/orm/models/resource.ts create mode 100644 sdk/constructive-sdk/src/compute/orm/models/resourceEvent.ts create mode 100644 sdk/constructive-sdk/src/modules/orm/models/principalAuthModule.ts create mode 100644 sdk/constructive-sdk/src/modules/orm/models/resourceModule.ts diff --git a/.agents/skills/cli-api/references/api.md b/.agents/skills/cli-api/references/api.md index 2079938667..1b13a0e5d4 100644 --- a/.agents/skills/cli-api/references/api.md +++ b/.agents/skills/cli-api/references/api.md @@ -12,8 +12,8 @@ csdk api list --where.. --orderBy csdk api list --limit 10 --after csdk api find-first --where.. csdk api get --id -csdk api create --databaseId --name [--dbname ] [--roleName ] [--anonRole ] [--isPublic ] -csdk api update --id [--databaseId ] [--name ] [--dbname ] [--roleName ] [--anonRole ] [--isPublic ] +csdk api create --databaseId --name [--dbname ] [--roleName ] [--anonRole ] [--isPublic ] [--labels ] [--annotations ] +csdk api update --id [--databaseId ] [--name ] [--dbname ] [--roleName ] [--anonRole ] [--isPublic ] [--labels ] [--annotations ] csdk api delete --id ``` @@ -58,7 +58,7 @@ csdk api list --where.id.equalTo --orderBy ID_ASC ### Create a api ```bash -csdk api create --databaseId --name [--dbname ] [--roleName ] [--anonRole ] [--isPublic ] +csdk api create --databaseId --name [--dbname ] [--roleName ] [--anonRole ] [--isPublic ] [--labels ] [--annotations ] ``` ### Get a api by id diff --git a/.agents/skills/cli-api/references/check-constraint.md b/.agents/skills/cli-api/references/check-constraint.md index 41a04735ca..cdabb3e29f 100644 --- a/.agents/skills/cli-api/references/check-constraint.md +++ b/.agents/skills/cli-api/references/check-constraint.md @@ -12,8 +12,8 @@ csdk check-constraint list --where.. --orderBy csdk check-constraint list --limit 10 --after csdk check-constraint find-first --where.. csdk check-constraint get --id -csdk check-constraint create --tableId --fieldIds [--databaseId ] [--name ] [--type ] [--expr ] [--smartTags ] [--category ] [--scope ] [--tags ] -csdk check-constraint update --id [--databaseId ] [--tableId ] [--name ] [--type ] [--fieldIds ] [--expr ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk check-constraint create --tableId --fieldIds [--databaseId ] [--name ] [--type ] [--expr ] [--smartTags ] [--category ] [--tags ] +csdk check-constraint update --id [--databaseId ] [--tableId ] [--name ] [--type ] [--fieldIds ] [--expr ] [--smartTags ] [--category ] [--tags ] csdk check-constraint delete --id ``` @@ -58,7 +58,7 @@ csdk check-constraint list --where.id.equalTo --orderBy ID_ASC ### Create a checkConstraint ```bash -csdk check-constraint create --tableId --fieldIds [--databaseId ] [--name ] [--type ] [--expr ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk check-constraint create --tableId --fieldIds [--databaseId ] [--name ] [--type ] [--expr ] [--smartTags ] [--category ] [--tags ] ``` ### Get a checkConstraint by id diff --git a/.agents/skills/cli-api/references/composite-type.md b/.agents/skills/cli-api/references/composite-type.md index 8dcf4b7d2a..b6c13ab4e8 100644 --- a/.agents/skills/cli-api/references/composite-type.md +++ b/.agents/skills/cli-api/references/composite-type.md @@ -12,8 +12,8 @@ csdk composite-type list --where.. --orderBy csdk composite-type list --limit 10 --after csdk composite-type find-first --where.. csdk composite-type get --id -csdk composite-type create --databaseId --schemaId --name [--label ] [--description ] [--attributes ] [--smartTags ] [--category ] [--scope ] [--tags ] -csdk composite-type update --id [--databaseId ] [--schemaId ] [--name ] [--label ] [--description ] [--attributes ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk composite-type create --databaseId --schemaId --name [--label ] [--description ] [--attributes ] [--smartTags ] [--category ] [--tags ] +csdk composite-type update --id [--databaseId ] [--schemaId ] [--name ] [--label ] [--description ] [--attributes ] [--smartTags ] [--category ] [--tags ] csdk composite-type delete --id ``` @@ -58,7 +58,7 @@ csdk composite-type list --where.id.equalTo --orderBy ID_ASC ### Create a compositeType ```bash -csdk composite-type create --databaseId --schemaId --name [--label ] [--description ] [--attributes ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk composite-type create --databaseId --schemaId --name [--label ] [--description ] [--attributes ] [--smartTags ] [--category ] [--tags ] ``` ### Get a compositeType by id diff --git a/.agents/skills/cli-api/references/database-setting.md b/.agents/skills/cli-api/references/database-setting.md index fc02e75b15..59fb397938 100644 --- a/.agents/skills/cli-api/references/database-setting.md +++ b/.agents/skills/cli-api/references/database-setting.md @@ -12,8 +12,8 @@ csdk database-setting list --where.. --orderBy csdk database-setting list --limit 10 --after csdk database-setting find-first --where.. csdk database-setting get --id -csdk database-setting create --databaseId [--enableAggregates ] [--enablePostgis ] [--enableSearch ] [--enableDirectUploads ] [--enablePresignedUploads ] [--enableManyToMany ] [--enableConnectionFilter ] [--enableLtree ] [--enableLlm ] [--enableRealtime ] [--enableBulk ] [--enableI18N ] [--options ] -csdk database-setting update --id [--databaseId ] [--enableAggregates ] [--enablePostgis ] [--enableSearch ] [--enableDirectUploads ] [--enablePresignedUploads ] [--enableManyToMany ] [--enableConnectionFilter ] [--enableLtree ] [--enableLlm ] [--enableRealtime ] [--enableBulk ] [--enableI18N ] [--options ] +csdk database-setting create --databaseId [--enableAggregates ] [--enablePostgis ] [--enableSearch ] [--enableDirectUploads ] [--enablePresignedUploads ] [--enableManyToMany ] [--enableConnectionFilter ] [--enableLtree ] [--enableLlm ] [--enableRealtime ] [--enableBulk ] [--enableI18N ] [--options ] [--labels ] [--annotations ] +csdk database-setting update --id [--databaseId ] [--enableAggregates ] [--enablePostgis ] [--enableSearch ] [--enableDirectUploads ] [--enablePresignedUploads ] [--enableManyToMany ] [--enableConnectionFilter ] [--enableLtree ] [--enableLlm ] [--enableRealtime ] [--enableBulk ] [--enableI18N ] [--options ] [--labels ] [--annotations ] csdk database-setting delete --id ``` @@ -58,7 +58,7 @@ csdk database-setting list --where.id.equalTo --orderBy ID_ASC ### Create a databaseSetting ```bash -csdk database-setting create --databaseId [--enableAggregates ] [--enablePostgis ] [--enableSearch ] [--enableDirectUploads ] [--enablePresignedUploads ] [--enableManyToMany ] [--enableConnectionFilter ] [--enableLtree ] [--enableLlm ] [--enableRealtime ] [--enableBulk ] [--enableI18N ] [--options ] +csdk database-setting create --databaseId [--enableAggregates ] [--enablePostgis ] [--enableSearch ] [--enableDirectUploads ] [--enablePresignedUploads ] [--enableManyToMany ] [--enableConnectionFilter ] [--enableLtree ] [--enableLlm ] [--enableRealtime ] [--enableBulk ] [--enableI18N ] [--options ] [--labels ] [--annotations ] ``` ### Get a databaseSetting by id diff --git a/.agents/skills/cli-api/references/domain.md b/.agents/skills/cli-api/references/domain.md index b48978a13b..bc52d59820 100644 --- a/.agents/skills/cli-api/references/domain.md +++ b/.agents/skills/cli-api/references/domain.md @@ -12,8 +12,8 @@ csdk domain list --where.. --orderBy csdk domain list --limit 10 --after csdk domain find-first --where.. csdk domain get --id -csdk domain create --databaseId [--apiId ] [--siteId ] [--subdomain ] [--domain ] -csdk domain update --id [--databaseId ] [--apiId ] [--siteId ] [--subdomain ] [--domain ] +csdk domain create --databaseId [--apiId ] [--siteId ] [--serviceId ] [--subdomain ] [--domain ] [--labels ] [--annotations ] +csdk domain update --id [--databaseId ] [--apiId ] [--siteId ] [--serviceId ] [--subdomain ] [--domain ] [--labels ] [--annotations ] csdk domain delete --id ``` @@ -58,7 +58,7 @@ csdk domain list --where.id.equalTo --orderBy ID_ASC ### Create a domain ```bash -csdk domain create --databaseId [--apiId ] [--siteId ] [--subdomain ] [--domain ] +csdk domain create --databaseId [--apiId ] [--siteId ] [--serviceId ] [--subdomain ] [--domain ] [--labels ] [--annotations ] ``` ### Get a domain by id diff --git a/.agents/skills/cli-api/references/enum.md b/.agents/skills/cli-api/references/enum.md index 4f0b94633e..31782d9f31 100644 --- a/.agents/skills/cli-api/references/enum.md +++ b/.agents/skills/cli-api/references/enum.md @@ -12,8 +12,8 @@ csdk enum list --where.. --orderBy csdk enum list --limit 10 --after csdk enum find-first --where.. csdk enum get --id -csdk enum create --databaseId --schemaId --name [--label ] [--description ] [--values ] [--smartTags ] [--category ] [--scope ] [--tags ] -csdk enum update --id [--databaseId ] [--schemaId ] [--name ] [--label ] [--description ] [--values ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk enum create --databaseId --schemaId --name [--label ] [--description ] [--values ] [--smartTags ] [--category ] [--tags ] +csdk enum update --id [--databaseId ] [--schemaId ] [--name ] [--label ] [--description ] [--values ] [--smartTags ] [--category ] [--tags ] csdk enum delete --id ``` @@ -58,7 +58,7 @@ csdk enum list --where.id.equalTo --orderBy ID_ASC ### Create a enum ```bash -csdk enum create --databaseId --schemaId --name [--label ] [--description ] [--values ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk enum create --databaseId --schemaId --name [--label ] [--description ] [--values ] [--smartTags ] [--category ] [--tags ] ``` ### Get a enum by id diff --git a/.agents/skills/cli-api/references/field.md b/.agents/skills/cli-api/references/field.md index 1e3a705e81..4f4c26945c 100644 --- a/.agents/skills/cli-api/references/field.md +++ b/.agents/skills/cli-api/references/field.md @@ -12,8 +12,8 @@ csdk field list --where.. --orderBy csdk field list --limit 10 --after csdk field find-first --where.. csdk field get --id -csdk field create --tableId --name --type [--databaseId ] [--label ] [--description ] [--smartTags ] [--isRequired ] [--apiRequired ] [--defaultValue ] [--fieldOrder ] [--regexp ] [--chk ] [--chkExpr ] [--min ] [--max ] [--tags ] [--category ] [--scope ] -csdk field update --id [--databaseId ] [--tableId ] [--name ] [--label ] [--description ] [--smartTags ] [--isRequired ] [--apiRequired ] [--defaultValue ] [--type ] [--fieldOrder ] [--regexp ] [--chk ] [--chkExpr ] [--min ] [--max ] [--tags ] [--category ] [--scope ] +csdk field create --tableId --name --type [--databaseId ] [--label ] [--description ] [--smartTags ] [--isRequired ] [--apiRequired ] [--defaultValue ] [--fieldOrder ] [--regexp ] [--chk ] [--chkExpr ] [--min ] [--max ] [--tags ] [--category ] +csdk field update --id [--databaseId ] [--tableId ] [--name ] [--label ] [--description ] [--smartTags ] [--isRequired ] [--apiRequired ] [--defaultValue ] [--type ] [--fieldOrder ] [--regexp ] [--chk ] [--chkExpr ] [--min ] [--max ] [--tags ] [--category ] csdk field delete --id ``` @@ -58,7 +58,7 @@ csdk field list --where.id.equalTo --orderBy ID_ASC ### Create a field ```bash -csdk field create --tableId --name --type [--databaseId ] [--label ] [--description ] [--smartTags ] [--isRequired ] [--apiRequired ] [--defaultValue ] [--fieldOrder ] [--regexp ] [--chk ] [--chkExpr ] [--min ] [--max ] [--tags ] [--category ] [--scope ] +csdk field create --tableId --name --type [--databaseId ] [--label ] [--description ] [--smartTags ] [--isRequired ] [--apiRequired ] [--defaultValue ] [--fieldOrder ] [--regexp ] [--chk ] [--chkExpr ] [--min ] [--max ] [--tags ] [--category ] ``` ### Get a field by id diff --git a/.agents/skills/cli-api/references/foreign-key-constraint.md b/.agents/skills/cli-api/references/foreign-key-constraint.md index 7fb2e4cc8f..cffbcc98af 100644 --- a/.agents/skills/cli-api/references/foreign-key-constraint.md +++ b/.agents/skills/cli-api/references/foreign-key-constraint.md @@ -12,8 +12,8 @@ csdk foreign-key-constraint list --where.. --orderBy csdk foreign-key-constraint list --limit 10 --after csdk foreign-key-constraint find-first --where.. csdk foreign-key-constraint get --id -csdk foreign-key-constraint create --tableId --fieldIds --refTableId --refFieldIds [--databaseId ] [--name ] [--description ] [--smartTags ] [--type ] [--deleteAction ] [--updateAction ] [--category ] [--scope ] [--tags ] -csdk foreign-key-constraint update --id [--databaseId ] [--tableId ] [--name ] [--description ] [--smartTags ] [--type ] [--fieldIds ] [--refTableId ] [--refFieldIds ] [--deleteAction ] [--updateAction ] [--category ] [--scope ] [--tags ] +csdk foreign-key-constraint create --tableId --fieldIds --refTableId --refFieldIds [--databaseId ] [--name ] [--description ] [--smartTags ] [--type ] [--deleteAction ] [--updateAction ] [--category ] [--tags ] +csdk foreign-key-constraint update --id [--databaseId ] [--tableId ] [--name ] [--description ] [--smartTags ] [--type ] [--fieldIds ] [--refTableId ] [--refFieldIds ] [--deleteAction ] [--updateAction ] [--category ] [--tags ] csdk foreign-key-constraint delete --id ``` @@ -58,7 +58,7 @@ csdk foreign-key-constraint list --where.id.equalTo --orderBy ID_ASC ### Create a foreignKeyConstraint ```bash -csdk foreign-key-constraint create --tableId --fieldIds --refTableId --refFieldIds [--databaseId ] [--name ] [--description ] [--smartTags ] [--type ] [--deleteAction ] [--updateAction ] [--category ] [--scope ] [--tags ] +csdk foreign-key-constraint create --tableId --fieldIds --refTableId --refFieldIds [--databaseId ] [--name ] [--description ] [--smartTags ] [--type ] [--deleteAction ] [--updateAction ] [--category ] [--tags ] ``` ### Get a foreignKeyConstraint by id diff --git a/.agents/skills/cli-api/references/index.md b/.agents/skills/cli-api/references/index.md index ce157b0e24..11383ebc78 100644 --- a/.agents/skills/cli-api/references/index.md +++ b/.agents/skills/cli-api/references/index.md @@ -12,8 +12,8 @@ csdk index list --where.. --orderBy csdk index list --limit 10 --after csdk index find-first --where.. csdk index get --id -csdk index create --databaseId --tableId [--name ] [--fieldIds ] [--includeFieldIds ] [--accessMethod ] [--indexParams ] [--whereClause ] [--isUnique ] [--options ] [--opClasses ] [--smartTags ] [--category ] [--scope ] [--tags ] -csdk index update --id [--databaseId ] [--tableId ] [--name ] [--fieldIds ] [--includeFieldIds ] [--accessMethod ] [--indexParams ] [--whereClause ] [--isUnique ] [--options ] [--opClasses ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk index create --databaseId --tableId [--name ] [--fieldIds ] [--includeFieldIds ] [--accessMethod ] [--indexParams ] [--whereClause ] [--isUnique ] [--options ] [--opClasses ] [--smartTags ] [--category ] [--tags ] +csdk index update --id [--databaseId ] [--tableId ] [--name ] [--fieldIds ] [--includeFieldIds ] [--accessMethod ] [--indexParams ] [--whereClause ] [--isUnique ] [--options ] [--opClasses ] [--smartTags ] [--category ] [--tags ] csdk index delete --id ``` @@ -58,7 +58,7 @@ csdk index list --where.id.equalTo --orderBy ID_ASC ### Create a index ```bash -csdk index create --databaseId --tableId [--name ] [--fieldIds ] [--includeFieldIds ] [--accessMethod ] [--indexParams ] [--whereClause ] [--isUnique ] [--options ] [--opClasses ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk index create --databaseId --tableId [--name ] [--fieldIds ] [--includeFieldIds ] [--accessMethod ] [--indexParams ] [--whereClause ] [--isUnique ] [--options ] [--opClasses ] [--smartTags ] [--category ] [--tags ] ``` ### Get a index by id diff --git a/.agents/skills/cli-api/references/policy.md b/.agents/skills/cli-api/references/policy.md index c7055e9135..01617f1e66 100644 --- a/.agents/skills/cli-api/references/policy.md +++ b/.agents/skills/cli-api/references/policy.md @@ -12,8 +12,8 @@ csdk policy list --where.. --orderBy csdk policy list --limit 10 --after csdk policy find-first --where.. csdk policy get --id -csdk policy create --tableId [--databaseId ] [--name ] [--granteeName ] [--privilege ] [--permissive ] [--disabled ] [--policyType ] [--data ] [--smartTags ] [--category ] [--scope ] [--tags ] -csdk policy update --id [--databaseId ] [--tableId ] [--name ] [--granteeName ] [--privilege ] [--permissive ] [--disabled ] [--policyType ] [--data ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk policy create --tableId [--databaseId ] [--name ] [--granteeName ] [--privilege ] [--permissive ] [--disabled ] [--policyType ] [--data ] [--smartTags ] [--category ] [--tags ] +csdk policy update --id [--databaseId ] [--tableId ] [--name ] [--granteeName ] [--privilege ] [--permissive ] [--disabled ] [--policyType ] [--data ] [--smartTags ] [--category ] [--tags ] csdk policy delete --id ``` @@ -58,7 +58,7 @@ csdk policy list --where.id.equalTo --orderBy ID_ASC ### Create a policy ```bash -csdk policy create --tableId [--databaseId ] [--name ] [--granteeName ] [--privilege ] [--permissive ] [--disabled ] [--policyType ] [--data ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk policy create --tableId [--databaseId ] [--name ] [--granteeName ] [--privilege ] [--permissive ] [--disabled ] [--policyType ] [--data ] [--smartTags ] [--category ] [--tags ] ``` ### Get a policy by id diff --git a/.agents/skills/cli-api/references/primary-key-constraint.md b/.agents/skills/cli-api/references/primary-key-constraint.md index c59450af1d..2e51f7d160 100644 --- a/.agents/skills/cli-api/references/primary-key-constraint.md +++ b/.agents/skills/cli-api/references/primary-key-constraint.md @@ -12,8 +12,8 @@ csdk primary-key-constraint list --where.. --orderBy csdk primary-key-constraint list --limit 10 --after csdk primary-key-constraint find-first --where.. csdk primary-key-constraint get --id -csdk primary-key-constraint create --tableId --fieldIds [--databaseId ] [--name ] [--type ] [--smartTags ] [--category ] [--scope ] [--tags ] -csdk primary-key-constraint update --id [--databaseId ] [--tableId ] [--name ] [--type ] [--fieldIds ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk primary-key-constraint create --tableId --fieldIds [--databaseId ] [--name ] [--type ] [--smartTags ] [--category ] [--tags ] +csdk primary-key-constraint update --id [--databaseId ] [--tableId ] [--name ] [--type ] [--fieldIds ] [--smartTags ] [--category ] [--tags ] csdk primary-key-constraint delete --id ``` @@ -58,7 +58,7 @@ csdk primary-key-constraint list --where.id.equalTo --orderBy ID_ASC ### Create a primaryKeyConstraint ```bash -csdk primary-key-constraint create --tableId --fieldIds [--databaseId ] [--name ] [--type ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk primary-key-constraint create --tableId --fieldIds [--databaseId ] [--name ] [--type ] [--smartTags ] [--category ] [--tags ] ``` ### Get a primaryKeyConstraint by id diff --git a/.agents/skills/cli-api/references/schema.md b/.agents/skills/cli-api/references/schema.md index 5dedf082a3..5fd465a99f 100644 --- a/.agents/skills/cli-api/references/schema.md +++ b/.agents/skills/cli-api/references/schema.md @@ -12,8 +12,8 @@ csdk schema list --where.. --orderBy csdk schema list --limit 10 --after csdk schema find-first --where.. csdk schema get --id -csdk schema create --databaseId --name --schemaName [--label ] [--description ] [--smartTags ] [--category ] [--scope ] [--tags ] [--isPublic ] [--apiExposure ] -csdk schema update --id [--databaseId ] [--name ] [--schemaName ] [--label ] [--description ] [--smartTags ] [--category ] [--scope ] [--tags ] [--isPublic ] [--apiExposure ] +csdk schema create --databaseId --name --schemaName [--label ] [--description ] [--smartTags ] [--category ] [--tags ] [--isPublic ] [--apiExposure ] +csdk schema update --id [--databaseId ] [--name ] [--schemaName ] [--label ] [--description ] [--smartTags ] [--category ] [--tags ] [--isPublic ] [--apiExposure ] csdk schema delete --id ``` @@ -58,7 +58,7 @@ csdk schema list --where.id.equalTo --orderBy ID_ASC ### Create a schema ```bash -csdk schema create --databaseId --name --schemaName [--label ] [--description ] [--smartTags ] [--category ] [--scope ] [--tags ] [--isPublic ] [--apiExposure ] +csdk schema create --databaseId --name --schemaName [--label ] [--description ] [--smartTags ] [--category ] [--tags ] [--isPublic ] [--apiExposure ] ``` ### Get a schema by id diff --git a/.agents/skills/cli-api/references/site.md b/.agents/skills/cli-api/references/site.md index 922a98605d..acd55ea689 100644 --- a/.agents/skills/cli-api/references/site.md +++ b/.agents/skills/cli-api/references/site.md @@ -12,8 +12,8 @@ csdk site list --where.. --orderBy csdk site list --limit 10 --after csdk site find-first --where.. csdk site get --id -csdk site create --databaseId [--title ] [--description ] [--ogImage ] [--favicon ] [--appleTouchIcon ] [--logo ] [--dbname ] -csdk site update --id [--databaseId ] [--title ] [--description ] [--ogImage ] [--favicon ] [--appleTouchIcon ] [--logo ] [--dbname ] +csdk site create --databaseId [--title ] [--description ] [--ogImage ] [--favicon ] [--appleTouchIcon ] [--logo ] [--dbname ] [--labels ] [--annotations ] +csdk site update --id [--databaseId ] [--title ] [--description ] [--ogImage ] [--favicon ] [--appleTouchIcon ] [--logo ] [--dbname ] [--labels ] [--annotations ] csdk site delete --id ``` @@ -58,7 +58,7 @@ csdk site list --where.id.equalTo --orderBy ID_ASC ### Create a site ```bash -csdk site create --databaseId [--title ] [--description ] [--ogImage ] [--favicon ] [--appleTouchIcon ] [--logo ] [--dbname ] +csdk site create --databaseId [--title ] [--description ] [--ogImage ] [--favicon ] [--appleTouchIcon ] [--logo ] [--dbname ] [--labels ] [--annotations ] ``` ### Get a site by id diff --git a/.agents/skills/cli-api/references/spatial-relation.md b/.agents/skills/cli-api/references/spatial-relation.md index b7e3445647..24f6d04509 100644 --- a/.agents/skills/cli-api/references/spatial-relation.md +++ b/.agents/skills/cli-api/references/spatial-relation.md @@ -12,8 +12,8 @@ csdk spatial-relation list --where.. --orderBy csdk spatial-relation list --limit 10 --after csdk spatial-relation find-first --where.. csdk spatial-relation get --id -csdk spatial-relation create --tableId --fieldId --refTableId --refFieldId --name --operator [--databaseId ] [--paramName ] [--category ] [--scope ] [--tags ] -csdk spatial-relation update --id [--databaseId ] [--tableId ] [--fieldId ] [--refTableId ] [--refFieldId ] [--name ] [--operator ] [--paramName ] [--category ] [--scope ] [--tags ] +csdk spatial-relation create --tableId --fieldId --refTableId --refFieldId --name --operator [--databaseId ] [--paramName ] [--category ] [--tags ] +csdk spatial-relation update --id [--databaseId ] [--tableId ] [--fieldId ] [--refTableId ] [--refFieldId ] [--name ] [--operator ] [--paramName ] [--category ] [--tags ] csdk spatial-relation delete --id ``` @@ -58,7 +58,7 @@ csdk spatial-relation list --where.id.equalTo --orderBy ID_ASC ### Create a spatialRelation ```bash -csdk spatial-relation create --tableId --fieldId --refTableId --refFieldId --name --operator [--databaseId ] [--paramName ] [--category ] [--scope ] [--tags ] +csdk spatial-relation create --tableId --fieldId --refTableId --refFieldId --name --operator [--databaseId ] [--paramName ] [--category ] [--tags ] ``` ### Get a spatialRelation by id diff --git a/.agents/skills/cli-api/references/table.md b/.agents/skills/cli-api/references/table.md index d30c65ffb8..dbf4cba79a 100644 --- a/.agents/skills/cli-api/references/table.md +++ b/.agents/skills/cli-api/references/table.md @@ -12,8 +12,8 @@ csdk table list --where.. --orderBy csdk table list --limit 10 --after csdk table find-first --where.. csdk table get --id -csdk table create --schemaId --name [--databaseId ] [--label ] [--description ] [--smartTags ] [--category ] [--scope ] [--useRls ] [--timestamps ] [--peoplestamps ] [--pluralName ] [--singularName ] [--tags ] [--partitioned ] [--partitionStrategy ] [--partitionKeyNames ] [--partitionKeyTypes ] [--inheritsId ] -csdk table update --id [--databaseId ] [--schemaId ] [--name ] [--label ] [--description ] [--smartTags ] [--category ] [--scope ] [--useRls ] [--timestamps ] [--peoplestamps ] [--pluralName ] [--singularName ] [--tags ] [--partitioned ] [--partitionStrategy ] [--partitionKeyNames ] [--partitionKeyTypes ] [--inheritsId ] +csdk table create --schemaId --name [--databaseId ] [--label ] [--description ] [--smartTags ] [--category ] [--useRls ] [--timestamps ] [--peoplestamps ] [--pluralName ] [--singularName ] [--tags ] [--partitioned ] [--partitionStrategy ] [--partitionKeyNames ] [--partitionKeyTypes ] [--inheritsId ] +csdk table update --id [--databaseId ] [--schemaId ] [--name ] [--label ] [--description ] [--smartTags ] [--category ] [--useRls ] [--timestamps ] [--peoplestamps ] [--pluralName ] [--singularName ] [--tags ] [--partitioned ] [--partitionStrategy ] [--partitionKeyNames ] [--partitionKeyTypes ] [--inheritsId ] csdk table delete --id ``` @@ -58,7 +58,7 @@ csdk table list --where.id.equalTo --orderBy ID_ASC ### Create a table ```bash -csdk table create --schemaId --name [--databaseId ] [--label ] [--description ] [--smartTags ] [--category ] [--scope ] [--useRls ] [--timestamps ] [--peoplestamps ] [--pluralName ] [--singularName ] [--tags ] [--partitioned ] [--partitionStrategy ] [--partitionKeyNames ] [--partitionKeyTypes ] [--inheritsId ] +csdk table create --schemaId --name [--databaseId ] [--label ] [--description ] [--smartTags ] [--category ] [--useRls ] [--timestamps ] [--peoplestamps ] [--pluralName ] [--singularName ] [--tags ] [--partitioned ] [--partitionStrategy ] [--partitionKeyNames ] [--partitionKeyTypes ] [--inheritsId ] ``` ### Get a table by id diff --git a/.agents/skills/cli-api/references/trigger.md b/.agents/skills/cli-api/references/trigger.md index 81e79f3280..bce9304a34 100644 --- a/.agents/skills/cli-api/references/trigger.md +++ b/.agents/skills/cli-api/references/trigger.md @@ -12,8 +12,8 @@ csdk trigger list --where.. --orderBy csdk trigger list --limit 10 --after csdk trigger find-first --where.. csdk trigger get --id -csdk trigger create --tableId --name [--databaseId ] [--event ] [--functionName ] [--smartTags ] [--category ] [--scope ] [--tags ] -csdk trigger update --id [--databaseId ] [--tableId ] [--name ] [--event ] [--functionName ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk trigger create --tableId --name [--databaseId ] [--event ] [--functionName ] [--smartTags ] [--category ] [--tags ] +csdk trigger update --id [--databaseId ] [--tableId ] [--name ] [--event ] [--functionName ] [--smartTags ] [--category ] [--tags ] csdk trigger delete --id ``` @@ -58,7 +58,7 @@ csdk trigger list --where.id.equalTo --orderBy ID_ASC ### Create a trigger ```bash -csdk trigger create --tableId --name [--databaseId ] [--event ] [--functionName ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk trigger create --tableId --name [--databaseId ] [--event ] [--functionName ] [--smartTags ] [--category ] [--tags ] ``` ### Get a trigger by id diff --git a/.agents/skills/cli-api/references/unique-constraint.md b/.agents/skills/cli-api/references/unique-constraint.md index b16b518998..0595fd43f0 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 --tableId --fieldIds [--databaseId ] [--name ] [--description ] [--smartTags ] [--type ] [--category ] [--scope ] [--tags ] -csdk unique-constraint update --id [--databaseId ] [--tableId ] [--name ] [--description ] [--smartTags ] [--type ] [--fieldIds ] [--category ] [--scope ] [--tags ] +csdk unique-constraint create --tableId --fieldIds [--databaseId ] [--name ] [--description ] [--smartTags ] [--type ] [--category ] [--tags ] +csdk unique-constraint update --id [--databaseId ] [--tableId ] [--name ] [--description ] [--smartTags ] [--type ] [--fieldIds ] [--category ] [--tags ] 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 --tableId --fieldIds [--databaseId ] [--name ] [--description ] [--smartTags ] [--type ] [--category ] [--scope ] [--tags ] +csdk unique-constraint create --tableId --fieldIds [--databaseId ] [--name ] [--description ] [--smartTags ] [--type ] [--category ] [--tags ] ``` ### Get a uniqueConstraint by id diff --git a/.agents/skills/cli-api/references/view.md b/.agents/skills/cli-api/references/view.md index 84589ff8fe..b0958a243d 100644 --- a/.agents/skills/cli-api/references/view.md +++ b/.agents/skills/cli-api/references/view.md @@ -12,8 +12,8 @@ csdk view list --where.. --orderBy csdk view list --limit 10 --after csdk view find-first --where.. csdk view get --id -csdk view create --schemaId --name --viewType [--databaseId ] [--tableId ] [--data ] [--filterType ] [--filterData ] [--securityInvoker ] [--isReadOnly ] [--smartTags ] [--category ] [--scope ] [--tags ] -csdk view update --id [--databaseId ] [--schemaId ] [--name ] [--tableId ] [--viewType ] [--data ] [--filterType ] [--filterData ] [--securityInvoker ] [--isReadOnly ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk view create --schemaId --name --viewType [--databaseId ] [--tableId ] [--data ] [--filterType ] [--filterData ] [--securityInvoker ] [--isReadOnly ] [--smartTags ] [--category ] [--tags ] +csdk view update --id [--databaseId ] [--schemaId ] [--name ] [--tableId ] [--viewType ] [--data ] [--filterType ] [--filterData ] [--securityInvoker ] [--isReadOnly ] [--smartTags ] [--category ] [--tags ] csdk view delete --id ``` @@ -58,7 +58,7 @@ csdk view list --where.id.equalTo --orderBy ID_ASC ### Create a view ```bash -csdk view create --schemaId --name --viewType [--databaseId ] [--tableId ] [--data ] [--filterType ] [--filterData ] [--securityInvoker ] [--isReadOnly ] [--smartTags ] [--category ] [--scope ] [--tags ] +csdk view create --schemaId --name --viewType [--databaseId ] [--tableId ] [--data ] [--filterType ] [--filterData ] [--securityInvoker ] [--isReadOnly ] [--smartTags ] [--category ] [--tags ] ``` ### Get a view by id diff --git a/.agents/skills/cli-auth/SKILL.md b/.agents/skills/cli-auth/SKILL.md index 5e6256b4ed..a734d7daff 100644 --- a/.agents/skills/cli-auth/SKILL.md +++ b/.agents/skills/cli-auth/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-auth -description: CLI tool (csdk) for the auth API — provides CRUD commands for 9 tables and 30 custom operations +description: CLI tool (csdk) for the auth API — provides CRUD commands for 13 tables and 34 custom operations --- # cli-auth -CLI tool (csdk) for the auth API — provides CRUD commands for 9 tables and 30 custom operations +CLI tool (csdk) for the auth API — provides CRUD commands for 13 tables and 34 custom operations ## Usage @@ -23,13 +23,13 @@ csdk auth set-token csdk config set csdk config get -# CRUD for any table (e.g. email) -csdk email list -csdk email get --id -csdk email create -- +# CRUD for any table (e.g. principal) +csdk principal list +csdk principal get --id +csdk principal create -- # Non-interactive mode (skip all prompts, use flags only) -csdk --no-tty email list +csdk --no-tty principal list ``` ## Examples @@ -40,13 +40,13 @@ csdk --no-tty email list csdk context create local --endpoint http://localhost:5000/graphql csdk context use local csdk auth set-token -csdk email list +csdk principal list ``` ### Non-interactive mode (for scripts and CI) ```bash -csdk --no-tty email create -- +csdk --no-tty principal create -- ``` ## References @@ -56,6 +56,9 @@ See the `references/` directory for detailed per-entity API documentation: - [context](references/context.md) - [auth](references/auth.md) - [config](references/config.md) +- [principal](references/principal.md) +- [principal-entity](references/principal-entity.md) +- [principal-scope-override](references/principal-scope-override.md) - [email](references/email.md) - [phone-number](references/phone-number.md) - [crypto-address](references/crypto-address.md) @@ -64,21 +67,24 @@ See the `references/` directory for detailed per-entity API documentation: - [identity-provider](references/identity-provider.md) - [role-type](references/role-type.md) - [user-connected-account](references/user-connected-account.md) +- [org-api-key-list](references/org-api-key-list.md) - [user](references/user.md) - [current-user-agent](references/current-user-agent.md) -- [current-ip-address](references/current-ip-address.md) - [current-user-id](references/current-user-id.md) +- [current-ip-address](references/current-ip-address.md) - [require-step-up](references/require-step-up.md) - [current-user](references/current-user.md) - [sign-out](references/sign-out.md) - [send-account-deletion-email](references/send-account-deletion-email.md) - [check-password](references/check-password.md) +- [delete-org-principal](references/delete-org-principal.md) - [disconnect-account](references/disconnect-account.md) - [revoke-api-key](references/revoke-api-key.md) - [revoke-session](references/revoke-session.md) - [verify-password](references/verify-password.md) - [verify-totp](references/verify-totp.md) - [confirm-delete-account](references/confirm-delete-account.md) +- [revoke-org-api-key](references/revoke-org-api-key.md) - [set-password](references/set-password.md) - [verify-email](references/verify-email.md) - [provision-new-user](references/provision-new-user.md) @@ -89,7 +95,9 @@ See the `references/` directory for detailed per-entity API documentation: - [sign-up](references/sign-up.md) - [sign-in](references/sign-in.md) - [link-identity](references/link-identity.md) +- [create-org-principal](references/create-org-principal.md) - [extend-token-expires](references/extend-token-expires.md) +- [create-org-api-key](references/create-org-api-key.md) - [create-api-key](references/create-api-key.md) - [request-cross-origin-token](references/request-cross-origin-token.md) - [forgot-password](references/forgot-password.md) diff --git a/.agents/skills/cli-auth/references/create-api-key.md b/.agents/skills/cli-auth/references/create-api-key.md index 64e63332bc..3a4d58eb50 100644 --- a/.agents/skills/cli-auth/references/create-api-key.md +++ b/.agents/skills/cli-auth/references/create-api-key.md @@ -7,7 +7,7 @@ Execute the createApiKey mutation ## Usage ```bash -csdk create-api-key --input.clientMutationId --input.keyName --input.accessLevel --input.mfaLevel --input.expiresIn +csdk create-api-key --input.clientMutationId --input.keyName --input.accessLevel --input.mfaLevel --input.expiresIn --input.principalId ``` ## Examples @@ -15,5 +15,5 @@ csdk create-api-key --input.clientMutationId --input.keyName - ### Run createApiKey ```bash -csdk create-api-key --input.clientMutationId --input.keyName --input.accessLevel --input.mfaLevel --input.expiresIn +csdk create-api-key --input.clientMutationId --input.keyName --input.accessLevel --input.mfaLevel --input.expiresIn --input.principalId ``` diff --git a/.agents/skills/cli-auth/references/create-org-api-key.md b/.agents/skills/cli-auth/references/create-org-api-key.md new file mode 100644 index 0000000000..b797b00a2f --- /dev/null +++ b/.agents/skills/cli-auth/references/create-org-api-key.md @@ -0,0 +1,19 @@ +# createOrgApiKey + + + +Execute the createOrgApiKey mutation + +## Usage + +```bash +csdk create-org-api-key --input.clientMutationId --input.orgId --input.principalId --input.keyName --input.accessLevel --input.mfaLevel --input.expiresIn +``` + +## Examples + +### Run createOrgApiKey + +```bash +csdk create-org-api-key --input.clientMutationId --input.orgId --input.principalId --input.keyName --input.accessLevel --input.mfaLevel --input.expiresIn +``` diff --git a/.agents/skills/cli-auth/references/create-org-principal.md b/.agents/skills/cli-auth/references/create-org-principal.md new file mode 100644 index 0000000000..f6f6d52944 --- /dev/null +++ b/.agents/skills/cli-auth/references/create-org-principal.md @@ -0,0 +1,19 @@ +# createOrgPrincipal + + + +Execute the createOrgPrincipal mutation + +## Usage + +```bash +csdk create-org-principal --input.clientMutationId --input.name --input.orgId --input.allowedMask --input.isReadOnly --input.bypassStepUp +``` + +## Examples + +### Run createOrgPrincipal + +```bash +csdk create-org-principal --input.clientMutationId --input.name --input.orgId --input.allowedMask --input.isReadOnly --input.bypassStepUp +``` diff --git a/.agents/skills/cli-auth/references/delete-org-principal.md b/.agents/skills/cli-auth/references/delete-org-principal.md new file mode 100644 index 0000000000..8734adcfb0 --- /dev/null +++ b/.agents/skills/cli-auth/references/delete-org-principal.md @@ -0,0 +1,19 @@ +# deleteOrgPrincipal + + + +Execute the deleteOrgPrincipal mutation + +## Usage + +```bash +csdk delete-org-principal --input.clientMutationId --input.principalId +``` + +## Examples + +### Run deleteOrgPrincipal + +```bash +csdk delete-org-principal --input.clientMutationId --input.principalId +``` diff --git a/.agents/skills/cli-auth/references/org-api-key-list.md b/.agents/skills/cli-auth/references/org-api-key-list.md new file mode 100644 index 0000000000..d5ec1acac2 --- /dev/null +++ b/.agents/skills/cli-auth/references/org-api-key-list.md @@ -0,0 +1,68 @@ +# orgApiKeyList + + + +CRUD operations for OrgApiKeyList records via csdk CLI + +## Usage + +```bash +csdk org-api-key-list list +csdk org-api-key-list list --where.. --orderBy +csdk org-api-key-list list --limit 10 --after +csdk org-api-key-list find-first --where.. +csdk org-api-key-list get --id +csdk org-api-key-list create [--keyId ] [--name ] [--principalId ] [--orgId ] [--expiresAt ] [--revokedAt ] [--lastUsedAt ] [--mfaLevel ] [--accessLevel ] +csdk org-api-key-list update --id [--keyId ] [--name ] [--principalId ] [--orgId ] [--expiresAt ] [--revokedAt ] [--lastUsedAt ] [--mfaLevel ] [--accessLevel ] +csdk org-api-key-list delete --id +``` + +## Examples + +### List orgApiKeyList records + +```bash +csdk org-api-key-list list +``` + +### List orgApiKeyList records with pagination + +```bash +csdk org-api-key-list list --limit 10 --offset 0 +``` + +### List orgApiKeyList records with cursor pagination + +```bash +csdk org-api-key-list list --limit 10 --after +``` + +### Find first matching orgApiKeyList + +```bash +csdk org-api-key-list find-first --where.id.equalTo +``` + +### List orgApiKeyList records with field selection + +```bash +csdk org-api-key-list list --select id,id +``` + +### List orgApiKeyList records with filtering and ordering + +```bash +csdk org-api-key-list list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a orgApiKeyList + +```bash +csdk org-api-key-list create [--keyId ] [--name ] [--principalId ] [--orgId ] [--expiresAt ] [--revokedAt ] [--lastUsedAt ] [--mfaLevel ] [--accessLevel ] +``` + +### Get a orgApiKeyList by id + +```bash +csdk org-api-key-list get --id +``` diff --git a/.agents/skills/cli-auth/references/principal-entity.md b/.agents/skills/cli-auth/references/principal-entity.md new file mode 100644 index 0000000000..a28c42b670 --- /dev/null +++ b/.agents/skills/cli-auth/references/principal-entity.md @@ -0,0 +1,68 @@ +# principalEntity + + + +CRUD operations for PrincipalEntity records via csdk CLI + +## Usage + +```bash +csdk principal-entity list +csdk principal-entity list --where.. --orderBy +csdk principal-entity list --limit 10 --after +csdk principal-entity find-first --where.. +csdk principal-entity get --id +csdk principal-entity create --principalId --entityId --ownerId +csdk principal-entity update --id [--principalId ] [--entityId ] [--ownerId ] +csdk principal-entity delete --id +``` + +## Examples + +### List principalEntity records + +```bash +csdk principal-entity list +``` + +### List principalEntity records with pagination + +```bash +csdk principal-entity list --limit 10 --offset 0 +``` + +### List principalEntity records with cursor pagination + +```bash +csdk principal-entity list --limit 10 --after +``` + +### Find first matching principalEntity + +```bash +csdk principal-entity find-first --where.id.equalTo +``` + +### List principalEntity records with field selection + +```bash +csdk principal-entity list --select id,id +``` + +### List principalEntity records with filtering and ordering + +```bash +csdk principal-entity list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a principalEntity + +```bash +csdk principal-entity create --principalId --entityId --ownerId +``` + +### Get a principalEntity by id + +```bash +csdk principal-entity get --id +``` diff --git a/.agents/skills/cli-auth/references/principal-scope-override.md b/.agents/skills/cli-auth/references/principal-scope-override.md new file mode 100644 index 0000000000..e58c3919b1 --- /dev/null +++ b/.agents/skills/cli-auth/references/principal-scope-override.md @@ -0,0 +1,68 @@ +# principalScopeOverride + + + +CRUD operations for PrincipalScopeOverride records via csdk CLI + +## Usage + +```bash +csdk principal-scope-override list +csdk principal-scope-override list --where.. --orderBy +csdk principal-scope-override list --limit 10 --after +csdk principal-scope-override find-first --where.. +csdk principal-scope-override get --id +csdk principal-scope-override create --principalId --membershipType --allowedMask --isAdmin --isReadOnly +csdk principal-scope-override update --id [--principalId ] [--membershipType ] [--allowedMask ] [--isAdmin ] [--isReadOnly ] +csdk principal-scope-override delete --id +``` + +## Examples + +### List principalScopeOverride records + +```bash +csdk principal-scope-override list +``` + +### List principalScopeOverride records with pagination + +```bash +csdk principal-scope-override list --limit 10 --offset 0 +``` + +### List principalScopeOverride records with cursor pagination + +```bash +csdk principal-scope-override list --limit 10 --after +``` + +### Find first matching principalScopeOverride + +```bash +csdk principal-scope-override find-first --where.id.equalTo +``` + +### List principalScopeOverride records with field selection + +```bash +csdk principal-scope-override list --select id,id +``` + +### List principalScopeOverride records with filtering and ordering + +```bash +csdk principal-scope-override list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a principalScopeOverride + +```bash +csdk principal-scope-override create --principalId --membershipType --allowedMask --isAdmin --isReadOnly +``` + +### Get a principalScopeOverride by id + +```bash +csdk principal-scope-override get --id +``` diff --git a/.agents/skills/cli-auth/references/principal.md b/.agents/skills/cli-auth/references/principal.md new file mode 100644 index 0000000000..9b67208a8f --- /dev/null +++ b/.agents/skills/cli-auth/references/principal.md @@ -0,0 +1,68 @@ +# principal + + + +CRUD operations for Principal records via csdk CLI + +## Usage + +```bash +csdk principal list +csdk principal list --where.. --orderBy +csdk principal list --limit 10 --after +csdk principal find-first --where.. +csdk principal get --principalId +csdk principal create --id --ownerId --userId --name --allowedMask --isReadOnly --bypassStepUp +csdk principal update --principalId [--id ] [--ownerId ] [--userId ] [--name ] [--allowedMask ] [--isReadOnly ] [--bypassStepUp ] +csdk principal delete --principalId +``` + +## Examples + +### List principal records + +```bash +csdk principal list +``` + +### List principal records with pagination + +```bash +csdk principal list --limit 10 --offset 0 +``` + +### List principal records with cursor pagination + +```bash +csdk principal list --limit 10 --after +``` + +### Find first matching principal + +```bash +csdk principal find-first --where.principalId.equalTo +``` + +### List principal records with field selection + +```bash +csdk principal list --select id,principalId +``` + +### List principal records with filtering and ordering + +```bash +csdk principal list --where.principalId.equalTo --orderBy PRINCIPAL_ID_ASC +``` + +### Create a principal + +```bash +csdk principal create --id --ownerId --userId --name --allowedMask --isReadOnly --bypassStepUp +``` + +### Get a principal by principalId + +```bash +csdk principal get --principalId +``` diff --git a/.agents/skills/cli-auth/references/revoke-org-api-key.md b/.agents/skills/cli-auth/references/revoke-org-api-key.md new file mode 100644 index 0000000000..2e41bab8d6 --- /dev/null +++ b/.agents/skills/cli-auth/references/revoke-org-api-key.md @@ -0,0 +1,19 @@ +# revokeOrgApiKey + + + +Execute the revokeOrgApiKey mutation + +## Usage + +```bash +csdk revoke-org-api-key --input.clientMutationId --input.keyId --input.orgId +``` + +## Examples + +### Run revokeOrgApiKey + +```bash +csdk revoke-org-api-key --input.clientMutationId --input.keyId --input.orgId +``` diff --git a/.agents/skills/cli-compute/SKILL.md b/.agents/skills/cli-compute/SKILL.md index b46959280f..b588f09019 100644 --- a/.agents/skills/cli-compute/SKILL.md +++ b/.agents/skills/cli-compute/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-compute -description: CLI tool (csdk) for the compute API — provides CRUD commands for 18 tables and 15 custom operations +description: CLI tool (csdk) for the compute API — provides CRUD commands for 22 tables and 15 custom operations --- # cli-compute -CLI tool (csdk) for the compute API — provides CRUD commands for 18 tables and 15 custom operations +CLI tool (csdk) for the compute API — provides CRUD commands for 22 tables and 15 custom operations ## Usage @@ -59,19 +59,23 @@ See the `references/` directory for detailed per-entity API documentation: - [get-all-record](references/get-all-record.md) - [function-api-binding](references/function-api-binding.md) - [function-deployment](references/function-deployment.md) +- [resource](references/resource.md) - [function-graph-ref](references/function-graph-ref.md) - [function-graph-store](references/function-graph-store.md) - [function-graph-object](references/function-graph-object.md) - [function-deployment-event](references/function-deployment-event.md) - [org-function-execution-log](references/org-function-execution-log.md) +- [resource-event](references/resource-event.md) - [function-graph-execution-output](references/function-graph-execution-output.md) - [function-graph-commit](references/function-graph-commit.md) - [secret-definition](references/secret-definition.md) - [function-execution-log](references/function-execution-log.md) -- [function-graph-execution-node-state](references/function-graph-execution-node-state.md) - [function-graph](references/function-graph.md) +- [function-graph-execution-node-state](references/function-graph-execution-node-state.md) +- [platform-namespace](references/platform-namespace.md) - [org-function-invocation](references/org-function-invocation.md) - [function-invocation](references/function-invocation.md) +- [platform-namespace-event](references/platform-namespace-event.md) - [function-graph-execution](references/function-graph-execution.md) - [function-definition](references/function-definition.md) - [read-function-graph](references/read-function-graph.md) @@ -83,9 +87,9 @@ See the `references/` directory for detailed per-entity API documentation: - [save-graph](references/save-graph.md) - [add-edge-and-save](references/add-edge-and-save.md) - [add-node-and-save](references/add-node-and-save.md) +- [import-graph-json](references/import-graph-json.md) - [add-edge](references/add-edge.md) - [add-node](references/add-node.md) -- [import-graph-json](references/import-graph-json.md) - [insert-node-at-path](references/insert-node-at-path.md) - [start-execution](references/start-execution.md) - [provision-bucket](references/provision-bucket.md) diff --git a/.agents/skills/cli-compute/references/function-graph-execution.md b/.agents/skills/cli-compute/references/function-graph-execution.md index 95a185fd28..eba250196b 100644 --- a/.agents/skills/cli-compute/references/function-graph-execution.md +++ b/.agents/skills/cli-compute/references/function-graph-execution.md @@ -12,8 +12,8 @@ csdk function-graph-execution list --where.. --orderBy csdk function-graph-execution find-first --where.. csdk function-graph-execution get --id -csdk function-graph-execution create --graphId --databaseId --outputNode [--startedAt ] [--invocationId ] [--entityId ] [--outputPort ] [--status ] [--inputPayload ] [--outputPayload ] [--nodeOutputs ] [--executionPlan ] [--currentWave ] [--parentExecutionId ] [--parentNodeName ] [--definitionsCommitId ] [--tickCount ] [--completedAt ] [--maxTicks ] [--maxPendingJobs ] [--timeoutAt ] [--errorCode ] [--errorMessage ] -csdk function-graph-execution update --id [--startedAt ] [--graphId ] [--invocationId ] [--databaseId ] [--entityId ] [--outputNode ] [--outputPort ] [--status ] [--inputPayload ] [--outputPayload ] [--nodeOutputs ] [--executionPlan ] [--currentWave ] [--parentExecutionId ] [--parentNodeName ] [--definitionsCommitId ] [--tickCount ] [--completedAt ] [--maxTicks ] [--maxPendingJobs ] [--timeoutAt ] [--errorCode ] [--errorMessage ] +csdk function-graph-execution create --graphId --databaseId --outputNode [--startedAt ] [--invocationId ] [--outputPort ] [--status ] [--inputPayload ] [--outputPayload ] [--nodeOutputs ] [--executionPlan ] [--currentWave ] [--parentExecutionId ] [--parentNodeName ] [--definitionsCommitId ] [--tickCount ] [--completedAt ] [--maxTicks ] [--maxPendingJobs ] [--timeoutAt ] [--errorCode ] [--errorMessage ] +csdk function-graph-execution update --id [--startedAt ] [--graphId ] [--invocationId ] [--databaseId ] [--outputNode ] [--outputPort ] [--status ] [--inputPayload ] [--outputPayload ] [--nodeOutputs ] [--executionPlan ] [--currentWave ] [--parentExecutionId ] [--parentNodeName ] [--definitionsCommitId ] [--tickCount ] [--completedAt ] [--maxTicks ] [--maxPendingJobs ] [--timeoutAt ] [--errorCode ] [--errorMessage ] csdk function-graph-execution delete --id ``` @@ -58,7 +58,7 @@ csdk function-graph-execution list --where.id.equalTo --orderBy ID_ASC ### Create a functionGraphExecution ```bash -csdk function-graph-execution create --graphId --databaseId --outputNode [--startedAt ] [--invocationId ] [--entityId ] [--outputPort ] [--status ] [--inputPayload ] [--outputPayload ] [--nodeOutputs ] [--executionPlan ] [--currentWave ] [--parentExecutionId ] [--parentNodeName ] [--definitionsCommitId ] [--tickCount ] [--completedAt ] [--maxTicks ] [--maxPendingJobs ] [--timeoutAt ] [--errorCode ] [--errorMessage ] +csdk function-graph-execution create --graphId --databaseId --outputNode [--startedAt ] [--invocationId ] [--outputPort ] [--status ] [--inputPayload ] [--outputPayload ] [--nodeOutputs ] [--executionPlan ] [--currentWave ] [--parentExecutionId ] [--parentNodeName ] [--definitionsCommitId ] [--tickCount ] [--completedAt ] [--maxTicks ] [--maxPendingJobs ] [--timeoutAt ] [--errorCode ] [--errorMessage ] ``` ### Get a functionGraphExecution by id diff --git a/.agents/skills/cli-compute/references/function-graph.md b/.agents/skills/cli-compute/references/function-graph.md index 92e2ae6d3b..f3d01a4ac2 100644 --- a/.agents/skills/cli-compute/references/function-graph.md +++ b/.agents/skills/cli-compute/references/function-graph.md @@ -12,8 +12,8 @@ csdk function-graph list --where.. --orderBy csdk function-graph list --limit 10 --after csdk function-graph find-first --where.. csdk function-graph get --id -csdk function-graph create --databaseId --storeId --entityId --context --name --description --definitionsCommitId --isValid --validationErrors --createdBy -csdk function-graph update --id [--databaseId ] [--storeId ] [--entityId ] [--context ] [--name ] [--description ] [--definitionsCommitId ] [--isValid ] [--validationErrors ] [--createdBy ] +csdk function-graph create --databaseId --storeId --context --name --description --definitionsCommitId --isValid --validationErrors --createdBy +csdk function-graph update --id [--databaseId ] [--storeId ] [--context ] [--name ] [--description ] [--definitionsCommitId ] [--isValid ] [--validationErrors ] [--createdBy ] csdk function-graph delete --id ``` @@ -58,7 +58,7 @@ csdk function-graph list --where.id.equalTo --orderBy ID_ASC ### Create a functionGraph ```bash -csdk function-graph create --databaseId --storeId --entityId --context --name --description --definitionsCommitId --isValid --validationErrors --createdBy +csdk function-graph create --databaseId --storeId --context --name --description --definitionsCommitId --isValid --validationErrors --createdBy ``` ### Get a functionGraph by id diff --git a/.agents/skills/cli-compute/references/import-graph-json.md b/.agents/skills/cli-compute/references/import-graph-json.md index 8b5ccdb8b5..6fd69cdc6c 100644 --- a/.agents/skills/cli-compute/references/import-graph-json.md +++ b/.agents/skills/cli-compute/references/import-graph-json.md @@ -7,7 +7,7 @@ Execute the importGraphJson mutation ## Usage ```bash -csdk import-graph-json --input.clientMutationId --input.databaseId --input.name --input.graphJson --input.context --input.description --input.entityId --input.createdBy --input.definitionsCommitId +csdk import-graph-json --input.clientMutationId --input.databaseId --input.name --input.graphJson --input.context --input.description --input.createdBy --input.definitionsCommitId ``` ## Examples @@ -15,5 +15,5 @@ csdk import-graph-json --input.clientMutationId --input.databaseId --input.databaseId --input.name --input.graphJson --input.context --input.description --input.entityId --input.createdBy --input.definitionsCommitId +csdk import-graph-json --input.clientMutationId --input.databaseId --input.name --input.graphJson --input.context --input.description --input.createdBy --input.definitionsCommitId ``` diff --git a/.agents/skills/cli-compute/references/platform-namespace-event.md b/.agents/skills/cli-compute/references/platform-namespace-event.md new file mode 100644 index 0000000000..d09ac8d2e0 --- /dev/null +++ b/.agents/skills/cli-compute/references/platform-namespace-event.md @@ -0,0 +1,68 @@ +# platformNamespaceEvent + + + +CRUD operations for PlatformNamespaceEvent records via csdk CLI + +## Usage + +```bash +csdk platform-namespace-event list +csdk platform-namespace-event list --where.. --orderBy +csdk platform-namespace-event list --limit 10 --after +csdk platform-namespace-event find-first --where.. +csdk platform-namespace-event get --id +csdk platform-namespace-event create --namespaceId --eventType --databaseId [--actorId ] [--message ] [--metadata ] [--cpuMillicores ] [--memoryBytes ] [--storageBytes ] [--networkIngressBytes ] [--networkEgressBytes ] [--podCount ] [--metrics ] +csdk platform-namespace-event update --id [--namespaceId ] [--eventType ] [--actorId ] [--message ] [--metadata ] [--cpuMillicores ] [--memoryBytes ] [--storageBytes ] [--networkIngressBytes ] [--networkEgressBytes ] [--podCount ] [--metrics ] [--databaseId ] +csdk platform-namespace-event delete --id +``` + +## Examples + +### List platformNamespaceEvent records + +```bash +csdk platform-namespace-event list +``` + +### List platformNamespaceEvent records with pagination + +```bash +csdk platform-namespace-event list --limit 10 --offset 0 +``` + +### List platformNamespaceEvent records with cursor pagination + +```bash +csdk platform-namespace-event list --limit 10 --after +``` + +### Find first matching platformNamespaceEvent + +```bash +csdk platform-namespace-event find-first --where.id.equalTo +``` + +### List platformNamespaceEvent records with field selection + +```bash +csdk platform-namespace-event list --select id,id +``` + +### List platformNamespaceEvent records with filtering and ordering + +```bash +csdk platform-namespace-event list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a platformNamespaceEvent + +```bash +csdk platform-namespace-event create --namespaceId --eventType --databaseId [--actorId ] [--message ] [--metadata ] [--cpuMillicores ] [--memoryBytes ] [--storageBytes ] [--networkIngressBytes ] [--networkEgressBytes ] [--podCount ] [--metrics ] +``` + +### Get a platformNamespaceEvent by id + +```bash +csdk platform-namespace-event get --id +``` diff --git a/.agents/skills/cli-compute/references/platform-namespace.md b/.agents/skills/cli-compute/references/platform-namespace.md new file mode 100644 index 0000000000..6ba3ebfd2e --- /dev/null +++ b/.agents/skills/cli-compute/references/platform-namespace.md @@ -0,0 +1,68 @@ +# platformNamespace + + + +CRUD operations for PlatformNamespace records via csdk CLI + +## Usage + +```bash +csdk platform-namespace list +csdk platform-namespace list --where.. --orderBy +csdk platform-namespace list --limit 10 --after +csdk platform-namespace find-first --where.. +csdk platform-namespace get --id +csdk platform-namespace create --name --namespaceName --databaseId [--description ] [--isActive ] [--labels ] [--annotations ] [--sourceDatabaseId ] [--sourceScope ] [--isManaged ] +csdk platform-namespace update --id [--name ] [--namespaceName ] [--description ] [--isActive ] [--labels ] [--annotations ] [--databaseId ] [--sourceDatabaseId ] [--sourceScope ] [--isManaged ] +csdk platform-namespace delete --id +``` + +## Examples + +### List platformNamespace records + +```bash +csdk platform-namespace list +``` + +### List platformNamespace records with pagination + +```bash +csdk platform-namespace list --limit 10 --offset 0 +``` + +### List platformNamespace records with cursor pagination + +```bash +csdk platform-namespace list --limit 10 --after +``` + +### Find first matching platformNamespace + +```bash +csdk platform-namespace find-first --where.id.equalTo +``` + +### List platformNamespace records with field selection + +```bash +csdk platform-namespace list --select id,id +``` + +### List platformNamespace records with filtering and ordering + +```bash +csdk platform-namespace list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a platformNamespace + +```bash +csdk platform-namespace create --name --namespaceName --databaseId [--description ] [--isActive ] [--labels ] [--annotations ] [--sourceDatabaseId ] [--sourceScope ] [--isManaged ] +``` + +### Get a platformNamespace by id + +```bash +csdk platform-namespace get --id +``` diff --git a/.agents/skills/cli-compute/references/resource-event.md b/.agents/skills/cli-compute/references/resource-event.md new file mode 100644 index 0000000000..6d7d800938 --- /dev/null +++ b/.agents/skills/cli-compute/references/resource-event.md @@ -0,0 +1,68 @@ +# resourceEvent + + + +CRUD operations for ResourceEvent records via csdk CLI + +## Usage + +```bash +csdk resource-event list +csdk resource-event list --where.. --orderBy +csdk resource-event list --limit 10 --after +csdk resource-event find-first --where.. +csdk resource-event get --id +csdk resource-event create --resourceId --eventType --databaseId [--actorId ] [--message ] [--metadata ] +csdk resource-event update --id [--resourceId ] [--eventType ] [--actorId ] [--message ] [--metadata ] [--databaseId ] +csdk resource-event delete --id +``` + +## Examples + +### List resourceEvent records + +```bash +csdk resource-event list +``` + +### List resourceEvent records with pagination + +```bash +csdk resource-event list --limit 10 --offset 0 +``` + +### List resourceEvent records with cursor pagination + +```bash +csdk resource-event list --limit 10 --after +``` + +### Find first matching resourceEvent + +```bash +csdk resource-event find-first --where.id.equalTo +``` + +### List resourceEvent records with field selection + +```bash +csdk resource-event list --select id,id +``` + +### List resourceEvent records with filtering and ordering + +```bash +csdk resource-event list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a resourceEvent + +```bash +csdk resource-event create --resourceId --eventType --databaseId [--actorId ] [--message ] [--metadata ] +``` + +### Get a resourceEvent by id + +```bash +csdk resource-event get --id +``` diff --git a/.agents/skills/cli-compute/references/resource.md b/.agents/skills/cli-compute/references/resource.md new file mode 100644 index 0000000000..4caaf2f192 --- /dev/null +++ b/.agents/skills/cli-compute/references/resource.md @@ -0,0 +1,68 @@ +# resource + + + +CRUD operations for Resource records via csdk CLI + +## Usage + +```bash +csdk resource list +csdk resource list --where.. --orderBy +csdk resource list --limit 10 --after +csdk resource find-first --where.. +csdk resource get --id +csdk resource create --namespaceId --kind --name --slug --databaseId [--createdBy ] [--updatedBy ] [--spec ] [--status ] [--statusObserved ] [--lastError ] [--errorCount ] [--labels ] [--annotations ] +csdk resource update --id [--createdBy ] [--updatedBy ] [--namespaceId ] [--kind ] [--name ] [--slug ] [--spec ] [--status ] [--statusObserved ] [--lastError ] [--errorCount ] [--labels ] [--annotations ] [--databaseId ] +csdk resource delete --id +``` + +## Examples + +### List resource records + +```bash +csdk resource list +``` + +### List resource records with pagination + +```bash +csdk resource list --limit 10 --offset 0 +``` + +### List resource records with cursor pagination + +```bash +csdk resource list --limit 10 --after +``` + +### Find first matching resource + +```bash +csdk resource find-first --where.id.equalTo +``` + +### List resource records with field selection + +```bash +csdk resource list --select id,id +``` + +### List resource records with filtering and ordering + +```bash +csdk resource list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a resource + +```bash +csdk resource create --namespaceId --kind --name --slug --databaseId [--createdBy ] [--updatedBy ] [--spec ] [--status ] [--statusObserved ] [--lastError ] [--errorCount ] [--labels ] [--annotations ] +``` + +### Get a resource by id + +```bash +csdk resource get --id +``` diff --git a/.agents/skills/cli-modules/SKILL.md b/.agents/skills/cli-modules/SKILL.md index 80381ca57a..847b40562c 100644 --- a/.agents/skills/cli-modules/SKILL.md +++ b/.agents/skills/cli-modules/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-modules -description: CLI tool (csdk) for the modules API — provides CRUD commands for 59 tables and 12 custom operations +description: CLI tool (csdk) for the modules API — provides CRUD commands for 61 tables and 12 custom operations --- # cli-modules -CLI tool (csdk) for the modules API — provides CRUD commands for 59 tables and 12 custom operations +CLI tool (csdk) for the modules API — provides CRUD commands for 61 tables and 12 custom operations ## Usage @@ -82,19 +82,21 @@ See the `references/` directory for detailed per-entity API documentation: - [crypto-auth-module](references/crypto-auth-module.md) - [sessions-module](references/sessions-module.md) - [secure-table-provision](references/secure-table-provision.md) -- [merkle-store-module](references/merkle-store-module.md) -- [graph-module](references/graph-module.md) - [database-provision-module](references/database-provision-module.md) - [config-secrets-module](references/config-secrets-module.md) +- [graph-module](references/graph-module.md) +- [merkle-store-module](references/merkle-store-module.md) - [rate-limit-meters-module](references/rate-limit-meters-module.md) - [realtime-module](references/realtime-module.md) - [webauthn-auth-module](references/webauthn-auth-module.md) - [function-invocation-module](references/function-invocation-module.md) - [function-module](references/function-module.md) - [invites-module](references/invites-module.md) +- [principal-auth-module](references/principal-auth-module.md) - [compute-log-module](references/compute-log-module.md) - [inference-log-module](references/inference-log-module.md) - [namespace-module](references/namespace-module.md) +- [resource-module](references/resource-module.md) - [storage-log-module](references/storage-log-module.md) - [transfer-log-module](references/transfer-log-module.md) - [function-deployment-module](references/function-deployment-module.md) diff --git a/.agents/skills/cli-modules/references/merkle-store-module.md b/.agents/skills/cli-modules/references/merkle-store-module.md index b74a9fc03a..18876bc5d6 100644 --- a/.agents/skills/cli-modules/references/merkle-store-module.md +++ b/.agents/skills/cli-modules/references/merkle-store-module.md @@ -12,8 +12,8 @@ csdk merkle-store-module list --where.. --orderBy csdk merkle-store-module list --limit 10 --after csdk merkle-store-module find-first --where.. csdk merkle-store-module get --id -csdk merkle-store-module create --databaseId [--schemaId ] [--privateSchemaId ] [--publicSchemaName ] [--privateSchemaName ] [--objectTableId ] [--storeTableId ] [--commitTableId ] [--refTableId ] [--prefix ] [--apiName ] [--privateApiName ] [--scope ] [--functionPrefix ] -csdk merkle-store-module update --id [--databaseId ] [--schemaId ] [--privateSchemaId ] [--publicSchemaName ] [--privateSchemaName ] [--objectTableId ] [--storeTableId ] [--commitTableId ] [--refTableId ] [--prefix ] [--apiName ] [--privateApiName ] [--scope ] [--functionPrefix ] +csdk merkle-store-module create --databaseId [--schemaId ] [--privateSchemaId ] [--publicSchemaName ] [--privateSchemaName ] [--objectTableId ] [--storeTableId ] [--commitTableId ] [--refTableId ] [--prefix ] [--apiName ] [--privateApiName ] [--scope ] [--functionPrefix ] [--permissionKey ] +csdk merkle-store-module update --id [--databaseId ] [--schemaId ] [--privateSchemaId ] [--publicSchemaName ] [--privateSchemaName ] [--objectTableId ] [--storeTableId ] [--commitTableId ] [--refTableId ] [--prefix ] [--apiName ] [--privateApiName ] [--scope ] [--functionPrefix ] [--permissionKey ] csdk merkle-store-module delete --id ``` @@ -58,7 +58,7 @@ csdk merkle-store-module list --where.id.equalTo --orderBy ID_ASC ### Create a merkleStoreModule ```bash -csdk merkle-store-module create --databaseId [--schemaId ] [--privateSchemaId ] [--publicSchemaName ] [--privateSchemaName ] [--objectTableId ] [--storeTableId ] [--commitTableId ] [--refTableId ] [--prefix ] [--apiName ] [--privateApiName ] [--scope ] [--functionPrefix ] +csdk merkle-store-module create --databaseId [--schemaId ] [--privateSchemaId ] [--publicSchemaName ] [--privateSchemaName ] [--objectTableId ] [--storeTableId ] [--commitTableId ] [--refTableId ] [--prefix ] [--apiName ] [--privateApiName ] [--scope ] [--functionPrefix ] [--permissionKey ] ``` ### Get a merkleStoreModule by id diff --git a/.agents/skills/cli-modules/references/principal-auth-module.md b/.agents/skills/cli-modules/references/principal-auth-module.md new file mode 100644 index 0000000000..201f3f2156 --- /dev/null +++ b/.agents/skills/cli-modules/references/principal-auth-module.md @@ -0,0 +1,68 @@ +# principalAuthModule + + + +CRUD operations for PrincipalAuthModule records via csdk CLI + +## Usage + +```bash +csdk principal-auth-module list +csdk principal-auth-module list --where.. --orderBy +csdk principal-auth-module list --limit 10 --after +csdk principal-auth-module find-first --where.. +csdk principal-auth-module get --id +csdk principal-auth-module create --databaseId [--schemaId ] [--principalsTableId ] [--principalEntitiesTableId ] [--principalScopeOverridesTableId ] [--usersTableId ] [--sessionsTableId ] [--sessionCredentialsTableId ] [--auditsTableId ] [--principalsTableName ] [--createPrincipalFunction ] [--deletePrincipalFunction ] [--createOrgPrincipalFunction ] [--deleteOrgPrincipalFunction ] [--createOrgApiKeyFunction ] [--revokeOrgApiKeyFunction ] [--apiName ] +csdk principal-auth-module update --id [--databaseId ] [--schemaId ] [--principalsTableId ] [--principalEntitiesTableId ] [--principalScopeOverridesTableId ] [--usersTableId ] [--sessionsTableId ] [--sessionCredentialsTableId ] [--auditsTableId ] [--principalsTableName ] [--createPrincipalFunction ] [--deletePrincipalFunction ] [--createOrgPrincipalFunction ] [--deleteOrgPrincipalFunction ] [--createOrgApiKeyFunction ] [--revokeOrgApiKeyFunction ] [--apiName ] +csdk principal-auth-module delete --id +``` + +## Examples + +### List principalAuthModule records + +```bash +csdk principal-auth-module list +``` + +### List principalAuthModule records with pagination + +```bash +csdk principal-auth-module list --limit 10 --offset 0 +``` + +### List principalAuthModule records with cursor pagination + +```bash +csdk principal-auth-module list --limit 10 --after +``` + +### Find first matching principalAuthModule + +```bash +csdk principal-auth-module find-first --where.id.equalTo +``` + +### List principalAuthModule records with field selection + +```bash +csdk principal-auth-module list --select id,id +``` + +### List principalAuthModule records with filtering and ordering + +```bash +csdk principal-auth-module list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a principalAuthModule + +```bash +csdk principal-auth-module create --databaseId [--schemaId ] [--principalsTableId ] [--principalEntitiesTableId ] [--principalScopeOverridesTableId ] [--usersTableId ] [--sessionsTableId ] [--sessionCredentialsTableId ] [--auditsTableId ] [--principalsTableName ] [--createPrincipalFunction ] [--deletePrincipalFunction ] [--createOrgPrincipalFunction ] [--deleteOrgPrincipalFunction ] [--createOrgApiKeyFunction ] [--revokeOrgApiKeyFunction ] [--apiName ] +``` + +### Get a principalAuthModule by id + +```bash +csdk principal-auth-module get --id +``` diff --git a/.agents/skills/cli-modules/references/resource-module.md b/.agents/skills/cli-modules/references/resource-module.md new file mode 100644 index 0000000000..2acbe1908d --- /dev/null +++ b/.agents/skills/cli-modules/references/resource-module.md @@ -0,0 +1,68 @@ +# resourceModule + + + +CRUD operations for ResourceModule records via csdk CLI + +## Usage + +```bash +csdk resource-module list +csdk resource-module list --where.. --orderBy +csdk resource-module list --limit 10 --after +csdk resource-module find-first --where.. +csdk resource-module get --id +csdk resource-module create --databaseId [--schemaId ] [--privateSchemaId ] [--publicSchemaName ] [--privateSchemaName ] [--resourcesTableId ] [--resourceEventsTableId ] [--resourcesTableName ] [--resourceEventsTableName ] [--apiName ] [--privateApiName ] [--scope ] [--prefix ] [--entityTableId ] [--namespaceModuleId ] [--policies ] [--provisions ] [--defaultPermissions ] +csdk resource-module update --id [--databaseId ] [--schemaId ] [--privateSchemaId ] [--publicSchemaName ] [--privateSchemaName ] [--resourcesTableId ] [--resourceEventsTableId ] [--resourcesTableName ] [--resourceEventsTableName ] [--apiName ] [--privateApiName ] [--scope ] [--prefix ] [--entityTableId ] [--namespaceModuleId ] [--policies ] [--provisions ] [--defaultPermissions ] +csdk resource-module delete --id +``` + +## Examples + +### List resourceModule records + +```bash +csdk resource-module list +``` + +### List resourceModule records with pagination + +```bash +csdk resource-module list --limit 10 --offset 0 +``` + +### List resourceModule records with cursor pagination + +```bash +csdk resource-module list --limit 10 --after +``` + +### Find first matching resourceModule + +```bash +csdk resource-module find-first --where.id.equalTo +``` + +### List resourceModule records with field selection + +```bash +csdk resource-module list --select id,id +``` + +### List resourceModule records with filtering and ordering + +```bash +csdk resource-module list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a resourceModule + +```bash +csdk resource-module create --databaseId [--schemaId ] [--privateSchemaId ] [--publicSchemaName ] [--privateSchemaName ] [--resourcesTableId ] [--resourceEventsTableId ] [--resourcesTableName ] [--resourceEventsTableName ] [--apiName ] [--privateApiName ] [--scope ] [--prefix ] [--entityTableId ] [--namespaceModuleId ] [--policies ] [--provisions ] [--defaultPermissions ] +``` + +### Get a resourceModule by id + +```bash +csdk resource-module get --id +``` diff --git a/.agents/skills/hooks-api/references/api.md b/.agents/skills/hooks-api/references/api.md index 9f88f46b0a..b4f2fa9d5f 100644 --- a/.agents/skills/hooks-api/references/api.md +++ b/.agents/skills/hooks-api/references/api.md @@ -7,8 +7,8 @@ API endpoint configurations: each record defines a PostGraphile/PostgREST API wi ## Usage ```typescript -useApisQuery({ selection: { fields: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true } } }) -useApiQuery({ id: '', selection: { fields: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true } } }) +useApisQuery({ selection: { fields: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true, labels: true, annotations: true } } }) +useApiQuery({ id: '', selection: { fields: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true, labels: true, annotations: true } } }) useCreateApiMutation({ selection: { fields: { id: true } } }) useUpdateApiMutation({ selection: { fields: { id: true } } }) useDeleteApiMutation({}) @@ -20,7 +20,7 @@ useDeleteApiMutation({}) ```typescript const { data, isLoading } = useApisQuery({ - selection: { fields: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true } }, + selection: { fields: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true, labels: true, annotations: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useApisQuery({ const { mutate } = useCreateApiMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '' }); +mutate({ databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '', labels: '', annotations: '' }); ``` diff --git a/.agents/skills/hooks-api/references/check-constraint.md b/.agents/skills/hooks-api/references/check-constraint.md index 7962fe3bd6..f7f99fa30a 100644 --- a/.agents/skills/hooks-api/references/check-constraint.md +++ b/.agents/skills/hooks-api/references/check-constraint.md @@ -7,8 +7,8 @@ React Query hooks for CheckConstraint data operations ## Usage ```typescript -useCheckConstraintsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) -useCheckConstraintQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) +useCheckConstraintsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) +useCheckConstraintQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) useCreateCheckConstraintMutation({ selection: { fields: { id: true } } }) useUpdateCheckConstraintMutation({ selection: { fields: { id: true } } }) useDeleteCheckConstraintMutation({}) @@ -20,7 +20,7 @@ useDeleteCheckConstraintMutation({}) ```typescript const { data, isLoading } = useCheckConstraintsQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useCheckConstraintsQuery({ const { mutate } = useCreateCheckConstraintMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', scope: '', tags: '' }); +mutate({ databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', tags: '' }); ``` diff --git a/.agents/skills/hooks-api/references/composite-type.md b/.agents/skills/hooks-api/references/composite-type.md index 2597ef3cc1..c3a82984d7 100644 --- a/.agents/skills/hooks-api/references/composite-type.md +++ b/.agents/skills/hooks-api/references/composite-type.md @@ -7,8 +7,8 @@ React Query hooks for CompositeType data operations ## Usage ```typescript -useCompositeTypesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, scope: true, tags: true } } }) -useCompositeTypeQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, scope: true, tags: true } } }) +useCompositeTypesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, tags: true } } }) +useCompositeTypeQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, tags: true } } }) useCreateCompositeTypeMutation({ selection: { fields: { id: true } } }) useUpdateCompositeTypeMutation({ selection: { fields: { id: true } } }) useDeleteCompositeTypeMutation({}) @@ -20,7 +20,7 @@ useDeleteCompositeTypeMutation({}) ```typescript const { data, isLoading } = useCompositeTypesQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, scope: true, tags: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, tags: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useCompositeTypesQuery({ const { mutate } = useCreateCompositeTypeMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', scope: '', tags: '' }); +mutate({ databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', tags: '' }); ``` diff --git a/.agents/skills/hooks-api/references/database-setting.md b/.agents/skills/hooks-api/references/database-setting.md index 60e0831b28..40e4715a1d 100644 --- a/.agents/skills/hooks-api/references/database-setting.md +++ b/.agents/skills/hooks-api/references/database-setting.md @@ -7,8 +7,8 @@ Database-wide feature flags and settings; controls which platform features are a ## Usage ```typescript -useDatabaseSettingsQuery({ selection: { fields: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true } } }) -useDatabaseSettingQuery({ id: '', selection: { fields: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true } } }) +useDatabaseSettingsQuery({ selection: { fields: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true, labels: true, annotations: true } } }) +useDatabaseSettingQuery({ id: '', selection: { fields: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true, labels: true, annotations: true } } }) useCreateDatabaseSettingMutation({ selection: { fields: { id: true } } }) useUpdateDatabaseSettingMutation({ selection: { fields: { id: true } } }) useDeleteDatabaseSettingMutation({}) @@ -20,7 +20,7 @@ useDeleteDatabaseSettingMutation({}) ```typescript const { data, isLoading } = useDatabaseSettingsQuery({ - selection: { fields: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true } }, + selection: { fields: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true, labels: true, annotations: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useDatabaseSettingsQuery({ const { mutate } = useCreateDatabaseSettingMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '' }); +mutate({ databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '', labels: '', annotations: '' }); ``` diff --git a/.agents/skills/hooks-api/references/domain.md b/.agents/skills/hooks-api/references/domain.md index 2d6cc26b9b..1f3cbcc617 100644 --- a/.agents/skills/hooks-api/references/domain.md +++ b/.agents/skills/hooks-api/references/domain.md @@ -7,8 +7,8 @@ DNS domain and subdomain routing: maps hostnames to either an API endpoint or a ## Usage ```typescript -useDomainsQuery({ selection: { fields: { id: true, databaseId: true, apiId: true, siteId: true, subdomain: true, domain: true } } }) -useDomainQuery({ id: '', selection: { fields: { id: true, databaseId: true, apiId: true, siteId: true, subdomain: true, domain: true } } }) +useDomainsQuery({ selection: { fields: { id: true, databaseId: true, apiId: true, siteId: true, serviceId: true, subdomain: true, domain: true, labels: true, annotations: true } } }) +useDomainQuery({ id: '', selection: { fields: { id: true, databaseId: true, apiId: true, siteId: true, serviceId: true, subdomain: true, domain: true, labels: true, annotations: true } } }) useCreateDomainMutation({ selection: { fields: { id: true } } }) useUpdateDomainMutation({ selection: { fields: { id: true } } }) useDeleteDomainMutation({}) @@ -20,7 +20,7 @@ useDeleteDomainMutation({}) ```typescript const { data, isLoading } = useDomainsQuery({ - selection: { fields: { id: true, databaseId: true, apiId: true, siteId: true, subdomain: true, domain: true } }, + selection: { fields: { id: true, databaseId: true, apiId: true, siteId: true, serviceId: true, subdomain: true, domain: true, labels: true, annotations: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useDomainsQuery({ const { mutate } = useCreateDomainMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', apiId: '', siteId: '', subdomain: '', domain: '' }); +mutate({ databaseId: '', apiId: '', siteId: '', serviceId: '', subdomain: '', domain: '', labels: '', annotations: '' }); ``` diff --git a/.agents/skills/hooks-api/references/enum.md b/.agents/skills/hooks-api/references/enum.md index f1f447ac30..de49455bae 100644 --- a/.agents/skills/hooks-api/references/enum.md +++ b/.agents/skills/hooks-api/references/enum.md @@ -7,8 +7,8 @@ React Query hooks for Enum data operations ## Usage ```typescript -useEnumsQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, scope: true, tags: true } } }) -useEnumQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, scope: true, tags: true } } }) +useEnumsQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, tags: true } } }) +useEnumQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, tags: true } } }) useCreateEnumMutation({ selection: { fields: { id: true } } }) useUpdateEnumMutation({ selection: { fields: { id: true } } }) useDeleteEnumMutation({}) @@ -20,7 +20,7 @@ useDeleteEnumMutation({}) ```typescript const { data, isLoading } = useEnumsQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, scope: true, tags: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, tags: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useEnumsQuery({ const { mutate } = useCreateEnumMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', scope: '', tags: '' }); +mutate({ databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', tags: '' }); ``` diff --git a/.agents/skills/hooks-api/references/field.md b/.agents/skills/hooks-api/references/field.md index 520dfa6759..1027b5a7b5 100644 --- a/.agents/skills/hooks-api/references/field.md +++ b/.agents/skills/hooks-api/references/field.md @@ -7,8 +7,8 @@ React Query hooks for Field data operations ## Usage ```typescript -useFieldsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, scope: true, createdAt: true, updatedAt: true } } }) -useFieldQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, scope: true, createdAt: true, updatedAt: true } } }) +useFieldsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, createdAt: true, updatedAt: true } } }) +useFieldQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, createdAt: true, updatedAt: true } } }) useCreateFieldMutation({ selection: { fields: { id: true } } }) useUpdateFieldMutation({ selection: { fields: { id: true } } }) useDeleteFieldMutation({}) @@ -20,7 +20,7 @@ useDeleteFieldMutation({}) ```typescript const { data, isLoading } = useFieldsQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, scope: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, createdAt: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useFieldsQuery({ const { mutate } = useCreateFieldMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '', scope: '' }); +mutate({ databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '' }); ``` diff --git a/.agents/skills/hooks-api/references/foreign-key-constraint.md b/.agents/skills/hooks-api/references/foreign-key-constraint.md index 4bffb55fb9..6dc2fe1e4a 100644 --- a/.agents/skills/hooks-api/references/foreign-key-constraint.md +++ b/.agents/skills/hooks-api/references/foreign-key-constraint.md @@ -7,8 +7,8 @@ React Query hooks for ForeignKeyConstraint data operations ## Usage ```typescript -useForeignKeyConstraintsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) -useForeignKeyConstraintQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) +useForeignKeyConstraintsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) +useForeignKeyConstraintQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) useCreateForeignKeyConstraintMutation({ selection: { fields: { id: true } } }) useUpdateForeignKeyConstraintMutation({ selection: { fields: { id: true } } }) useDeleteForeignKeyConstraintMutation({}) @@ -20,7 +20,7 @@ useDeleteForeignKeyConstraintMutation({}) ```typescript const { data, isLoading } = useForeignKeyConstraintsQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useForeignKeyConstraintsQuery({ const { mutate } = useCreateForeignKeyConstraintMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', scope: '', tags: '' }); +mutate({ databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', tags: '' }); ``` diff --git a/.agents/skills/hooks-api/references/index.md b/.agents/skills/hooks-api/references/index.md index 42d9c3d517..a87cd2fd05 100644 --- a/.agents/skills/hooks-api/references/index.md +++ b/.agents/skills/hooks-api/references/index.md @@ -7,8 +7,8 @@ React Query hooks for Index data operations ## Usage ```typescript -useIndicesQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) -useIndexQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) +useIndicesQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) +useIndexQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) useCreateIndexMutation({ selection: { fields: { id: true } } }) useUpdateIndexMutation({ selection: { fields: { id: true } } }) useDeleteIndexMutation({}) @@ -20,7 +20,7 @@ useDeleteIndexMutation({}) ```typescript const { data, isLoading } = useIndicesQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useIndicesQuery({ const { mutate } = useCreateIndexMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', scope: '', tags: '' }); +mutate({ databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', tags: '' }); ``` diff --git a/.agents/skills/hooks-api/references/policy.md b/.agents/skills/hooks-api/references/policy.md index 160fda6637..49a2703319 100644 --- a/.agents/skills/hooks-api/references/policy.md +++ b/.agents/skills/hooks-api/references/policy.md @@ -7,8 +7,8 @@ React Query hooks for Policy data operations ## Usage ```typescript -usePoliciesQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) -usePolicyQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) +usePoliciesQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) +usePolicyQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) useCreatePolicyMutation({ selection: { fields: { id: true } } }) useUpdatePolicyMutation({ selection: { fields: { id: true } } }) useDeletePolicyMutation({}) @@ -20,7 +20,7 @@ useDeletePolicyMutation({}) ```typescript const { data, isLoading } = usePoliciesQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = usePoliciesQuery({ const { mutate } = useCreatePolicyMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', scope: '', tags: '' }); +mutate({ databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', tags: '' }); ``` diff --git a/.agents/skills/hooks-api/references/primary-key-constraint.md b/.agents/skills/hooks-api/references/primary-key-constraint.md index 87b2022c2b..5cb067c3c6 100644 --- a/.agents/skills/hooks-api/references/primary-key-constraint.md +++ b/.agents/skills/hooks-api/references/primary-key-constraint.md @@ -7,8 +7,8 @@ React Query hooks for PrimaryKeyConstraint data operations ## Usage ```typescript -usePrimaryKeyConstraintsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) -usePrimaryKeyConstraintQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) +usePrimaryKeyConstraintsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) +usePrimaryKeyConstraintQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) useCreatePrimaryKeyConstraintMutation({ selection: { fields: { id: true } } }) useUpdatePrimaryKeyConstraintMutation({ selection: { fields: { id: true } } }) useDeletePrimaryKeyConstraintMutation({}) @@ -20,7 +20,7 @@ useDeletePrimaryKeyConstraintMutation({}) ```typescript const { data, isLoading } = usePrimaryKeyConstraintsQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = usePrimaryKeyConstraintsQuery({ const { mutate } = useCreatePrimaryKeyConstraintMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', scope: '', tags: '' }); +mutate({ databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', tags: '' }); ``` diff --git a/.agents/skills/hooks-api/references/schema.md b/.agents/skills/hooks-api/references/schema.md index d1c3cd5417..2c5ac5d748 100644 --- a/.agents/skills/hooks-api/references/schema.md +++ b/.agents/skills/hooks-api/references/schema.md @@ -7,8 +7,8 @@ React Query hooks for Schema data operations ## Usage ```typescript -useSchemasQuery({ selection: { fields: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, scope: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } } }) -useSchemaQuery({ id: '', selection: { fields: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, scope: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } } }) +useSchemasQuery({ selection: { fields: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } } }) +useSchemaQuery({ id: '', selection: { fields: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } } }) useCreateSchemaMutation({ selection: { fields: { id: true } } }) useUpdateSchemaMutation({ selection: { fields: { id: true } } }) useDeleteSchemaMutation({}) @@ -20,7 +20,7 @@ useDeleteSchemaMutation({}) ```typescript const { data, isLoading } = useSchemasQuery({ - selection: { fields: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, scope: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useSchemasQuery({ const { mutate } = useCreateSchemaMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', scope: '', tags: '', isPublic: '', apiExposure: '' }); +mutate({ databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', tags: '', isPublic: '', apiExposure: '' }); ``` diff --git a/.agents/skills/hooks-api/references/site.md b/.agents/skills/hooks-api/references/site.md index 798f3150ad..375ba832d2 100644 --- a/.agents/skills/hooks-api/references/site.md +++ b/.agents/skills/hooks-api/references/site.md @@ -7,8 +7,8 @@ Top-level site configuration: branding assets, title, and description for a depl ## Usage ```typescript -useSitesQuery({ selection: { fields: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true } } }) -useSiteQuery({ id: '', selection: { fields: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true } } }) +useSitesQuery({ selection: { fields: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true, labels: true, annotations: true } } }) +useSiteQuery({ id: '', selection: { fields: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true, labels: true, annotations: true } } }) useCreateSiteMutation({ selection: { fields: { id: true } } }) useUpdateSiteMutation({ selection: { fields: { id: true } } }) useDeleteSiteMutation({}) @@ -20,7 +20,7 @@ useDeleteSiteMutation({}) ```typescript const { data, isLoading } = useSitesQuery({ - selection: { fields: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true } }, + selection: { fields: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true, labels: true, annotations: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useSitesQuery({ const { mutate } = useCreateSiteMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '' }); +mutate({ databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '', labels: '', annotations: '' }); ``` diff --git a/.agents/skills/hooks-api/references/spatial-relation.md b/.agents/skills/hooks-api/references/spatial-relation.md index 5fa5fa34ba..4c9ac4cdaa 100644 --- a/.agents/skills/hooks-api/references/spatial-relation.md +++ b/.agents/skills/hooks-api/references/spatial-relation.md @@ -7,8 +7,8 @@ React Query hooks for SpatialRelation data operations ## Usage ```typescript -useSpatialRelationsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) -useSpatialRelationQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) +useSpatialRelationsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) +useSpatialRelationQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) useCreateSpatialRelationMutation({ selection: { fields: { id: true } } }) useUpdateSpatialRelationMutation({ selection: { fields: { id: true } } }) useDeleteSpatialRelationMutation({}) @@ -20,7 +20,7 @@ useDeleteSpatialRelationMutation({}) ```typescript const { data, isLoading } = useSpatialRelationsQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useSpatialRelationsQuery({ const { mutate } = useCreateSpatialRelationMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', scope: '', tags: '' }); +mutate({ databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', tags: '' }); ``` diff --git a/.agents/skills/hooks-api/references/table.md b/.agents/skills/hooks-api/references/table.md index 7a243b6a12..9cd072d3a2 100644 --- a/.agents/skills/hooks-api/references/table.md +++ b/.agents/skills/hooks-api/references/table.md @@ -7,8 +7,8 @@ React Query hooks for Table data operations ## Usage ```typescript -useTablesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, scope: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } } }) -useTableQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, scope: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } } }) +useTablesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } } }) +useTableQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } } }) useCreateTableMutation({ selection: { fields: { id: true } } }) useUpdateTableMutation({ selection: { fields: { id: true } } }) useDeleteTableMutation({}) @@ -20,7 +20,7 @@ useDeleteTableMutation({}) ```typescript const { data, isLoading } = useTablesQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, scope: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useTablesQuery({ const { mutate } = useCreateTableMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', scope: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }); +mutate({ databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }); ``` diff --git a/.agents/skills/hooks-api/references/trigger.md b/.agents/skills/hooks-api/references/trigger.md index 861ac20239..bb0b68ebe7 100644 --- a/.agents/skills/hooks-api/references/trigger.md +++ b/.agents/skills/hooks-api/references/trigger.md @@ -7,8 +7,8 @@ React Query hooks for Trigger data operations ## Usage ```typescript -useTriggersQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) -useTriggerQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) +useTriggersQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) +useTriggerQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) useCreateTriggerMutation({ selection: { fields: { id: true } } }) useUpdateTriggerMutation({ selection: { fields: { id: true } } }) useDeleteTriggerMutation({}) @@ -20,7 +20,7 @@ useDeleteTriggerMutation({}) ```typescript const { data, isLoading } = useTriggersQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useTriggersQuery({ const { mutate } = useCreateTriggerMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', scope: '', tags: '' }); +mutate({ databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', tags: '' }); ``` diff --git a/.agents/skills/hooks-api/references/unique-constraint.md b/.agents/skills/hooks-api/references/unique-constraint.md index 3d8db0dde8..f85fb2d5cd 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: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) -useUniqueConstraintQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) +useUniqueConstraintsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) +useUniqueConstraintQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, tags: true, createdAt: true, updatedAt: true } } }) useCreateUniqueConstraintMutation({ selection: { fields: { id: true } } }) useUpdateUniqueConstraintMutation({ selection: { fields: { id: true } } }) useDeleteUniqueConstraintMutation({}) @@ -20,7 +20,7 @@ useDeleteUniqueConstraintMutation({}) ```typescript const { data, isLoading } = useUniqueConstraintsQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useUniqueConstraintsQuery({ const { mutate } = useCreateUniqueConstraintMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', scope: '', tags: '' }); +mutate({ databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', tags: '' }); ``` diff --git a/.agents/skills/hooks-api/references/view.md b/.agents/skills/hooks-api/references/view.md index e5add4af74..9d899d7219 100644 --- a/.agents/skills/hooks-api/references/view.md +++ b/.agents/skills/hooks-api/references/view.md @@ -7,8 +7,8 @@ React Query hooks for View data operations ## Usage ```typescript -useViewsQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, scope: true, tags: true } } }) -useViewQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, scope: true, tags: true } } }) +useViewsQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, tags: true } } }) +useViewQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, tags: true } } }) useCreateViewMutation({ selection: { fields: { id: true } } }) useUpdateViewMutation({ selection: { fields: { id: true } } }) useDeleteViewMutation({}) @@ -20,7 +20,7 @@ useDeleteViewMutation({}) ```typescript const { data, isLoading } = useViewsQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, scope: true, tags: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, tags: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useViewsQuery({ const { mutate } = useCreateViewMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', scope: '', tags: '' }); +mutate({ databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', tags: '' }); ``` diff --git a/.agents/skills/hooks-auth/SKILL.md b/.agents/skills/hooks-auth/SKILL.md index 740f8e251c..a315fb815b 100644 --- a/.agents/skills/hooks-auth/SKILL.md +++ b/.agents/skills/hooks-auth/SKILL.md @@ -1,25 +1,25 @@ --- name: hooks-auth -description: React Query hooks for the auth API — provides typed query and mutation hooks for 9 tables and 30 custom operations +description: React Query hooks for the auth API — provides typed query and mutation hooks for 13 tables and 34 custom operations --- # hooks-auth -React Query hooks for the auth API — provides typed query and mutation hooks for 9 tables and 30 custom operations +React Query hooks for the auth API — provides typed query and mutation hooks for 13 tables and 34 custom operations ## Usage ```typescript // Import hooks -import { useEmailsQuery } from './hooks'; +import { usePrincipalsQuery } from './hooks'; // Query hooks: useQuery, usesQuery // Mutation hooks: useCreateMutation, useUpdateMutation, useDeleteMutation // Bulk mutation hooks (when enabled): useBulkCreateMutation, useBulkUpsertMutation, etc. -const { data, isLoading } = useEmailsQuery({ +const { data, isLoading } = usePrincipalsQuery({ selection: { fields: { id: true } }, }); ``` @@ -29,7 +29,7 @@ const { data, isLoading } = useEmailsQuery({ ### Query records ```typescript -const { data, isLoading } = useEmailsQuery({ +const { data, isLoading } = usePrincipalsQuery({ selection: { fields: { id: true } }, }); ``` @@ -38,6 +38,9 @@ const { data, isLoading } = useEmailsQuery({ See the `references/` directory for detailed per-entity API documentation: +- [principal](references/principal.md) +- [principal-entity](references/principal-entity.md) +- [principal-scope-override](references/principal-scope-override.md) - [email](references/email.md) - [phone-number](references/phone-number.md) - [crypto-address](references/crypto-address.md) @@ -46,21 +49,24 @@ See the `references/` directory for detailed per-entity API documentation: - [identity-provider](references/identity-provider.md) - [role-type](references/role-type.md) - [user-connected-account](references/user-connected-account.md) +- [org-api-key-list](references/org-api-key-list.md) - [user](references/user.md) - [current-user-agent](references/current-user-agent.md) -- [current-ip-address](references/current-ip-address.md) - [current-user-id](references/current-user-id.md) +- [current-ip-address](references/current-ip-address.md) - [require-step-up](references/require-step-up.md) - [current-user](references/current-user.md) - [sign-out](references/sign-out.md) - [send-account-deletion-email](references/send-account-deletion-email.md) - [check-password](references/check-password.md) +- [delete-org-principal](references/delete-org-principal.md) - [disconnect-account](references/disconnect-account.md) - [revoke-api-key](references/revoke-api-key.md) - [revoke-session](references/revoke-session.md) - [verify-password](references/verify-password.md) - [verify-totp](references/verify-totp.md) - [confirm-delete-account](references/confirm-delete-account.md) +- [revoke-org-api-key](references/revoke-org-api-key.md) - [set-password](references/set-password.md) - [verify-email](references/verify-email.md) - [provision-new-user](references/provision-new-user.md) @@ -71,7 +77,9 @@ See the `references/` directory for detailed per-entity API documentation: - [sign-up](references/sign-up.md) - [sign-in](references/sign-in.md) - [link-identity](references/link-identity.md) +- [create-org-principal](references/create-org-principal.md) - [extend-token-expires](references/extend-token-expires.md) +- [create-org-api-key](references/create-org-api-key.md) - [create-api-key](references/create-api-key.md) - [request-cross-origin-token](references/request-cross-origin-token.md) - [forgot-password](references/forgot-password.md) diff --git a/.agents/skills/hooks-auth/references/create-api-key.md b/.agents/skills/hooks-auth/references/create-api-key.md index bf188b901d..d4e20423af 100644 --- a/.agents/skills/hooks-auth/references/create-api-key.md +++ b/.agents/skills/hooks-auth/references/create-api-key.md @@ -7,7 +7,7 @@ React Query mutation hook for createApiKey ## Usage ```typescript -const { mutate } = useCreateApiKeyMutation(); mutate({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '' } }); +const { mutate } = useCreateApiKeyMutation(); mutate({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '', principalId: '' } }); ``` ## Examples @@ -16,5 +16,5 @@ const { mutate } = useCreateApiKeyMutation(); mutate({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '' } }); +mutate({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '', principalId: '' } }); ``` diff --git a/.agents/skills/hooks-auth/references/create-org-api-key.md b/.agents/skills/hooks-auth/references/create-org-api-key.md new file mode 100644 index 0000000000..d110328621 --- /dev/null +++ b/.agents/skills/hooks-auth/references/create-org-api-key.md @@ -0,0 +1,20 @@ +# createOrgApiKey + + + +React Query mutation hook for createOrgApiKey + +## Usage + +```typescript +const { mutate } = useCreateOrgApiKeyMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useCreateOrgApiKeyMutation + +```typescript +const { mutate, isLoading } = useCreateOrgApiKeyMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-auth/references/create-org-principal.md b/.agents/skills/hooks-auth/references/create-org-principal.md new file mode 100644 index 0000000000..b8ab8fa0d2 --- /dev/null +++ b/.agents/skills/hooks-auth/references/create-org-principal.md @@ -0,0 +1,20 @@ +# createOrgPrincipal + + + +React Query mutation hook for createOrgPrincipal + +## Usage + +```typescript +const { mutate } = useCreateOrgPrincipalMutation(); mutate({ input: { name: '', orgId: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' } }); +``` + +## Examples + +### Use useCreateOrgPrincipalMutation + +```typescript +const { mutate, isLoading } = useCreateOrgPrincipalMutation(); +mutate({ input: { name: '', orgId: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/delete-org-principal.md b/.agents/skills/hooks-auth/references/delete-org-principal.md new file mode 100644 index 0000000000..8a91a2e023 --- /dev/null +++ b/.agents/skills/hooks-auth/references/delete-org-principal.md @@ -0,0 +1,20 @@ +# deleteOrgPrincipal + + + +React Query mutation hook for deleteOrgPrincipal + +## Usage + +```typescript +const { mutate } = useDeleteOrgPrincipalMutation(); mutate({ input: { principalId: '' } }); +``` + +## Examples + +### Use useDeleteOrgPrincipalMutation + +```typescript +const { mutate, isLoading } = useDeleteOrgPrincipalMutation(); +mutate({ input: { principalId: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/org-api-key-list.md b/.agents/skills/hooks-auth/references/org-api-key-list.md new file mode 100644 index 0000000000..b67f71261a --- /dev/null +++ b/.agents/skills/hooks-auth/references/org-api-key-list.md @@ -0,0 +1,34 @@ +# orgApiKeyList + + + +React Query hooks for OrgApiKeyList data operations + +## Usage + +```typescript +useOrgApiKeyListsQuery({ selection: { fields: { id: true, keyId: true, name: true, principalId: true, orgId: true, expiresAt: true, revokedAt: true, lastUsedAt: true, mfaLevel: true, accessLevel: true, createdAt: true, updatedAt: true } } }) +useOrgApiKeyListQuery({ id: '', selection: { fields: { id: true, keyId: true, name: true, principalId: true, orgId: true, expiresAt: true, revokedAt: true, lastUsedAt: true, mfaLevel: true, accessLevel: true, createdAt: true, updatedAt: true } } }) +useCreateOrgApiKeyListMutation({ selection: { fields: { id: true } } }) +useUpdateOrgApiKeyListMutation({ selection: { fields: { id: true } } }) +useDeleteOrgApiKeyListMutation({}) +``` + +## Examples + +### List all orgApiKeyLists + +```typescript +const { data, isLoading } = useOrgApiKeyListsQuery({ + selection: { fields: { id: true, keyId: true, name: true, principalId: true, orgId: true, expiresAt: true, revokedAt: true, lastUsedAt: true, mfaLevel: true, accessLevel: true, createdAt: true, updatedAt: true } }, +}); +``` + +### Create a orgApiKeyList + +```typescript +const { mutate } = useCreateOrgApiKeyListMutation({ + selection: { fields: { id: true } }, +}); +mutate({ keyId: '', name: '', principalId: '', orgId: '', expiresAt: '', revokedAt: '', lastUsedAt: '', mfaLevel: '', accessLevel: '' }); +``` diff --git a/.agents/skills/hooks-auth/references/principal-entity.md b/.agents/skills/hooks-auth/references/principal-entity.md new file mode 100644 index 0000000000..afe6d3ef25 --- /dev/null +++ b/.agents/skills/hooks-auth/references/principal-entity.md @@ -0,0 +1,34 @@ +# principalEntity + + + +Association table scoping principals to specific organizations + +## Usage + +```typescript +usePrincipalEntitiesQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, principalId: true, entityId: true, ownerId: true } } }) +usePrincipalEntityQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, principalId: true, entityId: true, ownerId: true } } }) +useCreatePrincipalEntityMutation({ selection: { fields: { id: true } } }) +useUpdatePrincipalEntityMutation({ selection: { fields: { id: true } } }) +useDeletePrincipalEntityMutation({}) +``` + +## Examples + +### List all principalEntities + +```typescript +const { data, isLoading } = usePrincipalEntitiesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, principalId: true, entityId: true, ownerId: true } }, +}); +``` + +### Create a principalEntity + +```typescript +const { mutate } = useCreatePrincipalEntityMutation({ + selection: { fields: { id: true } }, +}); +mutate({ principalId: '', entityId: '', ownerId: '' }); +``` diff --git a/.agents/skills/hooks-auth/references/principal-scope-override.md b/.agents/skills/hooks-auth/references/principal-scope-override.md new file mode 100644 index 0000000000..72a7cb9e67 --- /dev/null +++ b/.agents/skills/hooks-auth/references/principal-scope-override.md @@ -0,0 +1,34 @@ +# principalScopeOverride + + + +Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + +## Usage + +```typescript +usePrincipalScopeOverridesQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, principalId: true, membershipType: true, allowedMask: true, isAdmin: true, isReadOnly: true } } }) +usePrincipalScopeOverrideQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, principalId: true, membershipType: true, allowedMask: true, isAdmin: true, isReadOnly: true } } }) +useCreatePrincipalScopeOverrideMutation({ selection: { fields: { id: true } } }) +useUpdatePrincipalScopeOverrideMutation({ selection: { fields: { id: true } } }) +useDeletePrincipalScopeOverrideMutation({}) +``` + +## Examples + +### List all principalScopeOverrides + +```typescript +const { data, isLoading } = usePrincipalScopeOverridesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, principalId: true, membershipType: true, allowedMask: true, isAdmin: true, isReadOnly: true } }, +}); +``` + +### Create a principalScopeOverride + +```typescript +const { mutate } = useCreatePrincipalScopeOverrideMutation({ + selection: { fields: { id: true } }, +}); +mutate({ principalId: '', membershipType: '', allowedMask: '', isAdmin: '', isReadOnly: '' }); +``` diff --git a/.agents/skills/hooks-auth/references/principal.md b/.agents/skills/hooks-auth/references/principal.md new file mode 100644 index 0000000000..e6ed3be9f5 --- /dev/null +++ b/.agents/skills/hooks-auth/references/principal.md @@ -0,0 +1,34 @@ +# principal + + + +Scoped sub-identities (API keys and agents) with precomputed SPRT + +## Usage + +```typescript +usePrincipalsQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, ownerId: true, userId: true, name: true, allowedMask: true, isReadOnly: true, bypassStepUp: true } } }) +usePrincipalQuery({ principalId: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, ownerId: true, userId: true, name: true, allowedMask: true, isReadOnly: true, bypassStepUp: true } } }) +useCreatePrincipalMutation({ selection: { fields: { principalId: true } } }) +useUpdatePrincipalMutation({ selection: { fields: { principalId: true } } }) +useDeletePrincipalMutation({}) +``` + +## Examples + +### List all principals + +```typescript +const { data, isLoading } = usePrincipalsQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, ownerId: true, userId: true, name: true, allowedMask: true, isReadOnly: true, bypassStepUp: true } }, +}); +``` + +### Create a principal + +```typescript +const { mutate } = useCreatePrincipalMutation({ + selection: { fields: { principalId: true } }, +}); +mutate({ id: '', ownerId: '', userId: '', name: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' }); +``` diff --git a/.agents/skills/hooks-auth/references/revoke-org-api-key.md b/.agents/skills/hooks-auth/references/revoke-org-api-key.md new file mode 100644 index 0000000000..92d84c526b --- /dev/null +++ b/.agents/skills/hooks-auth/references/revoke-org-api-key.md @@ -0,0 +1,20 @@ +# revokeOrgApiKey + + + +React Query mutation hook for revokeOrgApiKey + +## Usage + +```typescript +const { mutate } = useRevokeOrgApiKeyMutation(); mutate({ input: { keyId: '', orgId: '' } }); +``` + +## Examples + +### Use useRevokeOrgApiKeyMutation + +```typescript +const { mutate, isLoading } = useRevokeOrgApiKeyMutation(); +mutate({ input: { keyId: '', orgId: '' } }); +``` diff --git a/.agents/skills/hooks-compute/SKILL.md b/.agents/skills/hooks-compute/SKILL.md index fc29567e16..4fbe8a9347 100644 --- a/.agents/skills/hooks-compute/SKILL.md +++ b/.agents/skills/hooks-compute/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-compute -description: React Query hooks for the compute API — provides typed query and mutation hooks for 18 tables and 15 custom operations +description: React Query hooks for the compute API — provides typed query and mutation hooks for 22 tables and 15 custom operations --- # hooks-compute -React Query hooks for the compute API — provides typed query and mutation hooks for 18 tables and 15 custom operations +React Query hooks for the compute API — provides typed query and mutation hooks for 22 tables and 15 custom operations ## Usage @@ -41,19 +41,23 @@ See the `references/` directory for detailed per-entity API documentation: - [get-all-record](references/get-all-record.md) - [function-api-binding](references/function-api-binding.md) - [function-deployment](references/function-deployment.md) +- [resource](references/resource.md) - [function-graph-ref](references/function-graph-ref.md) - [function-graph-store](references/function-graph-store.md) - [function-graph-object](references/function-graph-object.md) - [function-deployment-event](references/function-deployment-event.md) - [org-function-execution-log](references/org-function-execution-log.md) +- [resource-event](references/resource-event.md) - [function-graph-execution-output](references/function-graph-execution-output.md) - [function-graph-commit](references/function-graph-commit.md) - [secret-definition](references/secret-definition.md) - [function-execution-log](references/function-execution-log.md) -- [function-graph-execution-node-state](references/function-graph-execution-node-state.md) - [function-graph](references/function-graph.md) +- [function-graph-execution-node-state](references/function-graph-execution-node-state.md) +- [platform-namespace](references/platform-namespace.md) - [org-function-invocation](references/org-function-invocation.md) - [function-invocation](references/function-invocation.md) +- [platform-namespace-event](references/platform-namespace-event.md) - [function-graph-execution](references/function-graph-execution.md) - [function-definition](references/function-definition.md) - [read-function-graph](references/read-function-graph.md) @@ -65,9 +69,9 @@ See the `references/` directory for detailed per-entity API documentation: - [save-graph](references/save-graph.md) - [add-edge-and-save](references/add-edge-and-save.md) - [add-node-and-save](references/add-node-and-save.md) +- [import-graph-json](references/import-graph-json.md) - [add-edge](references/add-edge.md) - [add-node](references/add-node.md) -- [import-graph-json](references/import-graph-json.md) - [insert-node-at-path](references/insert-node-at-path.md) - [start-execution](references/start-execution.md) - [provision-bucket](references/provision-bucket.md) diff --git a/.agents/skills/hooks-compute/references/function-graph-execution.md b/.agents/skills/hooks-compute/references/function-graph-execution.md index 6faa582082..88b1492294 100644 --- a/.agents/skills/hooks-compute/references/function-graph-execution.md +++ b/.agents/skills/hooks-compute/references/function-graph-execution.md @@ -7,8 +7,8 @@ Ephemeral execution state for flow graph evaluation ## Usage ```typescript -useFunctionGraphExecutionsQuery({ selection: { fields: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, entityId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } } }) -useFunctionGraphExecutionQuery({ id: '', selection: { fields: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, entityId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } } }) +useFunctionGraphExecutionsQuery({ selection: { fields: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } } }) +useFunctionGraphExecutionQuery({ id: '', selection: { fields: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } } }) useCreateFunctionGraphExecutionMutation({ selection: { fields: { id: true } } }) useUpdateFunctionGraphExecutionMutation({ selection: { fields: { id: true } } }) useDeleteFunctionGraphExecutionMutation({}) @@ -20,7 +20,7 @@ useDeleteFunctionGraphExecutionMutation({}) ```typescript const { data, isLoading } = useFunctionGraphExecutionsQuery({ - selection: { fields: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, entityId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }, + selection: { fields: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useFunctionGraphExecutionsQuery({ const { mutate } = useCreateFunctionGraphExecutionMutation({ selection: { fields: { id: true } }, }); -mutate({ startedAt: '', graphId: '', invocationId: '', databaseId: '', entityId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }); +mutate({ startedAt: '', graphId: '', invocationId: '', databaseId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/function-graph.md b/.agents/skills/hooks-compute/references/function-graph.md index 07bdcc5d38..e29fab1d4e 100644 --- a/.agents/skills/hooks-compute/references/function-graph.md +++ b/.agents/skills/hooks-compute/references/function-graph.md @@ -7,8 +7,8 @@ Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store ## Usage ```typescript -useFunctionGraphsQuery({ selection: { fields: { id: true, databaseId: true, storeId: true, entityId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } } }) -useFunctionGraphQuery({ id: '', selection: { fields: { id: true, databaseId: true, storeId: true, entityId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } } }) +useFunctionGraphsQuery({ selection: { fields: { id: true, databaseId: true, storeId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } } }) +useFunctionGraphQuery({ id: '', selection: { fields: { id: true, databaseId: true, storeId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } } }) useCreateFunctionGraphMutation({ selection: { fields: { id: true } } }) useUpdateFunctionGraphMutation({ selection: { fields: { id: true } } }) useDeleteFunctionGraphMutation({}) @@ -20,7 +20,7 @@ useDeleteFunctionGraphMutation({}) ```typescript const { data, isLoading } = useFunctionGraphsQuery({ - selection: { fields: { id: true, databaseId: true, storeId: true, entityId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, storeId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useFunctionGraphsQuery({ const { mutate } = useCreateFunctionGraphMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', storeId: '', entityId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }); +mutate({ databaseId: '', storeId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/platform-namespace-event.md b/.agents/skills/hooks-compute/references/platform-namespace-event.md new file mode 100644 index 0000000000..05a9c912eb --- /dev/null +++ b/.agents/skills/hooks-compute/references/platform-namespace-event.md @@ -0,0 +1,34 @@ +# platformNamespaceEvent + + + +Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + +## Usage + +```typescript +usePlatformNamespaceEventsQuery({ selection: { fields: { createdAt: true, id: true, namespaceId: true, eventType: true, actorId: true, message: true, metadata: true, cpuMillicores: true, memoryBytes: true, storageBytes: true, networkIngressBytes: true, networkEgressBytes: true, podCount: true, metrics: true, databaseId: true } } }) +usePlatformNamespaceEventQuery({ id: '', selection: { fields: { createdAt: true, id: true, namespaceId: true, eventType: true, actorId: true, message: true, metadata: true, cpuMillicores: true, memoryBytes: true, storageBytes: true, networkIngressBytes: true, networkEgressBytes: true, podCount: true, metrics: true, databaseId: true } } }) +useCreatePlatformNamespaceEventMutation({ selection: { fields: { id: true } } }) +useUpdatePlatformNamespaceEventMutation({ selection: { fields: { id: true } } }) +useDeletePlatformNamespaceEventMutation({}) +``` + +## Examples + +### List all platformNamespaceEvents + +```typescript +const { data, isLoading } = usePlatformNamespaceEventsQuery({ + selection: { fields: { createdAt: true, id: true, namespaceId: true, eventType: true, actorId: true, message: true, metadata: true, cpuMillicores: true, memoryBytes: true, storageBytes: true, networkIngressBytes: true, networkEgressBytes: true, podCount: true, metrics: true, databaseId: true } }, +}); +``` + +### Create a platformNamespaceEvent + +```typescript +const { mutate } = useCreatePlatformNamespaceEventMutation({ + selection: { fields: { id: true } }, +}); +mutate({ namespaceId: '', eventType: '', actorId: '', message: '', metadata: '', cpuMillicores: '', memoryBytes: '', storageBytes: '', networkIngressBytes: '', networkEgressBytes: '', podCount: '', metrics: '', databaseId: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/platform-namespace.md b/.agents/skills/hooks-compute/references/platform-namespace.md new file mode 100644 index 0000000000..abf251bdef --- /dev/null +++ b/.agents/skills/hooks-compute/references/platform-namespace.md @@ -0,0 +1,34 @@ +# platformNamespace + + + +Logical namespace containers for grouping secrets, config, functions, and other resources + +## Usage + +```typescript +usePlatformNamespacesQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, name: true, namespaceName: true, description: true, isActive: true, labels: true, annotations: true, databaseId: true, sourceDatabaseId: true, sourceScope: true, isManaged: true } } }) +usePlatformNamespaceQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, name: true, namespaceName: true, description: true, isActive: true, labels: true, annotations: true, databaseId: true, sourceDatabaseId: true, sourceScope: true, isManaged: true } } }) +useCreatePlatformNamespaceMutation({ selection: { fields: { id: true } } }) +useUpdatePlatformNamespaceMutation({ selection: { fields: { id: true } } }) +useDeletePlatformNamespaceMutation({}) +``` + +## Examples + +### List all platformNamespaces + +```typescript +const { data, isLoading } = usePlatformNamespacesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, name: true, namespaceName: true, description: true, isActive: true, labels: true, annotations: true, databaseId: true, sourceDatabaseId: true, sourceScope: true, isManaged: true } }, +}); +``` + +### Create a platformNamespace + +```typescript +const { mutate } = useCreatePlatformNamespaceMutation({ + selection: { fields: { id: true } }, +}); +mutate({ name: '', namespaceName: '', description: '', isActive: '', labels: '', annotations: '', databaseId: '', sourceDatabaseId: '', sourceScope: '', isManaged: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/resource-event.md b/.agents/skills/hooks-compute/references/resource-event.md new file mode 100644 index 0000000000..fd8e146c6c --- /dev/null +++ b/.agents/skills/hooks-compute/references/resource-event.md @@ -0,0 +1,34 @@ +# resourceEvent + + + +Resource lifecycle events — audit log of provisioning, updates, and failure events + +## Usage + +```typescript +useResourceEventsQuery({ selection: { fields: { createdAt: true, id: true, resourceId: true, eventType: true, actorId: true, message: true, metadata: true, databaseId: true } } }) +useResourceEventQuery({ id: '', selection: { fields: { createdAt: true, id: true, resourceId: true, eventType: true, actorId: true, message: true, metadata: true, databaseId: true } } }) +useCreateResourceEventMutation({ selection: { fields: { id: true } } }) +useUpdateResourceEventMutation({ selection: { fields: { id: true } } }) +useDeleteResourceEventMutation({}) +``` + +## Examples + +### List all resourceEvents + +```typescript +const { data, isLoading } = useResourceEventsQuery({ + selection: { fields: { createdAt: true, id: true, resourceId: true, eventType: true, actorId: true, message: true, metadata: true, databaseId: true } }, +}); +``` + +### Create a resourceEvent + +```typescript +const { mutate } = useCreateResourceEventMutation({ + selection: { fields: { id: true } }, +}); +mutate({ resourceId: '', eventType: '', actorId: '', message: '', metadata: '', databaseId: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/resource.md b/.agents/skills/hooks-compute/references/resource.md new file mode 100644 index 0000000000..c40cbac03b --- /dev/null +++ b/.agents/skills/hooks-compute/references/resource.md @@ -0,0 +1,34 @@ +# resource + + + +Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + +## Usage + +```typescript +useResourcesQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, namespaceId: true, kind: true, name: true, slug: true, spec: true, status: true, statusObserved: true, lastError: true, errorCount: true, labels: true, annotations: true, databaseId: true } } }) +useResourceQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, namespaceId: true, kind: true, name: true, slug: true, spec: true, status: true, statusObserved: true, lastError: true, errorCount: true, labels: true, annotations: true, databaseId: true } } }) +useCreateResourceMutation({ selection: { fields: { id: true } } }) +useUpdateResourceMutation({ selection: { fields: { id: true } } }) +useDeleteResourceMutation({}) +``` + +## Examples + +### List all resources + +```typescript +const { data, isLoading } = useResourcesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, namespaceId: true, kind: true, name: true, slug: true, spec: true, status: true, statusObserved: true, lastError: true, errorCount: true, labels: true, annotations: true, databaseId: true } }, +}); +``` + +### Create a resource + +```typescript +const { mutate } = useCreateResourceMutation({ + selection: { fields: { id: true } }, +}); +mutate({ createdBy: '', updatedBy: '', namespaceId: '', kind: '', name: '', slug: '', spec: '', status: '', statusObserved: '', lastError: '', errorCount: '', labels: '', annotations: '', databaseId: '' }); +``` diff --git a/.agents/skills/hooks-modules/SKILL.md b/.agents/skills/hooks-modules/SKILL.md index 43b3762cab..af7c6c9505 100644 --- a/.agents/skills/hooks-modules/SKILL.md +++ b/.agents/skills/hooks-modules/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-modules -description: React Query hooks for the modules API — provides typed query and mutation hooks for 59 tables and 12 custom operations +description: React Query hooks for the modules API — provides typed query and mutation hooks for 61 tables and 12 custom operations --- # hooks-modules -React Query hooks for the modules API — provides typed query and mutation hooks for 59 tables and 12 custom operations +React Query hooks for the modules API — provides typed query and mutation hooks for 61 tables and 12 custom operations ## Usage @@ -64,19 +64,21 @@ See the `references/` directory for detailed per-entity API documentation: - [crypto-auth-module](references/crypto-auth-module.md) - [sessions-module](references/sessions-module.md) - [secure-table-provision](references/secure-table-provision.md) -- [merkle-store-module](references/merkle-store-module.md) -- [graph-module](references/graph-module.md) - [database-provision-module](references/database-provision-module.md) - [config-secrets-module](references/config-secrets-module.md) +- [graph-module](references/graph-module.md) +- [merkle-store-module](references/merkle-store-module.md) - [rate-limit-meters-module](references/rate-limit-meters-module.md) - [realtime-module](references/realtime-module.md) - [webauthn-auth-module](references/webauthn-auth-module.md) - [function-invocation-module](references/function-invocation-module.md) - [function-module](references/function-module.md) - [invites-module](references/invites-module.md) +- [principal-auth-module](references/principal-auth-module.md) - [compute-log-module](references/compute-log-module.md) - [inference-log-module](references/inference-log-module.md) - [namespace-module](references/namespace-module.md) +- [resource-module](references/resource-module.md) - [storage-log-module](references/storage-log-module.md) - [transfer-log-module](references/transfer-log-module.md) - [function-deployment-module](references/function-deployment-module.md) diff --git a/.agents/skills/hooks-modules/references/merkle-store-module.md b/.agents/skills/hooks-modules/references/merkle-store-module.md index 407d61ef3e..2124c1753a 100644 --- a/.agents/skills/hooks-modules/references/merkle-store-module.md +++ b/.agents/skills/hooks-modules/references/merkle-store-module.md @@ -7,8 +7,8 @@ React Query hooks for MerkleStoreModule data operations ## Usage ```typescript -useMerkleStoreModulesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, createdAt: true } } }) -useMerkleStoreModuleQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, createdAt: true } } }) +useMerkleStoreModulesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, permissionKey: true, createdAt: true } } }) +useMerkleStoreModuleQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, permissionKey: true, createdAt: true } } }) useCreateMerkleStoreModuleMutation({ selection: { fields: { id: true } } }) useUpdateMerkleStoreModuleMutation({ selection: { fields: { id: true } } }) useDeleteMerkleStoreModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteMerkleStoreModuleMutation({}) ```typescript const { data, isLoading } = useMerkleStoreModulesQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, createdAt: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, permissionKey: true, createdAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useMerkleStoreModulesQuery({ const { mutate } = useCreateMerkleStoreModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '' }); +mutate({ databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '', permissionKey: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/principal-auth-module.md b/.agents/skills/hooks-modules/references/principal-auth-module.md new file mode 100644 index 0000000000..01374dc265 --- /dev/null +++ b/.agents/skills/hooks-modules/references/principal-auth-module.md @@ -0,0 +1,34 @@ +# principalAuthModule + + + +Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + +## Usage + +```typescript +usePrincipalAuthModulesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, principalsTableId: true, principalEntitiesTableId: true, principalScopeOverridesTableId: true, usersTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, principalsTableName: true, createPrincipalFunction: true, deletePrincipalFunction: true, createOrgPrincipalFunction: true, deleteOrgPrincipalFunction: true, createOrgApiKeyFunction: true, revokeOrgApiKeyFunction: true, apiName: true } } }) +usePrincipalAuthModuleQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, principalsTableId: true, principalEntitiesTableId: true, principalScopeOverridesTableId: true, usersTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, principalsTableName: true, createPrincipalFunction: true, deletePrincipalFunction: true, createOrgPrincipalFunction: true, deleteOrgPrincipalFunction: true, createOrgApiKeyFunction: true, revokeOrgApiKeyFunction: true, apiName: true } } }) +useCreatePrincipalAuthModuleMutation({ selection: { fields: { id: true } } }) +useUpdatePrincipalAuthModuleMutation({ selection: { fields: { id: true } } }) +useDeletePrincipalAuthModuleMutation({}) +``` + +## Examples + +### List all principalAuthModules + +```typescript +const { data, isLoading } = usePrincipalAuthModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, principalsTableId: true, principalEntitiesTableId: true, principalScopeOverridesTableId: true, usersTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, principalsTableName: true, createPrincipalFunction: true, deletePrincipalFunction: true, createOrgPrincipalFunction: true, deleteOrgPrincipalFunction: true, createOrgApiKeyFunction: true, revokeOrgApiKeyFunction: true, apiName: true } }, +}); +``` + +### Create a principalAuthModule + +```typescript +const { mutate } = useCreatePrincipalAuthModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', schemaId: '', principalsTableId: '', principalEntitiesTableId: '', principalScopeOverridesTableId: '', usersTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', principalsTableName: '', createPrincipalFunction: '', deletePrincipalFunction: '', createOrgPrincipalFunction: '', deleteOrgPrincipalFunction: '', createOrgApiKeyFunction: '', revokeOrgApiKeyFunction: '', apiName: '' }); +``` diff --git a/.agents/skills/hooks-modules/references/resource-module.md b/.agents/skills/hooks-modules/references/resource-module.md new file mode 100644 index 0000000000..4c844e38ad --- /dev/null +++ b/.agents/skills/hooks-modules/references/resource-module.md @@ -0,0 +1,34 @@ +# resourceModule + + + +React Query hooks for ResourceModule data operations + +## Usage + +```typescript +useResourceModulesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, resourcesTableId: true, resourceEventsTableId: true, resourcesTableName: true, resourceEventsTableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, namespaceModuleId: true, policies: true, provisions: true, defaultPermissions: true } } }) +useResourceModuleQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, resourcesTableId: true, resourceEventsTableId: true, resourcesTableName: true, resourceEventsTableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, namespaceModuleId: true, policies: true, provisions: true, defaultPermissions: true } } }) +useCreateResourceModuleMutation({ selection: { fields: { id: true } } }) +useUpdateResourceModuleMutation({ selection: { fields: { id: true } } }) +useDeleteResourceModuleMutation({}) +``` + +## Examples + +### List all resourceModules + +```typescript +const { data, isLoading } = useResourceModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, resourcesTableId: true, resourceEventsTableId: true, resourcesTableName: true, resourceEventsTableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, namespaceModuleId: true, policies: true, provisions: true, defaultPermissions: true } }, +}); +``` + +### Create a resourceModule + +```typescript +const { mutate } = useCreateResourceModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', resourcesTableId: '', resourceEventsTableId: '', resourcesTableName: '', resourceEventsTableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', namespaceModuleId: '', policies: '', provisions: '', defaultPermissions: '' }); +``` diff --git a/.agents/skills/orm-api/references/api.md b/.agents/skills/orm-api/references/api.md index c0e13cf3e9..f6f7069845 100644 --- a/.agents/skills/orm-api/references/api.md +++ b/.agents/skills/orm-api/references/api.md @@ -9,7 +9,7 @@ API endpoint configurations: each record defines a PostGraphile/PostgREST API wi ```typescript db.api.findMany({ select: { id: true } }).execute() db.api.findOne({ id: '', select: { id: true } }).execute() -db.api.create({ data: { databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '' }, select: { id: true } }).execute() +db.api.create({ data: { databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '', labels: '', annotations: '' }, select: { id: true } }).execute() db.api.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.api.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.api.findMany({ ```typescript const item = await db.api.create({ - data: { databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '' }, + data: { databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '', labels: '', annotations: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/check-constraint.md b/.agents/skills/orm-api/references/check-constraint.md index a044922fcf..bcfed3c318 100644 --- a/.agents/skills/orm-api/references/check-constraint.md +++ b/.agents/skills/orm-api/references/check-constraint.md @@ -9,7 +9,7 @@ ORM operations for CheckConstraint records ```typescript db.checkConstraint.findMany({ select: { id: true } }).execute() db.checkConstraint.findOne({ id: '', select: { id: true } }).execute() -db.checkConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.checkConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute() db.checkConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.checkConstraint.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.checkConstraint.findMany({ ```typescript const item = await db.checkConstraint.create({ - data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', scope: '', tags: '' }, + data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/composite-type.md b/.agents/skills/orm-api/references/composite-type.md index 4a6a20601d..0922d8d886 100644 --- a/.agents/skills/orm-api/references/composite-type.md +++ b/.agents/skills/orm-api/references/composite-type.md @@ -9,7 +9,7 @@ ORM operations for CompositeType records ```typescript db.compositeType.findMany({ select: { id: true } }).execute() db.compositeType.findOne({ id: '', select: { id: true } }).execute() -db.compositeType.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.compositeType.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute() db.compositeType.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.compositeType.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.compositeType.findMany({ ```typescript const item = await db.compositeType.create({ - data: { databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', scope: '', tags: '' }, + data: { databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/database-setting.md b/.agents/skills/orm-api/references/database-setting.md index b2faba9911..d350ec09f1 100644 --- a/.agents/skills/orm-api/references/database-setting.md +++ b/.agents/skills/orm-api/references/database-setting.md @@ -9,7 +9,7 @@ Database-wide feature flags and settings; controls which platform features are a ```typescript db.databaseSetting.findMany({ select: { id: true } }).execute() db.databaseSetting.findOne({ id: '', select: { id: true } }).execute() -db.databaseSetting.create({ data: { databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '' }, select: { id: true } }).execute() +db.databaseSetting.create({ data: { databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '', labels: '', annotations: '' }, select: { id: true } }).execute() db.databaseSetting.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.databaseSetting.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.databaseSetting.findMany({ ```typescript const item = await db.databaseSetting.create({ - data: { databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '' }, + data: { databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '', labels: '', annotations: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/domain.md b/.agents/skills/orm-api/references/domain.md index 9f1dae6abd..6d7c8da7f3 100644 --- a/.agents/skills/orm-api/references/domain.md +++ b/.agents/skills/orm-api/references/domain.md @@ -9,7 +9,7 @@ DNS domain and subdomain routing: maps hostnames to either an API endpoint or a ```typescript db.domain.findMany({ select: { id: true } }).execute() db.domain.findOne({ id: '', select: { id: true } }).execute() -db.domain.create({ data: { databaseId: '', apiId: '', siteId: '', subdomain: '', domain: '' }, select: { id: true } }).execute() +db.domain.create({ data: { databaseId: '', apiId: '', siteId: '', serviceId: '', subdomain: '', domain: '', labels: '', annotations: '' }, select: { id: true } }).execute() db.domain.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.domain.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.domain.findMany({ ```typescript const item = await db.domain.create({ - data: { databaseId: '', apiId: '', siteId: '', subdomain: '', domain: '' }, + data: { databaseId: '', apiId: '', siteId: '', serviceId: '', subdomain: '', domain: '', labels: '', annotations: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/enum.md b/.agents/skills/orm-api/references/enum.md index b0344d9619..1f3203e95a 100644 --- a/.agents/skills/orm-api/references/enum.md +++ b/.agents/skills/orm-api/references/enum.md @@ -9,7 +9,7 @@ ORM operations for Enum records ```typescript db.enum.findMany({ select: { id: true } }).execute() db.enum.findOne({ id: '', select: { id: true } }).execute() -db.enum.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.enum.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute() db.enum.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.enum.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.enum.findMany({ ```typescript const item = await db.enum.create({ - data: { databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', scope: '', tags: '' }, + data: { databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/field.md b/.agents/skills/orm-api/references/field.md index 7495352970..e395613910 100644 --- a/.agents/skills/orm-api/references/field.md +++ b/.agents/skills/orm-api/references/field.md @@ -9,7 +9,7 @@ ORM operations for Field records ```typescript db.field.findMany({ select: { id: true } }).execute() db.field.findOne({ id: '', select: { id: true } }).execute() -db.field.create({ data: { databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '', scope: '' }, select: { id: true } }).execute() +db.field.create({ data: { databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '' }, select: { id: true } }).execute() db.field.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.field.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.field.findMany({ ```typescript const item = await db.field.create({ - data: { databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '', scope: '' }, + data: { databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/foreign-key-constraint.md b/.agents/skills/orm-api/references/foreign-key-constraint.md index 0f2c383dee..b8047be209 100644 --- a/.agents/skills/orm-api/references/foreign-key-constraint.md +++ b/.agents/skills/orm-api/references/foreign-key-constraint.md @@ -9,7 +9,7 @@ ORM operations for ForeignKeyConstraint records ```typescript db.foreignKeyConstraint.findMany({ select: { id: true } }).execute() db.foreignKeyConstraint.findOne({ id: '', select: { id: true } }).execute() -db.foreignKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.foreignKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', tags: '' }, select: { id: true } }).execute() db.foreignKeyConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.foreignKeyConstraint.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.foreignKeyConstraint.findMany({ ```typescript const item = await db.foreignKeyConstraint.create({ - data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', scope: '', tags: '' }, + data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', tags: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/index.md b/.agents/skills/orm-api/references/index.md index b81305f12c..1114147132 100644 --- a/.agents/skills/orm-api/references/index.md +++ b/.agents/skills/orm-api/references/index.md @@ -9,7 +9,7 @@ ORM operations for Index records ```typescript db.index.findMany({ select: { id: true } }).execute() db.index.findOne({ id: '', select: { id: true } }).execute() -db.index.create({ data: { databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.index.create({ data: { databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute() db.index.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.index.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.index.findMany({ ```typescript const item = await db.index.create({ - data: { databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', scope: '', tags: '' }, + data: { databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/policy.md b/.agents/skills/orm-api/references/policy.md index eb98e30b1e..2ac06e0f63 100644 --- a/.agents/skills/orm-api/references/policy.md +++ b/.agents/skills/orm-api/references/policy.md @@ -9,7 +9,7 @@ ORM operations for Policy records ```typescript db.policy.findMany({ select: { id: true } }).execute() db.policy.findOne({ id: '', select: { id: true } }).execute() -db.policy.create({ data: { databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.policy.create({ data: { databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute() db.policy.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.policy.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.policy.findMany({ ```typescript const item = await db.policy.create({ - data: { databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', scope: '', tags: '' }, + data: { databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/primary-key-constraint.md b/.agents/skills/orm-api/references/primary-key-constraint.md index ca2ab26df5..05d22088ec 100644 --- a/.agents/skills/orm-api/references/primary-key-constraint.md +++ b/.agents/skills/orm-api/references/primary-key-constraint.md @@ -9,7 +9,7 @@ ORM operations for PrimaryKeyConstraint records ```typescript db.primaryKeyConstraint.findMany({ select: { id: true } }).execute() db.primaryKeyConstraint.findOne({ id: '', select: { id: true } }).execute() -db.primaryKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.primaryKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute() db.primaryKeyConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.primaryKeyConstraint.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.primaryKeyConstraint.findMany({ ```typescript const item = await db.primaryKeyConstraint.create({ - data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', scope: '', tags: '' }, + data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/schema.md b/.agents/skills/orm-api/references/schema.md index 164276e7aa..ee84f2b6b3 100644 --- a/.agents/skills/orm-api/references/schema.md +++ b/.agents/skills/orm-api/references/schema.md @@ -9,7 +9,7 @@ ORM operations for Schema records ```typescript db.schema.findMany({ select: { id: true } }).execute() db.schema.findOne({ id: '', select: { id: true } }).execute() -db.schema.create({ data: { databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', scope: '', tags: '', isPublic: '', apiExposure: '' }, select: { id: true } }).execute() +db.schema.create({ data: { databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', tags: '', isPublic: '', apiExposure: '' }, select: { id: true } }).execute() db.schema.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.schema.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.schema.findMany({ ```typescript const item = await db.schema.create({ - data: { databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', scope: '', tags: '', isPublic: '', apiExposure: '' }, + data: { databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', tags: '', isPublic: '', apiExposure: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/site.md b/.agents/skills/orm-api/references/site.md index 80a999a93a..f39c296f79 100644 --- a/.agents/skills/orm-api/references/site.md +++ b/.agents/skills/orm-api/references/site.md @@ -9,7 +9,7 @@ Top-level site configuration: branding assets, title, and description for a depl ```typescript db.site.findMany({ select: { id: true } }).execute() db.site.findOne({ id: '', select: { id: true } }).execute() -db.site.create({ data: { databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '' }, select: { id: true } }).execute() +db.site.create({ data: { databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '', labels: '', annotations: '' }, select: { id: true } }).execute() db.site.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.site.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.site.findMany({ ```typescript const item = await db.site.create({ - data: { databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '' }, + data: { databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '', labels: '', annotations: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/spatial-relation.md b/.agents/skills/orm-api/references/spatial-relation.md index d7e71e1afb..f67c1e1381 100644 --- a/.agents/skills/orm-api/references/spatial-relation.md +++ b/.agents/skills/orm-api/references/spatial-relation.md @@ -9,7 +9,7 @@ ORM operations for SpatialRelation records ```typescript db.spatialRelation.findMany({ select: { id: true } }).execute() db.spatialRelation.findOne({ id: '', select: { id: true } }).execute() -db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', tags: '' }, select: { id: true } }).execute() db.spatialRelation.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.spatialRelation.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.spatialRelation.findMany({ ```typescript const item = await db.spatialRelation.create({ - data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', scope: '', tags: '' }, + data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', tags: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/table.md b/.agents/skills/orm-api/references/table.md index ff12027972..18020d54c3 100644 --- a/.agents/skills/orm-api/references/table.md +++ b/.agents/skills/orm-api/references/table.md @@ -9,7 +9,7 @@ ORM operations for Table records ```typescript db.table.findMany({ select: { id: true } }).execute() db.table.findOne({ id: '', select: { id: true } }).execute() -db.table.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', scope: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }, select: { id: true } }).execute() +db.table.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }, select: { id: true } }).execute() db.table.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.table.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.table.findMany({ ```typescript const item = await db.table.create({ - data: { databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', scope: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }, + data: { databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/trigger.md b/.agents/skills/orm-api/references/trigger.md index e2d5dc246a..e9ca19d4f2 100644 --- a/.agents/skills/orm-api/references/trigger.md +++ b/.agents/skills/orm-api/references/trigger.md @@ -9,7 +9,7 @@ ORM operations for Trigger records ```typescript db.trigger.findMany({ select: { id: true } }).execute() db.trigger.findOne({ id: '', select: { id: true } }).execute() -db.trigger.create({ data: { databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.trigger.create({ data: { databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute() db.trigger.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.trigger.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.trigger.findMany({ ```typescript const item = await db.trigger.create({ - data: { databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', scope: '', tags: '' }, + data: { databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/unique-constraint.md b/.agents/skills/orm-api/references/unique-constraint.md index 61f7d92ccb..0b7acba550 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: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.uniqueConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', tags: '' }, select: { id: true } }).execute() db.uniqueConstraint.update({ where: { id: '' }, data: { databaseId: '' }, 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: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', scope: '', tags: '' }, + data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', tags: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/view.md b/.agents/skills/orm-api/references/view.md index 3c22efb116..dc43ae10ab 100644 --- a/.agents/skills/orm-api/references/view.md +++ b/.agents/skills/orm-api/references/view.md @@ -9,7 +9,7 @@ ORM operations for View records ```typescript db.view.findMany({ select: { id: true } }).execute() db.view.findOne({ id: '', select: { id: true } }).execute() -db.view.create({ data: { databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.view.create({ data: { databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute() db.view.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.view.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.view.findMany({ ```typescript const item = await db.view.create({ - data: { databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', scope: '', tags: '' }, + data: { databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-auth/SKILL.md b/.agents/skills/orm-auth/SKILL.md index 846cc82899..e41f89370a 100644 --- a/.agents/skills/orm-auth/SKILL.md +++ b/.agents/skills/orm-auth/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-auth -description: ORM client for the auth API — provides typed CRUD operations for 9 tables and 30 custom operations +description: ORM client for the auth API — provides typed CRUD operations for 13 tables and 34 custom operations --- # orm-auth -ORM client for the auth API — provides typed CRUD operations for 9 tables and 30 custom operations +ORM client for the auth API — provides typed CRUD operations for 13 tables and 34 custom operations ## Usage @@ -15,7 +15,7 @@ ORM client for the auth API — provides typed CRUD operations for 9 tables and // Import the ORM client import { db } from './orm'; -// Available models: email, phoneNumber, cryptoAddress, webauthnCredential, auditLogAuth, identityProvider, roleType, userConnectedAccount, ... +// Available models: principal, principalEntity, principalScopeOverride, email, phoneNumber, cryptoAddress, webauthnCredential, auditLogAuth, ... db..findMany({ select: { id: true } }).execute() db..findOne({ id: '', select: { id: true } }).execute() db..create({ data: { ... }, select: { id: true } }).execute() @@ -28,7 +28,7 @@ db..delete({ where: { id: '' } }).execute() ### Query records ```typescript -const items = await db.email.findMany({ +const items = await db.principal.findMany({ select: { id: true } }).execute(); ``` @@ -37,6 +37,9 @@ const items = await db.email.findMany({ See the `references/` directory for detailed per-entity API documentation: +- [principal](references/principal.md) +- [principal-entity](references/principal-entity.md) +- [principal-scope-override](references/principal-scope-override.md) - [email](references/email.md) - [phone-number](references/phone-number.md) - [crypto-address](references/crypto-address.md) @@ -45,21 +48,24 @@ See the `references/` directory for detailed per-entity API documentation: - [identity-provider](references/identity-provider.md) - [role-type](references/role-type.md) - [user-connected-account](references/user-connected-account.md) +- [org-api-key-list](references/org-api-key-list.md) - [user](references/user.md) - [current-user-agent](references/current-user-agent.md) -- [current-ip-address](references/current-ip-address.md) - [current-user-id](references/current-user-id.md) +- [current-ip-address](references/current-ip-address.md) - [require-step-up](references/require-step-up.md) - [current-user](references/current-user.md) - [sign-out](references/sign-out.md) - [send-account-deletion-email](references/send-account-deletion-email.md) - [check-password](references/check-password.md) +- [delete-org-principal](references/delete-org-principal.md) - [disconnect-account](references/disconnect-account.md) - [revoke-api-key](references/revoke-api-key.md) - [revoke-session](references/revoke-session.md) - [verify-password](references/verify-password.md) - [verify-totp](references/verify-totp.md) - [confirm-delete-account](references/confirm-delete-account.md) +- [revoke-org-api-key](references/revoke-org-api-key.md) - [set-password](references/set-password.md) - [verify-email](references/verify-email.md) - [provision-new-user](references/provision-new-user.md) @@ -70,7 +76,9 @@ See the `references/` directory for detailed per-entity API documentation: - [sign-up](references/sign-up.md) - [sign-in](references/sign-in.md) - [link-identity](references/link-identity.md) +- [create-org-principal](references/create-org-principal.md) - [extend-token-expires](references/extend-token-expires.md) +- [create-org-api-key](references/create-org-api-key.md) - [create-api-key](references/create-api-key.md) - [request-cross-origin-token](references/request-cross-origin-token.md) - [forgot-password](references/forgot-password.md) diff --git a/.agents/skills/orm-auth/references/create-api-key.md b/.agents/skills/orm-auth/references/create-api-key.md index 504504e1a9..5e1294ee85 100644 --- a/.agents/skills/orm-auth/references/create-api-key.md +++ b/.agents/skills/orm-auth/references/create-api-key.md @@ -7,7 +7,7 @@ Execute the createApiKey mutation ## Usage ```typescript -db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '' } }).execute() +db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '', principalId: '' } }).execute() ``` ## Examples @@ -15,5 +15,5 @@ db.mutation.createApiKey({ input: { keyName: '', accessLevel: '' ### Run createApiKey ```typescript -const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '' } }).execute(); +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '', principalId: '' } }).execute(); ``` diff --git a/.agents/skills/orm-auth/references/create-org-api-key.md b/.agents/skills/orm-auth/references/create-org-api-key.md new file mode 100644 index 0000000000..5bfed11e58 --- /dev/null +++ b/.agents/skills/orm-auth/references/create-org-api-key.md @@ -0,0 +1,19 @@ +# createOrgApiKey + + + +Execute the createOrgApiKey mutation + +## Usage + +```typescript +db.mutation.createOrgApiKey({ input: '' }).execute() +``` + +## Examples + +### Run createOrgApiKey + +```typescript +const result = await db.mutation.createOrgApiKey({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/create-org-principal.md b/.agents/skills/orm-auth/references/create-org-principal.md new file mode 100644 index 0000000000..c9c09855a1 --- /dev/null +++ b/.agents/skills/orm-auth/references/create-org-principal.md @@ -0,0 +1,19 @@ +# createOrgPrincipal + + + +Execute the createOrgPrincipal mutation + +## Usage + +```typescript +db.mutation.createOrgPrincipal({ input: { name: '', orgId: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' } }).execute() +``` + +## Examples + +### Run createOrgPrincipal + +```typescript +const result = await db.mutation.createOrgPrincipal({ input: { name: '', orgId: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/delete-org-principal.md b/.agents/skills/orm-auth/references/delete-org-principal.md new file mode 100644 index 0000000000..e554c6b3fd --- /dev/null +++ b/.agents/skills/orm-auth/references/delete-org-principal.md @@ -0,0 +1,19 @@ +# deleteOrgPrincipal + + + +Execute the deleteOrgPrincipal mutation + +## Usage + +```typescript +db.mutation.deleteOrgPrincipal({ input: { principalId: '' } }).execute() +``` + +## Examples + +### Run deleteOrgPrincipal + +```typescript +const result = await db.mutation.deleteOrgPrincipal({ input: { principalId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/org-api-key-list.md b/.agents/skills/orm-auth/references/org-api-key-list.md new file mode 100644 index 0000000000..87745fda18 --- /dev/null +++ b/.agents/skills/orm-auth/references/org-api-key-list.md @@ -0,0 +1,34 @@ +# orgApiKeyList + + + +ORM operations for OrgApiKeyList records + +## Usage + +```typescript +db.orgApiKeyList.findMany({ select: { id: true } }).execute() +db.orgApiKeyList.findOne({ id: '', select: { id: true } }).execute() +db.orgApiKeyList.create({ data: { keyId: '', name: '', principalId: '', orgId: '', expiresAt: '', revokedAt: '', lastUsedAt: '', mfaLevel: '', accessLevel: '' }, select: { id: true } }).execute() +db.orgApiKeyList.update({ where: { id: '' }, data: { keyId: '' }, select: { id: true } }).execute() +db.orgApiKeyList.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgApiKeyList records + +```typescript +const items = await db.orgApiKeyList.findMany({ + select: { id: true, keyId: true } +}).execute(); +``` + +### Create a orgApiKeyList + +```typescript +const item = await db.orgApiKeyList.create({ + data: { keyId: '', name: '', principalId: '', orgId: '', expiresAt: '', revokedAt: '', lastUsedAt: '', mfaLevel: '', accessLevel: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-auth/references/principal-entity.md b/.agents/skills/orm-auth/references/principal-entity.md new file mode 100644 index 0000000000..51701ed335 --- /dev/null +++ b/.agents/skills/orm-auth/references/principal-entity.md @@ -0,0 +1,34 @@ +# principalEntity + + + +Association table scoping principals to specific organizations + +## Usage + +```typescript +db.principalEntity.findMany({ select: { id: true } }).execute() +db.principalEntity.findOne({ id: '', select: { id: true } }).execute() +db.principalEntity.create({ data: { principalId: '', entityId: '', ownerId: '' }, select: { id: true } }).execute() +db.principalEntity.update({ where: { id: '' }, data: { principalId: '' }, select: { id: true } }).execute() +db.principalEntity.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all principalEntity records + +```typescript +const items = await db.principalEntity.findMany({ + select: { id: true, principalId: true } +}).execute(); +``` + +### Create a principalEntity + +```typescript +const item = await db.principalEntity.create({ + data: { principalId: '', entityId: '', ownerId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-auth/references/principal-scope-override.md b/.agents/skills/orm-auth/references/principal-scope-override.md new file mode 100644 index 0000000000..c8060f199a --- /dev/null +++ b/.agents/skills/orm-auth/references/principal-scope-override.md @@ -0,0 +1,34 @@ +# principalScopeOverride + + + +Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + +## Usage + +```typescript +db.principalScopeOverride.findMany({ select: { id: true } }).execute() +db.principalScopeOverride.findOne({ id: '', select: { id: true } }).execute() +db.principalScopeOverride.create({ data: { principalId: '', membershipType: '', allowedMask: '', isAdmin: '', isReadOnly: '' }, select: { id: true } }).execute() +db.principalScopeOverride.update({ where: { id: '' }, data: { principalId: '' }, select: { id: true } }).execute() +db.principalScopeOverride.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all principalScopeOverride records + +```typescript +const items = await db.principalScopeOverride.findMany({ + select: { id: true, principalId: true } +}).execute(); +``` + +### Create a principalScopeOverride + +```typescript +const item = await db.principalScopeOverride.create({ + data: { principalId: '', membershipType: '', allowedMask: '', isAdmin: '', isReadOnly: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-auth/references/principal.md b/.agents/skills/orm-auth/references/principal.md new file mode 100644 index 0000000000..8aeef93618 --- /dev/null +++ b/.agents/skills/orm-auth/references/principal.md @@ -0,0 +1,34 @@ +# principal + + + +Scoped sub-identities (API keys and agents) with precomputed SPRT + +## Usage + +```typescript +db.principal.findMany({ select: { id: true } }).execute() +db.principal.findOne({ principalId: '', select: { id: true } }).execute() +db.principal.create({ data: { id: '', ownerId: '', userId: '', name: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' }, select: { id: true } }).execute() +db.principal.update({ where: { principalId: '' }, data: { id: '' }, select: { id: true } }).execute() +db.principal.delete({ where: { principalId: '' } }).execute() +``` + +## Examples + +### List all principal records + +```typescript +const items = await db.principal.findMany({ + select: { principalId: true, id: true } +}).execute(); +``` + +### Create a principal + +```typescript +const item = await db.principal.create({ + data: { id: '', ownerId: '', userId: '', name: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' }, + select: { principalId: true } +}).execute(); +``` diff --git a/.agents/skills/orm-auth/references/revoke-org-api-key.md b/.agents/skills/orm-auth/references/revoke-org-api-key.md new file mode 100644 index 0000000000..884fd53534 --- /dev/null +++ b/.agents/skills/orm-auth/references/revoke-org-api-key.md @@ -0,0 +1,19 @@ +# revokeOrgApiKey + + + +Execute the revokeOrgApiKey mutation + +## Usage + +```typescript +db.mutation.revokeOrgApiKey({ input: { keyId: '', orgId: '' } }).execute() +``` + +## Examples + +### Run revokeOrgApiKey + +```typescript +const result = await db.mutation.revokeOrgApiKey({ input: { keyId: '', orgId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-compute/SKILL.md b/.agents/skills/orm-compute/SKILL.md index 63b1261cba..ab4c41d287 100644 --- a/.agents/skills/orm-compute/SKILL.md +++ b/.agents/skills/orm-compute/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-compute -description: ORM client for the compute API — provides typed CRUD operations for 18 tables and 15 custom operations +description: ORM client for the compute API — provides typed CRUD operations for 22 tables and 15 custom operations --- # orm-compute -ORM client for the compute API — provides typed CRUD operations for 18 tables and 15 custom operations +ORM client for the compute API — provides typed CRUD operations for 22 tables and 15 custom operations ## Usage @@ -15,7 +15,7 @@ ORM client for the compute API — provides typed CRUD operations for 18 tables // Import the ORM client import { db } from './orm'; -// Available models: getAllRecord, functionApiBinding, functionDeployment, functionGraphRef, functionGraphStore, functionGraphObject, functionDeploymentEvent, orgFunctionExecutionLog, ... +// Available models: getAllRecord, functionApiBinding, functionDeployment, resource, functionGraphRef, functionGraphStore, functionGraphObject, functionDeploymentEvent, ... db..findMany({ select: { id: true } }).execute() db..findOne({ id: '', select: { id: true } }).execute() db..create({ data: { ... }, select: { id: true } }).execute() @@ -40,19 +40,23 @@ See the `references/` directory for detailed per-entity API documentation: - [get-all-record](references/get-all-record.md) - [function-api-binding](references/function-api-binding.md) - [function-deployment](references/function-deployment.md) +- [resource](references/resource.md) - [function-graph-ref](references/function-graph-ref.md) - [function-graph-store](references/function-graph-store.md) - [function-graph-object](references/function-graph-object.md) - [function-deployment-event](references/function-deployment-event.md) - [org-function-execution-log](references/org-function-execution-log.md) +- [resource-event](references/resource-event.md) - [function-graph-execution-output](references/function-graph-execution-output.md) - [function-graph-commit](references/function-graph-commit.md) - [secret-definition](references/secret-definition.md) - [function-execution-log](references/function-execution-log.md) -- [function-graph-execution-node-state](references/function-graph-execution-node-state.md) - [function-graph](references/function-graph.md) +- [function-graph-execution-node-state](references/function-graph-execution-node-state.md) +- [platform-namespace](references/platform-namespace.md) - [org-function-invocation](references/org-function-invocation.md) - [function-invocation](references/function-invocation.md) +- [platform-namespace-event](references/platform-namespace-event.md) - [function-graph-execution](references/function-graph-execution.md) - [function-definition](references/function-definition.md) - [read-function-graph](references/read-function-graph.md) @@ -64,9 +68,9 @@ See the `references/` directory for detailed per-entity API documentation: - [save-graph](references/save-graph.md) - [add-edge-and-save](references/add-edge-and-save.md) - [add-node-and-save](references/add-node-and-save.md) +- [import-graph-json](references/import-graph-json.md) - [add-edge](references/add-edge.md) - [add-node](references/add-node.md) -- [import-graph-json](references/import-graph-json.md) - [insert-node-at-path](references/insert-node-at-path.md) - [start-execution](references/start-execution.md) - [provision-bucket](references/provision-bucket.md) diff --git a/.agents/skills/orm-compute/references/function-graph-execution.md b/.agents/skills/orm-compute/references/function-graph-execution.md index 3f2c0cb6b1..f0953a862d 100644 --- a/.agents/skills/orm-compute/references/function-graph-execution.md +++ b/.agents/skills/orm-compute/references/function-graph-execution.md @@ -9,7 +9,7 @@ Ephemeral execution state for flow graph evaluation ```typescript db.functionGraphExecution.findMany({ select: { id: true } }).execute() db.functionGraphExecution.findOne({ id: '', select: { id: true } }).execute() -db.functionGraphExecution.create({ data: { startedAt: '', graphId: '', invocationId: '', databaseId: '', entityId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }, select: { id: true } }).execute() +db.functionGraphExecution.create({ data: { startedAt: '', graphId: '', invocationId: '', databaseId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }, select: { id: true } }).execute() db.functionGraphExecution.update({ where: { id: '' }, data: { startedAt: '' }, select: { id: true } }).execute() db.functionGraphExecution.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.functionGraphExecution.findMany({ ```typescript const item = await db.functionGraphExecution.create({ - data: { startedAt: '', graphId: '', invocationId: '', databaseId: '', entityId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }, + data: { startedAt: '', graphId: '', invocationId: '', databaseId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/function-graph.md b/.agents/skills/orm-compute/references/function-graph.md index 4254d30d9c..71c530fb04 100644 --- a/.agents/skills/orm-compute/references/function-graph.md +++ b/.agents/skills/orm-compute/references/function-graph.md @@ -9,7 +9,7 @@ Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store ```typescript db.functionGraph.findMany({ select: { id: true } }).execute() db.functionGraph.findOne({ id: '', select: { id: true } }).execute() -db.functionGraph.create({ data: { databaseId: '', storeId: '', entityId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }, select: { id: true } }).execute() +db.functionGraph.create({ data: { databaseId: '', storeId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }, select: { id: true } }).execute() db.functionGraph.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.functionGraph.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.functionGraph.findMany({ ```typescript const item = await db.functionGraph.create({ - data: { databaseId: '', storeId: '', entityId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }, + data: { databaseId: '', storeId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/platform-namespace-event.md b/.agents/skills/orm-compute/references/platform-namespace-event.md new file mode 100644 index 0000000000..00fab17e8e --- /dev/null +++ b/.agents/skills/orm-compute/references/platform-namespace-event.md @@ -0,0 +1,34 @@ +# platformNamespaceEvent + + + +Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + +## Usage + +```typescript +db.platformNamespaceEvent.findMany({ select: { id: true } }).execute() +db.platformNamespaceEvent.findOne({ id: '', select: { id: true } }).execute() +db.platformNamespaceEvent.create({ data: { namespaceId: '', eventType: '', actorId: '', message: '', metadata: '', cpuMillicores: '', memoryBytes: '', storageBytes: '', networkIngressBytes: '', networkEgressBytes: '', podCount: '', metrics: '', databaseId: '' }, select: { id: true } }).execute() +db.platformNamespaceEvent.update({ where: { id: '' }, data: { namespaceId: '' }, select: { id: true } }).execute() +db.platformNamespaceEvent.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all platformNamespaceEvent records + +```typescript +const items = await db.platformNamespaceEvent.findMany({ + select: { id: true, namespaceId: true } +}).execute(); +``` + +### Create a platformNamespaceEvent + +```typescript +const item = await db.platformNamespaceEvent.create({ + data: { namespaceId: '', eventType: '', actorId: '', message: '', metadata: '', cpuMillicores: '', memoryBytes: '', storageBytes: '', networkIngressBytes: '', networkEgressBytes: '', podCount: '', metrics: '', databaseId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-compute/references/platform-namespace.md b/.agents/skills/orm-compute/references/platform-namespace.md new file mode 100644 index 0000000000..ab4071ce74 --- /dev/null +++ b/.agents/skills/orm-compute/references/platform-namespace.md @@ -0,0 +1,34 @@ +# platformNamespace + + + +Logical namespace containers for grouping secrets, config, functions, and other resources + +## Usage + +```typescript +db.platformNamespace.findMany({ select: { id: true } }).execute() +db.platformNamespace.findOne({ id: '', select: { id: true } }).execute() +db.platformNamespace.create({ data: { name: '', namespaceName: '', description: '', isActive: '', labels: '', annotations: '', databaseId: '', sourceDatabaseId: '', sourceScope: '', isManaged: '' }, select: { id: true } }).execute() +db.platformNamespace.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute() +db.platformNamespace.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all platformNamespace records + +```typescript +const items = await db.platformNamespace.findMany({ + select: { id: true, name: true } +}).execute(); +``` + +### Create a platformNamespace + +```typescript +const item = await db.platformNamespace.create({ + data: { name: '', namespaceName: '', description: '', isActive: '', labels: '', annotations: '', databaseId: '', sourceDatabaseId: '', sourceScope: '', isManaged: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-compute/references/resource-event.md b/.agents/skills/orm-compute/references/resource-event.md new file mode 100644 index 0000000000..0bebc5841d --- /dev/null +++ b/.agents/skills/orm-compute/references/resource-event.md @@ -0,0 +1,34 @@ +# resourceEvent + + + +Resource lifecycle events — audit log of provisioning, updates, and failure events + +## Usage + +```typescript +db.resourceEvent.findMany({ select: { id: true } }).execute() +db.resourceEvent.findOne({ id: '', select: { id: true } }).execute() +db.resourceEvent.create({ data: { resourceId: '', eventType: '', actorId: '', message: '', metadata: '', databaseId: '' }, select: { id: true } }).execute() +db.resourceEvent.update({ where: { id: '' }, data: { resourceId: '' }, select: { id: true } }).execute() +db.resourceEvent.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all resourceEvent records + +```typescript +const items = await db.resourceEvent.findMany({ + select: { id: true, resourceId: true } +}).execute(); +``` + +### Create a resourceEvent + +```typescript +const item = await db.resourceEvent.create({ + data: { resourceId: '', eventType: '', actorId: '', message: '', metadata: '', databaseId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-compute/references/resource.md b/.agents/skills/orm-compute/references/resource.md new file mode 100644 index 0000000000..4a30da640a --- /dev/null +++ b/.agents/skills/orm-compute/references/resource.md @@ -0,0 +1,34 @@ +# resource + + + +Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + +## Usage + +```typescript +db.resource.findMany({ select: { id: true } }).execute() +db.resource.findOne({ id: '', select: { id: true } }).execute() +db.resource.create({ data: { createdBy: '', updatedBy: '', namespaceId: '', kind: '', name: '', slug: '', spec: '', status: '', statusObserved: '', lastError: '', errorCount: '', labels: '', annotations: '', databaseId: '' }, select: { id: true } }).execute() +db.resource.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute() +db.resource.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all resource records + +```typescript +const items = await db.resource.findMany({ + select: { id: true, createdBy: true } +}).execute(); +``` + +### Create a resource + +```typescript +const item = await db.resource.create({ + data: { createdBy: '', updatedBy: '', namespaceId: '', kind: '', name: '', slug: '', spec: '', status: '', statusObserved: '', lastError: '', errorCount: '', labels: '', annotations: '', databaseId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/SKILL.md b/.agents/skills/orm-modules/SKILL.md index 690f541308..73ddcd709b 100644 --- a/.agents/skills/orm-modules/SKILL.md +++ b/.agents/skills/orm-modules/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-modules -description: ORM client for the modules API — provides typed CRUD operations for 59 tables and 12 custom operations +description: ORM client for the modules API — provides typed CRUD operations for 61 tables and 12 custom operations --- # orm-modules -ORM client for the modules API — provides typed CRUD operations for 59 tables and 12 custom operations +ORM client for the modules API — provides typed CRUD operations for 61 tables and 12 custom operations ## Usage @@ -63,19 +63,21 @@ See the `references/` directory for detailed per-entity API documentation: - [crypto-auth-module](references/crypto-auth-module.md) - [sessions-module](references/sessions-module.md) - [secure-table-provision](references/secure-table-provision.md) -- [merkle-store-module](references/merkle-store-module.md) -- [graph-module](references/graph-module.md) - [database-provision-module](references/database-provision-module.md) - [config-secrets-module](references/config-secrets-module.md) +- [graph-module](references/graph-module.md) +- [merkle-store-module](references/merkle-store-module.md) - [rate-limit-meters-module](references/rate-limit-meters-module.md) - [realtime-module](references/realtime-module.md) - [webauthn-auth-module](references/webauthn-auth-module.md) - [function-invocation-module](references/function-invocation-module.md) - [function-module](references/function-module.md) - [invites-module](references/invites-module.md) +- [principal-auth-module](references/principal-auth-module.md) - [compute-log-module](references/compute-log-module.md) - [inference-log-module](references/inference-log-module.md) - [namespace-module](references/namespace-module.md) +- [resource-module](references/resource-module.md) - [storage-log-module](references/storage-log-module.md) - [transfer-log-module](references/transfer-log-module.md) - [function-deployment-module](references/function-deployment-module.md) diff --git a/.agents/skills/orm-modules/references/merkle-store-module.md b/.agents/skills/orm-modules/references/merkle-store-module.md index 12d4c3baa8..969e72eaa1 100644 --- a/.agents/skills/orm-modules/references/merkle-store-module.md +++ b/.agents/skills/orm-modules/references/merkle-store-module.md @@ -9,7 +9,7 @@ ORM operations for MerkleStoreModule records ```typescript db.merkleStoreModule.findMany({ select: { id: true } }).execute() db.merkleStoreModule.findOne({ id: '', select: { id: true } }).execute() -db.merkleStoreModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '' }, select: { id: true } }).execute() +db.merkleStoreModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '', permissionKey: '' }, select: { id: true } }).execute() db.merkleStoreModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.merkleStoreModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.merkleStoreModule.findMany({ ```typescript const item = await db.merkleStoreModule.create({ - data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '' }, + data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '', permissionKey: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/principal-auth-module.md b/.agents/skills/orm-modules/references/principal-auth-module.md new file mode 100644 index 0000000000..df71d8625a --- /dev/null +++ b/.agents/skills/orm-modules/references/principal-auth-module.md @@ -0,0 +1,34 @@ +# principalAuthModule + + + +Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + +## Usage + +```typescript +db.principalAuthModule.findMany({ select: { id: true } }).execute() +db.principalAuthModule.findOne({ id: '', select: { id: true } }).execute() +db.principalAuthModule.create({ data: { databaseId: '', schemaId: '', principalsTableId: '', principalEntitiesTableId: '', principalScopeOverridesTableId: '', usersTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', principalsTableName: '', createPrincipalFunction: '', deletePrincipalFunction: '', createOrgPrincipalFunction: '', deleteOrgPrincipalFunction: '', createOrgApiKeyFunction: '', revokeOrgApiKeyFunction: '', apiName: '' }, select: { id: true } }).execute() +db.principalAuthModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.principalAuthModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all principalAuthModule records + +```typescript +const items = await db.principalAuthModule.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a principalAuthModule + +```typescript +const item = await db.principalAuthModule.create({ + data: { databaseId: '', schemaId: '', principalsTableId: '', principalEntitiesTableId: '', principalScopeOverridesTableId: '', usersTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', principalsTableName: '', createPrincipalFunction: '', deletePrincipalFunction: '', createOrgPrincipalFunction: '', deleteOrgPrincipalFunction: '', createOrgApiKeyFunction: '', revokeOrgApiKeyFunction: '', apiName: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/references/resource-module.md b/.agents/skills/orm-modules/references/resource-module.md new file mode 100644 index 0000000000..44267a1876 --- /dev/null +++ b/.agents/skills/orm-modules/references/resource-module.md @@ -0,0 +1,34 @@ +# resourceModule + + + +ORM operations for ResourceModule records + +## Usage + +```typescript +db.resourceModule.findMany({ select: { id: true } }).execute() +db.resourceModule.findOne({ id: '', select: { id: true } }).execute() +db.resourceModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', resourcesTableId: '', resourceEventsTableId: '', resourcesTableName: '', resourceEventsTableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', namespaceModuleId: '', policies: '', provisions: '', defaultPermissions: '' }, select: { id: true } }).execute() +db.resourceModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.resourceModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all resourceModule records + +```typescript +const items = await db.resourceModule.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a resourceModule + +```typescript +const item = await db.resourceModule.create({ + data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', resourcesTableId: '', resourceEventsTableId: '', resourcesTableName: '', resourceEventsTableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', namespaceModuleId: '', policies: '', provisions: '', defaultPermissions: '' }, + select: { id: true } +}).execute(); +``` diff --git a/sdk/constructive-cli/src/api/cli/README.md b/sdk/constructive-cli/src/api/cli/README.md index 360a9eb727..f1b9749bc9 100644 --- a/sdk/constructive-cli/src/api/cli/README.md +++ b/sdk/constructive-cli/src/api/cli/README.md @@ -192,7 +192,6 @@ CRUD operations for Schema records. | `description` | String | | `smartTags` | JSON | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | | `isPublic` | Boolean | | `apiExposure` | ApiExposureLevel | @@ -200,7 +199,7 @@ CRUD operations for Schema records. | `updatedAt` | Datetime | **Required create fields:** `databaseId`, `name`, `schemaName` -**Optional create fields (backend defaults):** `label`, `description`, `smartTags`, `category`, `scope`, `tags`, `isPublic`, `apiExposure` +**Optional create fields (backend defaults):** `label`, `description`, `smartTags`, `category`, `tags`, `isPublic`, `apiExposure` ### `table` @@ -227,7 +226,6 @@ CRUD operations for Table records. | `description` | String | | `smartTags` | JSON | | `category` | ObjectCategory | -| `scope` | Int | | `useRls` | Boolean | | `timestamps` | Boolean | | `peoplestamps` | Boolean | @@ -243,7 +241,7 @@ CRUD operations for Table records. | `inheritsId` | UUID | **Required create fields:** `schemaId`, `name` -**Optional create fields (backend defaults):** `databaseId`, `label`, `description`, `smartTags`, `category`, `scope`, `useRls`, `timestamps`, `peoplestamps`, `pluralName`, `singularName`, `tags`, `partitioned`, `partitionStrategy`, `partitionKeyNames`, `partitionKeyTypes`, `inheritsId` +**Optional create fields (backend defaults):** `databaseId`, `label`, `description`, `smartTags`, `category`, `useRls`, `timestamps`, `peoplestamps`, `pluralName`, `singularName`, `tags`, `partitioned`, `partitionStrategy`, `partitionKeyNames`, `partitionKeyTypes`, `inheritsId` ### `check-constraint` @@ -271,13 +269,12 @@ CRUD operations for CheckConstraint records. | `expr` | JSON | | `smartTags` | JSON | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | | `createdAt` | Datetime | | `updatedAt` | Datetime | **Required create fields:** `tableId`, `fieldIds` -**Optional create fields (backend defaults):** `databaseId`, `name`, `type`, `expr`, `smartTags`, `category`, `scope`, `tags` +**Optional create fields (backend defaults):** `databaseId`, `name`, `type`, `expr`, `smartTags`, `category`, `tags` ### `field` @@ -315,12 +312,11 @@ CRUD operations for Field records. | `max` | Float | | `tags` | String | | `category` | ObjectCategory | -| `scope` | Int | | `createdAt` | Datetime | | `updatedAt` | Datetime | **Required create fields:** `tableId`, `name`, `type` -**Optional create fields (backend defaults):** `databaseId`, `label`, `description`, `smartTags`, `isRequired`, `apiRequired`, `defaultValue`, `fieldOrder`, `regexp`, `chk`, `chkExpr`, `min`, `max`, `tags`, `category`, `scope` +**Optional create fields (backend defaults):** `databaseId`, `label`, `description`, `smartTags`, `isRequired`, `apiRequired`, `defaultValue`, `fieldOrder`, `regexp`, `chk`, `chkExpr`, `min`, `max`, `tags`, `category` ### `spatial-relation` @@ -349,13 +345,12 @@ CRUD operations for SpatialRelation records. | `operator` | String | | `paramName` | String | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | | `createdAt` | Datetime | | `updatedAt` | Datetime | **Required create fields:** `tableId`, `fieldId`, `refTableId`, `refFieldId`, `name`, `operator` -**Optional create fields (backend defaults):** `databaseId`, `paramName`, `category`, `scope`, `tags` +**Optional create fields (backend defaults):** `databaseId`, `paramName`, `category`, `tags` ### `foreign-key-constraint` @@ -387,13 +382,12 @@ CRUD operations for ForeignKeyConstraint records. | `deleteAction` | String | | `updateAction` | String | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | | `createdAt` | Datetime | | `updatedAt` | Datetime | **Required create fields:** `tableId`, `fieldIds`, `refTableId`, `refFieldIds` -**Optional create fields (backend defaults):** `databaseId`, `name`, `description`, `smartTags`, `type`, `deleteAction`, `updateAction`, `category`, `scope`, `tags` +**Optional create fields (backend defaults):** `databaseId`, `name`, `description`, `smartTags`, `type`, `deleteAction`, `updateAction`, `category`, `tags` ### `full-text-search` @@ -457,13 +451,12 @@ CRUD operations for Index records. | `opClasses` | String | | `smartTags` | JSON | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | | `createdAt` | Datetime | | `updatedAt` | Datetime | **Required create fields:** `databaseId`, `tableId` -**Optional create fields (backend defaults):** `name`, `fieldIds`, `includeFieldIds`, `accessMethod`, `indexParams`, `whereClause`, `isUnique`, `options`, `opClasses`, `smartTags`, `category`, `scope`, `tags` +**Optional create fields (backend defaults):** `name`, `fieldIds`, `includeFieldIds`, `accessMethod`, `indexParams`, `whereClause`, `isUnique`, `options`, `opClasses`, `smartTags`, `category`, `tags` ### `policy` @@ -494,13 +487,12 @@ CRUD operations for Policy records. | `data` | JSON | | `smartTags` | JSON | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | | `createdAt` | Datetime | | `updatedAt` | Datetime | **Required create fields:** `tableId` -**Optional create fields (backend defaults):** `databaseId`, `name`, `granteeName`, `privilege`, `permissive`, `disabled`, `policyType`, `data`, `smartTags`, `category`, `scope`, `tags` +**Optional create fields (backend defaults):** `databaseId`, `name`, `granteeName`, `privilege`, `permissive`, `disabled`, `policyType`, `data`, `smartTags`, `category`, `tags` ### `primary-key-constraint` @@ -527,13 +519,12 @@ CRUD operations for PrimaryKeyConstraint records. | `fieldIds` | UUID | | `smartTags` | JSON | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | | `createdAt` | Datetime | | `updatedAt` | Datetime | **Required create fields:** `tableId`, `fieldIds` -**Optional create fields (backend defaults):** `databaseId`, `name`, `type`, `smartTags`, `category`, `scope`, `tags` +**Optional create fields (backend defaults):** `databaseId`, `name`, `type`, `smartTags`, `category`, `tags` ### `table-grant` @@ -590,13 +581,12 @@ CRUD operations for Trigger records. | `functionName` | String | | `smartTags` | JSON | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | | `createdAt` | Datetime | | `updatedAt` | Datetime | **Required create fields:** `tableId`, `name` -**Optional create fields (backend defaults):** `databaseId`, `event`, `functionName`, `smartTags`, `category`, `scope`, `tags` +**Optional create fields (backend defaults):** `databaseId`, `event`, `functionName`, `smartTags`, `category`, `tags` ### `unique-constraint` @@ -624,13 +614,12 @@ CRUD operations for UniqueConstraint records. | `type` | String | | `fieldIds` | UUID | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | | `createdAt` | Datetime | | `updatedAt` | Datetime | **Required create fields:** `tableId`, `fieldIds` -**Optional create fields (backend defaults):** `databaseId`, `name`, `description`, `smartTags`, `type`, `category`, `scope`, `tags` +**Optional create fields (backend defaults):** `databaseId`, `name`, `description`, `smartTags`, `type`, `category`, `tags` ### `view` @@ -662,11 +651,10 @@ CRUD operations for View records. | `isReadOnly` | Boolean | | `smartTags` | JSON | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | **Required create fields:** `schemaId`, `name`, `viewType` -**Optional create fields (backend defaults):** `databaseId`, `tableId`, `data`, `filterType`, `filterData`, `securityInvoker`, `isReadOnly`, `smartTags`, `category`, `scope`, `tags` +**Optional create fields (backend defaults):** `databaseId`, `tableId`, `data`, `filterType`, `filterData`, `securityInvoker`, `isReadOnly`, `smartTags`, `category`, `tags` ### `view-table` @@ -872,11 +860,10 @@ CRUD operations for Enum records. | `values` | String | | `smartTags` | JSON | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | **Required create fields:** `databaseId`, `schemaId`, `name` -**Optional create fields (backend defaults):** `label`, `description`, `values`, `smartTags`, `category`, `scope`, `tags` +**Optional create fields (backend defaults):** `label`, `description`, `values`, `smartTags`, `category`, `tags` ### `composite-type` @@ -904,11 +891,10 @@ CRUD operations for CompositeType records. | `attributes` | JSON | | `smartTags` | JSON | | `category` | ObjectCategory | -| `scope` | Int | | `tags` | String | **Required create fields:** `databaseId`, `schemaId`, `name` -**Optional create fields (backend defaults):** `label`, `description`, `attributes`, `smartTags`, `category`, `scope`, `tags` +**Optional create fields (backend defaults):** `label`, `description`, `attributes`, `smartTags`, `category`, `tags` ### `api-schema` @@ -980,11 +966,14 @@ CRUD operations for Domain records. | `databaseId` | UUID | | `apiId` | UUID | | `siteId` | UUID | +| `serviceId` | UUID | | `subdomain` | Hostname | | `domain` | Hostname | +| `labels` | JSON | +| `annotations` | JSON | **Required create fields:** `databaseId` -**Optional create fields (backend defaults):** `apiId`, `siteId`, `subdomain`, `domain` +**Optional create fields (backend defaults):** `apiId`, `siteId`, `serviceId`, `subdomain`, `domain`, `labels`, `annotations` ### `site-metadatum` @@ -1207,9 +1196,11 @@ CRUD operations for Api records. | `roleName` | String | | `anonRole` | String | | `isPublic` | Boolean | +| `labels` | JSON | +| `annotations` | JSON | **Required create fields:** `databaseId`, `name` -**Optional create fields (backend defaults):** `dbname`, `roleName`, `anonRole`, `isPublic` +**Optional create fields (backend defaults):** `dbname`, `roleName`, `anonRole`, `isPublic`, `labels`, `annotations` ### `site` @@ -1237,9 +1228,11 @@ CRUD operations for Site records. | `appleTouchIcon` | Image | | `logo` | Image | | `dbname` | String | +| `labels` | JSON | +| `annotations` | JSON | **Required create fields:** `databaseId` -**Optional create fields (backend defaults):** `title`, `description`, `ogImage`, `favicon`, `appleTouchIcon`, `logo`, `dbname` +**Optional create fields (backend defaults):** `title`, `description`, `ogImage`, `favicon`, `appleTouchIcon`, `logo`, `dbname`, `labels`, `annotations` ### `app` @@ -1513,9 +1506,11 @@ CRUD operations for DatabaseSetting records. | `enableBulk` | Boolean | | `enableI18N` | Boolean | | `options` | JSON | +| `labels` | JSON | +| `annotations` | JSON | **Required create fields:** `databaseId` -**Optional create fields (backend defaults):** `enableAggregates`, `enablePostgis`, `enableSearch`, `enableDirectUploads`, `enablePresignedUploads`, `enableManyToMany`, `enableConnectionFilter`, `enableLtree`, `enableLlm`, `enableRealtime`, `enableBulk`, `enableI18N`, `options` +**Optional create fields (backend defaults):** `enableAggregates`, `enablePostgis`, `enableSearch`, `enableDirectUploads`, `enablePresignedUploads`, `enableManyToMany`, `enableConnectionFilter`, `enableLtree`, `enableLlm`, `enableRealtime`, `enableBulk`, `enableI18N`, `options`, `labels`, `annotations` ### `webauthn-setting` diff --git a/sdk/constructive-cli/src/api/cli/commands/api.ts b/sdk/constructive-cli/src/api/cli/commands/api.ts index b10fa5f7e3..f81972530c 100644 --- a/sdk/constructive-cli/src/api/cli/commands/api.ts +++ b/sdk/constructive-cli/src/api/cli/commands/api.ts @@ -23,6 +23,8 @@ const fieldSchema: FieldSchema = { roleName: 'string', anonRole: 'string', isPublic: 'boolean', + labels: 'json', + annotations: 'json', }; const usage = '\napi \n\nCommands:\n list List api records\n find-first Find first matching api record\n get Get a api by ID\n create Create a new api\n update Update an existing api\n delete Delete a api\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; @@ -82,6 +84,8 @@ async function handleList(argv: Partial>, _prompter: Inq roleName: true, anonRole: true, isPublic: true, + labels: true, + annotations: true, }; const findManyArgs = parseFindManyArgs< FindManyArgs & { @@ -109,6 +113,8 @@ async function handleFindFirst(argv: Partial>, _prompter roleName: true, anonRole: true, isPublic: true, + labels: true, + annotations: true, }; const findFirstArgs = parseFindFirstArgs< FindFirstArgs & { @@ -148,6 +154,8 @@ async function handleGet(argv: Partial>, prompter: Inqui roleName: true, anonRole: true, isPublic: true, + labels: true, + annotations: true, }, }) .execute(); @@ -203,6 +211,20 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as CreateApiInput['api']; @@ -216,6 +238,8 @@ async function handleCreate(argv: Partial>, prompter: In roleName: cleanedData.roleName, anonRole: cleanedData.anonRole, isPublic: cleanedData.isPublic, + labels: cleanedData.labels, + annotations: cleanedData.annotations, }, select: { id: true, @@ -225,6 +249,8 @@ async function handleCreate(argv: Partial>, prompter: In roleName: true, anonRole: true, isPublic: true, + labels: true, + annotations: true, }, }) .execute(); @@ -286,6 +312,20 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as ApiPatch; @@ -302,6 +342,8 @@ async function handleUpdate(argv: Partial>, prompter: In roleName: cleanedData.roleName, anonRole: cleanedData.anonRole, isPublic: cleanedData.isPublic, + labels: cleanedData.labels, + annotations: cleanedData.annotations, }, select: { id: true, @@ -311,6 +353,8 @@ async function handleUpdate(argv: Partial>, prompter: In roleName: true, anonRole: true, isPublic: true, + labels: true, + annotations: true, }, }) .execute(); diff --git a/sdk/constructive-cli/src/api/cli/commands/check-constraint.ts b/sdk/constructive-cli/src/api/cli/commands/check-constraint.ts index 94dd8756ff..bb0e34eff0 100644 --- a/sdk/constructive-cli/src/api/cli/commands/check-constraint.ts +++ b/sdk/constructive-cli/src/api/cli/commands/check-constraint.ts @@ -25,7 +25,6 @@ const fieldSchema: FieldSchema = { expr: 'json', smartTags: 'json', category: 'string', - scope: 'int', tags: 'string', createdAt: 'string', updatedAt: 'string', @@ -90,7 +89,6 @@ async function handleList(argv: Partial>, _prompter: Inq expr: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -123,7 +121,6 @@ async function handleFindFirst(argv: Partial>, _prompter expr: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -168,7 +165,6 @@ async function handleGet(argv: Partial>, prompter: Inqui expr: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -241,13 +237,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -273,7 +262,6 @@ async function handleCreate(argv: Partial>, prompter: In expr: cleanedData.expr, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -286,7 +274,6 @@ async function handleCreate(argv: Partial>, prompter: In expr: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -365,13 +352,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -397,7 +377,6 @@ async function handleUpdate(argv: Partial>, prompter: In expr: cleanedData.expr, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -410,7 +389,6 @@ async function handleUpdate(argv: Partial>, prompter: In expr: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/composite-type.ts b/sdk/constructive-cli/src/api/cli/commands/composite-type.ts index 0e3cb06f58..4f91eaa424 100644 --- a/sdk/constructive-cli/src/api/cli/commands/composite-type.ts +++ b/sdk/constructive-cli/src/api/cli/commands/composite-type.ts @@ -25,7 +25,6 @@ const fieldSchema: FieldSchema = { attributes: 'json', smartTags: 'json', category: 'string', - scope: 'int', tags: 'string', }; const usage = @@ -88,7 +87,6 @@ async function handleList(argv: Partial>, _prompter: Inq attributes: true, smartTags: true, category: true, - scope: true, tags: true, }; const findManyArgs = parseFindManyArgs< @@ -119,7 +117,6 @@ async function handleFindFirst(argv: Partial>, _prompter attributes: true, smartTags: true, category: true, - scope: true, tags: true, }; const findFirstArgs = parseFindFirstArgs< @@ -162,7 +159,6 @@ async function handleGet(argv: Partial>, prompter: Inqui attributes: true, smartTags: true, category: true, - scope: true, tags: true, }, }) @@ -232,13 +228,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -264,7 +253,6 @@ async function handleCreate(argv: Partial>, prompter: In attributes: cleanedData.attributes, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -277,7 +265,6 @@ async function handleCreate(argv: Partial>, prompter: In attributes: true, smartTags: true, category: true, - scope: true, tags: true, }, }) @@ -353,13 +340,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -385,7 +365,6 @@ async function handleUpdate(argv: Partial>, prompter: In attributes: cleanedData.attributes, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -398,7 +377,6 @@ async function handleUpdate(argv: Partial>, prompter: In attributes: true, smartTags: true, category: true, - scope: true, tags: true, }, }) diff --git a/sdk/constructive-cli/src/api/cli/commands/database-setting.ts b/sdk/constructive-cli/src/api/cli/commands/database-setting.ts index ce8c1f53cf..127f4ee2a2 100644 --- a/sdk/constructive-cli/src/api/cli/commands/database-setting.ts +++ b/sdk/constructive-cli/src/api/cli/commands/database-setting.ts @@ -31,6 +31,8 @@ const fieldSchema: FieldSchema = { enableBulk: 'boolean', enableI18N: 'boolean', options: 'json', + labels: 'json', + annotations: 'json', }; const usage = '\ndatabase-setting \n\nCommands:\n list List databaseSetting records\n find-first Find first matching databaseSetting record\n get Get a databaseSetting by ID\n create Create a new databaseSetting\n update Update an existing databaseSetting\n delete Delete a databaseSetting\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'; @@ -98,6 +100,8 @@ async function handleList(argv: Partial>, _prompter: Inq enableBulk: true, enableI18N: true, options: true, + labels: true, + annotations: true, }; const findManyArgs = parseFindManyArgs< FindManyArgs & { @@ -133,6 +137,8 @@ async function handleFindFirst(argv: Partial>, _prompter enableBulk: true, enableI18N: true, options: true, + labels: true, + annotations: true, }; const findFirstArgs = parseFindFirstArgs< FindFirstArgs & { @@ -180,6 +186,8 @@ async function handleGet(argv: Partial>, prompter: Inqui enableBulk: true, enableI18N: true, options: true, + labels: true, + annotations: true, }, }) .execute(); @@ -292,6 +300,20 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined( @@ -316,6 +338,8 @@ async function handleCreate(argv: Partial>, prompter: In enableBulk: cleanedData.enableBulk, enableI18N: cleanedData.enableI18N, options: cleanedData.options, + labels: cleanedData.labels, + annotations: cleanedData.annotations, }, select: { id: true, @@ -333,6 +357,8 @@ async function handleCreate(argv: Partial>, prompter: In enableBulk: true, enableI18N: true, options: true, + labels: true, + annotations: true, }, }) .execute(); @@ -451,6 +477,20 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as DatabaseSettingPatch; @@ -475,6 +515,8 @@ async function handleUpdate(argv: Partial>, prompter: In enableBulk: cleanedData.enableBulk, enableI18N: cleanedData.enableI18N, options: cleanedData.options, + labels: cleanedData.labels, + annotations: cleanedData.annotations, }, select: { id: true, @@ -492,6 +534,8 @@ async function handleUpdate(argv: Partial>, prompter: In enableBulk: true, enableI18N: true, options: true, + labels: true, + annotations: true, }, }) .execute(); diff --git a/sdk/constructive-cli/src/api/cli/commands/domain.ts b/sdk/constructive-cli/src/api/cli/commands/domain.ts index de88ab779e..a3072dcf36 100644 --- a/sdk/constructive-cli/src/api/cli/commands/domain.ts +++ b/sdk/constructive-cli/src/api/cli/commands/domain.ts @@ -20,8 +20,11 @@ const fieldSchema: FieldSchema = { databaseId: 'uuid', apiId: 'uuid', siteId: 'uuid', + serviceId: 'uuid', subdomain: 'string', domain: 'string', + labels: 'json', + annotations: 'json', }; const usage = '\ndomain \n\nCommands:\n list List domain records\n find-first Find first matching domain record\n get Get a domain by ID\n create Create a new domain\n update Update an existing domain\n delete Delete a domain\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'; @@ -78,8 +81,11 @@ async function handleList(argv: Partial>, _prompter: Inq databaseId: true, apiId: true, siteId: true, + serviceId: true, subdomain: true, domain: true, + labels: true, + annotations: true, }; const findManyArgs = parseFindManyArgs< FindManyArgs & { @@ -104,8 +110,11 @@ async function handleFindFirst(argv: Partial>, _prompter databaseId: true, apiId: true, siteId: true, + serviceId: true, subdomain: true, domain: true, + labels: true, + annotations: true, }; const findFirstArgs = parseFindFirstArgs< FindFirstArgs & { @@ -142,8 +151,11 @@ async function handleGet(argv: Partial>, prompter: Inqui databaseId: true, apiId: true, siteId: true, + serviceId: true, subdomain: true, domain: true, + labels: true, + annotations: true, }, }) .execute(); @@ -179,6 +191,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'serviceId', + message: 'serviceId', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'subdomain', @@ -193,6 +212,20 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as CreateDomainInput['domain']; @@ -203,16 +236,22 @@ async function handleCreate(argv: Partial>, prompter: In databaseId: cleanedData.databaseId, apiId: cleanedData.apiId, siteId: cleanedData.siteId, + serviceId: cleanedData.serviceId, subdomain: cleanedData.subdomain, domain: cleanedData.domain, + labels: cleanedData.labels, + annotations: cleanedData.annotations, }, select: { id: true, databaseId: true, apiId: true, siteId: true, + serviceId: true, subdomain: true, domain: true, + labels: true, + annotations: true, }, }) .execute(); @@ -254,6 +293,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'serviceId', + message: 'serviceId', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'subdomain', @@ -268,6 +314,20 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as DomainPatch; @@ -281,16 +341,22 @@ async function handleUpdate(argv: Partial>, prompter: In databaseId: cleanedData.databaseId, apiId: cleanedData.apiId, siteId: cleanedData.siteId, + serviceId: cleanedData.serviceId, subdomain: cleanedData.subdomain, domain: cleanedData.domain, + labels: cleanedData.labels, + annotations: cleanedData.annotations, }, select: { id: true, databaseId: true, apiId: true, siteId: true, + serviceId: true, subdomain: true, domain: true, + labels: true, + annotations: true, }, }) .execute(); diff --git a/sdk/constructive-cli/src/api/cli/commands/enum.ts b/sdk/constructive-cli/src/api/cli/commands/enum.ts index 8bbb3f29e0..7fb51b5ebd 100644 --- a/sdk/constructive-cli/src/api/cli/commands/enum.ts +++ b/sdk/constructive-cli/src/api/cli/commands/enum.ts @@ -25,7 +25,6 @@ const fieldSchema: FieldSchema = { values: 'string', smartTags: 'json', category: 'string', - scope: 'int', tags: 'string', }; const usage = @@ -88,7 +87,6 @@ async function handleList(argv: Partial>, _prompter: Inq values: true, smartTags: true, category: true, - scope: true, tags: true, }; const findManyArgs = parseFindManyArgs< @@ -119,7 +117,6 @@ async function handleFindFirst(argv: Partial>, _prompter values: true, smartTags: true, category: true, - scope: true, tags: true, }; const findFirstArgs = parseFindFirstArgs< @@ -162,7 +159,6 @@ async function handleGet(argv: Partial>, prompter: Inqui values: true, smartTags: true, category: true, - scope: true, tags: true, }, }) @@ -232,13 +228,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -261,7 +250,6 @@ async function handleCreate(argv: Partial>, prompter: In values: cleanedData.values, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -274,7 +262,6 @@ async function handleCreate(argv: Partial>, prompter: In values: true, smartTags: true, category: true, - scope: true, tags: true, }, }) @@ -350,13 +337,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -382,7 +362,6 @@ async function handleUpdate(argv: Partial>, prompter: In values: cleanedData.values, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -395,7 +374,6 @@ async function handleUpdate(argv: Partial>, prompter: In values: true, smartTags: true, category: true, - scope: true, tags: true, }, }) diff --git a/sdk/constructive-cli/src/api/cli/commands/field.ts b/sdk/constructive-cli/src/api/cli/commands/field.ts index c6cc3df6fb..daa66476d1 100644 --- a/sdk/constructive-cli/src/api/cli/commands/field.ts +++ b/sdk/constructive-cli/src/api/cli/commands/field.ts @@ -35,7 +35,6 @@ const fieldSchema: FieldSchema = { max: 'float', tags: 'string', category: 'string', - scope: 'int', createdAt: 'string', updatedAt: 'string', }; @@ -109,7 +108,6 @@ async function handleList(argv: Partial>, _prompter: Inq max: true, tags: true, category: true, - scope: true, createdAt: true, updatedAt: true, }; @@ -151,7 +149,6 @@ async function handleFindFirst(argv: Partial>, _prompter max: true, tags: true, category: true, - scope: true, createdAt: true, updatedAt: true, }; @@ -205,7 +202,6 @@ async function handleGet(argv: Partial>, prompter: Inqui max: true, tags: true, category: true, - scope: true, createdAt: true, updatedAt: true, }, @@ -346,13 +342,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as CreateFieldInput['field']; @@ -378,7 +367,6 @@ async function handleCreate(argv: Partial>, prompter: In max: cleanedData.max, tags: cleanedData.tags, category: cleanedData.category, - scope: cleanedData.scope, }, select: { id: true, @@ -400,7 +388,6 @@ async function handleCreate(argv: Partial>, prompter: In max: true, tags: true, category: true, - scope: true, createdAt: true, updatedAt: true, }, @@ -547,13 +534,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as FieldPatch; @@ -582,7 +562,6 @@ async function handleUpdate(argv: Partial>, prompter: In max: cleanedData.max, tags: cleanedData.tags, category: cleanedData.category, - scope: cleanedData.scope, }, select: { id: true, @@ -604,7 +583,6 @@ async function handleUpdate(argv: Partial>, prompter: In max: true, tags: true, category: true, - scope: true, createdAt: true, updatedAt: true, }, diff --git a/sdk/constructive-cli/src/api/cli/commands/foreign-key-constraint.ts b/sdk/constructive-cli/src/api/cli/commands/foreign-key-constraint.ts index 181927e17f..082b3537ad 100644 --- a/sdk/constructive-cli/src/api/cli/commands/foreign-key-constraint.ts +++ b/sdk/constructive-cli/src/api/cli/commands/foreign-key-constraint.ts @@ -29,7 +29,6 @@ const fieldSchema: FieldSchema = { deleteAction: 'string', updateAction: 'string', category: 'string', - scope: 'int', tags: 'string', createdAt: 'string', updatedAt: 'string', @@ -98,7 +97,6 @@ async function handleList(argv: Partial>, _prompter: Inq deleteAction: true, updateAction: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -139,7 +137,6 @@ async function handleFindFirst(argv: Partial>, _prompter deleteAction: true, updateAction: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -192,7 +189,6 @@ async function handleGet(argv: Partial>, prompter: Inqui deleteAction: true, updateAction: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -291,13 +287,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -327,7 +316,6 @@ async function handleCreate(argv: Partial>, prompter: In deleteAction: cleanedData.deleteAction, updateAction: cleanedData.updateAction, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -344,7 +332,6 @@ async function handleCreate(argv: Partial>, prompter: In deleteAction: true, updateAction: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -449,13 +436,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -485,7 +465,6 @@ async function handleUpdate(argv: Partial>, prompter: In deleteAction: cleanedData.deleteAction, updateAction: cleanedData.updateAction, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -502,7 +481,6 @@ async function handleUpdate(argv: Partial>, prompter: In deleteAction: true, updateAction: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/index.ts b/sdk/constructive-cli/src/api/cli/commands/index.ts index c868c4f7cd..6716374a1a 100644 --- a/sdk/constructive-cli/src/api/cli/commands/index.ts +++ b/sdk/constructive-cli/src/api/cli/commands/index.ts @@ -30,7 +30,6 @@ const fieldSchema: FieldSchema = { opClasses: 'string', smartTags: 'json', category: 'string', - scope: 'int', tags: 'string', createdAt: 'string', updatedAt: 'string', @@ -100,7 +99,6 @@ async function handleList(argv: Partial>, _prompter: Inq opClasses: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -138,7 +136,6 @@ async function handleFindFirst(argv: Partial>, _prompter opClasses: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -188,7 +185,6 @@ async function handleGet(argv: Partial>, prompter: Inqui opClasses: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -296,13 +292,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -330,7 +319,6 @@ async function handleCreate(argv: Partial>, prompter: In opClasses: cleanedData.opClasses, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -348,7 +336,6 @@ async function handleCreate(argv: Partial>, prompter: In opClasses: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -462,13 +449,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -499,7 +479,6 @@ async function handleUpdate(argv: Partial>, prompter: In opClasses: cleanedData.opClasses, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -517,7 +496,6 @@ async function handleUpdate(argv: Partial>, prompter: In opClasses: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/policy.ts b/sdk/constructive-cli/src/api/cli/commands/policy.ts index 5ed08316e4..3c47247374 100644 --- a/sdk/constructive-cli/src/api/cli/commands/policy.ts +++ b/sdk/constructive-cli/src/api/cli/commands/policy.ts @@ -28,7 +28,6 @@ const fieldSchema: FieldSchema = { data: 'json', smartTags: 'json', category: 'string', - scope: 'int', tags: 'string', createdAt: 'string', updatedAt: 'string', @@ -96,7 +95,6 @@ async function handleList(argv: Partial>, _prompter: Inq data: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -132,7 +130,6 @@ async function handleFindFirst(argv: Partial>, _prompter data: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -180,7 +177,6 @@ async function handleGet(argv: Partial>, prompter: Inqui data: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -275,13 +271,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -307,7 +296,6 @@ async function handleCreate(argv: Partial>, prompter: In data: cleanedData.data, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -323,7 +311,6 @@ async function handleCreate(argv: Partial>, prompter: In data: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -424,13 +411,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -459,7 +439,6 @@ async function handleUpdate(argv: Partial>, prompter: In data: cleanedData.data, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -475,7 +454,6 @@ async function handleUpdate(argv: Partial>, prompter: In data: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/primary-key-constraint.ts b/sdk/constructive-cli/src/api/cli/commands/primary-key-constraint.ts index 053a894f70..dcbdbe1093 100644 --- a/sdk/constructive-cli/src/api/cli/commands/primary-key-constraint.ts +++ b/sdk/constructive-cli/src/api/cli/commands/primary-key-constraint.ts @@ -24,7 +24,6 @@ const fieldSchema: FieldSchema = { fieldIds: 'uuid', smartTags: 'json', category: 'string', - scope: 'int', tags: 'string', createdAt: 'string', updatedAt: 'string', @@ -88,7 +87,6 @@ async function handleList(argv: Partial>, _prompter: Inq fieldIds: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -124,7 +122,6 @@ async function handleFindFirst(argv: Partial>, _prompter fieldIds: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -172,7 +169,6 @@ async function handleGet(argv: Partial>, prompter: Inqui fieldIds: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -238,13 +234,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -269,7 +258,6 @@ async function handleCreate(argv: Partial>, prompter: In fieldIds: cleanedData.fieldIds, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -281,7 +269,6 @@ async function handleCreate(argv: Partial>, prompter: In fieldIds: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -353,13 +340,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -384,7 +364,6 @@ async function handleUpdate(argv: Partial>, prompter: In fieldIds: cleanedData.fieldIds, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -396,7 +375,6 @@ async function handleUpdate(argv: Partial>, prompter: In fieldIds: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/schema.ts b/sdk/constructive-cli/src/api/cli/commands/schema.ts index d24f3d6d41..befddd169f 100644 --- a/sdk/constructive-cli/src/api/cli/commands/schema.ts +++ b/sdk/constructive-cli/src/api/cli/commands/schema.ts @@ -24,7 +24,6 @@ const fieldSchema: FieldSchema = { description: 'string', smartTags: 'json', category: 'string', - scope: 'int', tags: 'string', isPublic: 'boolean', apiExposure: 'string', @@ -90,7 +89,6 @@ async function handleList(argv: Partial>, _prompter: Inq description: true, smartTags: true, category: true, - scope: true, tags: true, isPublic: true, apiExposure: true, @@ -124,7 +122,6 @@ async function handleFindFirst(argv: Partial>, _prompter description: true, smartTags: true, category: true, - scope: true, tags: true, isPublic: true, apiExposure: true, @@ -170,7 +167,6 @@ async function handleGet(argv: Partial>, prompter: Inqui description: true, smartTags: true, category: true, - scope: true, tags: true, isPublic: true, apiExposure: true, @@ -237,13 +233,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -279,7 +268,6 @@ async function handleCreate(argv: Partial>, prompter: In description: cleanedData.description, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, isPublic: cleanedData.isPublic, apiExposure: cleanedData.apiExposure, @@ -293,7 +281,6 @@ async function handleCreate(argv: Partial>, prompter: In description: true, smartTags: true, category: true, - scope: true, tags: true, isPublic: true, apiExposure: true, @@ -366,13 +353,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -411,7 +391,6 @@ async function handleUpdate(argv: Partial>, prompter: In description: cleanedData.description, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, isPublic: cleanedData.isPublic, apiExposure: cleanedData.apiExposure, @@ -425,7 +404,6 @@ async function handleUpdate(argv: Partial>, prompter: In description: true, smartTags: true, category: true, - scope: true, tags: true, isPublic: true, apiExposure: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/site.ts b/sdk/constructive-cli/src/api/cli/commands/site.ts index 85190f6fe5..8b157a1fe1 100644 --- a/sdk/constructive-cli/src/api/cli/commands/site.ts +++ b/sdk/constructive-cli/src/api/cli/commands/site.ts @@ -25,6 +25,8 @@ const fieldSchema: FieldSchema = { appleTouchIcon: 'string', logo: 'string', dbname: 'string', + labels: 'json', + annotations: 'json', }; const usage = '\nsite \n\nCommands:\n list List site records\n find-first Find first matching site record\n get Get a site by ID\n create Create a new site\n update Update an existing site\n delete Delete a site\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'; @@ -86,6 +88,8 @@ async function handleList(argv: Partial>, _prompter: Inq appleTouchIcon: true, logo: true, dbname: true, + labels: true, + annotations: true, }; const findManyArgs = parseFindManyArgs< FindManyArgs & { @@ -115,6 +119,8 @@ async function handleFindFirst(argv: Partial>, _prompter appleTouchIcon: true, logo: true, dbname: true, + labels: true, + annotations: true, }; const findFirstArgs = parseFindFirstArgs< FindFirstArgs & { @@ -156,6 +162,8 @@ async function handleGet(argv: Partial>, prompter: Inqui appleTouchIcon: true, logo: true, dbname: true, + labels: true, + annotations: true, }, }) .execute(); @@ -226,6 +234,20 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as CreateSiteInput['site']; @@ -241,6 +263,8 @@ async function handleCreate(argv: Partial>, prompter: In appleTouchIcon: cleanedData.appleTouchIcon, logo: cleanedData.logo, dbname: cleanedData.dbname, + labels: cleanedData.labels, + annotations: cleanedData.annotations, }, select: { id: true, @@ -252,6 +276,8 @@ async function handleCreate(argv: Partial>, prompter: In appleTouchIcon: true, logo: true, dbname: true, + labels: true, + annotations: true, }, }) .execute(); @@ -328,6 +354,20 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as SitePatch; @@ -346,6 +386,8 @@ async function handleUpdate(argv: Partial>, prompter: In appleTouchIcon: cleanedData.appleTouchIcon, logo: cleanedData.logo, dbname: cleanedData.dbname, + labels: cleanedData.labels, + annotations: cleanedData.annotations, }, select: { id: true, @@ -357,6 +399,8 @@ async function handleUpdate(argv: Partial>, prompter: In appleTouchIcon: true, logo: true, dbname: true, + labels: true, + annotations: true, }, }) .execute(); diff --git a/sdk/constructive-cli/src/api/cli/commands/spatial-relation.ts b/sdk/constructive-cli/src/api/cli/commands/spatial-relation.ts index 1ce6f20d82..720518d38f 100644 --- a/sdk/constructive-cli/src/api/cli/commands/spatial-relation.ts +++ b/sdk/constructive-cli/src/api/cli/commands/spatial-relation.ts @@ -26,7 +26,6 @@ const fieldSchema: FieldSchema = { operator: 'string', paramName: 'string', category: 'string', - scope: 'int', tags: 'string', createdAt: 'string', updatedAt: 'string', @@ -92,7 +91,6 @@ async function handleList(argv: Partial>, _prompter: Inq operator: true, paramName: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -126,7 +124,6 @@ async function handleFindFirst(argv: Partial>, _prompter operator: true, paramName: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -172,7 +169,6 @@ async function handleGet(argv: Partial>, prompter: Inqui operator: true, paramName: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -248,13 +244,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -281,7 +270,6 @@ async function handleCreate(argv: Partial>, prompter: In operator: cleanedData.operator, paramName: cleanedData.paramName, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -295,7 +283,6 @@ async function handleCreate(argv: Partial>, prompter: In operator: true, paramName: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -377,13 +364,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -410,7 +390,6 @@ async function handleUpdate(argv: Partial>, prompter: In operator: cleanedData.operator, paramName: cleanedData.paramName, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -424,7 +403,6 @@ async function handleUpdate(argv: Partial>, prompter: In operator: true, paramName: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/table.ts b/sdk/constructive-cli/src/api/cli/commands/table.ts index 2a91f32717..dfc34f2ea3 100644 --- a/sdk/constructive-cli/src/api/cli/commands/table.ts +++ b/sdk/constructive-cli/src/api/cli/commands/table.ts @@ -24,7 +24,6 @@ const fieldSchema: FieldSchema = { description: 'string', smartTags: 'json', category: 'string', - scope: 'int', useRls: 'boolean', timestamps: 'boolean', peoplestamps: 'boolean', @@ -98,7 +97,6 @@ async function handleList(argv: Partial>, _prompter: Inq description: true, smartTags: true, category: true, - scope: true, useRls: true, timestamps: true, peoplestamps: true, @@ -140,7 +138,6 @@ async function handleFindFirst(argv: Partial>, _prompter description: true, smartTags: true, category: true, - scope: true, useRls: true, timestamps: true, peoplestamps: true, @@ -194,7 +191,6 @@ async function handleGet(argv: Partial>, prompter: Inqui description: true, smartTags: true, category: true, - scope: true, useRls: true, timestamps: true, peoplestamps: true, @@ -270,13 +266,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'boolean', name: 'useRls', @@ -368,7 +357,6 @@ async function handleCreate(argv: Partial>, prompter: In description: cleanedData.description, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, useRls: cleanedData.useRls, timestamps: cleanedData.timestamps, peoplestamps: cleanedData.peoplestamps, @@ -390,7 +378,6 @@ async function handleCreate(argv: Partial>, prompter: In description: true, smartTags: true, category: true, - scope: true, useRls: true, timestamps: true, peoplestamps: true, @@ -472,13 +459,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'boolean', name: 'useRls', @@ -573,7 +553,6 @@ async function handleUpdate(argv: Partial>, prompter: In description: cleanedData.description, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, useRls: cleanedData.useRls, timestamps: cleanedData.timestamps, peoplestamps: cleanedData.peoplestamps, @@ -595,7 +574,6 @@ async function handleUpdate(argv: Partial>, prompter: In description: true, smartTags: true, category: true, - scope: true, useRls: true, timestamps: true, peoplestamps: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/trigger.ts b/sdk/constructive-cli/src/api/cli/commands/trigger.ts index 53dd4649d8..1f38088ef7 100644 --- a/sdk/constructive-cli/src/api/cli/commands/trigger.ts +++ b/sdk/constructive-cli/src/api/cli/commands/trigger.ts @@ -24,7 +24,6 @@ const fieldSchema: FieldSchema = { functionName: 'string', smartTags: 'json', category: 'string', - scope: 'int', tags: 'string', createdAt: 'string', updatedAt: 'string', @@ -88,7 +87,6 @@ async function handleList(argv: Partial>, _prompter: Inq functionName: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -120,7 +118,6 @@ async function handleFindFirst(argv: Partial>, _prompter functionName: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -164,7 +161,6 @@ async function handleGet(argv: Partial>, prompter: Inqui functionName: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -230,13 +226,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -258,7 +247,6 @@ async function handleCreate(argv: Partial>, prompter: In functionName: cleanedData.functionName, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -270,7 +258,6 @@ async function handleCreate(argv: Partial>, prompter: In functionName: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -342,13 +329,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -373,7 +353,6 @@ async function handleUpdate(argv: Partial>, prompter: In functionName: cleanedData.functionName, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -385,7 +364,6 @@ async function handleUpdate(argv: Partial>, prompter: In functionName: true, smartTags: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, 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 7af9f44223..bf37dd3b48 100644 --- a/sdk/constructive-cli/src/api/cli/commands/unique-constraint.ts +++ b/sdk/constructive-cli/src/api/cli/commands/unique-constraint.ts @@ -25,7 +25,6 @@ const fieldSchema: FieldSchema = { type: 'string', fieldIds: 'uuid', category: 'string', - scope: 'int', tags: 'string', createdAt: 'string', updatedAt: 'string', @@ -90,7 +89,6 @@ async function handleList(argv: Partial>, _prompter: Inq type: true, fieldIds: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -123,7 +121,6 @@ async function handleFindFirst(argv: Partial>, _prompter type: true, fieldIds: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -168,7 +165,6 @@ async function handleGet(argv: Partial>, prompter: Inqui type: true, fieldIds: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -241,13 +237,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -273,7 +262,6 @@ async function handleCreate(argv: Partial>, prompter: In type: cleanedData.type, fieldIds: cleanedData.fieldIds, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -286,7 +274,6 @@ async function handleCreate(argv: Partial>, prompter: In type: true, fieldIds: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, @@ -365,13 +352,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -397,7 +377,6 @@ async function handleUpdate(argv: Partial>, prompter: In type: cleanedData.type, fieldIds: cleanedData.fieldIds, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -410,7 +389,6 @@ async function handleUpdate(argv: Partial>, prompter: In type: true, fieldIds: true, category: true, - scope: true, tags: true, createdAt: true, updatedAt: true, diff --git a/sdk/constructive-cli/src/api/cli/commands/view.ts b/sdk/constructive-cli/src/api/cli/commands/view.ts index 16e297de65..ca4a2d8e37 100644 --- a/sdk/constructive-cli/src/api/cli/commands/view.ts +++ b/sdk/constructive-cli/src/api/cli/commands/view.ts @@ -29,7 +29,6 @@ const fieldSchema: FieldSchema = { isReadOnly: 'boolean', smartTags: 'json', category: 'string', - scope: 'int', tags: 'string', }; const usage = @@ -96,7 +95,6 @@ async function handleList(argv: Partial>, _prompter: Inq isReadOnly: true, smartTags: true, category: true, - scope: true, tags: true, }; const findManyArgs = parseFindManyArgs< @@ -131,7 +129,6 @@ async function handleFindFirst(argv: Partial>, _prompter isReadOnly: true, smartTags: true, category: true, - scope: true, tags: true, }; const findFirstArgs = parseFindFirstArgs< @@ -178,7 +175,6 @@ async function handleGet(argv: Partial>, prompter: Inqui isReadOnly: true, smartTags: true, category: true, - scope: true, tags: true, }, }) @@ -276,13 +272,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -309,7 +298,6 @@ async function handleCreate(argv: Partial>, prompter: In isReadOnly: cleanedData.isReadOnly, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -326,7 +314,6 @@ async function handleCreate(argv: Partial>, prompter: In isReadOnly: true, smartTags: true, category: true, - scope: true, tags: true, }, }) @@ -430,13 +417,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'scope', - message: 'scope', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'tags', @@ -466,7 +446,6 @@ async function handleUpdate(argv: Partial>, prompter: In isReadOnly: cleanedData.isReadOnly, smartTags: cleanedData.smartTags, category: cleanedData.category, - scope: cleanedData.scope, tags: cleanedData.tags, }, select: { @@ -483,7 +462,6 @@ async function handleUpdate(argv: Partial>, prompter: In isReadOnly: true, smartTags: true, category: true, - scope: true, tags: true, }, }) diff --git a/sdk/constructive-cli/src/api/orm/README.md b/sdk/constructive-cli/src/api/orm/README.md index caf70c1803..1c2ec1c782 100644 --- a/sdk/constructive-cli/src/api/orm/README.md +++ b/sdk/constructive-cli/src/api/orm/README.md @@ -118,7 +118,6 @@ CRUD operations for Schema records. | `description` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `isPublic` | Boolean | Yes | | `apiExposure` | ApiExposureLevel | Yes | @@ -129,13 +128,13 @@ CRUD operations for Schema records. ```typescript // List all schema records -const items = await db.schema.findMany({ select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, scope: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.schema.findMany({ select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.schema.findOne({ id: '', select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, scope: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.schema.findOne({ id: '', select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.schema.create({ data: { databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', scope: '', tags: '', isPublic: '', apiExposure: '' }, select: { id: true } }).execute(); +const created = await db.schema.create({ data: { databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', tags: '', isPublic: '', apiExposure: '' }, select: { id: true } }).execute(); // Update const updated = await db.schema.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -160,7 +159,6 @@ CRUD operations for Table records. | `description` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `useRls` | Boolean | Yes | | `timestamps` | Boolean | Yes | | `peoplestamps` | Boolean | Yes | @@ -179,13 +177,13 @@ CRUD operations for Table records. ```typescript // List all table records -const items = await db.table.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, scope: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); +const items = await db.table.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); // Get one by id -const item = await db.table.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, scope: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); +const item = await db.table.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); // Create -const created = await db.table.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', scope: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }, select: { id: true } }).execute(); +const created = await db.table.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }, select: { id: true } }).execute(); // Update const updated = await db.table.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -211,7 +209,6 @@ CRUD operations for CheckConstraint records. | `expr` | JSON | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -220,13 +217,13 @@ CRUD operations for CheckConstraint records. ```typescript // List all checkConstraint records -const items = await db.checkConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.checkConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.checkConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.checkConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.checkConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.checkConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.checkConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -262,7 +259,6 @@ CRUD operations for Field records. | `max` | Float | Yes | | `tags` | String | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -270,13 +266,13 @@ CRUD operations for Field records. ```typescript // List all field records -const items = await db.field.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, scope: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.field.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.field.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, scope: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.field.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.field.create({ data: { databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.field.create({ data: { databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '' }, select: { id: true } }).execute(); // Update const updated = await db.field.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -303,7 +299,6 @@ CRUD operations for SpatialRelation records. | `operator` | String | Yes | | `paramName` | String | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -312,13 +307,13 @@ CRUD operations for SpatialRelation records. ```typescript // List all spatialRelation records -const items = await db.spatialRelation.findMany({ select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.spatialRelation.findMany({ select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.spatialRelation.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.spatialRelation.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.spatialRelation.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -348,7 +343,6 @@ CRUD operations for ForeignKeyConstraint records. | `deleteAction` | String | Yes | | `updateAction` | String | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -357,13 +351,13 @@ CRUD operations for ForeignKeyConstraint records. ```typescript // List all foreignKeyConstraint records -const items = await db.foreignKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.foreignKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.foreignKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.foreignKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.foreignKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.foreignKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.foreignKeyConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -432,7 +426,6 @@ CRUD operations for Index records. | `opClasses` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -441,13 +434,13 @@ CRUD operations for Index records. ```typescript // List all index records -const items = await db.index.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.index.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.index.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.index.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.index.create({ data: { databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.index.create({ data: { databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.index.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -476,7 +469,6 @@ CRUD operations for Policy records. | `data` | JSON | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -485,13 +477,13 @@ CRUD operations for Policy records. ```typescript // List all policy records -const items = await db.policy.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.policy.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.policy.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.policy.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.policy.create({ data: { databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.policy.create({ data: { databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.policy.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -516,7 +508,6 @@ CRUD operations for PrimaryKeyConstraint records. | `fieldIds` | UUID | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -525,13 +516,13 @@ CRUD operations for PrimaryKeyConstraint records. ```typescript // List all primaryKeyConstraint records -const items = await db.primaryKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.primaryKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.primaryKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.primaryKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.primaryKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.primaryKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.primaryKeyConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -593,7 +584,6 @@ CRUD operations for Trigger records. | `functionName` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -602,13 +592,13 @@ CRUD operations for Trigger records. ```typescript // List all trigger records -const items = await db.trigger.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.trigger.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.trigger.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.trigger.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.trigger.create({ data: { databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.trigger.create({ data: { databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.trigger.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -634,7 +624,6 @@ CRUD operations for UniqueConstraint records. | `type` | String | Yes | | `fieldIds` | UUID | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -643,13 +632,13 @@ CRUD operations for UniqueConstraint records. ```typescript // List all uniqueConstraint records -const items = await db.uniqueConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.uniqueConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.uniqueConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.uniqueConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.uniqueConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.uniqueConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.uniqueConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -679,20 +668,19 @@ CRUD operations for View records. | `isReadOnly` | Boolean | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | **Operations:** ```typescript // List all view records -const items = await db.view.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const items = await db.view.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, tags: true } }).execute(); // Get one by id -const item = await db.view.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const item = await db.view.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, tags: true } }).execute(); // Create -const created = await db.view.create({ data: { databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.view.create({ data: { databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.view.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -938,20 +926,19 @@ CRUD operations for Enum records. | `values` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | **Operations:** ```typescript // List all enum records -const items = await db.enum.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const items = await db.enum.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, tags: true } }).execute(); // Get one by id -const item = await db.enum.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const item = await db.enum.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, tags: true } }).execute(); // Create -const created = await db.enum.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.enum.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.enum.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -977,20 +964,19 @@ CRUD operations for CompositeType records. | `attributes` | JSON | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | **Operations:** ```typescript // List all compositeType records -const items = await db.compositeType.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const items = await db.compositeType.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, tags: true } }).execute(); // Get one by id -const item = await db.compositeType.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const item = await db.compositeType.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, tags: true } }).execute(); // Create -const created = await db.compositeType.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.compositeType.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.compositeType.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1076,20 +1062,23 @@ CRUD operations for Domain records. | `databaseId` | UUID | Yes | | `apiId` | UUID | Yes | | `siteId` | UUID | Yes | +| `serviceId` | UUID | Yes | | `subdomain` | ConstructiveInternalTypeHostname | Yes | | `domain` | ConstructiveInternalTypeHostname | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all domain records -const items = await db.domain.findMany({ select: { id: true, databaseId: true, apiId: true, siteId: true, subdomain: true, domain: true } }).execute(); +const items = await db.domain.findMany({ select: { id: true, databaseId: true, apiId: true, siteId: true, serviceId: true, subdomain: true, domain: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.domain.findOne({ id: '', select: { id: true, databaseId: true, apiId: true, siteId: true, subdomain: true, domain: true } }).execute(); +const item = await db.domain.findOne({ id: '', select: { id: true, databaseId: true, apiId: true, siteId: true, serviceId: true, subdomain: true, domain: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.domain.create({ data: { databaseId: '', apiId: '', siteId: '', subdomain: '', domain: '' }, select: { id: true } }).execute(); +const created = await db.domain.create({ data: { databaseId: '', apiId: '', siteId: '', serviceId: '', subdomain: '', domain: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.domain.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1361,18 +1350,20 @@ CRUD operations for Api records. | `roleName` | String | Yes | | `anonRole` | String | Yes | | `isPublic` | Boolean | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all api records -const items = await db.api.findMany({ select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true } }).execute(); +const items = await db.api.findMany({ select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.api.findOne({ id: '', select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true } }).execute(); +const item = await db.api.findOne({ id: '', select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.api.create({ data: { databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '' }, select: { id: true } }).execute(); +const created = await db.api.create({ data: { databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.api.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1398,18 +1389,20 @@ CRUD operations for Site records. | `appleTouchIcon` | ConstructiveInternalTypeImage | Yes | | `logo` | ConstructiveInternalTypeImage | Yes | | `dbname` | String | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all site records -const items = await db.site.findMany({ select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true } }).execute(); +const items = await db.site.findMany({ select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.site.findOne({ id: '', select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true } }).execute(); +const item = await db.site.findOne({ id: '', select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.site.create({ data: { databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '' }, select: { id: true } }).execute(); +const created = await db.site.create({ data: { databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.site.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1740,18 +1733,20 @@ CRUD operations for DatabaseSetting records. | `enableBulk` | Boolean | Yes | | `enableI18N` | Boolean | Yes | | `options` | JSON | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all databaseSetting records -const items = await db.databaseSetting.findMany({ select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true } }).execute(); +const items = await db.databaseSetting.findMany({ select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.databaseSetting.findOne({ id: '', select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true } }).execute(); +const item = await db.databaseSetting.findOne({ id: '', select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.databaseSetting.create({ data: { databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '' }, select: { id: true } }).execute(); +const created = await db.databaseSetting.create({ data: { databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.databaseSetting.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); diff --git a/sdk/constructive-cli/src/api/orm/input-types.ts b/sdk/constructive-cli/src/api/orm/input-types.ts index b1e5d0f51c..60f796a207 100644 --- a/sdk/constructive-cli/src/api/orm/input-types.ts +++ b/sdk/constructive-cli/src/api/orm/input-types.ts @@ -255,7 +255,6 @@ export interface Schema { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; isPublic?: boolean | null; apiExposure?: ApiExposureLevel | null; @@ -271,7 +270,6 @@ export interface Table { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; useRls?: boolean | null; timestamps?: boolean | null; peoplestamps?: boolean | null; @@ -296,7 +294,6 @@ export interface CheckConstraint { expr?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -321,7 +318,6 @@ export interface Field { max?: number | null; tags?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; createdAt?: string | null; updatedAt?: string | null; } @@ -336,7 +332,6 @@ export interface SpatialRelation { operator?: string | null; paramName?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -355,7 +350,6 @@ export interface ForeignKeyConstraint { deleteAction?: string | null; updateAction?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -387,7 +381,6 @@ export interface Index { opClasses?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -405,7 +398,6 @@ export interface Policy { data?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -419,7 +411,6 @@ export interface PrimaryKeyConstraint { fieldIds?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -444,7 +435,6 @@ export interface Trigger { functionName?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -459,7 +449,6 @@ export interface UniqueConstraint { type?: string | null; fieldIds?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -478,7 +467,6 @@ export interface View { isReadOnly?: boolean | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } /** Junction table linking views to their joined tables for referential integrity */ @@ -559,7 +547,6 @@ export interface Enum { values?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface CompositeType { @@ -572,7 +559,6 @@ export interface CompositeType { attributes?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } /** Join table linking APIs to the database schemas they expose; controls which schemas are accessible through each API */ @@ -607,12 +593,18 @@ export interface Domain { databaseId?: string | null; /** API endpoint this domain routes to (mutually exclusive with site_id) */ apiId?: string | null; - /** Site this domain routes to (mutually exclusive with api_id) */ + /** Site this domain routes to (mutually exclusive with api_id and service_id) */ siteId?: string | null; + /** Server deployment this domain routes to (mutually exclusive with api_id and site_id) */ + serviceId?: string | null; /** Subdomain portion of the hostname */ subdomain?: ConstructiveInternalTypeHostname | null; /** Root domain of the hostname */ domain?: ConstructiveInternalTypeHostname | null; + /** Key/value pairs for selecting and filtering domains */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** SEO and social sharing metadata for a site: page title, description, and Open Graph image */ export interface SiteMetadatum { @@ -719,6 +711,10 @@ export interface Api { anonRole?: string | null; /** Whether this API is publicly accessible without authentication */ isPublic?: boolean | null; + /** Key/value pairs for selecting and filtering APIs */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** Top-level site configuration: branding assets, title, and description for a deployed application */ export interface Site { @@ -740,6 +736,10 @@ export interface Site { logo?: ConstructiveInternalTypeImage | null; /** PostgreSQL database name this site connects to */ dbname?: string | null; + /** Key/value pairs for selecting and filtering sites */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** Mobile and native app configuration linked to a site, including store links and identifiers */ export interface App { @@ -912,6 +912,10 @@ export interface DatabaseSetting { enableI18N?: boolean | null; /** Extensible JSON for additional settings that do not have dedicated columns */ options?: Record | null; + /** Key/value pairs for selecting and filtering database settings */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** Per-database WebAuthn/passkey runtime configuration; typed replacement for api_modules webauthn_challenge JSONB entries */ export interface WebauthnSetting { @@ -1328,7 +1332,6 @@ export type SchemaSelect = { description?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; isPublic?: boolean; apiExposure?: boolean; @@ -1395,7 +1398,6 @@ export type TableSelect = { description?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; useRls?: boolean; timestamps?: boolean; peoplestamps?: boolean; @@ -1528,7 +1530,6 @@ export type CheckConstraintSelect = { expr?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1559,7 +1560,6 @@ export type FieldSelect = { max?: boolean; tags?: boolean; category?: boolean; - scope?: boolean; createdAt?: boolean; updatedAt?: boolean; database?: { @@ -1592,7 +1592,6 @@ export type SpatialRelationSelect = { operator?: boolean; paramName?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1626,7 +1625,6 @@ export type ForeignKeyConstraintSelect = { deleteAction?: boolean; updateAction?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1673,7 +1671,6 @@ export type IndexSelect = { opClasses?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1697,7 +1694,6 @@ export type PolicySelect = { data?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1717,7 +1713,6 @@ export type PrimaryKeyConstraintSelect = { fieldIds?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1754,7 +1749,6 @@ export type TriggerSelect = { functionName?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1775,7 +1769,6 @@ export type UniqueConstraintSelect = { type?: boolean; fieldIds?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1800,7 +1793,6 @@ export type ViewSelect = { isReadOnly?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; database?: { select: DatabaseSelect; @@ -1952,7 +1944,6 @@ export type EnumSelect = { values?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; database?: { select: DatabaseSelect; @@ -1971,7 +1962,6 @@ export type CompositeTypeSelect = { attributes?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; database?: { select: DatabaseSelect; @@ -2013,8 +2003,11 @@ export type DomainSelect = { databaseId?: boolean; apiId?: boolean; siteId?: boolean; + serviceId?: boolean; subdomain?: boolean; domain?: boolean; + labels?: boolean; + annotations?: boolean; api?: { select: ApiSelect; }; @@ -2138,6 +2131,8 @@ export type ApiSelect = { roleName?: boolean; anonRole?: boolean; isPublic?: boolean; + labels?: boolean; + annotations?: boolean; database?: { select: DatabaseSelect; }; @@ -2179,6 +2174,8 @@ export type SiteSelect = { appleTouchIcon?: boolean; logo?: boolean; dbname?: boolean; + labels?: boolean; + annotations?: boolean; database?: { select: DatabaseSelect; }; @@ -2608,6 +2605,8 @@ export type DatabaseSettingSelect = { enableBulk?: boolean; enableI18N?: boolean; options?: boolean; + labels?: boolean; + annotations?: boolean; database?: { select: DatabaseSelect; }; @@ -2715,8 +2714,6 @@ export interface SchemaFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `isPublic` field. */ @@ -2785,8 +2782,6 @@ export interface TableFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `useRls` field. */ useRls?: BooleanFilter; /** Filter by the object’s `timestamps` field. */ @@ -2915,8 +2910,6 @@ export interface CheckConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -2973,8 +2966,6 @@ export interface FieldFilter { tags?: StringListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ @@ -3019,8 +3010,6 @@ export interface SpatialRelationFilter { paramName?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3071,8 +3060,6 @@ export interface ForeignKeyConstraintFilter { updateAction?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3153,8 +3140,6 @@ export interface IndexFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3197,8 +3182,6 @@ export interface PolicyFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3233,8 +3216,6 @@ export interface PrimaryKeyConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3299,8 +3280,6 @@ export interface TriggerFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3337,8 +3316,6 @@ export interface UniqueConstraintFilter { fieldIds?: UUIDListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3383,8 +3360,6 @@ export interface ViewFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -3623,8 +3598,6 @@ export interface EnumFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -3657,8 +3630,6 @@ export interface CompositeTypeFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -3723,10 +3694,16 @@ export interface DomainFilter { apiId?: UUIDFilter; /** Filter by the object’s `siteId` field. */ siteId?: UUIDFilter; + /** Filter by the object’s `serviceId` field. */ + serviceId?: UUIDFilter; /** Filter by the object’s `subdomain` field. */ subdomain?: ConstructiveInternalTypeHostnameFilter; /** Filter by the object’s `domain` field. */ domain?: ConstructiveInternalTypeHostnameFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DomainFilter[]; /** Checks for any expressions in this list. */ @@ -3945,6 +3922,10 @@ export interface ApiFilter { anonRole?: StringFilter; /** Filter by the object’s `isPublic` field. */ isPublic?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: ApiFilter[]; /** Checks for any expressions in this list. */ @@ -3993,6 +3974,10 @@ export interface SiteFilter { logo?: ConstructiveInternalTypeImageFilter; /** Filter by the object’s `dbname` field. */ dbname?: StringFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: SiteFilter[]; /** Checks for any expressions in this list. */ @@ -4493,6 +4478,10 @@ export interface DatabaseSettingFilter { enableI18N?: BooleanFilter; /** Filter by the object’s `options` field. */ options?: JSONFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DatabaseSettingFilter[]; /** Checks for any expressions in this list. */ @@ -4651,8 +4640,6 @@ export type SchemaOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'IS_PUBLIC_ASC' @@ -4683,8 +4670,6 @@ export type TableOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'USE_RLS_ASC' | 'USE_RLS_DESC' | 'TIMESTAMPS_ASC' @@ -4733,8 +4718,6 @@ export type CheckConstraintOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4783,8 +4766,6 @@ export type FieldOrderBy = | 'TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' @@ -4813,8 +4794,6 @@ export type SpatialRelationOrderBy = | 'PARAM_NAME_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4851,8 +4830,6 @@ export type ForeignKeyConstraintOrderBy = | 'UPDATE_ACTION_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4915,8 +4892,6 @@ export type IndexOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4951,8 +4926,6 @@ export type PolicyOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4979,8 +4952,6 @@ export type PrimaryKeyConstraintOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -5029,8 +5000,6 @@ export type TriggerOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -5059,8 +5028,6 @@ export type UniqueConstraintOrderBy = | 'FIELD_IDS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -5097,8 +5064,6 @@ export type ViewOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; export type ViewTableOrderBy = @@ -5251,8 +5216,6 @@ export type EnumOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; export type CompositeTypeOrderBy = @@ -5277,8 +5240,6 @@ export type CompositeTypeOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; export type ApiSchemaOrderBy = @@ -5319,10 +5280,16 @@ export type DomainOrderBy = | 'API_ID_DESC' | 'SITE_ID_ASC' | 'SITE_ID_DESC' + | 'SERVICE_ID_ASC' + | 'SERVICE_ID_DESC' | 'SUBDOMAIN_ASC' | 'SUBDOMAIN_DESC' | 'DOMAIN_ASC' - | 'DOMAIN_DESC'; + | 'DOMAIN_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type SiteMetadatumOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5472,7 +5439,11 @@ export type ApiOrderBy = | 'ANON_ROLE_ASC' | 'ANON_ROLE_DESC' | 'IS_PUBLIC_ASC' - | 'IS_PUBLIC_DESC'; + | 'IS_PUBLIC_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type SiteOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5494,7 +5465,11 @@ export type SiteOrderBy = | 'LOGO_ASC' | 'LOGO_DESC' | 'DBNAME_ASC' - | 'DBNAME_DESC'; + | 'DBNAME_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type AppOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5706,7 +5681,11 @@ export type DatabaseSettingOrderBy = | 'ENABLE_I18N_ASC' | 'ENABLE_I18N_DESC' | 'OPTIONS_ASC' - | 'OPTIONS_DESC'; + | 'OPTIONS_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type WebauthnSettingOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5808,7 +5787,6 @@ export interface CreateSchemaInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; isPublic?: boolean; apiExposure?: ApiExposureLevel; @@ -5822,7 +5800,6 @@ export interface SchemaPatch { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; isPublic?: boolean | null; apiExposure?: ApiExposureLevel | null; @@ -5846,7 +5823,6 @@ export interface CreateTableInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; useRls?: boolean; timestamps?: boolean; peoplestamps?: boolean; @@ -5868,7 +5844,6 @@ export interface TablePatch { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; useRls?: boolean | null; timestamps?: boolean | null; peoplestamps?: boolean | null; @@ -5901,7 +5876,6 @@ export interface CreateCheckConstraintInput { expr?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -5914,7 +5888,6 @@ export interface CheckConstraintPatch { expr?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateCheckConstraintInput { @@ -5947,7 +5920,6 @@ export interface CreateFieldInput { max?: number; tags?: string[]; category?: ObjectCategory; - scope?: number; }; } export interface FieldPatch { @@ -5969,7 +5941,6 @@ export interface FieldPatch { max?: number | null; tags?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; } export interface UpdateFieldInput { clientMutationId?: string; @@ -5992,7 +5963,6 @@ export interface CreateSpatialRelationInput { operator: string; paramName?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6006,7 +5976,6 @@ export interface SpatialRelationPatch { operator?: string | null; paramName?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateSpatialRelationInput { @@ -6033,7 +6002,6 @@ export interface CreateForeignKeyConstraintInput { deleteAction?: string; updateAction?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6050,7 +6018,6 @@ export interface ForeignKeyConstraintPatch { deleteAction?: string | null; updateAction?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateForeignKeyConstraintInput { @@ -6108,7 +6075,6 @@ export interface CreateIndexInput { opClasses?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6126,7 +6092,6 @@ export interface IndexPatch { opClasses?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateIndexInput { @@ -6152,7 +6117,6 @@ export interface CreatePolicyInput { data?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6168,7 +6132,6 @@ export interface PolicyPatch { data?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdatePolicyInput { @@ -6190,7 +6153,6 @@ export interface CreatePrimaryKeyConstraintInput { fieldIds: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6202,7 +6164,6 @@ export interface PrimaryKeyConstraintPatch { fieldIds?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdatePrimaryKeyConstraintInput { @@ -6252,7 +6213,6 @@ export interface CreateTriggerInput { functionName?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6264,7 +6224,6 @@ export interface TriggerPatch { functionName?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateTriggerInput { @@ -6287,7 +6246,6 @@ export interface CreateUniqueConstraintInput { type?: string; fieldIds: string[]; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6300,7 +6258,6 @@ export interface UniqueConstraintPatch { type?: string | null; fieldIds?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateUniqueConstraintInput { @@ -6327,7 +6284,6 @@ export interface CreateViewInput { isReadOnly?: boolean; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6344,7 +6300,6 @@ export interface ViewPatch { isReadOnly?: boolean | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateViewInput { @@ -6547,7 +6502,6 @@ export interface CreateEnumInput { values?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6560,7 +6514,6 @@ export interface EnumPatch { values?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateEnumInput { @@ -6583,7 +6536,6 @@ export interface CreateCompositeTypeInput { attributes?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6596,7 +6548,6 @@ export interface CompositeTypePatch { attributes?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateCompositeTypeInput { @@ -6660,16 +6611,22 @@ export interface CreateDomainInput { databaseId: string; apiId?: string; siteId?: string; + serviceId?: string; subdomain?: ConstructiveInternalTypeHostname; domain?: ConstructiveInternalTypeHostname; + labels?: Record; + annotations?: Record; }; } export interface DomainPatch { databaseId?: string | null; apiId?: string | null; siteId?: string | null; + serviceId?: string | null; subdomain?: ConstructiveInternalTypeHostname | null; domain?: ConstructiveInternalTypeHostname | null; + labels?: Record | null; + annotations?: Record | null; } export interface UpdateDomainInput { clientMutationId?: string; @@ -6880,6 +6837,8 @@ export interface CreateApiInput { roleName?: string; anonRole?: string; isPublic?: boolean; + labels?: Record; + annotations?: Record; }; } export interface ApiPatch { @@ -6889,6 +6848,8 @@ export interface ApiPatch { roleName?: string | null; anonRole?: string | null; isPublic?: boolean | null; + labels?: Record | null; + annotations?: Record | null; } export interface UpdateApiInput { clientMutationId?: string; @@ -6910,6 +6871,8 @@ export interface CreateSiteInput { appleTouchIcon?: ConstructiveInternalTypeImage; logo?: ConstructiveInternalTypeImage; dbname?: string; + labels?: Record; + annotations?: Record; }; } export interface SitePatch { @@ -6921,6 +6884,8 @@ export interface SitePatch { appleTouchIcon?: ConstructiveInternalTypeImage | null; logo?: ConstructiveInternalTypeImage | null; dbname?: string | null; + labels?: Record | null; + annotations?: Record | null; ogImageUpload?: File | null; faviconUpload?: File | null; appleTouchIconUpload?: File | null; @@ -7211,6 +7176,8 @@ export interface CreateDatabaseSettingInput { enableBulk?: boolean; enableI18N?: boolean; options?: Record; + labels?: Record; + annotations?: Record; }; } export interface DatabaseSettingPatch { @@ -7228,6 +7195,8 @@ export interface DatabaseSettingPatch { enableBulk?: boolean | null; enableI18N?: boolean | null; options?: Record | null; + labels?: Record | null; + annotations?: Record | null; } export interface UpdateDatabaseSettingInput { clientMutationId?: string; @@ -8488,7 +8457,6 @@ export interface SchemaInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; isPublic?: boolean; apiExposure?: ApiExposureLevel; @@ -8505,7 +8473,6 @@ export interface TableInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; useRls?: boolean; timestamps?: boolean; peoplestamps?: boolean; @@ -8531,7 +8498,6 @@ export interface CheckConstraintInput { expr?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8557,7 +8523,6 @@ export interface FieldInput { max?: number; tags?: string[]; category?: ObjectCategory; - scope?: number; createdAt?: string; updatedAt?: string; } @@ -8573,7 +8538,6 @@ export interface SpatialRelationInput { operator: string; paramName?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8593,7 +8557,6 @@ export interface ForeignKeyConstraintInput { deleteAction?: string; updateAction?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8627,7 +8590,6 @@ export interface IndexInput { opClasses?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8646,7 +8608,6 @@ export interface PolicyInput { data?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8661,7 +8622,6 @@ export interface PrimaryKeyConstraintInput { fieldIds: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8688,7 +8648,6 @@ export interface TriggerInput { functionName?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8704,7 +8663,6 @@ export interface UniqueConstraintInput { type?: string; fieldIds: string[]; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8724,7 +8682,6 @@ export interface ViewInput { isReadOnly?: boolean; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; } /** An input for mutations affecting `ViewTable` */ @@ -8810,7 +8767,6 @@ export interface EnumInput { values?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; } /** An input for mutations affecting `CompositeType` */ @@ -8824,7 +8780,6 @@ export interface CompositeTypeInput { attributes?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; } /** An input for mutations affecting `ApiSchema` */ @@ -8859,12 +8814,18 @@ export interface DomainInput { databaseId: string; /** API endpoint this domain routes to (mutually exclusive with site_id) */ apiId?: string; - /** Site this domain routes to (mutually exclusive with api_id) */ + /** Site this domain routes to (mutually exclusive with api_id and service_id) */ siteId?: string; + /** Server deployment this domain routes to (mutually exclusive with api_id and site_id) */ + serviceId?: string; /** Subdomain portion of the hostname */ subdomain?: ConstructiveInternalTypeHostname; /** Root domain of the hostname */ domain?: ConstructiveInternalTypeHostname; + /** Key/value pairs for selecting and filtering domains */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `SiteMetadatum` */ export interface SiteMetadatumInput { @@ -8974,6 +8935,10 @@ export interface ApiInput { anonRole?: string; /** Whether this API is publicly accessible without authentication */ isPublic?: boolean; + /** Key/value pairs for selecting and filtering APIs */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `Site` */ export interface SiteInput { @@ -8995,6 +8960,10 @@ export interface SiteInput { logo?: ConstructiveInternalTypeImage; /** PostgreSQL database name this site connects to */ dbname?: string; + /** Key/value pairs for selecting and filtering sites */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `App` */ export interface AppInput { @@ -9171,6 +9140,10 @@ export interface DatabaseSettingInput { enableI18N?: boolean; /** Extensible JSON for additional settings that do not have dedicated columns */ options?: Record; + /** Key/value pairs for selecting and filtering database settings */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `WebauthnSetting` */ export interface WebauthnSettingInput { @@ -9264,8 +9237,6 @@ export interface TableFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `useRls` field. */ useRls?: BooleanFilter; /** Filter by the object’s `timestamps` field. */ @@ -9428,8 +9399,6 @@ export interface ViewFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -9506,8 +9475,6 @@ export interface EnumFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -9562,8 +9529,6 @@ export interface CompositeTypeFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -9620,8 +9585,6 @@ export interface CheckConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9679,8 +9642,6 @@ export interface FieldFilter { tags?: StringListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ @@ -9732,8 +9693,6 @@ export interface ForeignKeyConstraintFilter { updateAction?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9816,8 +9775,6 @@ export interface IndexFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9861,8 +9818,6 @@ export interface PolicyFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9898,8 +9853,6 @@ export interface PrimaryKeyConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9966,8 +9919,6 @@ export interface TriggerFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -10005,8 +9956,6 @@ export interface UniqueConstraintFilter { fieldIds?: UUIDListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -10138,8 +10087,6 @@ export interface SpatialRelationFilter { paramName?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -10246,10 +10193,16 @@ export interface DomainFilter { apiId?: UUIDFilter; /** Filter by the object’s `siteId` field. */ siteId?: UUIDFilter; + /** Filter by the object’s `serviceId` field. */ + serviceId?: UUIDFilter; /** Filter by the object’s `subdomain` field. */ subdomain?: ConstructiveInternalTypeHostnameFilter; /** Filter by the object’s `domain` field. */ domain?: ConstructiveInternalTypeHostnameFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DomainFilter[]; /** Checks for any expressions in this list. */ @@ -10375,8 +10328,6 @@ export interface SchemaFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `isPublic` field. */ @@ -10547,6 +10498,10 @@ export interface ApiFilter { anonRole?: StringFilter; /** Filter by the object’s `isPublic` field. */ isPublic?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: ApiFilter[]; /** Checks for any expressions in this list. */ @@ -10596,6 +10551,10 @@ export interface SiteFilter { logo?: ConstructiveInternalTypeImageFilter; /** Filter by the object’s `dbname` field. */ dbname?: StringFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: SiteFilter[]; /** Checks for any expressions in this list. */ @@ -10838,31 +10797,6 @@ export interface JSONFilter { /** Contained by the specified JSON. */ containedBy?: Record; } -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: number; - /** Not equal to the specified value. */ - notEqualTo?: number; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; - /** Included in the specified list. */ - in?: number[]; - /** Not included in the specified list. */ - notIn?: number[]; - /** Less than the specified value. */ - lessThan?: number; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; - /** Greater than the specified value. */ - greaterThan?: number; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; -} /** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ export interface BooleanFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -11180,6 +11114,31 @@ export interface UUIDListFilter { /** Any array item is greater than or equal to the specified value. */ anyGreaterThanOrEqualTo?: string; } +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Included in the specified list. */ + in?: number[]; + /** Not included in the specified list. */ + notIn?: number[]; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; +} /** A filter to be used against Float fields. All fields are combined with a logical ‘and.’ */ export interface FloatFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -11237,6 +11196,10 @@ export interface DatabaseSettingFilter { enableI18N?: BooleanFilter; /** Filter by the object’s `options` field. */ options?: JSONFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DatabaseSettingFilter[]; /** Checks for any expressions in this list. */ diff --git a/sdk/constructive-cli/src/auth/README.md b/sdk/constructive-cli/src/auth/README.md index 5cc6a423b0..1dae886a2c 100644 --- a/sdk/constructive-cli/src/auth/README.md +++ b/sdk/constructive-cli/src/auth/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 9 +- **Tables:** 13 - **Custom queries:** 5 -- **Custom mutations:** 25 +- **Custom mutations:** 29 **Generators:** ORM, CLI diff --git a/sdk/constructive-cli/src/auth/cli/README.md b/sdk/constructive-cli/src/auth/cli/README.md index b14c5ba242..255ee197d5 100644 --- a/sdk/constructive-cli/src/auth/cli/README.md +++ b/sdk/constructive-cli/src/auth/cli/README.md @@ -26,6 +26,9 @@ csdk auth set-token | `context` | Manage API contexts (endpoints) | | `auth` | Manage authentication tokens | | `config` | Manage config key-value store (per-context) | +| `principal` | principal CRUD operations | +| `principal-entity` | principalEntity CRUD operations | +| `principal-scope-override` | principalScopeOverride CRUD operations | | `email` | email CRUD operations | | `phone-number` | phoneNumber CRUD operations | | `crypto-address` | cryptoAddress CRUD operations | @@ -34,21 +37,24 @@ csdk auth set-token | `identity-provider` | identityProvider CRUD operations | | `role-type` | roleType CRUD operations | | `user-connected-account` | userConnectedAccount CRUD operations | +| `org-api-key-list` | orgApiKeyList CRUD operations | | `user` | user CRUD operations | | `current-user-agent` | currentUserAgent | -| `current-ip-address` | currentIpAddress | | `current-user-id` | currentUserId | +| `current-ip-address` | currentIpAddress | | `require-step-up` | requireStepUp | | `current-user` | currentUser | | `sign-out` | signOut | | `send-account-deletion-email` | sendAccountDeletionEmail | | `check-password` | checkPassword | +| `delete-org-principal` | deleteOrgPrincipal | | `disconnect-account` | disconnectAccount | | `revoke-api-key` | revokeApiKey | | `revoke-session` | revokeSession | | `verify-password` | verifyPassword | | `verify-totp` | verifyTotp | | `confirm-delete-account` | confirmDeleteAccount | +| `revoke-org-api-key` | revokeOrgApiKey | | `set-password` | setPassword | | `verify-email` | verifyEmail | | `provision-new-user` | provisionNewUser | @@ -59,7 +65,9 @@ csdk auth set-token | `sign-up` | signUp | | `sign-in` | signIn | | `link-identity` | linkIdentity | +| `create-org-principal` | createOrgPrincipal | | `extend-token-expires` | extendTokenExpires | +| `create-org-api-key` | createOrgApiKey | | `create-api-key` | createApiKey | | `request-cross-origin-token` | requestCrossOriginToken | | `forgot-password` | forgotPassword | @@ -110,6 +118,89 @@ Variables are scoped to the active context and stored at `~/.csdk/config/`. ## Table Commands +### `principal` + +CRUD operations for Principal records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all principal records | +| `find-first` | Find first matching principal record | +| `get` | Get a principal by principalId | +| `create` | Create a new principal | +| `update` | Update an existing principal | +| `delete` | Delete a principal | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | +| `ownerId` | UUID | +| `userId` | UUID | +| `name` | String | +| `allowedMask` | BitString | +| `isReadOnly` | Boolean | +| `bypassStepUp` | Boolean | + +**Required create fields:** `id`, `ownerId`, `userId`, `name`, `allowedMask`, `isReadOnly`, `bypassStepUp` + +### `principal-entity` + +CRUD operations for PrincipalEntity records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all principalEntity records | +| `find-first` | Find first matching principalEntity record | +| `get` | Get a principalEntity by id | +| `create` | Create a new principalEntity | +| `update` | Update an existing principalEntity | +| `delete` | Delete a principalEntity | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | +| `principalId` | UUID | +| `entityId` | UUID | +| `ownerId` | UUID | + +**Required create fields:** `principalId`, `entityId`, `ownerId` + +### `principal-scope-override` + +CRUD operations for PrincipalScopeOverride records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all principalScopeOverride records | +| `find-first` | Find first matching principalScopeOverride record | +| `get` | Get a principalScopeOverride by id | +| `create` | Create a new principalScopeOverride | +| `update` | Update an existing principalScopeOverride | +| `delete` | Delete a principalScopeOverride | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | +| `principalId` | UUID | +| `membershipType` | Int | +| `allowedMask` | BitString | +| `isAdmin` | Boolean | +| `isReadOnly` | Boolean | + +**Required create fields:** `principalId`, `membershipType`, `allowedMask`, `isAdmin`, `isReadOnly` + ### `email` CRUD operations for Email records. @@ -337,6 +428,38 @@ CRUD operations for UserConnectedAccount records. **Optional create fields (backend defaults):** `ownerId`, `service`, `identifier`, `details`, `isVerified` +### `org-api-key-list` + +CRUD operations for OrgApiKeyList records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all orgApiKeyList records | +| `find-first` | Find first matching orgApiKeyList record | +| `get` | Get a orgApiKeyList by id | +| `create` | Create a new orgApiKeyList | +| `update` | Update an existing orgApiKeyList | +| `delete` | Delete a orgApiKeyList | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `keyId` | String | +| `name` | String | +| `principalId` | UUID | +| `orgId` | UUID | +| `expiresAt` | Datetime | +| `revokedAt` | Datetime | +| `lastUsedAt` | Datetime | +| `mfaLevel` | String | +| `accessLevel` | String | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | + +**Optional create fields (backend defaults):** `keyId`, `name`, `principalId`, `orgId`, `expiresAt`, `revokedAt`, `lastUsedAt`, `mfaLevel`, `accessLevel` + ### `user` CRUD operations for User records. @@ -404,16 +527,16 @@ currentUserAgent - **Type:** query - **Arguments:** none -### `current-ip-address` +### `current-user-id` -currentIpAddress +currentUserId - **Type:** query - **Arguments:** none -### `current-user-id` +### `current-ip-address` -currentUserId +currentIpAddress - **Type:** query - **Arguments:** none @@ -470,6 +593,18 @@ checkPassword | `--input.clientMutationId` | String | | `--input.password` | String | +### `delete-org-principal` + +deleteOrgPrincipal + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.principalId` | UUID | + ### `disconnect-account` disconnectAccount @@ -543,6 +678,19 @@ confirmDeleteAccount | `--input.userId` | UUID | | `--input.token` | String | +### `revoke-org-api-key` + +revokeOrgApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.keyId` | UUID (required) | + | `--input.orgId` | UUID (required) | + ### `set-password` setPassword @@ -689,6 +837,22 @@ linkIdentity | `--input.identifier` | String (required) | | `--input.details` | JSON | +### `create-org-principal` + +createOrgPrincipal + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.name` | String | + | `--input.orgId` | UUID | + | `--input.allowedMask` | BitString | + | `--input.isReadOnly` | Boolean | + | `--input.bypassStepUp` | Boolean | + ### `extend-token-expires` extendTokenExpires @@ -701,6 +865,23 @@ extendTokenExpires | `--input.clientMutationId` | String | | `--input.amount` | IntervalInput | +### `create-org-api-key` + +createOrgApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.orgId` | UUID | + | `--input.principalId` | UUID | + | `--input.keyName` | String | + | `--input.accessLevel` | String | + | `--input.mfaLevel` | String | + | `--input.expiresIn` | IntervalInput | + ### `create-api-key` createApiKey @@ -715,6 +896,7 @@ createApiKey | `--input.accessLevel` | String | | `--input.mfaLevel` | String | | `--input.expiresIn` | IntervalInput | + | `--input.principalId` | UUID | ### `request-cross-origin-token` diff --git a/sdk/constructive-cli/src/auth/cli/commands.ts b/sdk/constructive-cli/src/auth/cli/commands.ts index 9c156a2a84..508fa2de57 100644 --- a/sdk/constructive-cli/src/auth/cli/commands.ts +++ b/sdk/constructive-cli/src/auth/cli/commands.ts @@ -6,6 +6,9 @@ import { CLIOptions, Inquirerer, extractFirst } from 'inquirerer'; import contextCmd from './commands/context'; import authCmd from './commands/auth'; +import principalCmd from './commands/principal'; +import principalEntityCmd from './commands/principal-entity'; +import principalScopeOverrideCmd from './commands/principal-scope-override'; import emailCmd from './commands/email'; import phoneNumberCmd from './commands/phone-number'; import cryptoAddressCmd from './commands/crypto-address'; @@ -14,21 +17,24 @@ import auditLogAuthCmd from './commands/audit-log-auth'; import identityProviderCmd from './commands/identity-provider'; import roleTypeCmd from './commands/role-type'; import userConnectedAccountCmd from './commands/user-connected-account'; +import orgApiKeyListCmd from './commands/org-api-key-list'; import userCmd from './commands/user'; import currentUserAgentCmd from './commands/current-user-agent'; -import currentIpAddressCmd from './commands/current-ip-address'; import currentUserIdCmd from './commands/current-user-id'; +import currentIpAddressCmd from './commands/current-ip-address'; import requireStepUpCmd from './commands/require-step-up'; import currentUserCmd from './commands/current-user'; import signOutCmd from './commands/sign-out'; import sendAccountDeletionEmailCmd from './commands/send-account-deletion-email'; import checkPasswordCmd from './commands/check-password'; +import deleteOrgPrincipalCmd from './commands/delete-org-principal'; import disconnectAccountCmd from './commands/disconnect-account'; import revokeApiKeyCmd from './commands/revoke-api-key'; import revokeSessionCmd from './commands/revoke-session'; import verifyPasswordCmd from './commands/verify-password'; import verifyTotpCmd from './commands/verify-totp'; import confirmDeleteAccountCmd from './commands/confirm-delete-account'; +import revokeOrgApiKeyCmd from './commands/revoke-org-api-key'; import setPasswordCmd from './commands/set-password'; import verifyEmailCmd from './commands/verify-email'; import provisionNewUserCmd from './commands/provision-new-user'; @@ -39,7 +45,9 @@ import signUpSmsCmd from './commands/sign-up-sms'; import signUpCmd from './commands/sign-up'; import signInCmd from './commands/sign-in'; import linkIdentityCmd from './commands/link-identity'; +import createOrgPrincipalCmd from './commands/create-org-principal'; import extendTokenExpiresCmd from './commands/extend-token-expires'; +import createOrgApiKeyCmd from './commands/create-org-api-key'; import createApiKeyCmd from './commands/create-api-key'; import requestCrossOriginTokenCmd from './commands/request-cross-origin-token'; import forgotPasswordCmd from './commands/forgot-password'; @@ -55,6 +63,9 @@ const createCommandMap: () => Record< > = () => ({ context: contextCmd, auth: authCmd, + principal: principalCmd, + 'principal-entity': principalEntityCmd, + 'principal-scope-override': principalScopeOverrideCmd, email: emailCmd, 'phone-number': phoneNumberCmd, 'crypto-address': cryptoAddressCmd, @@ -63,21 +74,24 @@ const createCommandMap: () => Record< 'identity-provider': identityProviderCmd, 'role-type': roleTypeCmd, 'user-connected-account': userConnectedAccountCmd, + 'org-api-key-list': orgApiKeyListCmd, user: userCmd, 'current-user-agent': currentUserAgentCmd, - 'current-ip-address': currentIpAddressCmd, 'current-user-id': currentUserIdCmd, + 'current-ip-address': currentIpAddressCmd, 'require-step-up': requireStepUpCmd, 'current-user': currentUserCmd, 'sign-out': signOutCmd, 'send-account-deletion-email': sendAccountDeletionEmailCmd, 'check-password': checkPasswordCmd, + 'delete-org-principal': deleteOrgPrincipalCmd, 'disconnect-account': disconnectAccountCmd, 'revoke-api-key': revokeApiKeyCmd, 'revoke-session': revokeSessionCmd, 'verify-password': verifyPasswordCmd, 'verify-totp': verifyTotpCmd, 'confirm-delete-account': confirmDeleteAccountCmd, + 'revoke-org-api-key': revokeOrgApiKeyCmd, 'set-password': setPasswordCmd, 'verify-email': verifyEmailCmd, 'provision-new-user': provisionNewUserCmd, @@ -88,7 +102,9 @@ const createCommandMap: () => Record< 'sign-up': signUpCmd, 'sign-in': signInCmd, 'link-identity': linkIdentityCmd, + 'create-org-principal': createOrgPrincipalCmd, 'extend-token-expires': extendTokenExpiresCmd, + 'create-org-api-key': createOrgApiKeyCmd, 'create-api-key': createApiKeyCmd, 'request-cross-origin-token': requestCrossOriginTokenCmd, 'forgot-password': forgotPasswordCmd, @@ -96,7 +112,7 @@ const createCommandMap: () => Record< 'provision-bucket': provisionBucketCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n webauthn-credential webauthnCredential CRUD operations\n audit-log-auth auditLogAuth CRUD operations\n identity-provider identityProvider CRUD operations\n role-type roleType CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n user user CRUD operations\n current-user-agent currentUserAgent\n current-ip-address currentIpAddress\n current-user-id currentUserId\n require-step-up requireStepUp\n current-user currentUser\n sign-out signOut\n send-account-deletion-email sendAccountDeletionEmail\n check-password checkPassword\n disconnect-account disconnectAccount\n revoke-api-key revokeApiKey\n revoke-session revokeSession\n verify-password verifyPassword\n verify-totp verifyTotp\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n provision-new-user provisionNewUser\n reset-password resetPassword\n sign-in-cross-origin signInCrossOrigin\n sign-in-sms-otp signInSmsOtp\n sign-up-sms signUpSms\n sign-up signUp\n sign-in signIn\n link-identity linkIdentity\n extend-token-expires extendTokenExpires\n create-api-key createApiKey\n request-cross-origin-token requestCrossOriginToken\n forgot-password forgotPassword\n send-verification-email sendVerificationEmail\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n'; + '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n principal principal CRUD operations\n principal-entity principalEntity CRUD operations\n principal-scope-override principalScopeOverride CRUD operations\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n webauthn-credential webauthnCredential CRUD operations\n audit-log-auth auditLogAuth CRUD operations\n identity-provider identityProvider CRUD operations\n role-type roleType CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n org-api-key-list orgApiKeyList CRUD operations\n user user CRUD operations\n current-user-agent currentUserAgent\n current-user-id currentUserId\n current-ip-address currentIpAddress\n require-step-up requireStepUp\n current-user currentUser\n sign-out signOut\n send-account-deletion-email sendAccountDeletionEmail\n check-password checkPassword\n delete-org-principal deleteOrgPrincipal\n disconnect-account disconnectAccount\n revoke-api-key revokeApiKey\n revoke-session revokeSession\n verify-password verifyPassword\n verify-totp verifyTotp\n confirm-delete-account confirmDeleteAccount\n revoke-org-api-key revokeOrgApiKey\n set-password setPassword\n verify-email verifyEmail\n provision-new-user provisionNewUser\n reset-password resetPassword\n sign-in-cross-origin signInCrossOrigin\n sign-in-sms-otp signInSmsOtp\n sign-up-sms signUpSms\n sign-up signUp\n sign-in signIn\n link-identity linkIdentity\n create-org-principal createOrgPrincipal\n extend-token-expires extendTokenExpires\n create-org-api-key createOrgApiKey\n create-api-key createApiKey\n request-cross-origin-token requestCrossOriginToken\n forgot-password forgotPassword\n send-verification-email sendVerificationEmail\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n'; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/auth/cli/commands/create-org-api-key.ts b/sdk/constructive-cli/src/auth/cli/commands/create-org-api-key.ts new file mode 100644 index 0000000000..ff4135e4d9 --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/create-org-api-key.ts @@ -0,0 +1,51 @@ +/** + * CLI command for mutation createOrgApiKey + * @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 { CreateOrgApiKeyVariables } from '../../orm/mutation'; +import type { CreateOrgApiKeyPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('create-org-api-key - createOrgApiKey\n\nUsage: create-org-api-key [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 + .createOrgApiKey( + parsedAnswers as unknown as CreateOrgApiKeyVariables, + { + select: selectFields, + } as unknown as { + select: CreateOrgApiKeyPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: createOrgApiKey'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/auth/cli/commands/create-org-principal.ts b/sdk/constructive-cli/src/auth/cli/commands/create-org-principal.ts new file mode 100644 index 0000000000..2c4547f1d6 --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/create-org-principal.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation createOrgPrincipal + * @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 { CreateOrgPrincipalVariables } from '../../orm/mutation'; +import type { CreateOrgPrincipalPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'create-org-principal - createOrgPrincipal\n\nUsage: create-org-principal [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 + .createOrgPrincipal( + parsedAnswers as unknown as CreateOrgPrincipalVariables, + { + select: selectFields, + } as unknown as { + select: CreateOrgPrincipalPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: createOrgPrincipal'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/auth/cli/commands/delete-org-principal.ts b/sdk/constructive-cli/src/auth/cli/commands/delete-org-principal.ts new file mode 100644 index 0000000000..a3b2dd94ef --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/delete-org-principal.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation deleteOrgPrincipal + * @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 { DeleteOrgPrincipalVariables } from '../../orm/mutation'; +import type { DeleteOrgPrincipalPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'delete-org-principal - deleteOrgPrincipal\n\nUsage: delete-org-principal [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 + .deleteOrgPrincipal( + parsedAnswers as unknown as DeleteOrgPrincipalVariables, + { + select: selectFields, + } as unknown as { + select: DeleteOrgPrincipalPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: deleteOrgPrincipal'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/auth/cli/commands/org-api-key-list.ts b/sdk/constructive-cli/src/auth/cli/commands/org-api-key-list.ts new file mode 100644 index 0000000000..a64679ed1d --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/org-api-key-list.ts @@ -0,0 +1,248 @@ +/** + * CLI commands for OrgApiKeyList + * @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 { + CreateOrgApiKeyListInput, + OrgApiKeyListPatch, + OrgApiKeyListSelect, + OrgApiKeyListFilter, + OrgApiKeyListOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + keyId: 'string', + name: 'string', + principalId: 'uuid', + orgId: 'uuid', + expiresAt: 'string', + revokedAt: 'string', + lastUsedAt: 'string', + mfaLevel: 'string', + accessLevel: 'string', + createdAt: 'string', + updatedAt: 'string', +}; +const usage = + '\norg-api-key-list \n\nCommands:\n list List orgApiKeyList records\n find-first Find first matching orgApiKeyList record\n create Create a new orgApiKeyList\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', 'create'], + }, + ]); + 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 'create': + return handleCreate(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + keyId: true, + name: true, + principalId: true, + orgId: true, + expiresAt: true, + revokedAt: true, + lastUsedAt: true, + mfaLevel: true, + accessLevel: true, + createdAt: true, + updatedAt: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs & { + select: OrgApiKeyListSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.orgApiKeyList.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 = { + id: true, + keyId: true, + name: true, + principalId: true, + orgId: true, + expiresAt: true, + revokedAt: true, + lastUsedAt: true, + mfaLevel: true, + accessLevel: true, + createdAt: true, + updatedAt: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: OrgApiKeyListSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.orgApiKeyList.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 handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'keyId', + message: 'keyId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'name', + message: 'name', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'principalId', + message: 'principalId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'orgId', + message: 'orgId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'expiresAt', + message: 'expiresAt', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'revokedAt', + message: 'revokedAt', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'lastUsedAt', + message: 'lastUsedAt', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'mfaLevel', + message: 'mfaLevel', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'accessLevel', + message: 'accessLevel', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreateOrgApiKeyListInput['orgApiKeyList']; + const client = getClient(); + const result = await client.orgApiKeyList + .create({ + data: { + keyId: cleanedData.keyId, + name: cleanedData.name, + principalId: cleanedData.principalId, + orgId: cleanedData.orgId, + expiresAt: cleanedData.expiresAt, + revokedAt: cleanedData.revokedAt, + lastUsedAt: cleanedData.lastUsedAt, + mfaLevel: cleanedData.mfaLevel, + accessLevel: cleanedData.accessLevel, + }, + select: { + id: true, + keyId: true, + name: true, + principalId: true, + orgId: true, + expiresAt: true, + revokedAt: true, + lastUsedAt: true, + mfaLevel: true, + accessLevel: true, + createdAt: 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); + } +} diff --git a/sdk/constructive-cli/src/auth/cli/commands/principal-entity.ts b/sdk/constructive-cli/src/auth/cli/commands/principal-entity.ts new file mode 100644 index 0000000000..449a295940 --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/principal-entity.ts @@ -0,0 +1,303 @@ +/** + * CLI commands for PrincipalEntity + * @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 { + CreatePrincipalEntityInput, + PrincipalEntityPatch, + PrincipalEntitySelect, + PrincipalEntityFilter, + PrincipalEntityOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + createdAt: 'string', + updatedAt: 'string', + principalId: 'uuid', + entityId: 'uuid', + ownerId: 'uuid', +}; +const usage = + '\nprincipal-entity \n\nCommands:\n list List principalEntity records\n find-first Find first matching principalEntity record\n get Get a principalEntity by ID\n create Create a new principalEntity\n update Update an existing principalEntity\n delete Delete a principalEntity\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 = { + id: true, + createdAt: true, + updatedAt: true, + principalId: true, + entityId: true, + ownerId: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs & { + select: PrincipalEntitySelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.principalEntity.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 = { + id: true, + createdAt: true, + updatedAt: true, + principalId: true, + entityId: true, + ownerId: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: PrincipalEntitySelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.principalEntity.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.principalEntity + .findOne({ + id: answers.id as string, + select: { + id: true, + createdAt: true, + updatedAt: true, + principalId: true, + entityId: true, + ownerId: 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: 'principalId', + message: 'principalId', + required: true, + }, + { + type: 'text', + name: 'entityId', + message: 'entityId', + required: true, + }, + { + type: 'text', + name: 'ownerId', + message: 'ownerId', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreatePrincipalEntityInput['principalEntity']; + const client = getClient(); + const result = await client.principalEntity + .create({ + data: { + principalId: cleanedData.principalId, + entityId: cleanedData.entityId, + ownerId: cleanedData.ownerId, + }, + select: { + id: true, + createdAt: true, + updatedAt: true, + principalId: true, + entityId: true, + ownerId: 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: 'principalId', + message: 'principalId', + required: false, + }, + { + type: 'text', + name: 'entityId', + message: 'entityId', + required: false, + }, + { + type: 'text', + name: 'ownerId', + message: 'ownerId', + required: false, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as PrincipalEntityPatch; + const client = getClient(); + const result = await client.principalEntity + .update({ + where: { + id: answers.id as string, + }, + data: { + principalId: cleanedData.principalId, + entityId: cleanedData.entityId, + ownerId: cleanedData.ownerId, + }, + select: { + id: true, + createdAt: true, + updatedAt: true, + principalId: true, + entityId: true, + ownerId: 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.principalEntity + .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/auth/cli/commands/principal-scope-override.ts b/sdk/constructive-cli/src/auth/cli/commands/principal-scope-override.ts new file mode 100644 index 0000000000..a23cc5a4ef --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/principal-scope-override.ts @@ -0,0 +1,203 @@ +/** + * CLI commands for PrincipalScopeOverride + * @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 { + CreatePrincipalScopeOverrideInput, + PrincipalScopeOverridePatch, + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + createdAt: 'string', + updatedAt: 'string', + principalId: 'uuid', + membershipType: 'int', + allowedMask: 'string', + isAdmin: 'boolean', + isReadOnly: 'boolean', +}; +const usage = + '\nprincipal-scope-override \n\nCommands:\n list List principalScopeOverride records\n find-first Find first matching principalScopeOverride record\n create Create a new principalScopeOverride\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', 'create'], + }, + ]); + 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 'create': + return handleCreate(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + createdAt: true, + updatedAt: true, + principalId: true, + membershipType: true, + allowedMask: true, + isAdmin: true, + isReadOnly: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs< + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy + > & { + select: PrincipalScopeOverrideSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.principalScopeOverride.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 = { + id: true, + createdAt: true, + updatedAt: true, + principalId: true, + membershipType: true, + allowedMask: true, + isAdmin: true, + isReadOnly: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs< + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy + > & { + select: PrincipalScopeOverrideSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.principalScopeOverride.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 handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'principalId', + message: 'principalId', + required: true, + }, + { + type: 'text', + name: 'membershipType', + message: 'membershipType', + required: true, + }, + { + type: 'text', + name: 'allowedMask', + message: 'allowedMask', + required: true, + }, + { + type: 'boolean', + name: 'isAdmin', + message: 'isAdmin', + required: true, + }, + { + type: 'boolean', + name: 'isReadOnly', + message: 'isReadOnly', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreatePrincipalScopeOverrideInput['principalScopeOverride']; + const client = getClient(); + const result = await client.principalScopeOverride + .create({ + data: { + principalId: cleanedData.principalId, + membershipType: cleanedData.membershipType, + allowedMask: cleanedData.allowedMask, + isAdmin: cleanedData.isAdmin, + isReadOnly: cleanedData.isReadOnly, + }, + select: { + id: true, + createdAt: true, + updatedAt: true, + principalId: true, + membershipType: true, + allowedMask: true, + isAdmin: true, + isReadOnly: 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); + } +} diff --git a/sdk/constructive-cli/src/auth/cli/commands/principal.ts b/sdk/constructive-cli/src/auth/cli/commands/principal.ts new file mode 100644 index 0000000000..b3b742cc78 --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/principal.ts @@ -0,0 +1,274 @@ +/** + * CLI commands for Principal + * @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 { + CreatePrincipalInput, + PrincipalPatch, + PrincipalSelect, + PrincipalFilter, + PrincipalOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + createdAt: 'string', + updatedAt: 'string', + ownerId: 'uuid', + userId: 'uuid', + name: 'string', + allowedMask: 'string', + isReadOnly: 'boolean', + bypassStepUp: 'boolean', +}; +const usage = + '\nprincipal \n\nCommands:\n list List principal records\n find-first Find first matching principal record\n get Get a principal by ID\n create Create a new principal\n delete Delete a principal\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', '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 'delete': + return handleDelete(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + createdAt: true, + updatedAt: true, + ownerId: true, + userId: true, + name: true, + allowedMask: true, + isReadOnly: true, + bypassStepUp: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs & { + select: PrincipalSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.principal.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 = { + id: true, + createdAt: true, + updatedAt: true, + ownerId: true, + userId: true, + name: true, + allowedMask: true, + isReadOnly: true, + bypassStepUp: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: PrincipalSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.principal.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: 'principalId', + message: 'principalId', + required: true, + }, + ]); + const client = getClient(); + const result = await client.principal + .findOne({ + principalId: answers.principalId as string, + select: { + id: true, + createdAt: true, + updatedAt: true, + ownerId: true, + userId: true, + name: true, + allowedMask: true, + isReadOnly: true, + bypassStepUp: 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: 'ownerId', + message: 'ownerId', + required: true, + }, + { + type: 'text', + name: 'userId', + message: 'userId', + required: true, + }, + { + type: 'text', + name: 'name', + message: 'name', + required: true, + }, + { + type: 'text', + name: 'allowedMask', + message: 'allowedMask', + required: true, + }, + { + type: 'boolean', + name: 'isReadOnly', + message: 'isReadOnly', + required: true, + }, + { + type: 'boolean', + name: 'bypassStepUp', + message: 'bypassStepUp', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as CreatePrincipalInput['principal']; + const client = getClient(); + const result = await client.principal + .create({ + data: { + ownerId: cleanedData.ownerId, + userId: cleanedData.userId, + name: cleanedData.name, + allowedMask: cleanedData.allowedMask, + isReadOnly: cleanedData.isReadOnly, + bypassStepUp: cleanedData.bypassStepUp, + }, + select: { + id: true, + createdAt: true, + updatedAt: true, + ownerId: true, + userId: true, + name: true, + allowedMask: true, + isReadOnly: true, + bypassStepUp: 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 handleDelete(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'principalId', + message: 'principalId', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const client = getClient(); + const result = await client.principal + .delete({ + where: { + principalId: answers.principalId as string, + }, + select: { + principalId: 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/auth/cli/commands/revoke-org-api-key.ts b/sdk/constructive-cli/src/auth/cli/commands/revoke-org-api-key.ts new file mode 100644 index 0000000000..f7db2a1a7a --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/revoke-org-api-key.ts @@ -0,0 +1,51 @@ +/** + * CLI command for mutation revokeOrgApiKey + * @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 { RevokeOrgApiKeyVariables } from '../../orm/mutation'; +import type { RevokeOrgApiKeyPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('revoke-org-api-key - revokeOrgApiKey\n\nUsage: revoke-org-api-key [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 + .revokeOrgApiKey( + parsedAnswers as unknown as RevokeOrgApiKeyVariables, + { + select: selectFields, + } as unknown as { + select: RevokeOrgApiKeyPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: revokeOrgApiKey'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/auth/orm/README.md b/sdk/constructive-cli/src/auth/orm/README.md index 68bf0ce72d..343ccbb2bd 100644 --- a/sdk/constructive-cli/src/auth/orm/README.md +++ b/sdk/constructive-cli/src/auth/orm/README.md @@ -21,6 +21,9 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `principal` | findMany, findOne, create, update, delete | +| `principalEntity` | findMany, findOne, create, update, delete | +| `principalScopeOverride` | findMany, findOne, create, update, delete | | `email` | findMany, findOne, create, update, delete | | `phoneNumber` | findMany, findOne, create, update, delete | | `cryptoAddress` | findMany, findOne, create, update, delete | @@ -29,10 +32,118 @@ const db = createClient({ | `identityProvider` | findMany, findOne, create, update, delete | | `roleType` | findMany, findOne, create, update, delete | | `userConnectedAccount` | findMany, findOne, create, update, delete | +| `orgApiKeyList` | findMany, findOne, create, update, delete | | `user` | findMany, findOne, create, update, delete | ## Table Operations +### `db.principal` + +CRUD operations for Principal records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `ownerId` | UUID | Yes | +| `userId` | UUID | Yes | +| `name` | String | Yes | +| `allowedMask` | BitString | Yes | +| `isReadOnly` | Boolean | Yes | +| `bypassStepUp` | Boolean | Yes | + +**Operations:** + +```typescript +// List all principal records +const items = await db.principal.findMany({ select: { id: true, createdAt: true, updatedAt: true, ownerId: true, userId: true, name: true, allowedMask: true, isReadOnly: true, bypassStepUp: true } }).execute(); + +// Get one by principalId +const item = await db.principal.findOne({ principalId: '', select: { id: true, createdAt: true, updatedAt: true, ownerId: true, userId: true, name: true, allowedMask: true, isReadOnly: true, bypassStepUp: true } }).execute(); + +// Create +const created = await db.principal.create({ data: { id: '', ownerId: '', userId: '', name: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' }, select: { principalId: true } }).execute(); + +// Update +const updated = await db.principal.update({ where: { principalId: '' }, data: { id: '' }, select: { principalId: true } }).execute(); + +// Delete +const deleted = await db.principal.delete({ where: { principalId: '' } }).execute(); +``` + +### `db.principalEntity` + +CRUD operations for PrincipalEntity records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `principalId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `ownerId` | UUID | Yes | + +**Operations:** + +```typescript +// List all principalEntity records +const items = await db.principalEntity.findMany({ select: { id: true, createdAt: true, updatedAt: true, principalId: true, entityId: true, ownerId: true } }).execute(); + +// Get one by id +const item = await db.principalEntity.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, principalId: true, entityId: true, ownerId: true } }).execute(); + +// Create +const created = await db.principalEntity.create({ data: { principalId: '', entityId: '', ownerId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.principalEntity.update({ where: { id: '' }, data: { principalId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.principalEntity.delete({ where: { id: '' } }).execute(); +``` + +### `db.principalScopeOverride` + +CRUD operations for PrincipalScopeOverride records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `principalId` | UUID | Yes | +| `membershipType` | Int | Yes | +| `allowedMask` | BitString | Yes | +| `isAdmin` | Boolean | Yes | +| `isReadOnly` | Boolean | Yes | + +**Operations:** + +```typescript +// List all principalScopeOverride records +const items = await db.principalScopeOverride.findMany({ select: { id: true, createdAt: true, updatedAt: true, principalId: true, membershipType: true, allowedMask: true, isAdmin: true, isReadOnly: true } }).execute(); + +// Get one by id +const item = await db.principalScopeOverride.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, principalId: true, membershipType: true, allowedMask: true, isAdmin: true, isReadOnly: true } }).execute(); + +// Create +const created = await db.principalScopeOverride.create({ data: { principalId: '', membershipType: '', allowedMask: '', isAdmin: '', isReadOnly: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.principalScopeOverride.update({ where: { id: '' }, data: { principalId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.principalScopeOverride.delete({ where: { id: '' } }).execute(); +``` + ### `db.email` CRUD operations for Email records. @@ -319,6 +430,46 @@ const updated = await db.userConnectedAccount.update({ where: { id: '' }, const deleted = await db.userConnectedAccount.delete({ where: { id: '' } }).execute(); ``` +### `db.orgApiKeyList` + +CRUD operations for OrgApiKeyList records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `keyId` | String | Yes | +| `name` | String | Yes | +| `principalId` | UUID | Yes | +| `orgId` | UUID | Yes | +| `expiresAt` | Datetime | Yes | +| `revokedAt` | Datetime | Yes | +| `lastUsedAt` | Datetime | Yes | +| `mfaLevel` | String | Yes | +| `accessLevel` | String | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all orgApiKeyList records +const items = await db.orgApiKeyList.findMany({ select: { id: true, keyId: true, name: true, principalId: true, orgId: true, expiresAt: true, revokedAt: true, lastUsedAt: true, mfaLevel: true, accessLevel: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.orgApiKeyList.findOne({ id: '', select: { id: true, keyId: true, name: true, principalId: true, orgId: true, expiresAt: true, revokedAt: true, lastUsedAt: true, mfaLevel: true, accessLevel: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.orgApiKeyList.create({ data: { keyId: '', name: '', principalId: '', orgId: '', expiresAt: '', revokedAt: '', lastUsedAt: '', mfaLevel: '', accessLevel: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgApiKeyList.update({ where: { id: '' }, data: { keyId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgApiKeyList.delete({ where: { id: '' } }).execute(); +``` + ### `db.user` CRUD operations for User records. @@ -374,26 +525,26 @@ currentUserAgent const result = await db.query.currentUserAgent().execute(); ``` -### `db.query.currentIpAddress` +### `db.query.currentUserId` -currentIpAddress +currentUserId - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentIpAddress().execute(); +const result = await db.query.currentUserId().execute(); ``` -### `db.query.currentUserId` +### `db.query.currentIpAddress` -currentUserId +currentIpAddress - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentUserId().execute(); +const result = await db.query.currentIpAddress().execute(); ``` ### `db.query.requireStepUp` @@ -467,6 +618,21 @@ checkPassword const result = await db.mutation.checkPassword({ input: { password: '' } }).execute(); ``` +### `db.mutation.deleteOrgPrincipal` + +deleteOrgPrincipal + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DeleteOrgPrincipalInput (required) | + +```typescript +const result = await db.mutation.deleteOrgPrincipal({ input: { principalId: '' } }).execute(); +``` + ### `db.mutation.disconnectAccount` disconnectAccount @@ -557,6 +723,21 @@ confirmDeleteAccount const result = await db.mutation.confirmDeleteAccount({ input: { userId: '', token: '' } }).execute(); ``` +### `db.mutation.revokeOrgApiKey` + +revokeOrgApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeOrgApiKeyInput (required) | + +```typescript +const result = await db.mutation.revokeOrgApiKey({ input: { keyId: '', orgId: '' } }).execute(); +``` + ### `db.mutation.setPassword` setPassword @@ -707,6 +888,21 @@ linkIdentity const result = await db.mutation.linkIdentity({ input: { service: '', identifier: '', details: '' } }).execute(); ``` +### `db.mutation.createOrgPrincipal` + +createOrgPrincipal + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateOrgPrincipalInput (required) | + +```typescript +const result = await db.mutation.createOrgPrincipal({ input: { name: '', orgId: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' } }).execute(); +``` + ### `db.mutation.extendTokenExpires` extendTokenExpires @@ -722,6 +918,21 @@ extendTokenExpires const result = await db.mutation.extendTokenExpires({ input: { amount: '' } }).execute(); ``` +### `db.mutation.createOrgApiKey` + +createOrgApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateOrgApiKeyInput (required) | + +```typescript +const result = await db.mutation.createOrgApiKey({ input: '' }).execute(); +``` + ### `db.mutation.createApiKey` createApiKey @@ -734,7 +945,7 @@ createApiKey | `input` | CreateApiKeyInput (required) | ```typescript -const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '' } }).execute(); +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '', principalId: '' } }).execute(); ``` ### `db.mutation.requestCrossOriginToken` diff --git a/sdk/constructive-cli/src/auth/orm/index.ts b/sdk/constructive-cli/src/auth/orm/index.ts index 35448d7362..f3ecc5703a 100644 --- a/sdk/constructive-cli/src/auth/orm/index.ts +++ b/sdk/constructive-cli/src/auth/orm/index.ts @@ -5,6 +5,9 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { PrincipalModel } from './models/principal'; +import { PrincipalEntityModel } from './models/principalEntity'; +import { PrincipalScopeOverrideModel } from './models/principalScopeOverride'; import { EmailModel } from './models/email'; import { PhoneNumberModel } from './models/phoneNumber'; import { CryptoAddressModel } from './models/cryptoAddress'; @@ -13,6 +16,7 @@ import { AuditLogAuthModel } from './models/auditLogAuth'; import { IdentityProviderModel } from './models/identityProvider'; import { RoleTypeModel } from './models/roleType'; import { UserConnectedAccountModel } from './models/userConnectedAccount'; +import { OrgApiKeyListModel } from './models/orgApiKeyList'; import { UserModel } from './models/user'; import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; @@ -49,6 +53,9 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + principal: new PrincipalModel(client), + principalEntity: new PrincipalEntityModel(client), + principalScopeOverride: new PrincipalScopeOverrideModel(client), email: new EmailModel(client), phoneNumber: new PhoneNumberModel(client), cryptoAddress: new CryptoAddressModel(client), @@ -57,6 +64,7 @@ export function createClient(config: OrmClientConfig) { identityProvider: new IdentityProviderModel(client), roleType: new RoleTypeModel(client), userConnectedAccount: new UserConnectedAccountModel(client), + orgApiKeyList: new OrgApiKeyListModel(client), user: new UserModel(client), query: createQueryOperations(client), mutation: createMutationOperations(client), diff --git a/sdk/constructive-cli/src/auth/orm/input-types.ts b/sdk/constructive-cli/src/auth/orm/input-types.ts index 734fe10c3a..f47ec67005 100644 --- a/sdk/constructive-cli/src/auth/orm/input-types.ts +++ b/sdk/constructive-cli/src/auth/orm/input-types.ts @@ -235,8 +235,54 @@ export type Base64EncodedBinary = unknown; export type ConstructiveInternalTypeEmail = unknown; export type ConstructiveInternalTypeImage = unknown; export type ConstructiveInternalTypeOrigin = unknown; -/** User email addresses with verification and primary-email management */ +/** Scoped sub-identities (API keys and agents) with precomputed SPRT */ // ============ Entity Types ============ +export interface Principal { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** The human user who owns and manages this principal */ + ownerId?: string | null; + /** The user row (type=3 Principal) that represents this principal identity */ + userId?: string | null; + /** Human-readable label for this principal (e.g., billing-bot, ci-deploy-key) */ + name?: string | null; + /** Permission bitmask subset; all-1s means inherit all parent permissions */ + allowedMask?: string | null; + /** Whether this principal is restricted to read-only operations */ + isReadOnly?: boolean | null; + /** Whether this principal bypasses MFA step-up requirements */ + bypassStepUp?: boolean | null; +} +/** Association table scoping principals to specific organizations */ +export interface PrincipalEntity { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** The principal this scoping row belongs to */ + principalId?: string | null; + /** The organization this principal is scoped to */ + entityId?: string | null; + /** Denormalized owner_id from principals table for RLS */ + ownerId?: string | null; +} +/** Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. */ +export interface PrincipalScopeOverride { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** The principal this override applies to */ + principalId?: string | null; + /** The scope level (membership_type) this override restricts */ + membershipType?: number | null; + /** Permission bitmask for this scope; AND-masked with parent permissions during cascade */ + allowedMask?: string | null; + /** Whether this principal has admin access at this scope (default true = inherit from parent) */ + isAdmin?: boolean | null; + /** Whether this principal is restricted to read-only at this scope */ + isReadOnly?: boolean | null; +} +/** User email addresses with verification and primary-email management */ export interface Email { id: string; ownerId?: string | null; @@ -349,6 +395,20 @@ export interface UserConnectedAccount { createdAt?: string | null; updatedAt?: string | null; } +export interface OrgApiKeyList { + id: string; + keyId?: string | null; + name?: string | null; + principalId?: string | null; + orgId?: string | null; + expiresAt?: string | null; + revokedAt?: string | null; + lastUsedAt?: string | null; + mfaLevel?: string | null; + accessLevel?: string | null; + createdAt?: string | null; + updatedAt?: string | null; +} export interface User { id: string; username?: string | null; @@ -378,6 +438,20 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface PrincipalRelations { + owner?: User | null; + user?: User | null; + principalEntities?: ConnectionResult; + principalScopeOverrides?: ConnectionResult; +} +export interface PrincipalEntityRelations { + entity?: User | null; + owner?: User | null; + principal?: Principal | null; +} +export interface PrincipalScopeOverrideRelations { + principal?: Principal | null; +} export interface EmailRelations { owner?: User | null; } @@ -396,8 +470,12 @@ export interface AuditLogAuthRelations { export interface IdentityProviderRelations {} export interface RoleTypeRelations {} export interface UserConnectedAccountRelations {} +export interface OrgApiKeyListRelations {} export interface UserRelations { roleType?: RoleType | null; + ownedPrincipals?: ConnectionResult; + principals?: ConnectionResult; + principalEntitiesByEntityId?: ConnectionResult; ownedEmails?: ConnectionResult; ownedPhoneNumbers?: ConnectionResult; ownedCryptoAddresses?: ConnectionResult; @@ -405,6 +483,10 @@ export interface UserRelations { auditLogAuthsByActorId?: ConnectionResult; } // ============ Entity Types With Relations ============ +export type PrincipalWithRelations = Principal & PrincipalRelations; +export type PrincipalEntityWithRelations = PrincipalEntity & PrincipalEntityRelations; +export type PrincipalScopeOverrideWithRelations = PrincipalScopeOverride & + PrincipalScopeOverrideRelations; export type EmailWithRelations = Email & EmailRelations; export type PhoneNumberWithRelations = PhoneNumber & PhoneNumberRelations; export type CryptoAddressWithRelations = CryptoAddress & CryptoAddressRelations; @@ -414,8 +496,68 @@ export type IdentityProviderWithRelations = IdentityProvider & IdentityProviderR export type RoleTypeWithRelations = RoleType & RoleTypeRelations; export type UserConnectedAccountWithRelations = UserConnectedAccount & UserConnectedAccountRelations; +export type OrgApiKeyListWithRelations = OrgApiKeyList & OrgApiKeyListRelations; export type UserWithRelations = User & UserRelations; // ============ Entity Select Types ============ +export type PrincipalSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + ownerId?: boolean; + userId?: boolean; + name?: boolean; + allowedMask?: boolean; + isReadOnly?: boolean; + bypassStepUp?: boolean; + owner?: { + select: UserSelect; + }; + user?: { + select: UserSelect; + }; + principalEntities?: { + select: PrincipalEntitySelect; + first?: number; + filter?: PrincipalEntityFilter; + orderBy?: PrincipalEntityOrderBy[]; + }; + principalScopeOverrides?: { + select: PrincipalScopeOverrideSelect; + first?: number; + filter?: PrincipalScopeOverrideFilter; + orderBy?: PrincipalScopeOverrideOrderBy[]; + }; +}; +export type PrincipalEntitySelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + principalId?: boolean; + entityId?: boolean; + ownerId?: boolean; + entity?: { + select: UserSelect; + }; + owner?: { + select: UserSelect; + }; + principal?: { + select: PrincipalSelect; + }; +}; +export type PrincipalScopeOverrideSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + principalId?: boolean; + membershipType?: boolean; + allowedMask?: boolean; + isAdmin?: boolean; + isReadOnly?: boolean; + principal?: { + select: PrincipalSelect; + }; +}; export type EmailSelect = { id?: boolean; ownerId?: boolean; @@ -509,6 +651,20 @@ export type UserConnectedAccountSelect = { createdAt?: boolean; updatedAt?: boolean; }; +export type OrgApiKeyListSelect = { + id?: boolean; + keyId?: boolean; + name?: boolean; + principalId?: boolean; + orgId?: boolean; + expiresAt?: boolean; + revokedAt?: boolean; + lastUsedAt?: boolean; + mfaLevel?: boolean; + accessLevel?: boolean; + createdAt?: boolean; + updatedAt?: boolean; +}; export type UserSelect = { id?: boolean; username?: boolean; @@ -524,6 +680,24 @@ export type UserSelect = { roleType?: { select: RoleTypeSelect; }; + ownedPrincipals?: { + select: PrincipalSelect; + first?: number; + filter?: PrincipalFilter; + orderBy?: PrincipalOrderBy[]; + }; + principals?: { + select: PrincipalSelect; + first?: number; + filter?: PrincipalFilter; + orderBy?: PrincipalOrderBy[]; + }; + principalEntitiesByEntityId?: { + select: PrincipalEntitySelect; + first?: number; + filter?: PrincipalEntityFilter; + orderBy?: PrincipalEntityOrderBy[]; + }; ownedEmails?: { select: EmailSelect; first?: number; @@ -556,6 +730,96 @@ export type UserSelect = { }; }; // ============ Table Filter Types ============ +export interface PrincipalFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `userId` field. */ + userId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Filter by the object’s `bypassStepUp` field. */ + bypassStepUp?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalFilter[]; + /** Negates the expression. */ + not?: PrincipalFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `user` relation. */ + user?: UserFilter; + /** Filter by the object’s `principalEntities` relation. */ + principalEntities?: PrincipalToManyPrincipalEntityFilter; + /** `principalEntities` exist. */ + principalEntitiesExist?: boolean; + /** Filter by the object’s `principalScopeOverrides` relation. */ + principalScopeOverrides?: PrincipalToManyPrincipalScopeOverrideFilter; + /** `principalScopeOverrides` exist. */ + principalScopeOverridesExist?: boolean; +} +export interface PrincipalEntityFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalEntityFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalEntityFilter[]; + /** Negates the expression. */ + not?: PrincipalEntityFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} +export interface PrincipalScopeOverrideFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `membershipType` field. */ + membershipType?: IntFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalScopeOverrideFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalScopeOverrideFilter[]; + /** Negates the expression. */ + not?: PrincipalScopeOverrideFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} export interface EmailFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -756,6 +1020,38 @@ export interface UserConnectedAccountFilter { /** Negates the expression. */ not?: UserConnectedAccountFilter; } +export interface OrgApiKeyListFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `keyId` field. */ + keyId?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `orgId` field. */ + orgId?: UUIDFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `revokedAt` field. */ + revokedAt?: DatetimeFilter; + /** Filter by the object’s `lastUsedAt` field. */ + lastUsedAt?: DatetimeFilter; + /** Filter by the object’s `mfaLevel` field. */ + mfaLevel?: StringFilter; + /** Filter by the object’s `accessLevel` field. */ + accessLevel?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: OrgApiKeyListFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgApiKeyListFilter[]; + /** Negates the expression. */ + not?: OrgApiKeyListFilter; +} export interface UserFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -781,6 +1077,18 @@ export interface UserFilter { not?: UserFilter; /** Filter by the object’s `roleType` relation. */ roleType?: RoleTypeFilter; + /** Filter by the object’s `ownedPrincipals` relation. */ + ownedPrincipals?: UserToManyPrincipalFilter; + /** `ownedPrincipals` exist. */ + ownedPrincipalsExist?: boolean; + /** Filter by the object’s `principals` relation. */ + principals?: UserToManyPrincipalFilter; + /** `principals` exist. */ + principalsExist?: boolean; + /** Filter by the object’s `principalEntitiesByEntityId` relation. */ + principalEntitiesByEntityId?: UserToManyPrincipalEntityFilter; + /** `principalEntitiesByEntityId` exist. */ + principalEntitiesByEntityIdExist?: boolean; /** Filter by the object’s `ownedEmails` relation. */ ownedEmails?: UserToManyEmailFilter; /** `ownedEmails` exist. */ @@ -815,6 +1123,64 @@ export interface UserFilter { unifiedSearch?: string; } // ============ OrderBy Types ============ +export type PrincipalOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'USER_ID_ASC' + | 'USER_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'ALLOWED_MASK_ASC' + | 'ALLOWED_MASK_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' + | 'BYPASS_STEP_UP_ASC' + | 'BYPASS_STEP_UP_DESC'; +export type PrincipalEntityOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC'; +export type PrincipalScopeOverrideOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'MEMBERSHIP_TYPE_ASC' + | 'MEMBERSHIP_TYPE_DESC' + | 'ALLOWED_MASK_ASC' + | 'ALLOWED_MASK_DESC' + | 'IS_ADMIN_ASC' + | 'IS_ADMIN_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC'; export type EmailOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -967,6 +1333,32 @@ export type UserConnectedAccountOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type OrgApiKeyListOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'KEY_ID_ASC' + | 'KEY_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'ORG_ID_ASC' + | 'ORG_ID_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'REVOKED_AT_ASC' + | 'REVOKED_AT_DESC' + | 'LAST_USED_AT_ASC' + | 'LAST_USED_AT_DESC' + | 'MFA_LEVEL_ASC' + | 'MFA_LEVEL_DESC' + | 'ACCESS_LEVEL_ASC' + | 'ACCESS_LEVEL_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type UserOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -994,6 +1386,82 @@ export type UserOrderBy = | 'SEARCH_SCORE_ASC' | 'SEARCH_SCORE_DESC'; // ============ CRUD Input Types ============ +export interface CreatePrincipalInput { + clientMutationId?: string; + principal: { + ownerId: string; + userId: string; + name?: string; + allowedMask?: string; + isReadOnly?: boolean; + bypassStepUp?: boolean; + }; +} +export interface PrincipalPatch { + ownerId?: string | null; + userId?: string | null; + name?: string | null; + allowedMask?: string | null; + isReadOnly?: boolean | null; + bypassStepUp?: boolean | null; +} +export interface UpdatePrincipalInput { + clientMutationId?: string; + principalId: string; + principalPatch: PrincipalPatch; +} +export interface DeletePrincipalInput { + clientMutationId?: string; + principalId: string; +} +export interface CreatePrincipalEntityInput { + clientMutationId?: string; + principalEntity: { + principalId: string; + entityId: string; + ownerId: string; + }; +} +export interface PrincipalEntityPatch { + principalId?: string | null; + entityId?: string | null; + ownerId?: string | null; +} +export interface UpdatePrincipalEntityInput { + clientMutationId?: string; + id: string; + principalEntityPatch: PrincipalEntityPatch; +} +export interface DeletePrincipalEntityInput { + clientMutationId?: string; + id: string; +} +export interface CreatePrincipalScopeOverrideInput { + clientMutationId?: string; + principalScopeOverride: { + principalId: string; + membershipType?: number; + allowedMask?: string; + isAdmin?: boolean; + isReadOnly?: boolean; + }; +} +export interface PrincipalScopeOverridePatch { + principalId?: string | null; + membershipType?: number | null; + allowedMask?: string | null; + isAdmin?: boolean | null; + isReadOnly?: boolean | null; +} +export interface UpdatePrincipalScopeOverrideInput { + clientMutationId?: string; + id: string; + principalScopeOverridePatch: PrincipalScopeOverridePatch; +} +export interface DeletePrincipalScopeOverrideInput { + clientMutationId?: string; + id: string; +} export interface CreateEmailInput { clientMutationId?: string; email: { @@ -1210,6 +1678,40 @@ export interface DeleteUserConnectedAccountInput { clientMutationId?: string; id: string; } +export interface CreateOrgApiKeyListInput { + clientMutationId?: string; + orgApiKeyList: { + keyId?: string; + name?: string; + principalId?: string; + orgId?: string; + expiresAt?: string; + revokedAt?: string; + lastUsedAt?: string; + mfaLevel?: string; + accessLevel?: string; + }; +} +export interface OrgApiKeyListPatch { + keyId?: string | null; + name?: string | null; + principalId?: string | null; + orgId?: string | null; + expiresAt?: string | null; + revokedAt?: string | null; + lastUsedAt?: string | null; + mfaLevel?: string | null; + accessLevel?: string | null; +} +export interface UpdateOrgApiKeyListInput { + clientMutationId?: string; + id: string; + orgApiKeyListPatch: OrgApiKeyListPatch; +} +export interface DeleteOrgApiKeyListInput { + clientMutationId?: string; + id: string; +} export interface CreateUserInput { clientMutationId?: string; user: { @@ -1237,7 +1739,14 @@ export interface DeleteUserInput { } // ============ Connection Fields Map ============ export const connectionFieldsMap = { + Principal: { + principalEntities: 'PrincipalEntity', + principalScopeOverrides: 'PrincipalScopeOverride', + }, User: { + ownedPrincipals: 'Principal', + principals: 'Principal', + principalEntitiesByEntityId: 'PrincipalEntity', ownedEmails: 'Email', ownedPhoneNumbers: 'PhoneNumber', ownedCryptoAddresses: 'CryptoAddress', @@ -1256,6 +1765,10 @@ export interface CheckPasswordInput { clientMutationId?: string; password?: string; } +export interface DeleteOrgPrincipalInput { + clientMutationId?: string; + principalId?: string; +} export interface DisconnectAccountInput { clientMutationId?: string; accountId: string; @@ -1281,6 +1794,11 @@ export interface ConfirmDeleteAccountInput { userId?: string; token?: string; } +export interface RevokeOrgApiKeyInput { + clientMutationId?: string; + keyId: string; + orgId: string; +} export interface SetPasswordInput { clientMutationId?: string; currentPassword?: string; @@ -1347,16 +1865,34 @@ export interface LinkIdentityInput { identifier: string; details?: Record; } +export interface CreateOrgPrincipalInput { + clientMutationId?: string; + name?: string; + orgId?: string; + allowedMask?: string; + isReadOnly?: boolean; + bypassStepUp?: boolean; +} export interface ExtendTokenExpiresInput { clientMutationId?: string; amount?: IntervalInput; } +export interface CreateOrgApiKeyInput { + clientMutationId?: string; + orgId?: string; + principalId?: string; + keyName?: string; + accessLevel?: string; + mfaLevel?: string; + expiresIn?: IntervalInput; +} export interface CreateApiKeyInput { clientMutationId?: string; keyName?: string; accessLevel?: string; mfaLevel?: string; expiresIn?: IntervalInput; + principalId?: string; } export interface RequestCrossOriginTokenInput { clientMutationId?: string; @@ -1382,6 +1918,24 @@ export interface ProvisionBucketInput { */ ownerId?: string; } +/** A filter to be used against many `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalToManyPrincipalEntityFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalEntityFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalEntityFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalEntityFilter; +} +/** A filter to be used against many `PrincipalScopeOverride` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalToManyPrincipalScopeOverrideFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalScopeOverrideFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalScopeOverrideFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalScopeOverrideFilter; +} /** A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ */ export interface ConstructiveInternalTypeEmailFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -1669,6 +2223,24 @@ export interface ConstructiveInternalTypeImageFilter { /** Contained by the specified JSON. */ containedBy?: ConstructiveInternalTypeImage; } +/** A filter to be used against many `Principal` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyPrincipalFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalFilter; +} +/** A filter to be used against many `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyPrincipalEntityFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalEntityFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalEntityFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalEntityFilter; +} /** A filter to be used against many `Email` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyEmailFilter { /** Filters to entities where at least one related entity matches. */ @@ -1721,6 +2293,18 @@ export interface TrgmSearchInput { /** Minimum similarity threshold (0.0 to 1.0). Higher = stricter matching. Default is 0.3. */ threshold?: number; } +/** An input for mutations affecting `PrincipalEntity` */ +export interface PrincipalEntityInput { + id?: string; + createdAt?: string; + updatedAt?: string; + /** The principal this scoping row belongs to */ + principalId: string; + /** The organization this principal is scoped to */ + entityId: string; + /** Denormalized owner_id from principals table for RLS */ + ownerId: string; +} /** An input for mutations affecting `Email` */ export interface EmailInput { id?: string; @@ -1837,7 +2421,22 @@ export interface UserConnectedAccountInput { createdAt?: string; updatedAt?: string; } -/** An input for mutations affecting `User` */ +/** An input for mutations affecting `OrgApiKeyList` */ +export interface OrgApiKeyListInput { + id?: string; + keyId?: string; + name?: string; + principalId?: string; + orgId?: string; + expiresAt?: string; + revokedAt?: string; + lastUsedAt?: string; + mfaLevel?: string; + accessLevel?: string; + createdAt?: string; + updatedAt?: string; +} +/** An input for mutations affecting `User` */ export interface UserInput { id?: string; username?: string; @@ -1866,6 +2465,99 @@ export interface IntervalInput { /** A quantity of years. */ years?: number; } +/** A filter to be used against `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalEntityFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalEntityFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalEntityFilter[]; + /** Negates the expression. */ + not?: PrincipalEntityFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} +/** A filter to be used against `PrincipalScopeOverride` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalScopeOverrideFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `membershipType` field. */ + membershipType?: IntFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalScopeOverrideFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalScopeOverrideFilter[]; + /** Negates the expression. */ + not?: PrincipalScopeOverrideFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} +/** A filter to be used against `Principal` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `userId` field. */ + userId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Filter by the object’s `bypassStepUp` field. */ + bypassStepUp?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalFilter[]; + /** Negates the expression. */ + not?: PrincipalFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `user` relation. */ + user?: UserFilter; + /** Filter by the object’s `principalEntities` relation. */ + principalEntities?: PrincipalToManyPrincipalEntityFilter; + /** `principalEntities` exist. */ + principalEntitiesExist?: boolean; + /** Filter by the object’s `principalScopeOverrides` relation. */ + principalScopeOverrides?: PrincipalToManyPrincipalScopeOverrideFilter; + /** `principalScopeOverrides` exist. */ + principalScopeOverridesExist?: boolean; +} /** A filter to be used against `Email` object types. All fields are combined with a logical ‘and.’ */ export interface EmailFilter { /** Filter by the object’s `id` field. */ @@ -2042,6 +2734,152 @@ export interface UUIDFilter { /** Greater than or equal to the specified value. */ greaterThanOrEqualTo?: string; } +/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ +export interface DatetimeFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Included in the specified list. */ + in?: string[]; + /** Not included in the specified list. */ + notIn?: string[]; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; +} +/** A filter to be used against `User` object types. All fields are combined with a logical ‘and.’ */ +export interface UserFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `username` field. */ + username?: StringTrgmFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringTrgmFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `searchTsv` field. */ + searchTsv?: FullTextFilter; + /** Filter by the object’s `type` field. */ + type?: IntFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: UserFilter[]; + /** Checks for any expressions in this list. */ + or?: UserFilter[]; + /** Negates the expression. */ + not?: UserFilter; + /** Filter by the object’s `roleType` relation. */ + roleType?: RoleTypeFilter; + /** Filter by the object’s `ownedPrincipals` relation. */ + ownedPrincipals?: UserToManyPrincipalFilter; + /** `ownedPrincipals` exist. */ + ownedPrincipalsExist?: boolean; + /** Filter by the object’s `principals` relation. */ + principals?: UserToManyPrincipalFilter; + /** `principals` exist. */ + principalsExist?: boolean; + /** Filter by the object’s `principalEntitiesByEntityId` relation. */ + principalEntitiesByEntityId?: UserToManyPrincipalEntityFilter; + /** `principalEntitiesByEntityId` exist. */ + principalEntitiesByEntityIdExist?: boolean; + /** Filter by the object’s `ownedEmails` relation. */ + ownedEmails?: UserToManyEmailFilter; + /** `ownedEmails` exist. */ + ownedEmailsExist?: boolean; + /** Filter by the object’s `ownedPhoneNumbers` relation. */ + ownedPhoneNumbers?: UserToManyPhoneNumberFilter; + /** `ownedPhoneNumbers` exist. */ + ownedPhoneNumbersExist?: boolean; + /** Filter by the object’s `ownedCryptoAddresses` relation. */ + ownedCryptoAddresses?: UserToManyCryptoAddressFilter; + /** `ownedCryptoAddresses` exist. */ + ownedCryptoAddressesExist?: boolean; + /** Filter by the object’s `ownedWebauthnCredentials` relation. */ + ownedWebauthnCredentials?: UserToManyWebauthnCredentialFilter; + /** `ownedWebauthnCredentials` exist. */ + ownedWebauthnCredentialsExist?: boolean; + /** Filter by the object’s `auditLogAuthsByActorId` relation. */ + auditLogAuthsByActorId?: UserToManyAuditLogAuthFilter; + /** `auditLogAuthsByActorId` exist. */ + auditLogAuthsByActorIdExist?: boolean; + /** TSV search on the `search_tsv` column. */ + tsvSearchTsv?: string; + /** TRGM search on the `display_name` column. */ + trgmDisplayName?: TrgmSearchInput; + /** + * Composite unified search. Provide a search string and it will be dispatched to + * all text-compatible search algorithms (tsvector, BM25, pg_trgm) + * simultaneously. When the LLM plugin is active, pgvector also participates via + * auto-embedding. Rows matching ANY algorithm are returned. All matching score + * fields are populated. + */ + unifiedSearch?: string; +} +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Included in the specified list. */ + in?: number[]; + /** Not included in the specified list. */ + notIn?: number[]; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; +} +/** A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ */ +export interface BitStringFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Included in the specified list. */ + in?: string[]; + /** Not included in the specified list. */ + notIn?: string[]; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; +} /** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ export interface BooleanFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -2144,90 +2982,6 @@ export interface StringFilter { /** Greater than or equal to the specified value (case-insensitive). */ greaterThanOrEqualToInsensitive?: string; } -/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ -export interface DatetimeFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Included in the specified list. */ - in?: string[]; - /** Not included in the specified list. */ - notIn?: string[]; - /** Less than the specified value. */ - lessThan?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; -} -/** A filter to be used against `User` object types. All fields are combined with a logical ‘and.’ */ -export interface UserFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `username` field. */ - username?: StringTrgmFilter; - /** Filter by the object’s `displayName` field. */ - displayName?: StringTrgmFilter; - /** Filter by the object’s `profilePicture` field. */ - profilePicture?: ConstructiveInternalTypeImageFilter; - /** Filter by the object’s `searchTsv` field. */ - searchTsv?: FullTextFilter; - /** Filter by the object’s `type` field. */ - type?: IntFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: UserFilter[]; - /** Checks for any expressions in this list. */ - or?: UserFilter[]; - /** Negates the expression. */ - not?: UserFilter; - /** Filter by the object’s `roleType` relation. */ - roleType?: RoleTypeFilter; - /** Filter by the object’s `ownedEmails` relation. */ - ownedEmails?: UserToManyEmailFilter; - /** `ownedEmails` exist. */ - ownedEmailsExist?: boolean; - /** Filter by the object’s `ownedPhoneNumbers` relation. */ - ownedPhoneNumbers?: UserToManyPhoneNumberFilter; - /** `ownedPhoneNumbers` exist. */ - ownedPhoneNumbersExist?: boolean; - /** Filter by the object’s `ownedCryptoAddresses` relation. */ - ownedCryptoAddresses?: UserToManyCryptoAddressFilter; - /** `ownedCryptoAddresses` exist. */ - ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedWebauthnCredentials` relation. */ - ownedWebauthnCredentials?: UserToManyWebauthnCredentialFilter; - /** `ownedWebauthnCredentials` exist. */ - ownedWebauthnCredentialsExist?: boolean; - /** Filter by the object’s `auditLogAuthsByActorId` relation. */ - auditLogAuthsByActorId?: UserToManyAuditLogAuthFilter; - /** `auditLogAuthsByActorId` exist. */ - auditLogAuthsByActorIdExist?: boolean; - /** TSV search on the `search_tsv` column. */ - tsvSearchTsv?: string; - /** TRGM search on the `display_name` column. */ - trgmDisplayName?: TrgmSearchInput; - /** - * Composite unified search. Provide a search string and it will be dispatched to - * all text-compatible search algorithms (tsvector, BM25, pg_trgm) - * simultaneously. When the LLM plugin is active, pgvector also participates via - * auto-embedding. Rows matching ANY algorithm are returned. All matching score - * fields are populated. - */ - unifiedSearch?: string; -} /** A filter to be used against BigInt fields. All fields are combined with a logical ‘and.’ */ export interface BigIntFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -2346,31 +3100,6 @@ export interface FullTextFilter { /** Performs a full text search on the field. */ matches?: string; } -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: number; - /** Not equal to the specified value. */ - notEqualTo?: number; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; - /** Included in the specified list. */ - in?: number[]; - /** Not included in the specified list. */ - notIn?: number[]; - /** Less than the specified value. */ - lessThan?: number; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; - /** Greater than the specified value. */ - greaterThan?: number; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; -} /** A filter to be used against `RoleType` object types. All fields are combined with a logical ‘and.’ */ export interface RoleTypeFilter { /** Filter by the object’s `id` field. */ @@ -2405,6 +3134,14 @@ export interface CheckPasswordPayload { export type CheckPasswordPayloadSelect = { clientMutationId?: boolean; }; +export interface DeleteOrgPrincipalPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DeleteOrgPrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface DisconnectAccountPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2453,6 +3190,14 @@ export type ConfirmDeleteAccountPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface RevokeOrgApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeOrgApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface SetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2543,6 +3288,14 @@ export type LinkIdentityPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface CreateOrgPrincipalPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type CreateOrgPrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; @@ -2553,6 +3306,16 @@ export type ExtendTokenExpiresPayloadSelect = { select: ExtendTokenExpiresRecordSelect; }; }; +export interface CreateOrgApiKeyPayload { + clientMutationId?: string | null; + result?: CreateOrgApiKeyRecord | null; +} +export type CreateOrgApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: CreateOrgApiKeyRecordSelect; + }; +}; export interface CreateApiKeyPayload { clientMutationId?: string | null; result?: CreateApiKeyRecord | null; @@ -2607,6 +3370,67 @@ export type ProvisionBucketPayloadSelect = { endpoint?: boolean; error?: boolean; }; +export interface CreatePrincipalPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type CreatePrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface DeletePrincipalPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DeletePrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface CreatePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was created by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} +export type CreatePrincipalEntityPayloadSelect = { + clientMutationId?: boolean; + principalEntity?: { + select: PrincipalEntitySelect; + }; + principalEntityEdge?: { + select: PrincipalEntityEdgeSelect; + }; +}; +export interface UpdatePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was updated by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} +export type UpdatePrincipalEntityPayloadSelect = { + clientMutationId?: boolean; + principalEntity?: { + select: PrincipalEntitySelect; + }; + principalEntityEdge?: { + select: PrincipalEntityEdgeSelect; + }; +}; +export interface DeletePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was deleted by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} +export type DeletePrincipalEntityPayloadSelect = { + clientMutationId?: boolean; + principalEntity?: { + select: PrincipalEntitySelect; + }; + principalEntityEdge?: { + select: PrincipalEntityEdgeSelect; + }; +}; export interface CreateEmailPayload { clientMutationId?: string | null; /** The `Email` that was created by this mutation. */ @@ -2899,6 +3723,17 @@ export type CreateUserConnectedAccountPayloadSelect = { select: UserConnectedAccountSelect; }; }; +export interface CreateOrgApiKeyListPayload { + clientMutationId?: string | null; + /** The `OrgApiKeyList` that was created by this mutation. */ + orgApiKeyList?: OrgApiKeyList | null; +} +export type CreateOrgApiKeyListPayloadSelect = { + clientMutationId?: boolean; + orgApiKeyList?: { + select: OrgApiKeyListSelect; + }; +}; export interface CreateUserPayload { clientMutationId?: string | null; /** The `User` that was created by this mutation. */ @@ -3026,6 +3861,16 @@ export type ExtendTokenExpiresRecordSelect = { sessionId?: boolean; expiresAt?: boolean; }; +export interface CreateOrgApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; + expiresAt?: string | null; +} +export type CreateOrgApiKeyRecordSelect = { + apiKey?: boolean; + keyId?: boolean; + expiresAt?: boolean; +}; export interface CreateApiKeyRecord { apiKey?: string | null; keyId?: string | null; @@ -3036,6 +3881,18 @@ export type CreateApiKeyRecordSelect = { keyId?: boolean; expiresAt?: boolean; }; +/** A `PrincipalEntity` edge in the connection. */ +export interface PrincipalEntityEdge { + cursor?: string | null; + /** The `PrincipalEntity` at the end of the edge. */ + node?: PrincipalEntity | null; +} +export type PrincipalEntityEdgeSelect = { + cursor?: boolean; + node?: { + select: PrincipalEntitySelect; + }; +}; /** A `Email` edge in the connection. */ export interface EmailEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/auth/orm/models/index.ts b/sdk/constructive-cli/src/auth/orm/models/index.ts index f0ecad3b71..d041785e90 100644 --- a/sdk/constructive-cli/src/auth/orm/models/index.ts +++ b/sdk/constructive-cli/src/auth/orm/models/index.ts @@ -3,6 +3,9 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { PrincipalModel } from './principal'; +export { PrincipalEntityModel } from './principalEntity'; +export { PrincipalScopeOverrideModel } from './principalScopeOverride'; export { EmailModel } from './email'; export { PhoneNumberModel } from './phoneNumber'; export { CryptoAddressModel } from './cryptoAddress'; @@ -11,4 +14,5 @@ export { AuditLogAuthModel } from './auditLogAuth'; export { IdentityProviderModel } from './identityProvider'; export { RoleTypeModel } from './roleType'; export { UserConnectedAccountModel } from './userConnectedAccount'; +export { OrgApiKeyListModel } from './orgApiKeyList'; export { UserModel } from './user'; diff --git a/sdk/constructive-cli/src/auth/orm/models/orgApiKeyList.ts b/sdk/constructive-cli/src/auth/orm/models/orgApiKeyList.ts new file mode 100644 index 0000000000..fe7120ee8a --- /dev/null +++ b/sdk/constructive-cli/src/auth/orm/models/orgApiKeyList.ts @@ -0,0 +1,174 @@ +/** + * OrgApiKeyList 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 { + OrgApiKeyList, + OrgApiKeyListWithRelations, + OrgApiKeyListSelect, + OrgApiKeyListFilter, + OrgApiKeyListOrderBy, + CreateOrgApiKeyListInput, + UpdateOrgApiKeyListInput, + OrgApiKeyListPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgApiKeyListModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgApiKeyLists: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgApiKeyList', + 'orgApiKeyLists', + 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, + }, + 'OrgApiKeyListFilter', + 'OrgApiKeyListOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgApiKeyList', + fieldName: 'orgApiKeyLists', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgApiKeyList: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgApiKeyList', + 'orgApiKeyLists', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgApiKeyListFilter', + 'OrgApiKeyListOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgApiKeyList', + fieldName: 'orgApiKeyList', + document, + variables, + transform: (data: { + orgApiKeyLists?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgApiKeyList: data.orgApiKeyLists?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgApiKeyList: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgApiKeyList', + 'orgApiKeyLists', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgApiKeyListFilter', + 'OrgApiKeyListOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgApiKeyList', + fieldName: 'orgApiKeyList', + document, + variables, + transform: (data: { + orgApiKeyLists?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgApiKeyList: data.orgApiKeyLists?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgApiKeyList: { + orgApiKeyList: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgApiKeyList', + 'createOrgApiKeyList', + 'orgApiKeyList', + args.select, + args.data, + 'CreateOrgApiKeyListInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgApiKeyList', + fieldName: 'createOrgApiKeyList', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/auth/orm/models/principal.ts b/sdk/constructive-cli/src/auth/orm/models/principal.ts new file mode 100644 index 0000000000..66c9d2ff40 --- /dev/null +++ b/sdk/constructive-cli/src/auth/orm/models/principal.ts @@ -0,0 +1,208 @@ +/** + * Principal 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 { + Principal, + PrincipalWithRelations, + PrincipalSelect, + PrincipalFilter, + PrincipalOrderBy, + CreatePrincipalInput, + UpdatePrincipalInput, + PrincipalPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principals: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Principal', + 'principals', + 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, + }, + 'PrincipalFilter', + 'PrincipalOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Principal', + fieldName: 'principals', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principal: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Principal', + 'principals', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalFilter', + 'PrincipalOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Principal', + fieldName: 'principal', + document, + variables, + transform: (data: { + principals?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principal: data.principals?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + principalId: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principal: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Principal', + 'principals', + args.select, + { + where: { + principalId: { + equalTo: args.principalId, + }, + }, + first: 1, + }, + 'PrincipalFilter', + 'PrincipalOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Principal', + fieldName: 'principal', + document, + variables, + transform: (data: { + principals?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principal: data.principals?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipal: { + principal: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Principal', + 'createPrincipal', + 'principal', + args.select, + args.data, + 'CreatePrincipalInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Principal', + fieldName: 'createPrincipal', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + principalId: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePrincipal: { + principal: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Principal', + 'deletePrincipal', + 'principal', + { + principalId: args.where.principalId, + }, + 'DeletePrincipalInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Principal', + fieldName: 'deletePrincipal', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/auth/orm/models/principalEntity.ts b/sdk/constructive-cli/src/auth/orm/models/principalEntity.ts new file mode 100644 index 0000000000..0c265501f5 --- /dev/null +++ b/sdk/constructive-cli/src/auth/orm/models/principalEntity.ts @@ -0,0 +1,245 @@ +/** + * PrincipalEntity 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 { + PrincipalEntity, + PrincipalEntityWithRelations, + PrincipalEntitySelect, + PrincipalEntityFilter, + PrincipalEntityOrderBy, + CreatePrincipalEntityInput, + UpdatePrincipalEntityInput, + PrincipalEntityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalEntityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalEntities: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalEntity', + 'principalEntities', + 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, + }, + 'PrincipalEntityFilter', + 'PrincipalEntityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalEntity', + fieldName: 'principalEntities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalEntity: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PrincipalEntity', + 'principalEntities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalEntityFilter', + 'PrincipalEntityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalEntity', + fieldName: 'principalEntity', + document, + variables, + transform: (data: { + principalEntities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalEntity: data.principalEntities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalEntity: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalEntity', + 'principalEntities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PrincipalEntityFilter', + 'PrincipalEntityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalEntity', + fieldName: 'principalEntity', + document, + variables, + transform: (data: { + principalEntities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalEntity: data.principalEntities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipalEntity: { + principalEntity: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PrincipalEntity', + 'createPrincipalEntity', + 'principalEntity', + args.select, + args.data, + 'CreatePrincipalEntityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalEntity', + fieldName: 'createPrincipalEntity', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PrincipalEntityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePrincipalEntity: { + principalEntity: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PrincipalEntity', + 'updatePrincipalEntity', + 'principalEntity', + args.select, + args.where.id, + args.data, + 'UpdatePrincipalEntityInput', + 'id', + 'principalEntityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalEntity', + fieldName: 'updatePrincipalEntity', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePrincipalEntity: { + principalEntity: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PrincipalEntity', + 'deletePrincipalEntity', + 'principalEntity', + { + id: args.where.id, + }, + 'DeletePrincipalEntityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalEntity', + fieldName: 'deletePrincipalEntity', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/auth/orm/models/principalScopeOverride.ts b/sdk/constructive-cli/src/auth/orm/models/principalScopeOverride.ts new file mode 100644 index 0000000000..3d3e7bedd3 --- /dev/null +++ b/sdk/constructive-cli/src/auth/orm/models/principalScopeOverride.ts @@ -0,0 +1,176 @@ +/** + * PrincipalScopeOverride 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 { + PrincipalScopeOverride, + PrincipalScopeOverrideWithRelations, + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy, + CreatePrincipalScopeOverrideInput, + UpdatePrincipalScopeOverrideInput, + PrincipalScopeOverridePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalScopeOverrideModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalScopeOverrides: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalScopeOverride', + 'principalScopeOverrides', + 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, + }, + 'PrincipalScopeOverrideFilter', + 'PrincipalScopeOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalScopeOverride', + fieldName: 'principalScopeOverrides', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalScopeOverride: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PrincipalScopeOverride', + 'principalScopeOverrides', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalScopeOverrideFilter', + 'PrincipalScopeOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalScopeOverride', + fieldName: 'principalScopeOverride', + document, + variables, + transform: (data: { + principalScopeOverrides?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalScopeOverride: data.principalScopeOverrides?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalScopeOverride: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalScopeOverride', + 'principalScopeOverrides', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PrincipalScopeOverrideFilter', + 'PrincipalScopeOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalScopeOverride', + fieldName: 'principalScopeOverride', + document, + variables, + transform: (data: { + principalScopeOverrides?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalScopeOverride: data.principalScopeOverrides?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipalScopeOverride: { + principalScopeOverride: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PrincipalScopeOverride', + 'createPrincipalScopeOverride', + 'principalScopeOverride', + args.select, + args.data, + 'CreatePrincipalScopeOverrideInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalScopeOverride', + fieldName: 'createPrincipalScopeOverride', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/auth/orm/mutation/index.ts b/sdk/constructive-cli/src/auth/orm/mutation/index.ts index d8864374dd..de98ebe402 100644 --- a/sdk/constructive-cli/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/auth/orm/mutation/index.ts @@ -10,12 +10,14 @@ import type { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, + DeleteOrgPrincipalInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, ConfirmDeleteAccountInput, + RevokeOrgApiKeyInput, SetPasswordInput, VerifyEmailInput, ProvisionNewUserInput, @@ -26,7 +28,9 @@ import type { SignUpInput, SignInInput, LinkIdentityInput, + CreateOrgPrincipalInput, ExtendTokenExpiresInput, + CreateOrgApiKeyInput, CreateApiKeyInput, RequestCrossOriginTokenInput, ForgotPasswordInput, @@ -35,12 +39,14 @@ import type { SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, + DeleteOrgPrincipalPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, ConfirmDeleteAccountPayload, + RevokeOrgApiKeyPayload, SetPasswordPayload, VerifyEmailPayload, ProvisionNewUserPayload, @@ -51,7 +57,9 @@ import type { SignUpPayload, SignInPayload, LinkIdentityPayload, + CreateOrgPrincipalPayload, ExtendTokenExpiresPayload, + CreateOrgApiKeyPayload, CreateApiKeyPayload, RequestCrossOriginTokenPayload, ForgotPasswordPayload, @@ -60,12 +68,14 @@ import type { SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, + DeleteOrgPrincipalPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, ConfirmDeleteAccountPayloadSelect, + RevokeOrgApiKeyPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, ProvisionNewUserPayloadSelect, @@ -76,7 +86,9 @@ import type { SignUpPayloadSelect, SignInPayloadSelect, LinkIdentityPayloadSelect, + CreateOrgPrincipalPayloadSelect, ExtendTokenExpiresPayloadSelect, + CreateOrgApiKeyPayloadSelect, CreateApiKeyPayloadSelect, RequestCrossOriginTokenPayloadSelect, ForgotPasswordPayloadSelect, @@ -93,6 +105,9 @@ export interface SendAccountDeletionEmailVariables { export interface CheckPasswordVariables { input: CheckPasswordInput; } +export interface DeleteOrgPrincipalVariables { + input: DeleteOrgPrincipalInput; +} export interface DisconnectAccountVariables { input: DisconnectAccountInput; } @@ -111,6 +126,9 @@ export interface VerifyTotpVariables { export interface ConfirmDeleteAccountVariables { input: ConfirmDeleteAccountInput; } +export interface RevokeOrgApiKeyVariables { + input: RevokeOrgApiKeyInput; +} export interface SetPasswordVariables { input: SetPasswordInput; } @@ -141,9 +159,15 @@ export interface SignInVariables { export interface LinkIdentityVariables { input: LinkIdentityInput; } +export interface CreateOrgPrincipalVariables { + input: CreateOrgPrincipalInput; +} export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; } +export interface CreateOrgApiKeyVariables { + input: CreateOrgApiKeyInput; +} export interface CreateApiKeyVariables { input: CreateApiKeyInput; } @@ -255,6 +279,35 @@ export function createMutationOperations(client: OrmClient) { 'CheckPasswordPayload' ), }), + deleteOrgPrincipal: ( + args: DeleteOrgPrincipalVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + deleteOrgPrincipal: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'DeleteOrgPrincipal', + fieldName: 'deleteOrgPrincipal', + ...buildCustomDocument( + 'mutation', + 'DeleteOrgPrincipal', + 'deleteOrgPrincipal', + options.select, + args, + [ + { + name: 'input', + type: 'DeleteOrgPrincipalInput!', + }, + ], + connectionFieldsMap, + 'DeleteOrgPrincipalPayload' + ), + }), disconnectAccount: ( args: DisconnectAccountVariables, options: { @@ -429,6 +482,35 @@ export function createMutationOperations(client: OrmClient) { 'ConfirmDeleteAccountPayload' ), }), + revokeOrgApiKey: ( + args: RevokeOrgApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeOrgApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeOrgApiKey', + fieldName: 'revokeOrgApiKey', + ...buildCustomDocument( + 'mutation', + 'RevokeOrgApiKey', + 'revokeOrgApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeOrgApiKeyInput!', + }, + ], + connectionFieldsMap, + 'RevokeOrgApiKeyPayload' + ), + }), setPassword: ( args: SetPasswordVariables, options: { @@ -719,6 +801,35 @@ export function createMutationOperations(client: OrmClient) { 'LinkIdentityPayload' ), }), + createOrgPrincipal: ( + args: CreateOrgPrincipalVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + createOrgPrincipal: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'CreateOrgPrincipal', + fieldName: 'createOrgPrincipal', + ...buildCustomDocument( + 'mutation', + 'CreateOrgPrincipal', + 'createOrgPrincipal', + options.select, + args, + [ + { + name: 'input', + type: 'CreateOrgPrincipalInput!', + }, + ], + connectionFieldsMap, + 'CreateOrgPrincipalPayload' + ), + }), extendTokenExpires: ( args: ExtendTokenExpiresVariables, options: { @@ -748,6 +859,35 @@ export function createMutationOperations(client: OrmClient) { 'ExtendTokenExpiresPayload' ), }), + createOrgApiKey: ( + args: CreateOrgApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + createOrgApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'CreateOrgApiKey', + fieldName: 'createOrgApiKey', + ...buildCustomDocument( + 'mutation', + 'CreateOrgApiKey', + 'createOrgApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'CreateOrgApiKeyInput!', + }, + ], + connectionFieldsMap, + 'CreateOrgApiKeyPayload' + ), + }), createApiKey: ( args: CreateApiKeyVariables, options: { diff --git a/sdk/constructive-cli/src/auth/orm/query/index.ts b/sdk/constructive-cli/src/auth/orm/query/index.ts index 408632294d..c91b14032e 100644 --- a/sdk/constructive-cli/src/auth/orm/query/index.ts +++ b/sdk/constructive-cli/src/auth/orm/query/index.ts @@ -32,18 +32,18 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentIpAddress: (options?: { select?: Record }) => + currentUserId: (options?: { select?: Record }) => new QueryBuilder<{ - currentIpAddress: string | null; + currentUserId: string | null; }>({ client, operation: 'query', - operationName: 'CurrentIpAddress', - fieldName: 'currentIpAddress', + operationName: 'CurrentUserId', + fieldName: 'currentUserId', ...buildCustomDocument( 'query', - 'CurrentIpAddress', - 'currentIpAddress', + 'CurrentUserId', + 'currentUserId', options?.select, undefined, [], @@ -51,18 +51,18 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentUserId: (options?: { select?: Record }) => + currentIpAddress: (options?: { select?: Record }) => new QueryBuilder<{ - currentUserId: string | null; + currentIpAddress: string | null; }>({ client, operation: 'query', - operationName: 'CurrentUserId', - fieldName: 'currentUserId', + operationName: 'CurrentIpAddress', + fieldName: 'currentIpAddress', ...buildCustomDocument( 'query', - 'CurrentUserId', - 'currentUserId', + 'CurrentIpAddress', + 'currentIpAddress', options?.select, undefined, [], diff --git a/sdk/constructive-cli/src/compute/README.md b/sdk/constructive-cli/src/compute/README.md index e63a848bf3..d9710e24f9 100644 --- a/sdk/constructive-cli/src/compute/README.md +++ b/sdk/constructive-cli/src/compute/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 18 +- **Tables:** 22 - **Custom queries:** 1 - **Custom mutations:** 14 diff --git a/sdk/constructive-cli/src/compute/cli/README.md b/sdk/constructive-cli/src/compute/cli/README.md index a9e5c5300f..099416845c 100644 --- a/sdk/constructive-cli/src/compute/cli/README.md +++ b/sdk/constructive-cli/src/compute/cli/README.md @@ -29,19 +29,23 @@ csdk auth set-token | `get-all-record` | getAllRecord CRUD operations | | `function-api-binding` | functionApiBinding CRUD operations | | `function-deployment` | functionDeployment CRUD operations | +| `resource` | resource CRUD operations | | `function-graph-ref` | functionGraphRef CRUD operations | | `function-graph-store` | functionGraphStore CRUD operations | | `function-graph-object` | functionGraphObject CRUD operations | | `function-deployment-event` | functionDeploymentEvent CRUD operations | | `org-function-execution-log` | orgFunctionExecutionLog CRUD operations | +| `resource-event` | resourceEvent CRUD operations | | `function-graph-execution-output` | functionGraphExecutionOutput CRUD operations | | `function-graph-commit` | functionGraphCommit CRUD operations | | `secret-definition` | secretDefinition CRUD operations | | `function-execution-log` | functionExecutionLog CRUD operations | -| `function-graph-execution-node-state` | functionGraphExecutionNodeState CRUD operations | | `function-graph` | functionGraph CRUD operations | +| `function-graph-execution-node-state` | functionGraphExecutionNodeState CRUD operations | +| `platform-namespace` | platformNamespace CRUD operations | | `org-function-invocation` | orgFunctionInvocation CRUD operations | | `function-invocation` | functionInvocation CRUD operations | +| `platform-namespace-event` | platformNamespaceEvent CRUD operations | | `function-graph-execution` | functionGraphExecution CRUD operations | | `function-definition` | functionDefinition CRUD operations | | `read-function-graph` | readFunctionGraph | @@ -53,9 +57,9 @@ csdk auth set-token | `save-graph` | saveGraph | | `add-edge-and-save` | addEdgeAndSave | | `add-node-and-save` | addNodeAndSave | +| `import-graph-json` | importGraphJson | | `add-edge` | addEdge | | `add-node` | addNode | -| `import-graph-json` | importGraphJson | | `insert-node-at-path` | insertNodeAtPath | | `start-execution` | startExecution | | `provision-bucket` | Provision an S3 bucket for a logical bucket in the database. @@ -194,6 +198,44 @@ CRUD operations for FunctionDeployment records. **Required create fields:** `functionDefinitionId`, `namespaceId`, `databaseId` **Optional create fields (backend defaults):** `status`, `serviceUrl`, `serviceName`, `revision`, `image`, `concurrency`, `scaleMin`, `scaleMax`, `timeoutSeconds`, `resources`, `lastError`, `lastErrorAt`, `errorCount`, `labels`, `annotations` +### `resource` + +CRUD operations for Resource records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all resource records | +| `find-first` | Find first matching resource record | +| `get` | Get a resource by id | +| `create` | Create a new resource | +| `update` | Update an existing resource | +| `delete` | Delete a resource | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | +| `createdBy` | UUID | +| `updatedBy` | UUID | +| `namespaceId` | UUID | +| `kind` | String | +| `name` | String | +| `slug` | String | +| `spec` | JSON | +| `status` | String | +| `statusObserved` | JSON | +| `lastError` | String | +| `errorCount` | Int | +| `labels` | JSON | +| `annotations` | JSON | +| `databaseId` | UUID | + +**Required create fields:** `namespaceId`, `kind`, `name`, `slug`, `databaseId` +**Optional create fields (backend defaults):** `createdBy`, `updatedBy`, `spec`, `status`, `statusObserved`, `lastError`, `errorCount`, `labels`, `annotations` + ### `function-graph-ref` CRUD operations for FunctionGraphRef records. @@ -331,6 +373,35 @@ CRUD operations for OrgFunctionExecutionLog records. **Required create fields:** `message` **Optional create fields (backend defaults):** `invocationId`, `taskIdentifier`, `logLevel`, `metadata`, `actorId` +### `resource-event` + +CRUD operations for ResourceEvent records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all resourceEvent records | +| `find-first` | Find first matching resourceEvent record | +| `get` | Get a resourceEvent by id | +| `create` | Create a new resourceEvent | +| `update` | Update an existing resourceEvent | +| `delete` | Delete a resourceEvent | + +**Fields:** + +| Field | Type | +|-------|------| +| `createdAt` | Datetime | +| `id` | UUID | +| `resourceId` | UUID | +| `eventType` | String | +| `actorId` | UUID | +| `message` | String | +| `metadata` | JSON | +| `databaseId` | UUID | + +**Required create fields:** `resourceId`, `eventType`, `databaseId` +**Optional create fields (backend defaults):** `actorId`, `message`, `metadata` + ### `function-graph-execution-output` CRUD operations for FunctionGraphExecutionOutput records. @@ -446,6 +517,38 @@ CRUD operations for FunctionExecutionLog records. **Required create fields:** `message`, `databaseId` **Optional create fields (backend defaults):** `invocationId`, `taskIdentifier`, `logLevel`, `metadata`, `actorId` +### `function-graph` + +CRUD operations for FunctionGraph records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all functionGraph records | +| `find-first` | Find first matching functionGraph record | +| `get` | Get a functionGraph by id | +| `create` | Create a new functionGraph | +| `update` | Update an existing functionGraph | +| `delete` | Delete a functionGraph | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `databaseId` | UUID | +| `storeId` | UUID | +| `context` | String | +| `name` | String | +| `description` | String | +| `definitionsCommitId` | UUID | +| `isValid` | Boolean | +| `validationErrors` | JSON | +| `createdBy` | UUID | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | + +**Required create fields:** `databaseId`, `storeId`, `context`, `name`, `description`, `definitionsCommitId`, `isValid`, `validationErrors`, `createdBy` + ### `function-graph-execution-node-state` CRUD operations for FunctionGraphExecutionNodeState records. @@ -479,38 +582,39 @@ CRUD operations for FunctionGraphExecutionNodeState records. **Required create fields:** `executionId`, `databaseId`, `nodeName` **Optional create fields (backend defaults):** `nodePath`, `status`, `startedAt`, `completedAt`, `errorCode`, `errorMessage`, `outputId` -### `function-graph` +### `platform-namespace` -CRUD operations for FunctionGraph records. +CRUD operations for PlatformNamespace records. | Subcommand | Description | |------------|-------------| -| `list` | List all functionGraph records | -| `find-first` | Find first matching functionGraph record | -| `get` | Get a functionGraph by id | -| `create` | Create a new functionGraph | -| `update` | Update an existing functionGraph | -| `delete` | Delete a functionGraph | +| `list` | List all platformNamespace records | +| `find-first` | Find first matching platformNamespace record | +| `get` | Get a platformNamespace by id | +| `create` | Create a new platformNamespace | +| `update` | Update an existing platformNamespace | +| `delete` | Delete a platformNamespace | **Fields:** | Field | Type | |-------|------| | `id` | UUID | -| `databaseId` | UUID | -| `storeId` | UUID | -| `entityId` | UUID | -| `context` | String | -| `name` | String | -| `description` | String | -| `definitionsCommitId` | UUID | -| `isValid` | Boolean | -| `validationErrors` | JSON | -| `createdBy` | UUID | | `createdAt` | Datetime | | `updatedAt` | Datetime | +| `name` | String | +| `namespaceName` | String | +| `description` | String | +| `isActive` | Boolean | +| `labels` | JSON | +| `annotations` | JSON | +| `databaseId` | UUID | +| `sourceDatabaseId` | UUID | +| `sourceScope` | String | +| `isManaged` | Boolean | -**Required create fields:** `databaseId`, `storeId`, `entityId`, `context`, `name`, `description`, `definitionsCommitId`, `isValid`, `validationErrors`, `createdBy` +**Required create fields:** `name`, `namespaceName`, `databaseId` +**Optional create fields (backend defaults):** `description`, `isActive`, `labels`, `annotations`, `sourceDatabaseId`, `sourceScope`, `isManaged` ### `org-function-invocation` @@ -583,6 +687,42 @@ CRUD operations for FunctionInvocation records. **Required create fields:** `databaseId`, `taskIdentifier` **Optional create fields (backend defaults):** `actorId`, `payload`, `status`, `result`, `error`, `durationMs`, `jobId`, `startedAt`, `completedAt`, `parentInvocationId`, `graphExecutionId` +### `platform-namespace-event` + +CRUD operations for PlatformNamespaceEvent records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all platformNamespaceEvent records | +| `find-first` | Find first matching platformNamespaceEvent record | +| `get` | Get a platformNamespaceEvent by id | +| `create` | Create a new platformNamespaceEvent | +| `update` | Update an existing platformNamespaceEvent | +| `delete` | Delete a platformNamespaceEvent | + +**Fields:** + +| Field | Type | +|-------|------| +| `createdAt` | Datetime | +| `id` | UUID | +| `namespaceId` | UUID | +| `eventType` | String | +| `actorId` | UUID | +| `message` | String | +| `metadata` | JSON | +| `cpuMillicores` | Int | +| `memoryBytes` | BigInt | +| `storageBytes` | BigInt | +| `networkIngressBytes` | BigInt | +| `networkEgressBytes` | BigInt | +| `podCount` | Int | +| `metrics` | JSON | +| `databaseId` | UUID | + +**Required create fields:** `namespaceId`, `eventType`, `databaseId` +**Optional create fields (backend defaults):** `actorId`, `message`, `metadata`, `cpuMillicores`, `memoryBytes`, `storageBytes`, `networkIngressBytes`, `networkEgressBytes`, `podCount`, `metrics` + ### `function-graph-execution` CRUD operations for FunctionGraphExecution records. @@ -605,7 +745,6 @@ CRUD operations for FunctionGraphExecution records. | `graphId` | UUID | | `invocationId` | UUID | | `databaseId` | UUID | -| `entityId` | UUID | | `outputNode` | String | | `outputPort` | String | | `status` | String | @@ -626,7 +765,7 @@ CRUD operations for FunctionGraphExecution records. | `errorMessage` | String | **Required create fields:** `graphId`, `databaseId`, `outputNode` -**Optional create fields (backend defaults):** `startedAt`, `invocationId`, `entityId`, `outputPort`, `status`, `inputPayload`, `outputPayload`, `nodeOutputs`, `executionPlan`, `currentWave`, `parentExecutionId`, `parentNodeName`, `definitionsCommitId`, `tickCount`, `completedAt`, `maxTicks`, `maxPendingJobs`, `timeoutAt`, `errorCode`, `errorMessage` +**Optional create fields (backend defaults):** `startedAt`, `invocationId`, `outputPort`, `status`, `inputPayload`, `outputPayload`, `nodeOutputs`, `executionPlan`, `currentWave`, `parentExecutionId`, `parentNodeName`, `definitionsCommitId`, `tickCount`, `completedAt`, `maxTicks`, `maxPendingJobs`, `timeoutAt`, `errorCode`, `errorMessage` ### `function-definition` @@ -808,6 +947,24 @@ addNodeAndSave | `--input.meta` | JSON | | `--input.message` | String | +### `import-graph-json` + +importGraphJson + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.databaseId` | UUID | + | `--input.name` | String | + | `--input.graphJson` | JSON | + | `--input.context` | String | + | `--input.description` | String | + | `--input.createdBy` | UUID | + | `--input.definitionsCommitId` | UUID | + ### `add-edge` addEdge @@ -846,25 +1003,6 @@ addNode | `--input.props` | JSON | | `--input.meta` | JSON | -### `import-graph-json` - -importGraphJson - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--input.clientMutationId` | String | - | `--input.databaseId` | UUID | - | `--input.name` | String | - | `--input.graphJson` | JSON | - | `--input.context` | String | - | `--input.description` | String | - | `--input.entityId` | UUID | - | `--input.createdBy` | UUID | - | `--input.definitionsCommitId` | UUID | - ### `insert-node-at-path` insertNodeAtPath diff --git a/sdk/constructive-cli/src/compute/cli/commands.ts b/sdk/constructive-cli/src/compute/cli/commands.ts index 437ce960ed..3210aafa91 100644 --- a/sdk/constructive-cli/src/compute/cli/commands.ts +++ b/sdk/constructive-cli/src/compute/cli/commands.ts @@ -9,19 +9,23 @@ import authCmd from './commands/auth'; import getAllRecordCmd from './commands/get-all-record'; import functionApiBindingCmd from './commands/function-api-binding'; import functionDeploymentCmd from './commands/function-deployment'; +import resourceCmd from './commands/resource'; import functionGraphRefCmd from './commands/function-graph-ref'; import functionGraphStoreCmd from './commands/function-graph-store'; import functionGraphObjectCmd from './commands/function-graph-object'; import functionDeploymentEventCmd from './commands/function-deployment-event'; import orgFunctionExecutionLogCmd from './commands/org-function-execution-log'; +import resourceEventCmd from './commands/resource-event'; import functionGraphExecutionOutputCmd from './commands/function-graph-execution-output'; import functionGraphCommitCmd from './commands/function-graph-commit'; import secretDefinitionCmd from './commands/secret-definition'; import functionExecutionLogCmd from './commands/function-execution-log'; -import functionGraphExecutionNodeStateCmd from './commands/function-graph-execution-node-state'; import functionGraphCmd from './commands/function-graph'; +import functionGraphExecutionNodeStateCmd from './commands/function-graph-execution-node-state'; +import platformNamespaceCmd from './commands/platform-namespace'; import orgFunctionInvocationCmd from './commands/org-function-invocation'; import functionInvocationCmd from './commands/function-invocation'; +import platformNamespaceEventCmd from './commands/platform-namespace-event'; import functionGraphExecutionCmd from './commands/function-graph-execution'; import functionDefinitionCmd from './commands/function-definition'; import readFunctionGraphCmd from './commands/read-function-graph'; @@ -33,9 +37,9 @@ import copyGraphCmd from './commands/copy-graph'; import saveGraphCmd from './commands/save-graph'; import addEdgeAndSaveCmd from './commands/add-edge-and-save'; import addNodeAndSaveCmd from './commands/add-node-and-save'; +import importGraphJsonCmd from './commands/import-graph-json'; import addEdgeCmd from './commands/add-edge'; import addNodeCmd from './commands/add-node'; -import importGraphJsonCmd from './commands/import-graph-json'; import insertNodeAtPathCmd from './commands/insert-node-at-path'; import startExecutionCmd from './commands/start-execution'; import provisionBucketCmd from './commands/provision-bucket'; @@ -52,19 +56,23 @@ const createCommandMap: () => Record< 'get-all-record': getAllRecordCmd, 'function-api-binding': functionApiBindingCmd, 'function-deployment': functionDeploymentCmd, + resource: resourceCmd, 'function-graph-ref': functionGraphRefCmd, 'function-graph-store': functionGraphStoreCmd, 'function-graph-object': functionGraphObjectCmd, 'function-deployment-event': functionDeploymentEventCmd, 'org-function-execution-log': orgFunctionExecutionLogCmd, + 'resource-event': resourceEventCmd, 'function-graph-execution-output': functionGraphExecutionOutputCmd, 'function-graph-commit': functionGraphCommitCmd, 'secret-definition': secretDefinitionCmd, 'function-execution-log': functionExecutionLogCmd, - 'function-graph-execution-node-state': functionGraphExecutionNodeStateCmd, 'function-graph': functionGraphCmd, + 'function-graph-execution-node-state': functionGraphExecutionNodeStateCmd, + 'platform-namespace': platformNamespaceCmd, 'org-function-invocation': orgFunctionInvocationCmd, 'function-invocation': functionInvocationCmd, + 'platform-namespace-event': platformNamespaceEventCmd, 'function-graph-execution': functionGraphExecutionCmd, 'function-definition': functionDefinitionCmd, 'read-function-graph': readFunctionGraphCmd, @@ -76,15 +84,15 @@ const createCommandMap: () => Record< 'save-graph': saveGraphCmd, 'add-edge-and-save': addEdgeAndSaveCmd, 'add-node-and-save': addNodeAndSaveCmd, + 'import-graph-json': importGraphJsonCmd, 'add-edge': addEdgeCmd, 'add-node': addNodeCmd, - 'import-graph-json': importGraphJsonCmd, 'insert-node-at-path': insertNodeAtPathCmd, 'start-execution': startExecutionCmd, 'provision-bucket': provisionBucketCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n get-all-record getAllRecord CRUD operations\n function-api-binding functionApiBinding CRUD operations\n function-deployment functionDeployment CRUD operations\n function-graph-ref functionGraphRef CRUD operations\n function-graph-store functionGraphStore CRUD operations\n function-graph-object functionGraphObject CRUD operations\n function-deployment-event functionDeploymentEvent CRUD operations\n org-function-execution-log orgFunctionExecutionLog CRUD operations\n function-graph-execution-output functionGraphExecutionOutput CRUD operations\n function-graph-commit functionGraphCommit CRUD operations\n secret-definition secretDefinition CRUD operations\n function-execution-log functionExecutionLog CRUD operations\n function-graph-execution-node-state functionGraphExecutionNodeState CRUD operations\n function-graph functionGraph CRUD operations\n org-function-invocation orgFunctionInvocation CRUD operations\n function-invocation functionInvocation CRUD operations\n function-graph-execution functionGraphExecution CRUD operations\n function-definition functionDefinition CRUD operations\n read-function-graph readFunctionGraph\n validate-function-graph validateFunctionGraph\n init-empty-repo initEmptyRepo\n set-data-at-path setDataAtPath\n import-definitions importDefinitions\n copy-graph copyGraph\n save-graph saveGraph\n add-edge-and-save addEdgeAndSave\n add-node-and-save addNodeAndSave\n add-edge addEdge\n add-node addNode\n import-graph-json importGraphJson\n insert-node-at-path insertNodeAtPath\n start-execution startExecution\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n'; + '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n get-all-record getAllRecord CRUD operations\n function-api-binding functionApiBinding CRUD operations\n function-deployment functionDeployment CRUD operations\n resource resource CRUD operations\n function-graph-ref functionGraphRef CRUD operations\n function-graph-store functionGraphStore CRUD operations\n function-graph-object functionGraphObject CRUD operations\n function-deployment-event functionDeploymentEvent CRUD operations\n org-function-execution-log orgFunctionExecutionLog CRUD operations\n resource-event resourceEvent CRUD operations\n function-graph-execution-output functionGraphExecutionOutput CRUD operations\n function-graph-commit functionGraphCommit CRUD operations\n secret-definition secretDefinition CRUD operations\n function-execution-log functionExecutionLog CRUD operations\n function-graph functionGraph CRUD operations\n function-graph-execution-node-state functionGraphExecutionNodeState CRUD operations\n platform-namespace platformNamespace CRUD operations\n org-function-invocation orgFunctionInvocation CRUD operations\n function-invocation functionInvocation CRUD operations\n platform-namespace-event platformNamespaceEvent CRUD operations\n function-graph-execution functionGraphExecution CRUD operations\n function-definition functionDefinition CRUD operations\n read-function-graph readFunctionGraph\n validate-function-graph validateFunctionGraph\n init-empty-repo initEmptyRepo\n set-data-at-path setDataAtPath\n import-definitions importDefinitions\n copy-graph copyGraph\n save-graph saveGraph\n add-edge-and-save addEdgeAndSave\n add-node-and-save addNodeAndSave\n import-graph-json importGraphJson\n add-edge addEdge\n add-node addNode\n insert-node-at-path insertNodeAtPath\n start-execution startExecution\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n'; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/compute/cli/commands/function-graph-execution.ts b/sdk/constructive-cli/src/compute/cli/commands/function-graph-execution.ts index a49aeaed79..059abe7b20 100644 --- a/sdk/constructive-cli/src/compute/cli/commands/function-graph-execution.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/function-graph-execution.ts @@ -21,7 +21,6 @@ const fieldSchema: FieldSchema = { graphId: 'uuid', invocationId: 'uuid', databaseId: 'uuid', - entityId: 'uuid', outputNode: 'string', outputPort: 'string', status: 'string', @@ -97,7 +96,6 @@ async function handleList(argv: Partial>, _prompter: Inq graphId: true, invocationId: true, databaseId: true, - entityId: true, outputNode: true, outputPort: true, status: true, @@ -145,7 +143,6 @@ async function handleFindFirst(argv: Partial>, _prompter graphId: true, invocationId: true, databaseId: true, - entityId: true, outputNode: true, outputPort: true, status: true, @@ -205,7 +202,6 @@ async function handleGet(argv: Partial>, prompter: Inqui graphId: true, invocationId: true, databaseId: true, - entityId: true, outputNode: true, outputPort: true, status: true, @@ -265,13 +261,6 @@ async function handleCreate(argv: Partial>, prompter: In message: 'databaseId', required: true, }, - { - type: 'text', - name: 'entityId', - message: 'entityId', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'outputNode', @@ -411,7 +400,6 @@ async function handleCreate(argv: Partial>, prompter: In graphId: cleanedData.graphId, invocationId: cleanedData.invocationId, databaseId: cleanedData.databaseId, - entityId: cleanedData.entityId, outputNode: cleanedData.outputNode, outputPort: cleanedData.outputPort, status: cleanedData.status, @@ -437,7 +425,6 @@ async function handleCreate(argv: Partial>, prompter: In graphId: true, invocationId: true, databaseId: true, - entityId: true, outputNode: true, outputPort: true, status: true, @@ -502,13 +489,6 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'databaseId', required: false, }, - { - type: 'text', - name: 'entityId', - message: 'entityId', - required: false, - skipPrompt: true, - }, { type: 'text', name: 'outputNode', @@ -648,7 +628,6 @@ async function handleUpdate(argv: Partial>, prompter: In graphId: cleanedData.graphId, invocationId: cleanedData.invocationId, databaseId: cleanedData.databaseId, - entityId: cleanedData.entityId, outputNode: cleanedData.outputNode, outputPort: cleanedData.outputPort, status: cleanedData.status, @@ -674,7 +653,6 @@ async function handleUpdate(argv: Partial>, prompter: In graphId: true, invocationId: true, databaseId: true, - entityId: true, outputNode: true, outputPort: true, status: true, diff --git a/sdk/constructive-cli/src/compute/cli/commands/function-graph.ts b/sdk/constructive-cli/src/compute/cli/commands/function-graph.ts index 0586972990..0a5288cd3f 100644 --- a/sdk/constructive-cli/src/compute/cli/commands/function-graph.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/function-graph.ts @@ -19,7 +19,6 @@ const fieldSchema: FieldSchema = { id: 'uuid', databaseId: 'uuid', storeId: 'uuid', - entityId: 'uuid', context: 'string', name: 'string', description: 'string', @@ -84,7 +83,6 @@ async function handleList(argv: Partial>, _prompter: Inq id: true, databaseId: true, storeId: true, - entityId: true, context: true, name: true, description: true, @@ -117,7 +115,6 @@ async function handleFindFirst(argv: Partial>, _prompter id: true, databaseId: true, storeId: true, - entityId: true, context: true, name: true, description: true, @@ -162,7 +159,6 @@ async function handleGet(argv: Partial>, prompter: Inqui id: true, databaseId: true, storeId: true, - entityId: true, context: true, name: true, description: true, @@ -199,12 +195,6 @@ async function handleCreate(argv: Partial>, prompter: In message: 'storeId', required: true, }, - { - type: 'text', - name: 'entityId', - message: 'entityId', - required: true, - }, { type: 'text', name: 'context', @@ -259,7 +249,6 @@ async function handleCreate(argv: Partial>, prompter: In data: { databaseId: cleanedData.databaseId, storeId: cleanedData.storeId, - entityId: cleanedData.entityId, context: cleanedData.context, name: cleanedData.name, description: cleanedData.description, @@ -272,7 +261,6 @@ async function handleCreate(argv: Partial>, prompter: In id: true, databaseId: true, storeId: true, - entityId: true, context: true, name: true, description: true, @@ -315,12 +303,6 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'storeId', required: false, }, - { - type: 'text', - name: 'entityId', - message: 'entityId', - required: false, - }, { type: 'text', name: 'context', @@ -375,7 +357,6 @@ async function handleUpdate(argv: Partial>, prompter: In data: { databaseId: cleanedData.databaseId, storeId: cleanedData.storeId, - entityId: cleanedData.entityId, context: cleanedData.context, name: cleanedData.name, description: cleanedData.description, @@ -388,7 +369,6 @@ async function handleUpdate(argv: Partial>, prompter: In id: true, databaseId: true, storeId: true, - entityId: true, context: true, name: true, description: true, diff --git a/sdk/constructive-cli/src/compute/cli/commands/platform-namespace-event.ts b/sdk/constructive-cli/src/compute/cli/commands/platform-namespace-event.ts new file mode 100644 index 0000000000..e50a517de3 --- /dev/null +++ b/sdk/constructive-cli/src/compute/cli/commands/platform-namespace-event.ts @@ -0,0 +1,539 @@ +/** + * CLI commands for PlatformNamespaceEvent + * @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 { + CreatePlatformNamespaceEventInput, + PlatformNamespaceEventPatch, + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + createdAt: 'string', + id: 'uuid', + namespaceId: 'uuid', + eventType: 'string', + actorId: 'uuid', + message: 'string', + metadata: 'json', + cpuMillicores: 'int', + memoryBytes: 'int', + storageBytes: 'int', + networkIngressBytes: 'int', + networkEgressBytes: 'int', + podCount: 'int', + metrics: 'json', + databaseId: 'uuid', +}; +const usage = + '\nplatform-namespace-event \n\nCommands:\n list List platformNamespaceEvent records\n find-first Find first matching platformNamespaceEvent record\n get Get a platformNamespaceEvent by ID\n create Create a new platformNamespaceEvent\n update Update an existing platformNamespaceEvent\n delete Delete a platformNamespaceEvent\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + if (argv.help || argv.h) { + console.log(usage); + process.exit(0); + } + const { first: subcommand, newArgv } = extractFirst(argv); + if (!subcommand) { + const answer = await prompter.prompt(argv, [ + { + type: 'autocomplete', + name: 'subcommand', + message: 'What do you want to do?', + options: ['list', 'find-first', 'get', 'create', 'update', 'delete'], + }, + ]); + return handleTableSubcommand(answer.subcommand as string, newArgv, prompter); + } + return handleTableSubcommand(subcommand, newArgv, prompter); +}; +async function handleTableSubcommand( + subcommand: string, + argv: Partial>, + prompter: Inquirerer +) { + switch (subcommand) { + case 'list': + return handleList(argv, prompter); + case 'find-first': + return handleFindFirst(argv, prompter); + case 'get': + return handleGet(argv, prompter); + case 'create': + return handleCreate(argv, prompter); + case 'update': + return handleUpdate(argv, prompter); + case 'delete': + return handleDelete(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + createdAt: true, + id: true, + namespaceId: true, + eventType: true, + actorId: true, + message: true, + metadata: true, + cpuMillicores: true, + memoryBytes: true, + storageBytes: true, + networkIngressBytes: true, + networkEgressBytes: true, + podCount: true, + metrics: true, + databaseId: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs< + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy + > & { + select: PlatformNamespaceEventSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.platformNamespaceEvent.findMany(findManyArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to list records.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleFindFirst(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + createdAt: true, + id: true, + namespaceId: true, + eventType: true, + actorId: true, + message: true, + metadata: true, + cpuMillicores: true, + memoryBytes: true, + storageBytes: true, + networkIngressBytes: true, + networkEgressBytes: true, + podCount: true, + metrics: true, + databaseId: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs< + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy + > & { + select: PlatformNamespaceEventSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.platformNamespaceEvent.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.platformNamespaceEvent + .findOne({ + id: answers.id as string, + select: { + createdAt: true, + id: true, + namespaceId: true, + eventType: true, + actorId: true, + message: true, + metadata: true, + cpuMillicores: true, + memoryBytes: true, + storageBytes: true, + networkIngressBytes: true, + networkEgressBytes: true, + podCount: true, + metrics: true, + databaseId: 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: 'namespaceId', + message: 'namespaceId', + required: true, + }, + { + type: 'text', + name: 'eventType', + message: 'eventType', + required: true, + }, + { + type: 'text', + name: 'actorId', + message: 'actorId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'message', + message: 'message', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'metadata', + message: 'metadata', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'cpuMillicores', + message: 'cpuMillicores', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'memoryBytes', + message: 'memoryBytes', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'storageBytes', + message: 'storageBytes', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'networkIngressBytes', + message: 'networkIngressBytes', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'networkEgressBytes', + message: 'networkEgressBytes', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'podCount', + message: 'podCount', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'metrics', + message: 'metrics', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreatePlatformNamespaceEventInput['platformNamespaceEvent']; + const client = getClient(); + const result = await client.platformNamespaceEvent + .create({ + data: { + namespaceId: cleanedData.namespaceId, + eventType: cleanedData.eventType, + actorId: cleanedData.actorId, + message: cleanedData.message, + metadata: cleanedData.metadata, + cpuMillicores: cleanedData.cpuMillicores, + memoryBytes: cleanedData.memoryBytes, + storageBytes: cleanedData.storageBytes, + networkIngressBytes: cleanedData.networkIngressBytes, + networkEgressBytes: cleanedData.networkEgressBytes, + podCount: cleanedData.podCount, + metrics: cleanedData.metrics, + databaseId: cleanedData.databaseId, + }, + select: { + createdAt: true, + id: true, + namespaceId: true, + eventType: true, + actorId: true, + message: true, + metadata: true, + cpuMillicores: true, + memoryBytes: true, + storageBytes: true, + networkIngressBytes: true, + networkEgressBytes: true, + podCount: true, + metrics: true, + databaseId: 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: 'createdAt', + message: 'createdAt', + required: true, + }, + { + type: 'text', + name: 'namespaceId', + message: 'namespaceId', + required: false, + }, + { + type: 'text', + name: 'eventType', + message: 'eventType', + required: false, + }, + { + type: 'text', + name: 'actorId', + message: 'actorId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'message', + message: 'message', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'metadata', + message: 'metadata', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'cpuMillicores', + message: 'cpuMillicores', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'memoryBytes', + message: 'memoryBytes', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'storageBytes', + message: 'storageBytes', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'networkIngressBytes', + message: 'networkIngressBytes', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'networkEgressBytes', + message: 'networkEgressBytes', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'podCount', + message: 'podCount', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'metrics', + message: 'metrics', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as PlatformNamespaceEventPatch; + const client = getClient(); + const result = await client.platformNamespaceEvent + .update({ + where: { + id: answers.id as string, + createdAt: answers.createdAt as string, + }, + data: { + namespaceId: cleanedData.namespaceId, + eventType: cleanedData.eventType, + actorId: cleanedData.actorId, + message: cleanedData.message, + metadata: cleanedData.metadata, + cpuMillicores: cleanedData.cpuMillicores, + memoryBytes: cleanedData.memoryBytes, + storageBytes: cleanedData.storageBytes, + networkIngressBytes: cleanedData.networkIngressBytes, + networkEgressBytes: cleanedData.networkEgressBytes, + podCount: cleanedData.podCount, + metrics: cleanedData.metrics, + databaseId: cleanedData.databaseId, + }, + select: { + createdAt: true, + id: true, + namespaceId: true, + eventType: true, + actorId: true, + message: true, + metadata: true, + cpuMillicores: true, + memoryBytes: true, + storageBytes: true, + networkIngressBytes: true, + networkEgressBytes: true, + podCount: true, + metrics: true, + databaseId: 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, + }, + { + type: 'text', + name: 'createdAt', + message: 'createdAt', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const client = getClient(); + const result = await client.platformNamespaceEvent + .delete({ + where: { + id: answers.id as string, + createdAt: answers.createdAt 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/compute/cli/commands/platform-namespace.ts b/sdk/constructive-cli/src/compute/cli/commands/platform-namespace.ts new file mode 100644 index 0000000000..ab47a40519 --- /dev/null +++ b/sdk/constructive-cli/src/compute/cli/commands/platform-namespace.ts @@ -0,0 +1,457 @@ +/** + * CLI commands for PlatformNamespace + * @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 { + CreatePlatformNamespaceInput, + PlatformNamespacePatch, + PlatformNamespaceSelect, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + createdAt: 'string', + updatedAt: 'string', + name: 'string', + namespaceName: 'string', + description: 'string', + isActive: 'boolean', + labels: 'json', + annotations: 'json', + databaseId: 'uuid', + sourceDatabaseId: 'uuid', + sourceScope: 'string', + isManaged: 'boolean', +}; +const usage = + '\nplatform-namespace \n\nCommands:\n list List platformNamespace records\n find-first Find first matching platformNamespace record\n get Get a platformNamespace by ID\n create Create a new platformNamespace\n update Update an existing platformNamespace\n delete Delete a platformNamespace\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 = { + id: true, + createdAt: true, + updatedAt: true, + name: true, + namespaceName: true, + description: true, + isActive: true, + labels: true, + annotations: true, + databaseId: true, + sourceDatabaseId: true, + sourceScope: true, + isManaged: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs & { + select: PlatformNamespaceSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.platformNamespace.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 = { + id: true, + createdAt: true, + updatedAt: true, + name: true, + namespaceName: true, + description: true, + isActive: true, + labels: true, + annotations: true, + databaseId: true, + sourceDatabaseId: true, + sourceScope: true, + isManaged: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: PlatformNamespaceSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.platformNamespace.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.platformNamespace + .findOne({ + id: answers.id as string, + select: { + id: true, + createdAt: true, + updatedAt: true, + name: true, + namespaceName: true, + description: true, + isActive: true, + labels: true, + annotations: true, + databaseId: true, + sourceDatabaseId: true, + sourceScope: true, + isManaged: 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: 'name', + message: 'name', + required: true, + }, + { + type: 'text', + name: 'namespaceName', + message: 'namespaceName', + required: true, + }, + { + type: 'text', + name: 'description', + message: 'description', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'isActive', + message: 'isActive', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: true, + }, + { + type: 'text', + name: 'sourceDatabaseId', + message: 'sourceDatabaseId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'sourceScope', + message: 'sourceScope', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'isManaged', + message: 'isManaged', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreatePlatformNamespaceInput['platformNamespace']; + const client = getClient(); + const result = await client.platformNamespace + .create({ + data: { + name: cleanedData.name, + namespaceName: cleanedData.namespaceName, + description: cleanedData.description, + isActive: cleanedData.isActive, + labels: cleanedData.labels, + annotations: cleanedData.annotations, + databaseId: cleanedData.databaseId, + sourceDatabaseId: cleanedData.sourceDatabaseId, + sourceScope: cleanedData.sourceScope, + isManaged: cleanedData.isManaged, + }, + select: { + id: true, + createdAt: true, + updatedAt: true, + name: true, + namespaceName: true, + description: true, + isActive: true, + labels: true, + annotations: true, + databaseId: true, + sourceDatabaseId: true, + sourceScope: true, + isManaged: 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: 'name', + message: 'name', + required: false, + }, + { + type: 'text', + name: 'namespaceName', + message: 'namespaceName', + required: false, + }, + { + type: 'text', + name: 'description', + message: 'description', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'isActive', + message: 'isActive', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + }, + { + type: 'text', + name: 'sourceDatabaseId', + message: 'sourceDatabaseId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'sourceScope', + message: 'sourceScope', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'isManaged', + message: 'isManaged', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as PlatformNamespacePatch; + const client = getClient(); + const result = await client.platformNamespace + .update({ + where: { + id: answers.id as string, + }, + data: { + name: cleanedData.name, + namespaceName: cleanedData.namespaceName, + description: cleanedData.description, + isActive: cleanedData.isActive, + labels: cleanedData.labels, + annotations: cleanedData.annotations, + databaseId: cleanedData.databaseId, + sourceDatabaseId: cleanedData.sourceDatabaseId, + sourceScope: cleanedData.sourceScope, + isManaged: cleanedData.isManaged, + }, + select: { + id: true, + createdAt: true, + updatedAt: true, + name: true, + namespaceName: true, + description: true, + isActive: true, + labels: true, + annotations: true, + databaseId: true, + sourceDatabaseId: true, + sourceScope: true, + isManaged: 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.platformNamespace + .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/compute/cli/commands/resource-event.ts b/sdk/constructive-cli/src/compute/cli/commands/resource-event.ts new file mode 100644 index 0000000000..874357006a --- /dev/null +++ b/sdk/constructive-cli/src/compute/cli/commands/resource-event.ts @@ -0,0 +1,377 @@ +/** + * CLI commands for ResourceEvent + * @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 { + CreateResourceEventInput, + ResourceEventPatch, + ResourceEventSelect, + ResourceEventFilter, + ResourceEventOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + createdAt: 'string', + id: 'uuid', + resourceId: 'uuid', + eventType: 'string', + actorId: 'uuid', + message: 'string', + metadata: 'json', + databaseId: 'uuid', +}; +const usage = + '\nresource-event \n\nCommands:\n list List resourceEvent records\n find-first Find first matching resourceEvent record\n get Get a resourceEvent by ID\n create Create a new resourceEvent\n update Update an existing resourceEvent\n delete Delete a resourceEvent\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + if (argv.help || argv.h) { + console.log(usage); + process.exit(0); + } + const { first: subcommand, newArgv } = extractFirst(argv); + if (!subcommand) { + const answer = await prompter.prompt(argv, [ + { + type: 'autocomplete', + name: 'subcommand', + message: 'What do you want to do?', + options: ['list', 'find-first', 'get', 'create', 'update', 'delete'], + }, + ]); + return handleTableSubcommand(answer.subcommand as string, newArgv, prompter); + } + return handleTableSubcommand(subcommand, newArgv, prompter); +}; +async function handleTableSubcommand( + subcommand: string, + argv: Partial>, + prompter: Inquirerer +) { + switch (subcommand) { + case 'list': + return handleList(argv, prompter); + case 'find-first': + return handleFindFirst(argv, prompter); + case 'get': + return handleGet(argv, prompter); + case 'create': + return handleCreate(argv, prompter); + case 'update': + return handleUpdate(argv, prompter); + case 'delete': + return handleDelete(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + createdAt: true, + id: true, + resourceId: true, + eventType: true, + actorId: true, + message: true, + metadata: true, + databaseId: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs & { + select: ResourceEventSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.resourceEvent.findMany(findManyArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to list records.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleFindFirst(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + createdAt: true, + id: true, + resourceId: true, + eventType: true, + actorId: true, + message: true, + metadata: true, + databaseId: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: ResourceEventSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.resourceEvent.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.resourceEvent + .findOne({ + id: answers.id as string, + select: { + createdAt: true, + id: true, + resourceId: true, + eventType: true, + actorId: true, + message: true, + metadata: true, + databaseId: 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: 'resourceId', + message: 'resourceId', + required: true, + }, + { + type: 'text', + name: 'eventType', + message: 'eventType', + required: true, + }, + { + type: 'text', + name: 'actorId', + message: 'actorId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'message', + message: 'message', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'metadata', + message: 'metadata', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreateResourceEventInput['resourceEvent']; + const client = getClient(); + const result = await client.resourceEvent + .create({ + data: { + resourceId: cleanedData.resourceId, + eventType: cleanedData.eventType, + actorId: cleanedData.actorId, + message: cleanedData.message, + metadata: cleanedData.metadata, + databaseId: cleanedData.databaseId, + }, + select: { + createdAt: true, + id: true, + resourceId: true, + eventType: true, + actorId: true, + message: true, + metadata: true, + databaseId: 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: 'createdAt', + message: 'createdAt', + required: true, + }, + { + type: 'text', + name: 'resourceId', + message: 'resourceId', + required: false, + }, + { + type: 'text', + name: 'eventType', + message: 'eventType', + required: false, + }, + { + type: 'text', + name: 'actorId', + message: 'actorId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'message', + message: 'message', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'metadata', + message: 'metadata', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as ResourceEventPatch; + const client = getClient(); + const result = await client.resourceEvent + .update({ + where: { + id: answers.id as string, + createdAt: answers.createdAt as string, + }, + data: { + resourceId: cleanedData.resourceId, + eventType: cleanedData.eventType, + actorId: cleanedData.actorId, + message: cleanedData.message, + metadata: cleanedData.metadata, + databaseId: cleanedData.databaseId, + }, + select: { + createdAt: true, + id: true, + resourceId: true, + eventType: true, + actorId: true, + message: true, + metadata: true, + databaseId: 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, + }, + { + type: 'text', + name: 'createdAt', + message: 'createdAt', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const client = getClient(); + const result = await client.resourceEvent + .delete({ + where: { + id: answers.id as string, + createdAt: answers.createdAt 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/compute/cli/commands/resource.ts b/sdk/constructive-cli/src/compute/cli/commands/resource.ts new file mode 100644 index 0000000000..5edb34fc5d --- /dev/null +++ b/sdk/constructive-cli/src/compute/cli/commands/resource.ts @@ -0,0 +1,538 @@ +/** + * CLI commands for Resource + * @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 { + CreateResourceInput, + ResourcePatch, + ResourceSelect, + ResourceFilter, + ResourceOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + createdAt: 'string', + updatedAt: 'string', + createdBy: 'uuid', + updatedBy: 'uuid', + namespaceId: 'uuid', + kind: 'string', + name: 'string', + slug: 'string', + spec: 'json', + status: 'string', + statusObserved: 'json', + lastError: 'string', + errorCount: 'int', + labels: 'json', + annotations: 'json', + databaseId: 'uuid', +}; +const usage = + '\nresource \n\nCommands:\n list List resource records\n find-first Find first matching resource record\n get Get a resource by ID\n create Create a new resource\n update Update an existing resource\n delete Delete a resource\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 = { + id: true, + createdAt: true, + updatedAt: true, + createdBy: true, + updatedBy: true, + namespaceId: true, + kind: true, + name: true, + slug: true, + spec: true, + status: true, + statusObserved: true, + lastError: true, + errorCount: true, + labels: true, + annotations: true, + databaseId: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs & { + select: ResourceSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.resource.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 = { + id: true, + createdAt: true, + updatedAt: true, + createdBy: true, + updatedBy: true, + namespaceId: true, + kind: true, + name: true, + slug: true, + spec: true, + status: true, + statusObserved: true, + lastError: true, + errorCount: true, + labels: true, + annotations: true, + databaseId: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: ResourceSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.resource.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.resource + .findOne({ + id: answers.id as string, + select: { + id: true, + createdAt: true, + updatedAt: true, + createdBy: true, + updatedBy: true, + namespaceId: true, + kind: true, + name: true, + slug: true, + spec: true, + status: true, + statusObserved: true, + lastError: true, + errorCount: true, + labels: true, + annotations: true, + databaseId: 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: 'createdBy', + message: 'createdBy', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'updatedBy', + message: 'updatedBy', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'namespaceId', + message: 'namespaceId', + required: true, + }, + { + type: 'text', + name: 'kind', + message: 'kind', + required: true, + }, + { + type: 'text', + name: 'name', + message: 'name', + required: true, + }, + { + type: 'text', + name: 'slug', + message: 'slug', + required: true, + }, + { + type: 'json', + name: 'spec', + message: 'spec', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'status', + message: 'status', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'statusObserved', + message: 'statusObserved', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'lastError', + message: 'lastError', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'errorCount', + message: 'errorCount', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as CreateResourceInput['resource']; + const client = getClient(); + const result = await client.resource + .create({ + data: { + createdBy: cleanedData.createdBy, + updatedBy: cleanedData.updatedBy, + namespaceId: cleanedData.namespaceId, + kind: cleanedData.kind, + name: cleanedData.name, + slug: cleanedData.slug, + spec: cleanedData.spec, + status: cleanedData.status, + statusObserved: cleanedData.statusObserved, + lastError: cleanedData.lastError, + errorCount: cleanedData.errorCount, + labels: cleanedData.labels, + annotations: cleanedData.annotations, + databaseId: cleanedData.databaseId, + }, + select: { + id: true, + createdAt: true, + updatedAt: true, + createdBy: true, + updatedBy: true, + namespaceId: true, + kind: true, + name: true, + slug: true, + spec: true, + status: true, + statusObserved: true, + lastError: true, + errorCount: true, + labels: true, + annotations: true, + databaseId: 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: 'createdBy', + message: 'createdBy', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'updatedBy', + message: 'updatedBy', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'namespaceId', + message: 'namespaceId', + required: false, + }, + { + type: 'text', + name: 'kind', + message: 'kind', + required: false, + }, + { + type: 'text', + name: 'name', + message: 'name', + required: false, + }, + { + type: 'text', + name: 'slug', + message: 'slug', + required: false, + }, + { + type: 'json', + name: 'spec', + message: 'spec', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'status', + message: 'status', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'statusObserved', + message: 'statusObserved', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'lastError', + message: 'lastError', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'errorCount', + message: 'errorCount', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'labels', + message: 'labels', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'annotations', + message: 'annotations', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as ResourcePatch; + const client = getClient(); + const result = await client.resource + .update({ + where: { + id: answers.id as string, + }, + data: { + createdBy: cleanedData.createdBy, + updatedBy: cleanedData.updatedBy, + namespaceId: cleanedData.namespaceId, + kind: cleanedData.kind, + name: cleanedData.name, + slug: cleanedData.slug, + spec: cleanedData.spec, + status: cleanedData.status, + statusObserved: cleanedData.statusObserved, + lastError: cleanedData.lastError, + errorCount: cleanedData.errorCount, + labels: cleanedData.labels, + annotations: cleanedData.annotations, + databaseId: cleanedData.databaseId, + }, + select: { + id: true, + createdAt: true, + updatedAt: true, + createdBy: true, + updatedBy: true, + namespaceId: true, + kind: true, + name: true, + slug: true, + spec: true, + status: true, + statusObserved: true, + lastError: true, + errorCount: true, + labels: true, + annotations: true, + databaseId: 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.resource + .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/compute/orm/README.md b/sdk/constructive-cli/src/compute/orm/README.md index c266bdfcb7..2ea41b7b40 100644 --- a/sdk/constructive-cli/src/compute/orm/README.md +++ b/sdk/constructive-cli/src/compute/orm/README.md @@ -24,19 +24,23 @@ const db = createClient({ | `getAllRecord` | findMany, findOne, create, update, delete | | `functionApiBinding` | findMany, findOne, create, update, delete | | `functionDeployment` | findMany, findOne, create, update, delete | +| `resource` | findMany, findOne, create, update, delete | | `functionGraphRef` | findMany, findOne, create, update, delete | | `functionGraphStore` | findMany, findOne, create, update, delete | | `functionGraphObject` | findMany, findOne, create, update, delete | | `functionDeploymentEvent` | findMany, findOne, create, update, delete | | `orgFunctionExecutionLog` | findMany, findOne, create, update, delete | +| `resourceEvent` | findMany, findOne, create, update, delete | | `functionGraphExecutionOutput` | findMany, findOne, create, update, delete | | `functionGraphCommit` | findMany, findOne, create, update, delete | | `secretDefinition` | findMany, findOne, create, update, delete | | `functionExecutionLog` | findMany, findOne, create, update, delete | -| `functionGraphExecutionNodeState` | findMany, findOne, create, update, delete | | `functionGraph` | findMany, findOne, create, update, delete | +| `functionGraphExecutionNodeState` | findMany, findOne, create, update, delete | +| `platformNamespace` | findMany, findOne, create, update, delete | | `orgFunctionInvocation` | findMany, findOne, create, update, delete | | `functionInvocation` | findMany, findOne, create, update, delete | +| `platformNamespaceEvent` | findMany, findOne, create, update, delete | | `functionGraphExecution` | findMany, findOne, create, update, delete | | `functionDefinition` | findMany, findOne, create, update, delete | @@ -154,6 +158,51 @@ const updated = await db.functionDeployment.update({ where: { id: '' }, da const deleted = await db.functionDeployment.delete({ where: { id: '' } }).execute(); ``` +### `db.resource` + +CRUD operations for Resource records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `updatedBy` | UUID | Yes | +| `namespaceId` | UUID | Yes | +| `kind` | String | Yes | +| `name` | String | Yes | +| `slug` | String | Yes | +| `spec` | JSON | Yes | +| `status` | String | Yes | +| `statusObserved` | JSON | Yes | +| `lastError` | String | Yes | +| `errorCount` | Int | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | +| `databaseId` | UUID | Yes | + +**Operations:** + +```typescript +// List all resource records +const items = await db.resource.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, namespaceId: true, kind: true, name: true, slug: true, spec: true, status: true, statusObserved: true, lastError: true, errorCount: true, labels: true, annotations: true, databaseId: true } }).execute(); + +// Get one by id +const item = await db.resource.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, namespaceId: true, kind: true, name: true, slug: true, spec: true, status: true, statusObserved: true, lastError: true, errorCount: true, labels: true, annotations: true, databaseId: true } }).execute(); + +// Create +const created = await db.resource.create({ data: { createdBy: '', updatedBy: '', namespaceId: '', kind: '', name: '', slug: '', spec: '', status: '', statusObserved: '', lastError: '', errorCount: '', labels: '', annotations: '', databaseId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.resource.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.resource.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphRef` CRUD operations for FunctionGraphRef records. @@ -326,6 +375,42 @@ const updated = await db.orgFunctionExecutionLog.update({ where: { id: '' const deleted = await db.orgFunctionExecutionLog.delete({ where: { id: '' } }).execute(); ``` +### `db.resourceEvent` + +CRUD operations for ResourceEvent records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `resourceId` | UUID | Yes | +| `eventType` | String | Yes | +| `actorId` | UUID | Yes | +| `message` | String | Yes | +| `metadata` | JSON | Yes | +| `databaseId` | UUID | Yes | + +**Operations:** + +```typescript +// List all resourceEvent records +const items = await db.resourceEvent.findMany({ select: { createdAt: true, id: true, resourceId: true, eventType: true, actorId: true, message: true, metadata: true, databaseId: true } }).execute(); + +// Get one by id +const item = await db.resourceEvent.findOne({ id: '', select: { createdAt: true, id: true, resourceId: true, eventType: true, actorId: true, message: true, metadata: true, databaseId: true } }).execute(); + +// Create +const created = await db.resourceEvent.create({ data: { resourceId: '', eventType: '', actorId: '', message: '', metadata: '', databaseId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.resourceEvent.update({ where: { id: '' }, data: { resourceId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.resourceEvent.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphExecutionOutput` CRUD operations for FunctionGraphExecutionOutput records. @@ -470,6 +555,46 @@ const updated = await db.functionExecutionLog.update({ where: { id: '' }, const deleted = await db.functionExecutionLog.delete({ where: { id: '' } }).execute(); ``` +### `db.functionGraph` + +CRUD operations for FunctionGraph records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `storeId` | UUID | Yes | +| `context` | String | Yes | +| `name` | String | Yes | +| `description` | String | Yes | +| `definitionsCommitId` | UUID | Yes | +| `isValid` | Boolean | Yes | +| `validationErrors` | JSON | Yes | +| `createdBy` | UUID | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all functionGraph records +const items = await db.functionGraph.findMany({ select: { id: true, databaseId: true, storeId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.functionGraph.findOne({ id: '', select: { id: true, databaseId: true, storeId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.functionGraph.create({ data: { databaseId: '', storeId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.functionGraph.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.functionGraph.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphExecutionNodeState` CRUD operations for FunctionGraphExecutionNodeState records. @@ -510,45 +635,45 @@ const updated = await db.functionGraphExecutionNodeState.update({ where: { id: ' const deleted = await db.functionGraphExecutionNodeState.delete({ where: { id: '' } }).execute(); ``` -### `db.functionGraph` +### `db.platformNamespace` -CRUD operations for FunctionGraph records. +CRUD operations for PlatformNamespace records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | -| `databaseId` | UUID | Yes | -| `storeId` | UUID | Yes | -| `entityId` | UUID | Yes | -| `context` | String | Yes | -| `name` | String | Yes | -| `description` | String | Yes | -| `definitionsCommitId` | UUID | Yes | -| `isValid` | Boolean | Yes | -| `validationErrors` | JSON | Yes | -| `createdBy` | UUID | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | +| `name` | String | Yes | +| `namespaceName` | String | Yes | +| `description` | String | Yes | +| `isActive` | Boolean | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | +| `databaseId` | UUID | Yes | +| `sourceDatabaseId` | UUID | Yes | +| `sourceScope` | String | Yes | +| `isManaged` | Boolean | Yes | **Operations:** ```typescript -// List all functionGraph records -const items = await db.functionGraph.findMany({ select: { id: true, databaseId: true, storeId: true, entityId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); +// List all platformNamespace records +const items = await db.platformNamespace.findMany({ select: { id: true, createdAt: true, updatedAt: true, name: true, namespaceName: true, description: true, isActive: true, labels: true, annotations: true, databaseId: true, sourceDatabaseId: true, sourceScope: true, isManaged: true } }).execute(); // Get one by id -const item = await db.functionGraph.findOne({ id: '', select: { id: true, databaseId: true, storeId: true, entityId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.platformNamespace.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, name: true, namespaceName: true, description: true, isActive: true, labels: true, annotations: true, databaseId: true, sourceDatabaseId: true, sourceScope: true, isManaged: true } }).execute(); // Create -const created = await db.functionGraph.create({ data: { databaseId: '', storeId: '', entityId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }, select: { id: true } }).execute(); +const created = await db.platformNamespace.create({ data: { name: '', namespaceName: '', description: '', isActive: '', labels: '', annotations: '', databaseId: '', sourceDatabaseId: '', sourceScope: '', isManaged: '' }, select: { id: true } }).execute(); // Update -const updated = await db.functionGraph.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.platformNamespace.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.functionGraph.delete({ where: { id: '' } }).execute(); +const deleted = await db.platformNamespace.delete({ where: { id: '' } }).execute(); ``` ### `db.orgFunctionInvocation` @@ -636,6 +761,49 @@ const updated = await db.functionInvocation.update({ where: { id: '' }, da const deleted = await db.functionInvocation.delete({ where: { id: '' } }).execute(); ``` +### `db.platformNamespaceEvent` + +CRUD operations for PlatformNamespaceEvent records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `namespaceId` | UUID | Yes | +| `eventType` | String | Yes | +| `actorId` | UUID | Yes | +| `message` | String | Yes | +| `metadata` | JSON | Yes | +| `cpuMillicores` | Int | Yes | +| `memoryBytes` | BigInt | Yes | +| `storageBytes` | BigInt | Yes | +| `networkIngressBytes` | BigInt | Yes | +| `networkEgressBytes` | BigInt | Yes | +| `podCount` | Int | Yes | +| `metrics` | JSON | Yes | +| `databaseId` | UUID | Yes | + +**Operations:** + +```typescript +// List all platformNamespaceEvent records +const items = await db.platformNamespaceEvent.findMany({ select: { createdAt: true, id: true, namespaceId: true, eventType: true, actorId: true, message: true, metadata: true, cpuMillicores: true, memoryBytes: true, storageBytes: true, networkIngressBytes: true, networkEgressBytes: true, podCount: true, metrics: true, databaseId: true } }).execute(); + +// Get one by id +const item = await db.platformNamespaceEvent.findOne({ id: '', select: { createdAt: true, id: true, namespaceId: true, eventType: true, actorId: true, message: true, metadata: true, cpuMillicores: true, memoryBytes: true, storageBytes: true, networkIngressBytes: true, networkEgressBytes: true, podCount: true, metrics: true, databaseId: true } }).execute(); + +// Create +const created = await db.platformNamespaceEvent.create({ data: { namespaceId: '', eventType: '', actorId: '', message: '', metadata: '', cpuMillicores: '', memoryBytes: '', storageBytes: '', networkIngressBytes: '', networkEgressBytes: '', podCount: '', metrics: '', databaseId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformNamespaceEvent.update({ where: { id: '' }, data: { namespaceId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformNamespaceEvent.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphExecution` CRUD operations for FunctionGraphExecution records. @@ -649,7 +817,6 @@ CRUD operations for FunctionGraphExecution records. | `graphId` | UUID | Yes | | `invocationId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `entityId` | UUID | Yes | | `outputNode` | String | Yes | | `outputPort` | String | Yes | | `status` | String | Yes | @@ -673,13 +840,13 @@ CRUD operations for FunctionGraphExecution records. ```typescript // List all functionGraphExecution records -const items = await db.functionGraphExecution.findMany({ select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, entityId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); +const items = await db.functionGraphExecution.findMany({ select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); // Get one by id -const item = await db.functionGraphExecution.findOne({ id: '', select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, entityId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); +const item = await db.functionGraphExecution.findOne({ id: '', select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); // Create -const created = await db.functionGraphExecution.create({ data: { startedAt: '', graphId: '', invocationId: '', databaseId: '', entityId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }, select: { id: true } }).execute(); +const created = await db.functionGraphExecution.create({ data: { startedAt: '', graphId: '', invocationId: '', databaseId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionGraphExecution.update({ where: { id: '' }, data: { startedAt: '' }, select: { id: true } }).execute(); @@ -882,49 +1049,49 @@ addNodeAndSave const result = await db.mutation.addNodeAndSave({ input: '' }).execute(); ``` -### `db.mutation.addEdge` +### `db.mutation.importGraphJson` -addEdge +importGraphJson - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | AddEdgeInput (required) | + | `input` | ImportGraphJsonInput (required) | ```typescript -const result = await db.mutation.addEdge({ input: '' }).execute(); +const result = await db.mutation.importGraphJson({ input: '' }).execute(); ``` -### `db.mutation.addNode` +### `db.mutation.addEdge` -addNode +addEdge - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | AddNodeInput (required) | + | `input` | AddEdgeInput (required) | ```typescript -const result = await db.mutation.addNode({ input: '' }).execute(); +const result = await db.mutation.addEdge({ input: '' }).execute(); ``` -### `db.mutation.importGraphJson` +### `db.mutation.addNode` -importGraphJson +addNode - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | ImportGraphJsonInput (required) | + | `input` | AddNodeInput (required) | ```typescript -const result = await db.mutation.importGraphJson({ input: '' }).execute(); +const result = await db.mutation.addNode({ input: '' }).execute(); ``` ### `db.mutation.insertNodeAtPath` diff --git a/sdk/constructive-cli/src/compute/orm/index.ts b/sdk/constructive-cli/src/compute/orm/index.ts index 99193c1d28..ba7ce4651f 100644 --- a/sdk/constructive-cli/src/compute/orm/index.ts +++ b/sdk/constructive-cli/src/compute/orm/index.ts @@ -8,19 +8,23 @@ import type { OrmClientConfig } from './client'; import { GetAllRecordModel } from './models/getAllRecord'; import { FunctionApiBindingModel } from './models/functionApiBinding'; import { FunctionDeploymentModel } from './models/functionDeployment'; +import { ResourceModel } from './models/resource'; import { FunctionGraphRefModel } from './models/functionGraphRef'; import { FunctionGraphStoreModel } from './models/functionGraphStore'; import { FunctionGraphObjectModel } from './models/functionGraphObject'; import { FunctionDeploymentEventModel } from './models/functionDeploymentEvent'; import { OrgFunctionExecutionLogModel } from './models/orgFunctionExecutionLog'; +import { ResourceEventModel } from './models/resourceEvent'; import { FunctionGraphExecutionOutputModel } from './models/functionGraphExecutionOutput'; import { FunctionGraphCommitModel } from './models/functionGraphCommit'; import { SecretDefinitionModel } from './models/secretDefinition'; import { FunctionExecutionLogModel } from './models/functionExecutionLog'; -import { FunctionGraphExecutionNodeStateModel } from './models/functionGraphExecutionNodeState'; import { FunctionGraphModel } from './models/functionGraph'; +import { FunctionGraphExecutionNodeStateModel } from './models/functionGraphExecutionNodeState'; +import { PlatformNamespaceModel } from './models/platformNamespace'; import { OrgFunctionInvocationModel } from './models/orgFunctionInvocation'; import { FunctionInvocationModel } from './models/functionInvocation'; +import { PlatformNamespaceEventModel } from './models/platformNamespaceEvent'; import { FunctionGraphExecutionModel } from './models/functionGraphExecution'; import { FunctionDefinitionModel } from './models/functionDefinition'; import { createQueryOperations } from './query'; @@ -61,19 +65,23 @@ export function createClient(config: OrmClientConfig) { getAllRecord: new GetAllRecordModel(client), functionApiBinding: new FunctionApiBindingModel(client), functionDeployment: new FunctionDeploymentModel(client), + resource: new ResourceModel(client), functionGraphRef: new FunctionGraphRefModel(client), functionGraphStore: new FunctionGraphStoreModel(client), functionGraphObject: new FunctionGraphObjectModel(client), functionDeploymentEvent: new FunctionDeploymentEventModel(client), orgFunctionExecutionLog: new OrgFunctionExecutionLogModel(client), + resourceEvent: new ResourceEventModel(client), functionGraphExecutionOutput: new FunctionGraphExecutionOutputModel(client), functionGraphCommit: new FunctionGraphCommitModel(client), secretDefinition: new SecretDefinitionModel(client), functionExecutionLog: new FunctionExecutionLogModel(client), - functionGraphExecutionNodeState: new FunctionGraphExecutionNodeStateModel(client), functionGraph: new FunctionGraphModel(client), + functionGraphExecutionNodeState: new FunctionGraphExecutionNodeStateModel(client), + platformNamespace: new PlatformNamespaceModel(client), orgFunctionInvocation: new OrgFunctionInvocationModel(client), functionInvocation: new FunctionInvocationModel(client), + platformNamespaceEvent: new PlatformNamespaceEventModel(client), functionGraphExecution: new FunctionGraphExecutionModel(client), functionDefinition: new FunctionDefinitionModel(client), query: createQueryOperations(client), diff --git a/sdk/constructive-cli/src/compute/orm/input-types.ts b/sdk/constructive-cli/src/compute/orm/input-types.ts index f88c3e77d1..6b89295abc 100644 --- a/sdk/constructive-cli/src/compute/orm/input-types.ts +++ b/sdk/constructive-cli/src/compute/orm/input-types.ts @@ -292,6 +292,38 @@ export interface FunctionDeployment { /** Database that owns this resource (database-scoped isolation) */ databaseId?: string | null; } +/** Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace */ +export interface Resource { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + createdBy?: string | null; + updatedBy?: string | null; + /** Namespace this resource belongs to (security boundary, maps to K8s namespace) */ + namespaceId?: string | null; + /** Resource kind: Deployment, StatefulSet, Service, Ingress, Certificate */ + kind?: string | null; + /** Human-readable resource name */ + name?: string | null; + /** URL-safe identifier, unique within (namespace_id, kind) */ + slug?: string | null; + /** Desired state — kind-specific configuration (image, ports, resources, etc.). Opaque to DB; validated by K8s. */ + spec?: Record | null; + /** Resource lifecycle status: pending, provisioning, active, failed, draining, deleting */ + status?: string | null; + /** Observed state from K8s — populated by handlers after reconciliation (service_url, clone_url, replicas, etc.) */ + statusObserved?: Record | null; + /** Most recent provisioning or runtime error message */ + lastError?: string | null; + /** Cumulative error count for this resource */ + errorCount?: number | null; + /** Key/value pairs for selecting and filtering resources */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; +} /** Branch heads — mutable pointers into the commit chain */ export interface FunctionGraphRef { /** Unique ref identifier */ @@ -371,6 +403,25 @@ export interface OrgFunctionExecutionLog { /** User who triggered the execution (NULL for system/cron) */ actorId?: string | null; } +/** Resource lifecycle events — audit log of provisioning, updates, and failure events */ +export interface ResourceEvent { + /** Event timestamp (partition key) */ + createdAt?: string | null; + /** Unique event identifier */ + id: string; + /** Resource this event belongs to */ + resourceId?: string | null; + /** Event type: provisioned, provisioning, updated, failed, deprovisioned, health_check */ + eventType?: string | null; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string | null; + /** Human-readable description of the event */ + message?: string | null; + /** Structured context (old/new values, error details, etc.) */ + metadata?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; +} /** Content-addressed store for execution outputs — hash-referenced from node_outputs */ export interface FunctionGraphExecutionOutput { /** Timestamp of output creation */ @@ -444,6 +495,33 @@ export interface FunctionExecutionLog { /** Database that owns this resource (database-scoped isolation) */ databaseId?: string | null; } +/** Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store */ +export interface FunctionGraph { + /** Unique graph identifier */ + id: string; + /** Database scope for multi-tenant isolation */ + databaseId?: string | null; + /** Graph store (Merkle store) holding the graph definition */ + storeId?: string | null; + /** Evaluator/runtime context (function, js, sql, system) */ + context?: string | null; + /** Graph name (unique per database) */ + name?: string | null; + /** Human-readable description of the graph */ + description?: string | null; + /** Pinned definitions store commit for deterministic evaluation */ + definitionsCommitId?: string | null; + /** Whether graph passes structural validation */ + isValid?: boolean | null; + /** Array of validation error objects when is_valid = false */ + validationErrors?: Record | null; + /** Actor who created this graph */ + createdBy?: string | null; + /** Timestamp of graph creation */ + createdAt?: string | null; + /** Timestamp of last modification */ + updatedAt?: string | null; +} /** Per-node execution state — tracks individual node lifecycle for debugging */ export interface FunctionGraphExecutionNodeState { /** Timestamp of node state creation (partition key) */ @@ -471,34 +549,31 @@ export interface FunctionGraphExecutionNodeState { /** FK to execution_outputs — content-addressed output blob for this node */ outputId?: string | null; } -/** Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store */ -export interface FunctionGraph { - /** Unique graph identifier */ +/** Logical namespace containers for grouping secrets, config, functions, and other resources */ +export interface PlatformNamespace { id: string; - /** Database scope for multi-tenant isolation */ - databaseId?: string | null; - /** Graph store (Merkle store) holding the graph definition */ - storeId?: string | null; - /** Entity context (org/team) for scoped billing */ - entityId?: string | null; - /** Evaluator/runtime context (function, js, sql, system) */ - context?: string | null; - /** Graph name (unique per database) */ - name?: string | null; - /** Human-readable description of the graph */ - description?: string | null; - /** Pinned definitions store commit for deterministic evaluation */ - definitionsCommitId?: string | null; - /** Whether graph passes structural validation */ - isValid?: boolean | null; - /** Array of validation error objects when is_valid = false */ - validationErrors?: Record | null; - /** Actor who created this graph */ - createdBy?: string | null; - /** Timestamp of graph creation */ createdAt?: string | null; - /** Timestamp of last modification */ updatedAt?: string | null; + /** Human-readable namespace name (e.g. default, production, oauth) */ + name?: string | null; + /** Globally unique computed namespace identifier via inflection.underscore */ + namespaceName?: string | null; + /** Optional human-readable description of this namespace */ + description?: string | null; + /** Whether this namespace is active (soft-disable for filtering) */ + isActive?: boolean | null; + /** Key/value pairs for selecting and filtering namespaces */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Database that created this namespace (NULL for platform-native namespaces) */ + sourceDatabaseId?: string | null; + /** Origin scope: platform, org, app — indicates where this namespace was created */ + sourceScope?: string | null; + /** true = created by a child scope mirror trigger, false = platform-native */ + isManaged?: boolean | null; } /** Function invocation log — INSERT to call a function (business-layer, metered). Linked to definitions by task_identifier string. */ export interface OrgFunctionInvocation { @@ -564,6 +639,39 @@ export interface FunctionInvocation { /** Groups all node invocations from a single flow graph execution */ graphExecutionId?: string | null; } +/** Namespace lifecycle events — audit log of creation, activation, deactivation, label changes */ +export interface PlatformNamespaceEvent { + /** Event timestamp (partition key) */ + createdAt?: string | null; + /** Unique event identifier */ + id: string; + /** Namespace this event belongs to */ + namespaceId?: string | null; + /** Event type: created, activated, deactivated, labels_updated, annotations_updated, renamed */ + eventType?: string | null; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string | null; + /** Human-readable description of the event */ + message?: string | null; + /** Structured context (old/new values, labels diff, etc.) */ + metadata?: Record | null; + /** CPU usage in millicores at time of event */ + cpuMillicores?: number | null; + /** Memory usage in bytes at time of event */ + memoryBytes?: string | null; + /** Storage usage in bytes at time of event */ + storageBytes?: string | null; + /** Network ingress in bytes during event window */ + networkIngressBytes?: string | null; + /** Network egress in bytes during event window */ + networkEgressBytes?: string | null; + /** Number of active pods in the namespace at time of event */ + podCount?: number | null; + /** Additional resource metrics (gpu, replicas, quotas, etc.) */ + metrics?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; +} /** Ephemeral execution state for flow graph evaluation */ export interface FunctionGraphExecution { /** Execution start timestamp */ @@ -576,8 +684,6 @@ export interface FunctionGraphExecution { invocationId?: string | null; /** Scope for multi-tenant isolation */ databaseId?: string | null; - /** Entity context (org/team) for scoped billing */ - entityId?: string | null; /** Target output boundary node name to resolve */ outputNode?: string | null; /** Target output port name (default: value) */ @@ -692,20 +798,30 @@ export interface FunctionApiBindingRelations { } export interface FunctionDeploymentRelations { functionDefinition?: FunctionDefinition | null; + namespace?: PlatformNamespace | null; +} +export interface ResourceRelations { + namespace?: PlatformNamespace | null; } export interface FunctionGraphRefRelations {} export interface FunctionGraphStoreRelations {} export interface FunctionGraphObjectRelations {} export interface FunctionDeploymentEventRelations {} export interface OrgFunctionExecutionLogRelations {} +export interface ResourceEventRelations {} export interface FunctionGraphExecutionOutputRelations {} export interface FunctionGraphCommitRelations {} export interface SecretDefinitionRelations {} export interface FunctionExecutionLogRelations {} -export interface FunctionGraphExecutionNodeStateRelations {} export interface FunctionGraphRelations {} +export interface FunctionGraphExecutionNodeStateRelations {} +export interface PlatformNamespaceRelations { + functionDeploymentsByNamespaceId?: ConnectionResult; + resourcesByNamespaceId?: ConnectionResult; +} export interface OrgFunctionInvocationRelations {} export interface FunctionInvocationRelations {} +export interface PlatformNamespaceEventRelations {} export interface FunctionGraphExecutionRelations { graph?: FunctionGraph | null; } @@ -717,6 +833,7 @@ export interface FunctionDefinitionRelations { export type GetAllRecordWithRelations = GetAllRecord & GetAllRecordRelations; export type FunctionApiBindingWithRelations = FunctionApiBinding & FunctionApiBindingRelations; export type FunctionDeploymentWithRelations = FunctionDeployment & FunctionDeploymentRelations; +export type ResourceWithRelations = Resource & ResourceRelations; export type FunctionGraphRefWithRelations = FunctionGraphRef & FunctionGraphRefRelations; export type FunctionGraphStoreWithRelations = FunctionGraphStore & FunctionGraphStoreRelations; export type FunctionGraphObjectWithRelations = FunctionGraphObject & FunctionGraphObjectRelations; @@ -724,18 +841,22 @@ export type FunctionDeploymentEventWithRelations = FunctionDeploymentEvent & FunctionDeploymentEventRelations; export type OrgFunctionExecutionLogWithRelations = OrgFunctionExecutionLog & OrgFunctionExecutionLogRelations; +export type ResourceEventWithRelations = ResourceEvent & ResourceEventRelations; export type FunctionGraphExecutionOutputWithRelations = FunctionGraphExecutionOutput & FunctionGraphExecutionOutputRelations; export type FunctionGraphCommitWithRelations = FunctionGraphCommit & FunctionGraphCommitRelations; export type SecretDefinitionWithRelations = SecretDefinition & SecretDefinitionRelations; export type FunctionExecutionLogWithRelations = FunctionExecutionLog & FunctionExecutionLogRelations; +export type FunctionGraphWithRelations = FunctionGraph & FunctionGraphRelations; export type FunctionGraphExecutionNodeStateWithRelations = FunctionGraphExecutionNodeState & FunctionGraphExecutionNodeStateRelations; -export type FunctionGraphWithRelations = FunctionGraph & FunctionGraphRelations; +export type PlatformNamespaceWithRelations = PlatformNamespace & PlatformNamespaceRelations; export type OrgFunctionInvocationWithRelations = OrgFunctionInvocation & OrgFunctionInvocationRelations; export type FunctionInvocationWithRelations = FunctionInvocation & FunctionInvocationRelations; +export type PlatformNamespaceEventWithRelations = PlatformNamespaceEvent & + PlatformNamespaceEventRelations; export type FunctionGraphExecutionWithRelations = FunctionGraphExecution & FunctionGraphExecutionRelations; export type FunctionDefinitionWithRelations = FunctionDefinition & FunctionDefinitionRelations; @@ -779,6 +900,31 @@ export type FunctionDeploymentSelect = { functionDefinition?: { select: FunctionDefinitionSelect; }; + namespace?: { + select: PlatformNamespaceSelect; + }; +}; +export type ResourceSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + createdBy?: boolean; + updatedBy?: boolean; + namespaceId?: boolean; + kind?: boolean; + name?: boolean; + slug?: boolean; + spec?: boolean; + status?: boolean; + statusObserved?: boolean; + lastError?: boolean; + errorCount?: boolean; + labels?: boolean; + annotations?: boolean; + databaseId?: boolean; + namespace?: { + select: PlatformNamespaceSelect; + }; }; export type FunctionGraphRefSelect = { id?: boolean; @@ -822,6 +968,16 @@ export type OrgFunctionExecutionLogSelect = { metadata?: boolean; actorId?: boolean; }; +export type ResourceEventSelect = { + createdAt?: boolean; + id?: boolean; + resourceId?: boolean; + eventType?: boolean; + actorId?: boolean; + message?: boolean; + metadata?: boolean; + databaseId?: boolean; +}; export type FunctionGraphExecutionOutputSelect = { createdAt?: boolean; id?: boolean; @@ -862,6 +1018,20 @@ export type FunctionExecutionLogSelect = { actorId?: boolean; databaseId?: boolean; }; +export type FunctionGraphSelect = { + id?: boolean; + databaseId?: boolean; + storeId?: boolean; + context?: boolean; + name?: boolean; + description?: boolean; + definitionsCommitId?: boolean; + isValid?: boolean; + validationErrors?: boolean; + createdBy?: boolean; + createdAt?: boolean; + updatedAt?: boolean; +}; export type FunctionGraphExecutionNodeStateSelect = { createdAt?: boolean; id?: boolean; @@ -876,20 +1046,32 @@ export type FunctionGraphExecutionNodeStateSelect = { errorMessage?: boolean; outputId?: boolean; }; -export type FunctionGraphSelect = { +export type PlatformNamespaceSelect = { id?: boolean; - databaseId?: boolean; - storeId?: boolean; - entityId?: boolean; - context?: boolean; - name?: boolean; - description?: boolean; - definitionsCommitId?: boolean; - isValid?: boolean; - validationErrors?: boolean; - createdBy?: boolean; createdAt?: boolean; updatedAt?: boolean; + name?: boolean; + namespaceName?: boolean; + description?: boolean; + isActive?: boolean; + labels?: boolean; + annotations?: boolean; + databaseId?: boolean; + sourceDatabaseId?: boolean; + sourceScope?: boolean; + isManaged?: boolean; + functionDeploymentsByNamespaceId?: { + select: FunctionDeploymentSelect; + first?: number; + filter?: FunctionDeploymentFilter; + orderBy?: FunctionDeploymentOrderBy[]; + }; + resourcesByNamespaceId?: { + select: ResourceSelect; + first?: number; + filter?: ResourceFilter; + orderBy?: ResourceOrderBy[]; + }; }; export type OrgFunctionInvocationSelect = { createdAt?: boolean; @@ -924,13 +1106,29 @@ export type FunctionInvocationSelect = { parentInvocationId?: boolean; graphExecutionId?: boolean; }; +export type PlatformNamespaceEventSelect = { + createdAt?: boolean; + id?: boolean; + namespaceId?: boolean; + eventType?: boolean; + actorId?: boolean; + message?: boolean; + metadata?: boolean; + cpuMillicores?: boolean; + memoryBytes?: boolean; + storageBytes?: boolean; + networkIngressBytes?: boolean; + networkEgressBytes?: boolean; + podCount?: boolean; + metrics?: boolean; + databaseId?: boolean; +}; export type FunctionGraphExecutionSelect = { startedAt?: boolean; id?: boolean; graphId?: boolean; invocationId?: boolean; databaseId?: boolean; - entityId?: boolean; outputNode?: boolean; outputPort?: boolean; status?: boolean; @@ -1075,6 +1273,52 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Filter by the object’s `functionDefinition` relation. */ functionDefinition?: FunctionDefinitionFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; +} +export interface ResourceFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `spec` field. */ + spec?: JSONFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `statusObserved` field. */ + statusObserved?: JSONFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `errorCount` field. */ + errorCount?: IntFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: ResourceFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceFilter[]; + /** Negates the expression. */ + not?: ResourceFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; } export interface FunctionGraphRefFilter { /** Filter by the object’s `id` field. */ @@ -1180,6 +1424,30 @@ export interface OrgFunctionExecutionLogFilter { /** Negates the expression. */ not?: OrgFunctionExecutionLogFilter; } +export interface ResourceEventFilter { + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `resourceId` field. */ + resourceId?: UUIDFilter; + /** Filter by the object’s `eventType` field. */ + eventType?: StringFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `message` field. */ + message?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: ResourceEventFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceEventFilter[]; + /** Negates the expression. */ + not?: ResourceEventFilter; +} export interface FunctionGraphExecutionOutputFilter { /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; @@ -1276,6 +1544,38 @@ export interface FunctionExecutionLogFilter { /** Negates the expression. */ not?: FunctionExecutionLogFilter; } +export interface FunctionGraphFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `storeId` field. */ + storeId?: UUIDFilter; + /** Filter by the object’s `context` field. */ + context?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `definitionsCommitId` field. */ + definitionsCommitId?: UUIDFilter; + /** Filter by the object’s `isValid` field. */ + isValid?: BooleanFilter; + /** Filter by the object’s `validationErrors` field. */ + validationErrors?: JSONFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: FunctionGraphFilter[]; + /** Checks for any expressions in this list. */ + or?: FunctionGraphFilter[]; + /** Negates the expression. */ + not?: FunctionGraphFilter; +} export interface FunctionGraphExecutionNodeStateFilter { /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; @@ -1308,39 +1608,47 @@ export interface FunctionGraphExecutionNodeStateFilter { /** Negates the expression. */ not?: FunctionGraphExecutionNodeStateFilter; } -export interface FunctionGraphFilter { +export interface PlatformNamespaceFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `storeId` field. */ - storeId?: UUIDFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; - /** Filter by the object’s `context` field. */ - context?: StringFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `definitionsCommitId` field. */ - definitionsCommitId?: UUIDFilter; - /** Filter by the object’s `isValid` field. */ - isValid?: BooleanFilter; - /** Filter by the object’s `validationErrors` field. */ - validationErrors?: JSONFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `namespaceName` field. */ + namespaceName?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `sourceDatabaseId` field. */ + sourceDatabaseId?: UUIDFilter; + /** Filter by the object’s `sourceScope` field. */ + sourceScope?: StringFilter; + /** Filter by the object’s `isManaged` field. */ + isManaged?: BooleanFilter; /** Checks for all expressions in this list. */ - and?: FunctionGraphFilter[]; + and?: PlatformNamespaceFilter[]; /** Checks for any expressions in this list. */ - or?: FunctionGraphFilter[]; + or?: PlatformNamespaceFilter[]; /** Negates the expression. */ - not?: FunctionGraphFilter; + not?: PlatformNamespaceFilter; + /** Filter by the object’s `functionDeploymentsByNamespaceId` relation. */ + functionDeploymentsByNamespaceId?: PlatformNamespaceToManyFunctionDeploymentFilter; + /** `functionDeploymentsByNamespaceId` exist. */ + functionDeploymentsByNamespaceIdExist?: boolean; + /** Filter by the object’s `resourcesByNamespaceId` relation. */ + resourcesByNamespaceId?: PlatformNamespaceToManyResourceFilter; + /** `resourcesByNamespaceId` exist. */ + resourcesByNamespaceIdExist?: boolean; } export interface OrgFunctionInvocationFilter { /** Filter by the object’s `createdAt` field. */ @@ -1416,6 +1724,44 @@ export interface FunctionInvocationFilter { /** Negates the expression. */ not?: FunctionInvocationFilter; } +export interface PlatformNamespaceEventFilter { + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Filter by the object’s `eventType` field. */ + eventType?: StringFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `message` field. */ + message?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `cpuMillicores` field. */ + cpuMillicores?: IntFilter; + /** Filter by the object’s `memoryBytes` field. */ + memoryBytes?: BigIntFilter; + /** Filter by the object’s `storageBytes` field. */ + storageBytes?: BigIntFilter; + /** Filter by the object’s `networkIngressBytes` field. */ + networkIngressBytes?: BigIntFilter; + /** Filter by the object’s `networkEgressBytes` field. */ + networkEgressBytes?: BigIntFilter; + /** Filter by the object’s `podCount` field. */ + podCount?: IntFilter; + /** Filter by the object’s `metrics` field. */ + metrics?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: PlatformNamespaceEventFilter[]; + /** Checks for any expressions in this list. */ + or?: PlatformNamespaceEventFilter[]; + /** Negates the expression. */ + not?: PlatformNamespaceEventFilter; +} export interface FunctionGraphExecutionFilter { /** Filter by the object’s `startedAt` field. */ startedAt?: DatetimeFilter; @@ -1427,8 +1773,6 @@ export interface FunctionGraphExecutionFilter { invocationId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; /** Filter by the object’s `outputNode` field. */ outputNode?: StringFilter; /** Filter by the object’s `outputPort` field. */ @@ -1613,6 +1957,44 @@ export type FunctionDeploymentOrderBy = | 'ANNOTATIONS_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC'; +export type ResourceOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'SPEC_ASC' + | 'SPEC_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'STATUS_OBSERVED_ASC' + | 'STATUS_OBSERVED_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'ERROR_COUNT_ASC' + | 'ERROR_COUNT_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; export type FunctionGraphRefOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1697,6 +2079,26 @@ export type OrgFunctionExecutionLogOrderBy = | 'METADATA_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC'; +export type ResourceEventOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'RESOURCE_ID_ASC' + | 'RESOURCE_ID_DESC' + | 'EVENT_TYPE_ASC' + | 'EVENT_TYPE_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'MESSAGE_ASC' + | 'MESSAGE_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; export type FunctionGraphExecutionOutputOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1777,6 +2179,34 @@ export type FunctionExecutionLogOrderBy = | 'ACTOR_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC'; +export type FunctionGraphOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'STORE_ID_ASC' + | 'STORE_ID_DESC' + | 'CONTEXT_ASC' + | 'CONTEXT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'DEFINITIONS_COMMIT_ID_ASC' + | 'DEFINITIONS_COMMIT_ID_DESC' + | 'IS_VALID_ASC' + | 'IS_VALID_DESC' + | 'VALIDATION_ERRORS_ASC' + | 'VALIDATION_ERRORS_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type FunctionGraphExecutionNodeStateOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1805,36 +2235,36 @@ export type FunctionGraphExecutionNodeStateOrderBy = | 'ERROR_MESSAGE_DESC' | 'OUTPUT_ID_ASC' | 'OUTPUT_ID_DESC'; -export type FunctionGraphOrderBy = +export type PlatformNamespaceOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'STORE_ID_ASC' - | 'STORE_ID_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' - | 'CONTEXT_ASC' - | 'CONTEXT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' | 'NAME_ASC' | 'NAME_DESC' + | 'NAMESPACE_NAME_ASC' + | 'NAMESPACE_NAME_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' - | 'DEFINITIONS_COMMIT_ID_ASC' - | 'DEFINITIONS_COMMIT_ID_DESC' - | 'IS_VALID_ASC' - | 'IS_VALID_DESC' - | 'VALIDATION_ERRORS_ASC' - | 'VALIDATION_ERRORS_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SOURCE_DATABASE_ID_ASC' + | 'SOURCE_DATABASE_ID_DESC' + | 'SOURCE_SCOPE_ASC' + | 'SOURCE_SCOPE_DESC' + | 'IS_MANAGED_ASC' + | 'IS_MANAGED_DESC'; export type OrgFunctionInvocationOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1901,6 +2331,40 @@ export type FunctionInvocationOrderBy = | 'PARENT_INVOCATION_ID_DESC' | 'GRAPH_EXECUTION_ID_ASC' | 'GRAPH_EXECUTION_ID_DESC'; +export type PlatformNamespaceEventOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'EVENT_TYPE_ASC' + | 'EVENT_TYPE_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'MESSAGE_ASC' + | 'MESSAGE_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'CPU_MILLICORES_ASC' + | 'CPU_MILLICORES_DESC' + | 'MEMORY_BYTES_ASC' + | 'MEMORY_BYTES_DESC' + | 'STORAGE_BYTES_ASC' + | 'STORAGE_BYTES_DESC' + | 'NETWORK_INGRESS_BYTES_ASC' + | 'NETWORK_INGRESS_BYTES_DESC' + | 'NETWORK_EGRESS_BYTES_ASC' + | 'NETWORK_EGRESS_BYTES_DESC' + | 'POD_COUNT_ASC' + | 'POD_COUNT_DESC' + | 'METRICS_ASC' + | 'METRICS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; export type FunctionGraphExecutionOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1915,8 +2379,6 @@ export type FunctionGraphExecutionOrderBy = | 'INVOCATION_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' | 'OUTPUT_NODE_ASC' | 'OUTPUT_NODE_DESC' | 'OUTPUT_PORT_ASC' @@ -2112,6 +2574,50 @@ export interface DeleteFunctionDeploymentInput { clientMutationId?: string; id: string; } +export interface CreateResourceInput { + clientMutationId?: string; + resource: { + createdBy?: string; + updatedBy?: string; + namespaceId: string; + kind: string; + name: string; + slug: string; + spec?: Record; + status?: string; + statusObserved?: Record; + lastError?: string; + errorCount?: number; + labels?: Record; + annotations?: Record; + databaseId: string; + }; +} +export interface ResourcePatch { + createdBy?: string | null; + updatedBy?: string | null; + namespaceId?: string | null; + kind?: string | null; + name?: string | null; + slug?: string | null; + spec?: Record | null; + status?: string | null; + statusObserved?: Record | null; + lastError?: string | null; + errorCount?: number | null; + labels?: Record | null; + annotations?: Record | null; + databaseId?: string | null; +} +export interface UpdateResourceInput { + clientMutationId?: string; + id: string; + resourcePatch: ResourcePatch; +} +export interface DeleteResourceInput { + clientMutationId?: string; + id: string; +} export interface CreateFunctionGraphRefInput { clientMutationId?: string; functionGraphRef: { @@ -2238,6 +2744,34 @@ export interface DeleteOrgFunctionExecutionLogInput { clientMutationId?: string; id: string; } +export interface CreateResourceEventInput { + clientMutationId?: string; + resourceEvent: { + resourceId: string; + eventType: string; + actorId?: string; + message?: string; + metadata?: Record; + databaseId: string; + }; +} +export interface ResourceEventPatch { + resourceId?: string | null; + eventType?: string | null; + actorId?: string | null; + message?: string | null; + metadata?: Record | null; + databaseId?: string | null; +} +export interface UpdateResourceEventInput { + clientMutationId?: string; + id: string; + resourceEventPatch: ResourceEventPatch; +} +export interface DeleteResourceEventInput { + clientMutationId?: string; + id: string; +} export interface CreateFunctionGraphExecutionOutputInput { clientMutationId?: string; functionGraphExecutionOutput: { @@ -2332,21 +2866,55 @@ export interface CreateFunctionExecutionLogInput { databaseId: string; }; } -export interface FunctionExecutionLogPatch { - invocationId?: string | null; - taskIdentifier?: string | null; - logLevel?: string | null; - message?: string | null; - metadata?: Record | null; - actorId?: string | null; +export interface FunctionExecutionLogPatch { + invocationId?: string | null; + taskIdentifier?: string | null; + logLevel?: string | null; + message?: string | null; + metadata?: Record | null; + actorId?: string | null; + databaseId?: string | null; +} +export interface UpdateFunctionExecutionLogInput { + clientMutationId?: string; + id: string; + functionExecutionLogPatch: FunctionExecutionLogPatch; +} +export interface DeleteFunctionExecutionLogInput { + clientMutationId?: string; + id: string; +} +export interface CreateFunctionGraphInput { + clientMutationId?: string; + functionGraph: { + databaseId: string; + storeId: string; + context?: string; + name?: string; + description?: string; + definitionsCommitId: string; + isValid?: boolean; + validationErrors?: Record; + createdBy?: string; + }; +} +export interface FunctionGraphPatch { databaseId?: string | null; + storeId?: string | null; + context?: string | null; + name?: string | null; + description?: string | null; + definitionsCommitId?: string | null; + isValid?: boolean | null; + validationErrors?: Record | null; + createdBy?: string | null; } -export interface UpdateFunctionExecutionLogInput { +export interface UpdateFunctionGraphInput { clientMutationId?: string; id: string; - functionExecutionLogPatch: FunctionExecutionLogPatch; + functionGraphPatch: FunctionGraphPatch; } -export interface DeleteFunctionExecutionLogInput { +export interface DeleteFunctionGraphInput { clientMutationId?: string; id: string; } @@ -2386,39 +2954,39 @@ export interface DeleteFunctionGraphExecutionNodeStateInput { clientMutationId?: string; id: string; } -export interface CreateFunctionGraphInput { +export interface CreatePlatformNamespaceInput { clientMutationId?: string; - functionGraph: { - databaseId: string; - storeId: string; - entityId: string; - context?: string; - name?: string; + platformNamespace: { + name: string; + namespaceName: string; description?: string; - definitionsCommitId: string; - isValid?: boolean; - validationErrors?: Record; - createdBy?: string; + isActive?: boolean; + labels?: Record; + annotations?: Record; + databaseId: string; + sourceDatabaseId?: string; + sourceScope?: string; + isManaged?: boolean; }; } -export interface FunctionGraphPatch { - databaseId?: string | null; - storeId?: string | null; - entityId?: string | null; - context?: string | null; +export interface PlatformNamespacePatch { name?: string | null; + namespaceName?: string | null; description?: string | null; - definitionsCommitId?: string | null; - isValid?: boolean | null; - validationErrors?: Record | null; - createdBy?: string | null; + isActive?: boolean | null; + labels?: Record | null; + annotations?: Record | null; + databaseId?: string | null; + sourceDatabaseId?: string | null; + sourceScope?: string | null; + isManaged?: boolean | null; } -export interface UpdateFunctionGraphInput { +export interface UpdatePlatformNamespaceInput { clientMutationId?: string; id: string; - functionGraphPatch: FunctionGraphPatch; + platformNamespacePatch: PlatformNamespacePatch; } -export interface DeleteFunctionGraphInput { +export interface DeletePlatformNamespaceInput { clientMutationId?: string; id: string; } @@ -2504,6 +3072,48 @@ export interface DeleteFunctionInvocationInput { clientMutationId?: string; id: string; } +export interface CreatePlatformNamespaceEventInput { + clientMutationId?: string; + platformNamespaceEvent: { + namespaceId: string; + eventType: string; + actorId?: string; + message?: string; + metadata?: Record; + cpuMillicores?: number; + memoryBytes?: string; + storageBytes?: string; + networkIngressBytes?: string; + networkEgressBytes?: string; + podCount?: number; + metrics?: Record; + databaseId: string; + }; +} +export interface PlatformNamespaceEventPatch { + namespaceId?: string | null; + eventType?: string | null; + actorId?: string | null; + message?: string | null; + metadata?: Record | null; + cpuMillicores?: number | null; + memoryBytes?: string | null; + storageBytes?: string | null; + networkIngressBytes?: string | null; + networkEgressBytes?: string | null; + podCount?: number | null; + metrics?: Record | null; + databaseId?: string | null; +} +export interface UpdatePlatformNamespaceEventInput { + clientMutationId?: string; + id: string; + platformNamespaceEventPatch: PlatformNamespaceEventPatch; +} +export interface DeletePlatformNamespaceEventInput { + clientMutationId?: string; + id: string; +} export interface CreateFunctionGraphExecutionInput { clientMutationId?: string; functionGraphExecution: { @@ -2511,7 +3121,6 @@ export interface CreateFunctionGraphExecutionInput { graphId: string; invocationId?: string; databaseId: string; - entityId?: string; outputNode: string; outputPort?: string; status?: string; @@ -2537,7 +3146,6 @@ export interface FunctionGraphExecutionPatch { graphId?: string | null; invocationId?: string | null; databaseId?: string | null; - entityId?: string | null; outputNode?: string | null; outputPort?: string | null; status?: string | null; @@ -2636,6 +3244,10 @@ export interface DeleteFunctionDefinitionInput { } // ============ Connection Fields Map ============ export const connectionFieldsMap = { + PlatformNamespace: { + functionDeploymentsByNamespaceId: 'FunctionDeployment', + resourcesByNamespaceId: 'Resource', + }, FunctionDefinition: { functionApiBindings: 'FunctionApiBinding', functionDeployments: 'FunctionDeployment', @@ -2695,6 +3307,16 @@ export interface AddNodeAndSaveInput { meta?: Record; message?: string; } +export interface ImportGraphJsonInput { + clientMutationId?: string; + databaseId?: string; + name?: string; + graphJson?: Record; + context?: string; + description?: string; + createdBy?: string; + definitionsCommitId?: string; +} export interface AddEdgeInput { clientMutationId?: string; databaseId?: string; @@ -2717,17 +3339,6 @@ export interface AddNodeInput { props?: Record; meta?: Record; } -export interface ImportGraphJsonInput { - clientMutationId?: string; - databaseId?: string; - name?: string; - graphJson?: Record; - context?: string; - description?: string; - entityId?: string; - createdBy?: string; - definitionsCommitId?: string; -} export interface InsertNodeAtPathInput { clientMutationId?: string; sId?: string; @@ -2775,6 +3386,24 @@ export interface Base64EncodedBinaryFilter { /** Not included in the specified list. */ notIn?: Base64EncodedBinary[]; } +/** A filter to be used against many `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyFunctionDeploymentFilter { + /** Filters to entities where at least one related entity matches. */ + some?: FunctionDeploymentFilter; + /** Filters to entities where every related entity matches. */ + every?: FunctionDeploymentFilter; + /** Filters to entities where no related entity matches. */ + none?: FunctionDeploymentFilter; +} +/** A filter to be used against many `Resource` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyResourceFilter { + /** Filters to entities where at least one related entity matches. */ + some?: ResourceFilter; + /** Filters to entities where every related entity matches. */ + every?: ResourceFilter; + /** Filters to entities where no related entity matches. */ + none?: ResourceFilter; +} /** A filter to be used against many `FunctionApiBinding` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionDefinitionToManyFunctionApiBindingFilter { /** Filters to entities where at least one related entity matches. */ @@ -2847,6 +3476,38 @@ export interface FunctionDeploymentInput { /** Database that owns this resource (database-scoped isolation) */ databaseId: string; } +/** An input for mutations affecting `Resource` */ +export interface ResourceInput { + id?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: string; + updatedBy?: string; + /** Namespace this resource belongs to (security boundary, maps to K8s namespace) */ + namespaceId: string; + /** Resource kind: Deployment, StatefulSet, Service, Ingress, Certificate */ + kind: string; + /** Human-readable resource name */ + name: string; + /** URL-safe identifier, unique within (namespace_id, kind) */ + slug: string; + /** Desired state — kind-specific configuration (image, ports, resources, etc.). Opaque to DB; validated by K8s. */ + spec?: Record; + /** Resource lifecycle status: pending, provisioning, active, failed, draining, deleting */ + status?: string; + /** Observed state from K8s — populated by handlers after reconciliation (service_url, clone_url, replicas, etc.) */ + statusObserved?: Record; + /** Most recent provisioning or runtime error message */ + lastError?: string; + /** Cumulative error count for this resource */ + errorCount?: number; + /** Key/value pairs for selecting and filtering resources */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; +} /** An input for mutations affecting `FunctionGraphRef` */ export interface FunctionGraphRefInput { /** Unique ref identifier */ @@ -2926,6 +3587,25 @@ export interface OrgFunctionExecutionLogInput { /** User who triggered the execution (NULL for system/cron) */ actorId?: string; } +/** An input for mutations affecting `ResourceEvent` */ +export interface ResourceEventInput { + /** Event timestamp (partition key) */ + createdAt?: string; + /** Unique event identifier */ + id?: string; + /** Resource this event belongs to */ + resourceId: string; + /** Event type: provisioned, provisioning, updated, failed, deprovisioned, health_check */ + eventType: string; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string; + /** Human-readable description of the event */ + message?: string; + /** Structured context (old/new values, error details, etc.) */ + metadata?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; +} /** An input for mutations affecting `FunctionGraphExecutionOutput` */ export interface FunctionGraphExecutionOutputInput { /** Timestamp of output creation */ @@ -3026,6 +3706,32 @@ export interface FunctionGraphExecutionNodeStateInput { /** FK to execution_outputs — content-addressed output blob for this node */ outputId?: string; } +/** An input for mutations affecting `PlatformNamespace` */ +export interface PlatformNamespaceInput { + id?: string; + createdAt?: string; + updatedAt?: string; + /** Human-readable namespace name (e.g. default, production, oauth) */ + name: string; + /** Globally unique computed namespace identifier via inflection.underscore */ + namespaceName: string; + /** Optional human-readable description of this namespace */ + description?: string; + /** Whether this namespace is active (soft-disable for filtering) */ + isActive?: boolean; + /** Key/value pairs for selecting and filtering namespaces */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Database that created this namespace (NULL for platform-native namespaces) */ + sourceDatabaseId?: string; + /** Origin scope: platform, org, app — indicates where this namespace was created */ + sourceScope?: string; + /** true = created by a child scope mirror trigger, false = platform-native */ + isManaged?: boolean; +} /** An input for mutations affecting `OrgFunctionInvocation` */ export interface OrgFunctionInvocationInput { /** Invocation creation timestamp (partition key) */ @@ -3090,6 +3796,39 @@ export interface FunctionInvocationInput { /** Groups all node invocations from a single flow graph execution */ graphExecutionId?: string; } +/** An input for mutations affecting `PlatformNamespaceEvent` */ +export interface PlatformNamespaceEventInput { + /** Event timestamp (partition key) */ + createdAt?: string; + /** Unique event identifier */ + id?: string; + /** Namespace this event belongs to */ + namespaceId: string; + /** Event type: created, activated, deactivated, labels_updated, annotations_updated, renamed */ + eventType: string; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string; + /** Human-readable description of the event */ + message?: string; + /** Structured context (old/new values, labels diff, etc.) */ + metadata?: Record; + /** CPU usage in millicores at time of event */ + cpuMillicores?: number; + /** Memory usage in bytes at time of event */ + memoryBytes?: string; + /** Storage usage in bytes at time of event */ + storageBytes?: string; + /** Network ingress in bytes during event window */ + networkIngressBytes?: string; + /** Network egress in bytes during event window */ + networkEgressBytes?: string; + /** Number of active pods in the namespace at time of event */ + podCount?: number; + /** Additional resource metrics (gpu, replicas, quotas, etc.) */ + metrics?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; +} /** An input for mutations affecting `FunctionGraphExecution` */ export interface FunctionGraphExecutionInput { /** Execution start timestamp */ @@ -3102,8 +3841,6 @@ export interface FunctionGraphExecutionInput { invocationId?: string; /** Scope for multi-tenant isolation */ databaseId: string; - /** Entity context (org/team) for scoped billing */ - entityId?: string; /** Target output boundary node name to resolve */ outputNode: string; /** Target output port name (default: value) */ @@ -3223,27 +3960,6 @@ export interface IntervalInput { /** A quantity of years. */ years?: number; } -/** A filter to be used against `FunctionApiBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface FunctionApiBindingFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `functionDefinitionId` field. */ - functionDefinitionId?: UUIDFilter; - /** Filter by the object’s `apiId` field. */ - apiId?: UUIDFilter; - /** Filter by the object’s `alias` field. */ - alias?: StringFilter; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Checks for all expressions in this list. */ - and?: FunctionApiBindingFilter[]; - /** Checks for any expressions in this list. */ - or?: FunctionApiBindingFilter[]; - /** Negates the expression. */ - not?: FunctionApiBindingFilter; - /** Filter by the object’s `functionDefinition` relation. */ - functionDefinition?: FunctionDefinitionFilter; -} /** A filter to be used against `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionDeploymentFilter { /** Filter by the object’s `id` field. */ @@ -3296,6 +4012,74 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Filter by the object’s `functionDefinition` relation. */ functionDefinition?: FunctionDefinitionFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; +} +/** A filter to be used against `Resource` object types. All fields are combined with a logical ‘and.’ */ +export interface ResourceFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `spec` field. */ + spec?: JSONFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `statusObserved` field. */ + statusObserved?: JSONFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `errorCount` field. */ + errorCount?: IntFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: ResourceFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceFilter[]; + /** Negates the expression. */ + not?: ResourceFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; +} +/** A filter to be used against `FunctionApiBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface FunctionApiBindingFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `functionDefinitionId` field. */ + functionDefinitionId?: UUIDFilter; + /** Filter by the object’s `apiId` field. */ + apiId?: UUIDFilter; + /** Filter by the object’s `alias` field. */ + alias?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Checks for all expressions in this list. */ + and?: FunctionApiBindingFilter[]; + /** Checks for any expressions in this list. */ + or?: FunctionApiBindingFilter[]; + /** Negates the expression. */ + not?: FunctionApiBindingFilter; + /** Filter by the object’s `functionDefinition` relation. */ + functionDefinition?: FunctionDefinitionFilter; } /** A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ */ export interface UUIDFilter { @@ -3322,6 +4106,31 @@ export interface UUIDFilter { /** Greater than or equal to the specified value. */ greaterThanOrEqualTo?: string; } +/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ +export interface DatetimeFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Included in the specified list. */ + in?: string[]; + /** Not included in the specified list. */ + notIn?: string[]; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; +} /** A filter to be used against String fields. All fields are combined with a logical ‘and.’ */ export interface StringFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -3399,6 +4208,31 @@ export interface StringFilter { /** Greater than or equal to the specified value (case-insensitive). */ greaterThanOrEqualToInsensitive?: string; } +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Included in the specified list. */ + in?: number[]; + /** Not included in the specified list. */ + notIn?: number[]; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; +} /** A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ */ export interface JSONFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -3505,55 +4339,48 @@ export interface FunctionDefinitionFilter { /** `functionDeployments` exist. */ functionDeploymentsExist?: boolean; } -/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ -export interface DatetimeFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Included in the specified list. */ - in?: string[]; - /** Not included in the specified list. */ - notIn?: string[]; - /** Less than the specified value. */ - lessThan?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; -} -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: number; - /** Not equal to the specified value. */ - notEqualTo?: number; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; - /** Included in the specified list. */ - in?: number[]; - /** Not included in the specified list. */ - notIn?: number[]; - /** Less than the specified value. */ - lessThan?: number; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; - /** Greater than the specified value. */ - greaterThan?: number; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; +/** A filter to be used against `PlatformNamespace` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `namespaceName` field. */ + namespaceName?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `sourceDatabaseId` field. */ + sourceDatabaseId?: UUIDFilter; + /** Filter by the object’s `sourceScope` field. */ + sourceScope?: StringFilter; + /** Filter by the object’s `isManaged` field. */ + isManaged?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PlatformNamespaceFilter[]; + /** Checks for any expressions in this list. */ + or?: PlatformNamespaceFilter[]; + /** Negates the expression. */ + not?: PlatformNamespaceFilter; + /** Filter by the object’s `functionDeploymentsByNamespaceId` relation. */ + functionDeploymentsByNamespaceId?: PlatformNamespaceToManyFunctionDeploymentFilter; + /** `functionDeploymentsByNamespaceId` exist. */ + functionDeploymentsByNamespaceIdExist?: boolean; + /** Filter by the object’s `resourcesByNamespaceId` relation. */ + resourcesByNamespaceId?: PlatformNamespaceToManyResourceFilter; + /** `resourcesByNamespaceId` exist. */ + resourcesByNamespaceIdExist?: boolean; } /** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ export interface BooleanFilter { @@ -3680,27 +4507,27 @@ export type AddNodeAndSavePayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface AddEdgePayload { +export interface ImportGraphJsonPayload { clientMutationId?: string | null; result?: string | null; } -export type AddEdgePayloadSelect = { +export type ImportGraphJsonPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface AddNodePayload { +export interface AddEdgePayload { clientMutationId?: string | null; result?: string | null; } -export type AddNodePayloadSelect = { +export type AddEdgePayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface ImportGraphJsonPayload { +export interface AddNodePayload { clientMutationId?: string | null; result?: string | null; } -export type ImportGraphJsonPayloadSelect = { +export type AddNodePayloadSelect = { clientMutationId?: boolean; result?: boolean; }; @@ -3832,6 +4659,51 @@ export type DeleteFunctionDeploymentPayloadSelect = { select: FunctionDeploymentEdgeSelect; }; }; +export interface CreateResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was created by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export type CreateResourcePayloadSelect = { + clientMutationId?: boolean; + resource?: { + select: ResourceSelect; + }; + resourceEdge?: { + select: ResourceEdgeSelect; + }; +}; +export interface UpdateResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was updated by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export type UpdateResourcePayloadSelect = { + clientMutationId?: boolean; + resource?: { + select: ResourceSelect; + }; + resourceEdge?: { + select: ResourceEdgeSelect; + }; +}; +export interface DeleteResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was deleted by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export type DeleteResourcePayloadSelect = { + clientMutationId?: boolean; + resource?: { + select: ResourceSelect; + }; + resourceEdge?: { + select: ResourceEdgeSelect; + }; +}; export interface CreateFunctionGraphRefPayload { clientMutationId?: string | null; /** The `FunctionGraphRef` that was created by this mutation. */ @@ -4057,6 +4929,51 @@ export type DeleteOrgFunctionExecutionLogPayloadSelect = { select: OrgFunctionExecutionLogEdgeSelect; }; }; +export interface CreateResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was created by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} +export type CreateResourceEventPayloadSelect = { + clientMutationId?: boolean; + resourceEvent?: { + select: ResourceEventSelect; + }; + resourceEventEdge?: { + select: ResourceEventEdgeSelect; + }; +}; +export interface UpdateResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was updated by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} +export type UpdateResourceEventPayloadSelect = { + clientMutationId?: boolean; + resourceEvent?: { + select: ResourceEventSelect; + }; + resourceEventEdge?: { + select: ResourceEventEdgeSelect; + }; +}; +export interface DeleteResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was deleted by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} +export type DeleteResourceEventPayloadSelect = { + clientMutationId?: boolean; + resourceEvent?: { + select: ResourceEventSelect; + }; + resourceEventEdge?: { + select: ResourceEventEdgeSelect; + }; +}; export interface CreateFunctionGraphExecutionOutputPayload { clientMutationId?: string | null; /** The `FunctionGraphExecutionOutput` that was created by this mutation. */ @@ -4237,6 +5154,44 @@ export type DeleteFunctionExecutionLogPayloadSelect = { select: FunctionExecutionLogEdgeSelect; }; }; +export interface CreateFunctionGraphPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type CreateFunctionGraphPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface UpdateFunctionGraphPayload { + clientMutationId?: string | null; + /** The `FunctionGraph` that was updated by this mutation. */ + functionGraph?: FunctionGraph | null; + functionGraphEdge?: FunctionGraphEdge | null; +} +export type UpdateFunctionGraphPayloadSelect = { + clientMutationId?: boolean; + functionGraph?: { + select: FunctionGraphSelect; + }; + functionGraphEdge?: { + select: FunctionGraphEdgeSelect; + }; +}; +export interface DeleteFunctionGraphPayload { + clientMutationId?: string | null; + /** The `FunctionGraph` that was deleted by this mutation. */ + functionGraph?: FunctionGraph | null; + functionGraphEdge?: FunctionGraphEdge | null; +} +export type DeleteFunctionGraphPayloadSelect = { + clientMutationId?: boolean; + functionGraph?: { + select: FunctionGraphSelect; + }; + functionGraphEdge?: { + select: FunctionGraphEdgeSelect; + }; +}; export interface CreateFunctionGraphExecutionNodeStatePayload { clientMutationId?: string | null; /** The `FunctionGraphExecutionNodeState` that was created by this mutation. */ @@ -4282,42 +5237,49 @@ export type DeleteFunctionGraphExecutionNodeStatePayloadSelect = { select: FunctionGraphExecutionNodeStateEdgeSelect; }; }; -export interface CreateFunctionGraphPayload { +export interface CreatePlatformNamespacePayload { clientMutationId?: string | null; - result?: string | null; + /** The `PlatformNamespace` that was created by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; } -export type CreateFunctionGraphPayloadSelect = { +export type CreatePlatformNamespacePayloadSelect = { clientMutationId?: boolean; - result?: boolean; + platformNamespace?: { + select: PlatformNamespaceSelect; + }; + platformNamespaceEdge?: { + select: PlatformNamespaceEdgeSelect; + }; }; -export interface UpdateFunctionGraphPayload { +export interface UpdatePlatformNamespacePayload { clientMutationId?: string | null; - /** The `FunctionGraph` that was updated by this mutation. */ - functionGraph?: FunctionGraph | null; - functionGraphEdge?: FunctionGraphEdge | null; + /** The `PlatformNamespace` that was updated by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; } -export type UpdateFunctionGraphPayloadSelect = { +export type UpdatePlatformNamespacePayloadSelect = { clientMutationId?: boolean; - functionGraph?: { - select: FunctionGraphSelect; + platformNamespace?: { + select: PlatformNamespaceSelect; }; - functionGraphEdge?: { - select: FunctionGraphEdgeSelect; + platformNamespaceEdge?: { + select: PlatformNamespaceEdgeSelect; }; }; -export interface DeleteFunctionGraphPayload { +export interface DeletePlatformNamespacePayload { clientMutationId?: string | null; - /** The `FunctionGraph` that was deleted by this mutation. */ - functionGraph?: FunctionGraph | null; - functionGraphEdge?: FunctionGraphEdge | null; + /** The `PlatformNamespace` that was deleted by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; } -export type DeleteFunctionGraphPayloadSelect = { +export type DeletePlatformNamespacePayloadSelect = { clientMutationId?: boolean; - functionGraph?: { - select: FunctionGraphSelect; + platformNamespace?: { + select: PlatformNamespaceSelect; }; - functionGraphEdge?: { - select: FunctionGraphEdgeSelect; + platformNamespaceEdge?: { + select: PlatformNamespaceEdgeSelect; }; }; export interface CreateOrgFunctionInvocationPayload { @@ -4410,6 +5372,51 @@ export type DeleteFunctionInvocationPayloadSelect = { select: FunctionInvocationEdgeSelect; }; }; +export interface CreatePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was created by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} +export type CreatePlatformNamespaceEventPayloadSelect = { + clientMutationId?: boolean; + platformNamespaceEvent?: { + select: PlatformNamespaceEventSelect; + }; + platformNamespaceEventEdge?: { + select: PlatformNamespaceEventEdgeSelect; + }; +}; +export interface UpdatePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was updated by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} +export type UpdatePlatformNamespaceEventPayloadSelect = { + clientMutationId?: boolean; + platformNamespaceEvent?: { + select: PlatformNamespaceEventSelect; + }; + platformNamespaceEventEdge?: { + select: PlatformNamespaceEventEdgeSelect; + }; +}; +export interface DeletePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was deleted by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} +export type DeletePlatformNamespaceEventPayloadSelect = { + clientMutationId?: boolean; + platformNamespaceEvent?: { + select: PlatformNamespaceEventSelect; + }; + platformNamespaceEventEdge?: { + select: PlatformNamespaceEventEdgeSelect; + }; +}; export interface CreateFunctionGraphExecutionPayload { clientMutationId?: string | null; /** The `FunctionGraphExecution` that was created by this mutation. */ @@ -4524,6 +5531,18 @@ export type FunctionDeploymentEdgeSelect = { select: FunctionDeploymentSelect; }; }; +/** A `Resource` edge in the connection. */ +export interface ResourceEdge { + cursor?: string | null; + /** The `Resource` at the end of the edge. */ + node?: Resource | null; +} +export type ResourceEdgeSelect = { + cursor?: boolean; + node?: { + select: ResourceSelect; + }; +}; /** A `FunctionGraphRef` edge in the connection. */ export interface FunctionGraphRefEdge { cursor?: string | null; @@ -4584,6 +5603,18 @@ export type OrgFunctionExecutionLogEdgeSelect = { select: OrgFunctionExecutionLogSelect; }; }; +/** A `ResourceEvent` edge in the connection. */ +export interface ResourceEventEdge { + cursor?: string | null; + /** The `ResourceEvent` at the end of the edge. */ + node?: ResourceEvent | null; +} +export type ResourceEventEdgeSelect = { + cursor?: boolean; + node?: { + select: ResourceEventSelect; + }; +}; /** A `FunctionGraphExecutionOutput` edge in the connection. */ export interface FunctionGraphExecutionOutputEdge { cursor?: string | null; @@ -4632,6 +5663,18 @@ export type FunctionExecutionLogEdgeSelect = { select: FunctionExecutionLogSelect; }; }; +/** A `FunctionGraph` edge in the connection. */ +export interface FunctionGraphEdge { + cursor?: string | null; + /** The `FunctionGraph` at the end of the edge. */ + node?: FunctionGraph | null; +} +export type FunctionGraphEdgeSelect = { + cursor?: boolean; + node?: { + select: FunctionGraphSelect; + }; +}; /** A `FunctionGraphExecutionNodeState` edge in the connection. */ export interface FunctionGraphExecutionNodeStateEdge { cursor?: string | null; @@ -4644,16 +5687,16 @@ export type FunctionGraphExecutionNodeStateEdgeSelect = { select: FunctionGraphExecutionNodeStateSelect; }; }; -/** A `FunctionGraph` edge in the connection. */ -export interface FunctionGraphEdge { +/** A `PlatformNamespace` edge in the connection. */ +export interface PlatformNamespaceEdge { cursor?: string | null; - /** The `FunctionGraph` at the end of the edge. */ - node?: FunctionGraph | null; + /** The `PlatformNamespace` at the end of the edge. */ + node?: PlatformNamespace | null; } -export type FunctionGraphEdgeSelect = { +export type PlatformNamespaceEdgeSelect = { cursor?: boolean; node?: { - select: FunctionGraphSelect; + select: PlatformNamespaceSelect; }; }; /** A `OrgFunctionInvocation` edge in the connection. */ @@ -4680,6 +5723,18 @@ export type FunctionInvocationEdgeSelect = { select: FunctionInvocationSelect; }; }; +/** A `PlatformNamespaceEvent` edge in the connection. */ +export interface PlatformNamespaceEventEdge { + cursor?: string | null; + /** The `PlatformNamespaceEvent` at the end of the edge. */ + node?: PlatformNamespaceEvent | null; +} +export type PlatformNamespaceEventEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformNamespaceEventSelect; + }; +}; /** A `FunctionGraphExecution` edge in the connection. */ export interface FunctionGraphExecutionEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/compute/orm/models/index.ts b/sdk/constructive-cli/src/compute/orm/models/index.ts index 51e9b9f05d..cce3b40556 100644 --- a/sdk/constructive-cli/src/compute/orm/models/index.ts +++ b/sdk/constructive-cli/src/compute/orm/models/index.ts @@ -6,18 +6,22 @@ export { GetAllRecordModel } from './getAllRecord'; export { FunctionApiBindingModel } from './functionApiBinding'; export { FunctionDeploymentModel } from './functionDeployment'; +export { ResourceModel } from './resource'; export { FunctionGraphRefModel } from './functionGraphRef'; export { FunctionGraphStoreModel } from './functionGraphStore'; export { FunctionGraphObjectModel } from './functionGraphObject'; export { FunctionDeploymentEventModel } from './functionDeploymentEvent'; export { OrgFunctionExecutionLogModel } from './orgFunctionExecutionLog'; +export { ResourceEventModel } from './resourceEvent'; export { FunctionGraphExecutionOutputModel } from './functionGraphExecutionOutput'; export { FunctionGraphCommitModel } from './functionGraphCommit'; export { SecretDefinitionModel } from './secretDefinition'; export { FunctionExecutionLogModel } from './functionExecutionLog'; -export { FunctionGraphExecutionNodeStateModel } from './functionGraphExecutionNodeState'; export { FunctionGraphModel } from './functionGraph'; +export { FunctionGraphExecutionNodeStateModel } from './functionGraphExecutionNodeState'; +export { PlatformNamespaceModel } from './platformNamespace'; export { OrgFunctionInvocationModel } from './orgFunctionInvocation'; export { FunctionInvocationModel } from './functionInvocation'; +export { PlatformNamespaceEventModel } from './platformNamespaceEvent'; export { FunctionGraphExecutionModel } from './functionGraphExecution'; export { FunctionDefinitionModel } from './functionDefinition'; diff --git a/sdk/constructive-cli/src/compute/orm/models/platformNamespace.ts b/sdk/constructive-cli/src/compute/orm/models/platformNamespace.ts new file mode 100644 index 0000000000..c4dff94953 --- /dev/null +++ b/sdk/constructive-cli/src/compute/orm/models/platformNamespace.ts @@ -0,0 +1,245 @@ +/** + * PlatformNamespace 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 { + PlatformNamespace, + PlatformNamespaceWithRelations, + PlatformNamespaceSelect, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy, + CreatePlatformNamespaceInput, + UpdatePlatformNamespaceInput, + PlatformNamespacePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformNamespaceModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaces: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespace', + 'platformNamespaces', + 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, + }, + 'PlatformNamespaceFilter', + 'PlatformNamespaceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespace', + fieldName: 'platformNamespaces', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespace: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformNamespace', + 'platformNamespaces', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformNamespaceFilter', + 'PlatformNamespaceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespace', + fieldName: 'platformNamespace', + document, + variables, + transform: (data: { + platformNamespaces?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespace: data.platformNamespaces?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespace: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespace', + 'platformNamespaces', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformNamespaceFilter', + 'PlatformNamespaceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespace', + fieldName: 'platformNamespace', + document, + variables, + transform: (data: { + platformNamespaces?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespace: data.platformNamespaces?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformNamespace', + 'createPlatformNamespace', + 'platformNamespace', + args.select, + args.data, + 'CreatePlatformNamespaceInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespace', + fieldName: 'createPlatformNamespace', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformNamespacePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformNamespace', + 'updatePlatformNamespace', + 'platformNamespace', + args.select, + args.where.id, + args.data, + 'UpdatePlatformNamespaceInput', + 'id', + 'platformNamespacePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespace', + fieldName: 'updatePlatformNamespace', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformNamespace', + 'deletePlatformNamespace', + 'platformNamespace', + { + id: args.where.id, + }, + 'DeletePlatformNamespaceInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespace', + fieldName: 'deletePlatformNamespace', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/compute/orm/models/platformNamespaceEvent.ts b/sdk/constructive-cli/src/compute/orm/models/platformNamespaceEvent.ts new file mode 100644 index 0000000000..198afe79ae --- /dev/null +++ b/sdk/constructive-cli/src/compute/orm/models/platformNamespaceEvent.ts @@ -0,0 +1,252 @@ +/** + * PlatformNamespaceEvent 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 { + PlatformNamespaceEvent, + PlatformNamespaceEventWithRelations, + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy, + CreatePlatformNamespaceEventInput, + UpdatePlatformNamespaceEventInput, + PlatformNamespaceEventPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformNamespaceEventModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaceEvents: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespaceEvent', + 'platformNamespaceEvents', + 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, + }, + 'PlatformNamespaceEventFilter', + 'PlatformNamespaceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespaceEvent', + fieldName: 'platformNamespaceEvents', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformNamespaceEvent', + 'platformNamespaceEvents', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformNamespaceEventFilter', + 'PlatformNamespaceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespaceEvent', + fieldName: 'platformNamespaceEvent', + document, + variables, + transform: (data: { + platformNamespaceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespaceEvent: data.platformNamespaceEvents?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespaceEvent', + 'platformNamespaceEvents', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformNamespaceEventFilter', + 'PlatformNamespaceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespaceEvent', + fieldName: 'platformNamespaceEvent', + document, + variables, + transform: (data: { + platformNamespaceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespaceEvent: data.platformNamespaceEvents?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformNamespaceEvent', + 'createPlatformNamespaceEvent', + 'platformNamespaceEvent', + args.select, + args.data, + 'CreatePlatformNamespaceEventInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespaceEvent', + fieldName: 'createPlatformNamespaceEvent', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + createdAt: string; + }, + PlatformNamespaceEventPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformNamespaceEvent', + 'updatePlatformNamespaceEvent', + 'platformNamespaceEvent', + args.select, + args.where.id, + args.data, + 'UpdatePlatformNamespaceEventInput', + 'id', + 'platformNamespaceEventPatch', + connectionFieldsMap, + { + createdAt: args.where.createdAt, + } + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespaceEvent', + fieldName: 'updatePlatformNamespaceEvent', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + createdAt: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformNamespaceEvent', + 'deletePlatformNamespaceEvent', + 'platformNamespaceEvent', + { + id: args.where.id, + createdAt: args.where.createdAt, + }, + 'DeletePlatformNamespaceEventInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespaceEvent', + fieldName: 'deletePlatformNamespaceEvent', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/compute/orm/models/resource.ts b/sdk/constructive-cli/src/compute/orm/models/resource.ts new file mode 100644 index 0000000000..b4b60ad6f3 --- /dev/null +++ b/sdk/constructive-cli/src/compute/orm/models/resource.ts @@ -0,0 +1,245 @@ +/** + * Resource 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 { + Resource, + ResourceWithRelations, + ResourceSelect, + ResourceFilter, + ResourceOrderBy, + CreateResourceInput, + UpdateResourceInput, + ResourcePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ResourceModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resources: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Resource', + 'resources', + 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, + }, + 'ResourceFilter', + 'ResourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Resource', + fieldName: 'resources', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resource: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Resource', + 'resources', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ResourceFilter', + 'ResourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Resource', + fieldName: 'resource', + document, + variables, + transform: (data: { + resources?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resource: data.resources?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + resource: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Resource', + 'resources', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ResourceFilter', + 'ResourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Resource', + fieldName: 'resource', + document, + variables, + transform: (data: { + resources?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resource: data.resources?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createResource: { + resource: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Resource', + 'createResource', + 'resource', + args.select, + args.data, + 'CreateResourceInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Resource', + fieldName: 'createResource', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ResourcePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateResource: { + resource: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'Resource', + 'updateResource', + 'resource', + args.select, + args.where.id, + args.data, + 'UpdateResourceInput', + 'id', + 'resourcePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Resource', + fieldName: 'updateResource', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteResource: { + resource: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Resource', + 'deleteResource', + 'resource', + { + id: args.where.id, + }, + 'DeleteResourceInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Resource', + fieldName: 'deleteResource', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/compute/orm/models/resourceEvent.ts b/sdk/constructive-cli/src/compute/orm/models/resourceEvent.ts new file mode 100644 index 0000000000..9796098dc8 --- /dev/null +++ b/sdk/constructive-cli/src/compute/orm/models/resourceEvent.ts @@ -0,0 +1,250 @@ +/** + * ResourceEvent 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 { + ResourceEvent, + ResourceEventWithRelations, + ResourceEventSelect, + ResourceEventFilter, + ResourceEventOrderBy, + CreateResourceEventInput, + UpdateResourceEventInput, + ResourceEventPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ResourceEventModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceEvents: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceEvent', + 'resourceEvents', + 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, + }, + 'ResourceEventFilter', + 'ResourceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceEvent', + fieldName: 'resourceEvents', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ResourceEvent', + 'resourceEvents', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ResourceEventFilter', + 'ResourceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceEvent', + fieldName: 'resourceEvent', + document, + variables, + transform: (data: { + resourceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceEvent: data.resourceEvents?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceEvent', + 'resourceEvents', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ResourceEventFilter', + 'ResourceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceEvent', + fieldName: 'resourceEvent', + document, + variables, + transform: (data: { + resourceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceEvent: data.resourceEvents?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createResourceEvent: { + resourceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ResourceEvent', + 'createResourceEvent', + 'resourceEvent', + args.select, + args.data, + 'CreateResourceEventInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceEvent', + fieldName: 'createResourceEvent', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + createdAt: string; + }, + ResourceEventPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateResourceEvent: { + resourceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ResourceEvent', + 'updateResourceEvent', + 'resourceEvent', + args.select, + args.where.id, + args.data, + 'UpdateResourceEventInput', + 'id', + 'resourceEventPatch', + connectionFieldsMap, + { + createdAt: args.where.createdAt, + } + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceEvent', + fieldName: 'updateResourceEvent', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + createdAt: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteResourceEvent: { + resourceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ResourceEvent', + 'deleteResourceEvent', + 'resourceEvent', + { + id: args.where.id, + createdAt: args.where.createdAt, + }, + 'DeleteResourceEventInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceEvent', + fieldName: 'deleteResourceEvent', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/compute/orm/mutation/index.ts b/sdk/constructive-cli/src/compute/orm/mutation/index.ts index b4abf9132b..932f75c399 100644 --- a/sdk/constructive-cli/src/compute/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/compute/orm/mutation/index.ts @@ -15,9 +15,9 @@ import type { SaveGraphInput, AddEdgeAndSaveInput, AddNodeAndSaveInput, + ImportGraphJsonInput, AddEdgeInput, AddNodeInput, - ImportGraphJsonInput, InsertNodeAtPathInput, StartExecutionInput, ProvisionBucketInput, @@ -29,9 +29,9 @@ import type { SaveGraphPayload, AddEdgeAndSavePayload, AddNodeAndSavePayload, + ImportGraphJsonPayload, AddEdgePayload, AddNodePayload, - ImportGraphJsonPayload, InsertNodeAtPathPayload, StartExecutionPayload, ProvisionBucketPayload, @@ -43,9 +43,9 @@ import type { SaveGraphPayloadSelect, AddEdgeAndSavePayloadSelect, AddNodeAndSavePayloadSelect, + ImportGraphJsonPayloadSelect, AddEdgePayloadSelect, AddNodePayloadSelect, - ImportGraphJsonPayloadSelect, InsertNodeAtPathPayloadSelect, StartExecutionPayloadSelect, ProvisionBucketPayloadSelect, @@ -75,15 +75,15 @@ export interface AddEdgeAndSaveVariables { export interface AddNodeAndSaveVariables { input: AddNodeAndSaveInput; } +export interface ImportGraphJsonVariables { + input: ImportGraphJsonInput; +} export interface AddEdgeVariables { input: AddEdgeInput; } export interface AddNodeVariables { input: AddNodeInput; } -export interface ImportGraphJsonVariables { - input: ImportGraphJsonInput; -} export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } @@ -334,6 +334,35 @@ export function createMutationOperations(client: OrmClient) { 'AddNodeAndSavePayload' ), }), + importGraphJson: ( + args: ImportGraphJsonVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + importGraphJson: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ImportGraphJson', + fieldName: 'importGraphJson', + ...buildCustomDocument( + 'mutation', + 'ImportGraphJson', + 'importGraphJson', + options.select, + args, + [ + { + name: 'input', + type: 'ImportGraphJsonInput!', + }, + ], + connectionFieldsMap, + 'ImportGraphJsonPayload' + ), + }), addEdge: ( args: AddEdgeVariables, options: { @@ -392,35 +421,6 @@ export function createMutationOperations(client: OrmClient) { 'AddNodePayload' ), }), - importGraphJson: ( - args: ImportGraphJsonVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - importGraphJson: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ImportGraphJson', - fieldName: 'importGraphJson', - ...buildCustomDocument( - 'mutation', - 'ImportGraphJson', - 'importGraphJson', - options.select, - args, - [ - { - name: 'input', - type: 'ImportGraphJsonInput!', - }, - ], - connectionFieldsMap, - 'ImportGraphJsonPayload' - ), - }), insertNodeAtPath: ( args: InsertNodeAtPathVariables, options: { diff --git a/sdk/constructive-cli/src/modules/README.md b/sdk/constructive-cli/src/modules/README.md index 872d49ea3b..2a6700eff5 100644 --- a/sdk/constructive-cli/src/modules/README.md +++ b/sdk/constructive-cli/src/modules/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 59 +- **Tables:** 61 - **Custom queries:** 2 - **Custom mutations:** 10 diff --git a/sdk/constructive-cli/src/modules/cli/README.md b/sdk/constructive-cli/src/modules/cli/README.md index b17d8d3df6..724073653d 100644 --- a/sdk/constructive-cli/src/modules/cli/README.md +++ b/sdk/constructive-cli/src/modules/cli/README.md @@ -52,19 +52,21 @@ csdk auth set-token | `crypto-auth-module` | cryptoAuthModule CRUD operations | | `sessions-module` | sessionsModule CRUD operations | | `secure-table-provision` | secureTableProvision CRUD operations | -| `merkle-store-module` | merkleStoreModule CRUD operations | -| `graph-module` | graphModule CRUD operations | | `database-provision-module` | databaseProvisionModule CRUD operations | | `config-secrets-module` | configSecretsModule CRUD operations | +| `graph-module` | graphModule CRUD operations | +| `merkle-store-module` | merkleStoreModule CRUD operations | | `rate-limit-meters-module` | rateLimitMetersModule CRUD operations | | `realtime-module` | realtimeModule CRUD operations | | `webauthn-auth-module` | webauthnAuthModule CRUD operations | | `function-invocation-module` | functionInvocationModule CRUD operations | | `function-module` | functionModule CRUD operations | | `invites-module` | invitesModule CRUD operations | +| `principal-auth-module` | principalAuthModule CRUD operations | | `compute-log-module` | computeLogModule CRUD operations | | `inference-log-module` | inferenceLogModule CRUD operations | | `namespace-module` | namespaceModule CRUD operations | +| `resource-module` | resourceModule CRUD operations | | `storage-log-module` | storageLogModule CRUD operations | | `transfer-log-module` | transferLogModule CRUD operations | | `function-deployment-module` | functionDeploymentModule CRUD operations | @@ -929,18 +931,53 @@ CRUD operations for SecureTableProvision records. **Required create fields:** `databaseId` **Optional create fields (backend defaults):** `schemaId`, `tableId`, `tableName`, `nodes`, `useRls`, `fields`, `grants`, `policies`, `outFields` -### `merkle-store-module` +### `database-provision-module` -CRUD operations for MerkleStoreModule records. +CRUD operations for DatabaseProvisionModule records. | Subcommand | Description | |------------|-------------| -| `list` | List all merkleStoreModule records | -| `find-first` | Find first matching merkleStoreModule record | -| `get` | Get a merkleStoreModule by id | -| `create` | Create a new merkleStoreModule | -| `update` | Update an existing merkleStoreModule | -| `delete` | Delete a merkleStoreModule | +| `list` | List all databaseProvisionModule records | +| `find-first` | Find first matching databaseProvisionModule record | +| `get` | Get a databaseProvisionModule by id | +| `create` | Create a new databaseProvisionModule | +| `update` | Update an existing databaseProvisionModule | +| `delete` | Delete a databaseProvisionModule | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `databaseName` | String | +| `ownerId` | UUID | +| `subdomain` | String | +| `domain` | String | +| `modules` | JSON | +| `options` | JSON | +| `bootstrapUser` | Boolean | +| `status` | String | +| `errorMessage` | String | +| `databaseId` | UUID | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | +| `completedAt` | Datetime | + +**Required create fields:** `databaseName`, `ownerId`, `domain` +**Optional create fields (backend defaults):** `subdomain`, `modules`, `options`, `bootstrapUser`, `status`, `errorMessage`, `databaseId`, `completedAt` + +### `config-secrets-module` + +CRUD operations for ConfigSecretsModule records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all configSecretsModule records | +| `find-first` | Find first matching configSecretsModule record | +| `get` | Get a configSecretsModule by id | +| `create` | Create a new configSecretsModule | +| `update` | Update an existing configSecretsModule | +| `delete` | Delete a configSecretsModule | **Fields:** @@ -952,19 +989,20 @@ CRUD operations for MerkleStoreModule records. | `privateSchemaId` | UUID | | `publicSchemaName` | String | | `privateSchemaName` | String | -| `objectTableId` | UUID | -| `storeTableId` | UUID | -| `commitTableId` | UUID | -| `refTableId` | UUID | -| `prefix` | String | +| `tableId` | UUID | +| `configDefinitionsTableId` | UUID | +| `tableName` | String | | `apiName` | String | | `privateApiName` | String | | `scope` | String | -| `functionPrefix` | String | -| `createdAt` | Datetime | +| `prefix` | String | +| `entityTableId` | UUID | +| `policies` | JSON | +| `provisions` | JSON | +| `hasConfig` | Boolean | **Required create fields:** `databaseId` -**Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `publicSchemaName`, `privateSchemaName`, `objectTableId`, `storeTableId`, `commitTableId`, `refTableId`, `prefix`, `apiName`, `privateApiName`, `scope`, `functionPrefix` +**Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `publicSchemaName`, `privateSchemaName`, `tableId`, `configDefinitionsTableId`, `tableName`, `apiName`, `privateApiName`, `scope`, `prefix`, `entityTableId`, `policies`, `provisions`, `hasConfig` ### `graph-module` @@ -1004,53 +1042,18 @@ CRUD operations for GraphModule records. **Required create fields:** `databaseId`, `merkleStoreModuleId` **Optional create fields (backend defaults):** `publicSchemaId`, `privateSchemaId`, `publicSchemaName`, `privateSchemaName`, `scope`, `prefix`, `graphsTableId`, `apiName`, `privateApiName`, `entityTableId`, `policies`, `provisions`, `defaultPermissions` -### `database-provision-module` - -CRUD operations for DatabaseProvisionModule records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all databaseProvisionModule records | -| `find-first` | Find first matching databaseProvisionModule record | -| `get` | Get a databaseProvisionModule by id | -| `create` | Create a new databaseProvisionModule | -| `update` | Update an existing databaseProvisionModule | -| `delete` | Delete a databaseProvisionModule | - -**Fields:** - -| Field | Type | -|-------|------| -| `id` | UUID | -| `databaseName` | String | -| `ownerId` | UUID | -| `subdomain` | String | -| `domain` | String | -| `modules` | JSON | -| `options` | JSON | -| `bootstrapUser` | Boolean | -| `status` | String | -| `errorMessage` | String | -| `databaseId` | UUID | -| `createdAt` | Datetime | -| `updatedAt` | Datetime | -| `completedAt` | Datetime | - -**Required create fields:** `databaseName`, `ownerId`, `domain` -**Optional create fields (backend defaults):** `subdomain`, `modules`, `options`, `bootstrapUser`, `status`, `errorMessage`, `databaseId`, `completedAt` - -### `config-secrets-module` +### `merkle-store-module` -CRUD operations for ConfigSecretsModule records. +CRUD operations for MerkleStoreModule records. | Subcommand | Description | |------------|-------------| -| `list` | List all configSecretsModule records | -| `find-first` | Find first matching configSecretsModule record | -| `get` | Get a configSecretsModule by id | -| `create` | Create a new configSecretsModule | -| `update` | Update an existing configSecretsModule | -| `delete` | Delete a configSecretsModule | +| `list` | List all merkleStoreModule records | +| `find-first` | Find first matching merkleStoreModule record | +| `get` | Get a merkleStoreModule by id | +| `create` | Create a new merkleStoreModule | +| `update` | Update an existing merkleStoreModule | +| `delete` | Delete a merkleStoreModule | **Fields:** @@ -1062,20 +1065,20 @@ CRUD operations for ConfigSecretsModule records. | `privateSchemaId` | UUID | | `publicSchemaName` | String | | `privateSchemaName` | String | -| `tableId` | UUID | -| `configDefinitionsTableId` | UUID | -| `tableName` | String | +| `objectTableId` | UUID | +| `storeTableId` | UUID | +| `commitTableId` | UUID | +| `refTableId` | UUID | +| `prefix` | String | | `apiName` | String | | `privateApiName` | String | | `scope` | String | -| `prefix` | String | -| `entityTableId` | UUID | -| `policies` | JSON | -| `provisions` | JSON | -| `hasConfig` | Boolean | +| `functionPrefix` | String | +| `permissionKey` | String | +| `createdAt` | Datetime | **Required create fields:** `databaseId` -**Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `publicSchemaName`, `privateSchemaName`, `tableId`, `configDefinitionsTableId`, `tableName`, `apiName`, `privateApiName`, `scope`, `prefix`, `entityTableId`, `policies`, `provisions`, `hasConfig` +**Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `publicSchemaName`, `privateSchemaName`, `objectTableId`, `storeTableId`, `commitTableId`, `refTableId`, `prefix`, `apiName`, `privateApiName`, `scope`, `functionPrefix`, `permissionKey` ### `rate-limit-meters-module` @@ -1304,6 +1307,45 @@ CRUD operations for InvitesModule records. **Required create fields:** `databaseId` **Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `publicSchemaName`, `privateSchemaName`, `emailsTableId`, `usersTableId`, `invitesTableId`, `claimedInvitesTableId`, `invitesTableName`, `claimedInvitesTableName`, `submitInviteCodeFunction`, `scope`, `prefix`, `entityTableId`, `apiName`, `privateApiName` +### `principal-auth-module` + +CRUD operations for PrincipalAuthModule records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all principalAuthModule records | +| `find-first` | Find first matching principalAuthModule record | +| `get` | Get a principalAuthModule by id | +| `create` | Create a new principalAuthModule | +| `update` | Update an existing principalAuthModule | +| `delete` | Delete a principalAuthModule | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `databaseId` | UUID | +| `schemaId` | UUID | +| `principalsTableId` | UUID | +| `principalEntitiesTableId` | UUID | +| `principalScopeOverridesTableId` | UUID | +| `usersTableId` | UUID | +| `sessionsTableId` | UUID | +| `sessionCredentialsTableId` | UUID | +| `auditsTableId` | UUID | +| `principalsTableName` | String | +| `createPrincipalFunction` | String | +| `deletePrincipalFunction` | String | +| `createOrgPrincipalFunction` | String | +| `deleteOrgPrincipalFunction` | String | +| `createOrgApiKeyFunction` | String | +| `revokeOrgApiKeyFunction` | String | +| `apiName` | String | + +**Required create fields:** `databaseId` +**Optional create fields (backend defaults):** `schemaId`, `principalsTableId`, `principalEntitiesTableId`, `principalScopeOverridesTableId`, `usersTableId`, `sessionsTableId`, `sessionCredentialsTableId`, `auditsTableId`, `principalsTableName`, `createPrincipalFunction`, `deletePrincipalFunction`, `createOrgPrincipalFunction`, `deleteOrgPrincipalFunction`, `createOrgApiKeyFunction`, `revokeOrgApiKeyFunction`, `apiName` + ### `compute-log-module` CRUD operations for ComputeLogModule records. @@ -1424,6 +1466,46 @@ CRUD operations for NamespaceModule records. **Required create fields:** `databaseId` **Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `publicSchemaName`, `privateSchemaName`, `namespacesTableId`, `namespaceEventsTableId`, `namespacesTableName`, `namespaceEventsTableName`, `apiName`, `privateApiName`, `scope`, `prefix`, `entityTableId`, `platformNamespacesTableId`, `policies`, `provisions`, `defaultPermissions` +### `resource-module` + +CRUD operations for ResourceModule records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all resourceModule records | +| `find-first` | Find first matching resourceModule record | +| `get` | Get a resourceModule by id | +| `create` | Create a new resourceModule | +| `update` | Update an existing resourceModule | +| `delete` | Delete a resourceModule | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `databaseId` | UUID | +| `schemaId` | UUID | +| `privateSchemaId` | UUID | +| `publicSchemaName` | String | +| `privateSchemaName` | String | +| `resourcesTableId` | UUID | +| `resourceEventsTableId` | UUID | +| `resourcesTableName` | String | +| `resourceEventsTableName` | String | +| `apiName` | String | +| `privateApiName` | String | +| `scope` | String | +| `prefix` | String | +| `entityTableId` | UUID | +| `namespaceModuleId` | UUID | +| `policies` | JSON | +| `provisions` | JSON | +| `defaultPermissions` | String | + +**Required create fields:** `databaseId` +**Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `publicSchemaName`, `privateSchemaName`, `resourcesTableId`, `resourceEventsTableId`, `resourcesTableName`, `resourceEventsTableName`, `apiName`, `privateApiName`, `scope`, `prefix`, `entityTableId`, `namespaceModuleId`, `policies`, `provisions`, `defaultPermissions` + ### `storage-log-module` CRUD operations for StorageLogModule records. diff --git a/sdk/constructive-cli/src/modules/cli/commands.ts b/sdk/constructive-cli/src/modules/cli/commands.ts index 944d3a8518..2d72cb097a 100644 --- a/sdk/constructive-cli/src/modules/cli/commands.ts +++ b/sdk/constructive-cli/src/modules/cli/commands.ts @@ -32,19 +32,21 @@ import blueprintConstructionCmd from './commands/blueprint-construction'; import cryptoAuthModuleCmd from './commands/crypto-auth-module'; import sessionsModuleCmd from './commands/sessions-module'; import secureTableProvisionCmd from './commands/secure-table-provision'; -import merkleStoreModuleCmd from './commands/merkle-store-module'; -import graphModuleCmd from './commands/graph-module'; import databaseProvisionModuleCmd from './commands/database-provision-module'; import configSecretsModuleCmd from './commands/config-secrets-module'; +import graphModuleCmd from './commands/graph-module'; +import merkleStoreModuleCmd from './commands/merkle-store-module'; import rateLimitMetersModuleCmd from './commands/rate-limit-meters-module'; import realtimeModuleCmd from './commands/realtime-module'; import webauthnAuthModuleCmd from './commands/webauthn-auth-module'; import functionInvocationModuleCmd from './commands/function-invocation-module'; import functionModuleCmd from './commands/function-module'; import invitesModuleCmd from './commands/invites-module'; +import principalAuthModuleCmd from './commands/principal-auth-module'; import computeLogModuleCmd from './commands/compute-log-module'; import inferenceLogModuleCmd from './commands/inference-log-module'; import namespaceModuleCmd from './commands/namespace-module'; +import resourceModuleCmd from './commands/resource-module'; import storageLogModuleCmd from './commands/storage-log-module'; import transferLogModuleCmd from './commands/transfer-log-module'; import functionDeploymentModuleCmd from './commands/function-deployment-module'; @@ -113,19 +115,21 @@ const createCommandMap: () => Record< 'crypto-auth-module': cryptoAuthModuleCmd, 'sessions-module': sessionsModuleCmd, 'secure-table-provision': secureTableProvisionCmd, - 'merkle-store-module': merkleStoreModuleCmd, - 'graph-module': graphModuleCmd, 'database-provision-module': databaseProvisionModuleCmd, 'config-secrets-module': configSecretsModuleCmd, + 'graph-module': graphModuleCmd, + 'merkle-store-module': merkleStoreModuleCmd, 'rate-limit-meters-module': rateLimitMetersModuleCmd, 'realtime-module': realtimeModuleCmd, 'webauthn-auth-module': webauthnAuthModuleCmd, 'function-invocation-module': functionInvocationModuleCmd, 'function-module': functionModuleCmd, 'invites-module': invitesModuleCmd, + 'principal-auth-module': principalAuthModuleCmd, 'compute-log-module': computeLogModuleCmd, 'inference-log-module': inferenceLogModuleCmd, 'namespace-module': namespaceModuleCmd, + 'resource-module': resourceModuleCmd, 'storage-log-module': storageLogModuleCmd, 'transfer-log-module': transferLogModuleCmd, 'function-deployment-module': functionDeploymentModuleCmd, @@ -160,7 +164,7 @@ const createCommandMap: () => Record< 'provision-bucket': provisionBucketCmd, }); const usage = - "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n default-ids-module defaultIdsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n user-state-module userStateModule CRUD operations\n session-secrets-module sessionSecretsModule CRUD operations\n config-secrets-org-module configSecretsOrgModule CRUD operations\n devices-module devicesModule CRUD operations\n i-18-n-module i18NModule CRUD operations\n user-credentials-module userCredentialsModule CRUD operations\n user-settings-module userSettingsModule CRUD operations\n config-secrets-user-module configSecretsUserModule CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n emails-module emailsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n rate-limits-module rateLimitsModule CRUD operations\n users-module usersModule CRUD operations\n webauthn-credentials-module webauthnCredentialsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n identity-providers-module identityProvidersModule CRUD operations\n rls-module rlsModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n blueprint-construction blueprintConstruction CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n sessions-module sessionsModule CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n merkle-store-module merkleStoreModule CRUD operations\n graph-module graphModule CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n config-secrets-module configSecretsModule CRUD operations\n rate-limit-meters-module rateLimitMetersModule CRUD operations\n realtime-module realtimeModule CRUD operations\n webauthn-auth-module webauthnAuthModule CRUD operations\n function-invocation-module functionInvocationModule CRUD operations\n function-module functionModule CRUD operations\n invites-module invitesModule CRUD operations\n compute-log-module computeLogModule CRUD operations\n inference-log-module inferenceLogModule CRUD operations\n namespace-module namespaceModule CRUD operations\n storage-log-module storageLogModule CRUD operations\n transfer-log-module transferLogModule CRUD operations\n function-deployment-module functionDeploymentModule CRUD operations\n plans-module plansModule CRUD operations\n billing-provider-module billingProviderModule CRUD operations\n db-usage-module dbUsageModule CRUD operations\n graph-execution-module graphExecutionModule CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n permissions-module permissionsModule CRUD operations\n notifications-module notificationsModule CRUD operations\n profiles-module profilesModule CRUD operations\n billing-module billingModule CRUD operations\n relation-provision relationProvision CRUD operations\n user-auth-module userAuthModule CRUD operations\n agent-module agentModule CRUD operations\n limits-module limitsModule CRUD operations\n memberships-module membershipsModule CRUD operations\n entity-type-provision entityTypeProvision CRUD operations\n storage-module storageModule CRUD operations\n events-module eventsModule CRUD operations\n resolve-blueprint-field Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. \"location\") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this.\n resolve-blueprint-table Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error.\n construct-blueprint Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry \u2014 provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] \u2014 resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.\n provision-full-text-search Creates a full-text search configuration on a table. Accepts a jsonb definition with field (tsvector column name) and sources (array of {field, weight, lang}). Graceful: skips if FTS config already exists for the same (table_id, field_id). Returns the fts_id.\n provision-index Creates an index on a table. Accepts a jsonb definition with columns (array of names or single column string), access_method (default BTREE), is_unique, op_classes, options, and name (auto-generated if omitted). Graceful: skips if an index with the same (table_id, field_ids, access_method) already exists. Returns the index_id.\n provision-check-constraint Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists.\n provision-unique-constraint Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.\n 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-spatial-relation Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin \u2194 param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist \u2014 this is a metadata-only insert.\n provision-table Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields).\n provision-relation Composable relation provisioning: creates FK fields, indexes, unique constraints, and junction tables depending on the relation_type. Supports RelationBelongsTo, RelationHasOne, RelationHasMany, and RelationManyToMany. ManyToMany uses provision_table() internally for junction table creation with full node/grant/policy support. All operations are graceful (skip existing). Returns (out_field_id, out_junction_table_id, out_source_field_id, out_target_field_id).\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n"; + "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n default-ids-module defaultIdsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n user-state-module userStateModule CRUD operations\n session-secrets-module sessionSecretsModule CRUD operations\n config-secrets-org-module configSecretsOrgModule CRUD operations\n devices-module devicesModule CRUD operations\n i-18-n-module i18NModule CRUD operations\n user-credentials-module userCredentialsModule CRUD operations\n user-settings-module userSettingsModule CRUD operations\n config-secrets-user-module configSecretsUserModule CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n emails-module emailsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n rate-limits-module rateLimitsModule CRUD operations\n users-module usersModule CRUD operations\n webauthn-credentials-module webauthnCredentialsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n identity-providers-module identityProvidersModule CRUD operations\n rls-module rlsModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n blueprint-construction blueprintConstruction CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n sessions-module sessionsModule CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n config-secrets-module configSecretsModule CRUD operations\n graph-module graphModule CRUD operations\n merkle-store-module merkleStoreModule CRUD operations\n rate-limit-meters-module rateLimitMetersModule CRUD operations\n realtime-module realtimeModule CRUD operations\n webauthn-auth-module webauthnAuthModule CRUD operations\n function-invocation-module functionInvocationModule CRUD operations\n function-module functionModule CRUD operations\n invites-module invitesModule CRUD operations\n principal-auth-module principalAuthModule CRUD operations\n compute-log-module computeLogModule CRUD operations\n inference-log-module inferenceLogModule CRUD operations\n namespace-module namespaceModule CRUD operations\n resource-module resourceModule CRUD operations\n storage-log-module storageLogModule CRUD operations\n transfer-log-module transferLogModule CRUD operations\n function-deployment-module functionDeploymentModule CRUD operations\n plans-module plansModule CRUD operations\n billing-provider-module billingProviderModule CRUD operations\n db-usage-module dbUsageModule CRUD operations\n graph-execution-module graphExecutionModule CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n permissions-module permissionsModule CRUD operations\n notifications-module notificationsModule CRUD operations\n profiles-module profilesModule CRUD operations\n billing-module billingModule CRUD operations\n relation-provision relationProvision CRUD operations\n user-auth-module userAuthModule CRUD operations\n agent-module agentModule CRUD operations\n limits-module limitsModule CRUD operations\n memberships-module membershipsModule CRUD operations\n entity-type-provision entityTypeProvision CRUD operations\n storage-module storageModule CRUD operations\n events-module eventsModule CRUD operations\n resolve-blueprint-field Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. \"location\") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this.\n resolve-blueprint-table Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error.\n construct-blueprint Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry \u2014 provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] \u2014 resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.\n provision-full-text-search Creates a full-text search configuration on a table. Accepts a jsonb definition with field (tsvector column name) and sources (array of {field, weight, lang}). Graceful: skips if FTS config already exists for the same (table_id, field_id). Returns the fts_id.\n provision-index Creates an index on a table. Accepts a jsonb definition with columns (array of names or single column string), access_method (default BTREE), is_unique, op_classes, options, and name (auto-generated if omitted). Graceful: skips if an index with the same (table_id, field_ids, access_method) already exists. Returns the index_id.\n provision-check-constraint Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists.\n provision-unique-constraint Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.\n 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-spatial-relation Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin \u2194 param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist \u2014 this is a metadata-only insert.\n provision-table Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields).\n provision-relation Composable relation provisioning: creates FK fields, indexes, unique constraints, and junction tables depending on the relation_type. Supports RelationBelongsTo, RelationHasOne, RelationHasMany, and RelationManyToMany. ManyToMany uses provision_table() internally for junction table creation with full node/grant/policy support. All operations are graceful (skip existing). Returns (out_field_id, out_junction_table_id, out_source_field_id, out_target_field_id).\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n"; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/modules/cli/commands/merkle-store-module.ts b/sdk/constructive-cli/src/modules/cli/commands/merkle-store-module.ts index 15c24c09ee..b7ce012a7e 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/merkle-store-module.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/merkle-store-module.ts @@ -31,6 +31,7 @@ const fieldSchema: FieldSchema = { privateApiName: 'string', scope: 'string', functionPrefix: 'string', + permissionKey: 'string', createdAt: 'string', }; const usage = @@ -99,6 +100,7 @@ async function handleList(argv: Partial>, _prompter: Inq privateApiName: true, scope: true, functionPrefix: true, + permissionKey: true, createdAt: true, }; const findManyArgs = parseFindManyArgs< @@ -135,6 +137,7 @@ async function handleFindFirst(argv: Partial>, _prompter privateApiName: true, scope: true, functionPrefix: true, + permissionKey: true, createdAt: true, }; const findFirstArgs = parseFindFirstArgs< @@ -183,6 +186,7 @@ async function handleGet(argv: Partial>, prompter: Inqui privateApiName: true, scope: true, functionPrefix: true, + permissionKey: true, createdAt: true, }, }) @@ -296,6 +300,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'permissionKey', + message: 'permissionKey', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined( @@ -320,6 +331,7 @@ async function handleCreate(argv: Partial>, prompter: In privateApiName: cleanedData.privateApiName, scope: cleanedData.scope, functionPrefix: cleanedData.functionPrefix, + permissionKey: cleanedData.permissionKey, }, select: { id: true, @@ -337,6 +349,7 @@ async function handleCreate(argv: Partial>, prompter: In privateApiName: true, scope: true, functionPrefix: true, + permissionKey: true, createdAt: true, }, }) @@ -456,6 +469,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'permissionKey', + message: 'permissionKey', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as MerkleStoreModulePatch; @@ -480,6 +500,7 @@ async function handleUpdate(argv: Partial>, prompter: In privateApiName: cleanedData.privateApiName, scope: cleanedData.scope, functionPrefix: cleanedData.functionPrefix, + permissionKey: cleanedData.permissionKey, }, select: { id: true, @@ -497,6 +518,7 @@ async function handleUpdate(argv: Partial>, prompter: In privateApiName: true, scope: true, functionPrefix: true, + permissionKey: true, createdAt: true, }, }) diff --git a/sdk/constructive-cli/src/modules/cli/commands/principal-auth-module.ts b/sdk/constructive-cli/src/modules/cli/commands/principal-auth-module.ts new file mode 100644 index 0000000000..df510cdb12 --- /dev/null +++ b/sdk/constructive-cli/src/modules/cli/commands/principal-auth-module.ts @@ -0,0 +1,611 @@ +/** + * CLI commands for PrincipalAuthModule + * @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 { + CreatePrincipalAuthModuleInput, + PrincipalAuthModulePatch, + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + databaseId: 'uuid', + schemaId: 'uuid', + principalsTableId: 'uuid', + principalEntitiesTableId: 'uuid', + principalScopeOverridesTableId: 'uuid', + usersTableId: 'uuid', + sessionsTableId: 'uuid', + sessionCredentialsTableId: 'uuid', + auditsTableId: 'uuid', + principalsTableName: 'string', + createPrincipalFunction: 'string', + deletePrincipalFunction: 'string', + createOrgPrincipalFunction: 'string', + deleteOrgPrincipalFunction: 'string', + createOrgApiKeyFunction: 'string', + revokeOrgApiKeyFunction: 'string', + apiName: 'string', +}; +const usage = + '\nprincipal-auth-module \n\nCommands:\n list List principalAuthModule records\n find-first Find first matching principalAuthModule record\n get Get a principalAuthModule by ID\n create Create a new principalAuthModule\n update Update an existing principalAuthModule\n delete Delete a principalAuthModule\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 = { + id: true, + databaseId: true, + schemaId: true, + principalsTableId: true, + principalEntitiesTableId: true, + principalScopeOverridesTableId: true, + usersTableId: true, + sessionsTableId: true, + sessionCredentialsTableId: true, + auditsTableId: true, + principalsTableName: true, + createPrincipalFunction: true, + deletePrincipalFunction: true, + createOrgPrincipalFunction: true, + deleteOrgPrincipalFunction: true, + createOrgApiKeyFunction: true, + revokeOrgApiKeyFunction: true, + apiName: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs< + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy + > & { + select: PrincipalAuthModuleSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.principalAuthModule.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 = { + id: true, + databaseId: true, + schemaId: true, + principalsTableId: true, + principalEntitiesTableId: true, + principalScopeOverridesTableId: true, + usersTableId: true, + sessionsTableId: true, + sessionCredentialsTableId: true, + auditsTableId: true, + principalsTableName: true, + createPrincipalFunction: true, + deletePrincipalFunction: true, + createOrgPrincipalFunction: true, + deleteOrgPrincipalFunction: true, + createOrgApiKeyFunction: true, + revokeOrgApiKeyFunction: true, + apiName: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs< + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy + > & { + select: PrincipalAuthModuleSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.principalAuthModule.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.principalAuthModule + .findOne({ + id: answers.id as string, + select: { + id: true, + databaseId: true, + schemaId: true, + principalsTableId: true, + principalEntitiesTableId: true, + principalScopeOverridesTableId: true, + usersTableId: true, + sessionsTableId: true, + sessionCredentialsTableId: true, + auditsTableId: true, + principalsTableName: true, + createPrincipalFunction: true, + deletePrincipalFunction: true, + createOrgPrincipalFunction: true, + deleteOrgPrincipalFunction: true, + createOrgApiKeyFunction: true, + revokeOrgApiKeyFunction: true, + apiName: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Record not found.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: true, + }, + { + type: 'text', + name: 'schemaId', + message: 'schemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'principalsTableId', + message: 'principalsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'principalEntitiesTableId', + message: 'principalEntitiesTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'principalScopeOverridesTableId', + message: 'principalScopeOverridesTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'usersTableId', + message: 'usersTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'sessionsTableId', + message: 'sessionsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'sessionCredentialsTableId', + message: 'sessionCredentialsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'auditsTableId', + message: 'auditsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'principalsTableName', + message: 'principalsTableName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'createPrincipalFunction', + message: 'createPrincipalFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'deletePrincipalFunction', + message: 'deletePrincipalFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'createOrgPrincipalFunction', + message: 'createOrgPrincipalFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'deleteOrgPrincipalFunction', + message: 'deleteOrgPrincipalFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'createOrgApiKeyFunction', + message: 'createOrgApiKeyFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'revokeOrgApiKeyFunction', + message: 'revokeOrgApiKeyFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'apiName', + message: 'apiName', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreatePrincipalAuthModuleInput['principalAuthModule']; + const client = getClient(); + const result = await client.principalAuthModule + .create({ + data: { + databaseId: cleanedData.databaseId, + schemaId: cleanedData.schemaId, + principalsTableId: cleanedData.principalsTableId, + principalEntitiesTableId: cleanedData.principalEntitiesTableId, + principalScopeOverridesTableId: cleanedData.principalScopeOverridesTableId, + usersTableId: cleanedData.usersTableId, + sessionsTableId: cleanedData.sessionsTableId, + sessionCredentialsTableId: cleanedData.sessionCredentialsTableId, + auditsTableId: cleanedData.auditsTableId, + principalsTableName: cleanedData.principalsTableName, + createPrincipalFunction: cleanedData.createPrincipalFunction, + deletePrincipalFunction: cleanedData.deletePrincipalFunction, + createOrgPrincipalFunction: cleanedData.createOrgPrincipalFunction, + deleteOrgPrincipalFunction: cleanedData.deleteOrgPrincipalFunction, + createOrgApiKeyFunction: cleanedData.createOrgApiKeyFunction, + revokeOrgApiKeyFunction: cleanedData.revokeOrgApiKeyFunction, + apiName: cleanedData.apiName, + }, + select: { + id: true, + databaseId: true, + schemaId: true, + principalsTableId: true, + principalEntitiesTableId: true, + principalScopeOverridesTableId: true, + usersTableId: true, + sessionsTableId: true, + sessionCredentialsTableId: true, + auditsTableId: true, + principalsTableName: true, + createPrincipalFunction: true, + deletePrincipalFunction: true, + createOrgPrincipalFunction: true, + deleteOrgPrincipalFunction: true, + createOrgApiKeyFunction: true, + revokeOrgApiKeyFunction: true, + apiName: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to create record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleUpdate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + }, + { + type: 'text', + name: 'schemaId', + message: 'schemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'principalsTableId', + message: 'principalsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'principalEntitiesTableId', + message: 'principalEntitiesTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'principalScopeOverridesTableId', + message: 'principalScopeOverridesTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'usersTableId', + message: 'usersTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'sessionsTableId', + message: 'sessionsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'sessionCredentialsTableId', + message: 'sessionCredentialsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'auditsTableId', + message: 'auditsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'principalsTableName', + message: 'principalsTableName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'createPrincipalFunction', + message: 'createPrincipalFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'deletePrincipalFunction', + message: 'deletePrincipalFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'createOrgPrincipalFunction', + message: 'createOrgPrincipalFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'deleteOrgPrincipalFunction', + message: 'deleteOrgPrincipalFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'createOrgApiKeyFunction', + message: 'createOrgApiKeyFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'revokeOrgApiKeyFunction', + message: 'revokeOrgApiKeyFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'apiName', + message: 'apiName', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as PrincipalAuthModulePatch; + const client = getClient(); + const result = await client.principalAuthModule + .update({ + where: { + id: answers.id as string, + }, + data: { + databaseId: cleanedData.databaseId, + schemaId: cleanedData.schemaId, + principalsTableId: cleanedData.principalsTableId, + principalEntitiesTableId: cleanedData.principalEntitiesTableId, + principalScopeOverridesTableId: cleanedData.principalScopeOverridesTableId, + usersTableId: cleanedData.usersTableId, + sessionsTableId: cleanedData.sessionsTableId, + sessionCredentialsTableId: cleanedData.sessionCredentialsTableId, + auditsTableId: cleanedData.auditsTableId, + principalsTableName: cleanedData.principalsTableName, + createPrincipalFunction: cleanedData.createPrincipalFunction, + deletePrincipalFunction: cleanedData.deletePrincipalFunction, + createOrgPrincipalFunction: cleanedData.createOrgPrincipalFunction, + deleteOrgPrincipalFunction: cleanedData.deleteOrgPrincipalFunction, + createOrgApiKeyFunction: cleanedData.createOrgApiKeyFunction, + revokeOrgApiKeyFunction: cleanedData.revokeOrgApiKeyFunction, + apiName: cleanedData.apiName, + }, + select: { + id: true, + databaseId: true, + schemaId: true, + principalsTableId: true, + principalEntitiesTableId: true, + principalScopeOverridesTableId: true, + usersTableId: true, + sessionsTableId: true, + sessionCredentialsTableId: true, + auditsTableId: true, + principalsTableName: true, + createPrincipalFunction: true, + deletePrincipalFunction: true, + createOrgPrincipalFunction: true, + deleteOrgPrincipalFunction: true, + createOrgApiKeyFunction: true, + revokeOrgApiKeyFunction: true, + apiName: 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.principalAuthModule + .delete({ + where: { + id: answers.id as string, + }, + select: { + id: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to delete record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} diff --git a/sdk/constructive-cli/src/modules/cli/commands/resource-module.ts b/sdk/constructive-cli/src/modules/cli/commands/resource-module.ts new file mode 100644 index 0000000000..c42905f6fb --- /dev/null +++ b/sdk/constructive-cli/src/modules/cli/commands/resource-module.ts @@ -0,0 +1,625 @@ +/** + * CLI commands for ResourceModule + * @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 { + CreateResourceModuleInput, + ResourceModulePatch, + ResourceModuleSelect, + ResourceModuleFilter, + ResourceModuleOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + databaseId: 'uuid', + schemaId: 'uuid', + privateSchemaId: 'uuid', + publicSchemaName: 'string', + privateSchemaName: 'string', + resourcesTableId: 'uuid', + resourceEventsTableId: 'uuid', + resourcesTableName: 'string', + resourceEventsTableName: 'string', + apiName: 'string', + privateApiName: 'string', + scope: 'string', + prefix: 'string', + entityTableId: 'uuid', + namespaceModuleId: 'uuid', + policies: 'json', + provisions: 'json', + defaultPermissions: 'string', +}; +const usage = + '\nresource-module \n\nCommands:\n list List resourceModule records\n find-first Find first matching resourceModule record\n get Get a resourceModule by ID\n create Create a new resourceModule\n update Update an existing resourceModule\n delete Delete a resourceModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; +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 = { + id: true, + databaseId: true, + schemaId: true, + privateSchemaId: true, + publicSchemaName: true, + privateSchemaName: true, + resourcesTableId: true, + resourceEventsTableId: true, + resourcesTableName: true, + resourceEventsTableName: true, + apiName: true, + privateApiName: true, + scope: true, + prefix: true, + entityTableId: true, + namespaceModuleId: true, + policies: true, + provisions: true, + defaultPermissions: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs & { + select: ResourceModuleSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.resourceModule.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 = { + id: true, + databaseId: true, + schemaId: true, + privateSchemaId: true, + publicSchemaName: true, + privateSchemaName: true, + resourcesTableId: true, + resourceEventsTableId: true, + resourcesTableName: true, + resourceEventsTableName: true, + apiName: true, + privateApiName: true, + scope: true, + prefix: true, + entityTableId: true, + namespaceModuleId: true, + policies: true, + provisions: true, + defaultPermissions: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: ResourceModuleSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.resourceModule.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.resourceModule + .findOne({ + id: answers.id as string, + select: { + id: true, + databaseId: true, + schemaId: true, + privateSchemaId: true, + publicSchemaName: true, + privateSchemaName: true, + resourcesTableId: true, + resourceEventsTableId: true, + resourcesTableName: true, + resourceEventsTableName: true, + apiName: true, + privateApiName: true, + scope: true, + prefix: true, + entityTableId: true, + namespaceModuleId: true, + policies: true, + provisions: true, + defaultPermissions: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Record not found.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: true, + }, + { + type: 'text', + name: 'schemaId', + message: 'schemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'privateSchemaId', + message: 'privateSchemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'publicSchemaName', + message: 'publicSchemaName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'privateSchemaName', + message: 'privateSchemaName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'resourcesTableId', + message: 'resourcesTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'resourceEventsTableId', + message: 'resourceEventsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'resourcesTableName', + message: 'resourcesTableName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'resourceEventsTableName', + message: 'resourceEventsTableName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'apiName', + message: 'apiName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'privateApiName', + message: 'privateApiName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'scope', + message: 'scope', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'prefix', + message: 'prefix', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'entityTableId', + message: 'entityTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'namespaceModuleId', + message: 'namespaceModuleId', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'policies', + message: 'policies', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'provisions', + message: 'provisions', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'defaultPermissions', + message: 'defaultPermissions', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreateResourceModuleInput['resourceModule']; + const client = getClient(); + const result = await client.resourceModule + .create({ + data: { + databaseId: cleanedData.databaseId, + schemaId: cleanedData.schemaId, + privateSchemaId: cleanedData.privateSchemaId, + publicSchemaName: cleanedData.publicSchemaName, + privateSchemaName: cleanedData.privateSchemaName, + resourcesTableId: cleanedData.resourcesTableId, + resourceEventsTableId: cleanedData.resourceEventsTableId, + resourcesTableName: cleanedData.resourcesTableName, + resourceEventsTableName: cleanedData.resourceEventsTableName, + apiName: cleanedData.apiName, + privateApiName: cleanedData.privateApiName, + scope: cleanedData.scope, + prefix: cleanedData.prefix, + entityTableId: cleanedData.entityTableId, + namespaceModuleId: cleanedData.namespaceModuleId, + policies: cleanedData.policies, + provisions: cleanedData.provisions, + defaultPermissions: cleanedData.defaultPermissions, + }, + select: { + id: true, + databaseId: true, + schemaId: true, + privateSchemaId: true, + publicSchemaName: true, + privateSchemaName: true, + resourcesTableId: true, + resourceEventsTableId: true, + resourcesTableName: true, + resourceEventsTableName: true, + apiName: true, + privateApiName: true, + scope: true, + prefix: true, + entityTableId: true, + namespaceModuleId: true, + policies: true, + provisions: true, + defaultPermissions: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to create record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleUpdate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + }, + { + type: 'text', + name: 'schemaId', + message: 'schemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'privateSchemaId', + message: 'privateSchemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'publicSchemaName', + message: 'publicSchemaName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'privateSchemaName', + message: 'privateSchemaName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'resourcesTableId', + message: 'resourcesTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'resourceEventsTableId', + message: 'resourceEventsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'resourcesTableName', + message: 'resourcesTableName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'resourceEventsTableName', + message: 'resourceEventsTableName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'apiName', + message: 'apiName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'privateApiName', + message: 'privateApiName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'scope', + message: 'scope', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'prefix', + message: 'prefix', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'entityTableId', + message: 'entityTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'namespaceModuleId', + message: 'namespaceModuleId', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'policies', + message: 'policies', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'provisions', + message: 'provisions', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'defaultPermissions', + message: 'defaultPermissions', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as ResourceModulePatch; + const client = getClient(); + const result = await client.resourceModule + .update({ + where: { + id: answers.id as string, + }, + data: { + databaseId: cleanedData.databaseId, + schemaId: cleanedData.schemaId, + privateSchemaId: cleanedData.privateSchemaId, + publicSchemaName: cleanedData.publicSchemaName, + privateSchemaName: cleanedData.privateSchemaName, + resourcesTableId: cleanedData.resourcesTableId, + resourceEventsTableId: cleanedData.resourceEventsTableId, + resourcesTableName: cleanedData.resourcesTableName, + resourceEventsTableName: cleanedData.resourceEventsTableName, + apiName: cleanedData.apiName, + privateApiName: cleanedData.privateApiName, + scope: cleanedData.scope, + prefix: cleanedData.prefix, + entityTableId: cleanedData.entityTableId, + namespaceModuleId: cleanedData.namespaceModuleId, + policies: cleanedData.policies, + provisions: cleanedData.provisions, + defaultPermissions: cleanedData.defaultPermissions, + }, + select: { + id: true, + databaseId: true, + schemaId: true, + privateSchemaId: true, + publicSchemaName: true, + privateSchemaName: true, + resourcesTableId: true, + resourceEventsTableId: true, + resourcesTableName: true, + resourceEventsTableName: true, + apiName: true, + privateApiName: true, + scope: true, + prefix: true, + entityTableId: true, + namespaceModuleId: true, + policies: true, + provisions: true, + defaultPermissions: 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.resourceModule + .delete({ + where: { + id: answers.id as string, + }, + select: { + id: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to delete record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} diff --git a/sdk/constructive-cli/src/modules/orm/README.md b/sdk/constructive-cli/src/modules/orm/README.md index 495d56755f..90e60f2bd9 100644 --- a/sdk/constructive-cli/src/modules/orm/README.md +++ b/sdk/constructive-cli/src/modules/orm/README.md @@ -47,19 +47,21 @@ const db = createClient({ | `cryptoAuthModule` | findMany, findOne, create, update, delete | | `sessionsModule` | findMany, findOne, create, update, delete | | `secureTableProvision` | findMany, findOne, create, update, delete | -| `merkleStoreModule` | findMany, findOne, create, update, delete | -| `graphModule` | findMany, findOne, create, update, delete | | `databaseProvisionModule` | findMany, findOne, create, update, delete | | `configSecretsModule` | findMany, findOne, create, update, delete | +| `graphModule` | findMany, findOne, create, update, delete | +| `merkleStoreModule` | findMany, findOne, create, update, delete | | `rateLimitMetersModule` | findMany, findOne, create, update, delete | | `realtimeModule` | findMany, findOne, create, update, delete | | `webauthnAuthModule` | findMany, findOne, create, update, delete | | `functionInvocationModule` | findMany, findOne, create, update, delete | | `functionModule` | findMany, findOne, create, update, delete | | `invitesModule` | findMany, findOne, create, update, delete | +| `principalAuthModule` | findMany, findOne, create, update, delete | | `computeLogModule` | findMany, findOne, create, update, delete | | `inferenceLogModule` | findMany, findOne, create, update, delete | | `namespaceModule` | findMany, findOne, create, update, delete | +| `resourceModule` | findMany, findOne, create, update, delete | | `storageLogModule` | findMany, findOne, create, update, delete | | `transferLogModule` | findMany, findOne, create, update, delete | | `functionDeploymentModule` | findMany, findOne, create, update, delete | @@ -1053,53 +1055,51 @@ const updated = await db.secureTableProvision.update({ where: { id: '' }, const deleted = await db.secureTableProvision.delete({ where: { id: '' } }).execute(); ``` -### `db.merkleStoreModule` +### `db.databaseProvisionModule` -CRUD operations for MerkleStoreModule records. +CRUD operations for DatabaseProvisionModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | +| `databaseName` | String | Yes | +| `ownerId` | UUID | Yes | +| `subdomain` | String | Yes | +| `domain` | String | Yes | +| `modules` | JSON | Yes | +| `options` | JSON | Yes | +| `bootstrapUser` | Boolean | Yes | +| `status` | String | Yes | +| `errorMessage` | String | Yes | | `databaseId` | UUID | Yes | -| `schemaId` | UUID | Yes | -| `privateSchemaId` | UUID | Yes | -| `publicSchemaName` | String | Yes | -| `privateSchemaName` | String | Yes | -| `objectTableId` | UUID | Yes | -| `storeTableId` | UUID | Yes | -| `commitTableId` | UUID | Yes | -| `refTableId` | UUID | Yes | -| `prefix` | String | Yes | -| `apiName` | String | Yes | -| `privateApiName` | String | Yes | -| `scope` | String | Yes | -| `functionPrefix` | String | Yes | | `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `completedAt` | Datetime | Yes | **Operations:** ```typescript -// List all merkleStoreModule records -const items = await db.merkleStoreModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, createdAt: true } }).execute(); +// List all databaseProvisionModule records +const items = await db.databaseProvisionModule.findMany({ select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); // Get one by id -const item = await db.merkleStoreModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, createdAt: true } }).execute(); +const item = await db.databaseProvisionModule.findOne({ id: '', select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); // Create -const created = await db.merkleStoreModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '' }, select: { id: true } }).execute(); +const created = await db.databaseProvisionModule.create({ data: { databaseName: '', ownerId: '', subdomain: '', domain: '', modules: '', options: '', bootstrapUser: '', status: '', errorMessage: '', databaseId: '', completedAt: '' }, select: { id: true } }).execute(); // Update -const updated = await db.merkleStoreModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.databaseProvisionModule.update({ where: { id: '' }, data: { databaseName: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.merkleStoreModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.databaseProvisionModule.delete({ where: { id: '' } }).execute(); ``` -### `db.graphModule` +### `db.configSecretsModule` -CRUD operations for GraphModule records. +CRUD operations for ConfigSecretsModule records. **Fields:** @@ -1107,86 +1107,89 @@ CRUD operations for GraphModule records. |-------|------|----------| | `id` | UUID | No | | `databaseId` | UUID | Yes | -| `publicSchemaId` | UUID | Yes | +| `schemaId` | UUID | Yes | | `privateSchemaId` | UUID | Yes | | `publicSchemaName` | String | Yes | | `privateSchemaName` | String | Yes | -| `scope` | String | Yes | -| `prefix` | String | Yes | -| `merkleStoreModuleId` | UUID | Yes | -| `graphsTableId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `configDefinitionsTableId` | UUID | Yes | +| `tableName` | String | Yes | | `apiName` | String | Yes | | `privateApiName` | String | Yes | +| `scope` | String | Yes | +| `prefix` | String | Yes | | `entityTableId` | UUID | Yes | | `policies` | JSON | Yes | | `provisions` | JSON | Yes | -| `defaultPermissions` | String | Yes | -| `createdAt` | Datetime | No | +| `hasConfig` | Boolean | Yes | **Operations:** ```typescript -// List all graphModule records -const items = await db.graphModule.findMany({ select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); +// List all configSecretsModule records +const items = await db.configSecretsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); // Get one by id -const item = await db.graphModule.findOne({ id: '', select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); +const item = await db.configSecretsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); // Create -const created = await db.graphModule.create({ data: { databaseId: '', publicSchemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', scope: '', prefix: '', merkleStoreModuleId: '', graphsTableId: '', apiName: '', privateApiName: '', entityTableId: '', policies: '', provisions: '', defaultPermissions: '' }, select: { id: true } }).execute(); +const created = await db.configSecretsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', tableId: '', configDefinitionsTableId: '', tableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', policies: '', provisions: '', hasConfig: '' }, select: { id: true } }).execute(); // Update -const updated = await db.graphModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.configSecretsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.graphModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.configSecretsModule.delete({ where: { id: '' } }).execute(); ``` -### `db.databaseProvisionModule` +### `db.graphModule` -CRUD operations for DatabaseProvisionModule records. +CRUD operations for GraphModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | -| `databaseName` | String | Yes | -| `ownerId` | UUID | Yes | -| `subdomain` | String | Yes | -| `domain` | String | Yes | -| `modules` | JSON | Yes | -| `options` | JSON | Yes | -| `bootstrapUser` | Boolean | Yes | -| `status` | String | Yes | -| `errorMessage` | String | Yes | | `databaseId` | UUID | Yes | +| `publicSchemaId` | UUID | Yes | +| `privateSchemaId` | UUID | Yes | +| `publicSchemaName` | String | Yes | +| `privateSchemaName` | String | Yes | +| `scope` | String | Yes | +| `prefix` | String | Yes | +| `merkleStoreModuleId` | UUID | Yes | +| `graphsTableId` | UUID | Yes | +| `apiName` | String | Yes | +| `privateApiName` | String | Yes | +| `entityTableId` | UUID | Yes | +| `policies` | JSON | Yes | +| `provisions` | JSON | Yes | +| `defaultPermissions` | String | Yes | | `createdAt` | Datetime | No | -| `updatedAt` | Datetime | No | -| `completedAt` | Datetime | Yes | **Operations:** ```typescript -// List all databaseProvisionModule records -const items = await db.databaseProvisionModule.findMany({ select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); +// List all graphModule records +const items = await db.graphModule.findMany({ select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); // Get one by id -const item = await db.databaseProvisionModule.findOne({ id: '', select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); +const item = await db.graphModule.findOne({ id: '', select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); // Create -const created = await db.databaseProvisionModule.create({ data: { databaseName: '', ownerId: '', subdomain: '', domain: '', modules: '', options: '', bootstrapUser: '', status: '', errorMessage: '', databaseId: '', completedAt: '' }, select: { id: true } }).execute(); +const created = await db.graphModule.create({ data: { databaseId: '', publicSchemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', scope: '', prefix: '', merkleStoreModuleId: '', graphsTableId: '', apiName: '', privateApiName: '', entityTableId: '', policies: '', provisions: '', defaultPermissions: '' }, select: { id: true } }).execute(); // Update -const updated = await db.databaseProvisionModule.update({ where: { id: '' }, data: { databaseName: '' }, select: { id: true } }).execute(); +const updated = await db.graphModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.databaseProvisionModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.graphModule.delete({ where: { id: '' } }).execute(); ``` -### `db.configSecretsModule` +### `db.merkleStoreModule` -CRUD operations for ConfigSecretsModule records. +CRUD operations for MerkleStoreModule records. **Fields:** @@ -1198,35 +1201,35 @@ CRUD operations for ConfigSecretsModule records. | `privateSchemaId` | UUID | Yes | | `publicSchemaName` | String | Yes | | `privateSchemaName` | String | Yes | -| `tableId` | UUID | Yes | -| `configDefinitionsTableId` | UUID | Yes | -| `tableName` | String | Yes | +| `objectTableId` | UUID | Yes | +| `storeTableId` | UUID | Yes | +| `commitTableId` | UUID | Yes | +| `refTableId` | UUID | Yes | +| `prefix` | String | Yes | | `apiName` | String | Yes | | `privateApiName` | String | Yes | | `scope` | String | Yes | -| `prefix` | String | Yes | -| `entityTableId` | UUID | Yes | -| `policies` | JSON | Yes | -| `provisions` | JSON | Yes | -| `hasConfig` | Boolean | Yes | +| `functionPrefix` | String | Yes | +| `permissionKey` | String | Yes | +| `createdAt` | Datetime | No | **Operations:** ```typescript -// List all configSecretsModule records -const items = await db.configSecretsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); +// List all merkleStoreModule records +const items = await db.merkleStoreModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, permissionKey: true, createdAt: true } }).execute(); // Get one by id -const item = await db.configSecretsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); +const item = await db.merkleStoreModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, permissionKey: true, createdAt: true } }).execute(); // Create -const created = await db.configSecretsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', tableId: '', configDefinitionsTableId: '', tableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', policies: '', provisions: '', hasConfig: '' }, select: { id: true } }).execute(); +const created = await db.merkleStoreModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '', permissionKey: '' }, select: { id: true } }).execute(); // Update -const updated = await db.configSecretsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.merkleStoreModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.configSecretsModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.merkleStoreModule.delete({ where: { id: '' } }).execute(); ``` ### `db.rateLimitMetersModule` @@ -1498,6 +1501,52 @@ const updated = await db.invitesModule.update({ where: { id: '' }, data: { const deleted = await db.invitesModule.delete({ where: { id: '' } }).execute(); ``` +### `db.principalAuthModule` + +CRUD operations for PrincipalAuthModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `principalsTableId` | UUID | Yes | +| `principalEntitiesTableId` | UUID | Yes | +| `principalScopeOverridesTableId` | UUID | Yes | +| `usersTableId` | UUID | Yes | +| `sessionsTableId` | UUID | Yes | +| `sessionCredentialsTableId` | UUID | Yes | +| `auditsTableId` | UUID | Yes | +| `principalsTableName` | String | Yes | +| `createPrincipalFunction` | String | Yes | +| `deletePrincipalFunction` | String | Yes | +| `createOrgPrincipalFunction` | String | Yes | +| `deleteOrgPrincipalFunction` | String | Yes | +| `createOrgApiKeyFunction` | String | Yes | +| `revokeOrgApiKeyFunction` | String | Yes | +| `apiName` | String | Yes | + +**Operations:** + +```typescript +// List all principalAuthModule records +const items = await db.principalAuthModule.findMany({ select: { id: true, databaseId: true, schemaId: true, principalsTableId: true, principalEntitiesTableId: true, principalScopeOverridesTableId: true, usersTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, principalsTableName: true, createPrincipalFunction: true, deletePrincipalFunction: true, createOrgPrincipalFunction: true, deleteOrgPrincipalFunction: true, createOrgApiKeyFunction: true, revokeOrgApiKeyFunction: true, apiName: true } }).execute(); + +// Get one by id +const item = await db.principalAuthModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, principalsTableId: true, principalEntitiesTableId: true, principalScopeOverridesTableId: true, usersTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, principalsTableName: true, createPrincipalFunction: true, deletePrincipalFunction: true, createOrgPrincipalFunction: true, deleteOrgPrincipalFunction: true, createOrgApiKeyFunction: true, revokeOrgApiKeyFunction: true, apiName: true } }).execute(); + +// Create +const created = await db.principalAuthModule.create({ data: { databaseId: '', schemaId: '', principalsTableId: '', principalEntitiesTableId: '', principalScopeOverridesTableId: '', usersTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', principalsTableName: '', createPrincipalFunction: '', deletePrincipalFunction: '', createOrgPrincipalFunction: '', deleteOrgPrincipalFunction: '', createOrgApiKeyFunction: '', revokeOrgApiKeyFunction: '', apiName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.principalAuthModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.principalAuthModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.computeLogModule` CRUD operations for ComputeLogModule records. @@ -1639,6 +1688,53 @@ const updated = await db.namespaceModule.update({ where: { id: '' }, data: const deleted = await db.namespaceModule.delete({ where: { id: '' } }).execute(); ``` +### `db.resourceModule` + +CRUD operations for ResourceModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `privateSchemaId` | UUID | Yes | +| `publicSchemaName` | String | Yes | +| `privateSchemaName` | String | Yes | +| `resourcesTableId` | UUID | Yes | +| `resourceEventsTableId` | UUID | Yes | +| `resourcesTableName` | String | Yes | +| `resourceEventsTableName` | String | Yes | +| `apiName` | String | Yes | +| `privateApiName` | String | Yes | +| `scope` | String | Yes | +| `prefix` | String | Yes | +| `entityTableId` | UUID | Yes | +| `namespaceModuleId` | UUID | Yes | +| `policies` | JSON | Yes | +| `provisions` | JSON | Yes | +| `defaultPermissions` | String | Yes | + +**Operations:** + +```typescript +// List all resourceModule records +const items = await db.resourceModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, resourcesTableId: true, resourceEventsTableId: true, resourcesTableName: true, resourceEventsTableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, namespaceModuleId: true, policies: true, provisions: true, defaultPermissions: true } }).execute(); + +// Get one by id +const item = await db.resourceModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, resourcesTableId: true, resourceEventsTableId: true, resourcesTableName: true, resourceEventsTableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, namespaceModuleId: true, policies: true, provisions: true, defaultPermissions: true } }).execute(); + +// Create +const created = await db.resourceModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', resourcesTableId: '', resourceEventsTableId: '', resourcesTableName: '', resourceEventsTableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', namespaceModuleId: '', policies: '', provisions: '', defaultPermissions: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.resourceModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.resourceModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.storageLogModule` CRUD operations for StorageLogModule records. diff --git a/sdk/constructive-cli/src/modules/orm/index.ts b/sdk/constructive-cli/src/modules/orm/index.ts index 7c5a882c52..c425b183cd 100644 --- a/sdk/constructive-cli/src/modules/orm/index.ts +++ b/sdk/constructive-cli/src/modules/orm/index.ts @@ -31,19 +31,21 @@ import { BlueprintConstructionModel } from './models/blueprintConstruction'; import { CryptoAuthModuleModel } from './models/cryptoAuthModule'; import { SessionsModuleModel } from './models/sessionsModule'; import { SecureTableProvisionModel } from './models/secureTableProvision'; -import { MerkleStoreModuleModel } from './models/merkleStoreModule'; -import { GraphModuleModel } from './models/graphModule'; import { DatabaseProvisionModuleModel } from './models/databaseProvisionModule'; import { ConfigSecretsModuleModel } from './models/configSecretsModule'; +import { GraphModuleModel } from './models/graphModule'; +import { MerkleStoreModuleModel } from './models/merkleStoreModule'; import { RateLimitMetersModuleModel } from './models/rateLimitMetersModule'; import { RealtimeModuleModel } from './models/realtimeModule'; import { WebauthnAuthModuleModel } from './models/webauthnAuthModule'; import { FunctionInvocationModuleModel } from './models/functionInvocationModule'; import { FunctionModuleModel } from './models/functionModule'; import { InvitesModuleModel } from './models/invitesModule'; +import { PrincipalAuthModuleModel } from './models/principalAuthModule'; import { ComputeLogModuleModel } from './models/computeLogModule'; import { InferenceLogModuleModel } from './models/inferenceLogModule'; import { NamespaceModuleModel } from './models/namespaceModule'; +import { ResourceModuleModel } from './models/resourceModule'; import { StorageLogModuleModel } from './models/storageLogModule'; import { TransferLogModuleModel } from './models/transferLogModule'; import { FunctionDeploymentModuleModel } from './models/functionDeploymentModule'; @@ -125,19 +127,21 @@ export function createClient(config: OrmClientConfig) { cryptoAuthModule: new CryptoAuthModuleModel(client), sessionsModule: new SessionsModuleModel(client), secureTableProvision: new SecureTableProvisionModel(client), - merkleStoreModule: new MerkleStoreModuleModel(client), - graphModule: new GraphModuleModel(client), databaseProvisionModule: new DatabaseProvisionModuleModel(client), configSecretsModule: new ConfigSecretsModuleModel(client), + graphModule: new GraphModuleModel(client), + merkleStoreModule: new MerkleStoreModuleModel(client), rateLimitMetersModule: new RateLimitMetersModuleModel(client), realtimeModule: new RealtimeModuleModel(client), webauthnAuthModule: new WebauthnAuthModuleModel(client), functionInvocationModule: new FunctionInvocationModuleModel(client), functionModule: new FunctionModuleModel(client), invitesModule: new InvitesModuleModel(client), + principalAuthModule: new PrincipalAuthModuleModel(client), computeLogModule: new ComputeLogModuleModel(client), inferenceLogModule: new InferenceLogModuleModel(client), namespaceModule: new NamespaceModuleModel(client), + resourceModule: new ResourceModuleModel(client), storageLogModule: new StorageLogModuleModel(client), transferLogModule: new TransferLogModuleModel(client), functionDeploymentModule: new FunctionDeploymentModuleModel(client), diff --git a/sdk/constructive-cli/src/modules/orm/input-types.ts b/sdk/constructive-cli/src/modules/orm/input-types.ts index ddd8bf6a34..2a57e98f03 100644 --- a/sdk/constructive-cli/src/modules/orm/input-types.ts +++ b/sdk/constructive-cli/src/modules/orm/input-types.ts @@ -606,43 +606,6 @@ export interface SecureTableProvision { /** Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. */ outFields?: string[] | null; } -export interface MerkleStoreModule { - id: string; - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - objectTableId?: string | null; - storeTableId?: string | null; - commitTableId?: string | null; - refTableId?: string | null; - prefix?: string | null; - apiName?: string | null; - privateApiName?: string | null; - scope?: string | null; - functionPrefix?: string | null; - createdAt?: string | null; -} -export interface GraphModule { - id: string; - databaseId?: string | null; - publicSchemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - scope?: string | null; - prefix?: string | null; - merkleStoreModuleId?: string | null; - graphsTableId?: string | null; - apiName?: string | null; - privateApiName?: string | null; - entityTableId?: string | null; - policies?: Record | null; - provisions?: Record | null; - defaultPermissions?: string[] | null; - createdAt?: string | null; -} /** Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. */ export interface DatabaseProvisionModule { id: string; @@ -693,6 +656,44 @@ export interface ConfigSecretsModule { provisions?: Record | null; hasConfig?: boolean | null; } +export interface GraphModule { + id: string; + databaseId?: string | null; + publicSchemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + scope?: string | null; + prefix?: string | null; + merkleStoreModuleId?: string | null; + graphsTableId?: string | null; + apiName?: string | null; + privateApiName?: string | null; + entityTableId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; + createdAt?: string | null; +} +export interface MerkleStoreModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + objectTableId?: string | null; + storeTableId?: string | null; + commitTableId?: string | null; + refTableId?: string | null; + prefix?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + functionPrefix?: string | null; + permissionKey?: string | null; + createdAt?: string | null; +} export interface RateLimitMetersModule { id: string; databaseId?: string | null; @@ -806,6 +807,27 @@ export interface InvitesModule { apiName?: string | null; privateApiName?: string | null; } +/** Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. */ +export interface PrincipalAuthModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + principalsTableId?: string | null; + principalEntitiesTableId?: string | null; + principalScopeOverridesTableId?: string | null; + usersTableId?: string | null; + sessionsTableId?: string | null; + sessionCredentialsTableId?: string | null; + auditsTableId?: string | null; + principalsTableName?: string | null; + createPrincipalFunction?: string | null; + deletePrincipalFunction?: string | null; + createOrgPrincipalFunction?: string | null; + deleteOrgPrincipalFunction?: string | null; + createOrgApiKeyFunction?: string | null; + revokeOrgApiKeyFunction?: string | null; + apiName?: string | null; +} export interface ComputeLogModule { id: string; databaseId?: string | null; @@ -869,6 +891,27 @@ export interface NamespaceModule { provisions?: Record | null; defaultPermissions?: string[] | null; } +export interface ResourceModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + resourcesTableId?: string | null; + resourceEventsTableId?: string | null; + resourcesTableName?: string | null; + resourceEventsTableName?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + prefix?: string | null; + entityTableId?: string | null; + namespaceModuleId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; +} export interface StorageLogModule { id: string; databaseId?: string | null; @@ -1831,23 +1874,27 @@ export interface BlueprintConstructionRelations { export interface CryptoAuthModuleRelations {} export interface SessionsModuleRelations {} export interface SecureTableProvisionRelations {} -export interface MerkleStoreModuleRelations { - graphModules?: ConnectionResult; -} +export interface DatabaseProvisionModuleRelations {} +export interface ConfigSecretsModuleRelations {} export interface GraphModuleRelations { merkleStoreModule?: MerkleStoreModule | null; } -export interface DatabaseProvisionModuleRelations {} -export interface ConfigSecretsModuleRelations {} +export interface MerkleStoreModuleRelations { + graphModules?: ConnectionResult; +} export interface RateLimitMetersModuleRelations {} export interface RealtimeModuleRelations {} export interface WebauthnAuthModuleRelations {} export interface FunctionInvocationModuleRelations {} export interface FunctionModuleRelations {} export interface InvitesModuleRelations {} +export interface PrincipalAuthModuleRelations {} export interface ComputeLogModuleRelations {} export interface InferenceLogModuleRelations {} export interface NamespaceModuleRelations {} +export interface ResourceModuleRelations { + namespaceModule?: NamespaceModule | null; +} export interface StorageLogModuleRelations {} export interface TransferLogModuleRelations {} export interface FunctionDeploymentModuleRelations { @@ -1912,11 +1959,11 @@ export type CryptoAuthModuleWithRelations = CryptoAuthModule & CryptoAuthModuleR export type SessionsModuleWithRelations = SessionsModule & SessionsModuleRelations; export type SecureTableProvisionWithRelations = SecureTableProvision & SecureTableProvisionRelations; -export type MerkleStoreModuleWithRelations = MerkleStoreModule & MerkleStoreModuleRelations; -export type GraphModuleWithRelations = GraphModule & GraphModuleRelations; export type DatabaseProvisionModuleWithRelations = DatabaseProvisionModule & DatabaseProvisionModuleRelations; export type ConfigSecretsModuleWithRelations = ConfigSecretsModule & ConfigSecretsModuleRelations; +export type GraphModuleWithRelations = GraphModule & GraphModuleRelations; +export type MerkleStoreModuleWithRelations = MerkleStoreModule & MerkleStoreModuleRelations; export type RateLimitMetersModuleWithRelations = RateLimitMetersModule & RateLimitMetersModuleRelations; export type RealtimeModuleWithRelations = RealtimeModule & RealtimeModuleRelations; @@ -1925,9 +1972,11 @@ export type FunctionInvocationModuleWithRelations = FunctionInvocationModule & FunctionInvocationModuleRelations; export type FunctionModuleWithRelations = FunctionModule & FunctionModuleRelations; export type InvitesModuleWithRelations = InvitesModule & InvitesModuleRelations; +export type PrincipalAuthModuleWithRelations = PrincipalAuthModule & PrincipalAuthModuleRelations; export type ComputeLogModuleWithRelations = ComputeLogModule & ComputeLogModuleRelations; export type InferenceLogModuleWithRelations = InferenceLogModule & InferenceLogModuleRelations; export type NamespaceModuleWithRelations = NamespaceModule & NamespaceModuleRelations; +export type ResourceModuleWithRelations = ResourceModule & ResourceModuleRelations; export type StorageLogModuleWithRelations = StorageLogModule & StorageLogModuleRelations; export type TransferLogModuleWithRelations = TransferLogModule & TransferLogModuleRelations; export type FunctionDeploymentModuleWithRelations = FunctionDeploymentModule & @@ -2273,29 +2322,40 @@ export type SecureTableProvisionSelect = { policies?: boolean; outFields?: boolean; }; -export type MerkleStoreModuleSelect = { +export type DatabaseProvisionModuleSelect = { + id?: boolean; + databaseName?: boolean; + ownerId?: boolean; + subdomain?: boolean; + domain?: boolean; + modules?: boolean; + options?: boolean; + bootstrapUser?: boolean; + status?: boolean; + errorMessage?: boolean; + databaseId?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + completedAt?: boolean; +}; +export type ConfigSecretsModuleSelect = { id?: boolean; databaseId?: boolean; schemaId?: boolean; privateSchemaId?: boolean; publicSchemaName?: boolean; privateSchemaName?: boolean; - objectTableId?: boolean; - storeTableId?: boolean; - commitTableId?: boolean; - refTableId?: boolean; - prefix?: boolean; + tableId?: boolean; + configDefinitionsTableId?: boolean; + tableName?: boolean; apiName?: boolean; privateApiName?: boolean; scope?: boolean; - functionPrefix?: boolean; - createdAt?: boolean; - graphModules?: { - select: GraphModuleSelect; - first?: number; - filter?: GraphModuleFilter; - orderBy?: GraphModuleOrderBy[]; - }; + prefix?: boolean; + entityTableId?: boolean; + policies?: boolean; + provisions?: boolean; + hasConfig?: boolean; }; export type GraphModuleSelect = { id?: boolean; @@ -2319,40 +2379,30 @@ export type GraphModuleSelect = { select: MerkleStoreModuleSelect; }; }; -export type DatabaseProvisionModuleSelect = { - id?: boolean; - databaseName?: boolean; - ownerId?: boolean; - subdomain?: boolean; - domain?: boolean; - modules?: boolean; - options?: boolean; - bootstrapUser?: boolean; - status?: boolean; - errorMessage?: boolean; - databaseId?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - completedAt?: boolean; -}; -export type ConfigSecretsModuleSelect = { +export type MerkleStoreModuleSelect = { id?: boolean; databaseId?: boolean; schemaId?: boolean; privateSchemaId?: boolean; publicSchemaName?: boolean; privateSchemaName?: boolean; - tableId?: boolean; - configDefinitionsTableId?: boolean; - tableName?: boolean; + objectTableId?: boolean; + storeTableId?: boolean; + commitTableId?: boolean; + refTableId?: boolean; + prefix?: boolean; apiName?: boolean; privateApiName?: boolean; scope?: boolean; - prefix?: boolean; - entityTableId?: boolean; - policies?: boolean; - provisions?: boolean; - hasConfig?: boolean; + functionPrefix?: boolean; + permissionKey?: boolean; + createdAt?: boolean; + graphModules?: { + select: GraphModuleSelect; + first?: number; + filter?: GraphModuleFilter; + orderBy?: GraphModuleOrderBy[]; + }; }; export type RateLimitMetersModuleSelect = { id?: boolean; @@ -2467,6 +2517,26 @@ export type InvitesModuleSelect = { apiName?: boolean; privateApiName?: boolean; }; +export type PrincipalAuthModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + principalsTableId?: boolean; + principalEntitiesTableId?: boolean; + principalScopeOverridesTableId?: boolean; + usersTableId?: boolean; + sessionsTableId?: boolean; + sessionCredentialsTableId?: boolean; + auditsTableId?: boolean; + principalsTableName?: boolean; + createPrincipalFunction?: boolean; + deletePrincipalFunction?: boolean; + createOrgPrincipalFunction?: boolean; + deleteOrgPrincipalFunction?: boolean; + createOrgApiKeyFunction?: boolean; + revokeOrgApiKeyFunction?: boolean; + apiName?: boolean; +}; export type ComputeLogModuleSelect = { id?: boolean; databaseId?: boolean; @@ -2530,6 +2600,30 @@ export type NamespaceModuleSelect = { provisions?: boolean; defaultPermissions?: boolean; }; +export type ResourceModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + privateSchemaId?: boolean; + publicSchemaName?: boolean; + privateSchemaName?: boolean; + resourcesTableId?: boolean; + resourceEventsTableId?: boolean; + resourcesTableName?: boolean; + resourceEventsTableName?: boolean; + apiName?: boolean; + privateApiName?: boolean; + scope?: boolean; + prefix?: boolean; + entityTableId?: boolean; + namespaceModuleId?: boolean; + policies?: boolean; + provisions?: boolean; + defaultPermissions?: boolean; + namespaceModule?: { + select: NamespaceModuleSelect; + }; +}; export type StorageLogModuleSelect = { id?: boolean; databaseId?: boolean; @@ -3841,49 +3935,83 @@ export interface SecureTableProvisionFilter { /** Negates the expression. */ not?: SecureTableProvisionFilter; } -export interface MerkleStoreModuleFilter { +export interface DatabaseProvisionModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `databaseName` field. */ + databaseName?: StringFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `subdomain` field. */ + subdomain?: StringFilter; + /** Filter by the object’s `domain` field. */ + domain?: StringFilter; + /** Filter by the object’s `modules` field. */ + modules?: JSONFilter; + /** Filter by the object’s `options` field. */ + options?: JSONFilter; + /** Filter by the object’s `bootstrapUser` field. */ + bootstrapUser?: BooleanFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `errorMessage` field. */ + errorMessage?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `publicSchemaName` field. */ - publicSchemaName?: StringFilter; - /** Filter by the object’s `privateSchemaName` field. */ - privateSchemaName?: StringFilter; - /** Filter by the object’s `objectTableId` field. */ - objectTableId?: UUIDFilter; - /** Filter by the object’s `storeTableId` field. */ - storeTableId?: UUIDFilter; - /** Filter by the object’s `commitTableId` field. */ - commitTableId?: UUIDFilter; - /** Filter by the object’s `refTableId` field. */ - refTableId?: UUIDFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `completedAt` field. */ + completedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: DatabaseProvisionModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: DatabaseProvisionModuleFilter[]; + /** Negates the expression. */ + not?: DatabaseProvisionModuleFilter; +} +export interface ConfigSecretsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `configDefinitionsTableId` field. */ + configDefinitionsTableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; /** Filter by the object’s `privateApiName` field. */ privateApiName?: StringFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; - /** Filter by the object’s `functionPrefix` field. */ - functionPrefix?: StringFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `hasConfig` field. */ + hasConfig?: BooleanFilter; /** Checks for all expressions in this list. */ - and?: MerkleStoreModuleFilter[]; + and?: ConfigSecretsModuleFilter[]; /** Checks for any expressions in this list. */ - or?: MerkleStoreModuleFilter[]; + or?: ConfigSecretsModuleFilter[]; /** Negates the expression. */ - not?: MerkleStoreModuleFilter; - /** Filter by the object’s `graphModules` relation. */ - graphModules?: MerkleStoreModuleToManyGraphModuleFilter; - /** `graphModules` exist. */ - graphModulesExist?: boolean; + not?: ConfigSecretsModuleFilter; } export interface GraphModuleFilter { /** Filter by the object’s `id` field. */ @@ -3929,43 +4057,7 @@ export interface GraphModuleFilter { /** Filter by the object’s `merkleStoreModule` relation. */ merkleStoreModule?: MerkleStoreModuleFilter; } -export interface DatabaseProvisionModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseName` field. */ - databaseName?: StringFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `subdomain` field. */ - subdomain?: StringFilter; - /** Filter by the object’s `domain` field. */ - domain?: StringFilter; - /** Filter by the object’s `modules` field. */ - modules?: JSONFilter; - /** Filter by the object’s `options` field. */ - options?: JSONFilter; - /** Filter by the object’s `bootstrapUser` field. */ - bootstrapUser?: BooleanFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `errorMessage` field. */ - errorMessage?: StringFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `completedAt` field. */ - completedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: DatabaseProvisionModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: DatabaseProvisionModuleFilter[]; - /** Negates the expression. */ - not?: DatabaseProvisionModuleFilter; -} -export interface ConfigSecretsModuleFilter { +export interface MerkleStoreModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ @@ -3978,34 +4070,38 @@ export interface ConfigSecretsModuleFilter { publicSchemaName?: StringFilter; /** Filter by the object’s `privateSchemaName` field. */ privateSchemaName?: StringFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `configDefinitionsTableId` field. */ - configDefinitionsTableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; + /** Filter by the object’s `objectTableId` field. */ + objectTableId?: UUIDFilter; + /** Filter by the object’s `storeTableId` field. */ + storeTableId?: UUIDFilter; + /** Filter by the object’s `commitTableId` field. */ + commitTableId?: UUIDFilter; + /** Filter by the object’s `refTableId` field. */ + refTableId?: UUIDFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; /** Filter by the object’s `privateApiName` field. */ privateApiName?: StringFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; - /** Filter by the object’s `entityTableId` field. */ - entityTableId?: UUIDFilter; - /** Filter by the object’s `policies` field. */ - policies?: JSONFilter; - /** Filter by the object’s `provisions` field. */ - provisions?: JSONFilter; - /** Filter by the object’s `hasConfig` field. */ - hasConfig?: BooleanFilter; + /** Filter by the object’s `functionPrefix` field. */ + functionPrefix?: StringFilter; + /** Filter by the object’s `permissionKey` field. */ + permissionKey?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Checks for all expressions in this list. */ - and?: ConfigSecretsModuleFilter[]; + and?: MerkleStoreModuleFilter[]; /** Checks for any expressions in this list. */ - or?: ConfigSecretsModuleFilter[]; + or?: MerkleStoreModuleFilter[]; /** Negates the expression. */ - not?: ConfigSecretsModuleFilter; + not?: MerkleStoreModuleFilter; + /** Filter by the object’s `graphModules` relation. */ + graphModules?: MerkleStoreModuleToManyGraphModuleFilter; + /** `graphModules` exist. */ + graphModulesExist?: boolean; } export interface RateLimitMetersModuleFilter { /** Filter by the object’s `id` field. */ @@ -4257,6 +4353,50 @@ export interface InvitesModuleFilter { /** Negates the expression. */ not?: InvitesModuleFilter; } +export interface PrincipalAuthModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `principalsTableId` field. */ + principalsTableId?: UUIDFilter; + /** Filter by the object’s `principalEntitiesTableId` field. */ + principalEntitiesTableId?: UUIDFilter; + /** Filter by the object’s `principalScopeOverridesTableId` field. */ + principalScopeOverridesTableId?: UUIDFilter; + /** Filter by the object’s `usersTableId` field. */ + usersTableId?: UUIDFilter; + /** Filter by the object’s `sessionsTableId` field. */ + sessionsTableId?: UUIDFilter; + /** Filter by the object’s `sessionCredentialsTableId` field. */ + sessionCredentialsTableId?: UUIDFilter; + /** Filter by the object’s `auditsTableId` field. */ + auditsTableId?: UUIDFilter; + /** Filter by the object’s `principalsTableName` field. */ + principalsTableName?: StringFilter; + /** Filter by the object’s `createPrincipalFunction` field. */ + createPrincipalFunction?: StringFilter; + /** Filter by the object’s `deletePrincipalFunction` field. */ + deletePrincipalFunction?: StringFilter; + /** Filter by the object’s `createOrgPrincipalFunction` field. */ + createOrgPrincipalFunction?: StringFilter; + /** Filter by the object’s `deleteOrgPrincipalFunction` field. */ + deleteOrgPrincipalFunction?: StringFilter; + /** Filter by the object’s `createOrgApiKeyFunction` field. */ + createOrgApiKeyFunction?: StringFilter; + /** Filter by the object’s `revokeOrgApiKeyFunction` field. */ + revokeOrgApiKeyFunction?: StringFilter; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalAuthModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalAuthModuleFilter[]; + /** Negates the expression. */ + not?: PrincipalAuthModuleFilter; +} export interface ComputeLogModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -4395,6 +4535,56 @@ export interface NamespaceModuleFilter { /** Negates the expression. */ not?: NamespaceModuleFilter; } +export interface ResourceModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `resourcesTableId` field. */ + resourcesTableId?: UUIDFilter; + /** Filter by the object’s `resourceEventsTableId` field. */ + resourceEventsTableId?: UUIDFilter; + /** Filter by the object’s `resourcesTableName` field. */ + resourcesTableName?: StringFilter; + /** Filter by the object’s `resourceEventsTableName` field. */ + resourceEventsTableName?: StringFilter; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `namespaceModuleId` field. */ + namespaceModuleId?: UUIDFilter; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `defaultPermissions` field. */ + defaultPermissions?: StringListFilter; + /** Checks for all expressions in this list. */ + and?: ResourceModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceModuleFilter[]; + /** Negates the expression. */ + not?: ResourceModuleFilter; + /** Filter by the object’s `namespaceModule` relation. */ + namespaceModule?: NamespaceModuleFilter; + /** A related `namespaceModule` exists. */ + namespaceModuleExists?: boolean; +} export interface StorageLogModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -6248,43 +6438,39 @@ export type SecureTableProvisionOrderBy = | 'POLICIES_DESC' | 'OUT_FIELDS_ASC' | 'OUT_FIELDS_DESC'; -export type MerkleStoreModuleOrderBy = +export type DatabaseProvisionModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' + | 'DATABASE_NAME_ASC' + | 'DATABASE_NAME_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SUBDOMAIN_ASC' + | 'SUBDOMAIN_DESC' + | 'DOMAIN_ASC' + | 'DOMAIN_DESC' + | 'MODULES_ASC' + | 'MODULES_DESC' + | 'OPTIONS_ASC' + | 'OPTIONS_DESC' + | 'BOOTSTRAP_USER_ASC' + | 'BOOTSTRAP_USER_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'ERROR_MESSAGE_ASC' + | 'ERROR_MESSAGE_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'SCHEMA_ID_ASC' - | 'SCHEMA_ID_DESC' - | 'PRIVATE_SCHEMA_ID_ASC' - | 'PRIVATE_SCHEMA_ID_DESC' - | 'PUBLIC_SCHEMA_NAME_ASC' - | 'PUBLIC_SCHEMA_NAME_DESC' - | 'PRIVATE_SCHEMA_NAME_ASC' - | 'PRIVATE_SCHEMA_NAME_DESC' - | 'OBJECT_TABLE_ID_ASC' - | 'OBJECT_TABLE_ID_DESC' - | 'STORE_TABLE_ID_ASC' - | 'STORE_TABLE_ID_DESC' - | 'COMMIT_TABLE_ID_ASC' - | 'COMMIT_TABLE_ID_DESC' - | 'REF_TABLE_ID_ASC' - | 'REF_TABLE_ID_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC' - | 'API_NAME_ASC' - | 'API_NAME_DESC' - | 'PRIVATE_API_NAME_ASC' - | 'PRIVATE_API_NAME_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' - | 'FUNCTION_PREFIX_ASC' - | 'FUNCTION_PREFIX_DESC' | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC'; -export type GraphModuleOrderBy = + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'COMPLETED_AT_ASC' + | 'COMPLETED_AT_DESC'; +export type ConfigSecretsModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' @@ -6292,17 +6478,55 @@ export type GraphModuleOrderBy = | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'PUBLIC_SCHEMA_ID_ASC' - | 'PUBLIC_SCHEMA_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'PUBLIC_SCHEMA_NAME_ASC' | 'PUBLIC_SCHEMA_NAME_DESC' | 'PRIVATE_SCHEMA_NAME_ASC' | 'PRIVATE_SCHEMA_NAME_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' - | 'PREFIX_ASC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'CONFIG_DEFINITIONS_TABLE_ID_ASC' + | 'CONFIG_DEFINITIONS_TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'HAS_CONFIG_ASC' + | 'HAS_CONFIG_DESC'; +export type GraphModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'PUBLIC_SCHEMA_ID_ASC' + | 'PUBLIC_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'PREFIX_ASC' | 'PREFIX_DESC' | 'MERKLE_STORE_MODULE_ID_ASC' | 'MERKLE_STORE_MODULE_ID_DESC' @@ -6322,39 +6546,7 @@ export type GraphModuleOrderBy = | 'DEFAULT_PERMISSIONS_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC'; -export type DatabaseProvisionModuleOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'DATABASE_NAME_ASC' - | 'DATABASE_NAME_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SUBDOMAIN_ASC' - | 'SUBDOMAIN_DESC' - | 'DOMAIN_ASC' - | 'DOMAIN_DESC' - | 'MODULES_ASC' - | 'MODULES_DESC' - | 'OPTIONS_ASC' - | 'OPTIONS_DESC' - | 'BOOTSTRAP_USER_ASC' - | 'BOOTSTRAP_USER_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'ERROR_MESSAGE_ASC' - | 'ERROR_MESSAGE_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'COMPLETED_AT_ASC' - | 'COMPLETED_AT_DESC'; -export type ConfigSecretsModuleOrderBy = +export type MerkleStoreModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' @@ -6370,28 +6562,28 @@ export type ConfigSecretsModuleOrderBy = | 'PUBLIC_SCHEMA_NAME_DESC' | 'PRIVATE_SCHEMA_NAME_ASC' | 'PRIVATE_SCHEMA_NAME_DESC' - | 'TABLE_ID_ASC' - | 'TABLE_ID_DESC' - | 'CONFIG_DEFINITIONS_TABLE_ID_ASC' - | 'CONFIG_DEFINITIONS_TABLE_ID_DESC' - | 'TABLE_NAME_ASC' - | 'TABLE_NAME_DESC' + | 'OBJECT_TABLE_ID_ASC' + | 'OBJECT_TABLE_ID_DESC' + | 'STORE_TABLE_ID_ASC' + | 'STORE_TABLE_ID_DESC' + | 'COMMIT_TABLE_ID_ASC' + | 'COMMIT_TABLE_ID_DESC' + | 'REF_TABLE_ID_ASC' + | 'REF_TABLE_ID_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' | 'API_NAME_ASC' | 'API_NAME_DESC' | 'PRIVATE_API_NAME_ASC' | 'PRIVATE_API_NAME_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC' - | 'ENTITY_TABLE_ID_ASC' - | 'ENTITY_TABLE_ID_DESC' - | 'POLICIES_ASC' - | 'POLICIES_DESC' - | 'PROVISIONS_ASC' - | 'PROVISIONS_DESC' - | 'HAS_CONFIG_ASC' - | 'HAS_CONFIG_DESC'; + | 'FUNCTION_PREFIX_ASC' + | 'FUNCTION_PREFIX_DESC' + | 'PERMISSION_KEY_ASC' + | 'PERMISSION_KEY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC'; export type RateLimitMetersModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -6618,6 +6810,46 @@ export type InvitesModuleOrderBy = | 'API_NAME_DESC' | 'PRIVATE_API_NAME_ASC' | 'PRIVATE_API_NAME_DESC'; +export type PrincipalAuthModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRINCIPALS_TABLE_ID_ASC' + | 'PRINCIPALS_TABLE_ID_DESC' + | 'PRINCIPAL_ENTITIES_TABLE_ID_ASC' + | 'PRINCIPAL_ENTITIES_TABLE_ID_DESC' + | 'PRINCIPAL_SCOPE_OVERRIDES_TABLE_ID_ASC' + | 'PRINCIPAL_SCOPE_OVERRIDES_TABLE_ID_DESC' + | 'USERS_TABLE_ID_ASC' + | 'USERS_TABLE_ID_DESC' + | 'SESSIONS_TABLE_ID_ASC' + | 'SESSIONS_TABLE_ID_DESC' + | 'SESSION_CREDENTIALS_TABLE_ID_ASC' + | 'SESSION_CREDENTIALS_TABLE_ID_DESC' + | 'AUDITS_TABLE_ID_ASC' + | 'AUDITS_TABLE_ID_DESC' + | 'PRINCIPALS_TABLE_NAME_ASC' + | 'PRINCIPALS_TABLE_NAME_DESC' + | 'CREATE_PRINCIPAL_FUNCTION_ASC' + | 'CREATE_PRINCIPAL_FUNCTION_DESC' + | 'DELETE_PRINCIPAL_FUNCTION_ASC' + | 'DELETE_PRINCIPAL_FUNCTION_DESC' + | 'CREATE_ORG_PRINCIPAL_FUNCTION_ASC' + | 'CREATE_ORG_PRINCIPAL_FUNCTION_DESC' + | 'DELETE_ORG_PRINCIPAL_FUNCTION_ASC' + | 'DELETE_ORG_PRINCIPAL_FUNCTION_DESC' + | 'CREATE_ORG_API_KEY_FUNCTION_ASC' + | 'CREATE_ORG_API_KEY_FUNCTION_DESC' + | 'REVOKE_ORG_API_KEY_FUNCTION_ASC' + | 'REVOKE_ORG_API_KEY_FUNCTION_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC'; export type ComputeLogModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -6744,6 +6976,48 @@ export type NamespaceModuleOrderBy = | 'PROVISIONS_DESC' | 'DEFAULT_PERMISSIONS_ASC' | 'DEFAULT_PERMISSIONS_DESC'; +export type ResourceModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'RESOURCES_TABLE_ID_ASC' + | 'RESOURCES_TABLE_ID_DESC' + | 'RESOURCE_EVENTS_TABLE_ID_ASC' + | 'RESOURCE_EVENTS_TABLE_ID_DESC' + | 'RESOURCES_TABLE_NAME_ASC' + | 'RESOURCES_TABLE_NAME_DESC' + | 'RESOURCE_EVENTS_TABLE_NAME_ASC' + | 'RESOURCE_EVENTS_TABLE_NAME_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'NAMESPACE_MODULE_ID_ASC' + | 'NAMESPACE_MODULE_ID_DESC' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'DEFAULT_PERMISSIONS_ASC' + | 'DEFAULT_PERMISSIONS_DESC'; export type StorageLogModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -8755,96 +9029,6 @@ export interface DeleteSecureTableProvisionInput { clientMutationId?: string; id: string; } -export interface CreateMerkleStoreModuleInput { - clientMutationId?: string; - merkleStoreModule: { - databaseId: string; - schemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - objectTableId?: string; - storeTableId?: string; - commitTableId?: string; - refTableId?: string; - prefix?: string; - apiName?: string; - privateApiName?: string; - scope?: string; - functionPrefix?: string; - }; -} -export interface MerkleStoreModulePatch { - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - objectTableId?: string | null; - storeTableId?: string | null; - commitTableId?: string | null; - refTableId?: string | null; - prefix?: string | null; - apiName?: string | null; - privateApiName?: string | null; - scope?: string | null; - functionPrefix?: string | null; -} -export interface UpdateMerkleStoreModuleInput { - clientMutationId?: string; - id: string; - merkleStoreModulePatch: MerkleStoreModulePatch; -} -export interface DeleteMerkleStoreModuleInput { - clientMutationId?: string; - id: string; -} -export interface CreateGraphModuleInput { - clientMutationId?: string; - graphModule: { - databaseId: string; - publicSchemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - scope?: string; - prefix?: string; - merkleStoreModuleId: string; - graphsTableId?: string; - apiName?: string; - privateApiName?: string; - entityTableId?: string; - policies?: Record; - provisions?: Record; - defaultPermissions?: string[]; - }; -} -export interface GraphModulePatch { - databaseId?: string | null; - publicSchemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - scope?: string | null; - prefix?: string | null; - merkleStoreModuleId?: string | null; - graphsTableId?: string | null; - apiName?: string | null; - privateApiName?: string | null; - entityTableId?: string | null; - policies?: Record | null; - provisions?: Record | null; - defaultPermissions?: string[] | null; -} -export interface UpdateGraphModuleInput { - clientMutationId?: string; - id: string; - graphModulePatch: GraphModulePatch; -} -export interface DeleteGraphModuleInput { - clientMutationId?: string; - id: string; -} export interface CreateDatabaseProvisionModuleInput { clientMutationId?: string; databaseProvisionModule: { @@ -8931,17 +9115,109 @@ export interface DeleteConfigSecretsModuleInput { clientMutationId?: string; id: string; } -export interface CreateRateLimitMetersModuleInput { +export interface CreateGraphModuleInput { clientMutationId?: string; - rateLimitMetersModule: { + graphModule: { databaseId: string; - schemaId?: string; + publicSchemaId?: string; privateSchemaId?: string; publicSchemaName?: string; privateSchemaName?: string; - rateLimitStateTableId?: string; - rateLimitStateTableName?: string; - rateLimitOverridesTableId?: string; + scope?: string; + prefix?: string; + merkleStoreModuleId: string; + graphsTableId?: string; + apiName?: string; + privateApiName?: string; + entityTableId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; + }; +} +export interface GraphModulePatch { + databaseId?: string | null; + publicSchemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + scope?: string | null; + prefix?: string | null; + merkleStoreModuleId?: string | null; + graphsTableId?: string | null; + apiName?: string | null; + privateApiName?: string | null; + entityTableId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; +} +export interface UpdateGraphModuleInput { + clientMutationId?: string; + id: string; + graphModulePatch: GraphModulePatch; +} +export interface DeleteGraphModuleInput { + clientMutationId?: string; + id: string; +} +export interface CreateMerkleStoreModuleInput { + clientMutationId?: string; + merkleStoreModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + objectTableId?: string; + storeTableId?: string; + commitTableId?: string; + refTableId?: string; + prefix?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + functionPrefix?: string; + permissionKey?: string; + }; +} +export interface MerkleStoreModulePatch { + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + objectTableId?: string | null; + storeTableId?: string | null; + commitTableId?: string | null; + refTableId?: string | null; + prefix?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + functionPrefix?: string | null; + permissionKey?: string | null; +} +export interface UpdateMerkleStoreModuleInput { + clientMutationId?: string; + id: string; + merkleStoreModulePatch: MerkleStoreModulePatch; +} +export interface DeleteMerkleStoreModuleInput { + clientMutationId?: string; + id: string; +} +export interface CreateRateLimitMetersModuleInput { + clientMutationId?: string; + rateLimitMetersModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + rateLimitStateTableId?: string; + rateLimitStateTableName?: string; + rateLimitOverridesTableId?: string; rateLimitOverridesTableName?: string; rateWindowLimitsTableId?: string; rateWindowLimitsTableName?: string; @@ -9217,6 +9493,56 @@ export interface DeleteInvitesModuleInput { clientMutationId?: string; id: string; } +export interface CreatePrincipalAuthModuleInput { + clientMutationId?: string; + principalAuthModule: { + databaseId: string; + schemaId?: string; + principalsTableId?: string; + principalEntitiesTableId?: string; + principalScopeOverridesTableId?: string; + usersTableId?: string; + sessionsTableId?: string; + sessionCredentialsTableId?: string; + auditsTableId?: string; + principalsTableName?: string; + createPrincipalFunction?: string; + deletePrincipalFunction?: string; + createOrgPrincipalFunction?: string; + deleteOrgPrincipalFunction?: string; + createOrgApiKeyFunction?: string; + revokeOrgApiKeyFunction?: string; + apiName?: string; + }; +} +export interface PrincipalAuthModulePatch { + databaseId?: string | null; + schemaId?: string | null; + principalsTableId?: string | null; + principalEntitiesTableId?: string | null; + principalScopeOverridesTableId?: string | null; + usersTableId?: string | null; + sessionsTableId?: string | null; + sessionCredentialsTableId?: string | null; + auditsTableId?: string | null; + principalsTableName?: string | null; + createPrincipalFunction?: string | null; + deletePrincipalFunction?: string | null; + createOrgPrincipalFunction?: string | null; + deleteOrgPrincipalFunction?: string | null; + createOrgApiKeyFunction?: string | null; + revokeOrgApiKeyFunction?: string | null; + apiName?: string | null; +} +export interface UpdatePrincipalAuthModuleInput { + clientMutationId?: string; + id: string; + principalAuthModulePatch: PrincipalAuthModulePatch; +} +export interface DeletePrincipalAuthModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateComputeLogModuleInput { clientMutationId?: string; computeLogModule: { @@ -9373,6 +9699,58 @@ export interface DeleteNamespaceModuleInput { clientMutationId?: string; id: string; } +export interface CreateResourceModuleInput { + clientMutationId?: string; + resourceModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + resourcesTableId?: string; + resourceEventsTableId?: string; + resourcesTableName?: string; + resourceEventsTableName?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + prefix?: string; + entityTableId?: string; + namespaceModuleId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; + }; +} +export interface ResourceModulePatch { + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + resourcesTableId?: string | null; + resourceEventsTableId?: string | null; + resourcesTableName?: string | null; + resourceEventsTableName?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + prefix?: string | null; + entityTableId?: string | null; + namespaceModuleId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; +} +export interface UpdateResourceModuleInput { + clientMutationId?: string; + id: string; + resourceModulePatch: ResourceModulePatch; +} +export interface DeleteResourceModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateStorageLogModuleInput { clientMutationId?: string; storageLogModule: { @@ -11348,45 +11726,6 @@ export interface SecureTableProvisionInput { /** Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. */ outFields?: string[]; } -/** An input for mutations affecting `MerkleStoreModule` */ -export interface MerkleStoreModuleInput { - id?: string; - databaseId: string; - schemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - objectTableId?: string; - storeTableId?: string; - commitTableId?: string; - refTableId?: string; - prefix?: string; - apiName?: string; - privateApiName?: string; - scope?: string; - functionPrefix?: string; - createdAt?: string; -} -/** An input for mutations affecting `GraphModule` */ -export interface GraphModuleInput { - id?: string; - databaseId: string; - publicSchemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - scope?: string; - prefix?: string; - merkleStoreModuleId: string; - graphsTableId?: string; - apiName?: string; - privateApiName?: string; - entityTableId?: string; - policies?: Record; - provisions?: Record; - defaultPermissions?: string[]; - createdAt?: string; -} /** An input for mutations affecting `DatabaseProvisionModule` */ export interface DatabaseProvisionModuleInput { id?: string; @@ -11433,6 +11772,46 @@ export interface ConfigSecretsModuleInput { provisions?: Record; hasConfig?: boolean; } +/** An input for mutations affecting `GraphModule` */ +export interface GraphModuleInput { + id?: string; + databaseId: string; + publicSchemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + scope?: string; + prefix?: string; + merkleStoreModuleId: string; + graphsTableId?: string; + apiName?: string; + privateApiName?: string; + entityTableId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; + createdAt?: string; +} +/** An input for mutations affecting `MerkleStoreModule` */ +export interface MerkleStoreModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + objectTableId?: string; + storeTableId?: string; + commitTableId?: string; + refTableId?: string; + prefix?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + functionPrefix?: string; + permissionKey?: string; + createdAt?: string; +} /** An input for mutations affecting `RateLimitMetersModule` */ export interface RateLimitMetersModuleInput { id?: string; @@ -11552,6 +11931,27 @@ export interface InvitesModuleInput { apiName?: string; privateApiName?: string; } +/** An input for mutations affecting `PrincipalAuthModule` */ +export interface PrincipalAuthModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + principalsTableId?: string; + principalEntitiesTableId?: string; + principalScopeOverridesTableId?: string; + usersTableId?: string; + sessionsTableId?: string; + sessionCredentialsTableId?: string; + auditsTableId?: string; + principalsTableName?: string; + createPrincipalFunction?: string; + deletePrincipalFunction?: string; + createOrgPrincipalFunction?: string; + deleteOrgPrincipalFunction?: string; + createOrgApiKeyFunction?: string; + revokeOrgApiKeyFunction?: string; + apiName?: string; +} /** An input for mutations affecting `ComputeLogModule` */ export interface ComputeLogModuleInput { id?: string; @@ -11618,28 +12018,50 @@ export interface NamespaceModuleInput { provisions?: Record; defaultPermissions?: string[]; } -/** An input for mutations affecting `StorageLogModule` */ -export interface StorageLogModuleInput { +/** An input for mutations affecting `ResourceModule` */ +export interface ResourceModuleInput { id?: string; databaseId: string; schemaId?: string; privateSchemaId?: string; publicSchemaName?: string; privateSchemaName?: string; - storageLogTableId?: string; - storageLogTableName?: string; - usageDailyTableId?: string; - usageDailyTableName?: string; - interval?: string; - retention?: string; - premake?: number; - scope?: string; - actorFkTableId?: string; - entityFkTableId?: string; - prefix?: string; + resourcesTableId?: string; + resourceEventsTableId?: string; + resourcesTableName?: string; + resourceEventsTableName?: string; apiName?: string; privateApiName?: string; -} + scope?: string; + prefix?: string; + entityTableId?: string; + namespaceModuleId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; +} +/** An input for mutations affecting `StorageLogModule` */ +export interface StorageLogModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + storageLogTableId?: string; + storageLogTableName?: string; + usageDailyTableId?: string; + usageDailyTableName?: string; + interval?: string; + retention?: string; + premake?: number; + scope?: string; + actorFkTableId?: string; + entityFkTableId?: string; + prefix?: string; + apiName?: string; + privateApiName?: string; +} /** An input for mutations affecting `TransferLogModule` */ export interface TransferLogModuleInput { id?: string; @@ -12970,6 +13392,8 @@ export interface MerkleStoreModuleFilter { scope?: StringFilter; /** Filter by the object’s `functionPrefix` field. */ functionPrefix?: StringFilter; + /** Filter by the object’s `permissionKey` field. */ + permissionKey?: StringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Checks for all expressions in this list. */ @@ -14248,96 +14672,6 @@ export type DeleteSecureTableProvisionPayloadSelect = { select: SecureTableProvisionEdgeSelect; }; }; -export interface CreateMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was created by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} -export type CreateMerkleStoreModulePayloadSelect = { - clientMutationId?: boolean; - merkleStoreModule?: { - select: MerkleStoreModuleSelect; - }; - merkleStoreModuleEdge?: { - select: MerkleStoreModuleEdgeSelect; - }; -}; -export interface UpdateMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was updated by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} -export type UpdateMerkleStoreModulePayloadSelect = { - clientMutationId?: boolean; - merkleStoreModule?: { - select: MerkleStoreModuleSelect; - }; - merkleStoreModuleEdge?: { - select: MerkleStoreModuleEdgeSelect; - }; -}; -export interface DeleteMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was deleted by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} -export type DeleteMerkleStoreModulePayloadSelect = { - clientMutationId?: boolean; - merkleStoreModule?: { - select: MerkleStoreModuleSelect; - }; - merkleStoreModuleEdge?: { - select: MerkleStoreModuleEdgeSelect; - }; -}; -export interface CreateGraphModulePayload { - clientMutationId?: string | null; - /** The `GraphModule` that was created by this mutation. */ - graphModule?: GraphModule | null; - graphModuleEdge?: GraphModuleEdge | null; -} -export type CreateGraphModulePayloadSelect = { - clientMutationId?: boolean; - graphModule?: { - select: GraphModuleSelect; - }; - graphModuleEdge?: { - select: GraphModuleEdgeSelect; - }; -}; -export interface UpdateGraphModulePayload { - clientMutationId?: string | null; - /** The `GraphModule` that was updated by this mutation. */ - graphModule?: GraphModule | null; - graphModuleEdge?: GraphModuleEdge | null; -} -export type UpdateGraphModulePayloadSelect = { - clientMutationId?: boolean; - graphModule?: { - select: GraphModuleSelect; - }; - graphModuleEdge?: { - select: GraphModuleEdgeSelect; - }; -}; -export interface DeleteGraphModulePayload { - clientMutationId?: string | null; - /** The `GraphModule` that was deleted by this mutation. */ - graphModule?: GraphModule | null; - graphModuleEdge?: GraphModuleEdge | null; -} -export type DeleteGraphModulePayloadSelect = { - clientMutationId?: boolean; - graphModule?: { - select: GraphModuleSelect; - }; - graphModuleEdge?: { - select: GraphModuleEdgeSelect; - }; -}; export interface CreateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was created by this mutation. */ @@ -14428,6 +14762,96 @@ export type DeleteConfigSecretsModulePayloadSelect = { select: ConfigSecretsModuleEdgeSelect; }; }; +export interface CreateGraphModulePayload { + clientMutationId?: string | null; + /** The `GraphModule` that was created by this mutation. */ + graphModule?: GraphModule | null; + graphModuleEdge?: GraphModuleEdge | null; +} +export type CreateGraphModulePayloadSelect = { + clientMutationId?: boolean; + graphModule?: { + select: GraphModuleSelect; + }; + graphModuleEdge?: { + select: GraphModuleEdgeSelect; + }; +}; +export interface UpdateGraphModulePayload { + clientMutationId?: string | null; + /** The `GraphModule` that was updated by this mutation. */ + graphModule?: GraphModule | null; + graphModuleEdge?: GraphModuleEdge | null; +} +export type UpdateGraphModulePayloadSelect = { + clientMutationId?: boolean; + graphModule?: { + select: GraphModuleSelect; + }; + graphModuleEdge?: { + select: GraphModuleEdgeSelect; + }; +}; +export interface DeleteGraphModulePayload { + clientMutationId?: string | null; + /** The `GraphModule` that was deleted by this mutation. */ + graphModule?: GraphModule | null; + graphModuleEdge?: GraphModuleEdge | null; +} +export type DeleteGraphModulePayloadSelect = { + clientMutationId?: boolean; + graphModule?: { + select: GraphModuleSelect; + }; + graphModuleEdge?: { + select: GraphModuleEdgeSelect; + }; +}; +export interface CreateMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was created by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} +export type CreateMerkleStoreModulePayloadSelect = { + clientMutationId?: boolean; + merkleStoreModule?: { + select: MerkleStoreModuleSelect; + }; + merkleStoreModuleEdge?: { + select: MerkleStoreModuleEdgeSelect; + }; +}; +export interface UpdateMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was updated by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} +export type UpdateMerkleStoreModulePayloadSelect = { + clientMutationId?: boolean; + merkleStoreModule?: { + select: MerkleStoreModuleSelect; + }; + merkleStoreModuleEdge?: { + select: MerkleStoreModuleEdgeSelect; + }; +}; +export interface DeleteMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was deleted by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} +export type DeleteMerkleStoreModulePayloadSelect = { + clientMutationId?: boolean; + merkleStoreModule?: { + select: MerkleStoreModuleSelect; + }; + merkleStoreModuleEdge?: { + select: MerkleStoreModuleEdgeSelect; + }; +}; export interface CreateRateLimitMetersModulePayload { clientMutationId?: string | null; /** The `RateLimitMetersModule` that was created by this mutation. */ @@ -14698,6 +15122,51 @@ export type DeleteInvitesModulePayloadSelect = { select: InvitesModuleEdgeSelect; }; }; +export interface CreatePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was created by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} +export type CreatePrincipalAuthModulePayloadSelect = { + clientMutationId?: boolean; + principalAuthModule?: { + select: PrincipalAuthModuleSelect; + }; + principalAuthModuleEdge?: { + select: PrincipalAuthModuleEdgeSelect; + }; +}; +export interface UpdatePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was updated by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} +export type UpdatePrincipalAuthModulePayloadSelect = { + clientMutationId?: boolean; + principalAuthModule?: { + select: PrincipalAuthModuleSelect; + }; + principalAuthModuleEdge?: { + select: PrincipalAuthModuleEdgeSelect; + }; +}; +export interface DeletePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was deleted by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} +export type DeletePrincipalAuthModulePayloadSelect = { + clientMutationId?: boolean; + principalAuthModule?: { + select: PrincipalAuthModuleSelect; + }; + principalAuthModuleEdge?: { + select: PrincipalAuthModuleEdgeSelect; + }; +}; export interface CreateComputeLogModulePayload { clientMutationId?: string | null; /** The `ComputeLogModule` that was created by this mutation. */ @@ -14833,6 +15302,51 @@ export type DeleteNamespaceModulePayloadSelect = { select: NamespaceModuleEdgeSelect; }; }; +export interface CreateResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was created by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} +export type CreateResourceModulePayloadSelect = { + clientMutationId?: boolean; + resourceModule?: { + select: ResourceModuleSelect; + }; + resourceModuleEdge?: { + select: ResourceModuleEdgeSelect; + }; +}; +export interface UpdateResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was updated by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} +export type UpdateResourceModulePayloadSelect = { + clientMutationId?: boolean; + resourceModule?: { + select: ResourceModuleSelect; + }; + resourceModuleEdge?: { + select: ResourceModuleEdgeSelect; + }; +}; +export interface DeleteResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was deleted by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} +export type DeleteResourceModulePayloadSelect = { + clientMutationId?: boolean; + resourceModule?: { + select: ResourceModuleSelect; + }; + resourceModuleEdge?: { + select: ResourceModuleEdgeSelect; + }; +}; export interface CreateStorageLogModulePayload { clientMutationId?: string | null; /** The `StorageLogModule` that was created by this mutation. */ @@ -16065,30 +16579,6 @@ export type SecureTableProvisionEdgeSelect = { select: SecureTableProvisionSelect; }; }; -/** A `MerkleStoreModule` edge in the connection. */ -export interface MerkleStoreModuleEdge { - cursor?: string | null; - /** The `MerkleStoreModule` at the end of the edge. */ - node?: MerkleStoreModule | null; -} -export type MerkleStoreModuleEdgeSelect = { - cursor?: boolean; - node?: { - select: MerkleStoreModuleSelect; - }; -}; -/** A `GraphModule` edge in the connection. */ -export interface GraphModuleEdge { - cursor?: string | null; - /** The `GraphModule` at the end of the edge. */ - node?: GraphModule | null; -} -export type GraphModuleEdgeSelect = { - cursor?: boolean; - node?: { - select: GraphModuleSelect; - }; -}; /** A `DatabaseProvisionModule` edge in the connection. */ export interface DatabaseProvisionModuleEdge { cursor?: string | null; @@ -16113,6 +16603,30 @@ export type ConfigSecretsModuleEdgeSelect = { select: ConfigSecretsModuleSelect; }; }; +/** A `GraphModule` edge in the connection. */ +export interface GraphModuleEdge { + cursor?: string | null; + /** The `GraphModule` at the end of the edge. */ + node?: GraphModule | null; +} +export type GraphModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: GraphModuleSelect; + }; +}; +/** A `MerkleStoreModule` edge in the connection. */ +export interface MerkleStoreModuleEdge { + cursor?: string | null; + /** The `MerkleStoreModule` at the end of the edge. */ + node?: MerkleStoreModule | null; +} +export type MerkleStoreModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: MerkleStoreModuleSelect; + }; +}; /** A `RateLimitMetersModule` edge in the connection. */ export interface RateLimitMetersModuleEdge { cursor?: string | null; @@ -16185,6 +16699,18 @@ export type InvitesModuleEdgeSelect = { select: InvitesModuleSelect; }; }; +/** A `PrincipalAuthModule` edge in the connection. */ +export interface PrincipalAuthModuleEdge { + cursor?: string | null; + /** The `PrincipalAuthModule` at the end of the edge. */ + node?: PrincipalAuthModule | null; +} +export type PrincipalAuthModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: PrincipalAuthModuleSelect; + }; +}; /** A `ComputeLogModule` edge in the connection. */ export interface ComputeLogModuleEdge { cursor?: string | null; @@ -16221,6 +16747,18 @@ export type NamespaceModuleEdgeSelect = { select: NamespaceModuleSelect; }; }; +/** A `ResourceModule` edge in the connection. */ +export interface ResourceModuleEdge { + cursor?: string | null; + /** The `ResourceModule` at the end of the edge. */ + node?: ResourceModule | null; +} +export type ResourceModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: ResourceModuleSelect; + }; +}; /** A `StorageLogModule` edge in the connection. */ export interface StorageLogModuleEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/modules/orm/models/index.ts b/sdk/constructive-cli/src/modules/orm/models/index.ts index 2ff305f2fc..15e5dd1552 100644 --- a/sdk/constructive-cli/src/modules/orm/models/index.ts +++ b/sdk/constructive-cli/src/modules/orm/models/index.ts @@ -29,19 +29,21 @@ export { BlueprintConstructionModel } from './blueprintConstruction'; export { CryptoAuthModuleModel } from './cryptoAuthModule'; export { SessionsModuleModel } from './sessionsModule'; export { SecureTableProvisionModel } from './secureTableProvision'; -export { MerkleStoreModuleModel } from './merkleStoreModule'; -export { GraphModuleModel } from './graphModule'; export { DatabaseProvisionModuleModel } from './databaseProvisionModule'; export { ConfigSecretsModuleModel } from './configSecretsModule'; +export { GraphModuleModel } from './graphModule'; +export { MerkleStoreModuleModel } from './merkleStoreModule'; export { RateLimitMetersModuleModel } from './rateLimitMetersModule'; export { RealtimeModuleModel } from './realtimeModule'; export { WebauthnAuthModuleModel } from './webauthnAuthModule'; export { FunctionInvocationModuleModel } from './functionInvocationModule'; export { FunctionModuleModel } from './functionModule'; export { InvitesModuleModel } from './invitesModule'; +export { PrincipalAuthModuleModel } from './principalAuthModule'; export { ComputeLogModuleModel } from './computeLogModule'; export { InferenceLogModuleModel } from './inferenceLogModule'; export { NamespaceModuleModel } from './namespaceModule'; +export { ResourceModuleModel } from './resourceModule'; export { StorageLogModuleModel } from './storageLogModule'; export { TransferLogModuleModel } from './transferLogModule'; export { FunctionDeploymentModuleModel } from './functionDeploymentModule'; diff --git a/sdk/constructive-cli/src/modules/orm/models/principalAuthModule.ts b/sdk/constructive-cli/src/modules/orm/models/principalAuthModule.ts new file mode 100644 index 0000000000..c0e9d913d3 --- /dev/null +++ b/sdk/constructive-cli/src/modules/orm/models/principalAuthModule.ts @@ -0,0 +1,245 @@ +/** + * PrincipalAuthModule 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 { + PrincipalAuthModule, + PrincipalAuthModuleWithRelations, + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy, + CreatePrincipalAuthModuleInput, + UpdatePrincipalAuthModuleInput, + PrincipalAuthModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalAuthModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalAuthModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalAuthModule', + 'principalAuthModules', + 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, + }, + 'PrincipalAuthModuleFilter', + 'PrincipalAuthModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalAuthModule', + fieldName: 'principalAuthModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalAuthModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PrincipalAuthModule', + 'principalAuthModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalAuthModuleFilter', + 'PrincipalAuthModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalAuthModule', + fieldName: 'principalAuthModule', + document, + variables, + transform: (data: { + principalAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalAuthModule: data.principalAuthModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalAuthModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalAuthModule', + 'principalAuthModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PrincipalAuthModuleFilter', + 'PrincipalAuthModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalAuthModule', + fieldName: 'principalAuthModule', + document, + variables, + transform: (data: { + principalAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalAuthModule: data.principalAuthModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PrincipalAuthModule', + 'createPrincipalAuthModule', + 'principalAuthModule', + args.select, + args.data, + 'CreatePrincipalAuthModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalAuthModule', + fieldName: 'createPrincipalAuthModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PrincipalAuthModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PrincipalAuthModule', + 'updatePrincipalAuthModule', + 'principalAuthModule', + args.select, + args.where.id, + args.data, + 'UpdatePrincipalAuthModuleInput', + 'id', + 'principalAuthModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalAuthModule', + fieldName: 'updatePrincipalAuthModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PrincipalAuthModule', + 'deletePrincipalAuthModule', + 'principalAuthModule', + { + id: args.where.id, + }, + 'DeletePrincipalAuthModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalAuthModule', + fieldName: 'deletePrincipalAuthModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/modules/orm/models/resourceModule.ts b/sdk/constructive-cli/src/modules/orm/models/resourceModule.ts new file mode 100644 index 0000000000..8fef54a24a --- /dev/null +++ b/sdk/constructive-cli/src/modules/orm/models/resourceModule.ts @@ -0,0 +1,245 @@ +/** + * ResourceModule 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 { + ResourceModule, + ResourceModuleWithRelations, + ResourceModuleSelect, + ResourceModuleFilter, + ResourceModuleOrderBy, + CreateResourceModuleInput, + UpdateResourceModuleInput, + ResourceModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ResourceModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceModule', + 'resourceModules', + 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, + }, + 'ResourceModuleFilter', + 'ResourceModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceModule', + fieldName: 'resourceModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ResourceModule', + 'resourceModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ResourceModuleFilter', + 'ResourceModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceModule', + fieldName: 'resourceModule', + document, + variables, + transform: (data: { + resourceModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceModule: data.resourceModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceModule', + 'resourceModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ResourceModuleFilter', + 'ResourceModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceModule', + fieldName: 'resourceModule', + document, + variables, + transform: (data: { + resourceModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceModule: data.resourceModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createResourceModule: { + resourceModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ResourceModule', + 'createResourceModule', + 'resourceModule', + args.select, + args.data, + 'CreateResourceModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceModule', + fieldName: 'createResourceModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ResourceModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateResourceModule: { + resourceModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ResourceModule', + 'updateResourceModule', + 'resourceModule', + args.select, + args.where.id, + args.data, + 'UpdateResourceModuleInput', + 'id', + 'resourceModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceModule', + fieldName: 'updateResourceModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteResourceModule: { + resourceModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ResourceModule', + 'deleteResourceModule', + 'resourceModule', + { + id: args.where.id, + }, + 'DeleteResourceModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceModule', + fieldName: 'deleteResourceModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/api/hooks/README.md b/sdk/constructive-react/src/api/hooks/README.md index cf1da603cd..d97e31ec4b 100644 --- a/sdk/constructive-react/src/api/hooks/README.md +++ b/sdk/constructive-react/src/api/hooks/README.md @@ -320,20 +320,20 @@ create({ databaseId: '', schemaId: '', name: '' }); ```typescript // List all schemas const { data, isLoading } = useSchemasQuery({ - selection: { fields: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, scope: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }, }); // Get one schema const { data: item } = useSchemaQuery({ id: '', - selection: { fields: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, scope: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }, }); // Create a schema const { mutate: create } = useCreateSchemaMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', scope: '', tags: '', isPublic: '', apiExposure: '' }); +create({ databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', tags: '', isPublic: '', apiExposure: '' }); ``` ### Table @@ -341,20 +341,20 @@ create({ databaseId: '', name: '', schemaName: '', label: ```typescript // List all tables const { data, isLoading } = useTablesQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, scope: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }, }); // Get one table const { data: item } = useTableQuery({ id: '', - selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, scope: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }, }); // Create a table const { mutate: create } = useCreateTableMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', scope: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }); +create({ databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }); ``` ### CheckConstraint @@ -362,20 +362,20 @@ create({ databaseId: '', schemaId: '', name: '', label: '', - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Create a checkConstraint const { mutate: create } = useCreateCheckConstraintMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', scope: '', tags: '' }); +create({ databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', tags: '' }); ``` ### Field @@ -383,20 +383,20 @@ create({ databaseId: '', tableId: '', name: '', type: '', - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, scope: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, createdAt: true, updatedAt: true } }, }); // Create a field const { mutate: create } = useCreateFieldMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '', scope: '' }); +create({ databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '' }); ``` ### SpatialRelation @@ -404,20 +404,20 @@ create({ databaseId: '', tableId: '', name: '', label: '', - selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Create a spatialRelation const { mutate: create } = useCreateSpatialRelationMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', scope: '', tags: '' }); +create({ databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', tags: '' }); ``` ### ForeignKeyConstraint @@ -425,20 +425,20 @@ create({ databaseId: '', tableId: '', fieldId: '', refTableId: ```typescript // List all foreignKeyConstraints const { data, isLoading } = useForeignKeyConstraintsQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Get one foreignKeyConstraint const { data: item } = useForeignKeyConstraintQuery({ id: '', - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Create a foreignKeyConstraint const { mutate: create } = useCreateForeignKeyConstraintMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', scope: '', tags: '' }); +create({ databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', tags: '' }); ``` ### FullTextSearch @@ -467,20 +467,20 @@ create({ databaseId: '', tableId: '', fieldId: '', fieldIds: ' ```typescript // List all indices const { data, isLoading } = useIndicesQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Get one index const { data: item } = useIndexQuery({ id: '', - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Create a index const { mutate: create } = useCreateIndexMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', scope: '', tags: '' }); +create({ databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', tags: '' }); ``` ### Policy @@ -488,20 +488,20 @@ create({ databaseId: '', tableId: '', name: '', fieldIds: '< ```typescript // List all policies const { data, isLoading } = usePoliciesQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Get one policy const { data: item } = usePolicyQuery({ id: '', - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Create a policy const { mutate: create } = useCreatePolicyMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', scope: '', tags: '' }); +create({ databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', tags: '' }); ``` ### PrimaryKeyConstraint @@ -509,20 +509,20 @@ create({ databaseId: '', tableId: '', name: '', granteeName: ```typescript // List all primaryKeyConstraints const { data, isLoading } = usePrimaryKeyConstraintsQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Get one primaryKeyConstraint const { data: item } = usePrimaryKeyConstraintQuery({ id: '', - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Create a primaryKeyConstraint const { mutate: create } = useCreatePrimaryKeyConstraintMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', scope: '', tags: '' }); +create({ databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', tags: '' }); ``` ### TableGrant @@ -551,20 +551,20 @@ create({ databaseId: '', tableId: '', privilege: '', grantee ```typescript // List all triggers const { data, isLoading } = useTriggersQuery({ - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Get one trigger const { data: item } = useTriggerQuery({ id: '', - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Create a trigger const { mutate: create } = useCreateTriggerMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', scope: '', tags: '' }); +create({ databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', tags: '' }); ``` ### UniqueConstraint @@ -572,20 +572,20 @@ create({ databaseId: '', tableId: '', name: '', event: '', - selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, tags: true, createdAt: true, updatedAt: true } }, }); // Create a uniqueConstraint const { mutate: create } = useCreateUniqueConstraintMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', scope: '', tags: '' }); +create({ databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', tags: '' }); ``` ### View @@ -593,20 +593,20 @@ create({ databaseId: '', tableId: '', name: '', description: ```typescript // List all views const { data, isLoading } = useViewsQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, scope: true, tags: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, tags: true } }, }); // Get one view const { data: item } = useViewQuery({ id: '', - selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, scope: true, tags: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, tags: true } }, }); // Create a view const { mutate: create } = useCreateViewMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', scope: '', tags: '' }); +create({ databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', tags: '' }); ``` ### ViewTable @@ -740,20 +740,20 @@ create({ databaseId: '', schemaId: '', objectType: '', privi ```typescript // List all enums const { data, isLoading } = useEnumsQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, scope: true, tags: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, tags: true } }, }); // Get one enum const { data: item } = useEnumQuery({ id: '', - selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, scope: true, tags: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, tags: true } }, }); // Create a enum const { mutate: create } = useCreateEnumMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', scope: '', tags: '' }); +create({ databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', tags: '' }); ``` ### CompositeType @@ -761,20 +761,20 @@ create({ databaseId: '', schemaId: '', name: '', label: '', - selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, scope: true, tags: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, tags: true } }, }); // Create a compositeType const { mutate: create } = useCreateCompositeTypeMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', scope: '', tags: '' }); +create({ databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', tags: '' }); ``` ### ApiSchema @@ -824,20 +824,20 @@ create({ databaseId: '', apiId: '', name: '', data: '' ```typescript // List all domains const { data, isLoading } = useDomainsQuery({ - selection: { fields: { id: true, databaseId: true, apiId: true, siteId: true, subdomain: true, domain: true } }, + selection: { fields: { id: true, databaseId: true, apiId: true, siteId: true, serviceId: true, subdomain: true, domain: true, labels: true, annotations: true } }, }); // Get one domain const { data: item } = useDomainQuery({ id: '', - selection: { fields: { id: true, databaseId: true, apiId: true, siteId: true, subdomain: true, domain: true } }, + selection: { fields: { id: true, databaseId: true, apiId: true, siteId: true, serviceId: true, subdomain: true, domain: true, labels: true, annotations: true } }, }); // Create a domain const { mutate: create } = useCreateDomainMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', apiId: '', siteId: '', subdomain: '', domain: '' }); +create({ databaseId: '', apiId: '', siteId: '', serviceId: '', subdomain: '', domain: '', labels: '', annotations: '' }); ``` ### SiteMetadatum @@ -992,20 +992,20 @@ create({ databaseId: '', targetOwnerId: '', sourceApproved: '', - selection: { fields: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true } }, + selection: { fields: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true, labels: true, annotations: true } }, }); // Create a api const { mutate: create } = useCreateApiMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '' }); +create({ databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '', labels: '', annotations: '' }); ``` ### Site @@ -1013,20 +1013,20 @@ create({ databaseId: '', name: '', dbname: '', roleName: ' ```typescript // List all sites const { data, isLoading } = useSitesQuery({ - selection: { fields: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true } }, + selection: { fields: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true, labels: true, annotations: true } }, }); // Get one site const { data: item } = useSiteQuery({ id: '', - selection: { fields: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true } }, + selection: { fields: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true, labels: true, annotations: true } }, }); // Create a site const { mutate: create } = useCreateSiteMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '' }); +create({ databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '', labels: '', annotations: '' }); ``` ### App @@ -1202,20 +1202,20 @@ create({ name: '', databaseId: '', deploy: '', deps: '', - selection: { fields: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true } }, + selection: { fields: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true, labels: true, annotations: true } }, }); // Create a databaseSetting const { mutate: create } = useCreateDatabaseSettingMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '' }); +create({ databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '', labels: '', annotations: '' }); ``` ### WebauthnSetting diff --git a/sdk/constructive-react/src/api/orm/README.md b/sdk/constructive-react/src/api/orm/README.md index caf70c1803..1c2ec1c782 100644 --- a/sdk/constructive-react/src/api/orm/README.md +++ b/sdk/constructive-react/src/api/orm/README.md @@ -118,7 +118,6 @@ CRUD operations for Schema records. | `description` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `isPublic` | Boolean | Yes | | `apiExposure` | ApiExposureLevel | Yes | @@ -129,13 +128,13 @@ CRUD operations for Schema records. ```typescript // List all schema records -const items = await db.schema.findMany({ select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, scope: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.schema.findMany({ select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.schema.findOne({ id: '', select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, scope: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.schema.findOne({ id: '', select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.schema.create({ data: { databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', scope: '', tags: '', isPublic: '', apiExposure: '' }, select: { id: true } }).execute(); +const created = await db.schema.create({ data: { databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', tags: '', isPublic: '', apiExposure: '' }, select: { id: true } }).execute(); // Update const updated = await db.schema.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -160,7 +159,6 @@ CRUD operations for Table records. | `description` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `useRls` | Boolean | Yes | | `timestamps` | Boolean | Yes | | `peoplestamps` | Boolean | Yes | @@ -179,13 +177,13 @@ CRUD operations for Table records. ```typescript // List all table records -const items = await db.table.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, scope: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); +const items = await db.table.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); // Get one by id -const item = await db.table.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, scope: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); +const item = await db.table.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); // Create -const created = await db.table.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', scope: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }, select: { id: true } }).execute(); +const created = await db.table.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }, select: { id: true } }).execute(); // Update const updated = await db.table.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -211,7 +209,6 @@ CRUD operations for CheckConstraint records. | `expr` | JSON | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -220,13 +217,13 @@ CRUD operations for CheckConstraint records. ```typescript // List all checkConstraint records -const items = await db.checkConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.checkConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.checkConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.checkConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.checkConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.checkConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.checkConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -262,7 +259,6 @@ CRUD operations for Field records. | `max` | Float | Yes | | `tags` | String | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -270,13 +266,13 @@ CRUD operations for Field records. ```typescript // List all field records -const items = await db.field.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, scope: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.field.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.field.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, scope: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.field.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.field.create({ data: { databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.field.create({ data: { databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '' }, select: { id: true } }).execute(); // Update const updated = await db.field.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -303,7 +299,6 @@ CRUD operations for SpatialRelation records. | `operator` | String | Yes | | `paramName` | String | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -312,13 +307,13 @@ CRUD operations for SpatialRelation records. ```typescript // List all spatialRelation records -const items = await db.spatialRelation.findMany({ select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.spatialRelation.findMany({ select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.spatialRelation.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.spatialRelation.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.spatialRelation.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -348,7 +343,6 @@ CRUD operations for ForeignKeyConstraint records. | `deleteAction` | String | Yes | | `updateAction` | String | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -357,13 +351,13 @@ CRUD operations for ForeignKeyConstraint records. ```typescript // List all foreignKeyConstraint records -const items = await db.foreignKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.foreignKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.foreignKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.foreignKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.foreignKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.foreignKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.foreignKeyConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -432,7 +426,6 @@ CRUD operations for Index records. | `opClasses` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -441,13 +434,13 @@ CRUD operations for Index records. ```typescript // List all index records -const items = await db.index.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.index.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.index.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.index.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.index.create({ data: { databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.index.create({ data: { databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.index.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -476,7 +469,6 @@ CRUD operations for Policy records. | `data` | JSON | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -485,13 +477,13 @@ CRUD operations for Policy records. ```typescript // List all policy records -const items = await db.policy.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.policy.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.policy.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.policy.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.policy.create({ data: { databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.policy.create({ data: { databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.policy.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -516,7 +508,6 @@ CRUD operations for PrimaryKeyConstraint records. | `fieldIds` | UUID | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -525,13 +516,13 @@ CRUD operations for PrimaryKeyConstraint records. ```typescript // List all primaryKeyConstraint records -const items = await db.primaryKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.primaryKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.primaryKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.primaryKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.primaryKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.primaryKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.primaryKeyConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -593,7 +584,6 @@ CRUD operations for Trigger records. | `functionName` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -602,13 +592,13 @@ CRUD operations for Trigger records. ```typescript // List all trigger records -const items = await db.trigger.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.trigger.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.trigger.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.trigger.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.trigger.create({ data: { databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.trigger.create({ data: { databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.trigger.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -634,7 +624,6 @@ CRUD operations for UniqueConstraint records. | `type` | String | Yes | | `fieldIds` | UUID | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -643,13 +632,13 @@ CRUD operations for UniqueConstraint records. ```typescript // List all uniqueConstraint records -const items = await db.uniqueConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.uniqueConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.uniqueConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.uniqueConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.uniqueConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.uniqueConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.uniqueConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -679,20 +668,19 @@ CRUD operations for View records. | `isReadOnly` | Boolean | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | **Operations:** ```typescript // List all view records -const items = await db.view.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const items = await db.view.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, tags: true } }).execute(); // Get one by id -const item = await db.view.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const item = await db.view.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, tags: true } }).execute(); // Create -const created = await db.view.create({ data: { databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.view.create({ data: { databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.view.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -938,20 +926,19 @@ CRUD operations for Enum records. | `values` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | **Operations:** ```typescript // List all enum records -const items = await db.enum.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const items = await db.enum.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, tags: true } }).execute(); // Get one by id -const item = await db.enum.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const item = await db.enum.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, tags: true } }).execute(); // Create -const created = await db.enum.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.enum.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.enum.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -977,20 +964,19 @@ CRUD operations for CompositeType records. | `attributes` | JSON | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | **Operations:** ```typescript // List all compositeType records -const items = await db.compositeType.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const items = await db.compositeType.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, tags: true } }).execute(); // Get one by id -const item = await db.compositeType.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const item = await db.compositeType.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, tags: true } }).execute(); // Create -const created = await db.compositeType.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.compositeType.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.compositeType.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1076,20 +1062,23 @@ CRUD operations for Domain records. | `databaseId` | UUID | Yes | | `apiId` | UUID | Yes | | `siteId` | UUID | Yes | +| `serviceId` | UUID | Yes | | `subdomain` | ConstructiveInternalTypeHostname | Yes | | `domain` | ConstructiveInternalTypeHostname | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all domain records -const items = await db.domain.findMany({ select: { id: true, databaseId: true, apiId: true, siteId: true, subdomain: true, domain: true } }).execute(); +const items = await db.domain.findMany({ select: { id: true, databaseId: true, apiId: true, siteId: true, serviceId: true, subdomain: true, domain: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.domain.findOne({ id: '', select: { id: true, databaseId: true, apiId: true, siteId: true, subdomain: true, domain: true } }).execute(); +const item = await db.domain.findOne({ id: '', select: { id: true, databaseId: true, apiId: true, siteId: true, serviceId: true, subdomain: true, domain: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.domain.create({ data: { databaseId: '', apiId: '', siteId: '', subdomain: '', domain: '' }, select: { id: true } }).execute(); +const created = await db.domain.create({ data: { databaseId: '', apiId: '', siteId: '', serviceId: '', subdomain: '', domain: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.domain.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1361,18 +1350,20 @@ CRUD operations for Api records. | `roleName` | String | Yes | | `anonRole` | String | Yes | | `isPublic` | Boolean | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all api records -const items = await db.api.findMany({ select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true } }).execute(); +const items = await db.api.findMany({ select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.api.findOne({ id: '', select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true } }).execute(); +const item = await db.api.findOne({ id: '', select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.api.create({ data: { databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '' }, select: { id: true } }).execute(); +const created = await db.api.create({ data: { databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.api.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1398,18 +1389,20 @@ CRUD operations for Site records. | `appleTouchIcon` | ConstructiveInternalTypeImage | Yes | | `logo` | ConstructiveInternalTypeImage | Yes | | `dbname` | String | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all site records -const items = await db.site.findMany({ select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true } }).execute(); +const items = await db.site.findMany({ select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.site.findOne({ id: '', select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true } }).execute(); +const item = await db.site.findOne({ id: '', select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.site.create({ data: { databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '' }, select: { id: true } }).execute(); +const created = await db.site.create({ data: { databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.site.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1740,18 +1733,20 @@ CRUD operations for DatabaseSetting records. | `enableBulk` | Boolean | Yes | | `enableI18N` | Boolean | Yes | | `options` | JSON | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all databaseSetting records -const items = await db.databaseSetting.findMany({ select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true } }).execute(); +const items = await db.databaseSetting.findMany({ select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.databaseSetting.findOne({ id: '', select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true } }).execute(); +const item = await db.databaseSetting.findOne({ id: '', select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.databaseSetting.create({ data: { databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '' }, select: { id: true } }).execute(); +const created = await db.databaseSetting.create({ data: { databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.databaseSetting.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); diff --git a/sdk/constructive-react/src/api/orm/input-types.ts b/sdk/constructive-react/src/api/orm/input-types.ts index b1e5d0f51c..60f796a207 100644 --- a/sdk/constructive-react/src/api/orm/input-types.ts +++ b/sdk/constructive-react/src/api/orm/input-types.ts @@ -255,7 +255,6 @@ export interface Schema { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; isPublic?: boolean | null; apiExposure?: ApiExposureLevel | null; @@ -271,7 +270,6 @@ export interface Table { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; useRls?: boolean | null; timestamps?: boolean | null; peoplestamps?: boolean | null; @@ -296,7 +294,6 @@ export interface CheckConstraint { expr?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -321,7 +318,6 @@ export interface Field { max?: number | null; tags?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; createdAt?: string | null; updatedAt?: string | null; } @@ -336,7 +332,6 @@ export interface SpatialRelation { operator?: string | null; paramName?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -355,7 +350,6 @@ export interface ForeignKeyConstraint { deleteAction?: string | null; updateAction?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -387,7 +381,6 @@ export interface Index { opClasses?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -405,7 +398,6 @@ export interface Policy { data?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -419,7 +411,6 @@ export interface PrimaryKeyConstraint { fieldIds?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -444,7 +435,6 @@ export interface Trigger { functionName?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -459,7 +449,6 @@ export interface UniqueConstraint { type?: string | null; fieldIds?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -478,7 +467,6 @@ export interface View { isReadOnly?: boolean | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } /** Junction table linking views to their joined tables for referential integrity */ @@ -559,7 +547,6 @@ export interface Enum { values?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface CompositeType { @@ -572,7 +559,6 @@ export interface CompositeType { attributes?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } /** Join table linking APIs to the database schemas they expose; controls which schemas are accessible through each API */ @@ -607,12 +593,18 @@ export interface Domain { databaseId?: string | null; /** API endpoint this domain routes to (mutually exclusive with site_id) */ apiId?: string | null; - /** Site this domain routes to (mutually exclusive with api_id) */ + /** Site this domain routes to (mutually exclusive with api_id and service_id) */ siteId?: string | null; + /** Server deployment this domain routes to (mutually exclusive with api_id and site_id) */ + serviceId?: string | null; /** Subdomain portion of the hostname */ subdomain?: ConstructiveInternalTypeHostname | null; /** Root domain of the hostname */ domain?: ConstructiveInternalTypeHostname | null; + /** Key/value pairs for selecting and filtering domains */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** SEO and social sharing metadata for a site: page title, description, and Open Graph image */ export interface SiteMetadatum { @@ -719,6 +711,10 @@ export interface Api { anonRole?: string | null; /** Whether this API is publicly accessible without authentication */ isPublic?: boolean | null; + /** Key/value pairs for selecting and filtering APIs */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** Top-level site configuration: branding assets, title, and description for a deployed application */ export interface Site { @@ -740,6 +736,10 @@ export interface Site { logo?: ConstructiveInternalTypeImage | null; /** PostgreSQL database name this site connects to */ dbname?: string | null; + /** Key/value pairs for selecting and filtering sites */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** Mobile and native app configuration linked to a site, including store links and identifiers */ export interface App { @@ -912,6 +912,10 @@ export interface DatabaseSetting { enableI18N?: boolean | null; /** Extensible JSON for additional settings that do not have dedicated columns */ options?: Record | null; + /** Key/value pairs for selecting and filtering database settings */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** Per-database WebAuthn/passkey runtime configuration; typed replacement for api_modules webauthn_challenge JSONB entries */ export interface WebauthnSetting { @@ -1328,7 +1332,6 @@ export type SchemaSelect = { description?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; isPublic?: boolean; apiExposure?: boolean; @@ -1395,7 +1398,6 @@ export type TableSelect = { description?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; useRls?: boolean; timestamps?: boolean; peoplestamps?: boolean; @@ -1528,7 +1530,6 @@ export type CheckConstraintSelect = { expr?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1559,7 +1560,6 @@ export type FieldSelect = { max?: boolean; tags?: boolean; category?: boolean; - scope?: boolean; createdAt?: boolean; updatedAt?: boolean; database?: { @@ -1592,7 +1592,6 @@ export type SpatialRelationSelect = { operator?: boolean; paramName?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1626,7 +1625,6 @@ export type ForeignKeyConstraintSelect = { deleteAction?: boolean; updateAction?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1673,7 +1671,6 @@ export type IndexSelect = { opClasses?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1697,7 +1694,6 @@ export type PolicySelect = { data?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1717,7 +1713,6 @@ export type PrimaryKeyConstraintSelect = { fieldIds?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1754,7 +1749,6 @@ export type TriggerSelect = { functionName?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1775,7 +1769,6 @@ export type UniqueConstraintSelect = { type?: boolean; fieldIds?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1800,7 +1793,6 @@ export type ViewSelect = { isReadOnly?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; database?: { select: DatabaseSelect; @@ -1952,7 +1944,6 @@ export type EnumSelect = { values?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; database?: { select: DatabaseSelect; @@ -1971,7 +1962,6 @@ export type CompositeTypeSelect = { attributes?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; database?: { select: DatabaseSelect; @@ -2013,8 +2003,11 @@ export type DomainSelect = { databaseId?: boolean; apiId?: boolean; siteId?: boolean; + serviceId?: boolean; subdomain?: boolean; domain?: boolean; + labels?: boolean; + annotations?: boolean; api?: { select: ApiSelect; }; @@ -2138,6 +2131,8 @@ export type ApiSelect = { roleName?: boolean; anonRole?: boolean; isPublic?: boolean; + labels?: boolean; + annotations?: boolean; database?: { select: DatabaseSelect; }; @@ -2179,6 +2174,8 @@ export type SiteSelect = { appleTouchIcon?: boolean; logo?: boolean; dbname?: boolean; + labels?: boolean; + annotations?: boolean; database?: { select: DatabaseSelect; }; @@ -2608,6 +2605,8 @@ export type DatabaseSettingSelect = { enableBulk?: boolean; enableI18N?: boolean; options?: boolean; + labels?: boolean; + annotations?: boolean; database?: { select: DatabaseSelect; }; @@ -2715,8 +2714,6 @@ export interface SchemaFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `isPublic` field. */ @@ -2785,8 +2782,6 @@ export interface TableFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `useRls` field. */ useRls?: BooleanFilter; /** Filter by the object’s `timestamps` field. */ @@ -2915,8 +2910,6 @@ export interface CheckConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -2973,8 +2966,6 @@ export interface FieldFilter { tags?: StringListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ @@ -3019,8 +3010,6 @@ export interface SpatialRelationFilter { paramName?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3071,8 +3060,6 @@ export interface ForeignKeyConstraintFilter { updateAction?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3153,8 +3140,6 @@ export interface IndexFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3197,8 +3182,6 @@ export interface PolicyFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3233,8 +3216,6 @@ export interface PrimaryKeyConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3299,8 +3280,6 @@ export interface TriggerFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3337,8 +3316,6 @@ export interface UniqueConstraintFilter { fieldIds?: UUIDListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3383,8 +3360,6 @@ export interface ViewFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -3623,8 +3598,6 @@ export interface EnumFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -3657,8 +3630,6 @@ export interface CompositeTypeFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -3723,10 +3694,16 @@ export interface DomainFilter { apiId?: UUIDFilter; /** Filter by the object’s `siteId` field. */ siteId?: UUIDFilter; + /** Filter by the object’s `serviceId` field. */ + serviceId?: UUIDFilter; /** Filter by the object’s `subdomain` field. */ subdomain?: ConstructiveInternalTypeHostnameFilter; /** Filter by the object’s `domain` field. */ domain?: ConstructiveInternalTypeHostnameFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DomainFilter[]; /** Checks for any expressions in this list. */ @@ -3945,6 +3922,10 @@ export interface ApiFilter { anonRole?: StringFilter; /** Filter by the object’s `isPublic` field. */ isPublic?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: ApiFilter[]; /** Checks for any expressions in this list. */ @@ -3993,6 +3974,10 @@ export interface SiteFilter { logo?: ConstructiveInternalTypeImageFilter; /** Filter by the object’s `dbname` field. */ dbname?: StringFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: SiteFilter[]; /** Checks for any expressions in this list. */ @@ -4493,6 +4478,10 @@ export interface DatabaseSettingFilter { enableI18N?: BooleanFilter; /** Filter by the object’s `options` field. */ options?: JSONFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DatabaseSettingFilter[]; /** Checks for any expressions in this list. */ @@ -4651,8 +4640,6 @@ export type SchemaOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'IS_PUBLIC_ASC' @@ -4683,8 +4670,6 @@ export type TableOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'USE_RLS_ASC' | 'USE_RLS_DESC' | 'TIMESTAMPS_ASC' @@ -4733,8 +4718,6 @@ export type CheckConstraintOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4783,8 +4766,6 @@ export type FieldOrderBy = | 'TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' @@ -4813,8 +4794,6 @@ export type SpatialRelationOrderBy = | 'PARAM_NAME_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4851,8 +4830,6 @@ export type ForeignKeyConstraintOrderBy = | 'UPDATE_ACTION_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4915,8 +4892,6 @@ export type IndexOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4951,8 +4926,6 @@ export type PolicyOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4979,8 +4952,6 @@ export type PrimaryKeyConstraintOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -5029,8 +5000,6 @@ export type TriggerOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -5059,8 +5028,6 @@ export type UniqueConstraintOrderBy = | 'FIELD_IDS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -5097,8 +5064,6 @@ export type ViewOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; export type ViewTableOrderBy = @@ -5251,8 +5216,6 @@ export type EnumOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; export type CompositeTypeOrderBy = @@ -5277,8 +5240,6 @@ export type CompositeTypeOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; export type ApiSchemaOrderBy = @@ -5319,10 +5280,16 @@ export type DomainOrderBy = | 'API_ID_DESC' | 'SITE_ID_ASC' | 'SITE_ID_DESC' + | 'SERVICE_ID_ASC' + | 'SERVICE_ID_DESC' | 'SUBDOMAIN_ASC' | 'SUBDOMAIN_DESC' | 'DOMAIN_ASC' - | 'DOMAIN_DESC'; + | 'DOMAIN_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type SiteMetadatumOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5472,7 +5439,11 @@ export type ApiOrderBy = | 'ANON_ROLE_ASC' | 'ANON_ROLE_DESC' | 'IS_PUBLIC_ASC' - | 'IS_PUBLIC_DESC'; + | 'IS_PUBLIC_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type SiteOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5494,7 +5465,11 @@ export type SiteOrderBy = | 'LOGO_ASC' | 'LOGO_DESC' | 'DBNAME_ASC' - | 'DBNAME_DESC'; + | 'DBNAME_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type AppOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5706,7 +5681,11 @@ export type DatabaseSettingOrderBy = | 'ENABLE_I18N_ASC' | 'ENABLE_I18N_DESC' | 'OPTIONS_ASC' - | 'OPTIONS_DESC'; + | 'OPTIONS_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type WebauthnSettingOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5808,7 +5787,6 @@ export interface CreateSchemaInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; isPublic?: boolean; apiExposure?: ApiExposureLevel; @@ -5822,7 +5800,6 @@ export interface SchemaPatch { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; isPublic?: boolean | null; apiExposure?: ApiExposureLevel | null; @@ -5846,7 +5823,6 @@ export interface CreateTableInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; useRls?: boolean; timestamps?: boolean; peoplestamps?: boolean; @@ -5868,7 +5844,6 @@ export interface TablePatch { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; useRls?: boolean | null; timestamps?: boolean | null; peoplestamps?: boolean | null; @@ -5901,7 +5876,6 @@ export interface CreateCheckConstraintInput { expr?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -5914,7 +5888,6 @@ export interface CheckConstraintPatch { expr?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateCheckConstraintInput { @@ -5947,7 +5920,6 @@ export interface CreateFieldInput { max?: number; tags?: string[]; category?: ObjectCategory; - scope?: number; }; } export interface FieldPatch { @@ -5969,7 +5941,6 @@ export interface FieldPatch { max?: number | null; tags?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; } export interface UpdateFieldInput { clientMutationId?: string; @@ -5992,7 +5963,6 @@ export interface CreateSpatialRelationInput { operator: string; paramName?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6006,7 +5976,6 @@ export interface SpatialRelationPatch { operator?: string | null; paramName?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateSpatialRelationInput { @@ -6033,7 +6002,6 @@ export interface CreateForeignKeyConstraintInput { deleteAction?: string; updateAction?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6050,7 +6018,6 @@ export interface ForeignKeyConstraintPatch { deleteAction?: string | null; updateAction?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateForeignKeyConstraintInput { @@ -6108,7 +6075,6 @@ export interface CreateIndexInput { opClasses?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6126,7 +6092,6 @@ export interface IndexPatch { opClasses?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateIndexInput { @@ -6152,7 +6117,6 @@ export interface CreatePolicyInput { data?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6168,7 +6132,6 @@ export interface PolicyPatch { data?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdatePolicyInput { @@ -6190,7 +6153,6 @@ export interface CreatePrimaryKeyConstraintInput { fieldIds: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6202,7 +6164,6 @@ export interface PrimaryKeyConstraintPatch { fieldIds?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdatePrimaryKeyConstraintInput { @@ -6252,7 +6213,6 @@ export interface CreateTriggerInput { functionName?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6264,7 +6224,6 @@ export interface TriggerPatch { functionName?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateTriggerInput { @@ -6287,7 +6246,6 @@ export interface CreateUniqueConstraintInput { type?: string; fieldIds: string[]; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6300,7 +6258,6 @@ export interface UniqueConstraintPatch { type?: string | null; fieldIds?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateUniqueConstraintInput { @@ -6327,7 +6284,6 @@ export interface CreateViewInput { isReadOnly?: boolean; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6344,7 +6300,6 @@ export interface ViewPatch { isReadOnly?: boolean | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateViewInput { @@ -6547,7 +6502,6 @@ export interface CreateEnumInput { values?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6560,7 +6514,6 @@ export interface EnumPatch { values?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateEnumInput { @@ -6583,7 +6536,6 @@ export interface CreateCompositeTypeInput { attributes?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6596,7 +6548,6 @@ export interface CompositeTypePatch { attributes?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateCompositeTypeInput { @@ -6660,16 +6611,22 @@ export interface CreateDomainInput { databaseId: string; apiId?: string; siteId?: string; + serviceId?: string; subdomain?: ConstructiveInternalTypeHostname; domain?: ConstructiveInternalTypeHostname; + labels?: Record; + annotations?: Record; }; } export interface DomainPatch { databaseId?: string | null; apiId?: string | null; siteId?: string | null; + serviceId?: string | null; subdomain?: ConstructiveInternalTypeHostname | null; domain?: ConstructiveInternalTypeHostname | null; + labels?: Record | null; + annotations?: Record | null; } export interface UpdateDomainInput { clientMutationId?: string; @@ -6880,6 +6837,8 @@ export interface CreateApiInput { roleName?: string; anonRole?: string; isPublic?: boolean; + labels?: Record; + annotations?: Record; }; } export interface ApiPatch { @@ -6889,6 +6848,8 @@ export interface ApiPatch { roleName?: string | null; anonRole?: string | null; isPublic?: boolean | null; + labels?: Record | null; + annotations?: Record | null; } export interface UpdateApiInput { clientMutationId?: string; @@ -6910,6 +6871,8 @@ export interface CreateSiteInput { appleTouchIcon?: ConstructiveInternalTypeImage; logo?: ConstructiveInternalTypeImage; dbname?: string; + labels?: Record; + annotations?: Record; }; } export interface SitePatch { @@ -6921,6 +6884,8 @@ export interface SitePatch { appleTouchIcon?: ConstructiveInternalTypeImage | null; logo?: ConstructiveInternalTypeImage | null; dbname?: string | null; + labels?: Record | null; + annotations?: Record | null; ogImageUpload?: File | null; faviconUpload?: File | null; appleTouchIconUpload?: File | null; @@ -7211,6 +7176,8 @@ export interface CreateDatabaseSettingInput { enableBulk?: boolean; enableI18N?: boolean; options?: Record; + labels?: Record; + annotations?: Record; }; } export interface DatabaseSettingPatch { @@ -7228,6 +7195,8 @@ export interface DatabaseSettingPatch { enableBulk?: boolean | null; enableI18N?: boolean | null; options?: Record | null; + labels?: Record | null; + annotations?: Record | null; } export interface UpdateDatabaseSettingInput { clientMutationId?: string; @@ -8488,7 +8457,6 @@ export interface SchemaInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; isPublic?: boolean; apiExposure?: ApiExposureLevel; @@ -8505,7 +8473,6 @@ export interface TableInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; useRls?: boolean; timestamps?: boolean; peoplestamps?: boolean; @@ -8531,7 +8498,6 @@ export interface CheckConstraintInput { expr?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8557,7 +8523,6 @@ export interface FieldInput { max?: number; tags?: string[]; category?: ObjectCategory; - scope?: number; createdAt?: string; updatedAt?: string; } @@ -8573,7 +8538,6 @@ export interface SpatialRelationInput { operator: string; paramName?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8593,7 +8557,6 @@ export interface ForeignKeyConstraintInput { deleteAction?: string; updateAction?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8627,7 +8590,6 @@ export interface IndexInput { opClasses?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8646,7 +8608,6 @@ export interface PolicyInput { data?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8661,7 +8622,6 @@ export interface PrimaryKeyConstraintInput { fieldIds: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8688,7 +8648,6 @@ export interface TriggerInput { functionName?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8704,7 +8663,6 @@ export interface UniqueConstraintInput { type?: string; fieldIds: string[]; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8724,7 +8682,6 @@ export interface ViewInput { isReadOnly?: boolean; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; } /** An input for mutations affecting `ViewTable` */ @@ -8810,7 +8767,6 @@ export interface EnumInput { values?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; } /** An input for mutations affecting `CompositeType` */ @@ -8824,7 +8780,6 @@ export interface CompositeTypeInput { attributes?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; } /** An input for mutations affecting `ApiSchema` */ @@ -8859,12 +8814,18 @@ export interface DomainInput { databaseId: string; /** API endpoint this domain routes to (mutually exclusive with site_id) */ apiId?: string; - /** Site this domain routes to (mutually exclusive with api_id) */ + /** Site this domain routes to (mutually exclusive with api_id and service_id) */ siteId?: string; + /** Server deployment this domain routes to (mutually exclusive with api_id and site_id) */ + serviceId?: string; /** Subdomain portion of the hostname */ subdomain?: ConstructiveInternalTypeHostname; /** Root domain of the hostname */ domain?: ConstructiveInternalTypeHostname; + /** Key/value pairs for selecting and filtering domains */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `SiteMetadatum` */ export interface SiteMetadatumInput { @@ -8974,6 +8935,10 @@ export interface ApiInput { anonRole?: string; /** Whether this API is publicly accessible without authentication */ isPublic?: boolean; + /** Key/value pairs for selecting and filtering APIs */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `Site` */ export interface SiteInput { @@ -8995,6 +8960,10 @@ export interface SiteInput { logo?: ConstructiveInternalTypeImage; /** PostgreSQL database name this site connects to */ dbname?: string; + /** Key/value pairs for selecting and filtering sites */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `App` */ export interface AppInput { @@ -9171,6 +9140,10 @@ export interface DatabaseSettingInput { enableI18N?: boolean; /** Extensible JSON for additional settings that do not have dedicated columns */ options?: Record; + /** Key/value pairs for selecting and filtering database settings */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `WebauthnSetting` */ export interface WebauthnSettingInput { @@ -9264,8 +9237,6 @@ export interface TableFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `useRls` field. */ useRls?: BooleanFilter; /** Filter by the object’s `timestamps` field. */ @@ -9428,8 +9399,6 @@ export interface ViewFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -9506,8 +9475,6 @@ export interface EnumFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -9562,8 +9529,6 @@ export interface CompositeTypeFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -9620,8 +9585,6 @@ export interface CheckConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9679,8 +9642,6 @@ export interface FieldFilter { tags?: StringListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ @@ -9732,8 +9693,6 @@ export interface ForeignKeyConstraintFilter { updateAction?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9816,8 +9775,6 @@ export interface IndexFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9861,8 +9818,6 @@ export interface PolicyFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9898,8 +9853,6 @@ export interface PrimaryKeyConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9966,8 +9919,6 @@ export interface TriggerFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -10005,8 +9956,6 @@ export interface UniqueConstraintFilter { fieldIds?: UUIDListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -10138,8 +10087,6 @@ export interface SpatialRelationFilter { paramName?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -10246,10 +10193,16 @@ export interface DomainFilter { apiId?: UUIDFilter; /** Filter by the object’s `siteId` field. */ siteId?: UUIDFilter; + /** Filter by the object’s `serviceId` field. */ + serviceId?: UUIDFilter; /** Filter by the object’s `subdomain` field. */ subdomain?: ConstructiveInternalTypeHostnameFilter; /** Filter by the object’s `domain` field. */ domain?: ConstructiveInternalTypeHostnameFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DomainFilter[]; /** Checks for any expressions in this list. */ @@ -10375,8 +10328,6 @@ export interface SchemaFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `isPublic` field. */ @@ -10547,6 +10498,10 @@ export interface ApiFilter { anonRole?: StringFilter; /** Filter by the object’s `isPublic` field. */ isPublic?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: ApiFilter[]; /** Checks for any expressions in this list. */ @@ -10596,6 +10551,10 @@ export interface SiteFilter { logo?: ConstructiveInternalTypeImageFilter; /** Filter by the object’s `dbname` field. */ dbname?: StringFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: SiteFilter[]; /** Checks for any expressions in this list. */ @@ -10838,31 +10797,6 @@ export interface JSONFilter { /** Contained by the specified JSON. */ containedBy?: Record; } -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: number; - /** Not equal to the specified value. */ - notEqualTo?: number; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; - /** Included in the specified list. */ - in?: number[]; - /** Not included in the specified list. */ - notIn?: number[]; - /** Less than the specified value. */ - lessThan?: number; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; - /** Greater than the specified value. */ - greaterThan?: number; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; -} /** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ export interface BooleanFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -11180,6 +11114,31 @@ export interface UUIDListFilter { /** Any array item is greater than or equal to the specified value. */ anyGreaterThanOrEqualTo?: string; } +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Included in the specified list. */ + in?: number[]; + /** Not included in the specified list. */ + notIn?: number[]; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; +} /** A filter to be used against Float fields. All fields are combined with a logical ‘and.’ */ export interface FloatFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -11237,6 +11196,10 @@ export interface DatabaseSettingFilter { enableI18N?: BooleanFilter; /** Filter by the object’s `options` field. */ options?: JSONFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DatabaseSettingFilter[]; /** Checks for any expressions in this list. */ diff --git a/sdk/constructive-react/src/api/schema-types.ts b/sdk/constructive-react/src/api/schema-types.ts index 822204e7b1..e9022eca81 100644 --- a/sdk/constructive-react/src/api/schema-types.ts +++ b/sdk/constructive-react/src/api/schema-types.ts @@ -99,8 +99,6 @@ export type CheckConstraintOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -132,8 +130,6 @@ export type SpatialRelationOrderBy = | 'PARAM_NAME_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -183,8 +179,6 @@ export type FieldOrderBy = | 'TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' @@ -220,8 +214,6 @@ export type ForeignKeyConstraintOrderBy = | 'UPDATE_ACTION_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -286,8 +278,6 @@ export type IndexOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -323,8 +313,6 @@ export type PolicyOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -352,8 +340,6 @@ export type PrimaryKeyConstraintOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -404,8 +390,6 @@ export type TriggerOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -435,8 +419,6 @@ export type UniqueConstraintOrderBy = | 'FIELD_IDS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -525,8 +507,6 @@ export type ViewOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; /** Methods to use when ordering `EmbeddingChunk`. */ @@ -597,8 +577,6 @@ export type TableOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'USE_RLS_ASC' | 'USE_RLS_DESC' | 'TIMESTAMPS_ASC' @@ -684,8 +662,6 @@ export type EnumOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; /** Methods to use when ordering `Function`. */ @@ -724,8 +700,6 @@ export type CompositeTypeOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; /** Methods to use when ordering `ApiModule`. */ @@ -769,10 +743,16 @@ export type DomainOrderBy = | 'API_ID_DESC' | 'SITE_ID_ASC' | 'SITE_ID_DESC' + | 'SERVICE_ID_ASC' + | 'SERVICE_ID_DESC' | 'SUBDOMAIN_ASC' | 'SUBDOMAIN_DESC' | 'DOMAIN_ASC' - | 'DOMAIN_DESC'; + | 'DOMAIN_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; /** Methods to use when ordering `SiteMetadatum`. */ export type SiteMetadatumOrderBy = | 'NATURAL' @@ -852,8 +832,6 @@ export type SchemaOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'IS_PUBLIC_ASC' @@ -963,7 +941,11 @@ export type ApiOrderBy = | 'ANON_ROLE_ASC' | 'ANON_ROLE_DESC' | 'IS_PUBLIC_ASC' - | 'IS_PUBLIC_DESC'; + | 'IS_PUBLIC_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; /** Methods to use when ordering `Site`. */ export type SiteOrderBy = | 'NATURAL' @@ -986,7 +968,11 @@ export type SiteOrderBy = | 'LOGO_ASC' | 'LOGO_DESC' | 'DBNAME_ASC' - | 'DBNAME_DESC'; + | 'DBNAME_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; /** Methods to use when ordering `App`. */ export type AppOrderBy = | 'NATURAL' @@ -1207,7 +1193,11 @@ export type DatabaseSettingOrderBy = | 'ENABLE_I18N_ASC' | 'ENABLE_I18N_DESC' | 'OPTIONS_ASC' - | 'OPTIONS_DESC'; + | 'OPTIONS_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; /** Methods to use when ordering `WebauthnSetting`. */ export type WebauthnSettingOrderBy = | 'NATURAL' @@ -1298,8 +1288,6 @@ export interface CheckConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -1558,8 +1546,6 @@ export interface SchemaFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `isPublic` field. */ @@ -1663,8 +1649,6 @@ export interface TableFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `useRls` field. */ useRls?: BooleanFilter; /** Filter by the object’s `timestamps` field. */ @@ -1832,8 +1816,6 @@ export interface FieldFilter { tags?: StringListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ @@ -1888,8 +1870,6 @@ export interface SpatialRelationFilter { paramName?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -1950,8 +1930,6 @@ export interface ForeignKeyConstraintFilter { updateAction?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -2052,8 +2030,6 @@ export interface IndexFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -2106,8 +2082,6 @@ export interface PolicyFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -2152,8 +2126,6 @@ export interface PrimaryKeyConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -2238,8 +2210,6 @@ export interface TriggerFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -2286,8 +2256,6 @@ export interface UniqueConstraintFilter { fieldIds?: UUIDListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -2342,8 +2310,6 @@ export interface ViewFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -2720,8 +2686,6 @@ export interface EnumFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -2794,8 +2758,6 @@ export interface CompositeTypeFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -2857,6 +2819,10 @@ export interface ApiFilter { anonRole?: StringFilter; /** Filter by the object’s `isPublic` field. */ isPublic?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: ApiFilter[]; /** Checks for any expressions in this list. */ @@ -2944,10 +2910,16 @@ export interface DomainFilter { apiId?: UUIDFilter; /** Filter by the object’s `siteId` field. */ siteId?: UUIDFilter; + /** Filter by the object’s `serviceId` field. */ + serviceId?: UUIDFilter; /** Filter by the object’s `subdomain` field. */ subdomain?: ConstructiveInternalTypeHostnameFilter; /** Filter by the object’s `domain` field. */ domain?: ConstructiveInternalTypeHostnameFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DomainFilter[]; /** Checks for any expressions in this list. */ @@ -3062,6 +3034,10 @@ export interface SiteFilter { logo?: ConstructiveInternalTypeImageFilter; /** Filter by the object’s `dbname` field. */ dbname?: StringFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: SiteFilter[]; /** Checks for any expressions in this list. */ @@ -3891,6 +3867,10 @@ export interface DatabaseSettingFilter { enableI18N?: BooleanFilter; /** Filter by the object’s `options` field. */ options?: JSONFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DatabaseSettingFilter[]; /** Checks for any expressions in this list. */ @@ -4441,28 +4421,6 @@ export interface ViewGrantInput { withGrantOption?: boolean; isGrant?: boolean; } -export interface CreateApiInput { - clientMutationId?: string; - /** The `Api` to be created by this mutation. */ - api: ApiInput; -} -/** An input for mutations affecting `Api` */ -export interface ApiInput { - /** Unique identifier for this API */ - id?: string; - /** Reference to the metaschema database this API serves */ - databaseId: string; - /** Unique name for this API within its database */ - name: string; - /** PostgreSQL database name to connect to */ - dbname?: string; - /** PostgreSQL role used for authenticated requests */ - roleName?: string; - /** PostgreSQL role used for anonymous/unauthenticated requests */ - anonRole?: string; - /** Whether this API is publicly accessible without authentication */ - isPublic?: boolean; -} export interface CreateCorsSettingInput { clientMutationId?: string; /** The `CorsSetting` to be created by this mutation. */ @@ -4530,6 +4488,32 @@ export interface SiteModuleInput { /** JSON configuration data for this module */ data: unknown; } +export interface CreateApiInput { + clientMutationId?: string; + /** The `Api` to be created by this mutation. */ + api: ApiInput; +} +/** An input for mutations affecting `Api` */ +export interface ApiInput { + /** Unique identifier for this API */ + id?: string; + /** Reference to the metaschema database this API serves */ + databaseId: string; + /** Unique name for this API within its database */ + name: string; + /** PostgreSQL database name to connect to */ + dbname?: string; + /** PostgreSQL role used for authenticated requests */ + roleName?: string; + /** PostgreSQL role used for anonymous/unauthenticated requests */ + anonRole?: string; + /** Whether this API is publicly accessible without authentication */ + isPublic?: boolean; + /** Key/value pairs for selecting and filtering APIs */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; +} export interface CreateSiteMetadatumInput { clientMutationId?: string; /** The `SiteMetadatum` to be created by this mutation. */ @@ -4637,26 +4621,6 @@ export interface TableGrantInput { createdAt?: string; updatedAt?: string; } -export interface CreateDomainInput { - clientMutationId?: string; - /** The `Domain` to be created by this mutation. */ - domain: DomainInput; -} -/** An input for mutations affecting `Domain` */ -export interface DomainInput { - /** Unique identifier for this domain record */ - id?: string; - /** Reference to the metaschema database this domain belongs to */ - databaseId: string; - /** API endpoint this domain routes to (mutually exclusive with site_id) */ - apiId?: string; - /** Site this domain routes to (mutually exclusive with api_id) */ - siteId?: string; - /** Subdomain portion of the hostname */ - subdomain?: ConstructiveInternalTypeHostname; - /** Root domain of the hostname */ - domain?: ConstructiveInternalTypeHostname; -} export interface CreateRlsSettingInput { clientMutationId?: string; /** The `RlsSetting` to be created by this mutation. */ @@ -4724,6 +4688,32 @@ export interface PartitionInput { createdAt?: string; updatedAt?: string; } +export interface CreateDomainInput { + clientMutationId?: string; + /** The `Domain` to be created by this mutation. */ + domain: DomainInput; +} +/** An input for mutations affecting `Domain` */ +export interface DomainInput { + /** Unique identifier for this domain record */ + id?: string; + /** Reference to the metaschema database this domain belongs to */ + databaseId: string; + /** API endpoint this domain routes to (mutually exclusive with site_id) */ + apiId?: string; + /** Site this domain routes to (mutually exclusive with api_id and service_id) */ + siteId?: string; + /** Server deployment this domain routes to (mutually exclusive with api_id and site_id) */ + serviceId?: string; + /** Subdomain portion of the hostname */ + subdomain?: ConstructiveInternalTypeHostname; + /** Root domain of the hostname */ + domain?: ConstructiveInternalTypeHostname; + /** Key/value pairs for selecting and filtering domains */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; +} export interface CreateCompositeTypeInput { clientMutationId?: string; /** The `CompositeType` to be created by this mutation. */ @@ -4740,7 +4730,6 @@ export interface CompositeTypeInput { attributes?: unknown; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; } export interface CreateEnumInput { @@ -4759,30 +4748,8 @@ export interface EnumInput { values?: string[]; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; } -export interface CreateSqlActionInput { - clientMutationId?: string; - /** The `SqlAction` to be created by this mutation. */ - sqlAction: SqlActionInput; -} -/** An input for mutations affecting `SqlAction` */ -export interface SqlActionInput { - id?: number; - name?: string; - databaseId?: string; - deploy?: string; - deps?: string[]; - payload?: unknown; - content?: string; - revert?: string; - verify?: string; - createdAt?: string; - action?: string; - actionId?: string; - actorId?: string; -} export interface CreateViewInput { clientMutationId?: string; /** The `View` to be created by this mutation. */ @@ -4803,108 +4770,28 @@ export interface ViewInput { isReadOnly?: boolean; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; } -export interface CreateDatabaseSettingInput { - clientMutationId?: string; - /** The `DatabaseSetting` to be created by this mutation. */ - databaseSetting: DatabaseSettingInput; -} -/** An input for mutations affecting `DatabaseSetting` */ -export interface DatabaseSettingInput { - /** Unique identifier for this settings record */ - id?: string; - /** Reference to the metaschema database these settings apply to */ - databaseId: string; - /** Enable aggregate queries (sum, avg, min, max, etc.) in the GraphQL API */ - enableAggregates?: boolean; - /** Enable PostGIS spatial types and operators in the GraphQL API */ - enablePostgis?: boolean; - /** Enable unified search (tsvector, BM25, pg_trgm, pgvector) in the GraphQL API */ - enableSearch?: boolean; - /** Enable direct (multipart) file upload mutations in the GraphQL API */ - enableDirectUploads?: boolean; - /** Enable presigned URL upload flow for S3/MinIO storage */ - enablePresignedUploads?: boolean; - /** Enable many-to-many relationship queries in the GraphQL API */ - enableManyToMany?: boolean; - /** Enable connection filter (where argument) in the GraphQL API */ - enableConnectionFilter?: boolean; - /** Enable ltree hierarchical data type support in the GraphQL API */ - enableLtree?: boolean; - /** Enable LLM/AI integration features in the GraphQL API */ - enableLlm?: boolean; - /** Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API */ - enableRealtime?: boolean; - /** Enable bulk mutation operations (insert, upsert, update, delete) in the GraphQL API */ - enableBulk?: boolean; - /** Enable internationalization plugin (localeStrings field, translation table discovery) in the GraphQL API */ - enableI18N?: boolean; - /** Extensible JSON for additional settings that do not have dedicated columns */ - options?: unknown; -} -export interface CreateApiSettingInput { - clientMutationId?: string; - /** The `ApiSetting` to be created by this mutation. */ - apiSetting: ApiSettingInput; -} -/** An input for mutations affecting `ApiSetting` */ -export interface ApiSettingInput { - /** Unique identifier for this API settings record */ - id?: string; - /** Reference to the metaschema database */ - databaseId: string; - /** API these settings override for */ - apiId: string; - /** Override: enable aggregate queries (NULL = inherit from database_settings) */ - enableAggregates?: boolean; - /** Override: enable PostGIS spatial types (NULL = inherit from database_settings) */ - enablePostgis?: boolean; - /** Override: enable unified search (NULL = inherit from database_settings) */ - enableSearch?: boolean; - /** Override: enable direct (multipart) file uploads (NULL = inherit from database_settings) */ - enableDirectUploads?: boolean; - /** Override: enable presigned URL upload flow (NULL = inherit from database_settings) */ - enablePresignedUploads?: boolean; - /** Override: enable many-to-many relationships (NULL = inherit from database_settings) */ - enableManyToMany?: boolean; - /** Override: enable connection filter (NULL = inherit from database_settings) */ - enableConnectionFilter?: boolean; - /** Override: enable ltree hierarchical data type (NULL = inherit from database_settings) */ - enableLtree?: boolean; - /** Override: enable LLM/AI integration features (NULL = inherit from database_settings) */ - enableLlm?: boolean; - /** Override: enable realtime subscriptions (NULL = inherit from database_settings) */ - enableRealtime?: boolean; - /** Override: enable bulk mutations (NULL = inherit from database_settings) */ - enableBulk?: boolean; - /** Override: enable internationalization plugin (NULL = inherit from database_settings) */ - enableI18N?: boolean; - /** Extensible JSON for additional per-API settings that do not have dedicated columns */ - options?: unknown; -} -export interface CreateDatabaseTransferInput { +export interface CreateSqlActionInput { clientMutationId?: string; - /** The `DatabaseTransfer` to be created by this mutation. */ - databaseTransfer: DatabaseTransferInput; + /** The `SqlAction` to be created by this mutation. */ + sqlAction: SqlActionInput; } -/** An input for mutations affecting `DatabaseTransfer` */ -export interface DatabaseTransferInput { - id?: string; - databaseId: string; - targetOwnerId: string; - sourceApproved?: boolean; - targetApproved?: boolean; - sourceApprovedAt?: string; - targetApprovedAt?: string; - status?: string; - initiatedBy: string; - notes?: string; - expiresAt?: string; +/** An input for mutations affecting `SqlAction` */ +export interface SqlActionInput { + id?: number; + name?: string; + databaseId?: string; + deploy?: string; + deps?: string[]; + payload?: unknown; + content?: string; + revert?: string; + verify?: string; createdAt?: string; - updatedAt?: string; - completedAt?: string; + action?: string; + actionId?: string; + actorId?: string; } export interface CreatePrimaryKeyConstraintInput { clientMutationId?: string; @@ -4921,7 +4808,6 @@ export interface PrimaryKeyConstraintInput { fieldIds: string[]; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -4941,7 +4827,6 @@ export interface TriggerInput { functionName?: string; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -4962,7 +4847,6 @@ export interface CheckConstraintInput { expr?: unknown; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -4983,7 +4867,6 @@ export interface UniqueConstraintInput { type?: string; fieldIds: string[]; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -5005,7 +4888,6 @@ export interface SpatialRelationInput { operator: string; paramName?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -5029,62 +4911,71 @@ export interface PolicyInput { data?: unknown; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; } -export interface CreateAppInput { +export interface CreateApiSettingInput { clientMutationId?: string; - /** The `App` to be created by this mutation. */ - app: AppInput; + /** The `ApiSetting` to be created by this mutation. */ + apiSetting: ApiSettingInput; } -/** An input for mutations affecting `App` */ -export interface AppInput { - /** Unique identifier for this app */ +/** An input for mutations affecting `ApiSetting` */ +export interface ApiSettingInput { + /** Unique identifier for this API settings record */ id?: string; - /** Reference to the metaschema database this app belongs to */ + /** Reference to the metaschema database */ databaseId: string; - /** Site this app is associated with (one app per site) */ - siteId: string; - /** Display name of the app */ - name?: string; - /** App icon or promotional image */ - appImage?: ConstructiveInternalTypeImage; - /** URL to the Apple App Store listing */ - appStoreLink?: ConstructiveInternalTypeUrl; - /** Apple App Store application identifier */ - appStoreId?: string; - /** Apple App ID prefix (Team ID) for universal links and associated domains */ - appIdPrefix?: string; - /** URL to the Google Play Store listing */ - playStoreLink?: ConstructiveInternalTypeUrl; -} -export interface CreateSiteInput { - clientMutationId?: string; - /** The `Site` to be created by this mutation. */ - site: SiteInput; -} -/** An input for mutations affecting `Site` */ -export interface SiteInput { - /** Unique identifier for this site */ + /** API these settings override for */ + apiId: string; + /** Override: enable aggregate queries (NULL = inherit from database_settings) */ + enableAggregates?: boolean; + /** Override: enable PostGIS spatial types (NULL = inherit from database_settings) */ + enablePostgis?: boolean; + /** Override: enable unified search (NULL = inherit from database_settings) */ + enableSearch?: boolean; + /** Override: enable direct (multipart) file uploads (NULL = inherit from database_settings) */ + enableDirectUploads?: boolean; + /** Override: enable presigned URL upload flow (NULL = inherit from database_settings) */ + enablePresignedUploads?: boolean; + /** Override: enable many-to-many relationships (NULL = inherit from database_settings) */ + enableManyToMany?: boolean; + /** Override: enable connection filter (NULL = inherit from database_settings) */ + enableConnectionFilter?: boolean; + /** Override: enable ltree hierarchical data type (NULL = inherit from database_settings) */ + enableLtree?: boolean; + /** Override: enable LLM/AI integration features (NULL = inherit from database_settings) */ + enableLlm?: boolean; + /** Override: enable realtime subscriptions (NULL = inherit from database_settings) */ + enableRealtime?: boolean; + /** Override: enable bulk mutations (NULL = inherit from database_settings) */ + enableBulk?: boolean; + /** Override: enable internationalization plugin (NULL = inherit from database_settings) */ + enableI18N?: boolean; + /** Extensible JSON for additional per-API settings that do not have dedicated columns */ + options?: unknown; +} +export interface CreateDatabaseTransferInput { + clientMutationId?: string; + /** The `DatabaseTransfer` to be created by this mutation. */ + databaseTransfer: DatabaseTransferInput; +} +/** An input for mutations affecting `DatabaseTransfer` */ +export interface DatabaseTransferInput { id?: string; - /** Reference to the metaschema database this site belongs to */ databaseId: string; - /** Display title for the site (max 120 characters) */ - title?: string; - /** Short description of the site (max 120 characters) */ - description?: string; - /** Open Graph image used for social media link previews */ - ogImage?: ConstructiveInternalTypeImage; - /** Browser favicon attachment */ - favicon?: ConstructiveInternalTypeAttachment; - /** Apple touch icon for iOS home screen bookmarks */ - appleTouchIcon?: ConstructiveInternalTypeImage; - /** Primary logo image for the site */ - logo?: ConstructiveInternalTypeImage; - /** PostgreSQL database name this site connects to */ - dbname?: string; + targetOwnerId: string; + sourceApproved?: boolean; + targetApproved?: boolean; + sourceApprovedAt?: string; + targetApprovedAt?: string; + status?: string; + initiatedBy: string; + notes?: string; + expiresAt?: string; + createdAt?: string; + updatedAt?: string; + completedAt?: string; } export interface CreateIndexInput { clientMutationId?: string; @@ -5107,11 +4998,108 @@ export interface IndexInput { opClasses?: string[]; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; } +export interface CreateAppInput { + clientMutationId?: string; + /** The `App` to be created by this mutation. */ + app: AppInput; +} +/** An input for mutations affecting `App` */ +export interface AppInput { + /** Unique identifier for this app */ + id?: string; + /** Reference to the metaschema database this app belongs to */ + databaseId: string; + /** Site this app is associated with (one app per site) */ + siteId: string; + /** Display name of the app */ + name?: string; + /** App icon or promotional image */ + appImage?: ConstructiveInternalTypeImage; + /** URL to the Apple App Store listing */ + appStoreLink?: ConstructiveInternalTypeUrl; + /** Apple App Store application identifier */ + appStoreId?: string; + /** Apple App ID prefix (Team ID) for universal links and associated domains */ + appIdPrefix?: string; + /** URL to the Google Play Store listing */ + playStoreLink?: ConstructiveInternalTypeUrl; +} +export interface CreateDatabaseSettingInput { + clientMutationId?: string; + /** The `DatabaseSetting` to be created by this mutation. */ + databaseSetting: DatabaseSettingInput; +} +/** An input for mutations affecting `DatabaseSetting` */ +export interface DatabaseSettingInput { + /** Unique identifier for this settings record */ + id?: string; + /** Reference to the metaschema database these settings apply to */ + databaseId: string; + /** Enable aggregate queries (sum, avg, min, max, etc.) in the GraphQL API */ + enableAggregates?: boolean; + /** Enable PostGIS spatial types and operators in the GraphQL API */ + enablePostgis?: boolean; + /** Enable unified search (tsvector, BM25, pg_trgm, pgvector) in the GraphQL API */ + enableSearch?: boolean; + /** Enable direct (multipart) file upload mutations in the GraphQL API */ + enableDirectUploads?: boolean; + /** Enable presigned URL upload flow for S3/MinIO storage */ + enablePresignedUploads?: boolean; + /** Enable many-to-many relationship queries in the GraphQL API */ + enableManyToMany?: boolean; + /** Enable connection filter (where argument) in the GraphQL API */ + enableConnectionFilter?: boolean; + /** Enable ltree hierarchical data type support in the GraphQL API */ + enableLtree?: boolean; + /** Enable LLM/AI integration features in the GraphQL API */ + enableLlm?: boolean; + /** Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API */ + enableRealtime?: boolean; + /** Enable bulk mutation operations (insert, upsert, update, delete) in the GraphQL API */ + enableBulk?: boolean; + /** Enable internationalization plugin (localeStrings field, translation table discovery) in the GraphQL API */ + enableI18N?: boolean; + /** Extensible JSON for additional settings that do not have dedicated columns */ + options?: unknown; + /** Key/value pairs for selecting and filtering database settings */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; +} +export interface CreateSiteInput { + clientMutationId?: string; + /** The `Site` to be created by this mutation. */ + site: SiteInput; +} +/** An input for mutations affecting `Site` */ +export interface SiteInput { + /** Unique identifier for this site */ + id?: string; + /** Reference to the metaschema database this site belongs to */ + databaseId: string; + /** Display title for the site (max 120 characters) */ + title?: string; + /** Short description of the site (max 120 characters) */ + description?: string; + /** Open Graph image used for social media link previews */ + ogImage?: ConstructiveInternalTypeImage; + /** Browser favicon attachment */ + favicon?: ConstructiveInternalTypeAttachment; + /** Apple touch icon for iOS home screen bookmarks */ + appleTouchIcon?: ConstructiveInternalTypeImage; + /** Primary logo image for the site */ + logo?: ConstructiveInternalTypeImage; + /** PostgreSQL database name this site connects to */ + dbname?: string; + /** Key/value pairs for selecting and filtering sites */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; +} export interface CreateForeignKeyConstraintInput { clientMutationId?: string; /** The `ForeignKeyConstraint` to be created by this mutation. */ @@ -5132,7 +5120,6 @@ export interface ForeignKeyConstraintInput { deleteAction?: string; updateAction?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -5246,7 +5233,6 @@ export interface SchemaInput { description?: string; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; isPublic?: boolean; apiExposure?: ApiExposureLevel; @@ -5279,7 +5265,6 @@ export interface FieldInput { max?: number; tags?: string[]; category?: ObjectCategory; - scope?: number; createdAt?: string; updatedAt?: string; } @@ -5298,7 +5283,6 @@ export interface TableInput { description?: string; smartTags?: unknown; category?: ObjectCategory; - scope?: number; useRls?: boolean; timestamps?: boolean; peoplestamps?: boolean; @@ -5425,30 +5409,6 @@ export interface ViewGrantPatch { withGrantOption?: boolean; isGrant?: boolean; } -export interface UpdateApiInput { - clientMutationId?: string; - /** Unique identifier for this API */ - id: string; - /** An object where the defined keys will be set on the `Api` being updated. */ - apiPatch: ApiPatch; -} -/** Represents an update to a `Api`. Fields that are set will be updated. */ -export interface ApiPatch { - /** Unique identifier for this API */ - id?: string; - /** Reference to the metaschema database this API serves */ - databaseId?: string; - /** Unique name for this API within its database */ - name?: string; - /** PostgreSQL database name to connect to */ - dbname?: string; - /** PostgreSQL role used for authenticated requests */ - roleName?: string; - /** PostgreSQL role used for anonymous/unauthenticated requests */ - anonRole?: string; - /** Whether this API is publicly accessible without authentication */ - isPublic?: boolean; -} export interface UpdateCorsSettingInput { clientMutationId?: string; /** Unique identifier for this CORS settings record */ @@ -5523,6 +5483,34 @@ export interface SiteModulePatch { /** JSON configuration data for this module */ data?: unknown; } +export interface UpdateApiInput { + clientMutationId?: string; + /** Unique identifier for this API */ + id: string; + /** An object where the defined keys will be set on the `Api` being updated. */ + apiPatch: ApiPatch; +} +/** Represents an update to a `Api`. Fields that are set will be updated. */ +export interface ApiPatch { + /** Unique identifier for this API */ + id?: string; + /** Reference to the metaschema database this API serves */ + databaseId?: string; + /** Unique name for this API within its database */ + name?: string; + /** PostgreSQL database name to connect to */ + dbname?: string; + /** PostgreSQL role used for authenticated requests */ + roleName?: string; + /** PostgreSQL role used for anonymous/unauthenticated requests */ + anonRole?: string; + /** Whether this API is publicly accessible without authentication */ + isPublic?: boolean; + /** Key/value pairs for selecting and filtering APIs */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; +} export interface UpdateSiteMetadatumInput { clientMutationId?: string; /** Unique identifier for this metadata record */ @@ -5640,28 +5628,6 @@ export interface TableGrantPatch { createdAt?: string; updatedAt?: string; } -export interface UpdateDomainInput { - clientMutationId?: string; - /** Unique identifier for this domain record */ - id: string; - /** An object where the defined keys will be set on the `Domain` being updated. */ - domainPatch: DomainPatch; -} -/** Represents an update to a `Domain`. Fields that are set will be updated. */ -export interface DomainPatch { - /** Unique identifier for this domain record */ - id?: string; - /** Reference to the metaschema database this domain belongs to */ - databaseId?: string; - /** API endpoint this domain routes to (mutually exclusive with site_id) */ - apiId?: string; - /** Site this domain routes to (mutually exclusive with api_id) */ - siteId?: string; - /** Subdomain portion of the hostname */ - subdomain?: ConstructiveInternalTypeHostname; - /** Root domain of the hostname */ - domain?: ConstructiveInternalTypeHostname; -} export interface UpdateRlsSettingInput { clientMutationId?: string; /** Unique identifier for this RLS settings record */ @@ -5733,6 +5699,34 @@ export interface PartitionPatch { createdAt?: string; updatedAt?: string; } +export interface UpdateDomainInput { + clientMutationId?: string; + /** Unique identifier for this domain record */ + id: string; + /** An object where the defined keys will be set on the `Domain` being updated. */ + domainPatch: DomainPatch; +} +/** Represents an update to a `Domain`. Fields that are set will be updated. */ +export interface DomainPatch { + /** Unique identifier for this domain record */ + id?: string; + /** Reference to the metaschema database this domain belongs to */ + databaseId?: string; + /** API endpoint this domain routes to (mutually exclusive with site_id) */ + apiId?: string; + /** Site this domain routes to (mutually exclusive with api_id and service_id) */ + siteId?: string; + /** Server deployment this domain routes to (mutually exclusive with api_id and site_id) */ + serviceId?: string; + /** Subdomain portion of the hostname */ + subdomain?: ConstructiveInternalTypeHostname; + /** Root domain of the hostname */ + domain?: ConstructiveInternalTypeHostname; + /** Key/value pairs for selecting and filtering domains */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; +} export interface UpdateCompositeTypeInput { clientMutationId?: string; id: string; @@ -5750,7 +5744,6 @@ export interface CompositeTypePatch { attributes?: unknown; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; } export interface UpdateEnumInput { @@ -5770,7 +5763,6 @@ export interface EnumPatch { values?: string[]; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; } export interface UpdateViewInput { @@ -5794,114 +5786,8 @@ export interface ViewPatch { isReadOnly?: boolean; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; } -export interface UpdateDatabaseSettingInput { - clientMutationId?: string; - /** Unique identifier for this settings record */ - id: string; - /** An object where the defined keys will be set on the `DatabaseSetting` being updated. */ - databaseSettingPatch: DatabaseSettingPatch; -} -/** Represents an update to a `DatabaseSetting`. Fields that are set will be updated. */ -export interface DatabaseSettingPatch { - /** Unique identifier for this settings record */ - id?: string; - /** Reference to the metaschema database these settings apply to */ - databaseId?: string; - /** Enable aggregate queries (sum, avg, min, max, etc.) in the GraphQL API */ - enableAggregates?: boolean; - /** Enable PostGIS spatial types and operators in the GraphQL API */ - enablePostgis?: boolean; - /** Enable unified search (tsvector, BM25, pg_trgm, pgvector) in the GraphQL API */ - enableSearch?: boolean; - /** Enable direct (multipart) file upload mutations in the GraphQL API */ - enableDirectUploads?: boolean; - /** Enable presigned URL upload flow for S3/MinIO storage */ - enablePresignedUploads?: boolean; - /** Enable many-to-many relationship queries in the GraphQL API */ - enableManyToMany?: boolean; - /** Enable connection filter (where argument) in the GraphQL API */ - enableConnectionFilter?: boolean; - /** Enable ltree hierarchical data type support in the GraphQL API */ - enableLtree?: boolean; - /** Enable LLM/AI integration features in the GraphQL API */ - enableLlm?: boolean; - /** Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API */ - enableRealtime?: boolean; - /** Enable bulk mutation operations (insert, upsert, update, delete) in the GraphQL API */ - enableBulk?: boolean; - /** Enable internationalization plugin (localeStrings field, translation table discovery) in the GraphQL API */ - enableI18N?: boolean; - /** Extensible JSON for additional settings that do not have dedicated columns */ - options?: unknown; -} -export interface UpdateApiSettingInput { - clientMutationId?: string; - /** Unique identifier for this API settings record */ - id: string; - /** An object where the defined keys will be set on the `ApiSetting` being updated. */ - apiSettingPatch: ApiSettingPatch; -} -/** Represents an update to a `ApiSetting`. Fields that are set will be updated. */ -export interface ApiSettingPatch { - /** Unique identifier for this API settings record */ - id?: string; - /** Reference to the metaschema database */ - databaseId?: string; - /** API these settings override for */ - apiId?: string; - /** Override: enable aggregate queries (NULL = inherit from database_settings) */ - enableAggregates?: boolean; - /** Override: enable PostGIS spatial types (NULL = inherit from database_settings) */ - enablePostgis?: boolean; - /** Override: enable unified search (NULL = inherit from database_settings) */ - enableSearch?: boolean; - /** Override: enable direct (multipart) file uploads (NULL = inherit from database_settings) */ - enableDirectUploads?: boolean; - /** Override: enable presigned URL upload flow (NULL = inherit from database_settings) */ - enablePresignedUploads?: boolean; - /** Override: enable many-to-many relationships (NULL = inherit from database_settings) */ - enableManyToMany?: boolean; - /** Override: enable connection filter (NULL = inherit from database_settings) */ - enableConnectionFilter?: boolean; - /** Override: enable ltree hierarchical data type (NULL = inherit from database_settings) */ - enableLtree?: boolean; - /** Override: enable LLM/AI integration features (NULL = inherit from database_settings) */ - enableLlm?: boolean; - /** Override: enable realtime subscriptions (NULL = inherit from database_settings) */ - enableRealtime?: boolean; - /** Override: enable bulk mutations (NULL = inherit from database_settings) */ - enableBulk?: boolean; - /** Override: enable internationalization plugin (NULL = inherit from database_settings) */ - enableI18N?: boolean; - /** Extensible JSON for additional per-API settings that do not have dedicated columns */ - options?: unknown; -} -export interface UpdateDatabaseTransferInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `DatabaseTransfer` being updated. */ - databaseTransferPatch: DatabaseTransferPatch; -} -/** Represents an update to a `DatabaseTransfer`. Fields that are set will be updated. */ -export interface DatabaseTransferPatch { - id?: string; - databaseId?: string; - targetOwnerId?: string; - sourceApproved?: boolean; - targetApproved?: boolean; - sourceApprovedAt?: string; - targetApprovedAt?: string; - status?: string; - initiatedBy?: string; - notes?: string; - expiresAt?: string; - createdAt?: string; - updatedAt?: string; - completedAt?: string; -} export interface UpdatePrimaryKeyConstraintInput { clientMutationId?: string; id: string; @@ -5918,7 +5804,6 @@ export interface PrimaryKeyConstraintPatch { fieldIds?: string[]; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -5939,7 +5824,6 @@ export interface TriggerPatch { functionName?: string; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -5961,7 +5845,6 @@ export interface CheckConstraintPatch { expr?: unknown; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -5983,7 +5866,6 @@ export interface UniqueConstraintPatch { type?: string; fieldIds?: string[]; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -6006,7 +5888,6 @@ export interface SpatialRelationPatch { operator?: string; paramName?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -6031,7 +5912,97 @@ export interface PolicyPatch { data?: unknown; smartTags?: unknown; category?: ObjectCategory; - scope?: number; + tags?: string[]; + createdAt?: string; + updatedAt?: string; +} +export interface UpdateApiSettingInput { + clientMutationId?: string; + /** Unique identifier for this API settings record */ + id: string; + /** An object where the defined keys will be set on the `ApiSetting` being updated. */ + apiSettingPatch: ApiSettingPatch; +} +/** Represents an update to a `ApiSetting`. Fields that are set will be updated. */ +export interface ApiSettingPatch { + /** Unique identifier for this API settings record */ + id?: string; + /** Reference to the metaschema database */ + databaseId?: string; + /** API these settings override for */ + apiId?: string; + /** Override: enable aggregate queries (NULL = inherit from database_settings) */ + enableAggregates?: boolean; + /** Override: enable PostGIS spatial types (NULL = inherit from database_settings) */ + enablePostgis?: boolean; + /** Override: enable unified search (NULL = inherit from database_settings) */ + enableSearch?: boolean; + /** Override: enable direct (multipart) file uploads (NULL = inherit from database_settings) */ + enableDirectUploads?: boolean; + /** Override: enable presigned URL upload flow (NULL = inherit from database_settings) */ + enablePresignedUploads?: boolean; + /** Override: enable many-to-many relationships (NULL = inherit from database_settings) */ + enableManyToMany?: boolean; + /** Override: enable connection filter (NULL = inherit from database_settings) */ + enableConnectionFilter?: boolean; + /** Override: enable ltree hierarchical data type (NULL = inherit from database_settings) */ + enableLtree?: boolean; + /** Override: enable LLM/AI integration features (NULL = inherit from database_settings) */ + enableLlm?: boolean; + /** Override: enable realtime subscriptions (NULL = inherit from database_settings) */ + enableRealtime?: boolean; + /** Override: enable bulk mutations (NULL = inherit from database_settings) */ + enableBulk?: boolean; + /** Override: enable internationalization plugin (NULL = inherit from database_settings) */ + enableI18N?: boolean; + /** Extensible JSON for additional per-API settings that do not have dedicated columns */ + options?: unknown; +} +export interface UpdateDatabaseTransferInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `DatabaseTransfer` being updated. */ + databaseTransferPatch: DatabaseTransferPatch; +} +/** Represents an update to a `DatabaseTransfer`. Fields that are set will be updated. */ +export interface DatabaseTransferPatch { + id?: string; + databaseId?: string; + targetOwnerId?: string; + sourceApproved?: boolean; + targetApproved?: boolean; + sourceApprovedAt?: string; + targetApprovedAt?: string; + status?: string; + initiatedBy?: string; + notes?: string; + expiresAt?: string; + createdAt?: string; + updatedAt?: string; + completedAt?: string; +} +export interface UpdateIndexInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `Index` being updated. */ + indexPatch: IndexPatch; +} +/** Represents an update to a `Index`. Fields that are set will be updated. */ +export interface IndexPatch { + id?: string; + databaseId?: string; + tableId?: string; + name?: string; + fieldIds?: string[]; + includeFieldIds?: string[]; + accessMethod?: string; + indexParams?: unknown; + whereClause?: unknown; + isUnique?: boolean; + options?: unknown; + opClasses?: string[]; + smartTags?: unknown; + category?: ObjectCategory; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -6066,6 +6037,50 @@ export interface AppPatch { /** Upload for App icon or promotional image */ appImageUpload?: File; } +export interface UpdateDatabaseSettingInput { + clientMutationId?: string; + /** Unique identifier for this settings record */ + id: string; + /** An object where the defined keys will be set on the `DatabaseSetting` being updated. */ + databaseSettingPatch: DatabaseSettingPatch; +} +/** Represents an update to a `DatabaseSetting`. Fields that are set will be updated. */ +export interface DatabaseSettingPatch { + /** Unique identifier for this settings record */ + id?: string; + /** Reference to the metaschema database these settings apply to */ + databaseId?: string; + /** Enable aggregate queries (sum, avg, min, max, etc.) in the GraphQL API */ + enableAggregates?: boolean; + /** Enable PostGIS spatial types and operators in the GraphQL API */ + enablePostgis?: boolean; + /** Enable unified search (tsvector, BM25, pg_trgm, pgvector) in the GraphQL API */ + enableSearch?: boolean; + /** Enable direct (multipart) file upload mutations in the GraphQL API */ + enableDirectUploads?: boolean; + /** Enable presigned URL upload flow for S3/MinIO storage */ + enablePresignedUploads?: boolean; + /** Enable many-to-many relationship queries in the GraphQL API */ + enableManyToMany?: boolean; + /** Enable connection filter (where argument) in the GraphQL API */ + enableConnectionFilter?: boolean; + /** Enable ltree hierarchical data type support in the GraphQL API */ + enableLtree?: boolean; + /** Enable LLM/AI integration features in the GraphQL API */ + enableLlm?: boolean; + /** Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API */ + enableRealtime?: boolean; + /** Enable bulk mutation operations (insert, upsert, update, delete) in the GraphQL API */ + enableBulk?: boolean; + /** Enable internationalization plugin (localeStrings field, translation table discovery) in the GraphQL API */ + enableI18N?: boolean; + /** Extensible JSON for additional settings that do not have dedicated columns */ + options?: unknown; + /** Key/value pairs for selecting and filtering database settings */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; +} export interface UpdateSiteInput { clientMutationId?: string; /** Unique identifier for this site */ @@ -6093,6 +6108,10 @@ export interface SitePatch { logo?: ConstructiveInternalTypeImage; /** PostgreSQL database name this site connects to */ dbname?: string; + /** Key/value pairs for selecting and filtering sites */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; /** Upload for Open Graph image used for social media link previews */ ogImageUpload?: File; /** Upload for Browser favicon attachment */ @@ -6102,33 +6121,6 @@ export interface SitePatch { /** Upload for Primary logo image for the site */ logoUpload?: File; } -export interface UpdateIndexInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `Index` being updated. */ - indexPatch: IndexPatch; -} -/** Represents an update to a `Index`. Fields that are set will be updated. */ -export interface IndexPatch { - id?: string; - databaseId?: string; - tableId?: string; - name?: string; - fieldIds?: string[]; - includeFieldIds?: string[]; - accessMethod?: string; - indexParams?: unknown; - whereClause?: unknown; - isUnique?: boolean; - options?: unknown; - opClasses?: string[]; - smartTags?: unknown; - category?: ObjectCategory; - scope?: number; - tags?: string[]; - createdAt?: string; - updatedAt?: string; -} export interface UpdateForeignKeyConstraintInput { clientMutationId?: string; id: string; @@ -6150,7 +6142,6 @@ export interface ForeignKeyConstraintPatch { deleteAction?: string; updateAction?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -6247,7 +6238,6 @@ export interface SchemaPatch { description?: string; smartTags?: unknown; category?: ObjectCategory; - scope?: number; tags?: string[]; isPublic?: boolean; apiExposure?: ApiExposureLevel; @@ -6281,7 +6271,6 @@ export interface FieldPatch { max?: number; tags?: string[]; category?: ObjectCategory; - scope?: number; createdAt?: string; updatedAt?: string; } @@ -6301,7 +6290,6 @@ export interface TablePatch { description?: string; smartTags?: unknown; category?: ObjectCategory; - scope?: number; useRls?: boolean; timestamps?: boolean; peoplestamps?: boolean; @@ -6346,11 +6334,6 @@ export interface DeleteViewGrantInput { clientMutationId?: string; id: string; } -export interface DeleteApiInput { - clientMutationId?: string; - /** Unique identifier for this API */ - id: string; -} export interface DeleteCorsSettingInput { clientMutationId?: string; /** Unique identifier for this CORS settings record */ @@ -6370,6 +6353,11 @@ export interface DeleteSiteModuleInput { /** Unique identifier for this site module record */ id: string; } +export interface DeleteApiInput { + clientMutationId?: string; + /** Unique identifier for this API */ + id: string; +} export interface DeleteSiteMetadatumInput { clientMutationId?: string; /** Unique identifier for this metadata record */ @@ -6396,11 +6384,6 @@ export interface DeleteTableGrantInput { clientMutationId?: string; id: string; } -export interface DeleteDomainInput { - clientMutationId?: string; - /** Unique identifier for this domain record */ - id: string; -} export interface DeleteRlsSettingInput { clientMutationId?: string; /** Unique identifier for this RLS settings record */ @@ -6414,6 +6397,11 @@ export interface DeletePartitionInput { clientMutationId?: string; id: string; } +export interface DeleteDomainInput { + clientMutationId?: string; + /** Unique identifier for this domain record */ + id: string; +} export interface DeleteCompositeTypeInput { clientMutationId?: string; id: string; @@ -6426,41 +6414,40 @@ export interface DeleteViewInput { clientMutationId?: string; id: string; } -export interface DeleteDatabaseSettingInput { +export interface DeletePrimaryKeyConstraintInput { clientMutationId?: string; - /** Unique identifier for this settings record */ id: string; } -export interface DeleteApiSettingInput { +export interface DeleteTriggerInput { clientMutationId?: string; - /** Unique identifier for this API settings record */ id: string; } -export interface DeleteDatabaseTransferInput { +export interface DeleteCheckConstraintInput { clientMutationId?: string; id: string; } -export interface DeletePrimaryKeyConstraintInput { +export interface DeleteUniqueConstraintInput { clientMutationId?: string; id: string; } -export interface DeleteTriggerInput { +export interface DeleteSpatialRelationInput { clientMutationId?: string; id: string; } -export interface DeleteCheckConstraintInput { +export interface DeletePolicyInput { clientMutationId?: string; id: string; } -export interface DeleteUniqueConstraintInput { +export interface DeleteApiSettingInput { clientMutationId?: string; + /** Unique identifier for this API settings record */ id: string; } -export interface DeleteSpatialRelationInput { +export interface DeleteDatabaseTransferInput { clientMutationId?: string; id: string; } -export interface DeletePolicyInput { +export interface DeleteIndexInput { clientMutationId?: string; id: string; } @@ -6469,13 +6456,14 @@ export interface DeleteAppInput { /** Unique identifier for this app */ id: string; } -export interface DeleteSiteInput { +export interface DeleteDatabaseSettingInput { clientMutationId?: string; - /** Unique identifier for this site */ + /** Unique identifier for this settings record */ id: string; } -export interface DeleteIndexInput { +export interface DeleteSiteInput { clientMutationId?: string; + /** Unique identifier for this site */ id: string; } export interface DeleteForeignKeyConstraintInput { @@ -6568,13 +6556,6 @@ export interface ViewGrantConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `Api` values. */ -export interface ApiConnection { - nodes: Api[]; - edges: ApiEdge[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `CorsSetting` values. */ export interface CorsSettingConnection { nodes: CorsSetting[]; @@ -6603,6 +6584,13 @@ export interface SiteModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `Api` values. */ +export interface ApiConnection { + nodes: Api[]; + edges: ApiEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `SiteMetadatum` values. */ export interface SiteMetadatumConnection { nodes: SiteMetadatum[]; @@ -6645,13 +6633,6 @@ export interface TableGrantConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `Domain` values. */ -export interface DomainConnection { - nodes: Domain[]; - edges: DomainEdge[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `RlsSetting` values. */ export interface RlsSettingConnection { nodes: RlsSetting[]; @@ -6673,6 +6654,13 @@ export interface PartitionConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `Domain` values. */ +export interface DomainConnection { + nodes: Domain[]; + edges: DomainEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `CompositeType` values. */ export interface CompositeTypeConnection { nodes: CompositeType[]; @@ -6687,13 +6675,6 @@ export interface EnumConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `SqlAction` values. */ -export interface SqlActionConnection { - nodes: SqlAction[]; - edges: SqlActionEdge[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `View` values. */ export interface ViewConnection { nodes: View[]; @@ -6701,24 +6682,10 @@ export interface ViewConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `DatabaseSetting` values. */ -export interface DatabaseSettingConnection { - nodes: DatabaseSetting[]; - edges: DatabaseSettingEdge[]; - pageInfo: PageInfo; - totalCount: number; -} -/** A connection to a list of `ApiSetting` values. */ -export interface ApiSettingConnection { - nodes: ApiSetting[]; - edges: ApiSettingEdge[]; - pageInfo: PageInfo; - totalCount: number; -} -/** A connection to a list of `DatabaseTransfer` values. */ -export interface DatabaseTransferConnection { - nodes: DatabaseTransfer[]; - edges: DatabaseTransferEdge[]; +/** A connection to a list of `SqlAction` values. */ +export interface SqlActionConnection { + nodes: SqlAction[]; + edges: SqlActionEdge[]; pageInfo: PageInfo; totalCount: number; } @@ -6764,6 +6731,27 @@ export interface PolicyConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `ApiSetting` values. */ +export interface ApiSettingConnection { + nodes: ApiSetting[]; + edges: ApiSettingEdge[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `DatabaseTransfer` values. */ +export interface DatabaseTransferConnection { + nodes: DatabaseTransfer[]; + edges: DatabaseTransferEdge[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `Index` values. */ +export interface IndexConnection { + nodes: Index[]; + edges: IndexEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `App` values. */ export interface AppConnection { nodes: App[]; @@ -6771,6 +6759,13 @@ export interface AppConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `DatabaseSetting` values. */ +export interface DatabaseSettingConnection { + nodes: DatabaseSetting[]; + edges: DatabaseSettingEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `Site` values. */ export interface SiteConnection { nodes: Site[]; @@ -6778,13 +6773,6 @@ export interface SiteConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `Index` values. */ -export interface IndexConnection { - nodes: Index[]; - edges: IndexEdge[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `ForeignKeyConstraint` values. */ export interface ForeignKeyConstraintConnection { nodes: ForeignKeyConstraint[]; @@ -6915,12 +6903,6 @@ export interface CreateViewGrantPayload { viewGrant?: ViewGrant | null; viewGrantEdge?: ViewGrantEdge | null; } -export interface CreateApiPayload { - clientMutationId?: string | null; - /** The `Api` that was created by this mutation. */ - api?: Api | null; - apiEdge?: ApiEdge | null; -} export interface CreateCorsSettingPayload { clientMutationId?: string | null; /** The `CorsSetting` that was created by this mutation. */ @@ -6945,6 +6927,12 @@ export interface CreateSiteModulePayload { siteModule?: SiteModule | null; siteModuleEdge?: SiteModuleEdge | null; } +export interface CreateApiPayload { + clientMutationId?: string | null; + /** The `Api` that was created by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; +} export interface CreateSiteMetadatumPayload { clientMutationId?: string | null; /** The `SiteMetadatum` that was created by this mutation. */ @@ -6981,12 +6969,6 @@ export interface CreateTableGrantPayload { tableGrant?: TableGrant | null; tableGrantEdge?: TableGrantEdge | null; } -export interface CreateDomainPayload { - clientMutationId?: string | null; - /** The `Domain` that was created by this mutation. */ - domain?: Domain | null; - domainEdge?: DomainEdge | null; -} export interface CreateRlsSettingPayload { clientMutationId?: string | null; /** The `RlsSetting` that was created by this mutation. */ @@ -7005,6 +6987,12 @@ export interface CreatePartitionPayload { partition?: Partition | null; partitionEdge?: PartitionEdge | null; } +export interface CreateDomainPayload { + clientMutationId?: string | null; + /** The `Domain` that was created by this mutation. */ + domain?: Domain | null; + domainEdge?: DomainEdge | null; +} export interface CreateCompositeTypePayload { clientMutationId?: string | null; /** The `CompositeType` that was created by this mutation. */ @@ -7017,34 +7005,16 @@ export interface CreateEnumPayload { enum?: Enum | null; enumEdge?: EnumEdge | null; } -export interface CreateSqlActionPayload { - clientMutationId?: string | null; - /** The `SqlAction` that was created by this mutation. */ - sqlAction?: SqlAction | null; -} export interface CreateViewPayload { clientMutationId?: string | null; /** The `View` that was created by this mutation. */ view?: View | null; viewEdge?: ViewEdge | null; } -export interface CreateDatabaseSettingPayload { - clientMutationId?: string | null; - /** The `DatabaseSetting` that was created by this mutation. */ - databaseSetting?: DatabaseSetting | null; - databaseSettingEdge?: DatabaseSettingEdge | null; -} -export interface CreateApiSettingPayload { - clientMutationId?: string | null; - /** The `ApiSetting` that was created by this mutation. */ - apiSetting?: ApiSetting | null; - apiSettingEdge?: ApiSettingEdge | null; -} -export interface CreateDatabaseTransferPayload { +export interface CreateSqlActionPayload { clientMutationId?: string | null; - /** The `DatabaseTransfer` that was created by this mutation. */ - databaseTransfer?: DatabaseTransfer | null; - databaseTransferEdge?: DatabaseTransferEdge | null; + /** The `SqlAction` that was created by this mutation. */ + sqlAction?: SqlAction | null; } export interface CreatePrimaryKeyConstraintPayload { clientMutationId?: string | null; @@ -7082,24 +7052,42 @@ export interface CreatePolicyPayload { policy?: Policy | null; policyEdge?: PolicyEdge | null; } +export interface CreateApiSettingPayload { + clientMutationId?: string | null; + /** The `ApiSetting` that was created by this mutation. */ + apiSetting?: ApiSetting | null; + apiSettingEdge?: ApiSettingEdge | null; +} +export interface CreateDatabaseTransferPayload { + clientMutationId?: string | null; + /** The `DatabaseTransfer` that was created by this mutation. */ + databaseTransfer?: DatabaseTransfer | null; + databaseTransferEdge?: DatabaseTransferEdge | null; +} +export interface CreateIndexPayload { + clientMutationId?: string | null; + /** The `Index` that was created by this mutation. */ + index?: Index | null; + indexEdge?: IndexEdge | null; +} export interface CreateAppPayload { clientMutationId?: string | null; /** The `App` that was created by this mutation. */ app?: App | null; appEdge?: AppEdge | null; } +export interface CreateDatabaseSettingPayload { + clientMutationId?: string | null; + /** The `DatabaseSetting` that was created by this mutation. */ + databaseSetting?: DatabaseSetting | null; + databaseSettingEdge?: DatabaseSettingEdge | null; +} export interface CreateSitePayload { clientMutationId?: string | null; /** The `Site` that was created by this mutation. */ site?: Site | null; siteEdge?: SiteEdge | null; } -export interface CreateIndexPayload { - clientMutationId?: string | null; - /** The `Index` that was created by this mutation. */ - index?: Index | null; - indexEdge?: IndexEdge | null; -} export interface CreateForeignKeyConstraintPayload { clientMutationId?: string | null; /** The `ForeignKeyConstraint` that was created by this mutation. */ @@ -7183,12 +7171,6 @@ export interface UpdateViewGrantPayload { viewGrant?: ViewGrant | null; viewGrantEdge?: ViewGrantEdge | null; } -export interface UpdateApiPayload { - clientMutationId?: string | null; - /** The `Api` that was updated by this mutation. */ - api?: Api | null; - apiEdge?: ApiEdge | null; -} export interface UpdateCorsSettingPayload { clientMutationId?: string | null; /** The `CorsSetting` that was updated by this mutation. */ @@ -7213,6 +7195,12 @@ export interface UpdateSiteModulePayload { siteModule?: SiteModule | null; siteModuleEdge?: SiteModuleEdge | null; } +export interface UpdateApiPayload { + clientMutationId?: string | null; + /** The `Api` that was updated by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; +} export interface UpdateSiteMetadatumPayload { clientMutationId?: string | null; /** The `SiteMetadatum` that was updated by this mutation. */ @@ -7249,12 +7237,6 @@ export interface UpdateTableGrantPayload { tableGrant?: TableGrant | null; tableGrantEdge?: TableGrantEdge | null; } -export interface UpdateDomainPayload { - clientMutationId?: string | null; - /** The `Domain` that was updated by this mutation. */ - domain?: Domain | null; - domainEdge?: DomainEdge | null; -} export interface UpdateRlsSettingPayload { clientMutationId?: string | null; /** The `RlsSetting` that was updated by this mutation. */ @@ -7273,6 +7255,12 @@ export interface UpdatePartitionPayload { partition?: Partition | null; partitionEdge?: PartitionEdge | null; } +export interface UpdateDomainPayload { + clientMutationId?: string | null; + /** The `Domain` that was updated by this mutation. */ + domain?: Domain | null; + domainEdge?: DomainEdge | null; +} export interface UpdateCompositeTypePayload { clientMutationId?: string | null; /** The `CompositeType` that was updated by this mutation. */ @@ -7291,24 +7279,6 @@ export interface UpdateViewPayload { view?: View | null; viewEdge?: ViewEdge | null; } -export interface UpdateDatabaseSettingPayload { - clientMutationId?: string | null; - /** The `DatabaseSetting` that was updated by this mutation. */ - databaseSetting?: DatabaseSetting | null; - databaseSettingEdge?: DatabaseSettingEdge | null; -} -export interface UpdateApiSettingPayload { - clientMutationId?: string | null; - /** The `ApiSetting` that was updated by this mutation. */ - apiSetting?: ApiSetting | null; - apiSettingEdge?: ApiSettingEdge | null; -} -export interface UpdateDatabaseTransferPayload { - clientMutationId?: string | null; - /** The `DatabaseTransfer` that was updated by this mutation. */ - databaseTransfer?: DatabaseTransfer | null; - databaseTransferEdge?: DatabaseTransferEdge | null; -} export interface UpdatePrimaryKeyConstraintPayload { clientMutationId?: string | null; /** The `PrimaryKeyConstraint` that was updated by this mutation. */ @@ -7345,24 +7315,42 @@ export interface UpdatePolicyPayload { policy?: Policy | null; policyEdge?: PolicyEdge | null; } +export interface UpdateApiSettingPayload { + clientMutationId?: string | null; + /** The `ApiSetting` that was updated by this mutation. */ + apiSetting?: ApiSetting | null; + apiSettingEdge?: ApiSettingEdge | null; +} +export interface UpdateDatabaseTransferPayload { + clientMutationId?: string | null; + /** The `DatabaseTransfer` that was updated by this mutation. */ + databaseTransfer?: DatabaseTransfer | null; + databaseTransferEdge?: DatabaseTransferEdge | null; +} +export interface UpdateIndexPayload { + clientMutationId?: string | null; + /** The `Index` that was updated by this mutation. */ + index?: Index | null; + indexEdge?: IndexEdge | null; +} export interface UpdateAppPayload { clientMutationId?: string | null; /** The `App` that was updated by this mutation. */ app?: App | null; appEdge?: AppEdge | null; } +export interface UpdateDatabaseSettingPayload { + clientMutationId?: string | null; + /** The `DatabaseSetting` that was updated by this mutation. */ + databaseSetting?: DatabaseSetting | null; + databaseSettingEdge?: DatabaseSettingEdge | null; +} export interface UpdateSitePayload { clientMutationId?: string | null; /** The `Site` that was updated by this mutation. */ site?: Site | null; siteEdge?: SiteEdge | null; } -export interface UpdateIndexPayload { - clientMutationId?: string | null; - /** The `Index` that was updated by this mutation. */ - index?: Index | null; - indexEdge?: IndexEdge | null; -} export interface UpdateForeignKeyConstraintPayload { clientMutationId?: string | null; /** The `ForeignKeyConstraint` that was updated by this mutation. */ @@ -7441,12 +7429,6 @@ export interface DeleteViewGrantPayload { viewGrant?: ViewGrant | null; viewGrantEdge?: ViewGrantEdge | null; } -export interface DeleteApiPayload { - clientMutationId?: string | null; - /** The `Api` that was deleted by this mutation. */ - api?: Api | null; - apiEdge?: ApiEdge | null; -} export interface DeleteCorsSettingPayload { clientMutationId?: string | null; /** The `CorsSetting` that was deleted by this mutation. */ @@ -7471,6 +7453,12 @@ export interface DeleteSiteModulePayload { siteModule?: SiteModule | null; siteModuleEdge?: SiteModuleEdge | null; } +export interface DeleteApiPayload { + clientMutationId?: string | null; + /** The `Api` that was deleted by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; +} export interface DeleteSiteMetadatumPayload { clientMutationId?: string | null; /** The `SiteMetadatum` that was deleted by this mutation. */ @@ -7507,12 +7495,6 @@ export interface DeleteTableGrantPayload { tableGrant?: TableGrant | null; tableGrantEdge?: TableGrantEdge | null; } -export interface DeleteDomainPayload { - clientMutationId?: string | null; - /** The `Domain` that was deleted by this mutation. */ - domain?: Domain | null; - domainEdge?: DomainEdge | null; -} export interface DeleteRlsSettingPayload { clientMutationId?: string | null; /** The `RlsSetting` that was deleted by this mutation. */ @@ -7531,6 +7513,12 @@ export interface DeletePartitionPayload { partition?: Partition | null; partitionEdge?: PartitionEdge | null; } +export interface DeleteDomainPayload { + clientMutationId?: string | null; + /** The `Domain` that was deleted by this mutation. */ + domain?: Domain | null; + domainEdge?: DomainEdge | null; +} export interface DeleteCompositeTypePayload { clientMutationId?: string | null; /** The `CompositeType` that was deleted by this mutation. */ @@ -7549,24 +7537,6 @@ export interface DeleteViewPayload { view?: View | null; viewEdge?: ViewEdge | null; } -export interface DeleteDatabaseSettingPayload { - clientMutationId?: string | null; - /** The `DatabaseSetting` that was deleted by this mutation. */ - databaseSetting?: DatabaseSetting | null; - databaseSettingEdge?: DatabaseSettingEdge | null; -} -export interface DeleteApiSettingPayload { - clientMutationId?: string | null; - /** The `ApiSetting` that was deleted by this mutation. */ - apiSetting?: ApiSetting | null; - apiSettingEdge?: ApiSettingEdge | null; -} -export interface DeleteDatabaseTransferPayload { - clientMutationId?: string | null; - /** The `DatabaseTransfer` that was deleted by this mutation. */ - databaseTransfer?: DatabaseTransfer | null; - databaseTransferEdge?: DatabaseTransferEdge | null; -} export interface DeletePrimaryKeyConstraintPayload { clientMutationId?: string | null; /** The `PrimaryKeyConstraint` that was deleted by this mutation. */ @@ -7603,24 +7573,42 @@ export interface DeletePolicyPayload { policy?: Policy | null; policyEdge?: PolicyEdge | null; } +export interface DeleteApiSettingPayload { + clientMutationId?: string | null; + /** The `ApiSetting` that was deleted by this mutation. */ + apiSetting?: ApiSetting | null; + apiSettingEdge?: ApiSettingEdge | null; +} +export interface DeleteDatabaseTransferPayload { + clientMutationId?: string | null; + /** The `DatabaseTransfer` that was deleted by this mutation. */ + databaseTransfer?: DatabaseTransfer | null; + databaseTransferEdge?: DatabaseTransferEdge | null; +} +export interface DeleteIndexPayload { + clientMutationId?: string | null; + /** The `Index` that was deleted by this mutation. */ + index?: Index | null; + indexEdge?: IndexEdge | null; +} export interface DeleteAppPayload { clientMutationId?: string | null; /** The `App` that was deleted by this mutation. */ app?: App | null; appEdge?: AppEdge | null; } +export interface DeleteDatabaseSettingPayload { + clientMutationId?: string | null; + /** The `DatabaseSetting` that was deleted by this mutation. */ + databaseSetting?: DatabaseSetting | null; + databaseSettingEdge?: DatabaseSettingEdge | null; +} export interface DeleteSitePayload { clientMutationId?: string | null; /** The `Site` that was deleted by this mutation. */ site?: Site | null; siteEdge?: SiteEdge | null; } -export interface DeleteIndexPayload { - clientMutationId?: string | null; - /** The `Index` that was deleted by this mutation. */ - index?: Index | null; - indexEdge?: IndexEdge | null; -} export interface DeleteForeignKeyConstraintPayload { clientMutationId?: string | null; /** The `ForeignKeyConstraint` that was deleted by this mutation. */ @@ -7730,12 +7718,6 @@ export interface ViewGrantEdge { /** The `ViewGrant` at the end of the edge. */ node?: ViewGrant | null; } -/** A `Api` edge in the connection. */ -export interface ApiEdge { - cursor?: string | null; - /** The `Api` at the end of the edge. */ - node?: Api | null; -} /** A `CorsSetting` edge in the connection. */ export interface CorsSettingEdge { cursor?: string | null; @@ -7760,6 +7742,12 @@ export interface SiteModuleEdge { /** The `SiteModule` at the end of the edge. */ node?: SiteModule | null; } +/** A `Api` edge in the connection. */ +export interface ApiEdge { + cursor?: string | null; + /** The `Api` at the end of the edge. */ + node?: Api | null; +} /** A `SiteMetadatum` edge in the connection. */ export interface SiteMetadatumEdge { cursor?: string | null; @@ -7796,12 +7784,6 @@ export interface TableGrantEdge { /** The `TableGrant` at the end of the edge. */ node?: TableGrant | null; } -/** A `Domain` edge in the connection. */ -export interface DomainEdge { - cursor?: string | null; - /** The `Domain` at the end of the edge. */ - node?: Domain | null; -} /** A `RlsSetting` edge in the connection. */ export interface RlsSettingEdge { cursor?: string | null; @@ -7820,6 +7802,12 @@ export interface PartitionEdge { /** The `Partition` at the end of the edge. */ node?: Partition | null; } +/** A `Domain` edge in the connection. */ +export interface DomainEdge { + cursor?: string | null; + /** The `Domain` at the end of the edge. */ + node?: Domain | null; +} /** A `CompositeType` edge in the connection. */ export interface CompositeTypeEdge { cursor?: string | null; @@ -7832,35 +7820,17 @@ export interface EnumEdge { /** The `Enum` at the end of the edge. */ node?: Enum | null; } -/** A `SqlAction` edge in the connection. */ -export interface SqlActionEdge { - cursor?: string | null; - /** The `SqlAction` at the end of the edge. */ - node?: SqlAction | null; -} /** A `View` edge in the connection. */ export interface ViewEdge { cursor?: string | null; /** The `View` at the end of the edge. */ node?: View | null; } -/** A `DatabaseSetting` edge in the connection. */ -export interface DatabaseSettingEdge { - cursor?: string | null; - /** The `DatabaseSetting` at the end of the edge. */ - node?: DatabaseSetting | null; -} -/** A `ApiSetting` edge in the connection. */ -export interface ApiSettingEdge { - cursor?: string | null; - /** The `ApiSetting` at the end of the edge. */ - node?: ApiSetting | null; -} -/** A `DatabaseTransfer` edge in the connection. */ -export interface DatabaseTransferEdge { +/** A `SqlAction` edge in the connection. */ +export interface SqlActionEdge { cursor?: string | null; - /** The `DatabaseTransfer` at the end of the edge. */ - node?: DatabaseTransfer | null; + /** The `SqlAction` at the end of the edge. */ + node?: SqlAction | null; } /** A `PrimaryKeyConstraint` edge in the connection. */ export interface PrimaryKeyConstraintEdge { @@ -7898,24 +7868,42 @@ export interface PolicyEdge { /** The `Policy` at the end of the edge. */ node?: Policy | null; } +/** A `ApiSetting` edge in the connection. */ +export interface ApiSettingEdge { + cursor?: string | null; + /** The `ApiSetting` at the end of the edge. */ + node?: ApiSetting | null; +} +/** A `DatabaseTransfer` edge in the connection. */ +export interface DatabaseTransferEdge { + cursor?: string | null; + /** The `DatabaseTransfer` at the end of the edge. */ + node?: DatabaseTransfer | null; +} +/** A `Index` edge in the connection. */ +export interface IndexEdge { + cursor?: string | null; + /** The `Index` at the end of the edge. */ + node?: Index | null; +} /** A `App` edge in the connection. */ export interface AppEdge { cursor?: string | null; /** The `App` at the end of the edge. */ node?: App | null; } +/** A `DatabaseSetting` edge in the connection. */ +export interface DatabaseSettingEdge { + cursor?: string | null; + /** The `DatabaseSetting` at the end of the edge. */ + node?: DatabaseSetting | null; +} /** A `Site` edge in the connection. */ export interface SiteEdge { cursor?: string | null; /** The `Site` at the end of the edge. */ node?: Site | null; } -/** A `Index` edge in the connection. */ -export interface IndexEdge { - cursor?: string | null; - /** The `Index` at the end of the edge. */ - node?: Index | null; -} /** A `ForeignKeyConstraint` edge in the connection. */ export interface ForeignKeyConstraintEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/api/types.ts b/sdk/constructive-react/src/api/types.ts index a4155812c2..71e58656e5 100644 --- a/sdk/constructive-react/src/api/types.ts +++ b/sdk/constructive-react/src/api/types.ts @@ -24,7 +24,6 @@ export interface Schema { description: string | null; smartTags: unknown | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; isPublic: boolean | null; apiExposure: ApiExposureLevel | null; @@ -40,7 +39,6 @@ export interface Table { description: string | null; smartTags: unknown | null; category: ObjectCategory | null; - scope: number | null; useRls: boolean | null; timestamps: boolean | null; peoplestamps: boolean | null; @@ -65,7 +63,6 @@ export interface CheckConstraint { expr: unknown | null; smartTags: unknown | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; createdAt: string | null; updatedAt: string | null; @@ -90,7 +87,6 @@ export interface Field { max: number | null; tags: string[] | null; category: ObjectCategory | null; - scope: number | null; createdAt: string | null; updatedAt: string | null; } @@ -105,7 +101,6 @@ export interface SpatialRelation { operator: string | null; paramName: string | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; createdAt: string | null; updatedAt: string | null; @@ -124,7 +119,6 @@ export interface ForeignKeyConstraint { deleteAction: string | null; updateAction: string | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; createdAt: string | null; updatedAt: string | null; @@ -156,7 +150,6 @@ export interface Index { opClasses: string[] | null; smartTags: unknown | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; createdAt: string | null; updatedAt: string | null; @@ -174,7 +167,6 @@ export interface Policy { data: unknown | null; smartTags: unknown | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; createdAt: string | null; updatedAt: string | null; @@ -188,7 +180,6 @@ export interface PrimaryKeyConstraint { fieldIds: string[] | null; smartTags: unknown | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; createdAt: string | null; updatedAt: string | null; @@ -213,7 +204,6 @@ export interface Trigger { functionName: string | null; smartTags: unknown | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; createdAt: string | null; updatedAt: string | null; @@ -228,7 +218,6 @@ export interface UniqueConstraint { type: string | null; fieldIds: string[] | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; createdAt: string | null; updatedAt: string | null; @@ -247,7 +236,6 @@ export interface View { isReadOnly: boolean | null; smartTags: unknown | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; } export interface ViewTable { @@ -324,7 +312,6 @@ export interface Enum { values: string[] | null; smartTags: unknown | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; } export interface CompositeType { @@ -337,7 +324,6 @@ export interface CompositeType { attributes: unknown | null; smartTags: unknown | null; category: ObjectCategory | null; - scope: number | null; tags: string[] | null; } export interface ApiSchema { @@ -358,8 +344,11 @@ export interface Domain { databaseId: string | null; apiId: string | null; siteId: string | null; + serviceId: string | null; subdomain: ConstructiveInternalTypeHostname | null; domain: ConstructiveInternalTypeHostname | null; + labels: unknown | null; + annotations: unknown | null; } export interface SiteMetadatum { id: string | null; @@ -435,6 +424,8 @@ export interface Api { roleName: string | null; anonRole: string | null; isPublic: boolean | null; + labels: unknown | null; + annotations: unknown | null; } export interface Site { id: string | null; @@ -446,6 +437,8 @@ export interface Site { appleTouchIcon: ConstructiveInternalTypeImage | null; logo: ConstructiveInternalTypeImage | null; dbname: string | null; + labels: unknown | null; + annotations: unknown | null; } export interface App { id: string | null; @@ -554,6 +547,8 @@ export interface DatabaseSetting { enableBulk: boolean | null; enableI18N: boolean | null; options: unknown | null; + labels: unknown | null; + annotations: unknown | null; } export interface WebauthnSetting { id: string | null; diff --git a/sdk/constructive-react/src/auth/README.md b/sdk/constructive-react/src/auth/README.md index 68a599dfc4..a8c147a4a4 100644 --- a/sdk/constructive-react/src/auth/README.md +++ b/sdk/constructive-react/src/auth/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 9 +- **Tables:** 13 - **Custom queries:** 5 -- **Custom mutations:** 25 +- **Custom mutations:** 29 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/auth/hooks/README.md b/sdk/constructive-react/src/auth/hooks/README.md index 9f6a662440..7251540918 100644 --- a/sdk/constructive-react/src/auth/hooks/README.md +++ b/sdk/constructive-react/src/auth/hooks/README.md @@ -32,6 +32,21 @@ function App() { | Hook | Type | Description | |------|------|-------------| +| `usePrincipalsQuery` | Query | Scoped sub-identities (API keys and agents) with precomputed SPRT | +| `usePrincipalQuery` | Query | Scoped sub-identities (API keys and agents) with precomputed SPRT | +| `useCreatePrincipalMutation` | Mutation | Scoped sub-identities (API keys and agents) with precomputed SPRT | +| `useUpdatePrincipalMutation` | Mutation | Scoped sub-identities (API keys and agents) with precomputed SPRT | +| `useDeletePrincipalMutation` | Mutation | Scoped sub-identities (API keys and agents) with precomputed SPRT | +| `usePrincipalEntitiesQuery` | Query | Association table scoping principals to specific organizations | +| `usePrincipalEntityQuery` | Query | Association table scoping principals to specific organizations | +| `useCreatePrincipalEntityMutation` | Mutation | Association table scoping principals to specific organizations | +| `useUpdatePrincipalEntityMutation` | Mutation | Association table scoping principals to specific organizations | +| `useDeletePrincipalEntityMutation` | Mutation | Association table scoping principals to specific organizations | +| `usePrincipalScopeOverridesQuery` | Query | Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. | +| `usePrincipalScopeOverrideQuery` | Query | Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. | +| `useCreatePrincipalScopeOverrideMutation` | Mutation | Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. | +| `useUpdatePrincipalScopeOverrideMutation` | Mutation | Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. | +| `useDeletePrincipalScopeOverrideMutation` | Mutation | Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. | | `useEmailsQuery` | Query | User email addresses with verification and primary-email management | | `useEmailQuery` | Query | User email addresses with verification and primary-email management | | `useCreateEmailMutation` | Mutation | User email addresses with verification and primary-email management | @@ -69,25 +84,32 @@ function App() { | `useCreateUserConnectedAccountMutation` | Mutation | Create a userConnectedAccount | | `useUpdateUserConnectedAccountMutation` | Mutation | Update a userConnectedAccount | | `useDeleteUserConnectedAccountMutation` | Mutation | Delete a userConnectedAccount | +| `useOrgApiKeyListsQuery` | Query | List all orgApiKeyLists | +| `useOrgApiKeyListQuery` | Query | Get one orgApiKeyList | +| `useCreateOrgApiKeyListMutation` | Mutation | Create a orgApiKeyList | +| `useUpdateOrgApiKeyListMutation` | Mutation | Update a orgApiKeyList | +| `useDeleteOrgApiKeyListMutation` | Mutation | Delete a orgApiKeyList | | `useUsersQuery` | Query | List all users | | `useUserQuery` | Query | Get one user | | `useCreateUserMutation` | Mutation | Create a user | | `useUpdateUserMutation` | Mutation | Update a user | | `useDeleteUserMutation` | Mutation | Delete a user | | `useCurrentUserAgentQuery` | Query | currentUserAgent | -| `useCurrentIpAddressQuery` | Query | currentIpAddress | | `useCurrentUserIdQuery` | Query | currentUserId | +| `useCurrentIpAddressQuery` | Query | currentIpAddress | | `useRequireStepUpQuery` | Query | requireStepUp | | `useCurrentUserQuery` | Query | currentUser | | `useSignOutMutation` | Mutation | signOut | | `useSendAccountDeletionEmailMutation` | Mutation | sendAccountDeletionEmail | | `useCheckPasswordMutation` | Mutation | checkPassword | +| `useDeleteOrgPrincipalMutation` | Mutation | deleteOrgPrincipal | | `useDisconnectAccountMutation` | Mutation | disconnectAccount | | `useRevokeApiKeyMutation` | Mutation | revokeApiKey | | `useRevokeSessionMutation` | Mutation | revokeSession | | `useVerifyPasswordMutation` | Mutation | verifyPassword | | `useVerifyTotpMutation` | Mutation | verifyTotp | | `useConfirmDeleteAccountMutation` | Mutation | confirmDeleteAccount | +| `useRevokeOrgApiKeyMutation` | Mutation | revokeOrgApiKey | | `useSetPasswordMutation` | Mutation | setPassword | | `useVerifyEmailMutation` | Mutation | verifyEmail | | `useProvisionNewUserMutation` | Mutation | provisionNewUser | @@ -98,7 +120,9 @@ function App() { | `useSignUpMutation` | Mutation | signUp | | `useSignInMutation` | Mutation | signIn | | `useLinkIdentityMutation` | Mutation | linkIdentity | +| `useCreateOrgPrincipalMutation` | Mutation | createOrgPrincipal | | `useExtendTokenExpiresMutation` | Mutation | extendTokenExpires | +| `useCreateOrgApiKeyMutation` | Mutation | createOrgApiKey | | `useCreateApiKeyMutation` | Mutation | createApiKey | | `useRequestCrossOriginTokenMutation` | Mutation | requestCrossOriginToken | | `useForgotPasswordMutation` | Mutation | forgotPassword | @@ -110,6 +134,69 @@ and lifecycle settings. | ## Table Hooks +### Principal + +```typescript +// List all principals +const { data, isLoading } = usePrincipalsQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, ownerId: true, userId: true, name: true, allowedMask: true, isReadOnly: true, bypassStepUp: true } }, +}); + +// Get one principal +const { data: item } = usePrincipalQuery({ + principalId: '', + selection: { fields: { id: true, createdAt: true, updatedAt: true, ownerId: true, userId: true, name: true, allowedMask: true, isReadOnly: true, bypassStepUp: true } }, +}); + +// Create a principal +const { mutate: create } = useCreatePrincipalMutation({ + selection: { fields: { principalId: true } }, +}); +create({ id: '', ownerId: '', userId: '', name: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' }); +``` + +### PrincipalEntity + +```typescript +// List all principalEntities +const { data, isLoading } = usePrincipalEntitiesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, principalId: true, entityId: true, ownerId: true } }, +}); + +// Get one principalEntity +const { data: item } = usePrincipalEntityQuery({ + id: '', + selection: { fields: { id: true, createdAt: true, updatedAt: true, principalId: true, entityId: true, ownerId: true } }, +}); + +// Create a principalEntity +const { mutate: create } = useCreatePrincipalEntityMutation({ + selection: { fields: { id: true } }, +}); +create({ principalId: '', entityId: '', ownerId: '' }); +``` + +### PrincipalScopeOverride + +```typescript +// List all principalScopeOverrides +const { data, isLoading } = usePrincipalScopeOverridesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, principalId: true, membershipType: true, allowedMask: true, isAdmin: true, isReadOnly: true } }, +}); + +// Get one principalScopeOverride +const { data: item } = usePrincipalScopeOverrideQuery({ + id: '', + selection: { fields: { id: true, createdAt: true, updatedAt: true, principalId: true, membershipType: true, allowedMask: true, isAdmin: true, isReadOnly: true } }, +}); + +// Create a principalScopeOverride +const { mutate: create } = useCreatePrincipalScopeOverrideMutation({ + selection: { fields: { id: true } }, +}); +create({ principalId: '', membershipType: '', allowedMask: '', isAdmin: '', isReadOnly: '' }); +``` + ### Email ```typescript @@ -272,6 +359,27 @@ const { mutate: create } = useCreateUserConnectedAccountMutation({ create({ ownerId: '', service: '', identifier: '', details: '', isVerified: '' }); ``` +### OrgApiKeyList + +```typescript +// List all orgApiKeyLists +const { data, isLoading } = useOrgApiKeyListsQuery({ + selection: { fields: { id: true, keyId: true, name: true, principalId: true, orgId: true, expiresAt: true, revokedAt: true, lastUsedAt: true, mfaLevel: true, accessLevel: true, createdAt: true, updatedAt: true } }, +}); + +// Get one orgApiKeyList +const { data: item } = useOrgApiKeyListQuery({ + id: '', + selection: { fields: { id: true, keyId: true, name: true, principalId: true, orgId: true, expiresAt: true, revokedAt: true, lastUsedAt: true, mfaLevel: true, accessLevel: true, createdAt: true, updatedAt: true } }, +}); + +// Create a orgApiKeyList +const { mutate: create } = useCreateOrgApiKeyListMutation({ + selection: { fields: { id: true } }, +}); +create({ keyId: '', name: '', principalId: '', orgId: '', expiresAt: '', revokedAt: '', lastUsedAt: '', mfaLevel: '', accessLevel: '' }); +``` + ### User ```typescript @@ -302,16 +410,16 @@ currentUserAgent - **Type:** query - **Arguments:** none -### `useCurrentIpAddressQuery` +### `useCurrentUserIdQuery` -currentIpAddress +currentUserId - **Type:** query - **Arguments:** none -### `useCurrentUserIdQuery` +### `useCurrentIpAddressQuery` -currentUserId +currentIpAddress - **Type:** query - **Arguments:** none @@ -367,6 +475,17 @@ checkPassword |----------|------| | `input` | CheckPasswordInput (required) | +### `useDeleteOrgPrincipalMutation` + +deleteOrgPrincipal + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DeleteOrgPrincipalInput (required) | + ### `useDisconnectAccountMutation` disconnectAccount @@ -433,6 +552,17 @@ confirmDeleteAccount |----------|------| | `input` | ConfirmDeleteAccountInput (required) | +### `useRevokeOrgApiKeyMutation` + +revokeOrgApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeOrgApiKeyInput (required) | + ### `useSetPasswordMutation` setPassword @@ -543,6 +673,17 @@ linkIdentity |----------|------| | `input` | LinkIdentityInput (required) | +### `useCreateOrgPrincipalMutation` + +createOrgPrincipal + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateOrgPrincipalInput (required) | + ### `useExtendTokenExpiresMutation` extendTokenExpires @@ -554,6 +695,17 @@ extendTokenExpires |----------|------| | `input` | ExtendTokenExpiresInput (required) | +### `useCreateOrgApiKeyMutation` + +createOrgApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateOrgApiKeyInput (required) | + ### `useCreateApiKeyMutation` createApiKey diff --git a/sdk/constructive-react/src/auth/hooks/index.ts b/sdk/constructive-react/src/auth/hooks/index.ts index 4d4f35cad9..3c7b66c74b 100644 --- a/sdk/constructive-react/src/auth/hooks/index.ts +++ b/sdk/constructive-react/src/auth/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: Email, PhoneNumber, CryptoAddress, WebauthnCredential, AuditLogAuth, IdentityProvider, RoleType, UserConnectedAccount, User + * Tables: Principal, PrincipalEntity, PrincipalScopeOverride, Email, PhoneNumber, CryptoAddress, WebauthnCredential, AuditLogAuth, IdentityProvider, RoleType, UserConnectedAccount, OrgApiKeyList, User * * Usage: * diff --git a/sdk/constructive-react/src/auth/hooks/invalidation.ts b/sdk/constructive-react/src/auth/hooks/invalidation.ts index a741da131e..8665adcbef 100644 --- a/sdk/constructive-react/src/auth/hooks/invalidation.ts +++ b/sdk/constructive-react/src/auth/hooks/invalidation.ts @@ -15,6 +15,9 @@ import type { QueryClient } from '@tanstack/react-query'; import { + principalKeys, + principalEntityKeys, + principalScopeOverrideKeys, emailKeys, phoneNumberKeys, cryptoAddressKeys, @@ -23,6 +26,7 @@ import { identityProviderKeys, roleTypeKeys, userConnectedAccountKeys, + orgApiKeyListKeys, userKeys, } from './query-keys'; /** @@ -45,6 +49,57 @@ import { * ``` */ export const invalidate = { + /** Invalidate principal queries */ principal: { + /** Invalidate all principal queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: principalKeys.all, + }), + /** Invalidate principal list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: principalKeys.lists(), + }), + /** Invalidate a specific principal */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: principalKeys.detail(id), + }), + }, + /** Invalidate principalEntity queries */ principalEntity: { + /** Invalidate all principalEntity queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: principalEntityKeys.all, + }), + /** Invalidate principalEntity list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: principalEntityKeys.lists(), + }), + /** Invalidate a specific principalEntity */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: principalEntityKeys.detail(id), + }), + }, + /** Invalidate principalScopeOverride queries */ principalScopeOverride: { + /** Invalidate all principalScopeOverride queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: principalScopeOverrideKeys.all, + }), + /** Invalidate principalScopeOverride list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: principalScopeOverrideKeys.lists(), + }), + /** Invalidate a specific principalScopeOverride */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: principalScopeOverrideKeys.detail(id), + }), + }, /** Invalidate email queries */ email: { /** Invalidate all email queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -175,6 +230,23 @@ export const invalidate = { queryKey: userConnectedAccountKeys.detail(id), }), }, + /** Invalidate orgApiKeyList queries */ orgApiKeyList: { + /** Invalidate all orgApiKeyList queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgApiKeyListKeys.all, + }), + /** Invalidate orgApiKeyList list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgApiKeyListKeys.lists(), + }), + /** Invalidate a specific orgApiKeyList */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: orgApiKeyListKeys.detail(id), + }), + }, /** Invalidate user queries */ user: { /** Invalidate all user queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -202,6 +274,27 @@ export const invalidate = { * instead of just invalidating (which would trigger a refetch). */ export const remove = { + /** Remove principal from cache */ principal: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: principalKeys.detail(id), + }); + }, + /** Remove principalEntity from cache */ principalEntity: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: principalEntityKeys.detail(id), + }); + }, + /** Remove principalScopeOverride from cache */ principalScopeOverride: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: principalScopeOverrideKeys.detail(id), + }); + }, /** Remove email from cache */ email: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: emailKeys.detail(id), @@ -260,6 +353,14 @@ export const remove = { queryKey: userConnectedAccountKeys.detail(id), }); }, + /** Remove orgApiKeyList from cache */ orgApiKeyList: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: orgApiKeyListKeys.detail(id), + }); + }, /** Remove user from cache */ user: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: userKeys.detail(id), diff --git a/sdk/constructive-react/src/auth/hooks/mutation-keys.ts b/sdk/constructive-react/src/auth/hooks/mutation-keys.ts index a8ccdee7d7..badc510206 100644 --- a/sdk/constructive-react/src/auth/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/auth/hooks/mutation-keys.ts @@ -18,6 +18,35 @@ // Entity Mutation Keys // ============================================================================ +export const principalMutationKeys = { + /** All principal mutation keys */ all: ['mutation', 'principal'] as const, + /** Create principal mutation key */ create: () => ['mutation', 'principal', 'create'] as const, + /** Update principal mutation key */ update: (id: string | number) => + ['mutation', 'principal', 'update', id] as const, + /** Delete principal mutation key */ delete: (id: string | number) => + ['mutation', 'principal', 'delete', id] as const, +} as const; +export const principalEntityMutationKeys = { + /** All principalEntity mutation keys */ all: ['mutation', 'principalentity'] as const, + /** Create principalEntity mutation key */ create: () => + ['mutation', 'principalentity', 'create'] as const, + /** Update principalEntity mutation key */ update: (id: string | number) => + ['mutation', 'principalentity', 'update', id] as const, + /** Delete principalEntity mutation key */ delete: (id: string | number) => + ['mutation', 'principalentity', 'delete', id] as const, +} as const; +export const principalScopeOverrideMutationKeys = { + /** All principalScopeOverride mutation keys */ all: [ + 'mutation', + 'principalscopeoverride', + ] as const, + /** Create principalScopeOverride mutation key */ create: () => + ['mutation', 'principalscopeoverride', 'create'] as const, + /** Update principalScopeOverride mutation key */ update: (id: string | number) => + ['mutation', 'principalscopeoverride', 'update', id] as const, + /** Delete principalScopeOverride mutation key */ delete: (id: string | number) => + ['mutation', 'principalscopeoverride', 'delete', id] as const, +} as const; export const emailMutationKeys = { /** All email mutation keys */ all: ['mutation', 'email'] as const, /** Create email mutation key */ create: () => ['mutation', 'email', 'create'] as const, @@ -88,6 +117,15 @@ export const userConnectedAccountMutationKeys = { /** Delete userConnectedAccount mutation key */ delete: (id: string | number) => ['mutation', 'userconnectedaccount', 'delete', id] as const, } as const; +export const orgApiKeyListMutationKeys = { + /** All orgApiKeyList mutation keys */ all: ['mutation', 'orgapikeylist'] as const, + /** Create orgApiKeyList mutation key */ create: () => + ['mutation', 'orgapikeylist', 'create'] as const, + /** Update orgApiKeyList mutation key */ update: (id: string | number) => + ['mutation', 'orgapikeylist', 'update', id] as const, + /** Delete orgApiKeyList mutation key */ delete: (id: string | number) => + ['mutation', 'orgapikeylist', 'delete', id] as const, +} as const; export const userMutationKeys = { /** All user mutation keys */ all: ['mutation', 'user'] as const, /** Create user mutation key */ create: () => ['mutation', 'user', 'create'] as const, @@ -116,6 +154,10 @@ export const customMutationKeys = { identifier ? (['mutation', 'checkPassword', identifier] as const) : (['mutation', 'checkPassword'] as const), + /** Mutation key for deleteOrgPrincipal */ deleteOrgPrincipal: (identifier?: string) => + identifier + ? (['mutation', 'deleteOrgPrincipal', identifier] as const) + : (['mutation', 'deleteOrgPrincipal'] as const), /** Mutation key for disconnectAccount */ disconnectAccount: (identifier?: string) => identifier ? (['mutation', 'disconnectAccount', identifier] as const) @@ -140,6 +182,10 @@ export const customMutationKeys = { identifier ? (['mutation', 'confirmDeleteAccount', identifier] as const) : (['mutation', 'confirmDeleteAccount'] as const), + /** Mutation key for revokeOrgApiKey */ revokeOrgApiKey: (identifier?: string) => + identifier + ? (['mutation', 'revokeOrgApiKey', identifier] as const) + : (['mutation', 'revokeOrgApiKey'] as const), /** Mutation key for setPassword */ setPassword: (identifier?: string) => identifier ? (['mutation', 'setPassword', identifier] as const) @@ -176,10 +222,18 @@ export const customMutationKeys = { identifier ? (['mutation', 'linkIdentity', identifier] as const) : (['mutation', 'linkIdentity'] as const), + /** Mutation key for createOrgPrincipal */ createOrgPrincipal: (identifier?: string) => + identifier + ? (['mutation', 'createOrgPrincipal', identifier] as const) + : (['mutation', 'createOrgPrincipal'] as const), /** Mutation key for extendTokenExpires */ extendTokenExpires: (identifier?: string) => identifier ? (['mutation', 'extendTokenExpires', identifier] as const) : (['mutation', 'extendTokenExpires'] as const), + /** Mutation key for createOrgApiKey */ createOrgApiKey: (identifier?: string) => + identifier + ? (['mutation', 'createOrgApiKey', identifier] as const) + : (['mutation', 'createOrgApiKey'] as const), /** Mutation key for createApiKey */ createApiKey: (identifier?: string) => identifier ? (['mutation', 'createApiKey', identifier] as const) @@ -224,6 +278,9 @@ export const customMutationKeys = { * ``` */ export const mutationKeys = { + principal: principalMutationKeys, + principalEntity: principalEntityMutationKeys, + principalScopeOverride: principalScopeOverrideMutationKeys, email: emailMutationKeys, phoneNumber: phoneNumberMutationKeys, cryptoAddress: cryptoAddressMutationKeys, @@ -232,6 +289,7 @@ export const mutationKeys = { identityProvider: identityProviderMutationKeys, roleType: roleTypeMutationKeys, userConnectedAccount: userConnectedAccountMutationKeys, + orgApiKeyList: orgApiKeyListMutationKeys, user: userMutationKeys, custom: customMutationKeys, } as const; diff --git a/sdk/constructive-react/src/auth/hooks/mutations/index.ts b/sdk/constructive-react/src/auth/hooks/mutations/index.ts index 91e5cfdec7..c068e69ef7 100644 --- a/sdk/constructive-react/src/auth/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/auth/hooks/mutations/index.ts @@ -3,6 +3,12 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export * from './useCreatePrincipalMutation'; +export * from './useDeletePrincipalMutation'; +export * from './useCreatePrincipalEntityMutation'; +export * from './useUpdatePrincipalEntityMutation'; +export * from './useDeletePrincipalEntityMutation'; +export * from './useCreatePrincipalScopeOverrideMutation'; export * from './useCreateEmailMutation'; export * from './useUpdateEmailMutation'; export * from './useDeleteEmailMutation'; @@ -23,18 +29,21 @@ export * from './useCreateRoleTypeMutation'; export * from './useUpdateRoleTypeMutation'; export * from './useDeleteRoleTypeMutation'; export * from './useCreateUserConnectedAccountMutation'; +export * from './useCreateOrgApiKeyListMutation'; export * from './useCreateUserMutation'; export * from './useUpdateUserMutation'; export * from './useDeleteUserMutation'; export * from './useSignOutMutation'; export * from './useSendAccountDeletionEmailMutation'; export * from './useCheckPasswordMutation'; +export * from './useDeleteOrgPrincipalMutation'; export * from './useDisconnectAccountMutation'; export * from './useRevokeApiKeyMutation'; export * from './useRevokeSessionMutation'; export * from './useVerifyPasswordMutation'; export * from './useVerifyTotpMutation'; export * from './useConfirmDeleteAccountMutation'; +export * from './useRevokeOrgApiKeyMutation'; export * from './useSetPasswordMutation'; export * from './useVerifyEmailMutation'; export * from './useProvisionNewUserMutation'; @@ -45,7 +54,9 @@ export * from './useSignUpSmsMutation'; export * from './useSignUpMutation'; export * from './useSignInMutation'; export * from './useLinkIdentityMutation'; +export * from './useCreateOrgPrincipalMutation'; export * from './useExtendTokenExpiresMutation'; +export * from './useCreateOrgApiKeyMutation'; export * from './useCreateApiKeyMutation'; export * from './useRequestCrossOriginTokenMutation'; export * from './useForgotPasswordMutation'; diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgApiKeyListMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgApiKeyListMutation.ts new file mode 100644 index 0000000000..8ee7097912 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgApiKeyListMutation.ts @@ -0,0 +1,88 @@ +/** + * Create mutation hook for OrgApiKeyList + * @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 { orgApiKeyListKeys } from '../query-keys'; +import { orgApiKeyListMutationKeys } from '../mutation-keys'; +import type { + OrgApiKeyListSelect, + OrgApiKeyListWithRelations, + CreateOrgApiKeyListInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgApiKeyListSelect, + OrgApiKeyListWithRelations, + CreateOrgApiKeyListInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a OrgApiKeyList + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgApiKeyListMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgApiKeyListMutation( + params: { + selection: { + fields: S & OrgApiKeyListSelect; + } & HookStrictSelect, OrgApiKeyListSelect>; + } & Omit< + UseMutationOptions< + { + createOrgApiKeyList: { + orgApiKeyList: InferSelectResult; + }; + }, + Error, + CreateOrgApiKeyListInput['orgApiKeyList'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgApiKeyList: { + orgApiKeyList: InferSelectResult; + }; + }, + Error, + CreateOrgApiKeyListInput['orgApiKeyList'] +>; +export function useCreateOrgApiKeyListMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgApiKeyListMutationKeys.create(), + mutationFn: (data: CreateOrgApiKeyListInput['orgApiKeyList']) => + getClient() + .orgApiKeyList.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgApiKeyListKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgApiKeyMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgApiKeyMutation.ts new file mode 100644 index 0000000000..c04772ebde --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgApiKeyMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for createOrgApiKey + * @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 { CreateOrgApiKeyVariables } from '../../orm/mutation'; +import type { CreateOrgApiKeyPayloadSelect, CreateOrgApiKeyPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { CreateOrgApiKeyVariables } from '../../orm/mutation'; +export type { CreateOrgApiKeyPayloadSelect } from '../../orm/input-types'; +export function useCreateOrgApiKeyMutation( + params: { + selection: { + fields: S & CreateOrgApiKeyPayloadSelect; + } & HookStrictSelect, CreateOrgApiKeyPayloadSelect>; + } & Omit< + UseMutationOptions< + { + createOrgApiKey: InferSelectResult | null; + }, + Error, + CreateOrgApiKeyVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgApiKey: InferSelectResult | null; + }, + Error, + CreateOrgApiKeyVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.createOrgApiKey(), + mutationFn: (variables: CreateOrgApiKeyVariables) => + getClient() + .mutation.createOrgApiKey(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgPrincipalMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgPrincipalMutation.ts new file mode 100644 index 0000000000..26f019f9cc --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useCreateOrgPrincipalMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for createOrgPrincipal + * @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 { CreateOrgPrincipalVariables } from '../../orm/mutation'; +import type { + CreateOrgPrincipalPayloadSelect, + CreateOrgPrincipalPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { CreateOrgPrincipalVariables } from '../../orm/mutation'; +export type { CreateOrgPrincipalPayloadSelect } from '../../orm/input-types'; +export function useCreateOrgPrincipalMutation( + params: { + selection: { + fields: S & CreateOrgPrincipalPayloadSelect; + } & HookStrictSelect, CreateOrgPrincipalPayloadSelect>; + } & Omit< + UseMutationOptions< + { + createOrgPrincipal: InferSelectResult | null; + }, + Error, + CreateOrgPrincipalVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgPrincipal: InferSelectResult | null; + }, + Error, + CreateOrgPrincipalVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.createOrgPrincipal(), + mutationFn: (variables: CreateOrgPrincipalVariables) => + getClient() + .mutation.createOrgPrincipal(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalEntityMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalEntityMutation.ts new file mode 100644 index 0000000000..16edd29ff9 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalEntityMutation.ts @@ -0,0 +1,91 @@ +/** + * Association table scoping principals to specific organizations + * @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 { principalEntityKeys } from '../query-keys'; +import { principalEntityMutationKeys } from '../mutation-keys'; +import type { + PrincipalEntitySelect, + PrincipalEntityWithRelations, + CreatePrincipalEntityInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PrincipalEntitySelect, + PrincipalEntityWithRelations, + CreatePrincipalEntityInput, +} from '../../orm/input-types'; +/** + * Association table scoping principals to specific organizations + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePrincipalEntityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePrincipalEntityMutation( + params: { + selection: { + fields: S & PrincipalEntitySelect; + } & HookStrictSelect, PrincipalEntitySelect>; + } & Omit< + UseMutationOptions< + { + createPrincipalEntity: { + principalEntity: InferSelectResult; + }; + }, + Error, + CreatePrincipalEntityInput['principalEntity'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPrincipalEntity: { + principalEntity: InferSelectResult; + }; + }, + Error, + CreatePrincipalEntityInput['principalEntity'] +>; +export function useCreatePrincipalEntityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: principalEntityMutationKeys.create(), + mutationFn: (data: CreatePrincipalEntityInput['principalEntity']) => + getClient() + .principalEntity.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: principalEntityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalMutation.ts new file mode 100644 index 0000000000..6b805d782c --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalMutation.ts @@ -0,0 +1,88 @@ +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * @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 { principalKeys } from '../query-keys'; +import { principalMutationKeys } from '../mutation-keys'; +import type { + PrincipalSelect, + PrincipalWithRelations, + CreatePrincipalInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PrincipalSelect, + PrincipalWithRelations, + CreatePrincipalInput, +} from '../../orm/input-types'; +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePrincipalMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePrincipalMutation( + params: { + selection: { + fields: S & PrincipalSelect; + } & HookStrictSelect, PrincipalSelect>; + } & Omit< + UseMutationOptions< + { + createPrincipal: { + principal: InferSelectResult; + }; + }, + Error, + CreatePrincipalInput['principal'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPrincipal: { + principal: InferSelectResult; + }; + }, + Error, + CreatePrincipalInput['principal'] +>; +export function useCreatePrincipalMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: principalMutationKeys.create(), + mutationFn: (data: CreatePrincipalInput['principal']) => + getClient() + .principal.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: principalKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalScopeOverrideMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalScopeOverrideMutation.ts new file mode 100644 index 0000000000..c54e6183dd --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalScopeOverrideMutation.ts @@ -0,0 +1,91 @@ +/** + * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * @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 { principalScopeOverrideKeys } from '../query-keys'; +import { principalScopeOverrideMutationKeys } from '../mutation-keys'; +import type { + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideWithRelations, + CreatePrincipalScopeOverrideInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideWithRelations, + CreatePrincipalScopeOverrideInput, +} from '../../orm/input-types'; +/** + * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePrincipalScopeOverrideMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePrincipalScopeOverrideMutation( + params: { + selection: { + fields: S & PrincipalScopeOverrideSelect; + } & HookStrictSelect, PrincipalScopeOverrideSelect>; + } & Omit< + UseMutationOptions< + { + createPrincipalScopeOverride: { + principalScopeOverride: InferSelectResult; + }; + }, + Error, + CreatePrincipalScopeOverrideInput['principalScopeOverride'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPrincipalScopeOverride: { + principalScopeOverride: InferSelectResult; + }; + }, + Error, + CreatePrincipalScopeOverrideInput['principalScopeOverride'] +>; +export function useCreatePrincipalScopeOverrideMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: principalScopeOverrideMutationKeys.create(), + mutationFn: (data: CreatePrincipalScopeOverrideInput['principalScopeOverride']) => + getClient() + .principalScopeOverride.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: principalScopeOverrideKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useDeleteOrgPrincipalMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useDeleteOrgPrincipalMutation.ts new file mode 100644 index 0000000000..a5fd0a0422 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useDeleteOrgPrincipalMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for deleteOrgPrincipal + * @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 { DeleteOrgPrincipalVariables } from '../../orm/mutation'; +import type { + DeleteOrgPrincipalPayloadSelect, + DeleteOrgPrincipalPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { DeleteOrgPrincipalVariables } from '../../orm/mutation'; +export type { DeleteOrgPrincipalPayloadSelect } from '../../orm/input-types'; +export function useDeleteOrgPrincipalMutation( + params: { + selection: { + fields: S & DeleteOrgPrincipalPayloadSelect; + } & HookStrictSelect, DeleteOrgPrincipalPayloadSelect>; + } & Omit< + UseMutationOptions< + { + deleteOrgPrincipal: InferSelectResult | null; + }, + Error, + DeleteOrgPrincipalVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteOrgPrincipal: InferSelectResult | null; + }, + Error, + DeleteOrgPrincipalVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.deleteOrgPrincipal(), + mutationFn: (variables: DeleteOrgPrincipalVariables) => + getClient() + .mutation.deleteOrgPrincipal(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useDeletePrincipalEntityMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useDeletePrincipalEntityMutation.ts new file mode 100644 index 0000000000..f084cb2466 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useDeletePrincipalEntityMutation.ts @@ -0,0 +1,98 @@ +/** + * Association table scoping principals to specific organizations + * @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 { principalEntityKeys } from '../query-keys'; +import { principalEntityMutationKeys } from '../mutation-keys'; +import type { PrincipalEntitySelect, PrincipalEntityWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PrincipalEntitySelect, PrincipalEntityWithRelations } from '../../orm/input-types'; +/** + * Association table scoping principals to specific organizations + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePrincipalEntityMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePrincipalEntityMutation( + params: { + selection: { + fields: S & PrincipalEntitySelect; + } & HookStrictSelect, PrincipalEntitySelect>; + } & Omit< + UseMutationOptions< + { + deletePrincipalEntity: { + principalEntity: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePrincipalEntity: { + principalEntity: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePrincipalEntityMutation( + 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: principalEntityMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .principalEntity.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: principalEntityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: principalEntityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useDeletePrincipalMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useDeletePrincipalMutation.ts new file mode 100644 index 0000000000..80296db9fb --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useDeletePrincipalMutation.ts @@ -0,0 +1,98 @@ +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * @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 { principalKeys } from '../query-keys'; +import { principalMutationKeys } from '../mutation-keys'; +import type { PrincipalSelect, PrincipalWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PrincipalSelect, PrincipalWithRelations } from '../../orm/input-types'; +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePrincipalMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ principalId: 'value-to-delete' }); + * ``` + */ +export function useDeletePrincipalMutation( + params: { + selection: { + fields: S & PrincipalSelect; + } & HookStrictSelect, PrincipalSelect>; + } & Omit< + UseMutationOptions< + { + deletePrincipal: { + principal: InferSelectResult; + }; + }, + Error, + { + principalId: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePrincipal: { + principal: InferSelectResult; + }; + }, + Error, + { + principalId: string; + } +>; +export function useDeletePrincipalMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + principalId: string; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: principalMutationKeys.all, + mutationFn: ({ principalId }: { principalId: string }) => + getClient() + .principal.delete({ + where: { + principalId, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: principalKeys.detail(variables.principalId), + }); + queryClient.invalidateQueries({ + queryKey: principalKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useRevokeOrgApiKeyMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useRevokeOrgApiKeyMutation.ts new file mode 100644 index 0000000000..69d97ad4c7 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useRevokeOrgApiKeyMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for revokeOrgApiKey + * @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 { RevokeOrgApiKeyVariables } from '../../orm/mutation'; +import type { RevokeOrgApiKeyPayloadSelect, RevokeOrgApiKeyPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { RevokeOrgApiKeyVariables } from '../../orm/mutation'; +export type { RevokeOrgApiKeyPayloadSelect } from '../../orm/input-types'; +export function useRevokeOrgApiKeyMutation( + params: { + selection: { + fields: S & RevokeOrgApiKeyPayloadSelect; + } & HookStrictSelect, RevokeOrgApiKeyPayloadSelect>; + } & Omit< + UseMutationOptions< + { + revokeOrgApiKey: InferSelectResult | null; + }, + Error, + RevokeOrgApiKeyVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + revokeOrgApiKey: InferSelectResult | null; + }, + Error, + RevokeOrgApiKeyVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.revokeOrgApiKey(), + mutationFn: (variables: RevokeOrgApiKeyVariables) => + getClient() + .mutation.revokeOrgApiKey(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useUpdatePrincipalEntityMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useUpdatePrincipalEntityMutation.ts new file mode 100644 index 0000000000..3c6e55c0a1 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useUpdatePrincipalEntityMutation.ts @@ -0,0 +1,116 @@ +/** + * Association table scoping principals to specific organizations + * @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 { principalEntityKeys } from '../query-keys'; +import { principalEntityMutationKeys } from '../mutation-keys'; +import type { + PrincipalEntitySelect, + PrincipalEntityWithRelations, + PrincipalEntityPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PrincipalEntitySelect, + PrincipalEntityWithRelations, + PrincipalEntityPatch, +} from '../../orm/input-types'; +/** + * Association table scoping principals to specific organizations + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePrincipalEntityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', principalEntityPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePrincipalEntityMutation( + params: { + selection: { + fields: S & PrincipalEntitySelect; + } & HookStrictSelect, PrincipalEntitySelect>; + } & Omit< + UseMutationOptions< + { + updatePrincipalEntity: { + principalEntity: InferSelectResult; + }; + }, + Error, + { + id: string; + principalEntityPatch: PrincipalEntityPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePrincipalEntity: { + principalEntity: InferSelectResult; + }; + }, + Error, + { + id: string; + principalEntityPatch: PrincipalEntityPatch; + } +>; +export function useUpdatePrincipalEntityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + principalEntityPatch: PrincipalEntityPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: principalEntityMutationKeys.all, + mutationFn: ({ + id, + principalEntityPatch, + }: { + id: string; + principalEntityPatch: PrincipalEntityPatch; + }) => + getClient() + .principalEntity.update({ + where: { + id, + }, + data: principalEntityPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: principalEntityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: principalEntityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/index.ts b/sdk/constructive-react/src/auth/hooks/queries/index.ts index 1360e7d8da..75187fba9a 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/index.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/index.ts @@ -3,6 +3,12 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export * from './usePrincipalsQuery'; +export * from './usePrincipalQuery'; +export * from './usePrincipalEntitiesQuery'; +export * from './usePrincipalEntityQuery'; +export * from './usePrincipalScopeOverridesQuery'; +export * from './usePrincipalScopeOverrideQuery'; export * from './useEmailsQuery'; export * from './useEmailQuery'; export * from './usePhoneNumbersQuery'; @@ -18,10 +24,12 @@ export * from './useRoleTypesQuery'; export * from './useRoleTypeQuery'; export * from './useUserConnectedAccountsQuery'; export * from './useUserConnectedAccountQuery'; +export * from './useOrgApiKeyListsQuery'; +export * from './useOrgApiKeyListQuery'; export * from './useUsersQuery'; export * from './useUserQuery'; export * from './useCurrentUserAgentQuery'; -export * from './useCurrentIpAddressQuery'; export * from './useCurrentUserIdQuery'; +export * from './useCurrentIpAddressQuery'; export * from './useRequireStepUpQuery'; export * from './useCurrentUserQuery'; diff --git a/sdk/constructive-react/src/auth/hooks/queries/useOrgApiKeyListQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useOrgApiKeyListQuery.ts new file mode 100644 index 0000000000..77ac426fde --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/useOrgApiKeyListQuery.ts @@ -0,0 +1,138 @@ +/** + * Single item query hook for OrgApiKeyList + * @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 { orgApiKeyListKeys } from '../query-keys'; +import type { OrgApiKeyListSelect, OrgApiKeyListWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { OrgApiKeyListSelect, OrgApiKeyListWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgApiKeyListQueryKey = orgApiKeyListKeys.detail; +/** + * Query hook for fetching a single OrgApiKeyList + * + * @example + * ```tsx + * const { data, isLoading } = useOrgApiKeyListQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOrgApiKeyListQuery< + S extends OrgApiKeyListSelect, + TData = { + orgApiKeyList: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgApiKeyListSelect>; + } & Omit< + UseQueryOptions< + { + orgApiKeyList: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgApiKeyListQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgApiKeyListKeys.detail(params.id), + queryFn: () => + getClient() + .orgApiKeyList.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single OrgApiKeyList without React hooks + * + * @example + * ```ts + * const data = await fetchOrgApiKeyListQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOrgApiKeyListQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgApiKeyListSelect>; +}): Promise<{ + orgApiKeyList: InferSelectResult | null; +}>; +export async function fetchOrgApiKeyListQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .orgApiKeyList.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single OrgApiKeyList for SSR or cache warming + * + * @example + * ```ts + * await prefetchOrgApiKeyListQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOrgApiKeyListQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgApiKeyListSelect>; + } +): Promise; +export async function prefetchOrgApiKeyListQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgApiKeyListKeys.detail(params.id), + queryFn: () => + getClient() + .orgApiKeyList.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/useOrgApiKeyListsQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useOrgApiKeyListsQuery.ts new file mode 100644 index 0000000000..3657e56ab4 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/useOrgApiKeyListsQuery.ts @@ -0,0 +1,151 @@ +/** + * List query hook for OrgApiKeyList + * @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 { orgApiKeyListKeys } from '../query-keys'; +import type { + OrgApiKeyListSelect, + OrgApiKeyListWithRelations, + OrgApiKeyListFilter, + OrgApiKeyListOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgApiKeyListSelect, + OrgApiKeyListWithRelations, + OrgApiKeyListFilter, + OrgApiKeyListOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgApiKeyListsQueryKey = orgApiKeyListKeys.list; +/** + * Query hook for fetching OrgApiKeyList list + * + * @example + * ```tsx + * const { data, isLoading } = useOrgApiKeyListsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgApiKeyListsQuery< + S extends OrgApiKeyListSelect, + TData = { + orgApiKeyLists: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgApiKeyListSelect>; + } & Omit< + UseQueryOptions< + { + orgApiKeyLists: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgApiKeyListsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgApiKeyListSelect, + OrgApiKeyListFilter, + OrgApiKeyListOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgApiKeyListKeys.list(args), + queryFn: () => getClient().orgApiKeyList.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch OrgApiKeyList list without React hooks + * + * @example + * ```ts + * const data = await fetchOrgApiKeyListsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgApiKeyListsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgApiKeyListSelect>; +}): Promise<{ + orgApiKeyLists: ConnectionResult>; +}>; +export async function fetchOrgApiKeyListsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs< + OrgApiKeyListSelect, + OrgApiKeyListFilter, + OrgApiKeyListOrderBy + >(params.selection); + return getClient().orgApiKeyList.findMany(args).unwrap(); +} +/** + * Prefetch OrgApiKeyList list for SSR or cache warming + * + * @example + * ```ts + * await prefetchOrgApiKeyListsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgApiKeyListsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgApiKeyListSelect>; + } +): Promise; +export async function prefetchOrgApiKeyListsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs< + OrgApiKeyListSelect, + OrgApiKeyListFilter, + OrgApiKeyListOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgApiKeyListKeys.list(args), + queryFn: () => getClient().orgApiKeyList.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/usePrincipalEntitiesQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalEntitiesQuery.ts new file mode 100644 index 0000000000..0b56b03bcf --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalEntitiesQuery.ts @@ -0,0 +1,163 @@ +/** + * Association table scoping principals to specific organizations + * @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 { principalEntityKeys } from '../query-keys'; +import type { + PrincipalEntitySelect, + PrincipalEntityWithRelations, + PrincipalEntityFilter, + PrincipalEntityOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PrincipalEntitySelect, + PrincipalEntityWithRelations, + PrincipalEntityFilter, + PrincipalEntityOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const principalEntitiesQueryKey = principalEntityKeys.list; +/** + * Association table scoping principals to specific organizations + * + * @example + * ```tsx + * const { data, isLoading } = usePrincipalEntitiesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePrincipalEntitiesQuery< + S extends PrincipalEntitySelect, + TData = { + principalEntities: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PrincipalEntitySelect>; + } & Omit< + UseQueryOptions< + { + principalEntities: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePrincipalEntitiesQuery( + params: { + selection: ListSelectionConfig< + PrincipalEntitySelect, + PrincipalEntityFilter, + PrincipalEntityOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PrincipalEntitySelect, + PrincipalEntityFilter, + PrincipalEntityOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: principalEntityKeys.list(args), + queryFn: () => getClient().principalEntity.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Association table scoping principals to specific organizations + * + * @example + * ```ts + * const data = await fetchPrincipalEntitiesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPrincipalEntitiesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PrincipalEntitySelect>; +}): Promise<{ + principalEntities: ConnectionResult>; +}>; +export async function fetchPrincipalEntitiesQuery(params: { + selection: ListSelectionConfig< + PrincipalEntitySelect, + PrincipalEntityFilter, + PrincipalEntityOrderBy + >; +}) { + const args = buildListSelectionArgs< + PrincipalEntitySelect, + PrincipalEntityFilter, + PrincipalEntityOrderBy + >(params.selection); + return getClient().principalEntity.findMany(args).unwrap(); +} +/** + * Association table scoping principals to specific organizations + * + * @example + * ```ts + * await prefetchPrincipalEntitiesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPrincipalEntitiesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PrincipalEntitySelect>; + } +): Promise; +export async function prefetchPrincipalEntitiesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PrincipalEntitySelect, + PrincipalEntityFilter, + PrincipalEntityOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PrincipalEntitySelect, + PrincipalEntityFilter, + PrincipalEntityOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: principalEntityKeys.list(args), + queryFn: () => getClient().principalEntity.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/usePrincipalEntityQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalEntityQuery.ts new file mode 100644 index 0000000000..dac8ed3dce --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalEntityQuery.ts @@ -0,0 +1,138 @@ +/** + * Association table scoping principals to specific organizations + * @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 { principalEntityKeys } from '../query-keys'; +import type { PrincipalEntitySelect, PrincipalEntityWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PrincipalEntitySelect, PrincipalEntityWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const principalEntityQueryKey = principalEntityKeys.detail; +/** + * Association table scoping principals to specific organizations + * + * @example + * ```tsx + * const { data, isLoading } = usePrincipalEntityQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePrincipalEntityQuery< + S extends PrincipalEntitySelect, + TData = { + principalEntity: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalEntitySelect>; + } & Omit< + UseQueryOptions< + { + principalEntity: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePrincipalEntityQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: principalEntityKeys.detail(params.id), + queryFn: () => + getClient() + .principalEntity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Association table scoping principals to specific organizations + * + * @example + * ```ts + * const data = await fetchPrincipalEntityQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPrincipalEntityQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalEntitySelect>; +}): Promise<{ + principalEntity: InferSelectResult | null; +}>; +export async function fetchPrincipalEntityQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .principalEntity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Association table scoping principals to specific organizations + * + * @example + * ```ts + * await prefetchPrincipalEntityQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPrincipalEntityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalEntitySelect>; + } +): Promise; +export async function prefetchPrincipalEntityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: principalEntityKeys.detail(params.id), + queryFn: () => + getClient() + .principalEntity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/usePrincipalQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalQuery.ts new file mode 100644 index 0000000000..14b3d0a9d2 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalQuery.ts @@ -0,0 +1,138 @@ +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * @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 { principalKeys } from '../query-keys'; +import type { PrincipalSelect, PrincipalWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PrincipalSelect, PrincipalWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const principalQueryKey = principalKeys.detail; +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * + * @example + * ```tsx + * const { data, isLoading } = usePrincipalQuery({ + * principalId: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePrincipalQuery< + S extends PrincipalSelect, + TData = { + principal: InferSelectResult | null; + }, +>( + params: { + principalId: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalSelect>; + } & Omit< + UseQueryOptions< + { + principal: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePrincipalQuery( + params: { + principalId: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: principalKeys.detail(params.principalId), + queryFn: () => + getClient() + .principal.findOne({ + principalId: params.principalId, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * + * @example + * ```ts + * const data = await fetchPrincipalQuery({ + * principalId: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPrincipalQuery(params: { + principalId: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalSelect>; +}): Promise<{ + principal: InferSelectResult | null; +}>; +export async function fetchPrincipalQuery(params: { + principalId: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .principal.findOne({ + principalId: params.principalId, + select: args.select, + }) + .unwrap(); +} +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * + * @example + * ```ts + * await prefetchPrincipalQuery(queryClient, { principalId: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPrincipalQuery( + queryClient: QueryClient, + params: { + principalId: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalSelect>; + } +): Promise; +export async function prefetchPrincipalQuery( + queryClient: QueryClient, + params: { + principalId: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: principalKeys.detail(params.principalId), + queryFn: () => + getClient() + .principal.findOne({ + principalId: params.principalId, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverrideQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverrideQuery.ts new file mode 100644 index 0000000000..9930844113 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverrideQuery.ts @@ -0,0 +1,146 @@ +/** + * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * @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 { principalScopeOverrideKeys } from '../query-keys'; +import type { + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const principalScopeOverrideQueryKey = principalScopeOverrideKeys.detail; +/** + * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * + * @example + * ```tsx + * const { data, isLoading } = usePrincipalScopeOverrideQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePrincipalScopeOverrideQuery< + S extends PrincipalScopeOverrideSelect, + TData = { + principalScopeOverride: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalScopeOverrideSelect>; + } & Omit< + UseQueryOptions< + { + principalScopeOverride: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePrincipalScopeOverrideQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: principalScopeOverrideKeys.detail(params.id), + queryFn: () => + getClient() + .principalScopeOverride.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * + * @example + * ```ts + * const data = await fetchPrincipalScopeOverrideQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPrincipalScopeOverrideQuery< + S extends PrincipalScopeOverrideSelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalScopeOverrideSelect>; +}): Promise<{ + principalScopeOverride: InferSelectResult | null; +}>; +export async function fetchPrincipalScopeOverrideQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .principalScopeOverride.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * + * @example + * ```ts + * await prefetchPrincipalScopeOverrideQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPrincipalScopeOverrideQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalScopeOverrideSelect>; + } +): Promise; +export async function prefetchPrincipalScopeOverrideQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: principalScopeOverrideKeys.detail(params.id), + queryFn: () => + getClient() + .principalScopeOverride.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverridesQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverridesQuery.ts new file mode 100644 index 0000000000..521c5fdee6 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverridesQuery.ts @@ -0,0 +1,180 @@ +/** + * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * @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 { principalScopeOverrideKeys } from '../query-keys'; +import type { + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideWithRelations, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideWithRelations, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const principalScopeOverridesQueryKey = principalScopeOverrideKeys.list; +/** + * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * + * @example + * ```tsx + * const { data, isLoading } = usePrincipalScopeOverridesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePrincipalScopeOverridesQuery< + S extends PrincipalScopeOverrideSelect, + TData = { + principalScopeOverrides: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PrincipalScopeOverrideSelect>; + } & Omit< + UseQueryOptions< + { + principalScopeOverrides: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePrincipalScopeOverridesQuery( + params: { + selection: ListSelectionConfig< + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: principalScopeOverrideKeys.list(args), + queryFn: () => getClient().principalScopeOverride.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * + * @example + * ```ts + * const data = await fetchPrincipalScopeOverridesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPrincipalScopeOverridesQuery< + S extends PrincipalScopeOverrideSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PrincipalScopeOverrideSelect>; +}): Promise<{ + principalScopeOverrides: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchPrincipalScopeOverridesQuery(params: { + selection: ListSelectionConfig< + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy + >; +}) { + const args = buildListSelectionArgs< + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy + >(params.selection); + return getClient().principalScopeOverride.findMany(args).unwrap(); +} +/** + * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * + * @example + * ```ts + * await prefetchPrincipalScopeOverridesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPrincipalScopeOverridesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PrincipalScopeOverrideSelect>; + } +): Promise; +export async function prefetchPrincipalScopeOverridesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: principalScopeOverrideKeys.list(args), + queryFn: () => getClient().principalScopeOverride.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/usePrincipalsQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalsQuery.ts new file mode 100644 index 0000000000..1561904175 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalsQuery.ts @@ -0,0 +1,145 @@ +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * @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 { principalKeys } from '../query-keys'; +import type { + PrincipalSelect, + PrincipalWithRelations, + PrincipalFilter, + PrincipalOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PrincipalSelect, + PrincipalWithRelations, + PrincipalFilter, + PrincipalOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const principalsQueryKey = principalKeys.list; +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * + * @example + * ```tsx + * const { data, isLoading } = usePrincipalsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePrincipalsQuery< + S extends PrincipalSelect, + TData = { + principals: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PrincipalSelect>; + } & Omit< + UseQueryOptions< + { + principals: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePrincipalsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: principalKeys.list(args), + queryFn: () => getClient().principal.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * + * @example + * ```ts + * const data = await fetchPrincipalsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPrincipalsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PrincipalSelect>; +}): Promise<{ + principals: ConnectionResult>; +}>; +export async function fetchPrincipalsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().principal.findMany(args).unwrap(); +} +/** + * Scoped sub-identities (API keys and agents) with precomputed SPRT + * + * @example + * ```ts + * await prefetchPrincipalsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPrincipalsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PrincipalSelect>; + } +): Promise; +export async function prefetchPrincipalsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: principalKeys.list(args), + queryFn: () => getClient().principal.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/query-keys.ts b/sdk/constructive-react/src/auth/hooks/query-keys.ts index 32d6a1591b..316406bf6d 100644 --- a/sdk/constructive-react/src/auth/hooks/query-keys.ts +++ b/sdk/constructive-react/src/auth/hooks/query-keys.ts @@ -19,6 +19,33 @@ // Entity Query Keys // ============================================================================ +export const principalKeys = { + /** All principal queries */ all: ['principal'] as const, + /** List query keys */ lists: () => [...principalKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...principalKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...principalKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...principalKeys.details(), id] as const, +} as const; +export const principalEntityKeys = { + /** All principalEntity queries */ all: ['principalentity'] as const, + /** List query keys */ lists: () => [...principalEntityKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...principalEntityKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...principalEntityKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...principalEntityKeys.details(), id] as const, +} as const; +export const principalScopeOverrideKeys = { + /** All principalScopeOverride queries */ all: ['principalscopeoverride'] as const, + /** List query keys */ lists: () => [...principalScopeOverrideKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...principalScopeOverrideKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...principalScopeOverrideKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...principalScopeOverrideKeys.details(), id] as const, +} as const; export const emailKeys = { /** All email queries */ all: ['email'] as const, /** List query keys */ lists: () => [...emailKeys.all, 'list'] as const, @@ -91,6 +118,15 @@ export const userConnectedAccountKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...userConnectedAccountKeys.details(), id] as const, } as const; +export const orgApiKeyListKeys = { + /** All orgApiKeyList queries */ all: ['orgapikeylist'] as const, + /** List query keys */ lists: () => [...orgApiKeyListKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...orgApiKeyListKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgApiKeyListKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...orgApiKeyListKeys.details(), id] as const, +} as const; export const userKeys = { /** All user queries */ all: ['user'] as const, /** List query keys */ lists: () => [...userKeys.all, 'list'] as const, @@ -107,8 +143,8 @@ export const userKeys = { export const customQueryKeys = { /** Query key for currentUserAgent */ currentUserAgent: () => ['currentUserAgent'] as const, - /** Query key for currentIpAddress */ currentIpAddress: () => ['currentIpAddress'] as const, /** Query key for currentUserId */ currentUserId: () => ['currentUserId'] as const, + /** Query key for currentIpAddress */ currentIpAddress: () => ['currentIpAddress'] as const, /** Query key for requireStepUp */ requireStepUp: (variables?: object) => ['requireStepUp', variables] as const, /** Query key for currentUser */ currentUser: () => ['currentUser'] as const, @@ -136,6 +172,9 @@ export const customQueryKeys = { * ``` */ export const queryKeys = { + principal: principalKeys, + principalEntity: principalEntityKeys, + principalScopeOverride: principalScopeOverrideKeys, email: emailKeys, phoneNumber: phoneNumberKeys, cryptoAddress: cryptoAddressKeys, @@ -144,6 +183,7 @@ export const queryKeys = { identityProvider: identityProviderKeys, roleType: roleTypeKeys, userConnectedAccount: userConnectedAccountKeys, + orgApiKeyList: orgApiKeyListKeys, user: userKeys, custom: customQueryKeys, } as const; diff --git a/sdk/constructive-react/src/auth/orm/README.md b/sdk/constructive-react/src/auth/orm/README.md index 68bf0ce72d..343ccbb2bd 100644 --- a/sdk/constructive-react/src/auth/orm/README.md +++ b/sdk/constructive-react/src/auth/orm/README.md @@ -21,6 +21,9 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `principal` | findMany, findOne, create, update, delete | +| `principalEntity` | findMany, findOne, create, update, delete | +| `principalScopeOverride` | findMany, findOne, create, update, delete | | `email` | findMany, findOne, create, update, delete | | `phoneNumber` | findMany, findOne, create, update, delete | | `cryptoAddress` | findMany, findOne, create, update, delete | @@ -29,10 +32,118 @@ const db = createClient({ | `identityProvider` | findMany, findOne, create, update, delete | | `roleType` | findMany, findOne, create, update, delete | | `userConnectedAccount` | findMany, findOne, create, update, delete | +| `orgApiKeyList` | findMany, findOne, create, update, delete | | `user` | findMany, findOne, create, update, delete | ## Table Operations +### `db.principal` + +CRUD operations for Principal records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `ownerId` | UUID | Yes | +| `userId` | UUID | Yes | +| `name` | String | Yes | +| `allowedMask` | BitString | Yes | +| `isReadOnly` | Boolean | Yes | +| `bypassStepUp` | Boolean | Yes | + +**Operations:** + +```typescript +// List all principal records +const items = await db.principal.findMany({ select: { id: true, createdAt: true, updatedAt: true, ownerId: true, userId: true, name: true, allowedMask: true, isReadOnly: true, bypassStepUp: true } }).execute(); + +// Get one by principalId +const item = await db.principal.findOne({ principalId: '', select: { id: true, createdAt: true, updatedAt: true, ownerId: true, userId: true, name: true, allowedMask: true, isReadOnly: true, bypassStepUp: true } }).execute(); + +// Create +const created = await db.principal.create({ data: { id: '', ownerId: '', userId: '', name: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' }, select: { principalId: true } }).execute(); + +// Update +const updated = await db.principal.update({ where: { principalId: '' }, data: { id: '' }, select: { principalId: true } }).execute(); + +// Delete +const deleted = await db.principal.delete({ where: { principalId: '' } }).execute(); +``` + +### `db.principalEntity` + +CRUD operations for PrincipalEntity records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `principalId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `ownerId` | UUID | Yes | + +**Operations:** + +```typescript +// List all principalEntity records +const items = await db.principalEntity.findMany({ select: { id: true, createdAt: true, updatedAt: true, principalId: true, entityId: true, ownerId: true } }).execute(); + +// Get one by id +const item = await db.principalEntity.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, principalId: true, entityId: true, ownerId: true } }).execute(); + +// Create +const created = await db.principalEntity.create({ data: { principalId: '', entityId: '', ownerId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.principalEntity.update({ where: { id: '' }, data: { principalId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.principalEntity.delete({ where: { id: '' } }).execute(); +``` + +### `db.principalScopeOverride` + +CRUD operations for PrincipalScopeOverride records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `principalId` | UUID | Yes | +| `membershipType` | Int | Yes | +| `allowedMask` | BitString | Yes | +| `isAdmin` | Boolean | Yes | +| `isReadOnly` | Boolean | Yes | + +**Operations:** + +```typescript +// List all principalScopeOverride records +const items = await db.principalScopeOverride.findMany({ select: { id: true, createdAt: true, updatedAt: true, principalId: true, membershipType: true, allowedMask: true, isAdmin: true, isReadOnly: true } }).execute(); + +// Get one by id +const item = await db.principalScopeOverride.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, principalId: true, membershipType: true, allowedMask: true, isAdmin: true, isReadOnly: true } }).execute(); + +// Create +const created = await db.principalScopeOverride.create({ data: { principalId: '', membershipType: '', allowedMask: '', isAdmin: '', isReadOnly: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.principalScopeOverride.update({ where: { id: '' }, data: { principalId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.principalScopeOverride.delete({ where: { id: '' } }).execute(); +``` + ### `db.email` CRUD operations for Email records. @@ -319,6 +430,46 @@ const updated = await db.userConnectedAccount.update({ where: { id: '' }, const deleted = await db.userConnectedAccount.delete({ where: { id: '' } }).execute(); ``` +### `db.orgApiKeyList` + +CRUD operations for OrgApiKeyList records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `keyId` | String | Yes | +| `name` | String | Yes | +| `principalId` | UUID | Yes | +| `orgId` | UUID | Yes | +| `expiresAt` | Datetime | Yes | +| `revokedAt` | Datetime | Yes | +| `lastUsedAt` | Datetime | Yes | +| `mfaLevel` | String | Yes | +| `accessLevel` | String | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all orgApiKeyList records +const items = await db.orgApiKeyList.findMany({ select: { id: true, keyId: true, name: true, principalId: true, orgId: true, expiresAt: true, revokedAt: true, lastUsedAt: true, mfaLevel: true, accessLevel: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.orgApiKeyList.findOne({ id: '', select: { id: true, keyId: true, name: true, principalId: true, orgId: true, expiresAt: true, revokedAt: true, lastUsedAt: true, mfaLevel: true, accessLevel: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.orgApiKeyList.create({ data: { keyId: '', name: '', principalId: '', orgId: '', expiresAt: '', revokedAt: '', lastUsedAt: '', mfaLevel: '', accessLevel: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgApiKeyList.update({ where: { id: '' }, data: { keyId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgApiKeyList.delete({ where: { id: '' } }).execute(); +``` + ### `db.user` CRUD operations for User records. @@ -374,26 +525,26 @@ currentUserAgent const result = await db.query.currentUserAgent().execute(); ``` -### `db.query.currentIpAddress` +### `db.query.currentUserId` -currentIpAddress +currentUserId - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentIpAddress().execute(); +const result = await db.query.currentUserId().execute(); ``` -### `db.query.currentUserId` +### `db.query.currentIpAddress` -currentUserId +currentIpAddress - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentUserId().execute(); +const result = await db.query.currentIpAddress().execute(); ``` ### `db.query.requireStepUp` @@ -467,6 +618,21 @@ checkPassword const result = await db.mutation.checkPassword({ input: { password: '' } }).execute(); ``` +### `db.mutation.deleteOrgPrincipal` + +deleteOrgPrincipal + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DeleteOrgPrincipalInput (required) | + +```typescript +const result = await db.mutation.deleteOrgPrincipal({ input: { principalId: '' } }).execute(); +``` + ### `db.mutation.disconnectAccount` disconnectAccount @@ -557,6 +723,21 @@ confirmDeleteAccount const result = await db.mutation.confirmDeleteAccount({ input: { userId: '', token: '' } }).execute(); ``` +### `db.mutation.revokeOrgApiKey` + +revokeOrgApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeOrgApiKeyInput (required) | + +```typescript +const result = await db.mutation.revokeOrgApiKey({ input: { keyId: '', orgId: '' } }).execute(); +``` + ### `db.mutation.setPassword` setPassword @@ -707,6 +888,21 @@ linkIdentity const result = await db.mutation.linkIdentity({ input: { service: '', identifier: '', details: '' } }).execute(); ``` +### `db.mutation.createOrgPrincipal` + +createOrgPrincipal + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateOrgPrincipalInput (required) | + +```typescript +const result = await db.mutation.createOrgPrincipal({ input: { name: '', orgId: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' } }).execute(); +``` + ### `db.mutation.extendTokenExpires` extendTokenExpires @@ -722,6 +918,21 @@ extendTokenExpires const result = await db.mutation.extendTokenExpires({ input: { amount: '' } }).execute(); ``` +### `db.mutation.createOrgApiKey` + +createOrgApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateOrgApiKeyInput (required) | + +```typescript +const result = await db.mutation.createOrgApiKey({ input: '' }).execute(); +``` + ### `db.mutation.createApiKey` createApiKey @@ -734,7 +945,7 @@ createApiKey | `input` | CreateApiKeyInput (required) | ```typescript -const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '' } }).execute(); +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '', principalId: '' } }).execute(); ``` ### `db.mutation.requestCrossOriginToken` diff --git a/sdk/constructive-react/src/auth/orm/index.ts b/sdk/constructive-react/src/auth/orm/index.ts index 35448d7362..f3ecc5703a 100644 --- a/sdk/constructive-react/src/auth/orm/index.ts +++ b/sdk/constructive-react/src/auth/orm/index.ts @@ -5,6 +5,9 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { PrincipalModel } from './models/principal'; +import { PrincipalEntityModel } from './models/principalEntity'; +import { PrincipalScopeOverrideModel } from './models/principalScopeOverride'; import { EmailModel } from './models/email'; import { PhoneNumberModel } from './models/phoneNumber'; import { CryptoAddressModel } from './models/cryptoAddress'; @@ -13,6 +16,7 @@ import { AuditLogAuthModel } from './models/auditLogAuth'; import { IdentityProviderModel } from './models/identityProvider'; import { RoleTypeModel } from './models/roleType'; import { UserConnectedAccountModel } from './models/userConnectedAccount'; +import { OrgApiKeyListModel } from './models/orgApiKeyList'; import { UserModel } from './models/user'; import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; @@ -49,6 +53,9 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + principal: new PrincipalModel(client), + principalEntity: new PrincipalEntityModel(client), + principalScopeOverride: new PrincipalScopeOverrideModel(client), email: new EmailModel(client), phoneNumber: new PhoneNumberModel(client), cryptoAddress: new CryptoAddressModel(client), @@ -57,6 +64,7 @@ export function createClient(config: OrmClientConfig) { identityProvider: new IdentityProviderModel(client), roleType: new RoleTypeModel(client), userConnectedAccount: new UserConnectedAccountModel(client), + orgApiKeyList: new OrgApiKeyListModel(client), user: new UserModel(client), query: createQueryOperations(client), mutation: createMutationOperations(client), diff --git a/sdk/constructive-react/src/auth/orm/input-types.ts b/sdk/constructive-react/src/auth/orm/input-types.ts index 734fe10c3a..f47ec67005 100644 --- a/sdk/constructive-react/src/auth/orm/input-types.ts +++ b/sdk/constructive-react/src/auth/orm/input-types.ts @@ -235,8 +235,54 @@ export type Base64EncodedBinary = unknown; export type ConstructiveInternalTypeEmail = unknown; export type ConstructiveInternalTypeImage = unknown; export type ConstructiveInternalTypeOrigin = unknown; -/** User email addresses with verification and primary-email management */ +/** Scoped sub-identities (API keys and agents) with precomputed SPRT */ // ============ Entity Types ============ +export interface Principal { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** The human user who owns and manages this principal */ + ownerId?: string | null; + /** The user row (type=3 Principal) that represents this principal identity */ + userId?: string | null; + /** Human-readable label for this principal (e.g., billing-bot, ci-deploy-key) */ + name?: string | null; + /** Permission bitmask subset; all-1s means inherit all parent permissions */ + allowedMask?: string | null; + /** Whether this principal is restricted to read-only operations */ + isReadOnly?: boolean | null; + /** Whether this principal bypasses MFA step-up requirements */ + bypassStepUp?: boolean | null; +} +/** Association table scoping principals to specific organizations */ +export interface PrincipalEntity { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** The principal this scoping row belongs to */ + principalId?: string | null; + /** The organization this principal is scoped to */ + entityId?: string | null; + /** Denormalized owner_id from principals table for RLS */ + ownerId?: string | null; +} +/** Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. */ +export interface PrincipalScopeOverride { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** The principal this override applies to */ + principalId?: string | null; + /** The scope level (membership_type) this override restricts */ + membershipType?: number | null; + /** Permission bitmask for this scope; AND-masked with parent permissions during cascade */ + allowedMask?: string | null; + /** Whether this principal has admin access at this scope (default true = inherit from parent) */ + isAdmin?: boolean | null; + /** Whether this principal is restricted to read-only at this scope */ + isReadOnly?: boolean | null; +} +/** User email addresses with verification and primary-email management */ export interface Email { id: string; ownerId?: string | null; @@ -349,6 +395,20 @@ export interface UserConnectedAccount { createdAt?: string | null; updatedAt?: string | null; } +export interface OrgApiKeyList { + id: string; + keyId?: string | null; + name?: string | null; + principalId?: string | null; + orgId?: string | null; + expiresAt?: string | null; + revokedAt?: string | null; + lastUsedAt?: string | null; + mfaLevel?: string | null; + accessLevel?: string | null; + createdAt?: string | null; + updatedAt?: string | null; +} export interface User { id: string; username?: string | null; @@ -378,6 +438,20 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface PrincipalRelations { + owner?: User | null; + user?: User | null; + principalEntities?: ConnectionResult; + principalScopeOverrides?: ConnectionResult; +} +export interface PrincipalEntityRelations { + entity?: User | null; + owner?: User | null; + principal?: Principal | null; +} +export interface PrincipalScopeOverrideRelations { + principal?: Principal | null; +} export interface EmailRelations { owner?: User | null; } @@ -396,8 +470,12 @@ export interface AuditLogAuthRelations { export interface IdentityProviderRelations {} export interface RoleTypeRelations {} export interface UserConnectedAccountRelations {} +export interface OrgApiKeyListRelations {} export interface UserRelations { roleType?: RoleType | null; + ownedPrincipals?: ConnectionResult; + principals?: ConnectionResult; + principalEntitiesByEntityId?: ConnectionResult; ownedEmails?: ConnectionResult; ownedPhoneNumbers?: ConnectionResult; ownedCryptoAddresses?: ConnectionResult; @@ -405,6 +483,10 @@ export interface UserRelations { auditLogAuthsByActorId?: ConnectionResult; } // ============ Entity Types With Relations ============ +export type PrincipalWithRelations = Principal & PrincipalRelations; +export type PrincipalEntityWithRelations = PrincipalEntity & PrincipalEntityRelations; +export type PrincipalScopeOverrideWithRelations = PrincipalScopeOverride & + PrincipalScopeOverrideRelations; export type EmailWithRelations = Email & EmailRelations; export type PhoneNumberWithRelations = PhoneNumber & PhoneNumberRelations; export type CryptoAddressWithRelations = CryptoAddress & CryptoAddressRelations; @@ -414,8 +496,68 @@ export type IdentityProviderWithRelations = IdentityProvider & IdentityProviderR export type RoleTypeWithRelations = RoleType & RoleTypeRelations; export type UserConnectedAccountWithRelations = UserConnectedAccount & UserConnectedAccountRelations; +export type OrgApiKeyListWithRelations = OrgApiKeyList & OrgApiKeyListRelations; export type UserWithRelations = User & UserRelations; // ============ Entity Select Types ============ +export type PrincipalSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + ownerId?: boolean; + userId?: boolean; + name?: boolean; + allowedMask?: boolean; + isReadOnly?: boolean; + bypassStepUp?: boolean; + owner?: { + select: UserSelect; + }; + user?: { + select: UserSelect; + }; + principalEntities?: { + select: PrincipalEntitySelect; + first?: number; + filter?: PrincipalEntityFilter; + orderBy?: PrincipalEntityOrderBy[]; + }; + principalScopeOverrides?: { + select: PrincipalScopeOverrideSelect; + first?: number; + filter?: PrincipalScopeOverrideFilter; + orderBy?: PrincipalScopeOverrideOrderBy[]; + }; +}; +export type PrincipalEntitySelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + principalId?: boolean; + entityId?: boolean; + ownerId?: boolean; + entity?: { + select: UserSelect; + }; + owner?: { + select: UserSelect; + }; + principal?: { + select: PrincipalSelect; + }; +}; +export type PrincipalScopeOverrideSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + principalId?: boolean; + membershipType?: boolean; + allowedMask?: boolean; + isAdmin?: boolean; + isReadOnly?: boolean; + principal?: { + select: PrincipalSelect; + }; +}; export type EmailSelect = { id?: boolean; ownerId?: boolean; @@ -509,6 +651,20 @@ export type UserConnectedAccountSelect = { createdAt?: boolean; updatedAt?: boolean; }; +export type OrgApiKeyListSelect = { + id?: boolean; + keyId?: boolean; + name?: boolean; + principalId?: boolean; + orgId?: boolean; + expiresAt?: boolean; + revokedAt?: boolean; + lastUsedAt?: boolean; + mfaLevel?: boolean; + accessLevel?: boolean; + createdAt?: boolean; + updatedAt?: boolean; +}; export type UserSelect = { id?: boolean; username?: boolean; @@ -524,6 +680,24 @@ export type UserSelect = { roleType?: { select: RoleTypeSelect; }; + ownedPrincipals?: { + select: PrincipalSelect; + first?: number; + filter?: PrincipalFilter; + orderBy?: PrincipalOrderBy[]; + }; + principals?: { + select: PrincipalSelect; + first?: number; + filter?: PrincipalFilter; + orderBy?: PrincipalOrderBy[]; + }; + principalEntitiesByEntityId?: { + select: PrincipalEntitySelect; + first?: number; + filter?: PrincipalEntityFilter; + orderBy?: PrincipalEntityOrderBy[]; + }; ownedEmails?: { select: EmailSelect; first?: number; @@ -556,6 +730,96 @@ export type UserSelect = { }; }; // ============ Table Filter Types ============ +export interface PrincipalFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `userId` field. */ + userId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Filter by the object’s `bypassStepUp` field. */ + bypassStepUp?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalFilter[]; + /** Negates the expression. */ + not?: PrincipalFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `user` relation. */ + user?: UserFilter; + /** Filter by the object’s `principalEntities` relation. */ + principalEntities?: PrincipalToManyPrincipalEntityFilter; + /** `principalEntities` exist. */ + principalEntitiesExist?: boolean; + /** Filter by the object’s `principalScopeOverrides` relation. */ + principalScopeOverrides?: PrincipalToManyPrincipalScopeOverrideFilter; + /** `principalScopeOverrides` exist. */ + principalScopeOverridesExist?: boolean; +} +export interface PrincipalEntityFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalEntityFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalEntityFilter[]; + /** Negates the expression. */ + not?: PrincipalEntityFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} +export interface PrincipalScopeOverrideFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `membershipType` field. */ + membershipType?: IntFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalScopeOverrideFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalScopeOverrideFilter[]; + /** Negates the expression. */ + not?: PrincipalScopeOverrideFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} export interface EmailFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -756,6 +1020,38 @@ export interface UserConnectedAccountFilter { /** Negates the expression. */ not?: UserConnectedAccountFilter; } +export interface OrgApiKeyListFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `keyId` field. */ + keyId?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `orgId` field. */ + orgId?: UUIDFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `revokedAt` field. */ + revokedAt?: DatetimeFilter; + /** Filter by the object’s `lastUsedAt` field. */ + lastUsedAt?: DatetimeFilter; + /** Filter by the object’s `mfaLevel` field. */ + mfaLevel?: StringFilter; + /** Filter by the object’s `accessLevel` field. */ + accessLevel?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: OrgApiKeyListFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgApiKeyListFilter[]; + /** Negates the expression. */ + not?: OrgApiKeyListFilter; +} export interface UserFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -781,6 +1077,18 @@ export interface UserFilter { not?: UserFilter; /** Filter by the object’s `roleType` relation. */ roleType?: RoleTypeFilter; + /** Filter by the object’s `ownedPrincipals` relation. */ + ownedPrincipals?: UserToManyPrincipalFilter; + /** `ownedPrincipals` exist. */ + ownedPrincipalsExist?: boolean; + /** Filter by the object’s `principals` relation. */ + principals?: UserToManyPrincipalFilter; + /** `principals` exist. */ + principalsExist?: boolean; + /** Filter by the object’s `principalEntitiesByEntityId` relation. */ + principalEntitiesByEntityId?: UserToManyPrincipalEntityFilter; + /** `principalEntitiesByEntityId` exist. */ + principalEntitiesByEntityIdExist?: boolean; /** Filter by the object’s `ownedEmails` relation. */ ownedEmails?: UserToManyEmailFilter; /** `ownedEmails` exist. */ @@ -815,6 +1123,64 @@ export interface UserFilter { unifiedSearch?: string; } // ============ OrderBy Types ============ +export type PrincipalOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'USER_ID_ASC' + | 'USER_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'ALLOWED_MASK_ASC' + | 'ALLOWED_MASK_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' + | 'BYPASS_STEP_UP_ASC' + | 'BYPASS_STEP_UP_DESC'; +export type PrincipalEntityOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC'; +export type PrincipalScopeOverrideOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'MEMBERSHIP_TYPE_ASC' + | 'MEMBERSHIP_TYPE_DESC' + | 'ALLOWED_MASK_ASC' + | 'ALLOWED_MASK_DESC' + | 'IS_ADMIN_ASC' + | 'IS_ADMIN_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC'; export type EmailOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -967,6 +1333,32 @@ export type UserConnectedAccountOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type OrgApiKeyListOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'KEY_ID_ASC' + | 'KEY_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'ORG_ID_ASC' + | 'ORG_ID_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'REVOKED_AT_ASC' + | 'REVOKED_AT_DESC' + | 'LAST_USED_AT_ASC' + | 'LAST_USED_AT_DESC' + | 'MFA_LEVEL_ASC' + | 'MFA_LEVEL_DESC' + | 'ACCESS_LEVEL_ASC' + | 'ACCESS_LEVEL_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type UserOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -994,6 +1386,82 @@ export type UserOrderBy = | 'SEARCH_SCORE_ASC' | 'SEARCH_SCORE_DESC'; // ============ CRUD Input Types ============ +export interface CreatePrincipalInput { + clientMutationId?: string; + principal: { + ownerId: string; + userId: string; + name?: string; + allowedMask?: string; + isReadOnly?: boolean; + bypassStepUp?: boolean; + }; +} +export interface PrincipalPatch { + ownerId?: string | null; + userId?: string | null; + name?: string | null; + allowedMask?: string | null; + isReadOnly?: boolean | null; + bypassStepUp?: boolean | null; +} +export interface UpdatePrincipalInput { + clientMutationId?: string; + principalId: string; + principalPatch: PrincipalPatch; +} +export interface DeletePrincipalInput { + clientMutationId?: string; + principalId: string; +} +export interface CreatePrincipalEntityInput { + clientMutationId?: string; + principalEntity: { + principalId: string; + entityId: string; + ownerId: string; + }; +} +export interface PrincipalEntityPatch { + principalId?: string | null; + entityId?: string | null; + ownerId?: string | null; +} +export interface UpdatePrincipalEntityInput { + clientMutationId?: string; + id: string; + principalEntityPatch: PrincipalEntityPatch; +} +export interface DeletePrincipalEntityInput { + clientMutationId?: string; + id: string; +} +export interface CreatePrincipalScopeOverrideInput { + clientMutationId?: string; + principalScopeOverride: { + principalId: string; + membershipType?: number; + allowedMask?: string; + isAdmin?: boolean; + isReadOnly?: boolean; + }; +} +export interface PrincipalScopeOverridePatch { + principalId?: string | null; + membershipType?: number | null; + allowedMask?: string | null; + isAdmin?: boolean | null; + isReadOnly?: boolean | null; +} +export interface UpdatePrincipalScopeOverrideInput { + clientMutationId?: string; + id: string; + principalScopeOverridePatch: PrincipalScopeOverridePatch; +} +export interface DeletePrincipalScopeOverrideInput { + clientMutationId?: string; + id: string; +} export interface CreateEmailInput { clientMutationId?: string; email: { @@ -1210,6 +1678,40 @@ export interface DeleteUserConnectedAccountInput { clientMutationId?: string; id: string; } +export interface CreateOrgApiKeyListInput { + clientMutationId?: string; + orgApiKeyList: { + keyId?: string; + name?: string; + principalId?: string; + orgId?: string; + expiresAt?: string; + revokedAt?: string; + lastUsedAt?: string; + mfaLevel?: string; + accessLevel?: string; + }; +} +export interface OrgApiKeyListPatch { + keyId?: string | null; + name?: string | null; + principalId?: string | null; + orgId?: string | null; + expiresAt?: string | null; + revokedAt?: string | null; + lastUsedAt?: string | null; + mfaLevel?: string | null; + accessLevel?: string | null; +} +export interface UpdateOrgApiKeyListInput { + clientMutationId?: string; + id: string; + orgApiKeyListPatch: OrgApiKeyListPatch; +} +export interface DeleteOrgApiKeyListInput { + clientMutationId?: string; + id: string; +} export interface CreateUserInput { clientMutationId?: string; user: { @@ -1237,7 +1739,14 @@ export interface DeleteUserInput { } // ============ Connection Fields Map ============ export const connectionFieldsMap = { + Principal: { + principalEntities: 'PrincipalEntity', + principalScopeOverrides: 'PrincipalScopeOverride', + }, User: { + ownedPrincipals: 'Principal', + principals: 'Principal', + principalEntitiesByEntityId: 'PrincipalEntity', ownedEmails: 'Email', ownedPhoneNumbers: 'PhoneNumber', ownedCryptoAddresses: 'CryptoAddress', @@ -1256,6 +1765,10 @@ export interface CheckPasswordInput { clientMutationId?: string; password?: string; } +export interface DeleteOrgPrincipalInput { + clientMutationId?: string; + principalId?: string; +} export interface DisconnectAccountInput { clientMutationId?: string; accountId: string; @@ -1281,6 +1794,11 @@ export interface ConfirmDeleteAccountInput { userId?: string; token?: string; } +export interface RevokeOrgApiKeyInput { + clientMutationId?: string; + keyId: string; + orgId: string; +} export interface SetPasswordInput { clientMutationId?: string; currentPassword?: string; @@ -1347,16 +1865,34 @@ export interface LinkIdentityInput { identifier: string; details?: Record; } +export interface CreateOrgPrincipalInput { + clientMutationId?: string; + name?: string; + orgId?: string; + allowedMask?: string; + isReadOnly?: boolean; + bypassStepUp?: boolean; +} export interface ExtendTokenExpiresInput { clientMutationId?: string; amount?: IntervalInput; } +export interface CreateOrgApiKeyInput { + clientMutationId?: string; + orgId?: string; + principalId?: string; + keyName?: string; + accessLevel?: string; + mfaLevel?: string; + expiresIn?: IntervalInput; +} export interface CreateApiKeyInput { clientMutationId?: string; keyName?: string; accessLevel?: string; mfaLevel?: string; expiresIn?: IntervalInput; + principalId?: string; } export interface RequestCrossOriginTokenInput { clientMutationId?: string; @@ -1382,6 +1918,24 @@ export interface ProvisionBucketInput { */ ownerId?: string; } +/** A filter to be used against many `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalToManyPrincipalEntityFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalEntityFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalEntityFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalEntityFilter; +} +/** A filter to be used against many `PrincipalScopeOverride` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalToManyPrincipalScopeOverrideFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalScopeOverrideFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalScopeOverrideFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalScopeOverrideFilter; +} /** A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ */ export interface ConstructiveInternalTypeEmailFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -1669,6 +2223,24 @@ export interface ConstructiveInternalTypeImageFilter { /** Contained by the specified JSON. */ containedBy?: ConstructiveInternalTypeImage; } +/** A filter to be used against many `Principal` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyPrincipalFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalFilter; +} +/** A filter to be used against many `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyPrincipalEntityFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalEntityFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalEntityFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalEntityFilter; +} /** A filter to be used against many `Email` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyEmailFilter { /** Filters to entities where at least one related entity matches. */ @@ -1721,6 +2293,18 @@ export interface TrgmSearchInput { /** Minimum similarity threshold (0.0 to 1.0). Higher = stricter matching. Default is 0.3. */ threshold?: number; } +/** An input for mutations affecting `PrincipalEntity` */ +export interface PrincipalEntityInput { + id?: string; + createdAt?: string; + updatedAt?: string; + /** The principal this scoping row belongs to */ + principalId: string; + /** The organization this principal is scoped to */ + entityId: string; + /** Denormalized owner_id from principals table for RLS */ + ownerId: string; +} /** An input for mutations affecting `Email` */ export interface EmailInput { id?: string; @@ -1837,7 +2421,22 @@ export interface UserConnectedAccountInput { createdAt?: string; updatedAt?: string; } -/** An input for mutations affecting `User` */ +/** An input for mutations affecting `OrgApiKeyList` */ +export interface OrgApiKeyListInput { + id?: string; + keyId?: string; + name?: string; + principalId?: string; + orgId?: string; + expiresAt?: string; + revokedAt?: string; + lastUsedAt?: string; + mfaLevel?: string; + accessLevel?: string; + createdAt?: string; + updatedAt?: string; +} +/** An input for mutations affecting `User` */ export interface UserInput { id?: string; username?: string; @@ -1866,6 +2465,99 @@ export interface IntervalInput { /** A quantity of years. */ years?: number; } +/** A filter to be used against `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalEntityFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalEntityFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalEntityFilter[]; + /** Negates the expression. */ + not?: PrincipalEntityFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} +/** A filter to be used against `PrincipalScopeOverride` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalScopeOverrideFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `membershipType` field. */ + membershipType?: IntFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalScopeOverrideFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalScopeOverrideFilter[]; + /** Negates the expression. */ + not?: PrincipalScopeOverrideFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} +/** A filter to be used against `Principal` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `userId` field. */ + userId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Filter by the object’s `bypassStepUp` field. */ + bypassStepUp?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalFilter[]; + /** Negates the expression. */ + not?: PrincipalFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `user` relation. */ + user?: UserFilter; + /** Filter by the object’s `principalEntities` relation. */ + principalEntities?: PrincipalToManyPrincipalEntityFilter; + /** `principalEntities` exist. */ + principalEntitiesExist?: boolean; + /** Filter by the object’s `principalScopeOverrides` relation. */ + principalScopeOverrides?: PrincipalToManyPrincipalScopeOverrideFilter; + /** `principalScopeOverrides` exist. */ + principalScopeOverridesExist?: boolean; +} /** A filter to be used against `Email` object types. All fields are combined with a logical ‘and.’ */ export interface EmailFilter { /** Filter by the object’s `id` field. */ @@ -2042,6 +2734,152 @@ export interface UUIDFilter { /** Greater than or equal to the specified value. */ greaterThanOrEqualTo?: string; } +/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ +export interface DatetimeFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Included in the specified list. */ + in?: string[]; + /** Not included in the specified list. */ + notIn?: string[]; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; +} +/** A filter to be used against `User` object types. All fields are combined with a logical ‘and.’ */ +export interface UserFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `username` field. */ + username?: StringTrgmFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringTrgmFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `searchTsv` field. */ + searchTsv?: FullTextFilter; + /** Filter by the object’s `type` field. */ + type?: IntFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: UserFilter[]; + /** Checks for any expressions in this list. */ + or?: UserFilter[]; + /** Negates the expression. */ + not?: UserFilter; + /** Filter by the object’s `roleType` relation. */ + roleType?: RoleTypeFilter; + /** Filter by the object’s `ownedPrincipals` relation. */ + ownedPrincipals?: UserToManyPrincipalFilter; + /** `ownedPrincipals` exist. */ + ownedPrincipalsExist?: boolean; + /** Filter by the object’s `principals` relation. */ + principals?: UserToManyPrincipalFilter; + /** `principals` exist. */ + principalsExist?: boolean; + /** Filter by the object’s `principalEntitiesByEntityId` relation. */ + principalEntitiesByEntityId?: UserToManyPrincipalEntityFilter; + /** `principalEntitiesByEntityId` exist. */ + principalEntitiesByEntityIdExist?: boolean; + /** Filter by the object’s `ownedEmails` relation. */ + ownedEmails?: UserToManyEmailFilter; + /** `ownedEmails` exist. */ + ownedEmailsExist?: boolean; + /** Filter by the object’s `ownedPhoneNumbers` relation. */ + ownedPhoneNumbers?: UserToManyPhoneNumberFilter; + /** `ownedPhoneNumbers` exist. */ + ownedPhoneNumbersExist?: boolean; + /** Filter by the object’s `ownedCryptoAddresses` relation. */ + ownedCryptoAddresses?: UserToManyCryptoAddressFilter; + /** `ownedCryptoAddresses` exist. */ + ownedCryptoAddressesExist?: boolean; + /** Filter by the object’s `ownedWebauthnCredentials` relation. */ + ownedWebauthnCredentials?: UserToManyWebauthnCredentialFilter; + /** `ownedWebauthnCredentials` exist. */ + ownedWebauthnCredentialsExist?: boolean; + /** Filter by the object’s `auditLogAuthsByActorId` relation. */ + auditLogAuthsByActorId?: UserToManyAuditLogAuthFilter; + /** `auditLogAuthsByActorId` exist. */ + auditLogAuthsByActorIdExist?: boolean; + /** TSV search on the `search_tsv` column. */ + tsvSearchTsv?: string; + /** TRGM search on the `display_name` column. */ + trgmDisplayName?: TrgmSearchInput; + /** + * Composite unified search. Provide a search string and it will be dispatched to + * all text-compatible search algorithms (tsvector, BM25, pg_trgm) + * simultaneously. When the LLM plugin is active, pgvector also participates via + * auto-embedding. Rows matching ANY algorithm are returned. All matching score + * fields are populated. + */ + unifiedSearch?: string; +} +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Included in the specified list. */ + in?: number[]; + /** Not included in the specified list. */ + notIn?: number[]; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; +} +/** A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ */ +export interface BitStringFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Included in the specified list. */ + in?: string[]; + /** Not included in the specified list. */ + notIn?: string[]; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; +} /** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ export interface BooleanFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -2144,90 +2982,6 @@ export interface StringFilter { /** Greater than or equal to the specified value (case-insensitive). */ greaterThanOrEqualToInsensitive?: string; } -/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ -export interface DatetimeFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Included in the specified list. */ - in?: string[]; - /** Not included in the specified list. */ - notIn?: string[]; - /** Less than the specified value. */ - lessThan?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; -} -/** A filter to be used against `User` object types. All fields are combined with a logical ‘and.’ */ -export interface UserFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `username` field. */ - username?: StringTrgmFilter; - /** Filter by the object’s `displayName` field. */ - displayName?: StringTrgmFilter; - /** Filter by the object’s `profilePicture` field. */ - profilePicture?: ConstructiveInternalTypeImageFilter; - /** Filter by the object’s `searchTsv` field. */ - searchTsv?: FullTextFilter; - /** Filter by the object’s `type` field. */ - type?: IntFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: UserFilter[]; - /** Checks for any expressions in this list. */ - or?: UserFilter[]; - /** Negates the expression. */ - not?: UserFilter; - /** Filter by the object’s `roleType` relation. */ - roleType?: RoleTypeFilter; - /** Filter by the object’s `ownedEmails` relation. */ - ownedEmails?: UserToManyEmailFilter; - /** `ownedEmails` exist. */ - ownedEmailsExist?: boolean; - /** Filter by the object’s `ownedPhoneNumbers` relation. */ - ownedPhoneNumbers?: UserToManyPhoneNumberFilter; - /** `ownedPhoneNumbers` exist. */ - ownedPhoneNumbersExist?: boolean; - /** Filter by the object’s `ownedCryptoAddresses` relation. */ - ownedCryptoAddresses?: UserToManyCryptoAddressFilter; - /** `ownedCryptoAddresses` exist. */ - ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedWebauthnCredentials` relation. */ - ownedWebauthnCredentials?: UserToManyWebauthnCredentialFilter; - /** `ownedWebauthnCredentials` exist. */ - ownedWebauthnCredentialsExist?: boolean; - /** Filter by the object’s `auditLogAuthsByActorId` relation. */ - auditLogAuthsByActorId?: UserToManyAuditLogAuthFilter; - /** `auditLogAuthsByActorId` exist. */ - auditLogAuthsByActorIdExist?: boolean; - /** TSV search on the `search_tsv` column. */ - tsvSearchTsv?: string; - /** TRGM search on the `display_name` column. */ - trgmDisplayName?: TrgmSearchInput; - /** - * Composite unified search. Provide a search string and it will be dispatched to - * all text-compatible search algorithms (tsvector, BM25, pg_trgm) - * simultaneously. When the LLM plugin is active, pgvector also participates via - * auto-embedding. Rows matching ANY algorithm are returned. All matching score - * fields are populated. - */ - unifiedSearch?: string; -} /** A filter to be used against BigInt fields. All fields are combined with a logical ‘and.’ */ export interface BigIntFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -2346,31 +3100,6 @@ export interface FullTextFilter { /** Performs a full text search on the field. */ matches?: string; } -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: number; - /** Not equal to the specified value. */ - notEqualTo?: number; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; - /** Included in the specified list. */ - in?: number[]; - /** Not included in the specified list. */ - notIn?: number[]; - /** Less than the specified value. */ - lessThan?: number; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; - /** Greater than the specified value. */ - greaterThan?: number; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; -} /** A filter to be used against `RoleType` object types. All fields are combined with a logical ‘and.’ */ export interface RoleTypeFilter { /** Filter by the object’s `id` field. */ @@ -2405,6 +3134,14 @@ export interface CheckPasswordPayload { export type CheckPasswordPayloadSelect = { clientMutationId?: boolean; }; +export interface DeleteOrgPrincipalPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DeleteOrgPrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface DisconnectAccountPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2453,6 +3190,14 @@ export type ConfirmDeleteAccountPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface RevokeOrgApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeOrgApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface SetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2543,6 +3288,14 @@ export type LinkIdentityPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface CreateOrgPrincipalPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type CreateOrgPrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; @@ -2553,6 +3306,16 @@ export type ExtendTokenExpiresPayloadSelect = { select: ExtendTokenExpiresRecordSelect; }; }; +export interface CreateOrgApiKeyPayload { + clientMutationId?: string | null; + result?: CreateOrgApiKeyRecord | null; +} +export type CreateOrgApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: CreateOrgApiKeyRecordSelect; + }; +}; export interface CreateApiKeyPayload { clientMutationId?: string | null; result?: CreateApiKeyRecord | null; @@ -2607,6 +3370,67 @@ export type ProvisionBucketPayloadSelect = { endpoint?: boolean; error?: boolean; }; +export interface CreatePrincipalPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type CreatePrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface DeletePrincipalPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DeletePrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface CreatePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was created by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} +export type CreatePrincipalEntityPayloadSelect = { + clientMutationId?: boolean; + principalEntity?: { + select: PrincipalEntitySelect; + }; + principalEntityEdge?: { + select: PrincipalEntityEdgeSelect; + }; +}; +export interface UpdatePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was updated by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} +export type UpdatePrincipalEntityPayloadSelect = { + clientMutationId?: boolean; + principalEntity?: { + select: PrincipalEntitySelect; + }; + principalEntityEdge?: { + select: PrincipalEntityEdgeSelect; + }; +}; +export interface DeletePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was deleted by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} +export type DeletePrincipalEntityPayloadSelect = { + clientMutationId?: boolean; + principalEntity?: { + select: PrincipalEntitySelect; + }; + principalEntityEdge?: { + select: PrincipalEntityEdgeSelect; + }; +}; export interface CreateEmailPayload { clientMutationId?: string | null; /** The `Email` that was created by this mutation. */ @@ -2899,6 +3723,17 @@ export type CreateUserConnectedAccountPayloadSelect = { select: UserConnectedAccountSelect; }; }; +export interface CreateOrgApiKeyListPayload { + clientMutationId?: string | null; + /** The `OrgApiKeyList` that was created by this mutation. */ + orgApiKeyList?: OrgApiKeyList | null; +} +export type CreateOrgApiKeyListPayloadSelect = { + clientMutationId?: boolean; + orgApiKeyList?: { + select: OrgApiKeyListSelect; + }; +}; export interface CreateUserPayload { clientMutationId?: string | null; /** The `User` that was created by this mutation. */ @@ -3026,6 +3861,16 @@ export type ExtendTokenExpiresRecordSelect = { sessionId?: boolean; expiresAt?: boolean; }; +export interface CreateOrgApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; + expiresAt?: string | null; +} +export type CreateOrgApiKeyRecordSelect = { + apiKey?: boolean; + keyId?: boolean; + expiresAt?: boolean; +}; export interface CreateApiKeyRecord { apiKey?: string | null; keyId?: string | null; @@ -3036,6 +3881,18 @@ export type CreateApiKeyRecordSelect = { keyId?: boolean; expiresAt?: boolean; }; +/** A `PrincipalEntity` edge in the connection. */ +export interface PrincipalEntityEdge { + cursor?: string | null; + /** The `PrincipalEntity` at the end of the edge. */ + node?: PrincipalEntity | null; +} +export type PrincipalEntityEdgeSelect = { + cursor?: boolean; + node?: { + select: PrincipalEntitySelect; + }; +}; /** A `Email` edge in the connection. */ export interface EmailEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/auth/orm/models/index.ts b/sdk/constructive-react/src/auth/orm/models/index.ts index f0ecad3b71..d041785e90 100644 --- a/sdk/constructive-react/src/auth/orm/models/index.ts +++ b/sdk/constructive-react/src/auth/orm/models/index.ts @@ -3,6 +3,9 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { PrincipalModel } from './principal'; +export { PrincipalEntityModel } from './principalEntity'; +export { PrincipalScopeOverrideModel } from './principalScopeOverride'; export { EmailModel } from './email'; export { PhoneNumberModel } from './phoneNumber'; export { CryptoAddressModel } from './cryptoAddress'; @@ -11,4 +14,5 @@ export { AuditLogAuthModel } from './auditLogAuth'; export { IdentityProviderModel } from './identityProvider'; export { RoleTypeModel } from './roleType'; export { UserConnectedAccountModel } from './userConnectedAccount'; +export { OrgApiKeyListModel } from './orgApiKeyList'; export { UserModel } from './user'; diff --git a/sdk/constructive-react/src/auth/orm/models/orgApiKeyList.ts b/sdk/constructive-react/src/auth/orm/models/orgApiKeyList.ts new file mode 100644 index 0000000000..fe7120ee8a --- /dev/null +++ b/sdk/constructive-react/src/auth/orm/models/orgApiKeyList.ts @@ -0,0 +1,174 @@ +/** + * OrgApiKeyList 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 { + OrgApiKeyList, + OrgApiKeyListWithRelations, + OrgApiKeyListSelect, + OrgApiKeyListFilter, + OrgApiKeyListOrderBy, + CreateOrgApiKeyListInput, + UpdateOrgApiKeyListInput, + OrgApiKeyListPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgApiKeyListModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgApiKeyLists: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgApiKeyList', + 'orgApiKeyLists', + 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, + }, + 'OrgApiKeyListFilter', + 'OrgApiKeyListOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgApiKeyList', + fieldName: 'orgApiKeyLists', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgApiKeyList: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgApiKeyList', + 'orgApiKeyLists', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgApiKeyListFilter', + 'OrgApiKeyListOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgApiKeyList', + fieldName: 'orgApiKeyList', + document, + variables, + transform: (data: { + orgApiKeyLists?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgApiKeyList: data.orgApiKeyLists?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgApiKeyList: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgApiKeyList', + 'orgApiKeyLists', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgApiKeyListFilter', + 'OrgApiKeyListOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgApiKeyList', + fieldName: 'orgApiKeyList', + document, + variables, + transform: (data: { + orgApiKeyLists?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgApiKeyList: data.orgApiKeyLists?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgApiKeyList: { + orgApiKeyList: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgApiKeyList', + 'createOrgApiKeyList', + 'orgApiKeyList', + args.select, + args.data, + 'CreateOrgApiKeyListInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgApiKeyList', + fieldName: 'createOrgApiKeyList', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/auth/orm/models/principal.ts b/sdk/constructive-react/src/auth/orm/models/principal.ts new file mode 100644 index 0000000000..66c9d2ff40 --- /dev/null +++ b/sdk/constructive-react/src/auth/orm/models/principal.ts @@ -0,0 +1,208 @@ +/** + * Principal 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 { + Principal, + PrincipalWithRelations, + PrincipalSelect, + PrincipalFilter, + PrincipalOrderBy, + CreatePrincipalInput, + UpdatePrincipalInput, + PrincipalPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principals: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Principal', + 'principals', + 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, + }, + 'PrincipalFilter', + 'PrincipalOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Principal', + fieldName: 'principals', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principal: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Principal', + 'principals', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalFilter', + 'PrincipalOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Principal', + fieldName: 'principal', + document, + variables, + transform: (data: { + principals?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principal: data.principals?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + principalId: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principal: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Principal', + 'principals', + args.select, + { + where: { + principalId: { + equalTo: args.principalId, + }, + }, + first: 1, + }, + 'PrincipalFilter', + 'PrincipalOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Principal', + fieldName: 'principal', + document, + variables, + transform: (data: { + principals?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principal: data.principals?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipal: { + principal: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Principal', + 'createPrincipal', + 'principal', + args.select, + args.data, + 'CreatePrincipalInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Principal', + fieldName: 'createPrincipal', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + principalId: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePrincipal: { + principal: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Principal', + 'deletePrincipal', + 'principal', + { + principalId: args.where.principalId, + }, + 'DeletePrincipalInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Principal', + fieldName: 'deletePrincipal', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/auth/orm/models/principalEntity.ts b/sdk/constructive-react/src/auth/orm/models/principalEntity.ts new file mode 100644 index 0000000000..0c265501f5 --- /dev/null +++ b/sdk/constructive-react/src/auth/orm/models/principalEntity.ts @@ -0,0 +1,245 @@ +/** + * PrincipalEntity 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 { + PrincipalEntity, + PrincipalEntityWithRelations, + PrincipalEntitySelect, + PrincipalEntityFilter, + PrincipalEntityOrderBy, + CreatePrincipalEntityInput, + UpdatePrincipalEntityInput, + PrincipalEntityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalEntityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalEntities: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalEntity', + 'principalEntities', + 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, + }, + 'PrincipalEntityFilter', + 'PrincipalEntityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalEntity', + fieldName: 'principalEntities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalEntity: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PrincipalEntity', + 'principalEntities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalEntityFilter', + 'PrincipalEntityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalEntity', + fieldName: 'principalEntity', + document, + variables, + transform: (data: { + principalEntities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalEntity: data.principalEntities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalEntity: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalEntity', + 'principalEntities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PrincipalEntityFilter', + 'PrincipalEntityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalEntity', + fieldName: 'principalEntity', + document, + variables, + transform: (data: { + principalEntities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalEntity: data.principalEntities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipalEntity: { + principalEntity: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PrincipalEntity', + 'createPrincipalEntity', + 'principalEntity', + args.select, + args.data, + 'CreatePrincipalEntityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalEntity', + fieldName: 'createPrincipalEntity', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PrincipalEntityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePrincipalEntity: { + principalEntity: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PrincipalEntity', + 'updatePrincipalEntity', + 'principalEntity', + args.select, + args.where.id, + args.data, + 'UpdatePrincipalEntityInput', + 'id', + 'principalEntityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalEntity', + fieldName: 'updatePrincipalEntity', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePrincipalEntity: { + principalEntity: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PrincipalEntity', + 'deletePrincipalEntity', + 'principalEntity', + { + id: args.where.id, + }, + 'DeletePrincipalEntityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalEntity', + fieldName: 'deletePrincipalEntity', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/auth/orm/models/principalScopeOverride.ts b/sdk/constructive-react/src/auth/orm/models/principalScopeOverride.ts new file mode 100644 index 0000000000..3d3e7bedd3 --- /dev/null +++ b/sdk/constructive-react/src/auth/orm/models/principalScopeOverride.ts @@ -0,0 +1,176 @@ +/** + * PrincipalScopeOverride 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 { + PrincipalScopeOverride, + PrincipalScopeOverrideWithRelations, + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy, + CreatePrincipalScopeOverrideInput, + UpdatePrincipalScopeOverrideInput, + PrincipalScopeOverridePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalScopeOverrideModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalScopeOverrides: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalScopeOverride', + 'principalScopeOverrides', + 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, + }, + 'PrincipalScopeOverrideFilter', + 'PrincipalScopeOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalScopeOverride', + fieldName: 'principalScopeOverrides', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalScopeOverride: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PrincipalScopeOverride', + 'principalScopeOverrides', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalScopeOverrideFilter', + 'PrincipalScopeOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalScopeOverride', + fieldName: 'principalScopeOverride', + document, + variables, + transform: (data: { + principalScopeOverrides?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalScopeOverride: data.principalScopeOverrides?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalScopeOverride: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalScopeOverride', + 'principalScopeOverrides', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PrincipalScopeOverrideFilter', + 'PrincipalScopeOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalScopeOverride', + fieldName: 'principalScopeOverride', + document, + variables, + transform: (data: { + principalScopeOverrides?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalScopeOverride: data.principalScopeOverrides?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipalScopeOverride: { + principalScopeOverride: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PrincipalScopeOverride', + 'createPrincipalScopeOverride', + 'principalScopeOverride', + args.select, + args.data, + 'CreatePrincipalScopeOverrideInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalScopeOverride', + fieldName: 'createPrincipalScopeOverride', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/auth/orm/mutation/index.ts b/sdk/constructive-react/src/auth/orm/mutation/index.ts index d8864374dd..de98ebe402 100644 --- a/sdk/constructive-react/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-react/src/auth/orm/mutation/index.ts @@ -10,12 +10,14 @@ import type { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, + DeleteOrgPrincipalInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, ConfirmDeleteAccountInput, + RevokeOrgApiKeyInput, SetPasswordInput, VerifyEmailInput, ProvisionNewUserInput, @@ -26,7 +28,9 @@ import type { SignUpInput, SignInInput, LinkIdentityInput, + CreateOrgPrincipalInput, ExtendTokenExpiresInput, + CreateOrgApiKeyInput, CreateApiKeyInput, RequestCrossOriginTokenInput, ForgotPasswordInput, @@ -35,12 +39,14 @@ import type { SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, + DeleteOrgPrincipalPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, ConfirmDeleteAccountPayload, + RevokeOrgApiKeyPayload, SetPasswordPayload, VerifyEmailPayload, ProvisionNewUserPayload, @@ -51,7 +57,9 @@ import type { SignUpPayload, SignInPayload, LinkIdentityPayload, + CreateOrgPrincipalPayload, ExtendTokenExpiresPayload, + CreateOrgApiKeyPayload, CreateApiKeyPayload, RequestCrossOriginTokenPayload, ForgotPasswordPayload, @@ -60,12 +68,14 @@ import type { SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, + DeleteOrgPrincipalPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, ConfirmDeleteAccountPayloadSelect, + RevokeOrgApiKeyPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, ProvisionNewUserPayloadSelect, @@ -76,7 +86,9 @@ import type { SignUpPayloadSelect, SignInPayloadSelect, LinkIdentityPayloadSelect, + CreateOrgPrincipalPayloadSelect, ExtendTokenExpiresPayloadSelect, + CreateOrgApiKeyPayloadSelect, CreateApiKeyPayloadSelect, RequestCrossOriginTokenPayloadSelect, ForgotPasswordPayloadSelect, @@ -93,6 +105,9 @@ export interface SendAccountDeletionEmailVariables { export interface CheckPasswordVariables { input: CheckPasswordInput; } +export interface DeleteOrgPrincipalVariables { + input: DeleteOrgPrincipalInput; +} export interface DisconnectAccountVariables { input: DisconnectAccountInput; } @@ -111,6 +126,9 @@ export interface VerifyTotpVariables { export interface ConfirmDeleteAccountVariables { input: ConfirmDeleteAccountInput; } +export interface RevokeOrgApiKeyVariables { + input: RevokeOrgApiKeyInput; +} export interface SetPasswordVariables { input: SetPasswordInput; } @@ -141,9 +159,15 @@ export interface SignInVariables { export interface LinkIdentityVariables { input: LinkIdentityInput; } +export interface CreateOrgPrincipalVariables { + input: CreateOrgPrincipalInput; +} export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; } +export interface CreateOrgApiKeyVariables { + input: CreateOrgApiKeyInput; +} export interface CreateApiKeyVariables { input: CreateApiKeyInput; } @@ -255,6 +279,35 @@ export function createMutationOperations(client: OrmClient) { 'CheckPasswordPayload' ), }), + deleteOrgPrincipal: ( + args: DeleteOrgPrincipalVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + deleteOrgPrincipal: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'DeleteOrgPrincipal', + fieldName: 'deleteOrgPrincipal', + ...buildCustomDocument( + 'mutation', + 'DeleteOrgPrincipal', + 'deleteOrgPrincipal', + options.select, + args, + [ + { + name: 'input', + type: 'DeleteOrgPrincipalInput!', + }, + ], + connectionFieldsMap, + 'DeleteOrgPrincipalPayload' + ), + }), disconnectAccount: ( args: DisconnectAccountVariables, options: { @@ -429,6 +482,35 @@ export function createMutationOperations(client: OrmClient) { 'ConfirmDeleteAccountPayload' ), }), + revokeOrgApiKey: ( + args: RevokeOrgApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeOrgApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeOrgApiKey', + fieldName: 'revokeOrgApiKey', + ...buildCustomDocument( + 'mutation', + 'RevokeOrgApiKey', + 'revokeOrgApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeOrgApiKeyInput!', + }, + ], + connectionFieldsMap, + 'RevokeOrgApiKeyPayload' + ), + }), setPassword: ( args: SetPasswordVariables, options: { @@ -719,6 +801,35 @@ export function createMutationOperations(client: OrmClient) { 'LinkIdentityPayload' ), }), + createOrgPrincipal: ( + args: CreateOrgPrincipalVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + createOrgPrincipal: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'CreateOrgPrincipal', + fieldName: 'createOrgPrincipal', + ...buildCustomDocument( + 'mutation', + 'CreateOrgPrincipal', + 'createOrgPrincipal', + options.select, + args, + [ + { + name: 'input', + type: 'CreateOrgPrincipalInput!', + }, + ], + connectionFieldsMap, + 'CreateOrgPrincipalPayload' + ), + }), extendTokenExpires: ( args: ExtendTokenExpiresVariables, options: { @@ -748,6 +859,35 @@ export function createMutationOperations(client: OrmClient) { 'ExtendTokenExpiresPayload' ), }), + createOrgApiKey: ( + args: CreateOrgApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + createOrgApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'CreateOrgApiKey', + fieldName: 'createOrgApiKey', + ...buildCustomDocument( + 'mutation', + 'CreateOrgApiKey', + 'createOrgApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'CreateOrgApiKeyInput!', + }, + ], + connectionFieldsMap, + 'CreateOrgApiKeyPayload' + ), + }), createApiKey: ( args: CreateApiKeyVariables, options: { diff --git a/sdk/constructive-react/src/auth/orm/query/index.ts b/sdk/constructive-react/src/auth/orm/query/index.ts index 408632294d..c91b14032e 100644 --- a/sdk/constructive-react/src/auth/orm/query/index.ts +++ b/sdk/constructive-react/src/auth/orm/query/index.ts @@ -32,18 +32,18 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentIpAddress: (options?: { select?: Record }) => + currentUserId: (options?: { select?: Record }) => new QueryBuilder<{ - currentIpAddress: string | null; + currentUserId: string | null; }>({ client, operation: 'query', - operationName: 'CurrentIpAddress', - fieldName: 'currentIpAddress', + operationName: 'CurrentUserId', + fieldName: 'currentUserId', ...buildCustomDocument( 'query', - 'CurrentIpAddress', - 'currentIpAddress', + 'CurrentUserId', + 'currentUserId', options?.select, undefined, [], @@ -51,18 +51,18 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentUserId: (options?: { select?: Record }) => + currentIpAddress: (options?: { select?: Record }) => new QueryBuilder<{ - currentUserId: string | null; + currentIpAddress: string | null; }>({ client, operation: 'query', - operationName: 'CurrentUserId', - fieldName: 'currentUserId', + operationName: 'CurrentIpAddress', + fieldName: 'currentIpAddress', ...buildCustomDocument( 'query', - 'CurrentUserId', - 'currentUserId', + 'CurrentIpAddress', + 'currentIpAddress', options?.select, undefined, [], diff --git a/sdk/constructive-react/src/auth/schema-types.ts b/sdk/constructive-react/src/auth/schema-types.ts index 681113df49..a32ffeb46e 100644 --- a/sdk/constructive-react/src/auth/schema-types.ts +++ b/sdk/constructive-react/src/auth/schema-types.ts @@ -9,7 +9,11 @@ import type { CryptoAddress, Email, IdentityProvider, + OrgApiKeyList, PhoneNumber, + Principal, + PrincipalEntity, + PrincipalScopeOverride, RoleType, User, UserConnectedAccount, @@ -36,6 +40,67 @@ export type Base64EncodedBinary = unknown; export type ConstructiveInternalTypeEmail = unknown; export type ConstructiveInternalTypeImage = unknown; export type ConstructiveInternalTypeOrigin = unknown; +/** Methods to use when ordering `PrincipalEntity`. */ +export type PrincipalEntityOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC'; +/** Methods to use when ordering `PrincipalScopeOverride`. */ +export type PrincipalScopeOverrideOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'MEMBERSHIP_TYPE_ASC' + | 'MEMBERSHIP_TYPE_DESC' + | 'ALLOWED_MASK_ASC' + | 'ALLOWED_MASK_DESC' + | 'IS_ADMIN_ASC' + | 'IS_ADMIN_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC'; +/** Methods to use when ordering `Principal`. */ +export type PrincipalOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'USER_ID_ASC' + | 'USER_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'ALLOWED_MASK_ASC' + | 'ALLOWED_MASK_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' + | 'BYPASS_STEP_UP_ASC' + | 'BYPASS_STEP_UP_DESC'; /** Methods to use when ordering `Email`. */ export type EmailOrderBy = | 'NATURAL' @@ -196,6 +261,33 @@ export type UserConnectedAccountOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `OrgApiKeyList`. */ +export type OrgApiKeyListOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'KEY_ID_ASC' + | 'KEY_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'ORG_ID_ASC' + | 'ORG_ID_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'REVOKED_AT_ASC' + | 'REVOKED_AT_DESC' + | 'LAST_USED_AT_ASC' + | 'LAST_USED_AT_DESC' + | 'MFA_LEVEL_ASC' + | 'MFA_LEVEL_DESC' + | 'ACCESS_LEVEL_ASC' + | 'ACCESS_LEVEL_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `User`. */ export type UserOrderBy = | 'NATURAL' @@ -223,109 +315,32 @@ export type UserOrderBy = | 'DISPLAY_NAME_TRGM_SIMILARITY_DESC' | 'SEARCH_SCORE_ASC' | 'SEARCH_SCORE_DESC'; -/** A filter to be used against `Email` object types. All fields are combined with a logical ‘and.’ */ -export interface EmailFilter { +/** A filter to be used against `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalEntityFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `email` field. */ - email?: ConstructiveInternalTypeEmailFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `isPrimary` field. */ - isPrimary?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: EmailFilter[]; + and?: PrincipalEntityFilter[]; /** Checks for any expressions in this list. */ - or?: EmailFilter[]; + or?: PrincipalEntityFilter[]; /** Negates the expression. */ - not?: EmailFilter; + not?: PrincipalEntityFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; /** Filter by the object’s `owner` relation. */ owner?: UserFilter; -} -/** A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ */ -export interface ConstructiveInternalTypeEmailFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Included in the specified list. */ - in?: string[]; - /** Not included in the specified list. */ - notIn?: string[]; - /** Less than the specified value. */ - lessThan?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; - /** Contains the specified string (case-sensitive). */ - includes?: string; - /** Does not contain the specified string (case-sensitive). */ - notIncludes?: string; - /** Contains the specified string (case-insensitive). */ - includesInsensitive?: ConstructiveInternalTypeEmail; - /** Does not contain the specified string (case-insensitive). */ - notIncludesInsensitive?: ConstructiveInternalTypeEmail; - /** Starts with the specified string (case-sensitive). */ - startsWith?: string; - /** Does not start with the specified string (case-sensitive). */ - notStartsWith?: string; - /** Starts with the specified string (case-insensitive). */ - startsWithInsensitive?: ConstructiveInternalTypeEmail; - /** Does not start with the specified string (case-insensitive). */ - notStartsWithInsensitive?: ConstructiveInternalTypeEmail; - /** Ends with the specified string (case-sensitive). */ - endsWith?: string; - /** Does not end with the specified string (case-sensitive). */ - notEndsWith?: string; - /** Ends with the specified string (case-insensitive). */ - endsWithInsensitive?: ConstructiveInternalTypeEmail; - /** Does not end with the specified string (case-insensitive). */ - notEndsWithInsensitive?: ConstructiveInternalTypeEmail; - /** Matches the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - like?: string; - /** Does not match the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - notLike?: string; - /** Matches the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - likeInsensitive?: ConstructiveInternalTypeEmail; - /** Does not match the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - notLikeInsensitive?: ConstructiveInternalTypeEmail; - /** Equal to the specified value (case-insensitive). */ - equalToInsensitive?: ConstructiveInternalTypeEmail; - /** Not equal to the specified value (case-insensitive). */ - notEqualToInsensitive?: ConstructiveInternalTypeEmail; - /** Not equal to the specified value, treating null like an ordinary value (case-insensitive). */ - distinctFromInsensitive?: ConstructiveInternalTypeEmail; - /** Equal to the specified value, treating null like an ordinary value (case-insensitive). */ - notDistinctFromInsensitive?: ConstructiveInternalTypeEmail; - /** Included in the specified list (case-insensitive). */ - inInsensitive?: ConstructiveInternalTypeEmail[]; - /** Not included in the specified list (case-insensitive). */ - notInInsensitive?: ConstructiveInternalTypeEmail[]; - /** Less than the specified value (case-insensitive). */ - lessThanInsensitive?: ConstructiveInternalTypeEmail; - /** Less than or equal to the specified value (case-insensitive). */ - lessThanOrEqualToInsensitive?: ConstructiveInternalTypeEmail; - /** Greater than the specified value (case-insensitive). */ - greaterThanInsensitive?: ConstructiveInternalTypeEmail; - /** Greater than or equal to the specified value (case-insensitive). */ - greaterThanOrEqualToInsensitive?: ConstructiveInternalTypeEmail; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; } /** A filter to be used against `User` object types. All fields are combined with a logical ‘and.’ */ export interface UserFilter { @@ -353,6 +368,18 @@ export interface UserFilter { not?: UserFilter; /** Filter by the object’s `roleType` relation. */ roleType?: RoleTypeFilter; + /** Filter by the object’s `ownedPrincipals` relation. */ + ownedPrincipals?: UserToManyPrincipalFilter; + /** `ownedPrincipals` exist. */ + ownedPrincipalsExist?: boolean; + /** Filter by the object’s `principals` relation. */ + principals?: UserToManyPrincipalFilter; + /** `principals` exist. */ + principalsExist?: boolean; + /** Filter by the object’s `principalEntitiesByEntityId` relation. */ + principalEntitiesByEntityId?: UserToManyPrincipalEntityFilter; + /** `principalEntitiesByEntityId` exist. */ + principalEntitiesByEntityIdExist?: boolean; /** Filter by the object’s `ownedEmails` relation. */ ownedEmails?: UserToManyEmailFilter; /** `ownedEmails` exist. */ @@ -522,6 +549,108 @@ export interface RoleTypeFilter { /** Negates the expression. */ not?: RoleTypeFilter; } +/** A filter to be used against many `Principal` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyPrincipalFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalFilter; +} +/** A filter to be used against `Principal` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `userId` field. */ + userId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Filter by the object’s `bypassStepUp` field. */ + bypassStepUp?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalFilter[]; + /** Negates the expression. */ + not?: PrincipalFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `user` relation. */ + user?: UserFilter; + /** Filter by the object’s `principalEntities` relation. */ + principalEntities?: PrincipalToManyPrincipalEntityFilter; + /** `principalEntities` exist. */ + principalEntitiesExist?: boolean; + /** Filter by the object’s `principalScopeOverrides` relation. */ + principalScopeOverrides?: PrincipalToManyPrincipalScopeOverrideFilter; + /** `principalScopeOverrides` exist. */ + principalScopeOverridesExist?: boolean; +} +/** A filter to be used against many `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalToManyPrincipalEntityFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalEntityFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalEntityFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalEntityFilter; +} +/** A filter to be used against many `PrincipalScopeOverride` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalToManyPrincipalScopeOverrideFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalScopeOverrideFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalScopeOverrideFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalScopeOverrideFilter; +} +/** A filter to be used against `PrincipalScopeOverride` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalScopeOverrideFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `membershipType` field. */ + membershipType?: IntFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalScopeOverrideFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalScopeOverrideFilter[]; + /** Negates the expression. */ + not?: PrincipalScopeOverrideFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} +/** A filter to be used against many `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyPrincipalEntityFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalEntityFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalEntityFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalEntityFilter; +} /** A filter to be used against many `Email` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyEmailFilter { /** Filters to entities where at least one related entity matches. */ @@ -531,6 +660,110 @@ export interface UserToManyEmailFilter { /** Filters to entities where no related entity matches. */ none?: EmailFilter; } +/** A filter to be used against `Email` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `email` field. */ + email?: ConstructiveInternalTypeEmailFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; + /** Filter by the object’s `isPrimary` field. */ + isPrimary?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: EmailFilter[]; + /** Checks for any expressions in this list. */ + or?: EmailFilter[]; + /** Negates the expression. */ + not?: EmailFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; +} +/** A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ */ +export interface ConstructiveInternalTypeEmailFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Included in the specified list. */ + in?: string[]; + /** Not included in the specified list. */ + notIn?: string[]; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; + /** Contains the specified string (case-sensitive). */ + includes?: string; + /** Does not contain the specified string (case-sensitive). */ + notIncludes?: string; + /** Contains the specified string (case-insensitive). */ + includesInsensitive?: ConstructiveInternalTypeEmail; + /** Does not contain the specified string (case-insensitive). */ + notIncludesInsensitive?: ConstructiveInternalTypeEmail; + /** Starts with the specified string (case-sensitive). */ + startsWith?: string; + /** Does not start with the specified string (case-sensitive). */ + notStartsWith?: string; + /** Starts with the specified string (case-insensitive). */ + startsWithInsensitive?: ConstructiveInternalTypeEmail; + /** Does not start with the specified string (case-insensitive). */ + notStartsWithInsensitive?: ConstructiveInternalTypeEmail; + /** Ends with the specified string (case-sensitive). */ + endsWith?: string; + /** Does not end with the specified string (case-sensitive). */ + notEndsWith?: string; + /** Ends with the specified string (case-insensitive). */ + endsWithInsensitive?: ConstructiveInternalTypeEmail; + /** Does not end with the specified string (case-insensitive). */ + notEndsWithInsensitive?: ConstructiveInternalTypeEmail; + /** Matches the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + like?: string; + /** Does not match the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + notLike?: string; + /** Matches the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + likeInsensitive?: ConstructiveInternalTypeEmail; + /** Does not match the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + notLikeInsensitive?: ConstructiveInternalTypeEmail; + /** Equal to the specified value (case-insensitive). */ + equalToInsensitive?: ConstructiveInternalTypeEmail; + /** Not equal to the specified value (case-insensitive). */ + notEqualToInsensitive?: ConstructiveInternalTypeEmail; + /** Not equal to the specified value, treating null like an ordinary value (case-insensitive). */ + distinctFromInsensitive?: ConstructiveInternalTypeEmail; + /** Equal to the specified value, treating null like an ordinary value (case-insensitive). */ + notDistinctFromInsensitive?: ConstructiveInternalTypeEmail; + /** Included in the specified list (case-insensitive). */ + inInsensitive?: ConstructiveInternalTypeEmail[]; + /** Not included in the specified list (case-insensitive). */ + notInInsensitive?: ConstructiveInternalTypeEmail[]; + /** Less than the specified value (case-insensitive). */ + lessThanInsensitive?: ConstructiveInternalTypeEmail; + /** Less than or equal to the specified value (case-insensitive). */ + lessThanOrEqualToInsensitive?: ConstructiveInternalTypeEmail; + /** Greater than the specified value (case-insensitive). */ + greaterThanInsensitive?: ConstructiveInternalTypeEmail; + /** Greater than or equal to the specified value (case-insensitive). */ + greaterThanOrEqualToInsensitive?: ConstructiveInternalTypeEmail; +} /** A filter to be used against many `PhoneNumber` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyPhoneNumberFilter { /** Filters to entities where at least one related entity matches. */ @@ -829,6 +1062,39 @@ export interface UserConnectedAccountFilter { /** Negates the expression. */ not?: UserConnectedAccountFilter; } +/** A filter to be used against `OrgApiKeyList` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgApiKeyListFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `keyId` field. */ + keyId?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `orgId` field. */ + orgId?: UUIDFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `revokedAt` field. */ + revokedAt?: DatetimeFilter; + /** Filter by the object’s `lastUsedAt` field. */ + lastUsedAt?: DatetimeFilter; + /** Filter by the object’s `mfaLevel` field. */ + mfaLevel?: StringFilter; + /** Filter by the object’s `accessLevel` field. */ + accessLevel?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: OrgApiKeyListFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgApiKeyListFilter[]; + /** Negates the expression. */ + not?: OrgApiKeyListFilter; +} export interface SignOutInput { clientMutationId?: string; } @@ -839,6 +1105,14 @@ export interface CheckPasswordInput { clientMutationId?: string; password?: string; } +export interface DeleteOrgPrincipalInput { + clientMutationId?: string; + principalId?: string; +} +export interface DeletePrincipalInput { + clientMutationId?: string; + principalId?: string; +} export interface DisconnectAccountInput { clientMutationId?: string; accountId: string; @@ -864,6 +1138,11 @@ export interface ConfirmDeleteAccountInput { userId?: string; token?: string; } +export interface RevokeOrgApiKeyInput { + clientMutationId?: string; + keyId: string; + orgId: string; +} export interface SetPasswordInput { clientMutationId?: string; currentPassword?: string; @@ -930,6 +1209,14 @@ export interface LinkIdentityInput { identifier: string; details?: unknown; } +export interface CreateOrgPrincipalInput { + clientMutationId?: string; + name?: string; + orgId?: string; + allowedMask?: string; + isReadOnly?: boolean; + bypassStepUp?: boolean; +} export interface ExtendTokenExpiresInput { clientMutationId?: string; amount?: IntervalInput; @@ -953,12 +1240,22 @@ export interface IntervalInput { /** A quantity of years. */ years?: number; } +export interface CreateOrgApiKeyInput { + clientMutationId?: string; + orgId?: string; + principalId?: string; + keyName?: string; + accessLevel?: string; + mfaLevel?: string; + expiresIn?: IntervalInput; +} export interface CreateApiKeyInput { clientMutationId?: string; keyName?: string; accessLevel?: string; mfaLevel?: string; expiresIn?: IntervalInput; + principalId?: string; } export interface RequestCrossOriginTokenInput { clientMutationId?: string; @@ -967,6 +1264,14 @@ export interface RequestCrossOriginTokenInput { origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; } +export interface CreatePrincipalInput { + clientMutationId?: string; + name?: string; + allowedMask?: string; + entityIds?: string[]; + isReadOnly?: boolean; + bypassStepUp?: boolean; +} export interface ForgotPasswordInput { clientMutationId?: string; email?: ConstructiveInternalTypeEmail; @@ -998,6 +1303,23 @@ export interface RoleTypeInput { id: number; name: string; } +export interface CreatePrincipalEntityInput { + clientMutationId?: string; + /** The `PrincipalEntity` to be created by this mutation. */ + principalEntity: PrincipalEntityInput; +} +/** An input for mutations affecting `PrincipalEntity` */ +export interface PrincipalEntityInput { + id?: string; + createdAt?: string; + updatedAt?: string; + /** The principal this scoping row belongs to */ + principalId: string; + /** The organization this principal is scoped to */ + entityId: string; + /** Denormalized owner_id from principals table for RLS */ + ownerId: string; +} export interface CreateUserConnectedAccountInput { clientMutationId?: string; /** The `UserConnectedAccount` to be created by this mutation. */ @@ -1079,6 +1401,26 @@ export interface AuditLogAuthInput { /** Whether the authentication attempt succeeded */ success: boolean; } +export interface CreateOrgApiKeyListInput { + clientMutationId?: string; + /** The `OrgApiKeyList` to be created by this mutation. */ + orgApiKeyList: OrgApiKeyListInput; +} +/** An input for mutations affecting `OrgApiKeyList` */ +export interface OrgApiKeyListInput { + id?: string; + keyId?: string; + name?: string; + principalId?: string; + orgId?: string; + expiresAt?: string; + revokedAt?: string; + lastUsedAt?: string; + mfaLevel?: string; + accessLevel?: string; + createdAt?: string; + updatedAt?: string; +} export interface CreateEmailInput { clientMutationId?: string; /** The `Email` to be created by this mutation. */ @@ -1157,6 +1499,24 @@ export interface RoleTypePatch { id?: number; name?: string; } +export interface UpdatePrincipalEntityInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `PrincipalEntity` being updated. */ + principalEntityPatch: PrincipalEntityPatch; +} +/** Represents an update to a `PrincipalEntity`. Fields that are set will be updated. */ +export interface PrincipalEntityPatch { + id?: string; + createdAt?: string; + updatedAt?: string; + /** The principal this scoping row belongs to */ + principalId?: string; + /** The organization this principal is scoped to */ + entityId?: string; + /** Denormalized owner_id from principals table for RLS */ + ownerId?: string; +} export interface UpdateCryptoAddressInput { clientMutationId?: string; id: string; @@ -1303,6 +1663,10 @@ export interface DeleteRoleTypeInput { clientMutationId?: string; id: number; } +export interface DeletePrincipalEntityInput { + clientMutationId?: string; + id: string; +} export interface DeleteCryptoAddressInput { clientMutationId?: string; id: string; @@ -1352,6 +1716,13 @@ export interface RoleTypeConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `PrincipalEntity` values. */ +export interface PrincipalEntityConnection { + nodes: PrincipalEntity[]; + edges: PrincipalEntityEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `UserConnectedAccount` values. */ export interface UserConnectedAccountConnection { nodes: UserConnectedAccount[]; @@ -1366,6 +1737,13 @@ export interface CryptoAddressConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `Principal` values. */ +export interface PrincipalConnection { + nodes: Principal[]; + edges: PrincipalEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `PhoneNumber` values. */ export interface PhoneNumberConnection { nodes: PhoneNumber[]; @@ -1380,6 +1758,20 @@ export interface AuditLogAuthConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `PrincipalScopeOverride` values. */ +export interface PrincipalScopeOverrideConnection { + nodes: PrincipalScopeOverride[]; + edges: PrincipalScopeOverrideEdge[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `OrgApiKeyList` values. */ +export interface OrgApiKeyListConnection { + nodes: OrgApiKeyList[]; + edges: OrgApiKeyListEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `Email` values. */ export interface EmailConnection { nodes: Email[]; @@ -1415,6 +1807,14 @@ export interface SendAccountDeletionEmailPayload { export interface CheckPasswordPayload { clientMutationId?: string | null; } +export interface DeleteOrgPrincipalPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export interface DeletePrincipalPayload { + clientMutationId?: string | null; + result?: boolean | null; +} export interface DisconnectAccountPayload { clientMutationId?: string | null; result?: boolean | null; @@ -1439,6 +1839,10 @@ export interface ConfirmDeleteAccountPayload { clientMutationId?: string | null; result?: boolean | null; } +export interface RevokeOrgApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} export interface SetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -1479,10 +1883,18 @@ export interface LinkIdentityPayload { clientMutationId?: string | null; result?: boolean | null; } +export interface CreateOrgPrincipalPayload { + clientMutationId?: string | null; + result?: string | null; +} export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; } +export interface CreateOrgApiKeyPayload { + clientMutationId?: string | null; + result?: CreateOrgApiKeyRecord | null; +} export interface CreateApiKeyPayload { clientMutationId?: string | null; result?: CreateApiKeyRecord | null; @@ -1491,6 +1903,10 @@ export interface RequestCrossOriginTokenPayload { clientMutationId?: string | null; result?: string | null; } +export interface CreatePrincipalPayload { + clientMutationId?: string | null; + result?: string | null; +} export interface ForgotPasswordPayload { clientMutationId?: string | null; } @@ -1509,6 +1925,12 @@ export interface CreateRoleTypePayload { roleType?: RoleType | null; roleTypeEdge?: RoleTypeEdge | null; } +export interface CreatePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was created by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} export interface CreateUserConnectedAccountPayload { clientMutationId?: string | null; /** The `UserConnectedAccount` that was created by this mutation. */ @@ -1532,6 +1954,11 @@ export interface CreateAuditLogAuthPayload { auditLogAuth?: AuditLogAuth | null; auditLogAuthEdge?: AuditLogAuthEdge | null; } +export interface CreateOrgApiKeyListPayload { + clientMutationId?: string | null; + /** The `OrgApiKeyList` that was created by this mutation. */ + orgApiKeyList?: OrgApiKeyList | null; +} export interface CreateEmailPayload { clientMutationId?: string | null; /** The `Email` that was created by this mutation. */ @@ -1556,6 +1983,12 @@ export interface UpdateRoleTypePayload { roleType?: RoleType | null; roleTypeEdge?: RoleTypeEdge | null; } +export interface UpdatePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was updated by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} export interface UpdateCryptoAddressPayload { clientMutationId?: string | null; /** The `CryptoAddress` that was updated by this mutation. */ @@ -1598,6 +2031,12 @@ export interface DeleteRoleTypePayload { roleType?: RoleType | null; roleTypeEdge?: RoleTypeEdge | null; } +export interface DeletePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was deleted by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} export interface DeleteCryptoAddressPayload { clientMutationId?: string | null; /** The `CryptoAddress` that was deleted by this mutation. */ @@ -1671,6 +2110,12 @@ export interface RoleTypeEdge { /** The `RoleType` at the end of the edge. */ node?: RoleType | null; } +/** A `PrincipalEntity` edge in the connection. */ +export interface PrincipalEntityEdge { + cursor?: string | null; + /** The `PrincipalEntity` at the end of the edge. */ + node?: PrincipalEntity | null; +} /** A `UserConnectedAccount` edge in the connection. */ export interface UserConnectedAccountEdge { cursor?: string | null; @@ -1683,6 +2128,12 @@ export interface CryptoAddressEdge { /** The `CryptoAddress` at the end of the edge. */ node?: CryptoAddress | null; } +/** A `Principal` edge in the connection. */ +export interface PrincipalEdge { + cursor?: string | null; + /** The `Principal` at the end of the edge. */ + node?: Principal | null; +} /** A `PhoneNumber` edge in the connection. */ export interface PhoneNumberEdge { cursor?: string | null; @@ -1695,6 +2146,18 @@ export interface AuditLogAuthEdge { /** The `AuditLogAuth` at the end of the edge. */ node?: AuditLogAuth | null; } +/** A `PrincipalScopeOverride` edge in the connection. */ +export interface PrincipalScopeOverrideEdge { + cursor?: string | null; + /** The `PrincipalScopeOverride` at the end of the edge. */ + node?: PrincipalScopeOverride | null; +} +/** A `OrgApiKeyList` edge in the connection. */ +export interface OrgApiKeyListEdge { + cursor?: string | null; + /** The `OrgApiKeyList` at the end of the edge. */ + node?: OrgApiKeyList | null; +} /** A `Email` edge in the connection. */ export interface EmailEdge { cursor?: string | null; @@ -1776,6 +2239,11 @@ export interface ExtendTokenExpiresRecord { sessionId?: string | null; expiresAt?: string | null; } +export interface CreateOrgApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; + expiresAt?: string | null; +} export interface CreateApiKeyRecord { apiKey?: string | null; keyId?: string | null; diff --git a/sdk/constructive-react/src/auth/types.ts b/sdk/constructive-react/src/auth/types.ts index 7edfa4a332..cadd1889c5 100644 --- a/sdk/constructive-react/src/auth/types.ts +++ b/sdk/constructive-react/src/auth/types.ts @@ -7,6 +7,35 @@ export type Base64EncodedBinary = unknown; export type ConstructiveInternalTypeEmail = unknown; export type ConstructiveInternalTypeImage = unknown; export type ConstructiveInternalTypeOrigin = unknown; +export interface Principal { + id: string | null; + createdAt: string | null; + updatedAt: string | null; + ownerId: string | null; + userId: string | null; + name: string | null; + allowedMask: string | null; + isReadOnly: boolean | null; + bypassStepUp: boolean | null; +} +export interface PrincipalEntity { + id: string | null; + createdAt: string | null; + updatedAt: string | null; + principalId: string | null; + entityId: string | null; + ownerId: string | null; +} +export interface PrincipalScopeOverride { + id: string | null; + createdAt: string | null; + updatedAt: string | null; + principalId: string | null; + membershipType: number | null; + allowedMask: string | null; + isAdmin: boolean | null; + isReadOnly: boolean | null; +} export interface Email { id: string | null; ownerId: string | null; @@ -85,6 +114,20 @@ export interface UserConnectedAccount { createdAt: string | null; updatedAt: string | null; } +export interface OrgApiKeyList { + id: string | null; + keyId: string | null; + name: string | null; + principalId: string | null; + orgId: string | null; + expiresAt: string | null; + revokedAt: string | null; + lastUsedAt: string | null; + mfaLevel: string | null; + accessLevel: string | null; + createdAt: string | null; + updatedAt: string | null; +} export interface User { id: string | null; username: string | null; diff --git a/sdk/constructive-react/src/compute/README.md b/sdk/constructive-react/src/compute/README.md index 06d1f87550..dec5445626 100644 --- a/sdk/constructive-react/src/compute/README.md +++ b/sdk/constructive-react/src/compute/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 18 +- **Tables:** 22 - **Custom queries:** 1 - **Custom mutations:** 14 diff --git a/sdk/constructive-react/src/compute/hooks/README.md b/sdk/constructive-react/src/compute/hooks/README.md index 1b13045117..9030296612 100644 --- a/sdk/constructive-react/src/compute/hooks/README.md +++ b/sdk/constructive-react/src/compute/hooks/README.md @@ -44,6 +44,11 @@ function App() { | `useCreateFunctionDeploymentMutation` | Mutation | Function deployment bindings — ties a function definition to a namespace for Knative provisioning and routing | | `useUpdateFunctionDeploymentMutation` | Mutation | Function deployment bindings — ties a function definition to a namespace for Knative provisioning and routing | | `useDeleteFunctionDeploymentMutation` | Mutation | Function deployment bindings — ties a function definition to a namespace for Knative provisioning and routing | +| `useResourcesQuery` | Query | Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace | +| `useResourceQuery` | Query | Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace | +| `useCreateResourceMutation` | Mutation | Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace | +| `useUpdateResourceMutation` | Mutation | Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace | +| `useDeleteResourceMutation` | Mutation | Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace | | `useFunctionGraphRefsQuery` | Query | Branch heads — mutable pointers into the commit chain | | `useFunctionGraphRefQuery` | Query | Branch heads — mutable pointers into the commit chain | | `useCreateFunctionGraphRefMutation` | Mutation | Branch heads — mutable pointers into the commit chain | @@ -69,6 +74,11 @@ function App() { | `useCreateOrgFunctionExecutionLogMutation` | Mutation | Function execution logs — structured console output per invocation | | `useUpdateOrgFunctionExecutionLogMutation` | Mutation | Function execution logs — structured console output per invocation | | `useDeleteOrgFunctionExecutionLogMutation` | Mutation | Function execution logs — structured console output per invocation | +| `useResourceEventsQuery` | Query | Resource lifecycle events — audit log of provisioning, updates, and failure events | +| `useResourceEventQuery` | Query | Resource lifecycle events — audit log of provisioning, updates, and failure events | +| `useCreateResourceEventMutation` | Mutation | Resource lifecycle events — audit log of provisioning, updates, and failure events | +| `useUpdateResourceEventMutation` | Mutation | Resource lifecycle events — audit log of provisioning, updates, and failure events | +| `useDeleteResourceEventMutation` | Mutation | Resource lifecycle events — audit log of provisioning, updates, and failure events | | `useFunctionGraphExecutionOutputsQuery` | Query | Content-addressed store for execution outputs — hash-referenced from node_outputs | | `useFunctionGraphExecutionOutputQuery` | Query | Content-addressed store for execution outputs — hash-referenced from node_outputs | | `useCreateFunctionGraphExecutionOutputMutation` | Mutation | Content-addressed store for execution outputs — hash-referenced from node_outputs | @@ -89,16 +99,21 @@ function App() { | `useCreateFunctionExecutionLogMutation` | Mutation | Function execution logs — structured console output per invocation | | `useUpdateFunctionExecutionLogMutation` | Mutation | Function execution logs — structured console output per invocation | | `useDeleteFunctionExecutionLogMutation` | Mutation | Function execution logs — structured console output per invocation | -| `useFunctionGraphExecutionNodeStatesQuery` | Query | Per-node execution state — tracks individual node lifecycle for debugging | -| `useFunctionGraphExecutionNodeStateQuery` | Query | Per-node execution state — tracks individual node lifecycle for debugging | -| `useCreateFunctionGraphExecutionNodeStateMutation` | Mutation | Per-node execution state — tracks individual node lifecycle for debugging | -| `useUpdateFunctionGraphExecutionNodeStateMutation` | Mutation | Per-node execution state — tracks individual node lifecycle for debugging | -| `useDeleteFunctionGraphExecutionNodeStateMutation` | Mutation | Per-node execution state — tracks individual node lifecycle for debugging | | `useFunctionGraphsQuery` | Query | Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store | | `useFunctionGraphQuery` | Query | Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store | | `useCreateFunctionGraphMutation` | Mutation | Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store | | `useUpdateFunctionGraphMutation` | Mutation | Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store | | `useDeleteFunctionGraphMutation` | Mutation | Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store | +| `useFunctionGraphExecutionNodeStatesQuery` | Query | Per-node execution state — tracks individual node lifecycle for debugging | +| `useFunctionGraphExecutionNodeStateQuery` | Query | Per-node execution state — tracks individual node lifecycle for debugging | +| `useCreateFunctionGraphExecutionNodeStateMutation` | Mutation | Per-node execution state — tracks individual node lifecycle for debugging | +| `useUpdateFunctionGraphExecutionNodeStateMutation` | Mutation | Per-node execution state — tracks individual node lifecycle for debugging | +| `useDeleteFunctionGraphExecutionNodeStateMutation` | Mutation | Per-node execution state — tracks individual node lifecycle for debugging | +| `usePlatformNamespacesQuery` | Query | Logical namespace containers for grouping secrets, config, functions, and other resources | +| `usePlatformNamespaceQuery` | Query | Logical namespace containers for grouping secrets, config, functions, and other resources | +| `useCreatePlatformNamespaceMutation` | Mutation | Logical namespace containers for grouping secrets, config, functions, and other resources | +| `useUpdatePlatformNamespaceMutation` | Mutation | Logical namespace containers for grouping secrets, config, functions, and other resources | +| `useDeletePlatformNamespaceMutation` | Mutation | Logical namespace containers for grouping secrets, config, functions, and other resources | | `useOrgFunctionInvocationsQuery` | Query | Function invocation log — INSERT to call a function (business-layer, metered). Linked to definitions by task_identifier string. | | `useOrgFunctionInvocationQuery` | Query | Function invocation log — INSERT to call a function (business-layer, metered). Linked to definitions by task_identifier string. | | `useCreateOrgFunctionInvocationMutation` | Mutation | Function invocation log — INSERT to call a function (business-layer, metered). Linked to definitions by task_identifier string. | @@ -109,6 +124,11 @@ function App() { | `useCreateFunctionInvocationMutation` | Mutation | Function invocation log — INSERT to call a function (business-layer, metered). Linked to definitions by task_identifier string. | | `useUpdateFunctionInvocationMutation` | Mutation | Function invocation log — INSERT to call a function (business-layer, metered). Linked to definitions by task_identifier string. | | `useDeleteFunctionInvocationMutation` | Mutation | Function invocation log — INSERT to call a function (business-layer, metered). Linked to definitions by task_identifier string. | +| `usePlatformNamespaceEventsQuery` | Query | Namespace lifecycle events — audit log of creation, activation, deactivation, label changes | +| `usePlatformNamespaceEventQuery` | Query | Namespace lifecycle events — audit log of creation, activation, deactivation, label changes | +| `useCreatePlatformNamespaceEventMutation` | Mutation | Namespace lifecycle events — audit log of creation, activation, deactivation, label changes | +| `useUpdatePlatformNamespaceEventMutation` | Mutation | Namespace lifecycle events — audit log of creation, activation, deactivation, label changes | +| `useDeletePlatformNamespaceEventMutation` | Mutation | Namespace lifecycle events — audit log of creation, activation, deactivation, label changes | | `useFunctionGraphExecutionsQuery` | Query | Ephemeral execution state for flow graph evaluation | | `useFunctionGraphExecutionQuery` | Query | Ephemeral execution state for flow graph evaluation | | `useCreateFunctionGraphExecutionMutation` | Mutation | Ephemeral execution state for flow graph evaluation | @@ -128,9 +148,9 @@ function App() { | `useSaveGraphMutation` | Mutation | saveGraph | | `useAddEdgeAndSaveMutation` | Mutation | addEdgeAndSave | | `useAddNodeAndSaveMutation` | Mutation | addNodeAndSave | +| `useImportGraphJsonMutation` | Mutation | importGraphJson | | `useAddEdgeMutation` | Mutation | addEdge | | `useAddNodeMutation` | Mutation | addNode | -| `useImportGraphJsonMutation` | Mutation | importGraphJson | | `useInsertNodeAtPathMutation` | Mutation | insertNodeAtPath | | `useStartExecutionMutation` | Mutation | startExecution | | `useProvisionBucketMutation` | Mutation | Provision an S3 bucket for a logical bucket in the database. @@ -197,6 +217,27 @@ const { mutate: create } = useCreateFunctionDeploymentMutation({ create({ functionDefinitionId: '', namespaceId: '', status: '', serviceUrl: '', serviceName: '', revision: '', image: '', concurrency: '', scaleMin: '', scaleMax: '', timeoutSeconds: '', resources: '', lastError: '', lastErrorAt: '', errorCount: '', labels: '', annotations: '', databaseId: '' }); ``` +### Resource + +```typescript +// List all resources +const { data, isLoading } = useResourcesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, namespaceId: true, kind: true, name: true, slug: true, spec: true, status: true, statusObserved: true, lastError: true, errorCount: true, labels: true, annotations: true, databaseId: true } }, +}); + +// Get one resource +const { data: item } = useResourceQuery({ + id: '', + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, namespaceId: true, kind: true, name: true, slug: true, spec: true, status: true, statusObserved: true, lastError: true, errorCount: true, labels: true, annotations: true, databaseId: true } }, +}); + +// Create a resource +const { mutate: create } = useCreateResourceMutation({ + selection: { fields: { id: true } }, +}); +create({ createdBy: '', updatedBy: '', namespaceId: '', kind: '', name: '', slug: '', spec: '', status: '', statusObserved: '', lastError: '', errorCount: '', labels: '', annotations: '', databaseId: '' }); +``` + ### FunctionGraphRef ```typescript @@ -302,6 +343,27 @@ const { mutate: create } = useCreateOrgFunctionExecutionLogMutation({ create({ invocationId: '', taskIdentifier: '', logLevel: '', message: '', metadata: '', actorId: '' }); ``` +### ResourceEvent + +```typescript +// List all resourceEvents +const { data, isLoading } = useResourceEventsQuery({ + selection: { fields: { createdAt: true, id: true, resourceId: true, eventType: true, actorId: true, message: true, metadata: true, databaseId: true } }, +}); + +// Get one resourceEvent +const { data: item } = useResourceEventQuery({ + id: '', + selection: { fields: { createdAt: true, id: true, resourceId: true, eventType: true, actorId: true, message: true, metadata: true, databaseId: true } }, +}); + +// Create a resourceEvent +const { mutate: create } = useCreateResourceEventMutation({ + selection: { fields: { id: true } }, +}); +create({ resourceId: '', eventType: '', actorId: '', message: '', metadata: '', databaseId: '' }); +``` + ### FunctionGraphExecutionOutput ```typescript @@ -386,6 +448,27 @@ const { mutate: create } = useCreateFunctionExecutionLogMutation({ create({ invocationId: '', taskIdentifier: '', logLevel: '', message: '', metadata: '', actorId: '', databaseId: '' }); ``` +### FunctionGraph + +```typescript +// List all functionGraphs +const { data, isLoading } = useFunctionGraphsQuery({ + selection: { fields: { id: true, databaseId: true, storeId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }, +}); + +// Get one functionGraph +const { data: item } = useFunctionGraphQuery({ + id: '', + selection: { fields: { id: true, databaseId: true, storeId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }, +}); + +// Create a functionGraph +const { mutate: create } = useCreateFunctionGraphMutation({ + selection: { fields: { id: true } }, +}); +create({ databaseId: '', storeId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }); +``` + ### FunctionGraphExecutionNodeState ```typescript @@ -407,25 +490,25 @@ const { mutate: create } = useCreateFunctionGraphExecutionNodeStateMutation({ create({ executionId: '', databaseId: '', nodeName: '', nodePath: '', status: '', startedAt: '', completedAt: '', errorCode: '', errorMessage: '', outputId: '' }); ``` -### FunctionGraph +### PlatformNamespace ```typescript -// List all functionGraphs -const { data, isLoading } = useFunctionGraphsQuery({ - selection: { fields: { id: true, databaseId: true, storeId: true, entityId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }, +// List all platformNamespaces +const { data, isLoading } = usePlatformNamespacesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, name: true, namespaceName: true, description: true, isActive: true, labels: true, annotations: true, databaseId: true, sourceDatabaseId: true, sourceScope: true, isManaged: true } }, }); -// Get one functionGraph -const { data: item } = useFunctionGraphQuery({ +// Get one platformNamespace +const { data: item } = usePlatformNamespaceQuery({ id: '', - selection: { fields: { id: true, databaseId: true, storeId: true, entityId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, name: true, namespaceName: true, description: true, isActive: true, labels: true, annotations: true, databaseId: true, sourceDatabaseId: true, sourceScope: true, isManaged: true } }, }); -// Create a functionGraph -const { mutate: create } = useCreateFunctionGraphMutation({ +// Create a platformNamespace +const { mutate: create } = useCreatePlatformNamespaceMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', storeId: '', entityId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }); +create({ name: '', namespaceName: '', description: '', isActive: '', labels: '', annotations: '', databaseId: '', sourceDatabaseId: '', sourceScope: '', isManaged: '' }); ``` ### OrgFunctionInvocation @@ -470,25 +553,46 @@ const { mutate: create } = useCreateFunctionInvocationMutation({ create({ actorId: '', databaseId: '', taskIdentifier: '', payload: '', status: '', result: '', error: '', durationMs: '', jobId: '', startedAt: '', completedAt: '', parentInvocationId: '', graphExecutionId: '' }); ``` +### PlatformNamespaceEvent + +```typescript +// List all platformNamespaceEvents +const { data, isLoading } = usePlatformNamespaceEventsQuery({ + selection: { fields: { createdAt: true, id: true, namespaceId: true, eventType: true, actorId: true, message: true, metadata: true, cpuMillicores: true, memoryBytes: true, storageBytes: true, networkIngressBytes: true, networkEgressBytes: true, podCount: true, metrics: true, databaseId: true } }, +}); + +// Get one platformNamespaceEvent +const { data: item } = usePlatformNamespaceEventQuery({ + id: '', + selection: { fields: { createdAt: true, id: true, namespaceId: true, eventType: true, actorId: true, message: true, metadata: true, cpuMillicores: true, memoryBytes: true, storageBytes: true, networkIngressBytes: true, networkEgressBytes: true, podCount: true, metrics: true, databaseId: true } }, +}); + +// Create a platformNamespaceEvent +const { mutate: create } = useCreatePlatformNamespaceEventMutation({ + selection: { fields: { id: true } }, +}); +create({ namespaceId: '', eventType: '', actorId: '', message: '', metadata: '', cpuMillicores: '', memoryBytes: '', storageBytes: '', networkIngressBytes: '', networkEgressBytes: '', podCount: '', metrics: '', databaseId: '' }); +``` + ### FunctionGraphExecution ```typescript // List all functionGraphExecutions const { data, isLoading } = useFunctionGraphExecutionsQuery({ - selection: { fields: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, entityId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }, + selection: { fields: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }, }); // Get one functionGraphExecution const { data: item } = useFunctionGraphExecutionQuery({ id: '', - selection: { fields: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, entityId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }, + selection: { fields: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }, }); // Create a functionGraphExecution const { mutate: create } = useCreateFunctionGraphExecutionMutation({ selection: { fields: { id: true } }, }); -create({ startedAt: '', graphId: '', invocationId: '', databaseId: '', entityId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }); +create({ startedAt: '', graphId: '', invocationId: '', databaseId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }); ``` ### FunctionDefinition @@ -613,38 +717,38 @@ addNodeAndSave |----------|------| | `input` | AddNodeAndSaveInput (required) | -### `useAddEdgeMutation` +### `useImportGraphJsonMutation` -addEdge +importGraphJson - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | AddEdgeInput (required) | + | `input` | ImportGraphJsonInput (required) | -### `useAddNodeMutation` +### `useAddEdgeMutation` -addNode +addEdge - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | AddNodeInput (required) | + | `input` | AddEdgeInput (required) | -### `useImportGraphJsonMutation` +### `useAddNodeMutation` -importGraphJson +addNode - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | ImportGraphJsonInput (required) | + | `input` | AddNodeInput (required) | ### `useInsertNodeAtPathMutation` diff --git a/sdk/constructive-react/src/compute/hooks/index.ts b/sdk/constructive-react/src/compute/hooks/index.ts index 599bf53945..7f2d74ccb0 100644 --- a/sdk/constructive-react/src/compute/hooks/index.ts +++ b/sdk/constructive-react/src/compute/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: GetAllRecord, FunctionApiBinding, FunctionDeployment, FunctionGraphRef, FunctionGraphStore, FunctionGraphObject, FunctionDeploymentEvent, OrgFunctionExecutionLog, FunctionGraphExecutionOutput, FunctionGraphCommit, SecretDefinition, FunctionExecutionLog, FunctionGraphExecutionNodeState, FunctionGraph, OrgFunctionInvocation, FunctionInvocation, FunctionGraphExecution, FunctionDefinition + * Tables: GetAllRecord, FunctionApiBinding, FunctionDeployment, Resource, FunctionGraphRef, FunctionGraphStore, FunctionGraphObject, FunctionDeploymentEvent, OrgFunctionExecutionLog, ResourceEvent, FunctionGraphExecutionOutput, FunctionGraphCommit, SecretDefinition, FunctionExecutionLog, FunctionGraph, FunctionGraphExecutionNodeState, PlatformNamespace, OrgFunctionInvocation, FunctionInvocation, PlatformNamespaceEvent, FunctionGraphExecution, FunctionDefinition * * Usage: * diff --git a/sdk/constructive-react/src/compute/hooks/invalidation.ts b/sdk/constructive-react/src/compute/hooks/invalidation.ts index 4ec68a28ac..209ee8162a 100644 --- a/sdk/constructive-react/src/compute/hooks/invalidation.ts +++ b/sdk/constructive-react/src/compute/hooks/invalidation.ts @@ -18,19 +18,23 @@ import { getAllRecordKeys, functionApiBindingKeys, functionDeploymentKeys, + resourceKeys, functionGraphRefKeys, functionGraphStoreKeys, functionGraphObjectKeys, functionDeploymentEventKeys, orgFunctionExecutionLogKeys, + resourceEventKeys, functionGraphExecutionOutputKeys, functionGraphCommitKeys, secretDefinitionKeys, functionExecutionLogKeys, - functionGraphExecutionNodeStateKeys, functionGraphKeys, + functionGraphExecutionNodeStateKeys, + platformNamespaceKeys, orgFunctionInvocationKeys, functionInvocationKeys, + platformNamespaceEventKeys, functionGraphExecutionKeys, functionDefinitionKeys, } from './query-keys'; @@ -105,6 +109,20 @@ export const invalidate = { queryKey: functionDeploymentKeys.detail(id), }), }, + /** Invalidate resource queries */ resource: { + /** Invalidate all resource queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: resourceKeys.all, + }), + /** Invalidate resource list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: resourceKeys.lists(), + }), + /** Invalidate a specific resource */ detail: (queryClient: QueryClient, id: string | number) => + queryClient.invalidateQueries({ + queryKey: resourceKeys.detail(id), + }), + }, /** Invalidate functionGraphRef queries */ functionGraphRef: { /** Invalidate all functionGraphRef queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -190,6 +208,23 @@ export const invalidate = { queryKey: orgFunctionExecutionLogKeys.detail(id), }), }, + /** Invalidate resourceEvent queries */ resourceEvent: { + /** Invalidate all resourceEvent queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: resourceEventKeys.all, + }), + /** Invalidate resourceEvent list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: resourceEventKeys.lists(), + }), + /** Invalidate a specific resourceEvent */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: resourceEventKeys.detail(id), + }), + }, /** Invalidate functionGraphExecutionOutput queries */ functionGraphExecutionOutput: { /** Invalidate all functionGraphExecutionOutput queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -258,6 +293,23 @@ export const invalidate = { queryKey: functionExecutionLogKeys.detail(id), }), }, + /** Invalidate functionGraph queries */ functionGraph: { + /** Invalidate all functionGraph queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: functionGraphKeys.all, + }), + /** Invalidate functionGraph list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: functionGraphKeys.lists(), + }), + /** Invalidate a specific functionGraph */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: functionGraphKeys.detail(id), + }), + }, /** Invalidate functionGraphExecutionNodeState queries */ functionGraphExecutionNodeState: { /** Invalidate all functionGraphExecutionNodeState queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -277,21 +329,21 @@ export const invalidate = { queryKey: functionGraphExecutionNodeStateKeys.detail(id), }), }, - /** Invalidate functionGraph queries */ functionGraph: { - /** Invalidate all functionGraph queries */ all: (queryClient: QueryClient) => + /** Invalidate platformNamespace queries */ platformNamespace: { + /** Invalidate all platformNamespace queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: functionGraphKeys.all, + queryKey: platformNamespaceKeys.all, }), - /** Invalidate functionGraph list queries */ lists: (queryClient: QueryClient) => + /** Invalidate platformNamespace list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: functionGraphKeys.lists(), + queryKey: platformNamespaceKeys.lists(), }), - /** Invalidate a specific functionGraph */ detail: ( + /** Invalidate a specific platformNamespace */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: functionGraphKeys.detail(id), + queryKey: platformNamespaceKeys.detail(id), }), }, /** Invalidate orgFunctionInvocation queries */ orgFunctionInvocation: { @@ -328,6 +380,23 @@ export const invalidate = { queryKey: functionInvocationKeys.detail(id), }), }, + /** Invalidate platformNamespaceEvent queries */ platformNamespaceEvent: { + /** Invalidate all platformNamespaceEvent queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformNamespaceEventKeys.all, + }), + /** Invalidate platformNamespaceEvent list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformNamespaceEventKeys.lists(), + }), + /** Invalidate a specific platformNamespaceEvent */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: platformNamespaceEventKeys.detail(id), + }), + }, /** Invalidate functionGraphExecution queries */ functionGraphExecution: { /** Invalidate all functionGraphExecution queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -399,6 +468,11 @@ export const remove = { queryKey: functionDeploymentKeys.detail(id), }); }, + /** Remove resource from cache */ resource: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: resourceKeys.detail(id), + }); + }, /** Remove functionGraphRef from cache */ functionGraphRef: ( queryClient: QueryClient, id: string | number @@ -439,6 +513,14 @@ export const remove = { queryKey: orgFunctionExecutionLogKeys.detail(id), }); }, + /** Remove resourceEvent from cache */ resourceEvent: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: resourceEventKeys.detail(id), + }); + }, /** Remove functionGraphExecutionOutput from cache */ functionGraphExecutionOutput: ( queryClient: QueryClient, id: string | number @@ -471,6 +553,14 @@ export const remove = { queryKey: functionExecutionLogKeys.detail(id), }); }, + /** Remove functionGraph from cache */ functionGraph: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: functionGraphKeys.detail(id), + }); + }, /** Remove functionGraphExecutionNodeState from cache */ functionGraphExecutionNodeState: ( queryClient: QueryClient, id: string | number @@ -479,12 +569,12 @@ export const remove = { queryKey: functionGraphExecutionNodeStateKeys.detail(id), }); }, - /** Remove functionGraph from cache */ functionGraph: ( + /** Remove platformNamespace from cache */ platformNamespace: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: functionGraphKeys.detail(id), + queryKey: platformNamespaceKeys.detail(id), }); }, /** Remove orgFunctionInvocation from cache */ orgFunctionInvocation: ( @@ -503,6 +593,14 @@ export const remove = { queryKey: functionInvocationKeys.detail(id), }); }, + /** Remove platformNamespaceEvent from cache */ platformNamespaceEvent: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: platformNamespaceEventKeys.detail(id), + }); + }, /** Remove functionGraphExecution from cache */ functionGraphExecution: ( queryClient: QueryClient, id: string | number diff --git a/sdk/constructive-react/src/compute/hooks/mutation-keys.ts b/sdk/constructive-react/src/compute/hooks/mutation-keys.ts index f0f7bed160..bc71617871 100644 --- a/sdk/constructive-react/src/compute/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/compute/hooks/mutation-keys.ts @@ -45,6 +45,14 @@ export const functionDeploymentMutationKeys = { /** Delete functionDeployment mutation key */ delete: (id: string | number) => ['mutation', 'functiondeployment', 'delete', id] as const, } as const; +export const resourceMutationKeys = { + /** All resource mutation keys */ all: ['mutation', 'resource'] as const, + /** Create resource mutation key */ create: () => ['mutation', 'resource', 'create'] as const, + /** Update resource mutation key */ update: (id: string | number) => + ['mutation', 'resource', 'update', id] as const, + /** Delete resource mutation key */ delete: (id: string | number) => + ['mutation', 'resource', 'delete', id] as const, +} as const; export const functionGraphRefMutationKeys = { /** All functionGraphRef mutation keys */ all: ['mutation', 'functiongraphref'] as const, /** Create functionGraphRef mutation key */ create: () => @@ -96,6 +104,15 @@ export const orgFunctionExecutionLogMutationKeys = { /** Delete orgFunctionExecutionLog mutation key */ delete: (id: string | number) => ['mutation', 'orgfunctionexecutionlog', 'delete', id] as const, } as const; +export const resourceEventMutationKeys = { + /** All resourceEvent mutation keys */ all: ['mutation', 'resourceevent'] as const, + /** Create resourceEvent mutation key */ create: () => + ['mutation', 'resourceevent', 'create'] as const, + /** Update resourceEvent mutation key */ update: (id: string | number) => + ['mutation', 'resourceevent', 'update', id] as const, + /** Delete resourceEvent mutation key */ delete: (id: string | number) => + ['mutation', 'resourceevent', 'delete', id] as const, +} as const; export const functionGraphExecutionOutputMutationKeys = { /** All functionGraphExecutionOutput mutation keys */ all: [ 'mutation', @@ -135,6 +152,15 @@ export const functionExecutionLogMutationKeys = { /** Delete functionExecutionLog mutation key */ delete: (id: string | number) => ['mutation', 'functionexecutionlog', 'delete', id] as const, } as const; +export const functionGraphMutationKeys = { + /** All functionGraph mutation keys */ all: ['mutation', 'functiongraph'] as const, + /** Create functionGraph mutation key */ create: () => + ['mutation', 'functiongraph', 'create'] as const, + /** Update functionGraph mutation key */ update: (id: string | number) => + ['mutation', 'functiongraph', 'update', id] as const, + /** Delete functionGraph mutation key */ delete: (id: string | number) => + ['mutation', 'functiongraph', 'delete', id] as const, +} as const; export const functionGraphExecutionNodeStateMutationKeys = { /** All functionGraphExecutionNodeState mutation keys */ all: [ 'mutation', @@ -147,14 +173,14 @@ export const functionGraphExecutionNodeStateMutationKeys = { /** Delete functionGraphExecutionNodeState mutation key */ delete: (id: string | number) => ['mutation', 'functiongraphexecutionnodestate', 'delete', id] as const, } as const; -export const functionGraphMutationKeys = { - /** All functionGraph mutation keys */ all: ['mutation', 'functiongraph'] as const, - /** Create functionGraph mutation key */ create: () => - ['mutation', 'functiongraph', 'create'] as const, - /** Update functionGraph mutation key */ update: (id: string | number) => - ['mutation', 'functiongraph', 'update', id] as const, - /** Delete functionGraph mutation key */ delete: (id: string | number) => - ['mutation', 'functiongraph', 'delete', id] as const, +export const platformNamespaceMutationKeys = { + /** All platformNamespace mutation keys */ all: ['mutation', 'platformnamespace'] as const, + /** Create platformNamespace mutation key */ create: () => + ['mutation', 'platformnamespace', 'create'] as const, + /** Update platformNamespace mutation key */ update: (id: string | number) => + ['mutation', 'platformnamespace', 'update', id] as const, + /** Delete platformNamespace mutation key */ delete: (id: string | number) => + ['mutation', 'platformnamespace', 'delete', id] as const, } as const; export const orgFunctionInvocationMutationKeys = { /** All orgFunctionInvocation mutation keys */ all: [ @@ -177,6 +203,18 @@ export const functionInvocationMutationKeys = { /** Delete functionInvocation mutation key */ delete: (id: string | number) => ['mutation', 'functioninvocation', 'delete', id] as const, } as const; +export const platformNamespaceEventMutationKeys = { + /** All platformNamespaceEvent mutation keys */ all: [ + 'mutation', + 'platformnamespaceevent', + ] as const, + /** Create platformNamespaceEvent mutation key */ create: () => + ['mutation', 'platformnamespaceevent', 'create'] as const, + /** Update platformNamespaceEvent mutation key */ update: (id: string | number) => + ['mutation', 'platformnamespaceevent', 'update', id] as const, + /** Delete platformNamespaceEvent mutation key */ delete: (id: string | number) => + ['mutation', 'platformnamespaceevent', 'delete', id] as const, +} as const; export const functionGraphExecutionMutationKeys = { /** All functionGraphExecution mutation keys */ all: [ 'mutation', @@ -236,6 +274,10 @@ export const customMutationKeys = { identifier ? (['mutation', 'addNodeAndSave', identifier] as const) : (['mutation', 'addNodeAndSave'] as const), + /** Mutation key for importGraphJson */ importGraphJson: (identifier?: string) => + identifier + ? (['mutation', 'importGraphJson', identifier] as const) + : (['mutation', 'importGraphJson'] as const), /** Mutation key for addEdge */ addEdge: (identifier?: string) => identifier ? (['mutation', 'addEdge', identifier] as const) @@ -244,10 +286,6 @@ export const customMutationKeys = { identifier ? (['mutation', 'addNode', identifier] as const) : (['mutation', 'addNode'] as const), - /** Mutation key for importGraphJson */ importGraphJson: (identifier?: string) => - identifier - ? (['mutation', 'importGraphJson', identifier] as const) - : (['mutation', 'importGraphJson'] as const), /** Mutation key for insertNodeAtPath */ insertNodeAtPath: (identifier?: string) => identifier ? (['mutation', 'insertNodeAtPath', identifier] as const) @@ -287,19 +325,23 @@ export const mutationKeys = { getAllRecord: getAllRecordMutationKeys, functionApiBinding: functionApiBindingMutationKeys, functionDeployment: functionDeploymentMutationKeys, + resource: resourceMutationKeys, functionGraphRef: functionGraphRefMutationKeys, functionGraphStore: functionGraphStoreMutationKeys, functionGraphObject: functionGraphObjectMutationKeys, functionDeploymentEvent: functionDeploymentEventMutationKeys, orgFunctionExecutionLog: orgFunctionExecutionLogMutationKeys, + resourceEvent: resourceEventMutationKeys, functionGraphExecutionOutput: functionGraphExecutionOutputMutationKeys, functionGraphCommit: functionGraphCommitMutationKeys, secretDefinition: secretDefinitionMutationKeys, functionExecutionLog: functionExecutionLogMutationKeys, - functionGraphExecutionNodeState: functionGraphExecutionNodeStateMutationKeys, functionGraph: functionGraphMutationKeys, + functionGraphExecutionNodeState: functionGraphExecutionNodeStateMutationKeys, + platformNamespace: platformNamespaceMutationKeys, orgFunctionInvocation: orgFunctionInvocationMutationKeys, functionInvocation: functionInvocationMutationKeys, + platformNamespaceEvent: platformNamespaceEventMutationKeys, functionGraphExecution: functionGraphExecutionMutationKeys, functionDefinition: functionDefinitionMutationKeys, custom: customMutationKeys, diff --git a/sdk/constructive-react/src/compute/hooks/mutations/index.ts b/sdk/constructive-react/src/compute/hooks/mutations/index.ts index 579248665b..828e6c581a 100644 --- a/sdk/constructive-react/src/compute/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/index.ts @@ -10,6 +10,9 @@ export * from './useDeleteFunctionApiBindingMutation'; export * from './useCreateFunctionDeploymentMutation'; export * from './useUpdateFunctionDeploymentMutation'; export * from './useDeleteFunctionDeploymentMutation'; +export * from './useCreateResourceMutation'; +export * from './useUpdateResourceMutation'; +export * from './useDeleteResourceMutation'; export * from './useCreateFunctionGraphRefMutation'; export * from './useUpdateFunctionGraphRefMutation'; export * from './useDeleteFunctionGraphRefMutation'; @@ -25,6 +28,9 @@ export * from './useDeleteFunctionDeploymentEventMutation'; export * from './useCreateOrgFunctionExecutionLogMutation'; export * from './useUpdateOrgFunctionExecutionLogMutation'; export * from './useDeleteOrgFunctionExecutionLogMutation'; +export * from './useCreateResourceEventMutation'; +export * from './useUpdateResourceEventMutation'; +export * from './useDeleteResourceEventMutation'; export * from './useCreateFunctionGraphExecutionOutputMutation'; export * from './useUpdateFunctionGraphExecutionOutputMutation'; export * from './useDeleteFunctionGraphExecutionOutputMutation'; @@ -37,18 +43,24 @@ export * from './useDeleteSecretDefinitionMutation'; export * from './useCreateFunctionExecutionLogMutation'; export * from './useUpdateFunctionExecutionLogMutation'; export * from './useDeleteFunctionExecutionLogMutation'; -export * from './useCreateFunctionGraphExecutionNodeStateMutation'; -export * from './useUpdateFunctionGraphExecutionNodeStateMutation'; -export * from './useDeleteFunctionGraphExecutionNodeStateMutation'; export * from './useCreateFunctionGraphMutation'; export * from './useUpdateFunctionGraphMutation'; export * from './useDeleteFunctionGraphMutation'; +export * from './useCreateFunctionGraphExecutionNodeStateMutation'; +export * from './useUpdateFunctionGraphExecutionNodeStateMutation'; +export * from './useDeleteFunctionGraphExecutionNodeStateMutation'; +export * from './useCreatePlatformNamespaceMutation'; +export * from './useUpdatePlatformNamespaceMutation'; +export * from './useDeletePlatformNamespaceMutation'; export * from './useCreateOrgFunctionInvocationMutation'; export * from './useUpdateOrgFunctionInvocationMutation'; export * from './useDeleteOrgFunctionInvocationMutation'; export * from './useCreateFunctionInvocationMutation'; export * from './useUpdateFunctionInvocationMutation'; export * from './useDeleteFunctionInvocationMutation'; +export * from './useCreatePlatformNamespaceEventMutation'; +export * from './useUpdatePlatformNamespaceEventMutation'; +export * from './useDeletePlatformNamespaceEventMutation'; export * from './useCreateFunctionGraphExecutionMutation'; export * from './useUpdateFunctionGraphExecutionMutation'; export * from './useDeleteFunctionGraphExecutionMutation'; @@ -63,9 +75,9 @@ export * from './useCopyGraphMutation'; export * from './useSaveGraphMutation'; export * from './useAddEdgeAndSaveMutation'; export * from './useAddNodeAndSaveMutation'; +export * from './useImportGraphJsonMutation'; export * from './useAddEdgeMutation'; export * from './useAddNodeMutation'; -export * from './useImportGraphJsonMutation'; export * from './useInsertNodeAtPathMutation'; export * from './useStartExecutionMutation'; export * from './useProvisionBucketMutation'; diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformNamespaceEventMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformNamespaceEventMutation.ts new file mode 100644 index 0000000000..28d55d5bfc --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformNamespaceEventMutation.ts @@ -0,0 +1,91 @@ +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * @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 { platformNamespaceEventKeys } from '../query-keys'; +import { platformNamespaceEventMutationKeys } from '../mutation-keys'; +import type { + PlatformNamespaceEventSelect, + PlatformNamespaceEventWithRelations, + CreatePlatformNamespaceEventInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformNamespaceEventSelect, + PlatformNamespaceEventWithRelations, + CreatePlatformNamespaceEventInput, +} from '../../orm/input-types'; +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlatformNamespaceEventMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlatformNamespaceEventMutation( + params: { + selection: { + fields: S & PlatformNamespaceEventSelect; + } & HookStrictSelect, PlatformNamespaceEventSelect>; + } & Omit< + UseMutationOptions< + { + createPlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }, + Error, + CreatePlatformNamespaceEventInput['platformNamespaceEvent'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }, + Error, + CreatePlatformNamespaceEventInput['platformNamespaceEvent'] +>; +export function useCreatePlatformNamespaceEventMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformNamespaceEventMutationKeys.create(), + mutationFn: (data: CreatePlatformNamespaceEventInput['platformNamespaceEvent']) => + getClient() + .platformNamespaceEvent.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: platformNamespaceEventKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformNamespaceMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformNamespaceMutation.ts new file mode 100644 index 0000000000..ffd9d34339 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useCreatePlatformNamespaceMutation.ts @@ -0,0 +1,91 @@ +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * @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 { platformNamespaceKeys } from '../query-keys'; +import { platformNamespaceMutationKeys } from '../mutation-keys'; +import type { + PlatformNamespaceSelect, + PlatformNamespaceWithRelations, + CreatePlatformNamespaceInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformNamespaceSelect, + PlatformNamespaceWithRelations, + CreatePlatformNamespaceInput, +} from '../../orm/input-types'; +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlatformNamespaceMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlatformNamespaceMutation( + params: { + selection: { + fields: S & PlatformNamespaceSelect; + } & HookStrictSelect, PlatformNamespaceSelect>; + } & Omit< + UseMutationOptions< + { + createPlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }, + Error, + CreatePlatformNamespaceInput['platformNamespace'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }, + Error, + CreatePlatformNamespaceInput['platformNamespace'] +>; +export function useCreatePlatformNamespaceMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformNamespaceMutationKeys.create(), + mutationFn: (data: CreatePlatformNamespaceInput['platformNamespace']) => + getClient() + .platformNamespace.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: platformNamespaceKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useCreateResourceEventMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useCreateResourceEventMutation.ts new file mode 100644 index 0000000000..8a347cfc3e --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useCreateResourceEventMutation.ts @@ -0,0 +1,88 @@ +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * @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 { resourceEventKeys } from '../query-keys'; +import { resourceEventMutationKeys } from '../mutation-keys'; +import type { + ResourceEventSelect, + ResourceEventWithRelations, + CreateResourceEventInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ResourceEventSelect, + ResourceEventWithRelations, + CreateResourceEventInput, +} from '../../orm/input-types'; +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateResourceEventMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateResourceEventMutation( + params: { + selection: { + fields: S & ResourceEventSelect; + } & HookStrictSelect, ResourceEventSelect>; + } & Omit< + UseMutationOptions< + { + createResourceEvent: { + resourceEvent: InferSelectResult; + }; + }, + Error, + CreateResourceEventInput['resourceEvent'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createResourceEvent: { + resourceEvent: InferSelectResult; + }; + }, + Error, + CreateResourceEventInput['resourceEvent'] +>; +export function useCreateResourceEventMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: resourceEventMutationKeys.create(), + mutationFn: (data: CreateResourceEventInput['resourceEvent']) => + getClient() + .resourceEvent.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: resourceEventKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useCreateResourceMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useCreateResourceMutation.ts new file mode 100644 index 0000000000..d545e49d7e --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useCreateResourceMutation.ts @@ -0,0 +1,88 @@ +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * @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 { resourceKeys } from '../query-keys'; +import { resourceMutationKeys } from '../mutation-keys'; +import type { + ResourceSelect, + ResourceWithRelations, + CreateResourceInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ResourceSelect, + ResourceWithRelations, + CreateResourceInput, +} from '../../orm/input-types'; +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateResourceMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateResourceMutation( + params: { + selection: { + fields: S & ResourceSelect; + } & HookStrictSelect, ResourceSelect>; + } & Omit< + UseMutationOptions< + { + createResource: { + resource: InferSelectResult; + }; + }, + Error, + CreateResourceInput['resource'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createResource: { + resource: InferSelectResult; + }; + }, + Error, + CreateResourceInput['resource'] +>; +export function useCreateResourceMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: resourceMutationKeys.create(), + mutationFn: (data: CreateResourceInput['resource']) => + getClient() + .resource.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: resourceKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformNamespaceEventMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformNamespaceEventMutation.ts new file mode 100644 index 0000000000..c248e1eaa5 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformNamespaceEventMutation.ts @@ -0,0 +1,108 @@ +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * @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 { platformNamespaceEventKeys } from '../query-keys'; +import { platformNamespaceEventMutationKeys } from '../mutation-keys'; +import type { + PlatformNamespaceEventSelect, + PlatformNamespaceEventWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformNamespaceEventSelect, + PlatformNamespaceEventWithRelations, +} from '../../orm/input-types'; +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlatformNamespaceEventMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlatformNamespaceEventMutation( + params: { + selection: { + fields: S & PlatformNamespaceEventSelect; + } & HookStrictSelect, PlatformNamespaceEventSelect>; + } & Omit< + UseMutationOptions< + { + deletePlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + } +>; +export function useDeletePlatformNamespaceEventMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + createdAt: string; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformNamespaceEventMutationKeys.all, + mutationFn: ({ id, createdAt }: { id: string; createdAt: string }) => + getClient() + .platformNamespaceEvent.delete({ + where: { + id, + createdAt, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: platformNamespaceEventKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformNamespaceEventKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformNamespaceMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformNamespaceMutation.ts new file mode 100644 index 0000000000..86ca139c3b --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useDeletePlatformNamespaceMutation.ts @@ -0,0 +1,104 @@ +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * @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 { platformNamespaceKeys } from '../query-keys'; +import { platformNamespaceMutationKeys } from '../mutation-keys'; +import type { + PlatformNamespaceSelect, + PlatformNamespaceWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformNamespaceSelect, + PlatformNamespaceWithRelations, +} from '../../orm/input-types'; +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlatformNamespaceMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlatformNamespaceMutation( + params: { + selection: { + fields: S & PlatformNamespaceSelect; + } & HookStrictSelect, PlatformNamespaceSelect>; + } & Omit< + UseMutationOptions< + { + deletePlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlatformNamespaceMutation( + 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: platformNamespaceMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .platformNamespace.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: platformNamespaceKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformNamespaceKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useDeleteResourceEventMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useDeleteResourceEventMutation.ts new file mode 100644 index 0000000000..5ee7ed7f19 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useDeleteResourceEventMutation.ts @@ -0,0 +1,102 @@ +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * @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 { resourceEventKeys } from '../query-keys'; +import { resourceEventMutationKeys } from '../mutation-keys'; +import type { ResourceEventSelect, ResourceEventWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ResourceEventSelect, ResourceEventWithRelations } from '../../orm/input-types'; +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteResourceEventMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteResourceEventMutation( + params: { + selection: { + fields: S & ResourceEventSelect; + } & HookStrictSelect, ResourceEventSelect>; + } & Omit< + UseMutationOptions< + { + deleteResourceEvent: { + resourceEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteResourceEvent: { + resourceEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + } +>; +export function useDeleteResourceEventMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + createdAt: string; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: resourceEventMutationKeys.all, + mutationFn: ({ id, createdAt }: { id: string; createdAt: string }) => + getClient() + .resourceEvent.delete({ + where: { + id, + createdAt, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: resourceEventKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: resourceEventKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useDeleteResourceMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useDeleteResourceMutation.ts new file mode 100644 index 0000000000..647b2f9aff --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useDeleteResourceMutation.ts @@ -0,0 +1,98 @@ +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * @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 { resourceKeys } from '../query-keys'; +import { resourceMutationKeys } from '../mutation-keys'; +import type { ResourceSelect, ResourceWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ResourceSelect, ResourceWithRelations } from '../../orm/input-types'; +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteResourceMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteResourceMutation( + params: { + selection: { + fields: S & ResourceSelect; + } & HookStrictSelect, ResourceSelect>; + } & Omit< + UseMutationOptions< + { + deleteResource: { + resource: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteResource: { + resource: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteResourceMutation( + 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: resourceMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .resource.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: resourceKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: resourceKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformNamespaceEventMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformNamespaceEventMutation.ts new file mode 100644 index 0000000000..9ca416fd9c --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformNamespaceEventMutation.ts @@ -0,0 +1,122 @@ +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * @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 { platformNamespaceEventKeys } from '../query-keys'; +import { platformNamespaceEventMutationKeys } from '../mutation-keys'; +import type { + PlatformNamespaceEventSelect, + PlatformNamespaceEventWithRelations, + PlatformNamespaceEventPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformNamespaceEventSelect, + PlatformNamespaceEventWithRelations, + PlatformNamespaceEventPatch, +} from '../../orm/input-types'; +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlatformNamespaceEventMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', platformNamespaceEventPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlatformNamespaceEventMutation( + params: { + selection: { + fields: S & PlatformNamespaceEventSelect; + } & HookStrictSelect, PlatformNamespaceEventSelect>; + } & Omit< + UseMutationOptions< + { + updatePlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + platformNamespaceEventPatch: PlatformNamespaceEventPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + platformNamespaceEventPatch: PlatformNamespaceEventPatch; + } +>; +export function useUpdatePlatformNamespaceEventMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + createdAt: string; + platformNamespaceEventPatch: PlatformNamespaceEventPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformNamespaceEventMutationKeys.all, + mutationFn: ({ + id, + createdAt, + platformNamespaceEventPatch, + }: { + id: string; + createdAt: string; + platformNamespaceEventPatch: PlatformNamespaceEventPatch; + }) => + getClient() + .platformNamespaceEvent.update({ + where: { + id, + createdAt, + }, + data: platformNamespaceEventPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: platformNamespaceEventKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformNamespaceEventKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformNamespaceMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformNamespaceMutation.ts new file mode 100644 index 0000000000..de626ae084 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useUpdatePlatformNamespaceMutation.ts @@ -0,0 +1,116 @@ +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * @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 { platformNamespaceKeys } from '../query-keys'; +import { platformNamespaceMutationKeys } from '../mutation-keys'; +import type { + PlatformNamespaceSelect, + PlatformNamespaceWithRelations, + PlatformNamespacePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformNamespaceSelect, + PlatformNamespaceWithRelations, + PlatformNamespacePatch, +} from '../../orm/input-types'; +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlatformNamespaceMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', platformNamespacePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlatformNamespaceMutation( + params: { + selection: { + fields: S & PlatformNamespaceSelect; + } & HookStrictSelect, PlatformNamespaceSelect>; + } & Omit< + UseMutationOptions< + { + updatePlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }, + Error, + { + id: string; + platformNamespacePatch: PlatformNamespacePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }, + Error, + { + id: string; + platformNamespacePatch: PlatformNamespacePatch; + } +>; +export function useUpdatePlatformNamespaceMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + platformNamespacePatch: PlatformNamespacePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformNamespaceMutationKeys.all, + mutationFn: ({ + id, + platformNamespacePatch, + }: { + id: string; + platformNamespacePatch: PlatformNamespacePatch; + }) => + getClient() + .platformNamespace.update({ + where: { + id, + }, + data: platformNamespacePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: platformNamespaceKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformNamespaceKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useUpdateResourceEventMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useUpdateResourceEventMutation.ts new file mode 100644 index 0000000000..dc1e9b08fc --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useUpdateResourceEventMutation.ts @@ -0,0 +1,122 @@ +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * @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 { resourceEventKeys } from '../query-keys'; +import { resourceEventMutationKeys } from '../mutation-keys'; +import type { + ResourceEventSelect, + ResourceEventWithRelations, + ResourceEventPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ResourceEventSelect, + ResourceEventWithRelations, + ResourceEventPatch, +} from '../../orm/input-types'; +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateResourceEventMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', resourceEventPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateResourceEventMutation( + params: { + selection: { + fields: S & ResourceEventSelect; + } & HookStrictSelect, ResourceEventSelect>; + } & Omit< + UseMutationOptions< + { + updateResourceEvent: { + resourceEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + resourceEventPatch: ResourceEventPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateResourceEvent: { + resourceEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + resourceEventPatch: ResourceEventPatch; + } +>; +export function useUpdateResourceEventMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + createdAt: string; + resourceEventPatch: ResourceEventPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: resourceEventMutationKeys.all, + mutationFn: ({ + id, + createdAt, + resourceEventPatch, + }: { + id: string; + createdAt: string; + resourceEventPatch: ResourceEventPatch; + }) => + getClient() + .resourceEvent.update({ + where: { + id, + createdAt, + }, + data: resourceEventPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: resourceEventKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: resourceEventKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useUpdateResourceMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useUpdateResourceMutation.ts new file mode 100644 index 0000000000..034de88cf1 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useUpdateResourceMutation.ts @@ -0,0 +1,102 @@ +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * @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 { resourceKeys } from '../query-keys'; +import { resourceMutationKeys } from '../mutation-keys'; +import type { ResourceSelect, ResourceWithRelations, ResourcePatch } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ResourceSelect, ResourceWithRelations, ResourcePatch } from '../../orm/input-types'; +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateResourceMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', resourcePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateResourceMutation( + params: { + selection: { + fields: S & ResourceSelect; + } & HookStrictSelect, ResourceSelect>; + } & Omit< + UseMutationOptions< + { + updateResource: { + resource: InferSelectResult; + }; + }, + Error, + { + id: string; + resourcePatch: ResourcePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateResource: { + resource: InferSelectResult; + }; + }, + Error, + { + id: string; + resourcePatch: ResourcePatch; + } +>; +export function useUpdateResourceMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + resourcePatch: ResourcePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: resourceMutationKeys.all, + mutationFn: ({ id, resourcePatch }: { id: string; resourcePatch: ResourcePatch }) => + getClient() + .resource.update({ + where: { + id, + }, + data: resourcePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: resourceKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: resourceKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/index.ts b/sdk/constructive-react/src/compute/hooks/queries/index.ts index b4221dda67..82cd256241 100644 --- a/sdk/constructive-react/src/compute/hooks/queries/index.ts +++ b/sdk/constructive-react/src/compute/hooks/queries/index.ts @@ -8,6 +8,8 @@ export * from './useFunctionApiBindingsQuery'; export * from './useFunctionApiBindingQuery'; export * from './useFunctionDeploymentsQuery'; export * from './useFunctionDeploymentQuery'; +export * from './useResourcesQuery'; +export * from './useResourceQuery'; export * from './useFunctionGraphRefsQuery'; export * from './useFunctionGraphRefQuery'; export * from './useFunctionGraphStoresQuery'; @@ -18,6 +20,8 @@ export * from './useFunctionDeploymentEventsQuery'; export * from './useFunctionDeploymentEventQuery'; export * from './useOrgFunctionExecutionLogsQuery'; export * from './useOrgFunctionExecutionLogQuery'; +export * from './useResourceEventsQuery'; +export * from './useResourceEventQuery'; export * from './useFunctionGraphExecutionOutputsQuery'; export * from './useFunctionGraphExecutionOutputQuery'; export * from './useFunctionGraphCommitsQuery'; @@ -26,14 +30,18 @@ export * from './useSecretDefinitionsQuery'; export * from './useSecretDefinitionQuery'; export * from './useFunctionExecutionLogsQuery'; export * from './useFunctionExecutionLogQuery'; -export * from './useFunctionGraphExecutionNodeStatesQuery'; -export * from './useFunctionGraphExecutionNodeStateQuery'; export * from './useFunctionGraphsQuery'; export * from './useFunctionGraphQuery'; +export * from './useFunctionGraphExecutionNodeStatesQuery'; +export * from './useFunctionGraphExecutionNodeStateQuery'; +export * from './usePlatformNamespacesQuery'; +export * from './usePlatformNamespaceQuery'; export * from './useOrgFunctionInvocationsQuery'; export * from './useOrgFunctionInvocationQuery'; export * from './useFunctionInvocationsQuery'; export * from './useFunctionInvocationQuery'; +export * from './usePlatformNamespaceEventsQuery'; +export * from './usePlatformNamespaceEventQuery'; export * from './useFunctionGraphExecutionsQuery'; export * from './useFunctionGraphExecutionQuery'; export * from './useFunctionDefinitionsQuery'; diff --git a/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceEventQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceEventQuery.ts new file mode 100644 index 0000000000..7801c80b9e --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceEventQuery.ts @@ -0,0 +1,146 @@ +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * @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 { platformNamespaceEventKeys } from '../query-keys'; +import type { + PlatformNamespaceEventSelect, + PlatformNamespaceEventWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformNamespaceEventSelect, + PlatformNamespaceEventWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformNamespaceEventQueryKey = platformNamespaceEventKeys.detail; +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformNamespaceEventQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlatformNamespaceEventQuery< + S extends PlatformNamespaceEventSelect, + TData = { + platformNamespaceEvent: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformNamespaceEventSelect>; + } & Omit< + UseQueryOptions< + { + platformNamespaceEvent: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformNamespaceEventQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformNamespaceEventKeys.detail(params.id), + queryFn: () => + getClient() + .platformNamespaceEvent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * + * @example + * ```ts + * const data = await fetchPlatformNamespaceEventQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlatformNamespaceEventQuery< + S extends PlatformNamespaceEventSelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformNamespaceEventSelect>; +}): Promise<{ + platformNamespaceEvent: InferSelectResult | null; +}>; +export async function fetchPlatformNamespaceEventQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .platformNamespaceEvent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * + * @example + * ```ts + * await prefetchPlatformNamespaceEventQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlatformNamespaceEventQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformNamespaceEventSelect>; + } +): Promise; +export async function prefetchPlatformNamespaceEventQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformNamespaceEventKeys.detail(params.id), + queryFn: () => + getClient() + .platformNamespaceEvent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceEventsQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceEventsQuery.ts new file mode 100644 index 0000000000..1d906fbe67 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceEventsQuery.ts @@ -0,0 +1,180 @@ +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * @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 { platformNamespaceEventKeys } from '../query-keys'; +import type { + PlatformNamespaceEventSelect, + PlatformNamespaceEventWithRelations, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlatformNamespaceEventSelect, + PlatformNamespaceEventWithRelations, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformNamespaceEventsQueryKey = platformNamespaceEventKeys.list; +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformNamespaceEventsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlatformNamespaceEventsQuery< + S extends PlatformNamespaceEventSelect, + TData = { + platformNamespaceEvents: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformNamespaceEventSelect>; + } & Omit< + UseQueryOptions< + { + platformNamespaceEvents: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformNamespaceEventsQuery( + params: { + selection: ListSelectionConfig< + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformNamespaceEventKeys.list(args), + queryFn: () => getClient().platformNamespaceEvent.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * + * @example + * ```ts + * const data = await fetchPlatformNamespaceEventsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlatformNamespaceEventsQuery< + S extends PlatformNamespaceEventSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformNamespaceEventSelect>; +}): Promise<{ + platformNamespaceEvents: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchPlatformNamespaceEventsQuery(params: { + selection: ListSelectionConfig< + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy + >; +}) { + const args = buildListSelectionArgs< + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy + >(params.selection); + return getClient().platformNamespaceEvent.findMany(args).unwrap(); +} +/** + * Namespace lifecycle events — audit log of creation, activation, deactivation, label changes + * + * @example + * ```ts + * await prefetchPlatformNamespaceEventsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlatformNamespaceEventsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformNamespaceEventSelect>; + } +): Promise; +export async function prefetchPlatformNamespaceEventsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformNamespaceEventKeys.list(args), + queryFn: () => getClient().platformNamespaceEvent.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceQuery.ts new file mode 100644 index 0000000000..962f42695f --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespaceQuery.ts @@ -0,0 +1,144 @@ +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * @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 { platformNamespaceKeys } from '../query-keys'; +import type { + PlatformNamespaceSelect, + PlatformNamespaceWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformNamespaceSelect, + PlatformNamespaceWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformNamespaceQueryKey = platformNamespaceKeys.detail; +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformNamespaceQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlatformNamespaceQuery< + S extends PlatformNamespaceSelect, + TData = { + platformNamespace: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformNamespaceSelect>; + } & Omit< + UseQueryOptions< + { + platformNamespace: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformNamespaceQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformNamespaceKeys.detail(params.id), + queryFn: () => + getClient() + .platformNamespace.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * + * @example + * ```ts + * const data = await fetchPlatformNamespaceQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlatformNamespaceQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformNamespaceSelect>; +}): Promise<{ + platformNamespace: InferSelectResult | null; +}>; +export async function fetchPlatformNamespaceQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .platformNamespace.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * + * @example + * ```ts + * await prefetchPlatformNamespaceQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlatformNamespaceQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformNamespaceSelect>; + } +): Promise; +export async function prefetchPlatformNamespaceQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformNamespaceKeys.detail(params.id), + queryFn: () => + getClient() + .platformNamespace.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespacesQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespacesQuery.ts new file mode 100644 index 0000000000..08c0cd485b --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/usePlatformNamespacesQuery.ts @@ -0,0 +1,163 @@ +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * @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 { platformNamespaceKeys } from '../query-keys'; +import type { + PlatformNamespaceSelect, + PlatformNamespaceWithRelations, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlatformNamespaceSelect, + PlatformNamespaceWithRelations, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformNamespacesQueryKey = platformNamespaceKeys.list; +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformNamespacesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlatformNamespacesQuery< + S extends PlatformNamespaceSelect, + TData = { + platformNamespaces: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlatformNamespaceSelect>; + } & Omit< + UseQueryOptions< + { + platformNamespaces: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformNamespacesQuery( + params: { + selection: ListSelectionConfig< + PlatformNamespaceSelect, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PlatformNamespaceSelect, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformNamespaceKeys.list(args), + queryFn: () => getClient().platformNamespace.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * + * @example + * ```ts + * const data = await fetchPlatformNamespacesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlatformNamespacesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlatformNamespaceSelect>; +}): Promise<{ + platformNamespaces: ConnectionResult>; +}>; +export async function fetchPlatformNamespacesQuery(params: { + selection: ListSelectionConfig< + PlatformNamespaceSelect, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy + >; +}) { + const args = buildListSelectionArgs< + PlatformNamespaceSelect, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy + >(params.selection); + return getClient().platformNamespace.findMany(args).unwrap(); +} +/** + * Logical namespace containers for grouping secrets, config, functions, and other resources + * + * @example + * ```ts + * await prefetchPlatformNamespacesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlatformNamespacesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlatformNamespaceSelect>; + } +): Promise; +export async function prefetchPlatformNamespacesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PlatformNamespaceSelect, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PlatformNamespaceSelect, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformNamespaceKeys.list(args), + queryFn: () => getClient().platformNamespace.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/useResourceEventQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/useResourceEventQuery.ts new file mode 100644 index 0000000000..96b509f321 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/useResourceEventQuery.ts @@ -0,0 +1,138 @@ +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * @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 { resourceEventKeys } from '../query-keys'; +import type { ResourceEventSelect, ResourceEventWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ResourceEventSelect, ResourceEventWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const resourceEventQueryKey = resourceEventKeys.detail; +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * + * @example + * ```tsx + * const { data, isLoading } = useResourceEventQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useResourceEventQuery< + S extends ResourceEventSelect, + TData = { + resourceEvent: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ResourceEventSelect>; + } & Omit< + UseQueryOptions< + { + resourceEvent: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useResourceEventQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: resourceEventKeys.detail(params.id), + queryFn: () => + getClient() + .resourceEvent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * + * @example + * ```ts + * const data = await fetchResourceEventQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchResourceEventQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ResourceEventSelect>; +}): Promise<{ + resourceEvent: InferSelectResult | null; +}>; +export async function fetchResourceEventQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .resourceEvent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * + * @example + * ```ts + * await prefetchResourceEventQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchResourceEventQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ResourceEventSelect>; + } +): Promise; +export async function prefetchResourceEventQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: resourceEventKeys.detail(params.id), + queryFn: () => + getClient() + .resourceEvent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/useResourceEventsQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/useResourceEventsQuery.ts new file mode 100644 index 0000000000..079396bb54 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/useResourceEventsQuery.ts @@ -0,0 +1,151 @@ +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * @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 { resourceEventKeys } from '../query-keys'; +import type { + ResourceEventSelect, + ResourceEventWithRelations, + ResourceEventFilter, + ResourceEventOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + ResourceEventSelect, + ResourceEventWithRelations, + ResourceEventFilter, + ResourceEventOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const resourceEventsQueryKey = resourceEventKeys.list; +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * + * @example + * ```tsx + * const { data, isLoading } = useResourceEventsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useResourceEventsQuery< + S extends ResourceEventSelect, + TData = { + resourceEvents: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ResourceEventSelect>; + } & Omit< + UseQueryOptions< + { + resourceEvents: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useResourceEventsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + ResourceEventSelect, + ResourceEventFilter, + ResourceEventOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: resourceEventKeys.list(args), + queryFn: () => getClient().resourceEvent.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * + * @example + * ```ts + * const data = await fetchResourceEventsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchResourceEventsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ResourceEventSelect>; +}): Promise<{ + resourceEvents: ConnectionResult>; +}>; +export async function fetchResourceEventsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs< + ResourceEventSelect, + ResourceEventFilter, + ResourceEventOrderBy + >(params.selection); + return getClient().resourceEvent.findMany(args).unwrap(); +} +/** + * Resource lifecycle events — audit log of provisioning, updates, and failure events + * + * @example + * ```ts + * await prefetchResourceEventsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchResourceEventsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ResourceEventSelect>; + } +): Promise; +export async function prefetchResourceEventsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs< + ResourceEventSelect, + ResourceEventFilter, + ResourceEventOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: resourceEventKeys.list(args), + queryFn: () => getClient().resourceEvent.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/useResourceQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/useResourceQuery.ts new file mode 100644 index 0000000000..97a42f8334 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/useResourceQuery.ts @@ -0,0 +1,138 @@ +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * @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 { resourceKeys } from '../query-keys'; +import type { ResourceSelect, ResourceWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ResourceSelect, ResourceWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const resourceQueryKey = resourceKeys.detail; +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * + * @example + * ```tsx + * const { data, isLoading } = useResourceQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useResourceQuery< + S extends ResourceSelect, + TData = { + resource: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ResourceSelect>; + } & Omit< + UseQueryOptions< + { + resource: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useResourceQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: resourceKeys.detail(params.id), + queryFn: () => + getClient() + .resource.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * + * @example + * ```ts + * const data = await fetchResourceQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchResourceQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ResourceSelect>; +}): Promise<{ + resource: InferSelectResult | null; +}>; +export async function fetchResourceQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .resource.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * + * @example + * ```ts + * await prefetchResourceQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchResourceQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ResourceSelect>; + } +): Promise; +export async function prefetchResourceQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: resourceKeys.detail(params.id), + queryFn: () => + getClient() + .resource.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/useResourcesQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/useResourcesQuery.ts new file mode 100644 index 0000000000..2894bdfe8d --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/useResourcesQuery.ts @@ -0,0 +1,145 @@ +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * @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 { resourceKeys } from '../query-keys'; +import type { + ResourceSelect, + ResourceWithRelations, + ResourceFilter, + ResourceOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + ResourceSelect, + ResourceWithRelations, + ResourceFilter, + ResourceOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const resourcesQueryKey = resourceKeys.list; +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * + * @example + * ```tsx + * const { data, isLoading } = useResourcesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useResourcesQuery< + S extends ResourceSelect, + TData = { + resources: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ResourceSelect>; + } & Omit< + UseQueryOptions< + { + resources: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useResourcesQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: resourceKeys.list(args), + queryFn: () => getClient().resource.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * + * @example + * ```ts + * const data = await fetchResourcesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchResourcesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ResourceSelect>; +}): Promise<{ + resources: ConnectionResult>; +}>; +export async function fetchResourcesQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().resource.findMany(args).unwrap(); +} +/** + * Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace + * + * @example + * ```ts + * await prefetchResourcesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchResourcesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ResourceSelect>; + } +): Promise; +export async function prefetchResourcesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: resourceKeys.list(args), + queryFn: () => getClient().resource.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/query-keys.ts b/sdk/constructive-react/src/compute/hooks/query-keys.ts index 840d3786cd..8631c75eb2 100644 --- a/sdk/constructive-react/src/compute/hooks/query-keys.ts +++ b/sdk/constructive-react/src/compute/hooks/query-keys.ts @@ -46,6 +46,15 @@ export const functionDeploymentKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...functionDeploymentKeys.details(), id] as const, } as const; +export const resourceKeys = { + /** All resource queries */ all: ['resource'] as const, + /** List query keys */ lists: () => [...resourceKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...resourceKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...resourceKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...resourceKeys.details(), id] as const, +} as const; export const functionGraphRefKeys = { /** All functionGraphRef queries */ all: ['functiongraphref'] as const, /** List query keys */ lists: () => [...functionGraphRefKeys.all, 'list'] as const, @@ -91,6 +100,15 @@ export const orgFunctionExecutionLogKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...orgFunctionExecutionLogKeys.details(), id] as const, } as const; +export const resourceEventKeys = { + /** All resourceEvent queries */ all: ['resourceevent'] as const, + /** List query keys */ lists: () => [...resourceEventKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...resourceEventKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...resourceEventKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...resourceEventKeys.details(), id] as const, +} as const; export const functionGraphExecutionOutputKeys = { /** All functionGraphExecutionOutput queries */ all: ['functiongraphexecutionoutput'] as const, /** List query keys */ lists: () => [...functionGraphExecutionOutputKeys.all, 'list'] as const, @@ -128,6 +146,15 @@ export const functionExecutionLogKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...functionExecutionLogKeys.details(), id] as const, } as const; +export const functionGraphKeys = { + /** All functionGraph queries */ all: ['functiongraph'] as const, + /** List query keys */ lists: () => [...functionGraphKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...functionGraphKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...functionGraphKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...functionGraphKeys.details(), id] as const, +} as const; export const functionGraphExecutionNodeStateKeys = { /** All functionGraphExecutionNodeState queries */ all: [ 'functiongraphexecutionnodestate', @@ -140,14 +167,14 @@ export const functionGraphExecutionNodeStateKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...functionGraphExecutionNodeStateKeys.details(), id] as const, } as const; -export const functionGraphKeys = { - /** All functionGraph queries */ all: ['functiongraph'] as const, - /** List query keys */ lists: () => [...functionGraphKeys.all, 'list'] as const, +export const platformNamespaceKeys = { + /** All platformNamespace queries */ all: ['platformnamespace'] as const, + /** List query keys */ lists: () => [...platformNamespaceKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...functionGraphKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...functionGraphKeys.all, 'detail'] as const, + [...platformNamespaceKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...platformNamespaceKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...functionGraphKeys.details(), id] as const, + [...platformNamespaceKeys.details(), id] as const, } as const; export const orgFunctionInvocationKeys = { /** All orgFunctionInvocation queries */ all: ['orgfunctioninvocation'] as const, @@ -167,6 +194,15 @@ export const functionInvocationKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...functionInvocationKeys.details(), id] as const, } as const; +export const platformNamespaceEventKeys = { + /** All platformNamespaceEvent queries */ all: ['platformnamespaceevent'] as const, + /** List query keys */ lists: () => [...platformNamespaceEventKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...platformNamespaceEventKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...platformNamespaceEventKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...platformNamespaceEventKeys.details(), id] as const, +} as const; export const functionGraphExecutionKeys = { /** All functionGraphExecution queries */ all: ['functiongraphexecution'] as const, /** List query keys */ lists: () => [...functionGraphExecutionKeys.all, 'list'] as const, @@ -220,19 +256,23 @@ export const queryKeys = { getAllRecord: getAllRecordKeys, functionApiBinding: functionApiBindingKeys, functionDeployment: functionDeploymentKeys, + resource: resourceKeys, functionGraphRef: functionGraphRefKeys, functionGraphStore: functionGraphStoreKeys, functionGraphObject: functionGraphObjectKeys, functionDeploymentEvent: functionDeploymentEventKeys, orgFunctionExecutionLog: orgFunctionExecutionLogKeys, + resourceEvent: resourceEventKeys, functionGraphExecutionOutput: functionGraphExecutionOutputKeys, functionGraphCommit: functionGraphCommitKeys, secretDefinition: secretDefinitionKeys, functionExecutionLog: functionExecutionLogKeys, - functionGraphExecutionNodeState: functionGraphExecutionNodeStateKeys, functionGraph: functionGraphKeys, + functionGraphExecutionNodeState: functionGraphExecutionNodeStateKeys, + platformNamespace: platformNamespaceKeys, orgFunctionInvocation: orgFunctionInvocationKeys, functionInvocation: functionInvocationKeys, + platformNamespaceEvent: platformNamespaceEventKeys, functionGraphExecution: functionGraphExecutionKeys, functionDefinition: functionDefinitionKeys, custom: customQueryKeys, diff --git a/sdk/constructive-react/src/compute/orm/README.md b/sdk/constructive-react/src/compute/orm/README.md index c266bdfcb7..2ea41b7b40 100644 --- a/sdk/constructive-react/src/compute/orm/README.md +++ b/sdk/constructive-react/src/compute/orm/README.md @@ -24,19 +24,23 @@ const db = createClient({ | `getAllRecord` | findMany, findOne, create, update, delete | | `functionApiBinding` | findMany, findOne, create, update, delete | | `functionDeployment` | findMany, findOne, create, update, delete | +| `resource` | findMany, findOne, create, update, delete | | `functionGraphRef` | findMany, findOne, create, update, delete | | `functionGraphStore` | findMany, findOne, create, update, delete | | `functionGraphObject` | findMany, findOne, create, update, delete | | `functionDeploymentEvent` | findMany, findOne, create, update, delete | | `orgFunctionExecutionLog` | findMany, findOne, create, update, delete | +| `resourceEvent` | findMany, findOne, create, update, delete | | `functionGraphExecutionOutput` | findMany, findOne, create, update, delete | | `functionGraphCommit` | findMany, findOne, create, update, delete | | `secretDefinition` | findMany, findOne, create, update, delete | | `functionExecutionLog` | findMany, findOne, create, update, delete | -| `functionGraphExecutionNodeState` | findMany, findOne, create, update, delete | | `functionGraph` | findMany, findOne, create, update, delete | +| `functionGraphExecutionNodeState` | findMany, findOne, create, update, delete | +| `platformNamespace` | findMany, findOne, create, update, delete | | `orgFunctionInvocation` | findMany, findOne, create, update, delete | | `functionInvocation` | findMany, findOne, create, update, delete | +| `platformNamespaceEvent` | findMany, findOne, create, update, delete | | `functionGraphExecution` | findMany, findOne, create, update, delete | | `functionDefinition` | findMany, findOne, create, update, delete | @@ -154,6 +158,51 @@ const updated = await db.functionDeployment.update({ where: { id: '' }, da const deleted = await db.functionDeployment.delete({ where: { id: '' } }).execute(); ``` +### `db.resource` + +CRUD operations for Resource records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `updatedBy` | UUID | Yes | +| `namespaceId` | UUID | Yes | +| `kind` | String | Yes | +| `name` | String | Yes | +| `slug` | String | Yes | +| `spec` | JSON | Yes | +| `status` | String | Yes | +| `statusObserved` | JSON | Yes | +| `lastError` | String | Yes | +| `errorCount` | Int | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | +| `databaseId` | UUID | Yes | + +**Operations:** + +```typescript +// List all resource records +const items = await db.resource.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, namespaceId: true, kind: true, name: true, slug: true, spec: true, status: true, statusObserved: true, lastError: true, errorCount: true, labels: true, annotations: true, databaseId: true } }).execute(); + +// Get one by id +const item = await db.resource.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, namespaceId: true, kind: true, name: true, slug: true, spec: true, status: true, statusObserved: true, lastError: true, errorCount: true, labels: true, annotations: true, databaseId: true } }).execute(); + +// Create +const created = await db.resource.create({ data: { createdBy: '', updatedBy: '', namespaceId: '', kind: '', name: '', slug: '', spec: '', status: '', statusObserved: '', lastError: '', errorCount: '', labels: '', annotations: '', databaseId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.resource.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.resource.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphRef` CRUD operations for FunctionGraphRef records. @@ -326,6 +375,42 @@ const updated = await db.orgFunctionExecutionLog.update({ where: { id: '' const deleted = await db.orgFunctionExecutionLog.delete({ where: { id: '' } }).execute(); ``` +### `db.resourceEvent` + +CRUD operations for ResourceEvent records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `resourceId` | UUID | Yes | +| `eventType` | String | Yes | +| `actorId` | UUID | Yes | +| `message` | String | Yes | +| `metadata` | JSON | Yes | +| `databaseId` | UUID | Yes | + +**Operations:** + +```typescript +// List all resourceEvent records +const items = await db.resourceEvent.findMany({ select: { createdAt: true, id: true, resourceId: true, eventType: true, actorId: true, message: true, metadata: true, databaseId: true } }).execute(); + +// Get one by id +const item = await db.resourceEvent.findOne({ id: '', select: { createdAt: true, id: true, resourceId: true, eventType: true, actorId: true, message: true, metadata: true, databaseId: true } }).execute(); + +// Create +const created = await db.resourceEvent.create({ data: { resourceId: '', eventType: '', actorId: '', message: '', metadata: '', databaseId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.resourceEvent.update({ where: { id: '' }, data: { resourceId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.resourceEvent.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphExecutionOutput` CRUD operations for FunctionGraphExecutionOutput records. @@ -470,6 +555,46 @@ const updated = await db.functionExecutionLog.update({ where: { id: '' }, const deleted = await db.functionExecutionLog.delete({ where: { id: '' } }).execute(); ``` +### `db.functionGraph` + +CRUD operations for FunctionGraph records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `storeId` | UUID | Yes | +| `context` | String | Yes | +| `name` | String | Yes | +| `description` | String | Yes | +| `definitionsCommitId` | UUID | Yes | +| `isValid` | Boolean | Yes | +| `validationErrors` | JSON | Yes | +| `createdBy` | UUID | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all functionGraph records +const items = await db.functionGraph.findMany({ select: { id: true, databaseId: true, storeId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.functionGraph.findOne({ id: '', select: { id: true, databaseId: true, storeId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.functionGraph.create({ data: { databaseId: '', storeId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.functionGraph.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.functionGraph.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphExecutionNodeState` CRUD operations for FunctionGraphExecutionNodeState records. @@ -510,45 +635,45 @@ const updated = await db.functionGraphExecutionNodeState.update({ where: { id: ' const deleted = await db.functionGraphExecutionNodeState.delete({ where: { id: '' } }).execute(); ``` -### `db.functionGraph` +### `db.platformNamespace` -CRUD operations for FunctionGraph records. +CRUD operations for PlatformNamespace records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | -| `databaseId` | UUID | Yes | -| `storeId` | UUID | Yes | -| `entityId` | UUID | Yes | -| `context` | String | Yes | -| `name` | String | Yes | -| `description` | String | Yes | -| `definitionsCommitId` | UUID | Yes | -| `isValid` | Boolean | Yes | -| `validationErrors` | JSON | Yes | -| `createdBy` | UUID | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | +| `name` | String | Yes | +| `namespaceName` | String | Yes | +| `description` | String | Yes | +| `isActive` | Boolean | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | +| `databaseId` | UUID | Yes | +| `sourceDatabaseId` | UUID | Yes | +| `sourceScope` | String | Yes | +| `isManaged` | Boolean | Yes | **Operations:** ```typescript -// List all functionGraph records -const items = await db.functionGraph.findMany({ select: { id: true, databaseId: true, storeId: true, entityId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); +// List all platformNamespace records +const items = await db.platformNamespace.findMany({ select: { id: true, createdAt: true, updatedAt: true, name: true, namespaceName: true, description: true, isActive: true, labels: true, annotations: true, databaseId: true, sourceDatabaseId: true, sourceScope: true, isManaged: true } }).execute(); // Get one by id -const item = await db.functionGraph.findOne({ id: '', select: { id: true, databaseId: true, storeId: true, entityId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.platformNamespace.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, name: true, namespaceName: true, description: true, isActive: true, labels: true, annotations: true, databaseId: true, sourceDatabaseId: true, sourceScope: true, isManaged: true } }).execute(); // Create -const created = await db.functionGraph.create({ data: { databaseId: '', storeId: '', entityId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }, select: { id: true } }).execute(); +const created = await db.platformNamespace.create({ data: { name: '', namespaceName: '', description: '', isActive: '', labels: '', annotations: '', databaseId: '', sourceDatabaseId: '', sourceScope: '', isManaged: '' }, select: { id: true } }).execute(); // Update -const updated = await db.functionGraph.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.platformNamespace.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.functionGraph.delete({ where: { id: '' } }).execute(); +const deleted = await db.platformNamespace.delete({ where: { id: '' } }).execute(); ``` ### `db.orgFunctionInvocation` @@ -636,6 +761,49 @@ const updated = await db.functionInvocation.update({ where: { id: '' }, da const deleted = await db.functionInvocation.delete({ where: { id: '' } }).execute(); ``` +### `db.platformNamespaceEvent` + +CRUD operations for PlatformNamespaceEvent records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `namespaceId` | UUID | Yes | +| `eventType` | String | Yes | +| `actorId` | UUID | Yes | +| `message` | String | Yes | +| `metadata` | JSON | Yes | +| `cpuMillicores` | Int | Yes | +| `memoryBytes` | BigInt | Yes | +| `storageBytes` | BigInt | Yes | +| `networkIngressBytes` | BigInt | Yes | +| `networkEgressBytes` | BigInt | Yes | +| `podCount` | Int | Yes | +| `metrics` | JSON | Yes | +| `databaseId` | UUID | Yes | + +**Operations:** + +```typescript +// List all platformNamespaceEvent records +const items = await db.platformNamespaceEvent.findMany({ select: { createdAt: true, id: true, namespaceId: true, eventType: true, actorId: true, message: true, metadata: true, cpuMillicores: true, memoryBytes: true, storageBytes: true, networkIngressBytes: true, networkEgressBytes: true, podCount: true, metrics: true, databaseId: true } }).execute(); + +// Get one by id +const item = await db.platformNamespaceEvent.findOne({ id: '', select: { createdAt: true, id: true, namespaceId: true, eventType: true, actorId: true, message: true, metadata: true, cpuMillicores: true, memoryBytes: true, storageBytes: true, networkIngressBytes: true, networkEgressBytes: true, podCount: true, metrics: true, databaseId: true } }).execute(); + +// Create +const created = await db.platformNamespaceEvent.create({ data: { namespaceId: '', eventType: '', actorId: '', message: '', metadata: '', cpuMillicores: '', memoryBytes: '', storageBytes: '', networkIngressBytes: '', networkEgressBytes: '', podCount: '', metrics: '', databaseId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformNamespaceEvent.update({ where: { id: '' }, data: { namespaceId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformNamespaceEvent.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphExecution` CRUD operations for FunctionGraphExecution records. @@ -649,7 +817,6 @@ CRUD operations for FunctionGraphExecution records. | `graphId` | UUID | Yes | | `invocationId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `entityId` | UUID | Yes | | `outputNode` | String | Yes | | `outputPort` | String | Yes | | `status` | String | Yes | @@ -673,13 +840,13 @@ CRUD operations for FunctionGraphExecution records. ```typescript // List all functionGraphExecution records -const items = await db.functionGraphExecution.findMany({ select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, entityId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); +const items = await db.functionGraphExecution.findMany({ select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); // Get one by id -const item = await db.functionGraphExecution.findOne({ id: '', select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, entityId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); +const item = await db.functionGraphExecution.findOne({ id: '', select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); // Create -const created = await db.functionGraphExecution.create({ data: { startedAt: '', graphId: '', invocationId: '', databaseId: '', entityId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }, select: { id: true } }).execute(); +const created = await db.functionGraphExecution.create({ data: { startedAt: '', graphId: '', invocationId: '', databaseId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionGraphExecution.update({ where: { id: '' }, data: { startedAt: '' }, select: { id: true } }).execute(); @@ -882,49 +1049,49 @@ addNodeAndSave const result = await db.mutation.addNodeAndSave({ input: '' }).execute(); ``` -### `db.mutation.addEdge` +### `db.mutation.importGraphJson` -addEdge +importGraphJson - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | AddEdgeInput (required) | + | `input` | ImportGraphJsonInput (required) | ```typescript -const result = await db.mutation.addEdge({ input: '' }).execute(); +const result = await db.mutation.importGraphJson({ input: '' }).execute(); ``` -### `db.mutation.addNode` +### `db.mutation.addEdge` -addNode +addEdge - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | AddNodeInput (required) | + | `input` | AddEdgeInput (required) | ```typescript -const result = await db.mutation.addNode({ input: '' }).execute(); +const result = await db.mutation.addEdge({ input: '' }).execute(); ``` -### `db.mutation.importGraphJson` +### `db.mutation.addNode` -importGraphJson +addNode - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | ImportGraphJsonInput (required) | + | `input` | AddNodeInput (required) | ```typescript -const result = await db.mutation.importGraphJson({ input: '' }).execute(); +const result = await db.mutation.addNode({ input: '' }).execute(); ``` ### `db.mutation.insertNodeAtPath` diff --git a/sdk/constructive-react/src/compute/orm/index.ts b/sdk/constructive-react/src/compute/orm/index.ts index 99193c1d28..ba7ce4651f 100644 --- a/sdk/constructive-react/src/compute/orm/index.ts +++ b/sdk/constructive-react/src/compute/orm/index.ts @@ -8,19 +8,23 @@ import type { OrmClientConfig } from './client'; import { GetAllRecordModel } from './models/getAllRecord'; import { FunctionApiBindingModel } from './models/functionApiBinding'; import { FunctionDeploymentModel } from './models/functionDeployment'; +import { ResourceModel } from './models/resource'; import { FunctionGraphRefModel } from './models/functionGraphRef'; import { FunctionGraphStoreModel } from './models/functionGraphStore'; import { FunctionGraphObjectModel } from './models/functionGraphObject'; import { FunctionDeploymentEventModel } from './models/functionDeploymentEvent'; import { OrgFunctionExecutionLogModel } from './models/orgFunctionExecutionLog'; +import { ResourceEventModel } from './models/resourceEvent'; import { FunctionGraphExecutionOutputModel } from './models/functionGraphExecutionOutput'; import { FunctionGraphCommitModel } from './models/functionGraphCommit'; import { SecretDefinitionModel } from './models/secretDefinition'; import { FunctionExecutionLogModel } from './models/functionExecutionLog'; -import { FunctionGraphExecutionNodeStateModel } from './models/functionGraphExecutionNodeState'; import { FunctionGraphModel } from './models/functionGraph'; +import { FunctionGraphExecutionNodeStateModel } from './models/functionGraphExecutionNodeState'; +import { PlatformNamespaceModel } from './models/platformNamespace'; import { OrgFunctionInvocationModel } from './models/orgFunctionInvocation'; import { FunctionInvocationModel } from './models/functionInvocation'; +import { PlatformNamespaceEventModel } from './models/platformNamespaceEvent'; import { FunctionGraphExecutionModel } from './models/functionGraphExecution'; import { FunctionDefinitionModel } from './models/functionDefinition'; import { createQueryOperations } from './query'; @@ -61,19 +65,23 @@ export function createClient(config: OrmClientConfig) { getAllRecord: new GetAllRecordModel(client), functionApiBinding: new FunctionApiBindingModel(client), functionDeployment: new FunctionDeploymentModel(client), + resource: new ResourceModel(client), functionGraphRef: new FunctionGraphRefModel(client), functionGraphStore: new FunctionGraphStoreModel(client), functionGraphObject: new FunctionGraphObjectModel(client), functionDeploymentEvent: new FunctionDeploymentEventModel(client), orgFunctionExecutionLog: new OrgFunctionExecutionLogModel(client), + resourceEvent: new ResourceEventModel(client), functionGraphExecutionOutput: new FunctionGraphExecutionOutputModel(client), functionGraphCommit: new FunctionGraphCommitModel(client), secretDefinition: new SecretDefinitionModel(client), functionExecutionLog: new FunctionExecutionLogModel(client), - functionGraphExecutionNodeState: new FunctionGraphExecutionNodeStateModel(client), functionGraph: new FunctionGraphModel(client), + functionGraphExecutionNodeState: new FunctionGraphExecutionNodeStateModel(client), + platformNamespace: new PlatformNamespaceModel(client), orgFunctionInvocation: new OrgFunctionInvocationModel(client), functionInvocation: new FunctionInvocationModel(client), + platformNamespaceEvent: new PlatformNamespaceEventModel(client), functionGraphExecution: new FunctionGraphExecutionModel(client), functionDefinition: new FunctionDefinitionModel(client), query: createQueryOperations(client), diff --git a/sdk/constructive-react/src/compute/orm/input-types.ts b/sdk/constructive-react/src/compute/orm/input-types.ts index f88c3e77d1..6b89295abc 100644 --- a/sdk/constructive-react/src/compute/orm/input-types.ts +++ b/sdk/constructive-react/src/compute/orm/input-types.ts @@ -292,6 +292,38 @@ export interface FunctionDeployment { /** Database that owns this resource (database-scoped isolation) */ databaseId?: string | null; } +/** Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace */ +export interface Resource { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + createdBy?: string | null; + updatedBy?: string | null; + /** Namespace this resource belongs to (security boundary, maps to K8s namespace) */ + namespaceId?: string | null; + /** Resource kind: Deployment, StatefulSet, Service, Ingress, Certificate */ + kind?: string | null; + /** Human-readable resource name */ + name?: string | null; + /** URL-safe identifier, unique within (namespace_id, kind) */ + slug?: string | null; + /** Desired state — kind-specific configuration (image, ports, resources, etc.). Opaque to DB; validated by K8s. */ + spec?: Record | null; + /** Resource lifecycle status: pending, provisioning, active, failed, draining, deleting */ + status?: string | null; + /** Observed state from K8s — populated by handlers after reconciliation (service_url, clone_url, replicas, etc.) */ + statusObserved?: Record | null; + /** Most recent provisioning or runtime error message */ + lastError?: string | null; + /** Cumulative error count for this resource */ + errorCount?: number | null; + /** Key/value pairs for selecting and filtering resources */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; +} /** Branch heads — mutable pointers into the commit chain */ export interface FunctionGraphRef { /** Unique ref identifier */ @@ -371,6 +403,25 @@ export interface OrgFunctionExecutionLog { /** User who triggered the execution (NULL for system/cron) */ actorId?: string | null; } +/** Resource lifecycle events — audit log of provisioning, updates, and failure events */ +export interface ResourceEvent { + /** Event timestamp (partition key) */ + createdAt?: string | null; + /** Unique event identifier */ + id: string; + /** Resource this event belongs to */ + resourceId?: string | null; + /** Event type: provisioned, provisioning, updated, failed, deprovisioned, health_check */ + eventType?: string | null; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string | null; + /** Human-readable description of the event */ + message?: string | null; + /** Structured context (old/new values, error details, etc.) */ + metadata?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; +} /** Content-addressed store for execution outputs — hash-referenced from node_outputs */ export interface FunctionGraphExecutionOutput { /** Timestamp of output creation */ @@ -444,6 +495,33 @@ export interface FunctionExecutionLog { /** Database that owns this resource (database-scoped isolation) */ databaseId?: string | null; } +/** Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store */ +export interface FunctionGraph { + /** Unique graph identifier */ + id: string; + /** Database scope for multi-tenant isolation */ + databaseId?: string | null; + /** Graph store (Merkle store) holding the graph definition */ + storeId?: string | null; + /** Evaluator/runtime context (function, js, sql, system) */ + context?: string | null; + /** Graph name (unique per database) */ + name?: string | null; + /** Human-readable description of the graph */ + description?: string | null; + /** Pinned definitions store commit for deterministic evaluation */ + definitionsCommitId?: string | null; + /** Whether graph passes structural validation */ + isValid?: boolean | null; + /** Array of validation error objects when is_valid = false */ + validationErrors?: Record | null; + /** Actor who created this graph */ + createdBy?: string | null; + /** Timestamp of graph creation */ + createdAt?: string | null; + /** Timestamp of last modification */ + updatedAt?: string | null; +} /** Per-node execution state — tracks individual node lifecycle for debugging */ export interface FunctionGraphExecutionNodeState { /** Timestamp of node state creation (partition key) */ @@ -471,34 +549,31 @@ export interface FunctionGraphExecutionNodeState { /** FK to execution_outputs — content-addressed output blob for this node */ outputId?: string | null; } -/** Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store */ -export interface FunctionGraph { - /** Unique graph identifier */ +/** Logical namespace containers for grouping secrets, config, functions, and other resources */ +export interface PlatformNamespace { id: string; - /** Database scope for multi-tenant isolation */ - databaseId?: string | null; - /** Graph store (Merkle store) holding the graph definition */ - storeId?: string | null; - /** Entity context (org/team) for scoped billing */ - entityId?: string | null; - /** Evaluator/runtime context (function, js, sql, system) */ - context?: string | null; - /** Graph name (unique per database) */ - name?: string | null; - /** Human-readable description of the graph */ - description?: string | null; - /** Pinned definitions store commit for deterministic evaluation */ - definitionsCommitId?: string | null; - /** Whether graph passes structural validation */ - isValid?: boolean | null; - /** Array of validation error objects when is_valid = false */ - validationErrors?: Record | null; - /** Actor who created this graph */ - createdBy?: string | null; - /** Timestamp of graph creation */ createdAt?: string | null; - /** Timestamp of last modification */ updatedAt?: string | null; + /** Human-readable namespace name (e.g. default, production, oauth) */ + name?: string | null; + /** Globally unique computed namespace identifier via inflection.underscore */ + namespaceName?: string | null; + /** Optional human-readable description of this namespace */ + description?: string | null; + /** Whether this namespace is active (soft-disable for filtering) */ + isActive?: boolean | null; + /** Key/value pairs for selecting and filtering namespaces */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Database that created this namespace (NULL for platform-native namespaces) */ + sourceDatabaseId?: string | null; + /** Origin scope: platform, org, app — indicates where this namespace was created */ + sourceScope?: string | null; + /** true = created by a child scope mirror trigger, false = platform-native */ + isManaged?: boolean | null; } /** Function invocation log — INSERT to call a function (business-layer, metered). Linked to definitions by task_identifier string. */ export interface OrgFunctionInvocation { @@ -564,6 +639,39 @@ export interface FunctionInvocation { /** Groups all node invocations from a single flow graph execution */ graphExecutionId?: string | null; } +/** Namespace lifecycle events — audit log of creation, activation, deactivation, label changes */ +export interface PlatformNamespaceEvent { + /** Event timestamp (partition key) */ + createdAt?: string | null; + /** Unique event identifier */ + id: string; + /** Namespace this event belongs to */ + namespaceId?: string | null; + /** Event type: created, activated, deactivated, labels_updated, annotations_updated, renamed */ + eventType?: string | null; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string | null; + /** Human-readable description of the event */ + message?: string | null; + /** Structured context (old/new values, labels diff, etc.) */ + metadata?: Record | null; + /** CPU usage in millicores at time of event */ + cpuMillicores?: number | null; + /** Memory usage in bytes at time of event */ + memoryBytes?: string | null; + /** Storage usage in bytes at time of event */ + storageBytes?: string | null; + /** Network ingress in bytes during event window */ + networkIngressBytes?: string | null; + /** Network egress in bytes during event window */ + networkEgressBytes?: string | null; + /** Number of active pods in the namespace at time of event */ + podCount?: number | null; + /** Additional resource metrics (gpu, replicas, quotas, etc.) */ + metrics?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; +} /** Ephemeral execution state for flow graph evaluation */ export interface FunctionGraphExecution { /** Execution start timestamp */ @@ -576,8 +684,6 @@ export interface FunctionGraphExecution { invocationId?: string | null; /** Scope for multi-tenant isolation */ databaseId?: string | null; - /** Entity context (org/team) for scoped billing */ - entityId?: string | null; /** Target output boundary node name to resolve */ outputNode?: string | null; /** Target output port name (default: value) */ @@ -692,20 +798,30 @@ export interface FunctionApiBindingRelations { } export interface FunctionDeploymentRelations { functionDefinition?: FunctionDefinition | null; + namespace?: PlatformNamespace | null; +} +export interface ResourceRelations { + namespace?: PlatformNamespace | null; } export interface FunctionGraphRefRelations {} export interface FunctionGraphStoreRelations {} export interface FunctionGraphObjectRelations {} export interface FunctionDeploymentEventRelations {} export interface OrgFunctionExecutionLogRelations {} +export interface ResourceEventRelations {} export interface FunctionGraphExecutionOutputRelations {} export interface FunctionGraphCommitRelations {} export interface SecretDefinitionRelations {} export interface FunctionExecutionLogRelations {} -export interface FunctionGraphExecutionNodeStateRelations {} export interface FunctionGraphRelations {} +export interface FunctionGraphExecutionNodeStateRelations {} +export interface PlatformNamespaceRelations { + functionDeploymentsByNamespaceId?: ConnectionResult; + resourcesByNamespaceId?: ConnectionResult; +} export interface OrgFunctionInvocationRelations {} export interface FunctionInvocationRelations {} +export interface PlatformNamespaceEventRelations {} export interface FunctionGraphExecutionRelations { graph?: FunctionGraph | null; } @@ -717,6 +833,7 @@ export interface FunctionDefinitionRelations { export type GetAllRecordWithRelations = GetAllRecord & GetAllRecordRelations; export type FunctionApiBindingWithRelations = FunctionApiBinding & FunctionApiBindingRelations; export type FunctionDeploymentWithRelations = FunctionDeployment & FunctionDeploymentRelations; +export type ResourceWithRelations = Resource & ResourceRelations; export type FunctionGraphRefWithRelations = FunctionGraphRef & FunctionGraphRefRelations; export type FunctionGraphStoreWithRelations = FunctionGraphStore & FunctionGraphStoreRelations; export type FunctionGraphObjectWithRelations = FunctionGraphObject & FunctionGraphObjectRelations; @@ -724,18 +841,22 @@ export type FunctionDeploymentEventWithRelations = FunctionDeploymentEvent & FunctionDeploymentEventRelations; export type OrgFunctionExecutionLogWithRelations = OrgFunctionExecutionLog & OrgFunctionExecutionLogRelations; +export type ResourceEventWithRelations = ResourceEvent & ResourceEventRelations; export type FunctionGraphExecutionOutputWithRelations = FunctionGraphExecutionOutput & FunctionGraphExecutionOutputRelations; export type FunctionGraphCommitWithRelations = FunctionGraphCommit & FunctionGraphCommitRelations; export type SecretDefinitionWithRelations = SecretDefinition & SecretDefinitionRelations; export type FunctionExecutionLogWithRelations = FunctionExecutionLog & FunctionExecutionLogRelations; +export type FunctionGraphWithRelations = FunctionGraph & FunctionGraphRelations; export type FunctionGraphExecutionNodeStateWithRelations = FunctionGraphExecutionNodeState & FunctionGraphExecutionNodeStateRelations; -export type FunctionGraphWithRelations = FunctionGraph & FunctionGraphRelations; +export type PlatformNamespaceWithRelations = PlatformNamespace & PlatformNamespaceRelations; export type OrgFunctionInvocationWithRelations = OrgFunctionInvocation & OrgFunctionInvocationRelations; export type FunctionInvocationWithRelations = FunctionInvocation & FunctionInvocationRelations; +export type PlatformNamespaceEventWithRelations = PlatformNamespaceEvent & + PlatformNamespaceEventRelations; export type FunctionGraphExecutionWithRelations = FunctionGraphExecution & FunctionGraphExecutionRelations; export type FunctionDefinitionWithRelations = FunctionDefinition & FunctionDefinitionRelations; @@ -779,6 +900,31 @@ export type FunctionDeploymentSelect = { functionDefinition?: { select: FunctionDefinitionSelect; }; + namespace?: { + select: PlatformNamespaceSelect; + }; +}; +export type ResourceSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + createdBy?: boolean; + updatedBy?: boolean; + namespaceId?: boolean; + kind?: boolean; + name?: boolean; + slug?: boolean; + spec?: boolean; + status?: boolean; + statusObserved?: boolean; + lastError?: boolean; + errorCount?: boolean; + labels?: boolean; + annotations?: boolean; + databaseId?: boolean; + namespace?: { + select: PlatformNamespaceSelect; + }; }; export type FunctionGraphRefSelect = { id?: boolean; @@ -822,6 +968,16 @@ export type OrgFunctionExecutionLogSelect = { metadata?: boolean; actorId?: boolean; }; +export type ResourceEventSelect = { + createdAt?: boolean; + id?: boolean; + resourceId?: boolean; + eventType?: boolean; + actorId?: boolean; + message?: boolean; + metadata?: boolean; + databaseId?: boolean; +}; export type FunctionGraphExecutionOutputSelect = { createdAt?: boolean; id?: boolean; @@ -862,6 +1018,20 @@ export type FunctionExecutionLogSelect = { actorId?: boolean; databaseId?: boolean; }; +export type FunctionGraphSelect = { + id?: boolean; + databaseId?: boolean; + storeId?: boolean; + context?: boolean; + name?: boolean; + description?: boolean; + definitionsCommitId?: boolean; + isValid?: boolean; + validationErrors?: boolean; + createdBy?: boolean; + createdAt?: boolean; + updatedAt?: boolean; +}; export type FunctionGraphExecutionNodeStateSelect = { createdAt?: boolean; id?: boolean; @@ -876,20 +1046,32 @@ export type FunctionGraphExecutionNodeStateSelect = { errorMessage?: boolean; outputId?: boolean; }; -export type FunctionGraphSelect = { +export type PlatformNamespaceSelect = { id?: boolean; - databaseId?: boolean; - storeId?: boolean; - entityId?: boolean; - context?: boolean; - name?: boolean; - description?: boolean; - definitionsCommitId?: boolean; - isValid?: boolean; - validationErrors?: boolean; - createdBy?: boolean; createdAt?: boolean; updatedAt?: boolean; + name?: boolean; + namespaceName?: boolean; + description?: boolean; + isActive?: boolean; + labels?: boolean; + annotations?: boolean; + databaseId?: boolean; + sourceDatabaseId?: boolean; + sourceScope?: boolean; + isManaged?: boolean; + functionDeploymentsByNamespaceId?: { + select: FunctionDeploymentSelect; + first?: number; + filter?: FunctionDeploymentFilter; + orderBy?: FunctionDeploymentOrderBy[]; + }; + resourcesByNamespaceId?: { + select: ResourceSelect; + first?: number; + filter?: ResourceFilter; + orderBy?: ResourceOrderBy[]; + }; }; export type OrgFunctionInvocationSelect = { createdAt?: boolean; @@ -924,13 +1106,29 @@ export type FunctionInvocationSelect = { parentInvocationId?: boolean; graphExecutionId?: boolean; }; +export type PlatformNamespaceEventSelect = { + createdAt?: boolean; + id?: boolean; + namespaceId?: boolean; + eventType?: boolean; + actorId?: boolean; + message?: boolean; + metadata?: boolean; + cpuMillicores?: boolean; + memoryBytes?: boolean; + storageBytes?: boolean; + networkIngressBytes?: boolean; + networkEgressBytes?: boolean; + podCount?: boolean; + metrics?: boolean; + databaseId?: boolean; +}; export type FunctionGraphExecutionSelect = { startedAt?: boolean; id?: boolean; graphId?: boolean; invocationId?: boolean; databaseId?: boolean; - entityId?: boolean; outputNode?: boolean; outputPort?: boolean; status?: boolean; @@ -1075,6 +1273,52 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Filter by the object’s `functionDefinition` relation. */ functionDefinition?: FunctionDefinitionFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; +} +export interface ResourceFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `spec` field. */ + spec?: JSONFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `statusObserved` field. */ + statusObserved?: JSONFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `errorCount` field. */ + errorCount?: IntFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: ResourceFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceFilter[]; + /** Negates the expression. */ + not?: ResourceFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; } export interface FunctionGraphRefFilter { /** Filter by the object’s `id` field. */ @@ -1180,6 +1424,30 @@ export interface OrgFunctionExecutionLogFilter { /** Negates the expression. */ not?: OrgFunctionExecutionLogFilter; } +export interface ResourceEventFilter { + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `resourceId` field. */ + resourceId?: UUIDFilter; + /** Filter by the object’s `eventType` field. */ + eventType?: StringFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `message` field. */ + message?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: ResourceEventFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceEventFilter[]; + /** Negates the expression. */ + not?: ResourceEventFilter; +} export interface FunctionGraphExecutionOutputFilter { /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; @@ -1276,6 +1544,38 @@ export interface FunctionExecutionLogFilter { /** Negates the expression. */ not?: FunctionExecutionLogFilter; } +export interface FunctionGraphFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `storeId` field. */ + storeId?: UUIDFilter; + /** Filter by the object’s `context` field. */ + context?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `definitionsCommitId` field. */ + definitionsCommitId?: UUIDFilter; + /** Filter by the object’s `isValid` field. */ + isValid?: BooleanFilter; + /** Filter by the object’s `validationErrors` field. */ + validationErrors?: JSONFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: FunctionGraphFilter[]; + /** Checks for any expressions in this list. */ + or?: FunctionGraphFilter[]; + /** Negates the expression. */ + not?: FunctionGraphFilter; +} export interface FunctionGraphExecutionNodeStateFilter { /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; @@ -1308,39 +1608,47 @@ export interface FunctionGraphExecutionNodeStateFilter { /** Negates the expression. */ not?: FunctionGraphExecutionNodeStateFilter; } -export interface FunctionGraphFilter { +export interface PlatformNamespaceFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `storeId` field. */ - storeId?: UUIDFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; - /** Filter by the object’s `context` field. */ - context?: StringFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `definitionsCommitId` field. */ - definitionsCommitId?: UUIDFilter; - /** Filter by the object’s `isValid` field. */ - isValid?: BooleanFilter; - /** Filter by the object’s `validationErrors` field. */ - validationErrors?: JSONFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `namespaceName` field. */ + namespaceName?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `sourceDatabaseId` field. */ + sourceDatabaseId?: UUIDFilter; + /** Filter by the object’s `sourceScope` field. */ + sourceScope?: StringFilter; + /** Filter by the object’s `isManaged` field. */ + isManaged?: BooleanFilter; /** Checks for all expressions in this list. */ - and?: FunctionGraphFilter[]; + and?: PlatformNamespaceFilter[]; /** Checks for any expressions in this list. */ - or?: FunctionGraphFilter[]; + or?: PlatformNamespaceFilter[]; /** Negates the expression. */ - not?: FunctionGraphFilter; + not?: PlatformNamespaceFilter; + /** Filter by the object’s `functionDeploymentsByNamespaceId` relation. */ + functionDeploymentsByNamespaceId?: PlatformNamespaceToManyFunctionDeploymentFilter; + /** `functionDeploymentsByNamespaceId` exist. */ + functionDeploymentsByNamespaceIdExist?: boolean; + /** Filter by the object’s `resourcesByNamespaceId` relation. */ + resourcesByNamespaceId?: PlatformNamespaceToManyResourceFilter; + /** `resourcesByNamespaceId` exist. */ + resourcesByNamespaceIdExist?: boolean; } export interface OrgFunctionInvocationFilter { /** Filter by the object’s `createdAt` field. */ @@ -1416,6 +1724,44 @@ export interface FunctionInvocationFilter { /** Negates the expression. */ not?: FunctionInvocationFilter; } +export interface PlatformNamespaceEventFilter { + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Filter by the object’s `eventType` field. */ + eventType?: StringFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `message` field. */ + message?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `cpuMillicores` field. */ + cpuMillicores?: IntFilter; + /** Filter by the object’s `memoryBytes` field. */ + memoryBytes?: BigIntFilter; + /** Filter by the object’s `storageBytes` field. */ + storageBytes?: BigIntFilter; + /** Filter by the object’s `networkIngressBytes` field. */ + networkIngressBytes?: BigIntFilter; + /** Filter by the object’s `networkEgressBytes` field. */ + networkEgressBytes?: BigIntFilter; + /** Filter by the object’s `podCount` field. */ + podCount?: IntFilter; + /** Filter by the object’s `metrics` field. */ + metrics?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: PlatformNamespaceEventFilter[]; + /** Checks for any expressions in this list. */ + or?: PlatformNamespaceEventFilter[]; + /** Negates the expression. */ + not?: PlatformNamespaceEventFilter; +} export interface FunctionGraphExecutionFilter { /** Filter by the object’s `startedAt` field. */ startedAt?: DatetimeFilter; @@ -1427,8 +1773,6 @@ export interface FunctionGraphExecutionFilter { invocationId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; /** Filter by the object’s `outputNode` field. */ outputNode?: StringFilter; /** Filter by the object’s `outputPort` field. */ @@ -1613,6 +1957,44 @@ export type FunctionDeploymentOrderBy = | 'ANNOTATIONS_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC'; +export type ResourceOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'SPEC_ASC' + | 'SPEC_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'STATUS_OBSERVED_ASC' + | 'STATUS_OBSERVED_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'ERROR_COUNT_ASC' + | 'ERROR_COUNT_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; export type FunctionGraphRefOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1697,6 +2079,26 @@ export type OrgFunctionExecutionLogOrderBy = | 'METADATA_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC'; +export type ResourceEventOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'RESOURCE_ID_ASC' + | 'RESOURCE_ID_DESC' + | 'EVENT_TYPE_ASC' + | 'EVENT_TYPE_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'MESSAGE_ASC' + | 'MESSAGE_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; export type FunctionGraphExecutionOutputOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1777,6 +2179,34 @@ export type FunctionExecutionLogOrderBy = | 'ACTOR_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC'; +export type FunctionGraphOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'STORE_ID_ASC' + | 'STORE_ID_DESC' + | 'CONTEXT_ASC' + | 'CONTEXT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'DEFINITIONS_COMMIT_ID_ASC' + | 'DEFINITIONS_COMMIT_ID_DESC' + | 'IS_VALID_ASC' + | 'IS_VALID_DESC' + | 'VALIDATION_ERRORS_ASC' + | 'VALIDATION_ERRORS_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type FunctionGraphExecutionNodeStateOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1805,36 +2235,36 @@ export type FunctionGraphExecutionNodeStateOrderBy = | 'ERROR_MESSAGE_DESC' | 'OUTPUT_ID_ASC' | 'OUTPUT_ID_DESC'; -export type FunctionGraphOrderBy = +export type PlatformNamespaceOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'STORE_ID_ASC' - | 'STORE_ID_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' - | 'CONTEXT_ASC' - | 'CONTEXT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' | 'NAME_ASC' | 'NAME_DESC' + | 'NAMESPACE_NAME_ASC' + | 'NAMESPACE_NAME_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' - | 'DEFINITIONS_COMMIT_ID_ASC' - | 'DEFINITIONS_COMMIT_ID_DESC' - | 'IS_VALID_ASC' - | 'IS_VALID_DESC' - | 'VALIDATION_ERRORS_ASC' - | 'VALIDATION_ERRORS_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SOURCE_DATABASE_ID_ASC' + | 'SOURCE_DATABASE_ID_DESC' + | 'SOURCE_SCOPE_ASC' + | 'SOURCE_SCOPE_DESC' + | 'IS_MANAGED_ASC' + | 'IS_MANAGED_DESC'; export type OrgFunctionInvocationOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1901,6 +2331,40 @@ export type FunctionInvocationOrderBy = | 'PARENT_INVOCATION_ID_DESC' | 'GRAPH_EXECUTION_ID_ASC' | 'GRAPH_EXECUTION_ID_DESC'; +export type PlatformNamespaceEventOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'EVENT_TYPE_ASC' + | 'EVENT_TYPE_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'MESSAGE_ASC' + | 'MESSAGE_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'CPU_MILLICORES_ASC' + | 'CPU_MILLICORES_DESC' + | 'MEMORY_BYTES_ASC' + | 'MEMORY_BYTES_DESC' + | 'STORAGE_BYTES_ASC' + | 'STORAGE_BYTES_DESC' + | 'NETWORK_INGRESS_BYTES_ASC' + | 'NETWORK_INGRESS_BYTES_DESC' + | 'NETWORK_EGRESS_BYTES_ASC' + | 'NETWORK_EGRESS_BYTES_DESC' + | 'POD_COUNT_ASC' + | 'POD_COUNT_DESC' + | 'METRICS_ASC' + | 'METRICS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; export type FunctionGraphExecutionOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1915,8 +2379,6 @@ export type FunctionGraphExecutionOrderBy = | 'INVOCATION_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' | 'OUTPUT_NODE_ASC' | 'OUTPUT_NODE_DESC' | 'OUTPUT_PORT_ASC' @@ -2112,6 +2574,50 @@ export interface DeleteFunctionDeploymentInput { clientMutationId?: string; id: string; } +export interface CreateResourceInput { + clientMutationId?: string; + resource: { + createdBy?: string; + updatedBy?: string; + namespaceId: string; + kind: string; + name: string; + slug: string; + spec?: Record; + status?: string; + statusObserved?: Record; + lastError?: string; + errorCount?: number; + labels?: Record; + annotations?: Record; + databaseId: string; + }; +} +export interface ResourcePatch { + createdBy?: string | null; + updatedBy?: string | null; + namespaceId?: string | null; + kind?: string | null; + name?: string | null; + slug?: string | null; + spec?: Record | null; + status?: string | null; + statusObserved?: Record | null; + lastError?: string | null; + errorCount?: number | null; + labels?: Record | null; + annotations?: Record | null; + databaseId?: string | null; +} +export interface UpdateResourceInput { + clientMutationId?: string; + id: string; + resourcePatch: ResourcePatch; +} +export interface DeleteResourceInput { + clientMutationId?: string; + id: string; +} export interface CreateFunctionGraphRefInput { clientMutationId?: string; functionGraphRef: { @@ -2238,6 +2744,34 @@ export interface DeleteOrgFunctionExecutionLogInput { clientMutationId?: string; id: string; } +export interface CreateResourceEventInput { + clientMutationId?: string; + resourceEvent: { + resourceId: string; + eventType: string; + actorId?: string; + message?: string; + metadata?: Record; + databaseId: string; + }; +} +export interface ResourceEventPatch { + resourceId?: string | null; + eventType?: string | null; + actorId?: string | null; + message?: string | null; + metadata?: Record | null; + databaseId?: string | null; +} +export interface UpdateResourceEventInput { + clientMutationId?: string; + id: string; + resourceEventPatch: ResourceEventPatch; +} +export interface DeleteResourceEventInput { + clientMutationId?: string; + id: string; +} export interface CreateFunctionGraphExecutionOutputInput { clientMutationId?: string; functionGraphExecutionOutput: { @@ -2332,21 +2866,55 @@ export interface CreateFunctionExecutionLogInput { databaseId: string; }; } -export interface FunctionExecutionLogPatch { - invocationId?: string | null; - taskIdentifier?: string | null; - logLevel?: string | null; - message?: string | null; - metadata?: Record | null; - actorId?: string | null; +export interface FunctionExecutionLogPatch { + invocationId?: string | null; + taskIdentifier?: string | null; + logLevel?: string | null; + message?: string | null; + metadata?: Record | null; + actorId?: string | null; + databaseId?: string | null; +} +export interface UpdateFunctionExecutionLogInput { + clientMutationId?: string; + id: string; + functionExecutionLogPatch: FunctionExecutionLogPatch; +} +export interface DeleteFunctionExecutionLogInput { + clientMutationId?: string; + id: string; +} +export interface CreateFunctionGraphInput { + clientMutationId?: string; + functionGraph: { + databaseId: string; + storeId: string; + context?: string; + name?: string; + description?: string; + definitionsCommitId: string; + isValid?: boolean; + validationErrors?: Record; + createdBy?: string; + }; +} +export interface FunctionGraphPatch { databaseId?: string | null; + storeId?: string | null; + context?: string | null; + name?: string | null; + description?: string | null; + definitionsCommitId?: string | null; + isValid?: boolean | null; + validationErrors?: Record | null; + createdBy?: string | null; } -export interface UpdateFunctionExecutionLogInput { +export interface UpdateFunctionGraphInput { clientMutationId?: string; id: string; - functionExecutionLogPatch: FunctionExecutionLogPatch; + functionGraphPatch: FunctionGraphPatch; } -export interface DeleteFunctionExecutionLogInput { +export interface DeleteFunctionGraphInput { clientMutationId?: string; id: string; } @@ -2386,39 +2954,39 @@ export interface DeleteFunctionGraphExecutionNodeStateInput { clientMutationId?: string; id: string; } -export interface CreateFunctionGraphInput { +export interface CreatePlatformNamespaceInput { clientMutationId?: string; - functionGraph: { - databaseId: string; - storeId: string; - entityId: string; - context?: string; - name?: string; + platformNamespace: { + name: string; + namespaceName: string; description?: string; - definitionsCommitId: string; - isValid?: boolean; - validationErrors?: Record; - createdBy?: string; + isActive?: boolean; + labels?: Record; + annotations?: Record; + databaseId: string; + sourceDatabaseId?: string; + sourceScope?: string; + isManaged?: boolean; }; } -export interface FunctionGraphPatch { - databaseId?: string | null; - storeId?: string | null; - entityId?: string | null; - context?: string | null; +export interface PlatformNamespacePatch { name?: string | null; + namespaceName?: string | null; description?: string | null; - definitionsCommitId?: string | null; - isValid?: boolean | null; - validationErrors?: Record | null; - createdBy?: string | null; + isActive?: boolean | null; + labels?: Record | null; + annotations?: Record | null; + databaseId?: string | null; + sourceDatabaseId?: string | null; + sourceScope?: string | null; + isManaged?: boolean | null; } -export interface UpdateFunctionGraphInput { +export interface UpdatePlatformNamespaceInput { clientMutationId?: string; id: string; - functionGraphPatch: FunctionGraphPatch; + platformNamespacePatch: PlatformNamespacePatch; } -export interface DeleteFunctionGraphInput { +export interface DeletePlatformNamespaceInput { clientMutationId?: string; id: string; } @@ -2504,6 +3072,48 @@ export interface DeleteFunctionInvocationInput { clientMutationId?: string; id: string; } +export interface CreatePlatformNamespaceEventInput { + clientMutationId?: string; + platformNamespaceEvent: { + namespaceId: string; + eventType: string; + actorId?: string; + message?: string; + metadata?: Record; + cpuMillicores?: number; + memoryBytes?: string; + storageBytes?: string; + networkIngressBytes?: string; + networkEgressBytes?: string; + podCount?: number; + metrics?: Record; + databaseId: string; + }; +} +export interface PlatformNamespaceEventPatch { + namespaceId?: string | null; + eventType?: string | null; + actorId?: string | null; + message?: string | null; + metadata?: Record | null; + cpuMillicores?: number | null; + memoryBytes?: string | null; + storageBytes?: string | null; + networkIngressBytes?: string | null; + networkEgressBytes?: string | null; + podCount?: number | null; + metrics?: Record | null; + databaseId?: string | null; +} +export interface UpdatePlatformNamespaceEventInput { + clientMutationId?: string; + id: string; + platformNamespaceEventPatch: PlatformNamespaceEventPatch; +} +export interface DeletePlatformNamespaceEventInput { + clientMutationId?: string; + id: string; +} export interface CreateFunctionGraphExecutionInput { clientMutationId?: string; functionGraphExecution: { @@ -2511,7 +3121,6 @@ export interface CreateFunctionGraphExecutionInput { graphId: string; invocationId?: string; databaseId: string; - entityId?: string; outputNode: string; outputPort?: string; status?: string; @@ -2537,7 +3146,6 @@ export interface FunctionGraphExecutionPatch { graphId?: string | null; invocationId?: string | null; databaseId?: string | null; - entityId?: string | null; outputNode?: string | null; outputPort?: string | null; status?: string | null; @@ -2636,6 +3244,10 @@ export interface DeleteFunctionDefinitionInput { } // ============ Connection Fields Map ============ export const connectionFieldsMap = { + PlatformNamespace: { + functionDeploymentsByNamespaceId: 'FunctionDeployment', + resourcesByNamespaceId: 'Resource', + }, FunctionDefinition: { functionApiBindings: 'FunctionApiBinding', functionDeployments: 'FunctionDeployment', @@ -2695,6 +3307,16 @@ export interface AddNodeAndSaveInput { meta?: Record; message?: string; } +export interface ImportGraphJsonInput { + clientMutationId?: string; + databaseId?: string; + name?: string; + graphJson?: Record; + context?: string; + description?: string; + createdBy?: string; + definitionsCommitId?: string; +} export interface AddEdgeInput { clientMutationId?: string; databaseId?: string; @@ -2717,17 +3339,6 @@ export interface AddNodeInput { props?: Record; meta?: Record; } -export interface ImportGraphJsonInput { - clientMutationId?: string; - databaseId?: string; - name?: string; - graphJson?: Record; - context?: string; - description?: string; - entityId?: string; - createdBy?: string; - definitionsCommitId?: string; -} export interface InsertNodeAtPathInput { clientMutationId?: string; sId?: string; @@ -2775,6 +3386,24 @@ export interface Base64EncodedBinaryFilter { /** Not included in the specified list. */ notIn?: Base64EncodedBinary[]; } +/** A filter to be used against many `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyFunctionDeploymentFilter { + /** Filters to entities where at least one related entity matches. */ + some?: FunctionDeploymentFilter; + /** Filters to entities where every related entity matches. */ + every?: FunctionDeploymentFilter; + /** Filters to entities where no related entity matches. */ + none?: FunctionDeploymentFilter; +} +/** A filter to be used against many `Resource` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyResourceFilter { + /** Filters to entities where at least one related entity matches. */ + some?: ResourceFilter; + /** Filters to entities where every related entity matches. */ + every?: ResourceFilter; + /** Filters to entities where no related entity matches. */ + none?: ResourceFilter; +} /** A filter to be used against many `FunctionApiBinding` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionDefinitionToManyFunctionApiBindingFilter { /** Filters to entities where at least one related entity matches. */ @@ -2847,6 +3476,38 @@ export interface FunctionDeploymentInput { /** Database that owns this resource (database-scoped isolation) */ databaseId: string; } +/** An input for mutations affecting `Resource` */ +export interface ResourceInput { + id?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: string; + updatedBy?: string; + /** Namespace this resource belongs to (security boundary, maps to K8s namespace) */ + namespaceId: string; + /** Resource kind: Deployment, StatefulSet, Service, Ingress, Certificate */ + kind: string; + /** Human-readable resource name */ + name: string; + /** URL-safe identifier, unique within (namespace_id, kind) */ + slug: string; + /** Desired state — kind-specific configuration (image, ports, resources, etc.). Opaque to DB; validated by K8s. */ + spec?: Record; + /** Resource lifecycle status: pending, provisioning, active, failed, draining, deleting */ + status?: string; + /** Observed state from K8s — populated by handlers after reconciliation (service_url, clone_url, replicas, etc.) */ + statusObserved?: Record; + /** Most recent provisioning or runtime error message */ + lastError?: string; + /** Cumulative error count for this resource */ + errorCount?: number; + /** Key/value pairs for selecting and filtering resources */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; +} /** An input for mutations affecting `FunctionGraphRef` */ export interface FunctionGraphRefInput { /** Unique ref identifier */ @@ -2926,6 +3587,25 @@ export interface OrgFunctionExecutionLogInput { /** User who triggered the execution (NULL for system/cron) */ actorId?: string; } +/** An input for mutations affecting `ResourceEvent` */ +export interface ResourceEventInput { + /** Event timestamp (partition key) */ + createdAt?: string; + /** Unique event identifier */ + id?: string; + /** Resource this event belongs to */ + resourceId: string; + /** Event type: provisioned, provisioning, updated, failed, deprovisioned, health_check */ + eventType: string; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string; + /** Human-readable description of the event */ + message?: string; + /** Structured context (old/new values, error details, etc.) */ + metadata?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; +} /** An input for mutations affecting `FunctionGraphExecutionOutput` */ export interface FunctionGraphExecutionOutputInput { /** Timestamp of output creation */ @@ -3026,6 +3706,32 @@ export interface FunctionGraphExecutionNodeStateInput { /** FK to execution_outputs — content-addressed output blob for this node */ outputId?: string; } +/** An input for mutations affecting `PlatformNamespace` */ +export interface PlatformNamespaceInput { + id?: string; + createdAt?: string; + updatedAt?: string; + /** Human-readable namespace name (e.g. default, production, oauth) */ + name: string; + /** Globally unique computed namespace identifier via inflection.underscore */ + namespaceName: string; + /** Optional human-readable description of this namespace */ + description?: string; + /** Whether this namespace is active (soft-disable for filtering) */ + isActive?: boolean; + /** Key/value pairs for selecting and filtering namespaces */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Database that created this namespace (NULL for platform-native namespaces) */ + sourceDatabaseId?: string; + /** Origin scope: platform, org, app — indicates where this namespace was created */ + sourceScope?: string; + /** true = created by a child scope mirror trigger, false = platform-native */ + isManaged?: boolean; +} /** An input for mutations affecting `OrgFunctionInvocation` */ export interface OrgFunctionInvocationInput { /** Invocation creation timestamp (partition key) */ @@ -3090,6 +3796,39 @@ export interface FunctionInvocationInput { /** Groups all node invocations from a single flow graph execution */ graphExecutionId?: string; } +/** An input for mutations affecting `PlatformNamespaceEvent` */ +export interface PlatformNamespaceEventInput { + /** Event timestamp (partition key) */ + createdAt?: string; + /** Unique event identifier */ + id?: string; + /** Namespace this event belongs to */ + namespaceId: string; + /** Event type: created, activated, deactivated, labels_updated, annotations_updated, renamed */ + eventType: string; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string; + /** Human-readable description of the event */ + message?: string; + /** Structured context (old/new values, labels diff, etc.) */ + metadata?: Record; + /** CPU usage in millicores at time of event */ + cpuMillicores?: number; + /** Memory usage in bytes at time of event */ + memoryBytes?: string; + /** Storage usage in bytes at time of event */ + storageBytes?: string; + /** Network ingress in bytes during event window */ + networkIngressBytes?: string; + /** Network egress in bytes during event window */ + networkEgressBytes?: string; + /** Number of active pods in the namespace at time of event */ + podCount?: number; + /** Additional resource metrics (gpu, replicas, quotas, etc.) */ + metrics?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; +} /** An input for mutations affecting `FunctionGraphExecution` */ export interface FunctionGraphExecutionInput { /** Execution start timestamp */ @@ -3102,8 +3841,6 @@ export interface FunctionGraphExecutionInput { invocationId?: string; /** Scope for multi-tenant isolation */ databaseId: string; - /** Entity context (org/team) for scoped billing */ - entityId?: string; /** Target output boundary node name to resolve */ outputNode: string; /** Target output port name (default: value) */ @@ -3223,27 +3960,6 @@ export interface IntervalInput { /** A quantity of years. */ years?: number; } -/** A filter to be used against `FunctionApiBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface FunctionApiBindingFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `functionDefinitionId` field. */ - functionDefinitionId?: UUIDFilter; - /** Filter by the object’s `apiId` field. */ - apiId?: UUIDFilter; - /** Filter by the object’s `alias` field. */ - alias?: StringFilter; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Checks for all expressions in this list. */ - and?: FunctionApiBindingFilter[]; - /** Checks for any expressions in this list. */ - or?: FunctionApiBindingFilter[]; - /** Negates the expression. */ - not?: FunctionApiBindingFilter; - /** Filter by the object’s `functionDefinition` relation. */ - functionDefinition?: FunctionDefinitionFilter; -} /** A filter to be used against `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionDeploymentFilter { /** Filter by the object’s `id` field. */ @@ -3296,6 +4012,74 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Filter by the object’s `functionDefinition` relation. */ functionDefinition?: FunctionDefinitionFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; +} +/** A filter to be used against `Resource` object types. All fields are combined with a logical ‘and.’ */ +export interface ResourceFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `spec` field. */ + spec?: JSONFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `statusObserved` field. */ + statusObserved?: JSONFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `errorCount` field. */ + errorCount?: IntFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: ResourceFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceFilter[]; + /** Negates the expression. */ + not?: ResourceFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; +} +/** A filter to be used against `FunctionApiBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface FunctionApiBindingFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `functionDefinitionId` field. */ + functionDefinitionId?: UUIDFilter; + /** Filter by the object’s `apiId` field. */ + apiId?: UUIDFilter; + /** Filter by the object’s `alias` field. */ + alias?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Checks for all expressions in this list. */ + and?: FunctionApiBindingFilter[]; + /** Checks for any expressions in this list. */ + or?: FunctionApiBindingFilter[]; + /** Negates the expression. */ + not?: FunctionApiBindingFilter; + /** Filter by the object’s `functionDefinition` relation. */ + functionDefinition?: FunctionDefinitionFilter; } /** A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ */ export interface UUIDFilter { @@ -3322,6 +4106,31 @@ export interface UUIDFilter { /** Greater than or equal to the specified value. */ greaterThanOrEqualTo?: string; } +/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ +export interface DatetimeFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Included in the specified list. */ + in?: string[]; + /** Not included in the specified list. */ + notIn?: string[]; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; +} /** A filter to be used against String fields. All fields are combined with a logical ‘and.’ */ export interface StringFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -3399,6 +4208,31 @@ export interface StringFilter { /** Greater than or equal to the specified value (case-insensitive). */ greaterThanOrEqualToInsensitive?: string; } +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Included in the specified list. */ + in?: number[]; + /** Not included in the specified list. */ + notIn?: number[]; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; +} /** A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ */ export interface JSONFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -3505,55 +4339,48 @@ export interface FunctionDefinitionFilter { /** `functionDeployments` exist. */ functionDeploymentsExist?: boolean; } -/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ -export interface DatetimeFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Included in the specified list. */ - in?: string[]; - /** Not included in the specified list. */ - notIn?: string[]; - /** Less than the specified value. */ - lessThan?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; -} -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: number; - /** Not equal to the specified value. */ - notEqualTo?: number; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; - /** Included in the specified list. */ - in?: number[]; - /** Not included in the specified list. */ - notIn?: number[]; - /** Less than the specified value. */ - lessThan?: number; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; - /** Greater than the specified value. */ - greaterThan?: number; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; +/** A filter to be used against `PlatformNamespace` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `namespaceName` field. */ + namespaceName?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `sourceDatabaseId` field. */ + sourceDatabaseId?: UUIDFilter; + /** Filter by the object’s `sourceScope` field. */ + sourceScope?: StringFilter; + /** Filter by the object’s `isManaged` field. */ + isManaged?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PlatformNamespaceFilter[]; + /** Checks for any expressions in this list. */ + or?: PlatformNamespaceFilter[]; + /** Negates the expression. */ + not?: PlatformNamespaceFilter; + /** Filter by the object’s `functionDeploymentsByNamespaceId` relation. */ + functionDeploymentsByNamespaceId?: PlatformNamespaceToManyFunctionDeploymentFilter; + /** `functionDeploymentsByNamespaceId` exist. */ + functionDeploymentsByNamespaceIdExist?: boolean; + /** Filter by the object’s `resourcesByNamespaceId` relation. */ + resourcesByNamespaceId?: PlatformNamespaceToManyResourceFilter; + /** `resourcesByNamespaceId` exist. */ + resourcesByNamespaceIdExist?: boolean; } /** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ export interface BooleanFilter { @@ -3680,27 +4507,27 @@ export type AddNodeAndSavePayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface AddEdgePayload { +export interface ImportGraphJsonPayload { clientMutationId?: string | null; result?: string | null; } -export type AddEdgePayloadSelect = { +export type ImportGraphJsonPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface AddNodePayload { +export interface AddEdgePayload { clientMutationId?: string | null; result?: string | null; } -export type AddNodePayloadSelect = { +export type AddEdgePayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface ImportGraphJsonPayload { +export interface AddNodePayload { clientMutationId?: string | null; result?: string | null; } -export type ImportGraphJsonPayloadSelect = { +export type AddNodePayloadSelect = { clientMutationId?: boolean; result?: boolean; }; @@ -3832,6 +4659,51 @@ export type DeleteFunctionDeploymentPayloadSelect = { select: FunctionDeploymentEdgeSelect; }; }; +export interface CreateResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was created by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export type CreateResourcePayloadSelect = { + clientMutationId?: boolean; + resource?: { + select: ResourceSelect; + }; + resourceEdge?: { + select: ResourceEdgeSelect; + }; +}; +export interface UpdateResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was updated by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export type UpdateResourcePayloadSelect = { + clientMutationId?: boolean; + resource?: { + select: ResourceSelect; + }; + resourceEdge?: { + select: ResourceEdgeSelect; + }; +}; +export interface DeleteResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was deleted by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export type DeleteResourcePayloadSelect = { + clientMutationId?: boolean; + resource?: { + select: ResourceSelect; + }; + resourceEdge?: { + select: ResourceEdgeSelect; + }; +}; export interface CreateFunctionGraphRefPayload { clientMutationId?: string | null; /** The `FunctionGraphRef` that was created by this mutation. */ @@ -4057,6 +4929,51 @@ export type DeleteOrgFunctionExecutionLogPayloadSelect = { select: OrgFunctionExecutionLogEdgeSelect; }; }; +export interface CreateResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was created by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} +export type CreateResourceEventPayloadSelect = { + clientMutationId?: boolean; + resourceEvent?: { + select: ResourceEventSelect; + }; + resourceEventEdge?: { + select: ResourceEventEdgeSelect; + }; +}; +export interface UpdateResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was updated by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} +export type UpdateResourceEventPayloadSelect = { + clientMutationId?: boolean; + resourceEvent?: { + select: ResourceEventSelect; + }; + resourceEventEdge?: { + select: ResourceEventEdgeSelect; + }; +}; +export interface DeleteResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was deleted by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} +export type DeleteResourceEventPayloadSelect = { + clientMutationId?: boolean; + resourceEvent?: { + select: ResourceEventSelect; + }; + resourceEventEdge?: { + select: ResourceEventEdgeSelect; + }; +}; export interface CreateFunctionGraphExecutionOutputPayload { clientMutationId?: string | null; /** The `FunctionGraphExecutionOutput` that was created by this mutation. */ @@ -4237,6 +5154,44 @@ export type DeleteFunctionExecutionLogPayloadSelect = { select: FunctionExecutionLogEdgeSelect; }; }; +export interface CreateFunctionGraphPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type CreateFunctionGraphPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface UpdateFunctionGraphPayload { + clientMutationId?: string | null; + /** The `FunctionGraph` that was updated by this mutation. */ + functionGraph?: FunctionGraph | null; + functionGraphEdge?: FunctionGraphEdge | null; +} +export type UpdateFunctionGraphPayloadSelect = { + clientMutationId?: boolean; + functionGraph?: { + select: FunctionGraphSelect; + }; + functionGraphEdge?: { + select: FunctionGraphEdgeSelect; + }; +}; +export interface DeleteFunctionGraphPayload { + clientMutationId?: string | null; + /** The `FunctionGraph` that was deleted by this mutation. */ + functionGraph?: FunctionGraph | null; + functionGraphEdge?: FunctionGraphEdge | null; +} +export type DeleteFunctionGraphPayloadSelect = { + clientMutationId?: boolean; + functionGraph?: { + select: FunctionGraphSelect; + }; + functionGraphEdge?: { + select: FunctionGraphEdgeSelect; + }; +}; export interface CreateFunctionGraphExecutionNodeStatePayload { clientMutationId?: string | null; /** The `FunctionGraphExecutionNodeState` that was created by this mutation. */ @@ -4282,42 +5237,49 @@ export type DeleteFunctionGraphExecutionNodeStatePayloadSelect = { select: FunctionGraphExecutionNodeStateEdgeSelect; }; }; -export interface CreateFunctionGraphPayload { +export interface CreatePlatformNamespacePayload { clientMutationId?: string | null; - result?: string | null; + /** The `PlatformNamespace` that was created by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; } -export type CreateFunctionGraphPayloadSelect = { +export type CreatePlatformNamespacePayloadSelect = { clientMutationId?: boolean; - result?: boolean; + platformNamespace?: { + select: PlatformNamespaceSelect; + }; + platformNamespaceEdge?: { + select: PlatformNamespaceEdgeSelect; + }; }; -export interface UpdateFunctionGraphPayload { +export interface UpdatePlatformNamespacePayload { clientMutationId?: string | null; - /** The `FunctionGraph` that was updated by this mutation. */ - functionGraph?: FunctionGraph | null; - functionGraphEdge?: FunctionGraphEdge | null; + /** The `PlatformNamespace` that was updated by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; } -export type UpdateFunctionGraphPayloadSelect = { +export type UpdatePlatformNamespacePayloadSelect = { clientMutationId?: boolean; - functionGraph?: { - select: FunctionGraphSelect; + platformNamespace?: { + select: PlatformNamespaceSelect; }; - functionGraphEdge?: { - select: FunctionGraphEdgeSelect; + platformNamespaceEdge?: { + select: PlatformNamespaceEdgeSelect; }; }; -export interface DeleteFunctionGraphPayload { +export interface DeletePlatformNamespacePayload { clientMutationId?: string | null; - /** The `FunctionGraph` that was deleted by this mutation. */ - functionGraph?: FunctionGraph | null; - functionGraphEdge?: FunctionGraphEdge | null; + /** The `PlatformNamespace` that was deleted by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; } -export type DeleteFunctionGraphPayloadSelect = { +export type DeletePlatformNamespacePayloadSelect = { clientMutationId?: boolean; - functionGraph?: { - select: FunctionGraphSelect; + platformNamespace?: { + select: PlatformNamespaceSelect; }; - functionGraphEdge?: { - select: FunctionGraphEdgeSelect; + platformNamespaceEdge?: { + select: PlatformNamespaceEdgeSelect; }; }; export interface CreateOrgFunctionInvocationPayload { @@ -4410,6 +5372,51 @@ export type DeleteFunctionInvocationPayloadSelect = { select: FunctionInvocationEdgeSelect; }; }; +export interface CreatePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was created by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} +export type CreatePlatformNamespaceEventPayloadSelect = { + clientMutationId?: boolean; + platformNamespaceEvent?: { + select: PlatformNamespaceEventSelect; + }; + platformNamespaceEventEdge?: { + select: PlatformNamespaceEventEdgeSelect; + }; +}; +export interface UpdatePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was updated by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} +export type UpdatePlatformNamespaceEventPayloadSelect = { + clientMutationId?: boolean; + platformNamespaceEvent?: { + select: PlatformNamespaceEventSelect; + }; + platformNamespaceEventEdge?: { + select: PlatformNamespaceEventEdgeSelect; + }; +}; +export interface DeletePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was deleted by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} +export type DeletePlatformNamespaceEventPayloadSelect = { + clientMutationId?: boolean; + platformNamespaceEvent?: { + select: PlatformNamespaceEventSelect; + }; + platformNamespaceEventEdge?: { + select: PlatformNamespaceEventEdgeSelect; + }; +}; export interface CreateFunctionGraphExecutionPayload { clientMutationId?: string | null; /** The `FunctionGraphExecution` that was created by this mutation. */ @@ -4524,6 +5531,18 @@ export type FunctionDeploymentEdgeSelect = { select: FunctionDeploymentSelect; }; }; +/** A `Resource` edge in the connection. */ +export interface ResourceEdge { + cursor?: string | null; + /** The `Resource` at the end of the edge. */ + node?: Resource | null; +} +export type ResourceEdgeSelect = { + cursor?: boolean; + node?: { + select: ResourceSelect; + }; +}; /** A `FunctionGraphRef` edge in the connection. */ export interface FunctionGraphRefEdge { cursor?: string | null; @@ -4584,6 +5603,18 @@ export type OrgFunctionExecutionLogEdgeSelect = { select: OrgFunctionExecutionLogSelect; }; }; +/** A `ResourceEvent` edge in the connection. */ +export interface ResourceEventEdge { + cursor?: string | null; + /** The `ResourceEvent` at the end of the edge. */ + node?: ResourceEvent | null; +} +export type ResourceEventEdgeSelect = { + cursor?: boolean; + node?: { + select: ResourceEventSelect; + }; +}; /** A `FunctionGraphExecutionOutput` edge in the connection. */ export interface FunctionGraphExecutionOutputEdge { cursor?: string | null; @@ -4632,6 +5663,18 @@ export type FunctionExecutionLogEdgeSelect = { select: FunctionExecutionLogSelect; }; }; +/** A `FunctionGraph` edge in the connection. */ +export interface FunctionGraphEdge { + cursor?: string | null; + /** The `FunctionGraph` at the end of the edge. */ + node?: FunctionGraph | null; +} +export type FunctionGraphEdgeSelect = { + cursor?: boolean; + node?: { + select: FunctionGraphSelect; + }; +}; /** A `FunctionGraphExecutionNodeState` edge in the connection. */ export interface FunctionGraphExecutionNodeStateEdge { cursor?: string | null; @@ -4644,16 +5687,16 @@ export type FunctionGraphExecutionNodeStateEdgeSelect = { select: FunctionGraphExecutionNodeStateSelect; }; }; -/** A `FunctionGraph` edge in the connection. */ -export interface FunctionGraphEdge { +/** A `PlatformNamespace` edge in the connection. */ +export interface PlatformNamespaceEdge { cursor?: string | null; - /** The `FunctionGraph` at the end of the edge. */ - node?: FunctionGraph | null; + /** The `PlatformNamespace` at the end of the edge. */ + node?: PlatformNamespace | null; } -export type FunctionGraphEdgeSelect = { +export type PlatformNamespaceEdgeSelect = { cursor?: boolean; node?: { - select: FunctionGraphSelect; + select: PlatformNamespaceSelect; }; }; /** A `OrgFunctionInvocation` edge in the connection. */ @@ -4680,6 +5723,18 @@ export type FunctionInvocationEdgeSelect = { select: FunctionInvocationSelect; }; }; +/** A `PlatformNamespaceEvent` edge in the connection. */ +export interface PlatformNamespaceEventEdge { + cursor?: string | null; + /** The `PlatformNamespaceEvent` at the end of the edge. */ + node?: PlatformNamespaceEvent | null; +} +export type PlatformNamespaceEventEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformNamespaceEventSelect; + }; +}; /** A `FunctionGraphExecution` edge in the connection. */ export interface FunctionGraphExecutionEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/compute/orm/models/index.ts b/sdk/constructive-react/src/compute/orm/models/index.ts index 51e9b9f05d..cce3b40556 100644 --- a/sdk/constructive-react/src/compute/orm/models/index.ts +++ b/sdk/constructive-react/src/compute/orm/models/index.ts @@ -6,18 +6,22 @@ export { GetAllRecordModel } from './getAllRecord'; export { FunctionApiBindingModel } from './functionApiBinding'; export { FunctionDeploymentModel } from './functionDeployment'; +export { ResourceModel } from './resource'; export { FunctionGraphRefModel } from './functionGraphRef'; export { FunctionGraphStoreModel } from './functionGraphStore'; export { FunctionGraphObjectModel } from './functionGraphObject'; export { FunctionDeploymentEventModel } from './functionDeploymentEvent'; export { OrgFunctionExecutionLogModel } from './orgFunctionExecutionLog'; +export { ResourceEventModel } from './resourceEvent'; export { FunctionGraphExecutionOutputModel } from './functionGraphExecutionOutput'; export { FunctionGraphCommitModel } from './functionGraphCommit'; export { SecretDefinitionModel } from './secretDefinition'; export { FunctionExecutionLogModel } from './functionExecutionLog'; -export { FunctionGraphExecutionNodeStateModel } from './functionGraphExecutionNodeState'; export { FunctionGraphModel } from './functionGraph'; +export { FunctionGraphExecutionNodeStateModel } from './functionGraphExecutionNodeState'; +export { PlatformNamespaceModel } from './platformNamespace'; export { OrgFunctionInvocationModel } from './orgFunctionInvocation'; export { FunctionInvocationModel } from './functionInvocation'; +export { PlatformNamespaceEventModel } from './platformNamespaceEvent'; export { FunctionGraphExecutionModel } from './functionGraphExecution'; export { FunctionDefinitionModel } from './functionDefinition'; diff --git a/sdk/constructive-react/src/compute/orm/models/platformNamespace.ts b/sdk/constructive-react/src/compute/orm/models/platformNamespace.ts new file mode 100644 index 0000000000..c4dff94953 --- /dev/null +++ b/sdk/constructive-react/src/compute/orm/models/platformNamespace.ts @@ -0,0 +1,245 @@ +/** + * PlatformNamespace 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 { + PlatformNamespace, + PlatformNamespaceWithRelations, + PlatformNamespaceSelect, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy, + CreatePlatformNamespaceInput, + UpdatePlatformNamespaceInput, + PlatformNamespacePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformNamespaceModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaces: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespace', + 'platformNamespaces', + 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, + }, + 'PlatformNamespaceFilter', + 'PlatformNamespaceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespace', + fieldName: 'platformNamespaces', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespace: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformNamespace', + 'platformNamespaces', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformNamespaceFilter', + 'PlatformNamespaceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespace', + fieldName: 'platformNamespace', + document, + variables, + transform: (data: { + platformNamespaces?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespace: data.platformNamespaces?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespace: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespace', + 'platformNamespaces', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformNamespaceFilter', + 'PlatformNamespaceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespace', + fieldName: 'platformNamespace', + document, + variables, + transform: (data: { + platformNamespaces?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespace: data.platformNamespaces?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformNamespace', + 'createPlatformNamespace', + 'platformNamespace', + args.select, + args.data, + 'CreatePlatformNamespaceInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespace', + fieldName: 'createPlatformNamespace', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformNamespacePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformNamespace', + 'updatePlatformNamespace', + 'platformNamespace', + args.select, + args.where.id, + args.data, + 'UpdatePlatformNamespaceInput', + 'id', + 'platformNamespacePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespace', + fieldName: 'updatePlatformNamespace', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformNamespace', + 'deletePlatformNamespace', + 'platformNamespace', + { + id: args.where.id, + }, + 'DeletePlatformNamespaceInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespace', + fieldName: 'deletePlatformNamespace', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/compute/orm/models/platformNamespaceEvent.ts b/sdk/constructive-react/src/compute/orm/models/platformNamespaceEvent.ts new file mode 100644 index 0000000000..198afe79ae --- /dev/null +++ b/sdk/constructive-react/src/compute/orm/models/platformNamespaceEvent.ts @@ -0,0 +1,252 @@ +/** + * PlatformNamespaceEvent 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 { + PlatformNamespaceEvent, + PlatformNamespaceEventWithRelations, + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy, + CreatePlatformNamespaceEventInput, + UpdatePlatformNamespaceEventInput, + PlatformNamespaceEventPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformNamespaceEventModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaceEvents: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespaceEvent', + 'platformNamespaceEvents', + 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, + }, + 'PlatformNamespaceEventFilter', + 'PlatformNamespaceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespaceEvent', + fieldName: 'platformNamespaceEvents', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformNamespaceEvent', + 'platformNamespaceEvents', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformNamespaceEventFilter', + 'PlatformNamespaceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespaceEvent', + fieldName: 'platformNamespaceEvent', + document, + variables, + transform: (data: { + platformNamespaceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespaceEvent: data.platformNamespaceEvents?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespaceEvent', + 'platformNamespaceEvents', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformNamespaceEventFilter', + 'PlatformNamespaceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespaceEvent', + fieldName: 'platformNamespaceEvent', + document, + variables, + transform: (data: { + platformNamespaceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespaceEvent: data.platformNamespaceEvents?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformNamespaceEvent', + 'createPlatformNamespaceEvent', + 'platformNamespaceEvent', + args.select, + args.data, + 'CreatePlatformNamespaceEventInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespaceEvent', + fieldName: 'createPlatformNamespaceEvent', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + createdAt: string; + }, + PlatformNamespaceEventPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformNamespaceEvent', + 'updatePlatformNamespaceEvent', + 'platformNamespaceEvent', + args.select, + args.where.id, + args.data, + 'UpdatePlatformNamespaceEventInput', + 'id', + 'platformNamespaceEventPatch', + connectionFieldsMap, + { + createdAt: args.where.createdAt, + } + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespaceEvent', + fieldName: 'updatePlatformNamespaceEvent', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + createdAt: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformNamespaceEvent', + 'deletePlatformNamespaceEvent', + 'platformNamespaceEvent', + { + id: args.where.id, + createdAt: args.where.createdAt, + }, + 'DeletePlatformNamespaceEventInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespaceEvent', + fieldName: 'deletePlatformNamespaceEvent', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/compute/orm/models/resource.ts b/sdk/constructive-react/src/compute/orm/models/resource.ts new file mode 100644 index 0000000000..b4b60ad6f3 --- /dev/null +++ b/sdk/constructive-react/src/compute/orm/models/resource.ts @@ -0,0 +1,245 @@ +/** + * Resource 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 { + Resource, + ResourceWithRelations, + ResourceSelect, + ResourceFilter, + ResourceOrderBy, + CreateResourceInput, + UpdateResourceInput, + ResourcePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ResourceModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resources: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Resource', + 'resources', + 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, + }, + 'ResourceFilter', + 'ResourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Resource', + fieldName: 'resources', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resource: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Resource', + 'resources', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ResourceFilter', + 'ResourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Resource', + fieldName: 'resource', + document, + variables, + transform: (data: { + resources?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resource: data.resources?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + resource: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Resource', + 'resources', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ResourceFilter', + 'ResourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Resource', + fieldName: 'resource', + document, + variables, + transform: (data: { + resources?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resource: data.resources?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createResource: { + resource: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Resource', + 'createResource', + 'resource', + args.select, + args.data, + 'CreateResourceInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Resource', + fieldName: 'createResource', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ResourcePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateResource: { + resource: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'Resource', + 'updateResource', + 'resource', + args.select, + args.where.id, + args.data, + 'UpdateResourceInput', + 'id', + 'resourcePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Resource', + fieldName: 'updateResource', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteResource: { + resource: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Resource', + 'deleteResource', + 'resource', + { + id: args.where.id, + }, + 'DeleteResourceInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Resource', + fieldName: 'deleteResource', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/compute/orm/models/resourceEvent.ts b/sdk/constructive-react/src/compute/orm/models/resourceEvent.ts new file mode 100644 index 0000000000..9796098dc8 --- /dev/null +++ b/sdk/constructive-react/src/compute/orm/models/resourceEvent.ts @@ -0,0 +1,250 @@ +/** + * ResourceEvent 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 { + ResourceEvent, + ResourceEventWithRelations, + ResourceEventSelect, + ResourceEventFilter, + ResourceEventOrderBy, + CreateResourceEventInput, + UpdateResourceEventInput, + ResourceEventPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ResourceEventModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceEvents: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceEvent', + 'resourceEvents', + 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, + }, + 'ResourceEventFilter', + 'ResourceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceEvent', + fieldName: 'resourceEvents', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ResourceEvent', + 'resourceEvents', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ResourceEventFilter', + 'ResourceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceEvent', + fieldName: 'resourceEvent', + document, + variables, + transform: (data: { + resourceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceEvent: data.resourceEvents?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceEvent', + 'resourceEvents', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ResourceEventFilter', + 'ResourceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceEvent', + fieldName: 'resourceEvent', + document, + variables, + transform: (data: { + resourceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceEvent: data.resourceEvents?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createResourceEvent: { + resourceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ResourceEvent', + 'createResourceEvent', + 'resourceEvent', + args.select, + args.data, + 'CreateResourceEventInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceEvent', + fieldName: 'createResourceEvent', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + createdAt: string; + }, + ResourceEventPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateResourceEvent: { + resourceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ResourceEvent', + 'updateResourceEvent', + 'resourceEvent', + args.select, + args.where.id, + args.data, + 'UpdateResourceEventInput', + 'id', + 'resourceEventPatch', + connectionFieldsMap, + { + createdAt: args.where.createdAt, + } + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceEvent', + fieldName: 'updateResourceEvent', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + createdAt: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteResourceEvent: { + resourceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ResourceEvent', + 'deleteResourceEvent', + 'resourceEvent', + { + id: args.where.id, + createdAt: args.where.createdAt, + }, + 'DeleteResourceEventInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceEvent', + fieldName: 'deleteResourceEvent', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/compute/orm/mutation/index.ts b/sdk/constructive-react/src/compute/orm/mutation/index.ts index b4abf9132b..932f75c399 100644 --- a/sdk/constructive-react/src/compute/orm/mutation/index.ts +++ b/sdk/constructive-react/src/compute/orm/mutation/index.ts @@ -15,9 +15,9 @@ import type { SaveGraphInput, AddEdgeAndSaveInput, AddNodeAndSaveInput, + ImportGraphJsonInput, AddEdgeInput, AddNodeInput, - ImportGraphJsonInput, InsertNodeAtPathInput, StartExecutionInput, ProvisionBucketInput, @@ -29,9 +29,9 @@ import type { SaveGraphPayload, AddEdgeAndSavePayload, AddNodeAndSavePayload, + ImportGraphJsonPayload, AddEdgePayload, AddNodePayload, - ImportGraphJsonPayload, InsertNodeAtPathPayload, StartExecutionPayload, ProvisionBucketPayload, @@ -43,9 +43,9 @@ import type { SaveGraphPayloadSelect, AddEdgeAndSavePayloadSelect, AddNodeAndSavePayloadSelect, + ImportGraphJsonPayloadSelect, AddEdgePayloadSelect, AddNodePayloadSelect, - ImportGraphJsonPayloadSelect, InsertNodeAtPathPayloadSelect, StartExecutionPayloadSelect, ProvisionBucketPayloadSelect, @@ -75,15 +75,15 @@ export interface AddEdgeAndSaveVariables { export interface AddNodeAndSaveVariables { input: AddNodeAndSaveInput; } +export interface ImportGraphJsonVariables { + input: ImportGraphJsonInput; +} export interface AddEdgeVariables { input: AddEdgeInput; } export interface AddNodeVariables { input: AddNodeInput; } -export interface ImportGraphJsonVariables { - input: ImportGraphJsonInput; -} export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } @@ -334,6 +334,35 @@ export function createMutationOperations(client: OrmClient) { 'AddNodeAndSavePayload' ), }), + importGraphJson: ( + args: ImportGraphJsonVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + importGraphJson: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ImportGraphJson', + fieldName: 'importGraphJson', + ...buildCustomDocument( + 'mutation', + 'ImportGraphJson', + 'importGraphJson', + options.select, + args, + [ + { + name: 'input', + type: 'ImportGraphJsonInput!', + }, + ], + connectionFieldsMap, + 'ImportGraphJsonPayload' + ), + }), addEdge: ( args: AddEdgeVariables, options: { @@ -392,35 +421,6 @@ export function createMutationOperations(client: OrmClient) { 'AddNodePayload' ), }), - importGraphJson: ( - args: ImportGraphJsonVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - importGraphJson: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ImportGraphJson', - fieldName: 'importGraphJson', - ...buildCustomDocument( - 'mutation', - 'ImportGraphJson', - 'importGraphJson', - options.select, - args, - [ - { - name: 'input', - type: 'ImportGraphJsonInput!', - }, - ], - connectionFieldsMap, - 'ImportGraphJsonPayload' - ), - }), insertNodeAtPath: ( args: InsertNodeAtPathVariables, options: { diff --git a/sdk/constructive-react/src/compute/schema-types.ts b/sdk/constructive-react/src/compute/schema-types.ts index d200e93ff1..5349c9f731 100644 --- a/sdk/constructive-react/src/compute/schema-types.ts +++ b/sdk/constructive-react/src/compute/schema-types.ts @@ -22,6 +22,10 @@ import type { GetAllRecord, OrgFunctionExecutionLog, OrgFunctionInvocation, + PlatformNamespace, + PlatformNamespaceEvent, + Resource, + ResourceEvent, SecretDefinition, BigFloatFilter, BigIntFilter, @@ -104,6 +108,45 @@ export type FunctionDeploymentOrderBy = | 'ANNOTATIONS_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC'; +/** Methods to use when ordering `Resource`. */ +export type ResourceOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'SPEC_ASC' + | 'SPEC_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'STATUS_OBSERVED_ASC' + | 'STATUS_OBSERVED_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'ERROR_COUNT_ASC' + | 'ERROR_COUNT_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; /** Methods to use when ordering `FunctionGraphRef`. */ export type FunctionGraphRefOrderBy = | 'NATURAL' @@ -193,6 +236,27 @@ export type OrgFunctionExecutionLogOrderBy = | 'METADATA_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC'; +/** Methods to use when ordering `ResourceEvent`. */ +export type ResourceEventOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'RESOURCE_ID_ASC' + | 'RESOURCE_ID_DESC' + | 'EVENT_TYPE_ASC' + | 'EVENT_TYPE_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'MESSAGE_ASC' + | 'MESSAGE_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; /** Methods to use when ordering `FunctionGraphExecutionOutput`. */ export type FunctionGraphExecutionOutputOrderBy = | 'NATURAL' @@ -277,6 +341,35 @@ export type FunctionExecutionLogOrderBy = | 'ACTOR_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC'; +/** Methods to use when ordering `FunctionGraph`. */ +export type FunctionGraphOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'STORE_ID_ASC' + | 'STORE_ID_DESC' + | 'CONTEXT_ASC' + | 'CONTEXT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'DEFINITIONS_COMMIT_ID_ASC' + | 'DEFINITIONS_COMMIT_ID_DESC' + | 'IS_VALID_ASC' + | 'IS_VALID_DESC' + | 'VALIDATION_ERRORS_ASC' + | 'VALIDATION_ERRORS_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `FunctionGraphExecutionNodeState`. */ export type FunctionGraphExecutionNodeStateOrderBy = | 'NATURAL' @@ -306,37 +399,37 @@ export type FunctionGraphExecutionNodeStateOrderBy = | 'ERROR_MESSAGE_DESC' | 'OUTPUT_ID_ASC' | 'OUTPUT_ID_DESC'; -/** Methods to use when ordering `FunctionGraph`. */ -export type FunctionGraphOrderBy = +/** Methods to use when ordering `PlatformNamespace`. */ +export type PlatformNamespaceOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'STORE_ID_ASC' - | 'STORE_ID_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' - | 'CONTEXT_ASC' - | 'CONTEXT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' | 'NAME_ASC' | 'NAME_DESC' + | 'NAMESPACE_NAME_ASC' + | 'NAMESPACE_NAME_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' - | 'DEFINITIONS_COMMIT_ID_ASC' - | 'DEFINITIONS_COMMIT_ID_DESC' - | 'IS_VALID_ASC' - | 'IS_VALID_DESC' - | 'VALIDATION_ERRORS_ASC' - | 'VALIDATION_ERRORS_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SOURCE_DATABASE_ID_ASC' + | 'SOURCE_DATABASE_ID_DESC' + | 'SOURCE_SCOPE_ASC' + | 'SOURCE_SCOPE_DESC' + | 'IS_MANAGED_ASC' + | 'IS_MANAGED_DESC'; /** Methods to use when ordering `OrgFunctionInvocation`. */ export type OrgFunctionInvocationOrderBy = | 'NATURAL' @@ -405,6 +498,41 @@ export type FunctionInvocationOrderBy = | 'PARENT_INVOCATION_ID_DESC' | 'GRAPH_EXECUTION_ID_ASC' | 'GRAPH_EXECUTION_ID_DESC'; +/** Methods to use when ordering `PlatformNamespaceEvent`. */ +export type PlatformNamespaceEventOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'EVENT_TYPE_ASC' + | 'EVENT_TYPE_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'MESSAGE_ASC' + | 'MESSAGE_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'CPU_MILLICORES_ASC' + | 'CPU_MILLICORES_DESC' + | 'MEMORY_BYTES_ASC' + | 'MEMORY_BYTES_DESC' + | 'STORAGE_BYTES_ASC' + | 'STORAGE_BYTES_DESC' + | 'NETWORK_INGRESS_BYTES_ASC' + | 'NETWORK_INGRESS_BYTES_DESC' + | 'NETWORK_EGRESS_BYTES_ASC' + | 'NETWORK_EGRESS_BYTES_DESC' + | 'POD_COUNT_ASC' + | 'POD_COUNT_DESC' + | 'METRICS_ASC' + | 'METRICS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; /** Methods to use when ordering `FunctionGraphExecution`. */ export type FunctionGraphExecutionOrderBy = | 'NATURAL' @@ -420,8 +548,6 @@ export type FunctionGraphExecutionOrderBy = | 'INVOCATION_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' | 'OUTPUT_NODE_ASC' | 'OUTPUT_NODE_DESC' | 'OUTPUT_PORT_ASC' @@ -683,6 +809,114 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Filter by the object’s `functionDefinition` relation. */ functionDefinition?: FunctionDefinitionFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; +} +/** A filter to be used against `PlatformNamespace` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `namespaceName` field. */ + namespaceName?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `sourceDatabaseId` field. */ + sourceDatabaseId?: UUIDFilter; + /** Filter by the object’s `sourceScope` field. */ + sourceScope?: StringFilter; + /** Filter by the object’s `isManaged` field. */ + isManaged?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PlatformNamespaceFilter[]; + /** Checks for any expressions in this list. */ + or?: PlatformNamespaceFilter[]; + /** Negates the expression. */ + not?: PlatformNamespaceFilter; + /** Filter by the object’s `functionDeploymentsByNamespaceId` relation. */ + functionDeploymentsByNamespaceId?: PlatformNamespaceToManyFunctionDeploymentFilter; + /** `functionDeploymentsByNamespaceId` exist. */ + functionDeploymentsByNamespaceIdExist?: boolean; + /** Filter by the object’s `resourcesByNamespaceId` relation. */ + resourcesByNamespaceId?: PlatformNamespaceToManyResourceFilter; + /** `resourcesByNamespaceId` exist. */ + resourcesByNamespaceIdExist?: boolean; +} +/** A filter to be used against many `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyFunctionDeploymentFilter { + /** Filters to entities where at least one related entity matches. */ + some?: FunctionDeploymentFilter; + /** Filters to entities where every related entity matches. */ + every?: FunctionDeploymentFilter; + /** Filters to entities where no related entity matches. */ + none?: FunctionDeploymentFilter; +} +/** A filter to be used against many `Resource` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyResourceFilter { + /** Filters to entities where at least one related entity matches. */ + some?: ResourceFilter; + /** Filters to entities where every related entity matches. */ + every?: ResourceFilter; + /** Filters to entities where no related entity matches. */ + none?: ResourceFilter; +} +/** A filter to be used against `Resource` object types. All fields are combined with a logical ‘and.’ */ +export interface ResourceFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `spec` field. */ + spec?: JSONFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `statusObserved` field. */ + statusObserved?: JSONFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `errorCount` field. */ + errorCount?: IntFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: ResourceFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceFilter[]; + /** Negates the expression. */ + not?: ResourceFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; } /** A filter to be used against `FunctionGraphRef` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionGraphRefFilter { @@ -793,6 +1027,31 @@ export interface OrgFunctionExecutionLogFilter { /** Negates the expression. */ not?: OrgFunctionExecutionLogFilter; } +/** A filter to be used against `ResourceEvent` object types. All fields are combined with a logical ‘and.’ */ +export interface ResourceEventFilter { + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `resourceId` field. */ + resourceId?: UUIDFilter; + /** Filter by the object’s `eventType` field. */ + eventType?: StringFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `message` field. */ + message?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: ResourceEventFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceEventFilter[]; + /** Negates the expression. */ + not?: ResourceEventFilter; +} /** A filter to be used against `FunctionGraphExecutionOutput` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionGraphExecutionOutputFilter { /** Filter by the object’s `createdAt` field. */ @@ -910,39 +1169,6 @@ export interface FunctionExecutionLogFilter { /** Negates the expression. */ not?: FunctionExecutionLogFilter; } -/** A filter to be used against `FunctionGraphExecutionNodeState` object types. All fields are combined with a logical ‘and.’ */ -export interface FunctionGraphExecutionNodeStateFilter { - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `executionId` field. */ - executionId?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `nodeName` field. */ - nodeName?: StringFilter; - /** Filter by the object’s `nodePath` field. */ - nodePath?: StringListFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `startedAt` field. */ - startedAt?: DatetimeFilter; - /** Filter by the object’s `completedAt` field. */ - completedAt?: DatetimeFilter; - /** Filter by the object’s `errorCode` field. */ - errorCode?: StringFilter; - /** Filter by the object’s `errorMessage` field. */ - errorMessage?: StringFilter; - /** Filter by the object’s `outputId` field. */ - outputId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: FunctionGraphExecutionNodeStateFilter[]; - /** Checks for any expressions in this list. */ - or?: FunctionGraphExecutionNodeStateFilter[]; - /** Negates the expression. */ - not?: FunctionGraphExecutionNodeStateFilter; -} /** A filter to be used against `FunctionGraph` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionGraphFilter { /** Filter by the object’s `id` field. */ @@ -951,8 +1177,6 @@ export interface FunctionGraphFilter { databaseId?: UUIDFilter; /** Filter by the object’s `storeId` field. */ storeId?: UUIDFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; /** Filter by the object’s `context` field. */ context?: StringFilter; /** Filter by the object’s `name` field. */ @@ -978,6 +1202,39 @@ export interface FunctionGraphFilter { /** Negates the expression. */ not?: FunctionGraphFilter; } +/** A filter to be used against `FunctionGraphExecutionNodeState` object types. All fields are combined with a logical ‘and.’ */ +export interface FunctionGraphExecutionNodeStateFilter { + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `executionId` field. */ + executionId?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `nodeName` field. */ + nodeName?: StringFilter; + /** Filter by the object’s `nodePath` field. */ + nodePath?: StringListFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `startedAt` field. */ + startedAt?: DatetimeFilter; + /** Filter by the object’s `completedAt` field. */ + completedAt?: DatetimeFilter; + /** Filter by the object’s `errorCode` field. */ + errorCode?: StringFilter; + /** Filter by the object’s `errorMessage` field. */ + errorMessage?: StringFilter; + /** Filter by the object’s `outputId` field. */ + outputId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: FunctionGraphExecutionNodeStateFilter[]; + /** Checks for any expressions in this list. */ + or?: FunctionGraphExecutionNodeStateFilter[]; + /** Negates the expression. */ + not?: FunctionGraphExecutionNodeStateFilter; +} /** A filter to be used against `OrgFunctionInvocation` object types. All fields are combined with a logical ‘and.’ */ export interface OrgFunctionInvocationFilter { /** Filter by the object’s `createdAt` field. */ @@ -1054,6 +1311,45 @@ export interface FunctionInvocationFilter { /** Negates the expression. */ not?: FunctionInvocationFilter; } +/** A filter to be used against `PlatformNamespaceEvent` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceEventFilter { + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Filter by the object’s `eventType` field. */ + eventType?: StringFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `message` field. */ + message?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `cpuMillicores` field. */ + cpuMillicores?: IntFilter; + /** Filter by the object’s `memoryBytes` field. */ + memoryBytes?: BigIntFilter; + /** Filter by the object’s `storageBytes` field. */ + storageBytes?: BigIntFilter; + /** Filter by the object’s `networkIngressBytes` field. */ + networkIngressBytes?: BigIntFilter; + /** Filter by the object’s `networkEgressBytes` field. */ + networkEgressBytes?: BigIntFilter; + /** Filter by the object’s `podCount` field. */ + podCount?: IntFilter; + /** Filter by the object’s `metrics` field. */ + metrics?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: PlatformNamespaceEventFilter[]; + /** Checks for any expressions in this list. */ + or?: PlatformNamespaceEventFilter[]; + /** Negates the expression. */ + not?: PlatformNamespaceEventFilter; +} /** A filter to be used against `FunctionGraphExecution` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionGraphExecutionFilter { /** Filter by the object’s `startedAt` field. */ @@ -1066,8 +1362,6 @@ export interface FunctionGraphExecutionFilter { invocationId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; /** Filter by the object’s `outputNode` field. */ outputNode?: StringFilter; /** Filter by the object’s `outputPort` field. */ @@ -1172,7 +1466,16 @@ export interface CreateFunctionGraphInput { name?: string; context?: string; description?: string; - entityId?: string; + createdBy?: string; + definitionsCommitId?: string; +} +export interface ImportGraphJsonInput { + clientMutationId?: string; + databaseId?: string; + name?: string; + graphJson?: unknown; + context?: string; + description?: string; createdBy?: string; definitionsCommitId?: string; } @@ -1198,17 +1501,6 @@ export interface AddNodeInput { props?: unknown; meta?: unknown; } -export interface ImportGraphJsonInput { - clientMutationId?: string; - databaseId?: string; - name?: string; - graphJson?: unknown; - context?: string; - description?: string; - entityId?: string; - createdBy?: string; - definitionsCommitId?: string; -} export interface InsertNodeAtPathInput { clientMutationId?: string; sId?: string; @@ -1370,6 +1662,30 @@ export interface OrgFunctionExecutionLogInput { /** User who triggered the execution (NULL for system/cron) */ actorId?: string; } +export interface CreateResourceEventInput { + clientMutationId?: string; + /** The `ResourceEvent` to be created by this mutation. */ + resourceEvent: ResourceEventInput; +} +/** An input for mutations affecting `ResourceEvent` */ +export interface ResourceEventInput { + /** Event timestamp (partition key) */ + createdAt?: string; + /** Unique event identifier */ + id?: string; + /** Resource this event belongs to */ + resourceId: string; + /** Event type: provisioned, provisioning, updated, failed, deprovisioned, health_check */ + eventType: string; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string; + /** Human-readable description of the event */ + message?: string; + /** Structured context (old/new values, error details, etc.) */ + metadata?: unknown; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; +} export interface CreateFunctionGraphExecutionOutputInput { clientMutationId?: string; /** The `FunctionGraphExecutionOutput` to be created by this mutation. */ @@ -1495,6 +1811,37 @@ export interface FunctionGraphExecutionNodeStateInput { /** FK to execution_outputs — content-addressed output blob for this node */ outputId?: string; } +export interface CreatePlatformNamespaceInput { + clientMutationId?: string; + /** The `PlatformNamespace` to be created by this mutation. */ + platformNamespace: PlatformNamespaceInput; +} +/** An input for mutations affecting `PlatformNamespace` */ +export interface PlatformNamespaceInput { + id?: string; + createdAt?: string; + updatedAt?: string; + /** Human-readable namespace name (e.g. default, production, oauth) */ + name: string; + /** Globally unique computed namespace identifier via inflection.underscore */ + namespaceName: string; + /** Optional human-readable description of this namespace */ + description?: string; + /** Whether this namespace is active (soft-disable for filtering) */ + isActive?: boolean; + /** Key/value pairs for selecting and filtering namespaces */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Database that created this namespace (NULL for platform-native namespaces) */ + sourceDatabaseId?: string; + /** Origin scope: platform, org, app — indicates where this namespace was created */ + sourceScope?: string; + /** true = created by a child scope mirror trigger, false = platform-native */ + isManaged?: boolean; +} export interface CreateOrgFunctionInvocationInput { clientMutationId?: string; /** The `OrgFunctionInvocation` to be created by this mutation. */ @@ -1546,28 +1893,103 @@ export interface FunctionInvocationInput { actorId?: string; /** Database that owns this resource (database-scoped isolation) */ databaseId: string; - /** Function routing slug (scope:name). Links to function_definitions.task_identifier by convention — no FK. */ - taskIdentifier: string; - /** Function input payload */ - payload?: unknown; - /** Lifecycle: pending → running → completed/failed/cancelled */ - status?: string; - /** Function return value (success) or structured error (failure) */ - result?: unknown; - /** Error message when status is failed */ - error?: string; - /** Wall-clock execution time in milliseconds */ - durationMs?: number; - /** FK to app_jobs.jobs — the underlying transport */ - jobId?: string; - /** When execution started */ - startedAt?: string; - /** When execution completed */ - completedAt?: string; - /** Parent invocation when this is a child node of a flow graph execution */ - parentInvocationId?: string; - /** Groups all node invocations from a single flow graph execution */ - graphExecutionId?: string; + /** Function routing slug (scope:name). Links to function_definitions.task_identifier by convention — no FK. */ + taskIdentifier: string; + /** Function input payload */ + payload?: unknown; + /** Lifecycle: pending → running → completed/failed/cancelled */ + status?: string; + /** Function return value (success) or structured error (failure) */ + result?: unknown; + /** Error message when status is failed */ + error?: string; + /** Wall-clock execution time in milliseconds */ + durationMs?: number; + /** FK to app_jobs.jobs — the underlying transport */ + jobId?: string; + /** When execution started */ + startedAt?: string; + /** When execution completed */ + completedAt?: string; + /** Parent invocation when this is a child node of a flow graph execution */ + parentInvocationId?: string; + /** Groups all node invocations from a single flow graph execution */ + graphExecutionId?: string; +} +export interface CreateResourceInput { + clientMutationId?: string; + /** The `Resource` to be created by this mutation. */ + resource: ResourceInput; +} +/** An input for mutations affecting `Resource` */ +export interface ResourceInput { + id?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: string; + updatedBy?: string; + /** Namespace this resource belongs to (security boundary, maps to K8s namespace) */ + namespaceId: string; + /** Resource kind: Deployment, StatefulSet, Service, Ingress, Certificate */ + kind: string; + /** Human-readable resource name */ + name: string; + /** URL-safe identifier, unique within (namespace_id, kind) */ + slug: string; + /** Desired state — kind-specific configuration (image, ports, resources, etc.). Opaque to DB; validated by K8s. */ + spec?: unknown; + /** Resource lifecycle status: pending, provisioning, active, failed, draining, deleting */ + status?: string; + /** Observed state from K8s — populated by handlers after reconciliation (service_url, clone_url, replicas, etc.) */ + statusObserved?: unknown; + /** Most recent provisioning or runtime error message */ + lastError?: string; + /** Cumulative error count for this resource */ + errorCount?: number; + /** Key/value pairs for selecting and filtering resources */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; +} +export interface CreatePlatformNamespaceEventInput { + clientMutationId?: string; + /** The `PlatformNamespaceEvent` to be created by this mutation. */ + platformNamespaceEvent: PlatformNamespaceEventInput; +} +/** An input for mutations affecting `PlatformNamespaceEvent` */ +export interface PlatformNamespaceEventInput { + /** Event timestamp (partition key) */ + createdAt?: string; + /** Unique event identifier */ + id?: string; + /** Namespace this event belongs to */ + namespaceId: string; + /** Event type: created, activated, deactivated, labels_updated, annotations_updated, renamed */ + eventType: string; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string; + /** Human-readable description of the event */ + message?: string; + /** Structured context (old/new values, labels diff, etc.) */ + metadata?: unknown; + /** CPU usage in millicores at time of event */ + cpuMillicores?: number; + /** Memory usage in bytes at time of event */ + memoryBytes?: string; + /** Storage usage in bytes at time of event */ + storageBytes?: string; + /** Network ingress in bytes during event window */ + networkIngressBytes?: string; + /** Network egress in bytes during event window */ + networkEgressBytes?: string; + /** Number of active pods in the namespace at time of event */ + podCount?: number; + /** Additional resource metrics (gpu, replicas, quotas, etc.) */ + metrics?: unknown; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; } export interface CreateFunctionDeploymentInput { clientMutationId?: string; @@ -1633,8 +2055,6 @@ export interface FunctionGraphExecutionInput { invocationId?: string; /** Scope for multi-tenant isolation */ databaseId: string; - /** Entity context (org/team) for scoped billing */ - entityId?: string; /** Target output boundary node name to resolve */ outputNode: string; /** Target output port name (default: value) */ @@ -1880,6 +2300,34 @@ export interface OrgFunctionExecutionLogPatch { /** User who triggered the execution (NULL for system/cron) */ actorId?: string; } +export interface UpdateResourceEventInput { + clientMutationId?: string; + /** Event timestamp (partition key) */ + createdAt: string; + /** Unique event identifier */ + id: string; + /** An object where the defined keys will be set on the `ResourceEvent` being updated. */ + resourceEventPatch: ResourceEventPatch; +} +/** Represents an update to a `ResourceEvent`. Fields that are set will be updated. */ +export interface ResourceEventPatch { + /** Event timestamp (partition key) */ + createdAt?: string; + /** Unique event identifier */ + id?: string; + /** Resource this event belongs to */ + resourceId?: string; + /** Event type: provisioned, provisioning, updated, failed, deprovisioned, health_check */ + eventType?: string; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string; + /** Human-readable description of the event */ + message?: string; + /** Structured context (old/new values, error details, etc.) */ + metadata?: unknown; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string; +} export interface UpdateFunctionGraphExecutionOutputInput { clientMutationId?: string; /** Timestamp of output creation */ @@ -1986,6 +2434,40 @@ export interface FunctionExecutionLogPatch { /** Database that owns this resource (database-scoped isolation) */ databaseId?: string; } +export interface UpdateFunctionGraphInput { + clientMutationId?: string; + /** Unique graph identifier */ + id: string; + /** An object where the defined keys will be set on the `FunctionGraph` being updated. */ + functionGraphPatch: FunctionGraphPatch; +} +/** Represents an update to a `FunctionGraph`. Fields that are set will be updated. */ +export interface FunctionGraphPatch { + /** Unique graph identifier */ + id?: string; + /** Database scope for multi-tenant isolation */ + databaseId?: string; + /** Graph store (Merkle store) holding the graph definition */ + storeId?: string; + /** Evaluator/runtime context (function, js, sql, system) */ + context?: string; + /** Graph name (unique per database) */ + name?: string; + /** Human-readable description of the graph */ + description?: string; + /** Pinned definitions store commit for deterministic evaluation */ + definitionsCommitId?: string; + /** Whether graph passes structural validation */ + isValid?: boolean; + /** Array of validation error objects when is_valid = false */ + validationErrors?: unknown; + /** Actor who created this graph */ + createdBy?: string; + /** Timestamp of graph creation */ + createdAt?: string; + /** Timestamp of last modification */ + updatedAt?: string; +} export interface UpdateFunctionGraphExecutionNodeStateInput { clientMutationId?: string; /** Timestamp of node state creation (partition key) */ @@ -2022,41 +2504,37 @@ export interface FunctionGraphExecutionNodeStatePatch { /** FK to execution_outputs — content-addressed output blob for this node */ outputId?: string; } -export interface UpdateFunctionGraphInput { +export interface UpdatePlatformNamespaceInput { clientMutationId?: string; - /** Unique graph identifier */ id: string; - /** An object where the defined keys will be set on the `FunctionGraph` being updated. */ - functionGraphPatch: FunctionGraphPatch; + /** An object where the defined keys will be set on the `PlatformNamespace` being updated. */ + platformNamespacePatch: PlatformNamespacePatch; } -/** Represents an update to a `FunctionGraph`. Fields that are set will be updated. */ -export interface FunctionGraphPatch { - /** Unique graph identifier */ +/** Represents an update to a `PlatformNamespace`. Fields that are set will be updated. */ +export interface PlatformNamespacePatch { id?: string; - /** Database scope for multi-tenant isolation */ - databaseId?: string; - /** Graph store (Merkle store) holding the graph definition */ - storeId?: string; - /** Entity context (org/team) for scoped billing */ - entityId?: string; - /** Evaluator/runtime context (function, js, sql, system) */ - context?: string; - /** Graph name (unique per database) */ - name?: string; - /** Human-readable description of the graph */ - description?: string; - /** Pinned definitions store commit for deterministic evaluation */ - definitionsCommitId?: string; - /** Whether graph passes structural validation */ - isValid?: boolean; - /** Array of validation error objects when is_valid = false */ - validationErrors?: unknown; - /** Actor who created this graph */ - createdBy?: string; - /** Timestamp of graph creation */ createdAt?: string; - /** Timestamp of last modification */ updatedAt?: string; + /** Human-readable namespace name (e.g. default, production, oauth) */ + name?: string; + /** Globally unique computed namespace identifier via inflection.underscore */ + namespaceName?: string; + /** Optional human-readable description of this namespace */ + description?: string; + /** Whether this namespace is active (soft-disable for filtering) */ + isActive?: boolean; + /** Key/value pairs for selecting and filtering namespaces */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string; + /** Database that created this namespace (NULL for platform-native namespaces) */ + sourceDatabaseId?: string; + /** Origin scope: platform, org, app — indicates where this namespace was created */ + sourceScope?: string; + /** true = created by a child scope mirror trigger, false = platform-native */ + isManaged?: boolean; } export interface UpdateOrgFunctionInvocationInput { clientMutationId?: string; @@ -2140,6 +2618,86 @@ export interface FunctionInvocationPatch { /** Groups all node invocations from a single flow graph execution */ graphExecutionId?: string; } +export interface UpdateResourceInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `Resource` being updated. */ + resourcePatch: ResourcePatch; +} +/** Represents an update to a `Resource`. Fields that are set will be updated. */ +export interface ResourcePatch { + id?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: string; + updatedBy?: string; + /** Namespace this resource belongs to (security boundary, maps to K8s namespace) */ + namespaceId?: string; + /** Resource kind: Deployment, StatefulSet, Service, Ingress, Certificate */ + kind?: string; + /** Human-readable resource name */ + name?: string; + /** URL-safe identifier, unique within (namespace_id, kind) */ + slug?: string; + /** Desired state — kind-specific configuration (image, ports, resources, etc.). Opaque to DB; validated by K8s. */ + spec?: unknown; + /** Resource lifecycle status: pending, provisioning, active, failed, draining, deleting */ + status?: string; + /** Observed state from K8s — populated by handlers after reconciliation (service_url, clone_url, replicas, etc.) */ + statusObserved?: unknown; + /** Most recent provisioning or runtime error message */ + lastError?: string; + /** Cumulative error count for this resource */ + errorCount?: number; + /** Key/value pairs for selecting and filtering resources */ + labels?: unknown; + /** Freeform metadata for tooling and operational notes */ + annotations?: unknown; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string; +} +export interface UpdatePlatformNamespaceEventInput { + clientMutationId?: string; + /** Event timestamp (partition key) */ + createdAt: string; + /** Unique event identifier */ + id: string; + /** An object where the defined keys will be set on the `PlatformNamespaceEvent` being updated. */ + platformNamespaceEventPatch: PlatformNamespaceEventPatch; +} +/** Represents an update to a `PlatformNamespaceEvent`. Fields that are set will be updated. */ +export interface PlatformNamespaceEventPatch { + /** Event timestamp (partition key) */ + createdAt?: string; + /** Unique event identifier */ + id?: string; + /** Namespace this event belongs to */ + namespaceId?: string; + /** Event type: created, activated, deactivated, labels_updated, annotations_updated, renamed */ + eventType?: string; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string; + /** Human-readable description of the event */ + message?: string; + /** Structured context (old/new values, labels diff, etc.) */ + metadata?: unknown; + /** CPU usage in millicores at time of event */ + cpuMillicores?: number; + /** Memory usage in bytes at time of event */ + memoryBytes?: string; + /** Storage usage in bytes at time of event */ + storageBytes?: string; + /** Network ingress in bytes during event window */ + networkIngressBytes?: string; + /** Network egress in bytes during event window */ + networkEgressBytes?: string; + /** Number of active pods in the namespace at time of event */ + podCount?: number; + /** Additional resource metrics (gpu, replicas, quotas, etc.) */ + metrics?: unknown; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string; +} export interface UpdateFunctionDeploymentInput { clientMutationId?: string; id: string; @@ -2209,8 +2767,6 @@ export interface FunctionGraphExecutionPatch { invocationId?: string; /** Scope for multi-tenant isolation */ databaseId?: string; - /** Entity context (org/team) for scoped billing */ - entityId?: string; /** Target output boundary node name to resolve */ outputNode?: string; /** Target output port name (default: value) */ @@ -2349,6 +2905,13 @@ export interface DeleteOrgFunctionExecutionLogInput { /** Unique log entry identifier */ id: string; } +export interface DeleteResourceEventInput { + clientMutationId?: string; + /** Event timestamp (partition key) */ + createdAt: string; + /** Unique event identifier */ + id: string; +} export interface DeleteFunctionGraphExecutionOutputInput { clientMutationId?: string; /** Timestamp of output creation */ @@ -2374,6 +2937,11 @@ export interface DeleteFunctionExecutionLogInput { /** Unique log entry identifier */ id: string; } +export interface DeleteFunctionGraphInput { + clientMutationId?: string; + /** Unique graph identifier */ + id: string; +} export interface DeleteFunctionGraphExecutionNodeStateInput { clientMutationId?: string; /** Timestamp of node state creation (partition key) */ @@ -2381,9 +2949,8 @@ export interface DeleteFunctionGraphExecutionNodeStateInput { /** Unique node state identifier */ id: string; } -export interface DeleteFunctionGraphInput { +export interface DeletePlatformNamespaceInput { clientMutationId?: string; - /** Unique graph identifier */ id: string; } export interface DeleteOrgFunctionInvocationInput { @@ -2400,6 +2967,17 @@ export interface DeleteFunctionInvocationInput { /** Unique invocation identifier */ id: string; } +export interface DeleteResourceInput { + clientMutationId?: string; + id: string; +} +export interface DeletePlatformNamespaceEventInput { + clientMutationId?: string; + /** Event timestamp (partition key) */ + createdAt: string; + /** Unique event identifier */ + id: string; +} export interface DeleteFunctionDeploymentInput { clientMutationId?: string; id: string; @@ -2473,6 +3051,13 @@ export interface OrgFunctionExecutionLogConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `ResourceEvent` values. */ +export interface ResourceEventConnection { + nodes: ResourceEvent[]; + edges: ResourceEventEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `FunctionGraphExecutionOutput` values. */ export interface FunctionGraphExecutionOutputConnection { nodes: FunctionGraphExecutionOutput[]; @@ -2501,6 +3086,13 @@ export interface FunctionExecutionLogConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `FunctionGraph` values. */ +export interface FunctionGraphConnection { + nodes: FunctionGraph[]; + edges: FunctionGraphEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `FunctionGraphExecutionNodeState` values. */ export interface FunctionGraphExecutionNodeStateConnection { nodes: FunctionGraphExecutionNodeState[]; @@ -2508,10 +3100,10 @@ export interface FunctionGraphExecutionNodeStateConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `FunctionGraph` values. */ -export interface FunctionGraphConnection { - nodes: FunctionGraph[]; - edges: FunctionGraphEdge[]; +/** A connection to a list of `PlatformNamespace` values. */ +export interface PlatformNamespaceConnection { + nodes: PlatformNamespace[]; + edges: PlatformNamespaceEdge[]; pageInfo: PageInfo; totalCount: number; } @@ -2529,6 +3121,20 @@ export interface FunctionInvocationConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `Resource` values. */ +export interface ResourceConnection { + nodes: Resource[]; + edges: ResourceEdge[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `PlatformNamespaceEvent` values. */ +export interface PlatformNamespaceEventConnection { + nodes: PlatformNamespaceEvent[]; + edges: PlatformNamespaceEventEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `FunctionDeployment` values. */ export interface FunctionDeploymentConnection { nodes: FunctionDeployment[]; @@ -2588,15 +3194,15 @@ export interface CreateFunctionGraphPayload { clientMutationId?: string | null; result?: string | null; } -export interface AddEdgePayload { +export interface ImportGraphJsonPayload { clientMutationId?: string | null; result?: string | null; } -export interface AddNodePayload { +export interface AddEdgePayload { clientMutationId?: string | null; result?: string | null; } -export interface ImportGraphJsonPayload { +export interface AddNodePayload { clientMutationId?: string | null; result?: string | null; } @@ -2644,6 +3250,12 @@ export interface CreateOrgFunctionExecutionLogPayload { orgFunctionExecutionLog?: OrgFunctionExecutionLog | null; orgFunctionExecutionLogEdge?: OrgFunctionExecutionLogEdge | null; } +export interface CreateResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was created by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} export interface CreateFunctionGraphExecutionOutputPayload { clientMutationId?: string | null; /** The `FunctionGraphExecutionOutput` that was created by this mutation. */ @@ -2674,6 +3286,12 @@ export interface CreateFunctionGraphExecutionNodeStatePayload { functionGraphExecutionNodeState?: FunctionGraphExecutionNodeState | null; functionGraphExecutionNodeStateEdge?: FunctionGraphExecutionNodeStateEdge | null; } +export interface CreatePlatformNamespacePayload { + clientMutationId?: string | null; + /** The `PlatformNamespace` that was created by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; +} export interface CreateOrgFunctionInvocationPayload { clientMutationId?: string | null; /** The `OrgFunctionInvocation` that was created by this mutation. */ @@ -2686,6 +3304,18 @@ export interface CreateFunctionInvocationPayload { functionInvocation?: FunctionInvocation | null; functionInvocationEdge?: FunctionInvocationEdge | null; } +export interface CreateResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was created by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export interface CreatePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was created by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} export interface CreateFunctionDeploymentPayload { clientMutationId?: string | null; /** The `FunctionDeployment` that was created by this mutation. */ @@ -2740,6 +3370,12 @@ export interface UpdateOrgFunctionExecutionLogPayload { orgFunctionExecutionLog?: OrgFunctionExecutionLog | null; orgFunctionExecutionLogEdge?: OrgFunctionExecutionLogEdge | null; } +export interface UpdateResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was updated by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} export interface UpdateFunctionGraphExecutionOutputPayload { clientMutationId?: string | null; /** The `FunctionGraphExecutionOutput` that was updated by this mutation. */ @@ -2764,17 +3400,23 @@ export interface UpdateFunctionExecutionLogPayload { functionExecutionLog?: FunctionExecutionLog | null; functionExecutionLogEdge?: FunctionExecutionLogEdge | null; } +export interface UpdateFunctionGraphPayload { + clientMutationId?: string | null; + /** The `FunctionGraph` that was updated by this mutation. */ + functionGraph?: FunctionGraph | null; + functionGraphEdge?: FunctionGraphEdge | null; +} export interface UpdateFunctionGraphExecutionNodeStatePayload { clientMutationId?: string | null; /** The `FunctionGraphExecutionNodeState` that was updated by this mutation. */ functionGraphExecutionNodeState?: FunctionGraphExecutionNodeState | null; functionGraphExecutionNodeStateEdge?: FunctionGraphExecutionNodeStateEdge | null; } -export interface UpdateFunctionGraphPayload { +export interface UpdatePlatformNamespacePayload { clientMutationId?: string | null; - /** The `FunctionGraph` that was updated by this mutation. */ - functionGraph?: FunctionGraph | null; - functionGraphEdge?: FunctionGraphEdge | null; + /** The `PlatformNamespace` that was updated by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; } export interface UpdateOrgFunctionInvocationPayload { clientMutationId?: string | null; @@ -2788,6 +3430,18 @@ export interface UpdateFunctionInvocationPayload { functionInvocation?: FunctionInvocation | null; functionInvocationEdge?: FunctionInvocationEdge | null; } +export interface UpdateResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was updated by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export interface UpdatePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was updated by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} export interface UpdateFunctionDeploymentPayload { clientMutationId?: string | null; /** The `FunctionDeployment` that was updated by this mutation. */ @@ -2842,6 +3496,12 @@ export interface DeleteOrgFunctionExecutionLogPayload { orgFunctionExecutionLog?: OrgFunctionExecutionLog | null; orgFunctionExecutionLogEdge?: OrgFunctionExecutionLogEdge | null; } +export interface DeleteResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was deleted by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} export interface DeleteFunctionGraphExecutionOutputPayload { clientMutationId?: string | null; /** The `FunctionGraphExecutionOutput` that was deleted by this mutation. */ @@ -2866,17 +3526,23 @@ export interface DeleteFunctionExecutionLogPayload { functionExecutionLog?: FunctionExecutionLog | null; functionExecutionLogEdge?: FunctionExecutionLogEdge | null; } +export interface DeleteFunctionGraphPayload { + clientMutationId?: string | null; + /** The `FunctionGraph` that was deleted by this mutation. */ + functionGraph?: FunctionGraph | null; + functionGraphEdge?: FunctionGraphEdge | null; +} export interface DeleteFunctionGraphExecutionNodeStatePayload { clientMutationId?: string | null; /** The `FunctionGraphExecutionNodeState` that was deleted by this mutation. */ functionGraphExecutionNodeState?: FunctionGraphExecutionNodeState | null; functionGraphExecutionNodeStateEdge?: FunctionGraphExecutionNodeStateEdge | null; } -export interface DeleteFunctionGraphPayload { +export interface DeletePlatformNamespacePayload { clientMutationId?: string | null; - /** The `FunctionGraph` that was deleted by this mutation. */ - functionGraph?: FunctionGraph | null; - functionGraphEdge?: FunctionGraphEdge | null; + /** The `PlatformNamespace` that was deleted by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; } export interface DeleteOrgFunctionInvocationPayload { clientMutationId?: string | null; @@ -2890,6 +3556,18 @@ export interface DeleteFunctionInvocationPayload { functionInvocation?: FunctionInvocation | null; functionInvocationEdge?: FunctionInvocationEdge | null; } +export interface DeleteResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was deleted by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export interface DeletePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was deleted by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} export interface DeleteFunctionDeploymentPayload { clientMutationId?: string | null; /** The `FunctionDeployment` that was deleted by this mutation. */ @@ -2975,6 +3653,12 @@ export interface OrgFunctionExecutionLogEdge { /** The `OrgFunctionExecutionLog` at the end of the edge. */ node?: OrgFunctionExecutionLog | null; } +/** A `ResourceEvent` edge in the connection. */ +export interface ResourceEventEdge { + cursor?: string | null; + /** The `ResourceEvent` at the end of the edge. */ + node?: ResourceEvent | null; +} /** A `FunctionGraphExecutionOutput` edge in the connection. */ export interface FunctionGraphExecutionOutputEdge { cursor?: string | null; @@ -2999,17 +3683,23 @@ export interface FunctionExecutionLogEdge { /** The `FunctionExecutionLog` at the end of the edge. */ node?: FunctionExecutionLog | null; } +/** A `FunctionGraph` edge in the connection. */ +export interface FunctionGraphEdge { + cursor?: string | null; + /** The `FunctionGraph` at the end of the edge. */ + node?: FunctionGraph | null; +} /** A `FunctionGraphExecutionNodeState` edge in the connection. */ export interface FunctionGraphExecutionNodeStateEdge { cursor?: string | null; /** The `FunctionGraphExecutionNodeState` at the end of the edge. */ node?: FunctionGraphExecutionNodeState | null; } -/** A `FunctionGraph` edge in the connection. */ -export interface FunctionGraphEdge { +/** A `PlatformNamespace` edge in the connection. */ +export interface PlatformNamespaceEdge { cursor?: string | null; - /** The `FunctionGraph` at the end of the edge. */ - node?: FunctionGraph | null; + /** The `PlatformNamespace` at the end of the edge. */ + node?: PlatformNamespace | null; } /** A `OrgFunctionInvocation` edge in the connection. */ export interface OrgFunctionInvocationEdge { @@ -3023,6 +3713,18 @@ export interface FunctionInvocationEdge { /** The `FunctionInvocation` at the end of the edge. */ node?: FunctionInvocation | null; } +/** A `Resource` edge in the connection. */ +export interface ResourceEdge { + cursor?: string | null; + /** The `Resource` at the end of the edge. */ + node?: Resource | null; +} +/** A `PlatformNamespaceEvent` edge in the connection. */ +export interface PlatformNamespaceEventEdge { + cursor?: string | null; + /** The `PlatformNamespaceEvent` at the end of the edge. */ + node?: PlatformNamespaceEvent | null; +} /** A `FunctionDeployment` edge in the connection. */ export interface FunctionDeploymentEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/compute/types.ts b/sdk/constructive-react/src/compute/types.ts index ba56afb0fd..53ce86fc57 100644 --- a/sdk/constructive-react/src/compute/types.ts +++ b/sdk/constructive-react/src/compute/types.ts @@ -39,6 +39,25 @@ export interface FunctionDeployment { annotations: unknown | null; databaseId: string | null; } +export interface Resource { + id: string | null; + createdAt: string | null; + updatedAt: string | null; + createdBy: string | null; + updatedBy: string | null; + namespaceId: string | null; + kind: string | null; + name: string | null; + slug: string | null; + spec: unknown | null; + status: string | null; + statusObserved: unknown | null; + lastError: string | null; + errorCount: number | null; + labels: unknown | null; + annotations: unknown | null; + databaseId: string | null; +} export interface FunctionGraphRef { id: string | null; name: string | null; @@ -81,6 +100,16 @@ export interface OrgFunctionExecutionLog { metadata: unknown | null; actorId: string | null; } +export interface ResourceEvent { + createdAt: string | null; + id: string | null; + resourceId: string | null; + eventType: string | null; + actorId: string | null; + message: string | null; + metadata: unknown | null; + databaseId: string | null; +} export interface FunctionGraphExecutionOutput { createdAt: string | null; id: string | null; @@ -121,6 +150,20 @@ export interface FunctionExecutionLog { actorId: string | null; databaseId: string | null; } +export interface FunctionGraph { + id: string | null; + databaseId: string | null; + storeId: string | null; + context: string | null; + name: string | null; + description: string | null; + definitionsCommitId: string | null; + isValid: boolean | null; + validationErrors: unknown | null; + createdBy: string | null; + createdAt: string | null; + updatedAt: string | null; +} export interface FunctionGraphExecutionNodeState { createdAt: string | null; id: string | null; @@ -135,20 +178,20 @@ export interface FunctionGraphExecutionNodeState { errorMessage: string | null; outputId: string | null; } -export interface FunctionGraph { +export interface PlatformNamespace { id: string | null; - databaseId: string | null; - storeId: string | null; - entityId: string | null; - context: string | null; - name: string | null; - description: string | null; - definitionsCommitId: string | null; - isValid: boolean | null; - validationErrors: unknown | null; - createdBy: string | null; createdAt: string | null; updatedAt: string | null; + name: string | null; + namespaceName: string | null; + description: string | null; + isActive: boolean | null; + labels: unknown | null; + annotations: unknown | null; + databaseId: string | null; + sourceDatabaseId: string | null; + sourceScope: string | null; + isManaged: boolean | null; } export interface OrgFunctionInvocation { createdAt: string | null; @@ -183,13 +226,29 @@ export interface FunctionInvocation { parentInvocationId: string | null; graphExecutionId: string | null; } +export interface PlatformNamespaceEvent { + createdAt: string | null; + id: string | null; + namespaceId: string | null; + eventType: string | null; + actorId: string | null; + message: string | null; + metadata: unknown | null; + cpuMillicores: number | null; + memoryBytes: string | null; + storageBytes: string | null; + networkIngressBytes: string | null; + networkEgressBytes: string | null; + podCount: number | null; + metrics: unknown | null; + databaseId: string | null; +} export interface FunctionGraphExecution { startedAt: string | null; id: string | null; graphId: string | null; invocationId: string | null; databaseId: string | null; - entityId: string | null; outputNode: string | null; outputPort: string | null; status: string | null; diff --git a/sdk/constructive-react/src/modules/README.md b/sdk/constructive-react/src/modules/README.md index ae5832ff41..8d9548e2d5 100644 --- a/sdk/constructive-react/src/modules/README.md +++ b/sdk/constructive-react/src/modules/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 59 +- **Tables:** 61 - **Custom queries:** 2 - **Custom mutations:** 10 diff --git a/sdk/constructive-react/src/modules/hooks/README.md b/sdk/constructive-react/src/modules/hooks/README.md index e6d1d52b26..caebd24175 100644 --- a/sdk/constructive-react/src/modules/hooks/README.md +++ b/sdk/constructive-react/src/modules/hooks/README.md @@ -217,16 +217,6 @@ function App() { | `useCreateSecureTableProvisionMutation` | Mutation | Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. | | `useUpdateSecureTableProvisionMutation` | Mutation | Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. | | `useDeleteSecureTableProvisionMutation` | Mutation | Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. | -| `useMerkleStoreModulesQuery` | Query | List all merkleStoreModules | -| `useMerkleStoreModuleQuery` | Query | Get one merkleStoreModule | -| `useCreateMerkleStoreModuleMutation` | Mutation | Create a merkleStoreModule | -| `useUpdateMerkleStoreModuleMutation` | Mutation | Update a merkleStoreModule | -| `useDeleteMerkleStoreModuleMutation` | Mutation | Delete a merkleStoreModule | -| `useGraphModulesQuery` | Query | List all graphModules | -| `useGraphModuleQuery` | Query | Get one graphModule | -| `useCreateGraphModuleMutation` | Mutation | Create a graphModule | -| `useUpdateGraphModuleMutation` | Mutation | Update a graphModule | -| `useDeleteGraphModuleMutation` | Mutation | Delete a graphModule | | `useDatabaseProvisionModulesQuery` | Query | Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. | | `useDatabaseProvisionModuleQuery` | Query | Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. | | `useCreateDatabaseProvisionModuleMutation` | Mutation | Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. | @@ -247,6 +237,16 @@ function App() { | `useDeleteConfigSecretsModuleMutation` | Mutation | Entity-aware PGP-encrypted key-value config/secrets module. Supports app-level (admin-only) and org-scoped (per-org secrets with manage_secrets permission) via the scope column. User-scoped bcrypt credentials are handled by user_credentials_module. | +| `useGraphModulesQuery` | Query | List all graphModules | +| `useGraphModuleQuery` | Query | Get one graphModule | +| `useCreateGraphModuleMutation` | Mutation | Create a graphModule | +| `useUpdateGraphModuleMutation` | Mutation | Update a graphModule | +| `useDeleteGraphModuleMutation` | Mutation | Delete a graphModule | +| `useMerkleStoreModulesQuery` | Query | List all merkleStoreModules | +| `useMerkleStoreModuleQuery` | Query | Get one merkleStoreModule | +| `useCreateMerkleStoreModuleMutation` | Mutation | Create a merkleStoreModule | +| `useUpdateMerkleStoreModuleMutation` | Mutation | Update a merkleStoreModule | +| `useDeleteMerkleStoreModuleMutation` | Mutation | Delete a merkleStoreModule | | `useRateLimitMetersModulesQuery` | Query | List all rateLimitMetersModules | | `useRateLimitMetersModuleQuery` | Query | Get one rateLimitMetersModule | | `useCreateRateLimitMetersModuleMutation` | Mutation | Create a rateLimitMetersModule | @@ -277,6 +277,11 @@ function App() { | `useCreateInvitesModuleMutation` | Mutation | Create a invitesModule | | `useUpdateInvitesModuleMutation` | Mutation | Update a invitesModule | | `useDeleteInvitesModuleMutation` | Mutation | Delete a invitesModule | +| `usePrincipalAuthModulesQuery` | Query | Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. | +| `usePrincipalAuthModuleQuery` | Query | Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. | +| `useCreatePrincipalAuthModuleMutation` | Mutation | Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. | +| `useUpdatePrincipalAuthModuleMutation` | Mutation | Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. | +| `useDeletePrincipalAuthModuleMutation` | Mutation | Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. | | `useComputeLogModulesQuery` | Query | List all computeLogModules | | `useComputeLogModuleQuery` | Query | Get one computeLogModule | | `useCreateComputeLogModuleMutation` | Mutation | Create a computeLogModule | @@ -292,6 +297,11 @@ function App() { | `useCreateNamespaceModuleMutation` | Mutation | Create a namespaceModule | | `useUpdateNamespaceModuleMutation` | Mutation | Update a namespaceModule | | `useDeleteNamespaceModuleMutation` | Mutation | Delete a namespaceModule | +| `useResourceModulesQuery` | Query | List all resourceModules | +| `useResourceModuleQuery` | Query | Get one resourceModule | +| `useCreateResourceModuleMutation` | Mutation | Create a resourceModule | +| `useUpdateResourceModuleMutation` | Mutation | Update a resourceModule | +| `useDeleteResourceModuleMutation` | Mutation | Delete a resourceModule | | `useStorageLogModulesQuery` | Query | List all storageLogModules | | `useStorageLogModuleQuery` | Query | Get one storageLogModule | | `useCreateStorageLogModuleMutation` | Mutation | Create a storageLogModule | @@ -1026,88 +1036,88 @@ const { mutate: create } = useCreateSecureTableProvisionMutation({ create({ databaseId: '', schemaId: '', tableId: '', tableName: '', nodes: '', useRls: '', fields: '', grants: '', policies: '', outFields: '' }); ``` -### MerkleStoreModule +### DatabaseProvisionModule ```typescript -// List all merkleStoreModules -const { data, isLoading } = useMerkleStoreModulesQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, createdAt: true } }, +// List all databaseProvisionModules +const { data, isLoading } = useDatabaseProvisionModulesQuery({ + selection: { fields: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }, }); -// Get one merkleStoreModule -const { data: item } = useMerkleStoreModuleQuery({ +// Get one databaseProvisionModule +const { data: item } = useDatabaseProvisionModuleQuery({ id: '', - selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, createdAt: true } }, + selection: { fields: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }, }); -// Create a merkleStoreModule -const { mutate: create } = useCreateMerkleStoreModuleMutation({ +// Create a databaseProvisionModule +const { mutate: create } = useCreateDatabaseProvisionModuleMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '' }); +create({ databaseName: '', ownerId: '', subdomain: '', domain: '', modules: '', options: '', bootstrapUser: '', status: '', errorMessage: '', databaseId: '', completedAt: '' }); ``` -### GraphModule +### ConfigSecretsModule ```typescript -// List all graphModules -const { data, isLoading } = useGraphModulesQuery({ - selection: { fields: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }, +// List all configSecretsModules +const { data, isLoading } = useConfigSecretsModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }, }); -// Get one graphModule -const { data: item } = useGraphModuleQuery({ +// Get one configSecretsModule +const { data: item } = useConfigSecretsModuleQuery({ id: '', - selection: { fields: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }, }); -// Create a graphModule -const { mutate: create } = useCreateGraphModuleMutation({ +// Create a configSecretsModule +const { mutate: create } = useCreateConfigSecretsModuleMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', publicSchemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', scope: '', prefix: '', merkleStoreModuleId: '', graphsTableId: '', apiName: '', privateApiName: '', entityTableId: '', policies: '', provisions: '', defaultPermissions: '' }); +create({ databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', tableId: '', configDefinitionsTableId: '', tableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', policies: '', provisions: '', hasConfig: '' }); ``` -### DatabaseProvisionModule +### GraphModule ```typescript -// List all databaseProvisionModules -const { data, isLoading } = useDatabaseProvisionModulesQuery({ - selection: { fields: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }, +// List all graphModules +const { data, isLoading } = useGraphModulesQuery({ + selection: { fields: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }, }); -// Get one databaseProvisionModule -const { data: item } = useDatabaseProvisionModuleQuery({ +// Get one graphModule +const { data: item } = useGraphModuleQuery({ id: '', - selection: { fields: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }, + selection: { fields: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }, }); -// Create a databaseProvisionModule -const { mutate: create } = useCreateDatabaseProvisionModuleMutation({ +// Create a graphModule +const { mutate: create } = useCreateGraphModuleMutation({ selection: { fields: { id: true } }, }); -create({ databaseName: '', ownerId: '', subdomain: '', domain: '', modules: '', options: '', bootstrapUser: '', status: '', errorMessage: '', databaseId: '', completedAt: '' }); +create({ databaseId: '', publicSchemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', scope: '', prefix: '', merkleStoreModuleId: '', graphsTableId: '', apiName: '', privateApiName: '', entityTableId: '', policies: '', provisions: '', defaultPermissions: '' }); ``` -### ConfigSecretsModule +### MerkleStoreModule ```typescript -// List all configSecretsModules -const { data, isLoading } = useConfigSecretsModulesQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }, +// List all merkleStoreModules +const { data, isLoading } = useMerkleStoreModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, permissionKey: true, createdAt: true } }, }); -// Get one configSecretsModule -const { data: item } = useConfigSecretsModuleQuery({ +// Get one merkleStoreModule +const { data: item } = useMerkleStoreModuleQuery({ id: '', - selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, permissionKey: true, createdAt: true } }, }); -// Create a configSecretsModule -const { mutate: create } = useCreateConfigSecretsModuleMutation({ +// Create a merkleStoreModule +const { mutate: create } = useCreateMerkleStoreModuleMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', tableId: '', configDefinitionsTableId: '', tableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', policies: '', provisions: '', hasConfig: '' }); +create({ databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '', permissionKey: '' }); ``` ### RateLimitMetersModule @@ -1236,6 +1246,27 @@ const { mutate: create } = useCreateInvitesModuleMutation({ create({ databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', emailsTableId: '', usersTableId: '', invitesTableId: '', claimedInvitesTableId: '', invitesTableName: '', claimedInvitesTableName: '', submitInviteCodeFunction: '', scope: '', prefix: '', entityTableId: '', apiName: '', privateApiName: '' }); ``` +### PrincipalAuthModule + +```typescript +// List all principalAuthModules +const { data, isLoading } = usePrincipalAuthModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, principalsTableId: true, principalEntitiesTableId: true, principalScopeOverridesTableId: true, usersTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, principalsTableName: true, createPrincipalFunction: true, deletePrincipalFunction: true, createOrgPrincipalFunction: true, deleteOrgPrincipalFunction: true, createOrgApiKeyFunction: true, revokeOrgApiKeyFunction: true, apiName: true } }, +}); + +// Get one principalAuthModule +const { data: item } = usePrincipalAuthModuleQuery({ + id: '', + selection: { fields: { id: true, databaseId: true, schemaId: true, principalsTableId: true, principalEntitiesTableId: true, principalScopeOverridesTableId: true, usersTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, principalsTableName: true, createPrincipalFunction: true, deletePrincipalFunction: true, createOrgPrincipalFunction: true, deleteOrgPrincipalFunction: true, createOrgApiKeyFunction: true, revokeOrgApiKeyFunction: true, apiName: true } }, +}); + +// Create a principalAuthModule +const { mutate: create } = useCreatePrincipalAuthModuleMutation({ + selection: { fields: { id: true } }, +}); +create({ databaseId: '', schemaId: '', principalsTableId: '', principalEntitiesTableId: '', principalScopeOverridesTableId: '', usersTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', principalsTableName: '', createPrincipalFunction: '', deletePrincipalFunction: '', createOrgPrincipalFunction: '', deleteOrgPrincipalFunction: '', createOrgApiKeyFunction: '', revokeOrgApiKeyFunction: '', apiName: '' }); +``` + ### ComputeLogModule ```typescript @@ -1299,6 +1330,27 @@ const { mutate: create } = useCreateNamespaceModuleMutation({ create({ databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', namespacesTableId: '', namespaceEventsTableId: '', namespacesTableName: '', namespaceEventsTableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', platformNamespacesTableId: '', policies: '', provisions: '', defaultPermissions: '' }); ``` +### ResourceModule + +```typescript +// List all resourceModules +const { data, isLoading } = useResourceModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, resourcesTableId: true, resourceEventsTableId: true, resourcesTableName: true, resourceEventsTableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, namespaceModuleId: true, policies: true, provisions: true, defaultPermissions: true } }, +}); + +// Get one resourceModule +const { data: item } = useResourceModuleQuery({ + id: '', + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, resourcesTableId: true, resourceEventsTableId: true, resourcesTableName: true, resourceEventsTableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, namespaceModuleId: true, policies: true, provisions: true, defaultPermissions: true } }, +}); + +// Create a resourceModule +const { mutate: create } = useCreateResourceModuleMutation({ + selection: { fields: { id: true } }, +}); +create({ databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', resourcesTableId: '', resourceEventsTableId: '', resourcesTableName: '', resourceEventsTableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', namespaceModuleId: '', policies: '', provisions: '', defaultPermissions: '' }); +``` + ### StorageLogModule ```typescript diff --git a/sdk/constructive-react/src/modules/hooks/index.ts b/sdk/constructive-react/src/modules/hooks/index.ts index 3de92c18ee..7221d87c69 100644 --- a/sdk/constructive-react/src/modules/hooks/index.ts +++ b/sdk/constructive-react/src/modules/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: DefaultIdsModule, MembershipTypesModule, UserStateModule, SessionSecretsModule, ConfigSecretsOrgModule, DevicesModule, I18NModule, UserCredentialsModule, UserSettingsModule, ConfigSecretsUserModule, ConnectedAccountsModule, EmailsModule, PhoneNumbersModule, RateLimitsModule, UsersModule, WebauthnCredentialsModule, CryptoAddressesModule, DenormalizedTableField, IdentityProvidersModule, RlsModule, Blueprint, BlueprintTemplate, BlueprintConstruction, CryptoAuthModule, SessionsModule, SecureTableProvision, MerkleStoreModule, GraphModule, DatabaseProvisionModule, ConfigSecretsModule, RateLimitMetersModule, RealtimeModule, WebauthnAuthModule, FunctionInvocationModule, FunctionModule, InvitesModule, ComputeLogModule, InferenceLogModule, NamespaceModule, StorageLogModule, TransferLogModule, FunctionDeploymentModule, PlansModule, BillingProviderModule, DbUsageModule, GraphExecutionModule, HierarchyModule, PermissionsModule, NotificationsModule, ProfilesModule, BillingModule, RelationProvision, UserAuthModule, AgentModule, LimitsModule, MembershipsModule, EntityTypeProvision, StorageModule, EventsModule + * Tables: DefaultIdsModule, MembershipTypesModule, UserStateModule, SessionSecretsModule, ConfigSecretsOrgModule, DevicesModule, I18NModule, UserCredentialsModule, UserSettingsModule, ConfigSecretsUserModule, ConnectedAccountsModule, EmailsModule, PhoneNumbersModule, RateLimitsModule, UsersModule, WebauthnCredentialsModule, CryptoAddressesModule, DenormalizedTableField, IdentityProvidersModule, RlsModule, Blueprint, BlueprintTemplate, BlueprintConstruction, CryptoAuthModule, SessionsModule, SecureTableProvision, DatabaseProvisionModule, ConfigSecretsModule, GraphModule, MerkleStoreModule, RateLimitMetersModule, RealtimeModule, WebauthnAuthModule, FunctionInvocationModule, FunctionModule, InvitesModule, PrincipalAuthModule, ComputeLogModule, InferenceLogModule, NamespaceModule, ResourceModule, StorageLogModule, TransferLogModule, FunctionDeploymentModule, PlansModule, BillingProviderModule, DbUsageModule, GraphExecutionModule, HierarchyModule, PermissionsModule, NotificationsModule, ProfilesModule, BillingModule, RelationProvision, UserAuthModule, AgentModule, LimitsModule, MembershipsModule, EntityTypeProvision, StorageModule, EventsModule * * Usage: * diff --git a/sdk/constructive-react/src/modules/hooks/invalidation.ts b/sdk/constructive-react/src/modules/hooks/invalidation.ts index b971252a18..c8849d90cd 100644 --- a/sdk/constructive-react/src/modules/hooks/invalidation.ts +++ b/sdk/constructive-react/src/modules/hooks/invalidation.ts @@ -41,19 +41,21 @@ import { cryptoAuthModuleKeys, sessionsModuleKeys, secureTableProvisionKeys, - merkleStoreModuleKeys, - graphModuleKeys, databaseProvisionModuleKeys, configSecretsModuleKeys, + graphModuleKeys, + merkleStoreModuleKeys, rateLimitMetersModuleKeys, realtimeModuleKeys, webauthnAuthModuleKeys, functionInvocationModuleKeys, functionModuleKeys, invitesModuleKeys, + principalAuthModuleKeys, computeLogModuleKeys, inferenceLogModuleKeys, namespaceModuleKeys, + resourceModuleKeys, storageLogModuleKeys, transferLogModuleKeys, functionDeploymentModuleKeys, @@ -537,72 +539,72 @@ export const invalidate = { queryKey: secureTableProvisionKeys.detail(id), }), }, - /** Invalidate merkleStoreModule queries */ merkleStoreModule: { - /** Invalidate all merkleStoreModule queries */ all: (queryClient: QueryClient) => + /** Invalidate databaseProvisionModule queries */ databaseProvisionModule: { + /** Invalidate all databaseProvisionModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: merkleStoreModuleKeys.all, + queryKey: databaseProvisionModuleKeys.all, }), - /** Invalidate merkleStoreModule list queries */ lists: (queryClient: QueryClient) => + /** Invalidate databaseProvisionModule list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: merkleStoreModuleKeys.lists(), + queryKey: databaseProvisionModuleKeys.lists(), }), - /** Invalidate a specific merkleStoreModule */ detail: ( + /** Invalidate a specific databaseProvisionModule */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: merkleStoreModuleKeys.detail(id), + queryKey: databaseProvisionModuleKeys.detail(id), }), }, - /** Invalidate graphModule queries */ graphModule: { - /** Invalidate all graphModule queries */ all: (queryClient: QueryClient) => + /** Invalidate configSecretsModule queries */ configSecretsModule: { + /** Invalidate all configSecretsModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: graphModuleKeys.all, + queryKey: configSecretsModuleKeys.all, }), - /** Invalidate graphModule list queries */ lists: (queryClient: QueryClient) => + /** Invalidate configSecretsModule list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: graphModuleKeys.lists(), + queryKey: configSecretsModuleKeys.lists(), }), - /** Invalidate a specific graphModule */ detail: ( + /** Invalidate a specific configSecretsModule */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: graphModuleKeys.detail(id), + queryKey: configSecretsModuleKeys.detail(id), }), }, - /** Invalidate databaseProvisionModule queries */ databaseProvisionModule: { - /** Invalidate all databaseProvisionModule queries */ all: (queryClient: QueryClient) => + /** Invalidate graphModule queries */ graphModule: { + /** Invalidate all graphModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: databaseProvisionModuleKeys.all, + queryKey: graphModuleKeys.all, }), - /** Invalidate databaseProvisionModule list queries */ lists: (queryClient: QueryClient) => + /** Invalidate graphModule list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: databaseProvisionModuleKeys.lists(), + queryKey: graphModuleKeys.lists(), }), - /** Invalidate a specific databaseProvisionModule */ detail: ( + /** Invalidate a specific graphModule */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: databaseProvisionModuleKeys.detail(id), + queryKey: graphModuleKeys.detail(id), }), }, - /** Invalidate configSecretsModule queries */ configSecretsModule: { - /** Invalidate all configSecretsModule queries */ all: (queryClient: QueryClient) => + /** Invalidate merkleStoreModule queries */ merkleStoreModule: { + /** Invalidate all merkleStoreModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: configSecretsModuleKeys.all, + queryKey: merkleStoreModuleKeys.all, }), - /** Invalidate configSecretsModule list queries */ lists: (queryClient: QueryClient) => + /** Invalidate merkleStoreModule list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: configSecretsModuleKeys.lists(), + queryKey: merkleStoreModuleKeys.lists(), }), - /** Invalidate a specific configSecretsModule */ detail: ( + /** Invalidate a specific merkleStoreModule */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: configSecretsModuleKeys.detail(id), + queryKey: merkleStoreModuleKeys.detail(id), }), }, /** Invalidate rateLimitMetersModule queries */ rateLimitMetersModule: { @@ -707,6 +709,23 @@ export const invalidate = { queryKey: invitesModuleKeys.detail(id), }), }, + /** Invalidate principalAuthModule queries */ principalAuthModule: { + /** Invalidate all principalAuthModule queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: principalAuthModuleKeys.all, + }), + /** Invalidate principalAuthModule list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: principalAuthModuleKeys.lists(), + }), + /** Invalidate a specific principalAuthModule */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: principalAuthModuleKeys.detail(id), + }), + }, /** Invalidate computeLogModule queries */ computeLogModule: { /** Invalidate all computeLogModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -758,6 +777,23 @@ export const invalidate = { queryKey: namespaceModuleKeys.detail(id), }), }, + /** Invalidate resourceModule queries */ resourceModule: { + /** Invalidate all resourceModule queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: resourceModuleKeys.all, + }), + /** Invalidate resourceModule list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: resourceModuleKeys.lists(), + }), + /** Invalidate a specific resourceModule */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: resourceModuleKeys.detail(id), + }), + }, /** Invalidate storageLogModule queries */ storageLogModule: { /** Invalidate all storageLogModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1313,36 +1349,36 @@ export const remove = { queryKey: secureTableProvisionKeys.detail(id), }); }, - /** Remove merkleStoreModule from cache */ merkleStoreModule: ( + /** Remove databaseProvisionModule from cache */ databaseProvisionModule: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: merkleStoreModuleKeys.detail(id), + queryKey: databaseProvisionModuleKeys.detail(id), }); }, - /** Remove graphModule from cache */ graphModule: ( + /** Remove configSecretsModule from cache */ configSecretsModule: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: graphModuleKeys.detail(id), + queryKey: configSecretsModuleKeys.detail(id), }); }, - /** Remove databaseProvisionModule from cache */ databaseProvisionModule: ( + /** Remove graphModule from cache */ graphModule: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: databaseProvisionModuleKeys.detail(id), + queryKey: graphModuleKeys.detail(id), }); }, - /** Remove configSecretsModule from cache */ configSecretsModule: ( + /** Remove merkleStoreModule from cache */ merkleStoreModule: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: configSecretsModuleKeys.detail(id), + queryKey: merkleStoreModuleKeys.detail(id), }); }, /** Remove rateLimitMetersModule from cache */ rateLimitMetersModule: ( @@ -1393,6 +1429,14 @@ export const remove = { queryKey: invitesModuleKeys.detail(id), }); }, + /** Remove principalAuthModule from cache */ principalAuthModule: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: principalAuthModuleKeys.detail(id), + }); + }, /** Remove computeLogModule from cache */ computeLogModule: ( queryClient: QueryClient, id: string | number @@ -1417,6 +1461,14 @@ export const remove = { queryKey: namespaceModuleKeys.detail(id), }); }, + /** Remove resourceModule from cache */ resourceModule: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: resourceModuleKeys.detail(id), + }); + }, /** Remove storageLogModule from cache */ storageLogModule: ( queryClient: QueryClient, id: string | number diff --git a/sdk/constructive-react/src/modules/hooks/mutation-keys.ts b/sdk/constructive-react/src/modules/hooks/mutation-keys.ts index 35bd3233b4..0734dee341 100644 --- a/sdk/constructive-react/src/modules/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/modules/hooks/mutation-keys.ts @@ -279,24 +279,6 @@ export const secureTableProvisionMutationKeys = { /** Delete secureTableProvision mutation key */ delete: (id: string | number) => ['mutation', 'securetableprovision', 'delete', id] as const, } as const; -export const merkleStoreModuleMutationKeys = { - /** All merkleStoreModule mutation keys */ all: ['mutation', 'merklestoremodule'] as const, - /** Create merkleStoreModule mutation key */ create: () => - ['mutation', 'merklestoremodule', 'create'] as const, - /** Update merkleStoreModule mutation key */ update: (id: string | number) => - ['mutation', 'merklestoremodule', 'update', id] as const, - /** Delete merkleStoreModule mutation key */ delete: (id: string | number) => - ['mutation', 'merklestoremodule', 'delete', id] as const, -} as const; -export const graphModuleMutationKeys = { - /** All graphModule mutation keys */ all: ['mutation', 'graphmodule'] as const, - /** Create graphModule mutation key */ create: () => - ['mutation', 'graphmodule', 'create'] as const, - /** Update graphModule mutation key */ update: (id: string | number) => - ['mutation', 'graphmodule', 'update', id] as const, - /** Delete graphModule mutation key */ delete: (id: string | number) => - ['mutation', 'graphmodule', 'delete', id] as const, -} as const; export const databaseProvisionModuleMutationKeys = { /** All databaseProvisionModule mutation keys */ all: [ 'mutation', @@ -318,6 +300,24 @@ export const configSecretsModuleMutationKeys = { /** Delete configSecretsModule mutation key */ delete: (id: string | number) => ['mutation', 'configsecretsmodule', 'delete', id] as const, } as const; +export const graphModuleMutationKeys = { + /** All graphModule mutation keys */ all: ['mutation', 'graphmodule'] as const, + /** Create graphModule mutation key */ create: () => + ['mutation', 'graphmodule', 'create'] as const, + /** Update graphModule mutation key */ update: (id: string | number) => + ['mutation', 'graphmodule', 'update', id] as const, + /** Delete graphModule mutation key */ delete: (id: string | number) => + ['mutation', 'graphmodule', 'delete', id] as const, +} as const; +export const merkleStoreModuleMutationKeys = { + /** All merkleStoreModule mutation keys */ all: ['mutation', 'merklestoremodule'] as const, + /** Create merkleStoreModule mutation key */ create: () => + ['mutation', 'merklestoremodule', 'create'] as const, + /** Update merkleStoreModule mutation key */ update: (id: string | number) => + ['mutation', 'merklestoremodule', 'update', id] as const, + /** Delete merkleStoreModule mutation key */ delete: (id: string | number) => + ['mutation', 'merklestoremodule', 'delete', id] as const, +} as const; export const rateLimitMetersModuleMutationKeys = { /** All rateLimitMetersModule mutation keys */ all: [ 'mutation', @@ -378,6 +378,15 @@ export const invitesModuleMutationKeys = { /** Delete invitesModule mutation key */ delete: (id: string | number) => ['mutation', 'invitesmodule', 'delete', id] as const, } as const; +export const principalAuthModuleMutationKeys = { + /** All principalAuthModule mutation keys */ all: ['mutation', 'principalauthmodule'] as const, + /** Create principalAuthModule mutation key */ create: () => + ['mutation', 'principalauthmodule', 'create'] as const, + /** Update principalAuthModule mutation key */ update: (id: string | number) => + ['mutation', 'principalauthmodule', 'update', id] as const, + /** Delete principalAuthModule mutation key */ delete: (id: string | number) => + ['mutation', 'principalauthmodule', 'delete', id] as const, +} as const; export const computeLogModuleMutationKeys = { /** All computeLogModule mutation keys */ all: ['mutation', 'computelogmodule'] as const, /** Create computeLogModule mutation key */ create: () => @@ -405,6 +414,15 @@ export const namespaceModuleMutationKeys = { /** Delete namespaceModule mutation key */ delete: (id: string | number) => ['mutation', 'namespacemodule', 'delete', id] as const, } as const; +export const resourceModuleMutationKeys = { + /** All resourceModule mutation keys */ all: ['mutation', 'resourcemodule'] as const, + /** Create resourceModule mutation key */ create: () => + ['mutation', 'resourcemodule', 'create'] as const, + /** Update resourceModule mutation key */ update: (id: string | number) => + ['mutation', 'resourcemodule', 'update', id] as const, + /** Delete resourceModule mutation key */ delete: (id: string | number) => + ['mutation', 'resourcemodule', 'delete', id] as const, +} as const; export const storageLogModuleMutationKeys = { /** All storageLogModule mutation keys */ all: ['mutation', 'storagelogmodule'] as const, /** Create storageLogModule mutation key */ create: () => @@ -693,19 +711,21 @@ export const mutationKeys = { cryptoAuthModule: cryptoAuthModuleMutationKeys, sessionsModule: sessionsModuleMutationKeys, secureTableProvision: secureTableProvisionMutationKeys, - merkleStoreModule: merkleStoreModuleMutationKeys, - graphModule: graphModuleMutationKeys, databaseProvisionModule: databaseProvisionModuleMutationKeys, configSecretsModule: configSecretsModuleMutationKeys, + graphModule: graphModuleMutationKeys, + merkleStoreModule: merkleStoreModuleMutationKeys, rateLimitMetersModule: rateLimitMetersModuleMutationKeys, realtimeModule: realtimeModuleMutationKeys, webauthnAuthModule: webauthnAuthModuleMutationKeys, functionInvocationModule: functionInvocationModuleMutationKeys, functionModule: functionModuleMutationKeys, invitesModule: invitesModuleMutationKeys, + principalAuthModule: principalAuthModuleMutationKeys, computeLogModule: computeLogModuleMutationKeys, inferenceLogModule: inferenceLogModuleMutationKeys, namespaceModule: namespaceModuleMutationKeys, + resourceModule: resourceModuleMutationKeys, storageLogModule: storageLogModuleMutationKeys, transferLogModule: transferLogModuleMutationKeys, functionDeploymentModule: functionDeploymentModuleMutationKeys, diff --git a/sdk/constructive-react/src/modules/hooks/mutations/index.ts b/sdk/constructive-react/src/modules/hooks/mutations/index.ts index edeff4af8f..f0f849fb5a 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/modules/hooks/mutations/index.ts @@ -81,18 +81,18 @@ export * from './useDeleteSessionsModuleMutation'; export * from './useCreateSecureTableProvisionMutation'; export * from './useUpdateSecureTableProvisionMutation'; export * from './useDeleteSecureTableProvisionMutation'; -export * from './useCreateMerkleStoreModuleMutation'; -export * from './useUpdateMerkleStoreModuleMutation'; -export * from './useDeleteMerkleStoreModuleMutation'; -export * from './useCreateGraphModuleMutation'; -export * from './useUpdateGraphModuleMutation'; -export * from './useDeleteGraphModuleMutation'; export * from './useCreateDatabaseProvisionModuleMutation'; export * from './useUpdateDatabaseProvisionModuleMutation'; export * from './useDeleteDatabaseProvisionModuleMutation'; export * from './useCreateConfigSecretsModuleMutation'; export * from './useUpdateConfigSecretsModuleMutation'; export * from './useDeleteConfigSecretsModuleMutation'; +export * from './useCreateGraphModuleMutation'; +export * from './useUpdateGraphModuleMutation'; +export * from './useDeleteGraphModuleMutation'; +export * from './useCreateMerkleStoreModuleMutation'; +export * from './useUpdateMerkleStoreModuleMutation'; +export * from './useDeleteMerkleStoreModuleMutation'; export * from './useCreateRateLimitMetersModuleMutation'; export * from './useUpdateRateLimitMetersModuleMutation'; export * from './useDeleteRateLimitMetersModuleMutation'; @@ -111,6 +111,9 @@ export * from './useDeleteFunctionModuleMutation'; export * from './useCreateInvitesModuleMutation'; export * from './useUpdateInvitesModuleMutation'; export * from './useDeleteInvitesModuleMutation'; +export * from './useCreatePrincipalAuthModuleMutation'; +export * from './useUpdatePrincipalAuthModuleMutation'; +export * from './useDeletePrincipalAuthModuleMutation'; export * from './useCreateComputeLogModuleMutation'; export * from './useUpdateComputeLogModuleMutation'; export * from './useDeleteComputeLogModuleMutation'; @@ -120,6 +123,9 @@ export * from './useDeleteInferenceLogModuleMutation'; export * from './useCreateNamespaceModuleMutation'; export * from './useUpdateNamespaceModuleMutation'; export * from './useDeleteNamespaceModuleMutation'; +export * from './useCreateResourceModuleMutation'; +export * from './useUpdateResourceModuleMutation'; +export * from './useDeleteResourceModuleMutation'; export * from './useCreateStorageLogModuleMutation'; export * from './useUpdateStorageLogModuleMutation'; export * from './useDeleteStorageLogModuleMutation'; diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreatePrincipalAuthModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreatePrincipalAuthModuleMutation.ts new file mode 100644 index 0000000000..1734cac615 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreatePrincipalAuthModuleMutation.ts @@ -0,0 +1,91 @@ +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * @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 { principalAuthModuleKeys } from '../query-keys'; +import { principalAuthModuleMutationKeys } from '../mutation-keys'; +import type { + PrincipalAuthModuleSelect, + PrincipalAuthModuleWithRelations, + CreatePrincipalAuthModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PrincipalAuthModuleSelect, + PrincipalAuthModuleWithRelations, + CreatePrincipalAuthModuleInput, +} from '../../orm/input-types'; +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePrincipalAuthModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePrincipalAuthModuleMutation( + params: { + selection: { + fields: S & PrincipalAuthModuleSelect; + } & HookStrictSelect, PrincipalAuthModuleSelect>; + } & Omit< + UseMutationOptions< + { + createPrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }, + Error, + CreatePrincipalAuthModuleInput['principalAuthModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }, + Error, + CreatePrincipalAuthModuleInput['principalAuthModule'] +>; +export function useCreatePrincipalAuthModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: principalAuthModuleMutationKeys.create(), + mutationFn: (data: CreatePrincipalAuthModuleInput['principalAuthModule']) => + getClient() + .principalAuthModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: principalAuthModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateResourceModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateResourceModuleMutation.ts new file mode 100644 index 0000000000..1be676eb4c --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateResourceModuleMutation.ts @@ -0,0 +1,91 @@ +/** + * Create mutation hook for ResourceModule + * @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 { resourceModuleKeys } from '../query-keys'; +import { resourceModuleMutationKeys } from '../mutation-keys'; +import type { + ResourceModuleSelect, + ResourceModuleWithRelations, + CreateResourceModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ResourceModuleSelect, + ResourceModuleWithRelations, + CreateResourceModuleInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a ResourceModule + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateResourceModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateResourceModuleMutation( + params: { + selection: { + fields: S & ResourceModuleSelect; + } & HookStrictSelect, ResourceModuleSelect>; + } & Omit< + UseMutationOptions< + { + createResourceModule: { + resourceModule: InferSelectResult; + }; + }, + Error, + CreateResourceModuleInput['resourceModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createResourceModule: { + resourceModule: InferSelectResult; + }; + }, + Error, + CreateResourceModuleInput['resourceModule'] +>; +export function useCreateResourceModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: resourceModuleMutationKeys.create(), + mutationFn: (data: CreateResourceModuleInput['resourceModule']) => + getClient() + .resourceModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: resourceModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeletePrincipalAuthModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeletePrincipalAuthModuleMutation.ts new file mode 100644 index 0000000000..b0d095c2a0 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeletePrincipalAuthModuleMutation.ts @@ -0,0 +1,104 @@ +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * @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 { principalAuthModuleKeys } from '../query-keys'; +import { principalAuthModuleMutationKeys } from '../mutation-keys'; +import type { + PrincipalAuthModuleSelect, + PrincipalAuthModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PrincipalAuthModuleSelect, + PrincipalAuthModuleWithRelations, +} from '../../orm/input-types'; +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePrincipalAuthModuleMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePrincipalAuthModuleMutation( + params: { + selection: { + fields: S & PrincipalAuthModuleSelect; + } & HookStrictSelect, PrincipalAuthModuleSelect>; + } & Omit< + UseMutationOptions< + { + deletePrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePrincipalAuthModuleMutation( + 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: principalAuthModuleMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .principalAuthModule.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: principalAuthModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: principalAuthModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteResourceModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteResourceModuleMutation.ts new file mode 100644 index 0000000000..4381c04520 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteResourceModuleMutation.ts @@ -0,0 +1,98 @@ +/** + * Delete mutation hook for ResourceModule + * @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 { resourceModuleKeys } from '../query-keys'; +import { resourceModuleMutationKeys } from '../mutation-keys'; +import type { ResourceModuleSelect, ResourceModuleWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ResourceModuleSelect, ResourceModuleWithRelations } from '../../orm/input-types'; +/** + * Mutation hook for deleting a ResourceModule with typed selection + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteResourceModuleMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteResourceModuleMutation( + params: { + selection: { + fields: S & ResourceModuleSelect; + } & HookStrictSelect, ResourceModuleSelect>; + } & Omit< + UseMutationOptions< + { + deleteResourceModule: { + resourceModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteResourceModule: { + resourceModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteResourceModuleMutation( + 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: resourceModuleMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .resourceModule.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: resourceModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: resourceModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdatePrincipalAuthModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdatePrincipalAuthModuleMutation.ts new file mode 100644 index 0000000000..025bbf0a2d --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdatePrincipalAuthModuleMutation.ts @@ -0,0 +1,116 @@ +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * @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 { principalAuthModuleKeys } from '../query-keys'; +import { principalAuthModuleMutationKeys } from '../mutation-keys'; +import type { + PrincipalAuthModuleSelect, + PrincipalAuthModuleWithRelations, + PrincipalAuthModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PrincipalAuthModuleSelect, + PrincipalAuthModuleWithRelations, + PrincipalAuthModulePatch, +} from '../../orm/input-types'; +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePrincipalAuthModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', principalAuthModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePrincipalAuthModuleMutation( + params: { + selection: { + fields: S & PrincipalAuthModuleSelect; + } & HookStrictSelect, PrincipalAuthModuleSelect>; + } & Omit< + UseMutationOptions< + { + updatePrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }, + Error, + { + id: string; + principalAuthModulePatch: PrincipalAuthModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }, + Error, + { + id: string; + principalAuthModulePatch: PrincipalAuthModulePatch; + } +>; +export function useUpdatePrincipalAuthModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + principalAuthModulePatch: PrincipalAuthModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: principalAuthModuleMutationKeys.all, + mutationFn: ({ + id, + principalAuthModulePatch, + }: { + id: string; + principalAuthModulePatch: PrincipalAuthModulePatch; + }) => + getClient() + .principalAuthModule.update({ + where: { + id, + }, + data: principalAuthModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: principalAuthModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: principalAuthModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateResourceModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateResourceModuleMutation.ts new file mode 100644 index 0000000000..5cca4c4452 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateResourceModuleMutation.ts @@ -0,0 +1,116 @@ +/** + * Update mutation hook for ResourceModule + * @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 { resourceModuleKeys } from '../query-keys'; +import { resourceModuleMutationKeys } from '../mutation-keys'; +import type { + ResourceModuleSelect, + ResourceModuleWithRelations, + ResourceModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ResourceModuleSelect, + ResourceModuleWithRelations, + ResourceModulePatch, +} from '../../orm/input-types'; +/** + * Mutation hook for updating a ResourceModule + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateResourceModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', resourceModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateResourceModuleMutation( + params: { + selection: { + fields: S & ResourceModuleSelect; + } & HookStrictSelect, ResourceModuleSelect>; + } & Omit< + UseMutationOptions< + { + updateResourceModule: { + resourceModule: InferSelectResult; + }; + }, + Error, + { + id: string; + resourceModulePatch: ResourceModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateResourceModule: { + resourceModule: InferSelectResult; + }; + }, + Error, + { + id: string; + resourceModulePatch: ResourceModulePatch; + } +>; +export function useUpdateResourceModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + resourceModulePatch: ResourceModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: resourceModuleMutationKeys.all, + mutationFn: ({ + id, + resourceModulePatch, + }: { + id: string; + resourceModulePatch: ResourceModulePatch; + }) => + getClient() + .resourceModule.update({ + where: { + id, + }, + data: resourceModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: resourceModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: resourceModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/index.ts b/sdk/constructive-react/src/modules/hooks/queries/index.ts index b3cd4d97da..415dd7613b 100644 --- a/sdk/constructive-react/src/modules/hooks/queries/index.ts +++ b/sdk/constructive-react/src/modules/hooks/queries/index.ts @@ -55,14 +55,14 @@ export * from './useSessionsModulesQuery'; export * from './useSessionsModuleQuery'; export * from './useSecureTableProvisionsQuery'; export * from './useSecureTableProvisionQuery'; -export * from './useMerkleStoreModulesQuery'; -export * from './useMerkleStoreModuleQuery'; -export * from './useGraphModulesQuery'; -export * from './useGraphModuleQuery'; export * from './useDatabaseProvisionModulesQuery'; export * from './useDatabaseProvisionModuleQuery'; export * from './useConfigSecretsModulesQuery'; export * from './useConfigSecretsModuleQuery'; +export * from './useGraphModulesQuery'; +export * from './useGraphModuleQuery'; +export * from './useMerkleStoreModulesQuery'; +export * from './useMerkleStoreModuleQuery'; export * from './useRateLimitMetersModulesQuery'; export * from './useRateLimitMetersModuleQuery'; export * from './useRealtimeModulesQuery'; @@ -75,12 +75,16 @@ export * from './useFunctionModulesQuery'; export * from './useFunctionModuleQuery'; export * from './useInvitesModulesQuery'; export * from './useInvitesModuleQuery'; +export * from './usePrincipalAuthModulesQuery'; +export * from './usePrincipalAuthModuleQuery'; export * from './useComputeLogModulesQuery'; export * from './useComputeLogModuleQuery'; export * from './useInferenceLogModulesQuery'; export * from './useInferenceLogModuleQuery'; export * from './useNamespaceModulesQuery'; export * from './useNamespaceModuleQuery'; +export * from './useResourceModulesQuery'; +export * from './useResourceModuleQuery'; export * from './useStorageLogModulesQuery'; export * from './useStorageLogModuleQuery'; export * from './useTransferLogModulesQuery'; diff --git a/sdk/constructive-react/src/modules/hooks/queries/usePrincipalAuthModuleQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/usePrincipalAuthModuleQuery.ts new file mode 100644 index 0000000000..d91f4a3ad2 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/usePrincipalAuthModuleQuery.ts @@ -0,0 +1,144 @@ +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * @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 { principalAuthModuleKeys } from '../query-keys'; +import type { + PrincipalAuthModuleSelect, + PrincipalAuthModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PrincipalAuthModuleSelect, + PrincipalAuthModuleWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const principalAuthModuleQueryKey = principalAuthModuleKeys.detail; +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * + * @example + * ```tsx + * const { data, isLoading } = usePrincipalAuthModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePrincipalAuthModuleQuery< + S extends PrincipalAuthModuleSelect, + TData = { + principalAuthModule: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalAuthModuleSelect>; + } & Omit< + UseQueryOptions< + { + principalAuthModule: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePrincipalAuthModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: principalAuthModuleKeys.detail(params.id), + queryFn: () => + getClient() + .principalAuthModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * + * @example + * ```ts + * const data = await fetchPrincipalAuthModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPrincipalAuthModuleQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalAuthModuleSelect>; +}): Promise<{ + principalAuthModule: InferSelectResult | null; +}>; +export async function fetchPrincipalAuthModuleQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .principalAuthModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * + * @example + * ```ts + * await prefetchPrincipalAuthModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPrincipalAuthModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PrincipalAuthModuleSelect>; + } +): Promise; +export async function prefetchPrincipalAuthModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: principalAuthModuleKeys.detail(params.id), + queryFn: () => + getClient() + .principalAuthModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/usePrincipalAuthModulesQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/usePrincipalAuthModulesQuery.ts new file mode 100644 index 0000000000..bacae75203 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/usePrincipalAuthModulesQuery.ts @@ -0,0 +1,174 @@ +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * @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 { principalAuthModuleKeys } from '../query-keys'; +import type { + PrincipalAuthModuleSelect, + PrincipalAuthModuleWithRelations, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PrincipalAuthModuleSelect, + PrincipalAuthModuleWithRelations, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const principalAuthModulesQueryKey = principalAuthModuleKeys.list; +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * + * @example + * ```tsx + * const { data, isLoading } = usePrincipalAuthModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePrincipalAuthModulesQuery< + S extends PrincipalAuthModuleSelect, + TData = { + principalAuthModules: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PrincipalAuthModuleSelect>; + } & Omit< + UseQueryOptions< + { + principalAuthModules: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePrincipalAuthModulesQuery( + params: { + selection: ListSelectionConfig< + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: principalAuthModuleKeys.list(args), + queryFn: () => getClient().principalAuthModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * + * @example + * ```ts + * const data = await fetchPrincipalAuthModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPrincipalAuthModulesQuery(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PrincipalAuthModuleSelect>; +}): Promise<{ + principalAuthModules: ConnectionResult>; +}>; +export async function fetchPrincipalAuthModulesQuery(params: { + selection: ListSelectionConfig< + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy + >; +}) { + const args = buildListSelectionArgs< + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy + >(params.selection); + return getClient().principalAuthModule.findMany(args).unwrap(); +} +/** + * Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. + * + * @example + * ```ts + * await prefetchPrincipalAuthModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPrincipalAuthModulesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PrincipalAuthModuleSelect>; + } +): Promise; +export async function prefetchPrincipalAuthModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: principalAuthModuleKeys.list(args), + queryFn: () => getClient().principalAuthModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useResourceModuleQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useResourceModuleQuery.ts new file mode 100644 index 0000000000..92a01be019 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useResourceModuleQuery.ts @@ -0,0 +1,138 @@ +/** + * Single item query hook for ResourceModule + * @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 { resourceModuleKeys } from '../query-keys'; +import type { ResourceModuleSelect, ResourceModuleWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ResourceModuleSelect, ResourceModuleWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const resourceModuleQueryKey = resourceModuleKeys.detail; +/** + * Query hook for fetching a single ResourceModule + * + * @example + * ```tsx + * const { data, isLoading } = useResourceModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useResourceModuleQuery< + S extends ResourceModuleSelect, + TData = { + resourceModule: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ResourceModuleSelect>; + } & Omit< + UseQueryOptions< + { + resourceModule: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useResourceModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: resourceModuleKeys.detail(params.id), + queryFn: () => + getClient() + .resourceModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single ResourceModule without React hooks + * + * @example + * ```ts + * const data = await fetchResourceModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchResourceModuleQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ResourceModuleSelect>; +}): Promise<{ + resourceModule: InferSelectResult | null; +}>; +export async function fetchResourceModuleQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .resourceModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single ResourceModule for SSR or cache warming + * + * @example + * ```ts + * await prefetchResourceModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchResourceModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ResourceModuleSelect>; + } +): Promise; +export async function prefetchResourceModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: resourceModuleKeys.detail(params.id), + queryFn: () => + getClient() + .resourceModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useResourceModulesQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useResourceModulesQuery.ts new file mode 100644 index 0000000000..c9728398e1 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useResourceModulesQuery.ts @@ -0,0 +1,159 @@ +/** + * List query hook for ResourceModule + * @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 { resourceModuleKeys } from '../query-keys'; +import type { + ResourceModuleSelect, + ResourceModuleWithRelations, + ResourceModuleFilter, + ResourceModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + ResourceModuleSelect, + ResourceModuleWithRelations, + ResourceModuleFilter, + ResourceModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const resourceModulesQueryKey = resourceModuleKeys.list; +/** + * Query hook for fetching ResourceModule list + * + * @example + * ```tsx + * const { data, isLoading } = useResourceModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useResourceModulesQuery< + S extends ResourceModuleSelect, + TData = { + resourceModules: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ResourceModuleSelect>; + } & Omit< + UseQueryOptions< + { + resourceModules: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useResourceModulesQuery( + params: { + selection: ListSelectionConfig< + ResourceModuleSelect, + ResourceModuleFilter, + ResourceModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + ResourceModuleSelect, + ResourceModuleFilter, + ResourceModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: resourceModuleKeys.list(args), + queryFn: () => getClient().resourceModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch ResourceModule list without React hooks + * + * @example + * ```ts + * const data = await fetchResourceModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchResourceModulesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ResourceModuleSelect>; +}): Promise<{ + resourceModules: ConnectionResult>; +}>; +export async function fetchResourceModulesQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs< + ResourceModuleSelect, + ResourceModuleFilter, + ResourceModuleOrderBy + >(params.selection); + return getClient().resourceModule.findMany(args).unwrap(); +} +/** + * Prefetch ResourceModule list for SSR or cache warming + * + * @example + * ```ts + * await prefetchResourceModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchResourceModulesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ResourceModuleSelect>; + } +): Promise; +export async function prefetchResourceModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + ResourceModuleSelect, + ResourceModuleFilter, + ResourceModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + ResourceModuleSelect, + ResourceModuleFilter, + ResourceModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: resourceModuleKeys.list(args), + queryFn: () => getClient().resourceModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/query-keys.ts b/sdk/constructive-react/src/modules/hooks/query-keys.ts index a0a26278e1..56e8c63a8a 100644 --- a/sdk/constructive-react/src/modules/hooks/query-keys.ts +++ b/sdk/constructive-react/src/modules/hooks/query-keys.ts @@ -253,24 +253,6 @@ export const secureTableProvisionKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...secureTableProvisionKeys.details(), id] as const, } as const; -export const merkleStoreModuleKeys = { - /** All merkleStoreModule queries */ all: ['merklestoremodule'] as const, - /** List query keys */ lists: () => [...merkleStoreModuleKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...merkleStoreModuleKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...merkleStoreModuleKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...merkleStoreModuleKeys.details(), id] as const, -} as const; -export const graphModuleKeys = { - /** All graphModule queries */ all: ['graphmodule'] as const, - /** List query keys */ lists: () => [...graphModuleKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...graphModuleKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...graphModuleKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...graphModuleKeys.details(), id] as const, -} as const; export const databaseProvisionModuleKeys = { /** All databaseProvisionModule queries */ all: ['databaseprovisionmodule'] as const, /** List query keys */ lists: () => [...databaseProvisionModuleKeys.all, 'list'] as const, @@ -289,6 +271,24 @@ export const configSecretsModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...configSecretsModuleKeys.details(), id] as const, } as const; +export const graphModuleKeys = { + /** All graphModule queries */ all: ['graphmodule'] as const, + /** List query keys */ lists: () => [...graphModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...graphModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...graphModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...graphModuleKeys.details(), id] as const, +} as const; +export const merkleStoreModuleKeys = { + /** All merkleStoreModule queries */ all: ['merklestoremodule'] as const, + /** List query keys */ lists: () => [...merkleStoreModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...merkleStoreModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...merkleStoreModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...merkleStoreModuleKeys.details(), id] as const, +} as const; export const rateLimitMetersModuleKeys = { /** All rateLimitMetersModule queries */ all: ['ratelimitmetersmodule'] as const, /** List query keys */ lists: () => [...rateLimitMetersModuleKeys.all, 'list'] as const, @@ -343,6 +343,15 @@ export const invitesModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...invitesModuleKeys.details(), id] as const, } as const; +export const principalAuthModuleKeys = { + /** All principalAuthModule queries */ all: ['principalauthmodule'] as const, + /** List query keys */ lists: () => [...principalAuthModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...principalAuthModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...principalAuthModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...principalAuthModuleKeys.details(), id] as const, +} as const; export const computeLogModuleKeys = { /** All computeLogModule queries */ all: ['computelogmodule'] as const, /** List query keys */ lists: () => [...computeLogModuleKeys.all, 'list'] as const, @@ -370,6 +379,15 @@ export const namespaceModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...namespaceModuleKeys.details(), id] as const, } as const; +export const resourceModuleKeys = { + /** All resourceModule queries */ all: ['resourcemodule'] as const, + /** List query keys */ lists: () => [...resourceModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...resourceModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...resourceModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...resourceModuleKeys.details(), id] as const, +} as const; export const storageLogModuleKeys = { /** All storageLogModule queries */ all: ['storagelogmodule'] as const, /** List query keys */ lists: () => [...storageLogModuleKeys.all, 'list'] as const, @@ -610,19 +628,21 @@ export const queryKeys = { cryptoAuthModule: cryptoAuthModuleKeys, sessionsModule: sessionsModuleKeys, secureTableProvision: secureTableProvisionKeys, - merkleStoreModule: merkleStoreModuleKeys, - graphModule: graphModuleKeys, databaseProvisionModule: databaseProvisionModuleKeys, configSecretsModule: configSecretsModuleKeys, + graphModule: graphModuleKeys, + merkleStoreModule: merkleStoreModuleKeys, rateLimitMetersModule: rateLimitMetersModuleKeys, realtimeModule: realtimeModuleKeys, webauthnAuthModule: webauthnAuthModuleKeys, functionInvocationModule: functionInvocationModuleKeys, functionModule: functionModuleKeys, invitesModule: invitesModuleKeys, + principalAuthModule: principalAuthModuleKeys, computeLogModule: computeLogModuleKeys, inferenceLogModule: inferenceLogModuleKeys, namespaceModule: namespaceModuleKeys, + resourceModule: resourceModuleKeys, storageLogModule: storageLogModuleKeys, transferLogModule: transferLogModuleKeys, functionDeploymentModule: functionDeploymentModuleKeys, diff --git a/sdk/constructive-react/src/modules/orm/README.md b/sdk/constructive-react/src/modules/orm/README.md index 495d56755f..90e60f2bd9 100644 --- a/sdk/constructive-react/src/modules/orm/README.md +++ b/sdk/constructive-react/src/modules/orm/README.md @@ -47,19 +47,21 @@ const db = createClient({ | `cryptoAuthModule` | findMany, findOne, create, update, delete | | `sessionsModule` | findMany, findOne, create, update, delete | | `secureTableProvision` | findMany, findOne, create, update, delete | -| `merkleStoreModule` | findMany, findOne, create, update, delete | -| `graphModule` | findMany, findOne, create, update, delete | | `databaseProvisionModule` | findMany, findOne, create, update, delete | | `configSecretsModule` | findMany, findOne, create, update, delete | +| `graphModule` | findMany, findOne, create, update, delete | +| `merkleStoreModule` | findMany, findOne, create, update, delete | | `rateLimitMetersModule` | findMany, findOne, create, update, delete | | `realtimeModule` | findMany, findOne, create, update, delete | | `webauthnAuthModule` | findMany, findOne, create, update, delete | | `functionInvocationModule` | findMany, findOne, create, update, delete | | `functionModule` | findMany, findOne, create, update, delete | | `invitesModule` | findMany, findOne, create, update, delete | +| `principalAuthModule` | findMany, findOne, create, update, delete | | `computeLogModule` | findMany, findOne, create, update, delete | | `inferenceLogModule` | findMany, findOne, create, update, delete | | `namespaceModule` | findMany, findOne, create, update, delete | +| `resourceModule` | findMany, findOne, create, update, delete | | `storageLogModule` | findMany, findOne, create, update, delete | | `transferLogModule` | findMany, findOne, create, update, delete | | `functionDeploymentModule` | findMany, findOne, create, update, delete | @@ -1053,53 +1055,51 @@ const updated = await db.secureTableProvision.update({ where: { id: '' }, const deleted = await db.secureTableProvision.delete({ where: { id: '' } }).execute(); ``` -### `db.merkleStoreModule` +### `db.databaseProvisionModule` -CRUD operations for MerkleStoreModule records. +CRUD operations for DatabaseProvisionModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | +| `databaseName` | String | Yes | +| `ownerId` | UUID | Yes | +| `subdomain` | String | Yes | +| `domain` | String | Yes | +| `modules` | JSON | Yes | +| `options` | JSON | Yes | +| `bootstrapUser` | Boolean | Yes | +| `status` | String | Yes | +| `errorMessage` | String | Yes | | `databaseId` | UUID | Yes | -| `schemaId` | UUID | Yes | -| `privateSchemaId` | UUID | Yes | -| `publicSchemaName` | String | Yes | -| `privateSchemaName` | String | Yes | -| `objectTableId` | UUID | Yes | -| `storeTableId` | UUID | Yes | -| `commitTableId` | UUID | Yes | -| `refTableId` | UUID | Yes | -| `prefix` | String | Yes | -| `apiName` | String | Yes | -| `privateApiName` | String | Yes | -| `scope` | String | Yes | -| `functionPrefix` | String | Yes | | `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `completedAt` | Datetime | Yes | **Operations:** ```typescript -// List all merkleStoreModule records -const items = await db.merkleStoreModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, createdAt: true } }).execute(); +// List all databaseProvisionModule records +const items = await db.databaseProvisionModule.findMany({ select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); // Get one by id -const item = await db.merkleStoreModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, createdAt: true } }).execute(); +const item = await db.databaseProvisionModule.findOne({ id: '', select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); // Create -const created = await db.merkleStoreModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '' }, select: { id: true } }).execute(); +const created = await db.databaseProvisionModule.create({ data: { databaseName: '', ownerId: '', subdomain: '', domain: '', modules: '', options: '', bootstrapUser: '', status: '', errorMessage: '', databaseId: '', completedAt: '' }, select: { id: true } }).execute(); // Update -const updated = await db.merkleStoreModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.databaseProvisionModule.update({ where: { id: '' }, data: { databaseName: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.merkleStoreModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.databaseProvisionModule.delete({ where: { id: '' } }).execute(); ``` -### `db.graphModule` +### `db.configSecretsModule` -CRUD operations for GraphModule records. +CRUD operations for ConfigSecretsModule records. **Fields:** @@ -1107,86 +1107,89 @@ CRUD operations for GraphModule records. |-------|------|----------| | `id` | UUID | No | | `databaseId` | UUID | Yes | -| `publicSchemaId` | UUID | Yes | +| `schemaId` | UUID | Yes | | `privateSchemaId` | UUID | Yes | | `publicSchemaName` | String | Yes | | `privateSchemaName` | String | Yes | -| `scope` | String | Yes | -| `prefix` | String | Yes | -| `merkleStoreModuleId` | UUID | Yes | -| `graphsTableId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `configDefinitionsTableId` | UUID | Yes | +| `tableName` | String | Yes | | `apiName` | String | Yes | | `privateApiName` | String | Yes | +| `scope` | String | Yes | +| `prefix` | String | Yes | | `entityTableId` | UUID | Yes | | `policies` | JSON | Yes | | `provisions` | JSON | Yes | -| `defaultPermissions` | String | Yes | -| `createdAt` | Datetime | No | +| `hasConfig` | Boolean | Yes | **Operations:** ```typescript -// List all graphModule records -const items = await db.graphModule.findMany({ select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); +// List all configSecretsModule records +const items = await db.configSecretsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); // Get one by id -const item = await db.graphModule.findOne({ id: '', select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); +const item = await db.configSecretsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); // Create -const created = await db.graphModule.create({ data: { databaseId: '', publicSchemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', scope: '', prefix: '', merkleStoreModuleId: '', graphsTableId: '', apiName: '', privateApiName: '', entityTableId: '', policies: '', provisions: '', defaultPermissions: '' }, select: { id: true } }).execute(); +const created = await db.configSecretsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', tableId: '', configDefinitionsTableId: '', tableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', policies: '', provisions: '', hasConfig: '' }, select: { id: true } }).execute(); // Update -const updated = await db.graphModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.configSecretsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.graphModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.configSecretsModule.delete({ where: { id: '' } }).execute(); ``` -### `db.databaseProvisionModule` +### `db.graphModule` -CRUD operations for DatabaseProvisionModule records. +CRUD operations for GraphModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | -| `databaseName` | String | Yes | -| `ownerId` | UUID | Yes | -| `subdomain` | String | Yes | -| `domain` | String | Yes | -| `modules` | JSON | Yes | -| `options` | JSON | Yes | -| `bootstrapUser` | Boolean | Yes | -| `status` | String | Yes | -| `errorMessage` | String | Yes | | `databaseId` | UUID | Yes | +| `publicSchemaId` | UUID | Yes | +| `privateSchemaId` | UUID | Yes | +| `publicSchemaName` | String | Yes | +| `privateSchemaName` | String | Yes | +| `scope` | String | Yes | +| `prefix` | String | Yes | +| `merkleStoreModuleId` | UUID | Yes | +| `graphsTableId` | UUID | Yes | +| `apiName` | String | Yes | +| `privateApiName` | String | Yes | +| `entityTableId` | UUID | Yes | +| `policies` | JSON | Yes | +| `provisions` | JSON | Yes | +| `defaultPermissions` | String | Yes | | `createdAt` | Datetime | No | -| `updatedAt` | Datetime | No | -| `completedAt` | Datetime | Yes | **Operations:** ```typescript -// List all databaseProvisionModule records -const items = await db.databaseProvisionModule.findMany({ select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); +// List all graphModule records +const items = await db.graphModule.findMany({ select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); // Get one by id -const item = await db.databaseProvisionModule.findOne({ id: '', select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); +const item = await db.graphModule.findOne({ id: '', select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); // Create -const created = await db.databaseProvisionModule.create({ data: { databaseName: '', ownerId: '', subdomain: '', domain: '', modules: '', options: '', bootstrapUser: '', status: '', errorMessage: '', databaseId: '', completedAt: '' }, select: { id: true } }).execute(); +const created = await db.graphModule.create({ data: { databaseId: '', publicSchemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', scope: '', prefix: '', merkleStoreModuleId: '', graphsTableId: '', apiName: '', privateApiName: '', entityTableId: '', policies: '', provisions: '', defaultPermissions: '' }, select: { id: true } }).execute(); // Update -const updated = await db.databaseProvisionModule.update({ where: { id: '' }, data: { databaseName: '' }, select: { id: true } }).execute(); +const updated = await db.graphModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.databaseProvisionModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.graphModule.delete({ where: { id: '' } }).execute(); ``` -### `db.configSecretsModule` +### `db.merkleStoreModule` -CRUD operations for ConfigSecretsModule records. +CRUD operations for MerkleStoreModule records. **Fields:** @@ -1198,35 +1201,35 @@ CRUD operations for ConfigSecretsModule records. | `privateSchemaId` | UUID | Yes | | `publicSchemaName` | String | Yes | | `privateSchemaName` | String | Yes | -| `tableId` | UUID | Yes | -| `configDefinitionsTableId` | UUID | Yes | -| `tableName` | String | Yes | +| `objectTableId` | UUID | Yes | +| `storeTableId` | UUID | Yes | +| `commitTableId` | UUID | Yes | +| `refTableId` | UUID | Yes | +| `prefix` | String | Yes | | `apiName` | String | Yes | | `privateApiName` | String | Yes | | `scope` | String | Yes | -| `prefix` | String | Yes | -| `entityTableId` | UUID | Yes | -| `policies` | JSON | Yes | -| `provisions` | JSON | Yes | -| `hasConfig` | Boolean | Yes | +| `functionPrefix` | String | Yes | +| `permissionKey` | String | Yes | +| `createdAt` | Datetime | No | **Operations:** ```typescript -// List all configSecretsModule records -const items = await db.configSecretsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); +// List all merkleStoreModule records +const items = await db.merkleStoreModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, permissionKey: true, createdAt: true } }).execute(); // Get one by id -const item = await db.configSecretsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); +const item = await db.merkleStoreModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, permissionKey: true, createdAt: true } }).execute(); // Create -const created = await db.configSecretsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', tableId: '', configDefinitionsTableId: '', tableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', policies: '', provisions: '', hasConfig: '' }, select: { id: true } }).execute(); +const created = await db.merkleStoreModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '', permissionKey: '' }, select: { id: true } }).execute(); // Update -const updated = await db.configSecretsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.merkleStoreModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.configSecretsModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.merkleStoreModule.delete({ where: { id: '' } }).execute(); ``` ### `db.rateLimitMetersModule` @@ -1498,6 +1501,52 @@ const updated = await db.invitesModule.update({ where: { id: '' }, data: { const deleted = await db.invitesModule.delete({ where: { id: '' } }).execute(); ``` +### `db.principalAuthModule` + +CRUD operations for PrincipalAuthModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `principalsTableId` | UUID | Yes | +| `principalEntitiesTableId` | UUID | Yes | +| `principalScopeOverridesTableId` | UUID | Yes | +| `usersTableId` | UUID | Yes | +| `sessionsTableId` | UUID | Yes | +| `sessionCredentialsTableId` | UUID | Yes | +| `auditsTableId` | UUID | Yes | +| `principalsTableName` | String | Yes | +| `createPrincipalFunction` | String | Yes | +| `deletePrincipalFunction` | String | Yes | +| `createOrgPrincipalFunction` | String | Yes | +| `deleteOrgPrincipalFunction` | String | Yes | +| `createOrgApiKeyFunction` | String | Yes | +| `revokeOrgApiKeyFunction` | String | Yes | +| `apiName` | String | Yes | + +**Operations:** + +```typescript +// List all principalAuthModule records +const items = await db.principalAuthModule.findMany({ select: { id: true, databaseId: true, schemaId: true, principalsTableId: true, principalEntitiesTableId: true, principalScopeOverridesTableId: true, usersTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, principalsTableName: true, createPrincipalFunction: true, deletePrincipalFunction: true, createOrgPrincipalFunction: true, deleteOrgPrincipalFunction: true, createOrgApiKeyFunction: true, revokeOrgApiKeyFunction: true, apiName: true } }).execute(); + +// Get one by id +const item = await db.principalAuthModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, principalsTableId: true, principalEntitiesTableId: true, principalScopeOverridesTableId: true, usersTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, principalsTableName: true, createPrincipalFunction: true, deletePrincipalFunction: true, createOrgPrincipalFunction: true, deleteOrgPrincipalFunction: true, createOrgApiKeyFunction: true, revokeOrgApiKeyFunction: true, apiName: true } }).execute(); + +// Create +const created = await db.principalAuthModule.create({ data: { databaseId: '', schemaId: '', principalsTableId: '', principalEntitiesTableId: '', principalScopeOverridesTableId: '', usersTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', principalsTableName: '', createPrincipalFunction: '', deletePrincipalFunction: '', createOrgPrincipalFunction: '', deleteOrgPrincipalFunction: '', createOrgApiKeyFunction: '', revokeOrgApiKeyFunction: '', apiName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.principalAuthModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.principalAuthModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.computeLogModule` CRUD operations for ComputeLogModule records. @@ -1639,6 +1688,53 @@ const updated = await db.namespaceModule.update({ where: { id: '' }, data: const deleted = await db.namespaceModule.delete({ where: { id: '' } }).execute(); ``` +### `db.resourceModule` + +CRUD operations for ResourceModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `privateSchemaId` | UUID | Yes | +| `publicSchemaName` | String | Yes | +| `privateSchemaName` | String | Yes | +| `resourcesTableId` | UUID | Yes | +| `resourceEventsTableId` | UUID | Yes | +| `resourcesTableName` | String | Yes | +| `resourceEventsTableName` | String | Yes | +| `apiName` | String | Yes | +| `privateApiName` | String | Yes | +| `scope` | String | Yes | +| `prefix` | String | Yes | +| `entityTableId` | UUID | Yes | +| `namespaceModuleId` | UUID | Yes | +| `policies` | JSON | Yes | +| `provisions` | JSON | Yes | +| `defaultPermissions` | String | Yes | + +**Operations:** + +```typescript +// List all resourceModule records +const items = await db.resourceModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, resourcesTableId: true, resourceEventsTableId: true, resourcesTableName: true, resourceEventsTableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, namespaceModuleId: true, policies: true, provisions: true, defaultPermissions: true } }).execute(); + +// Get one by id +const item = await db.resourceModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, resourcesTableId: true, resourceEventsTableId: true, resourcesTableName: true, resourceEventsTableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, namespaceModuleId: true, policies: true, provisions: true, defaultPermissions: true } }).execute(); + +// Create +const created = await db.resourceModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', resourcesTableId: '', resourceEventsTableId: '', resourcesTableName: '', resourceEventsTableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', namespaceModuleId: '', policies: '', provisions: '', defaultPermissions: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.resourceModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.resourceModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.storageLogModule` CRUD operations for StorageLogModule records. diff --git a/sdk/constructive-react/src/modules/orm/index.ts b/sdk/constructive-react/src/modules/orm/index.ts index 7c5a882c52..c425b183cd 100644 --- a/sdk/constructive-react/src/modules/orm/index.ts +++ b/sdk/constructive-react/src/modules/orm/index.ts @@ -31,19 +31,21 @@ import { BlueprintConstructionModel } from './models/blueprintConstruction'; import { CryptoAuthModuleModel } from './models/cryptoAuthModule'; import { SessionsModuleModel } from './models/sessionsModule'; import { SecureTableProvisionModel } from './models/secureTableProvision'; -import { MerkleStoreModuleModel } from './models/merkleStoreModule'; -import { GraphModuleModel } from './models/graphModule'; import { DatabaseProvisionModuleModel } from './models/databaseProvisionModule'; import { ConfigSecretsModuleModel } from './models/configSecretsModule'; +import { GraphModuleModel } from './models/graphModule'; +import { MerkleStoreModuleModel } from './models/merkleStoreModule'; import { RateLimitMetersModuleModel } from './models/rateLimitMetersModule'; import { RealtimeModuleModel } from './models/realtimeModule'; import { WebauthnAuthModuleModel } from './models/webauthnAuthModule'; import { FunctionInvocationModuleModel } from './models/functionInvocationModule'; import { FunctionModuleModel } from './models/functionModule'; import { InvitesModuleModel } from './models/invitesModule'; +import { PrincipalAuthModuleModel } from './models/principalAuthModule'; import { ComputeLogModuleModel } from './models/computeLogModule'; import { InferenceLogModuleModel } from './models/inferenceLogModule'; import { NamespaceModuleModel } from './models/namespaceModule'; +import { ResourceModuleModel } from './models/resourceModule'; import { StorageLogModuleModel } from './models/storageLogModule'; import { TransferLogModuleModel } from './models/transferLogModule'; import { FunctionDeploymentModuleModel } from './models/functionDeploymentModule'; @@ -125,19 +127,21 @@ export function createClient(config: OrmClientConfig) { cryptoAuthModule: new CryptoAuthModuleModel(client), sessionsModule: new SessionsModuleModel(client), secureTableProvision: new SecureTableProvisionModel(client), - merkleStoreModule: new MerkleStoreModuleModel(client), - graphModule: new GraphModuleModel(client), databaseProvisionModule: new DatabaseProvisionModuleModel(client), configSecretsModule: new ConfigSecretsModuleModel(client), + graphModule: new GraphModuleModel(client), + merkleStoreModule: new MerkleStoreModuleModel(client), rateLimitMetersModule: new RateLimitMetersModuleModel(client), realtimeModule: new RealtimeModuleModel(client), webauthnAuthModule: new WebauthnAuthModuleModel(client), functionInvocationModule: new FunctionInvocationModuleModel(client), functionModule: new FunctionModuleModel(client), invitesModule: new InvitesModuleModel(client), + principalAuthModule: new PrincipalAuthModuleModel(client), computeLogModule: new ComputeLogModuleModel(client), inferenceLogModule: new InferenceLogModuleModel(client), namespaceModule: new NamespaceModuleModel(client), + resourceModule: new ResourceModuleModel(client), storageLogModule: new StorageLogModuleModel(client), transferLogModule: new TransferLogModuleModel(client), functionDeploymentModule: new FunctionDeploymentModuleModel(client), diff --git a/sdk/constructive-react/src/modules/orm/input-types.ts b/sdk/constructive-react/src/modules/orm/input-types.ts index ddd8bf6a34..2a57e98f03 100644 --- a/sdk/constructive-react/src/modules/orm/input-types.ts +++ b/sdk/constructive-react/src/modules/orm/input-types.ts @@ -606,43 +606,6 @@ export interface SecureTableProvision { /** Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. */ outFields?: string[] | null; } -export interface MerkleStoreModule { - id: string; - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - objectTableId?: string | null; - storeTableId?: string | null; - commitTableId?: string | null; - refTableId?: string | null; - prefix?: string | null; - apiName?: string | null; - privateApiName?: string | null; - scope?: string | null; - functionPrefix?: string | null; - createdAt?: string | null; -} -export interface GraphModule { - id: string; - databaseId?: string | null; - publicSchemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - scope?: string | null; - prefix?: string | null; - merkleStoreModuleId?: string | null; - graphsTableId?: string | null; - apiName?: string | null; - privateApiName?: string | null; - entityTableId?: string | null; - policies?: Record | null; - provisions?: Record | null; - defaultPermissions?: string[] | null; - createdAt?: string | null; -} /** Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. */ export interface DatabaseProvisionModule { id: string; @@ -693,6 +656,44 @@ export interface ConfigSecretsModule { provisions?: Record | null; hasConfig?: boolean | null; } +export interface GraphModule { + id: string; + databaseId?: string | null; + publicSchemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + scope?: string | null; + prefix?: string | null; + merkleStoreModuleId?: string | null; + graphsTableId?: string | null; + apiName?: string | null; + privateApiName?: string | null; + entityTableId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; + createdAt?: string | null; +} +export interface MerkleStoreModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + objectTableId?: string | null; + storeTableId?: string | null; + commitTableId?: string | null; + refTableId?: string | null; + prefix?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + functionPrefix?: string | null; + permissionKey?: string | null; + createdAt?: string | null; +} export interface RateLimitMetersModule { id: string; databaseId?: string | null; @@ -806,6 +807,27 @@ export interface InvitesModule { apiName?: string | null; privateApiName?: string | null; } +/** Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. */ +export interface PrincipalAuthModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + principalsTableId?: string | null; + principalEntitiesTableId?: string | null; + principalScopeOverridesTableId?: string | null; + usersTableId?: string | null; + sessionsTableId?: string | null; + sessionCredentialsTableId?: string | null; + auditsTableId?: string | null; + principalsTableName?: string | null; + createPrincipalFunction?: string | null; + deletePrincipalFunction?: string | null; + createOrgPrincipalFunction?: string | null; + deleteOrgPrincipalFunction?: string | null; + createOrgApiKeyFunction?: string | null; + revokeOrgApiKeyFunction?: string | null; + apiName?: string | null; +} export interface ComputeLogModule { id: string; databaseId?: string | null; @@ -869,6 +891,27 @@ export interface NamespaceModule { provisions?: Record | null; defaultPermissions?: string[] | null; } +export interface ResourceModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + resourcesTableId?: string | null; + resourceEventsTableId?: string | null; + resourcesTableName?: string | null; + resourceEventsTableName?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + prefix?: string | null; + entityTableId?: string | null; + namespaceModuleId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; +} export interface StorageLogModule { id: string; databaseId?: string | null; @@ -1831,23 +1874,27 @@ export interface BlueprintConstructionRelations { export interface CryptoAuthModuleRelations {} export interface SessionsModuleRelations {} export interface SecureTableProvisionRelations {} -export interface MerkleStoreModuleRelations { - graphModules?: ConnectionResult; -} +export interface DatabaseProvisionModuleRelations {} +export interface ConfigSecretsModuleRelations {} export interface GraphModuleRelations { merkleStoreModule?: MerkleStoreModule | null; } -export interface DatabaseProvisionModuleRelations {} -export interface ConfigSecretsModuleRelations {} +export interface MerkleStoreModuleRelations { + graphModules?: ConnectionResult; +} export interface RateLimitMetersModuleRelations {} export interface RealtimeModuleRelations {} export interface WebauthnAuthModuleRelations {} export interface FunctionInvocationModuleRelations {} export interface FunctionModuleRelations {} export interface InvitesModuleRelations {} +export interface PrincipalAuthModuleRelations {} export interface ComputeLogModuleRelations {} export interface InferenceLogModuleRelations {} export interface NamespaceModuleRelations {} +export interface ResourceModuleRelations { + namespaceModule?: NamespaceModule | null; +} export interface StorageLogModuleRelations {} export interface TransferLogModuleRelations {} export interface FunctionDeploymentModuleRelations { @@ -1912,11 +1959,11 @@ export type CryptoAuthModuleWithRelations = CryptoAuthModule & CryptoAuthModuleR export type SessionsModuleWithRelations = SessionsModule & SessionsModuleRelations; export type SecureTableProvisionWithRelations = SecureTableProvision & SecureTableProvisionRelations; -export type MerkleStoreModuleWithRelations = MerkleStoreModule & MerkleStoreModuleRelations; -export type GraphModuleWithRelations = GraphModule & GraphModuleRelations; export type DatabaseProvisionModuleWithRelations = DatabaseProvisionModule & DatabaseProvisionModuleRelations; export type ConfigSecretsModuleWithRelations = ConfigSecretsModule & ConfigSecretsModuleRelations; +export type GraphModuleWithRelations = GraphModule & GraphModuleRelations; +export type MerkleStoreModuleWithRelations = MerkleStoreModule & MerkleStoreModuleRelations; export type RateLimitMetersModuleWithRelations = RateLimitMetersModule & RateLimitMetersModuleRelations; export type RealtimeModuleWithRelations = RealtimeModule & RealtimeModuleRelations; @@ -1925,9 +1972,11 @@ export type FunctionInvocationModuleWithRelations = FunctionInvocationModule & FunctionInvocationModuleRelations; export type FunctionModuleWithRelations = FunctionModule & FunctionModuleRelations; export type InvitesModuleWithRelations = InvitesModule & InvitesModuleRelations; +export type PrincipalAuthModuleWithRelations = PrincipalAuthModule & PrincipalAuthModuleRelations; export type ComputeLogModuleWithRelations = ComputeLogModule & ComputeLogModuleRelations; export type InferenceLogModuleWithRelations = InferenceLogModule & InferenceLogModuleRelations; export type NamespaceModuleWithRelations = NamespaceModule & NamespaceModuleRelations; +export type ResourceModuleWithRelations = ResourceModule & ResourceModuleRelations; export type StorageLogModuleWithRelations = StorageLogModule & StorageLogModuleRelations; export type TransferLogModuleWithRelations = TransferLogModule & TransferLogModuleRelations; export type FunctionDeploymentModuleWithRelations = FunctionDeploymentModule & @@ -2273,29 +2322,40 @@ export type SecureTableProvisionSelect = { policies?: boolean; outFields?: boolean; }; -export type MerkleStoreModuleSelect = { +export type DatabaseProvisionModuleSelect = { + id?: boolean; + databaseName?: boolean; + ownerId?: boolean; + subdomain?: boolean; + domain?: boolean; + modules?: boolean; + options?: boolean; + bootstrapUser?: boolean; + status?: boolean; + errorMessage?: boolean; + databaseId?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + completedAt?: boolean; +}; +export type ConfigSecretsModuleSelect = { id?: boolean; databaseId?: boolean; schemaId?: boolean; privateSchemaId?: boolean; publicSchemaName?: boolean; privateSchemaName?: boolean; - objectTableId?: boolean; - storeTableId?: boolean; - commitTableId?: boolean; - refTableId?: boolean; - prefix?: boolean; + tableId?: boolean; + configDefinitionsTableId?: boolean; + tableName?: boolean; apiName?: boolean; privateApiName?: boolean; scope?: boolean; - functionPrefix?: boolean; - createdAt?: boolean; - graphModules?: { - select: GraphModuleSelect; - first?: number; - filter?: GraphModuleFilter; - orderBy?: GraphModuleOrderBy[]; - }; + prefix?: boolean; + entityTableId?: boolean; + policies?: boolean; + provisions?: boolean; + hasConfig?: boolean; }; export type GraphModuleSelect = { id?: boolean; @@ -2319,40 +2379,30 @@ export type GraphModuleSelect = { select: MerkleStoreModuleSelect; }; }; -export type DatabaseProvisionModuleSelect = { - id?: boolean; - databaseName?: boolean; - ownerId?: boolean; - subdomain?: boolean; - domain?: boolean; - modules?: boolean; - options?: boolean; - bootstrapUser?: boolean; - status?: boolean; - errorMessage?: boolean; - databaseId?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - completedAt?: boolean; -}; -export type ConfigSecretsModuleSelect = { +export type MerkleStoreModuleSelect = { id?: boolean; databaseId?: boolean; schemaId?: boolean; privateSchemaId?: boolean; publicSchemaName?: boolean; privateSchemaName?: boolean; - tableId?: boolean; - configDefinitionsTableId?: boolean; - tableName?: boolean; + objectTableId?: boolean; + storeTableId?: boolean; + commitTableId?: boolean; + refTableId?: boolean; + prefix?: boolean; apiName?: boolean; privateApiName?: boolean; scope?: boolean; - prefix?: boolean; - entityTableId?: boolean; - policies?: boolean; - provisions?: boolean; - hasConfig?: boolean; + functionPrefix?: boolean; + permissionKey?: boolean; + createdAt?: boolean; + graphModules?: { + select: GraphModuleSelect; + first?: number; + filter?: GraphModuleFilter; + orderBy?: GraphModuleOrderBy[]; + }; }; export type RateLimitMetersModuleSelect = { id?: boolean; @@ -2467,6 +2517,26 @@ export type InvitesModuleSelect = { apiName?: boolean; privateApiName?: boolean; }; +export type PrincipalAuthModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + principalsTableId?: boolean; + principalEntitiesTableId?: boolean; + principalScopeOverridesTableId?: boolean; + usersTableId?: boolean; + sessionsTableId?: boolean; + sessionCredentialsTableId?: boolean; + auditsTableId?: boolean; + principalsTableName?: boolean; + createPrincipalFunction?: boolean; + deletePrincipalFunction?: boolean; + createOrgPrincipalFunction?: boolean; + deleteOrgPrincipalFunction?: boolean; + createOrgApiKeyFunction?: boolean; + revokeOrgApiKeyFunction?: boolean; + apiName?: boolean; +}; export type ComputeLogModuleSelect = { id?: boolean; databaseId?: boolean; @@ -2530,6 +2600,30 @@ export type NamespaceModuleSelect = { provisions?: boolean; defaultPermissions?: boolean; }; +export type ResourceModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + privateSchemaId?: boolean; + publicSchemaName?: boolean; + privateSchemaName?: boolean; + resourcesTableId?: boolean; + resourceEventsTableId?: boolean; + resourcesTableName?: boolean; + resourceEventsTableName?: boolean; + apiName?: boolean; + privateApiName?: boolean; + scope?: boolean; + prefix?: boolean; + entityTableId?: boolean; + namespaceModuleId?: boolean; + policies?: boolean; + provisions?: boolean; + defaultPermissions?: boolean; + namespaceModule?: { + select: NamespaceModuleSelect; + }; +}; export type StorageLogModuleSelect = { id?: boolean; databaseId?: boolean; @@ -3841,49 +3935,83 @@ export interface SecureTableProvisionFilter { /** Negates the expression. */ not?: SecureTableProvisionFilter; } -export interface MerkleStoreModuleFilter { +export interface DatabaseProvisionModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `databaseName` field. */ + databaseName?: StringFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `subdomain` field. */ + subdomain?: StringFilter; + /** Filter by the object’s `domain` field. */ + domain?: StringFilter; + /** Filter by the object’s `modules` field. */ + modules?: JSONFilter; + /** Filter by the object’s `options` field. */ + options?: JSONFilter; + /** Filter by the object’s `bootstrapUser` field. */ + bootstrapUser?: BooleanFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `errorMessage` field. */ + errorMessage?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `publicSchemaName` field. */ - publicSchemaName?: StringFilter; - /** Filter by the object’s `privateSchemaName` field. */ - privateSchemaName?: StringFilter; - /** Filter by the object’s `objectTableId` field. */ - objectTableId?: UUIDFilter; - /** Filter by the object’s `storeTableId` field. */ - storeTableId?: UUIDFilter; - /** Filter by the object’s `commitTableId` field. */ - commitTableId?: UUIDFilter; - /** Filter by the object’s `refTableId` field. */ - refTableId?: UUIDFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `completedAt` field. */ + completedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: DatabaseProvisionModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: DatabaseProvisionModuleFilter[]; + /** Negates the expression. */ + not?: DatabaseProvisionModuleFilter; +} +export interface ConfigSecretsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `configDefinitionsTableId` field. */ + configDefinitionsTableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; /** Filter by the object’s `privateApiName` field. */ privateApiName?: StringFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; - /** Filter by the object’s `functionPrefix` field. */ - functionPrefix?: StringFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `hasConfig` field. */ + hasConfig?: BooleanFilter; /** Checks for all expressions in this list. */ - and?: MerkleStoreModuleFilter[]; + and?: ConfigSecretsModuleFilter[]; /** Checks for any expressions in this list. */ - or?: MerkleStoreModuleFilter[]; + or?: ConfigSecretsModuleFilter[]; /** Negates the expression. */ - not?: MerkleStoreModuleFilter; - /** Filter by the object’s `graphModules` relation. */ - graphModules?: MerkleStoreModuleToManyGraphModuleFilter; - /** `graphModules` exist. */ - graphModulesExist?: boolean; + not?: ConfigSecretsModuleFilter; } export interface GraphModuleFilter { /** Filter by the object’s `id` field. */ @@ -3929,43 +4057,7 @@ export interface GraphModuleFilter { /** Filter by the object’s `merkleStoreModule` relation. */ merkleStoreModule?: MerkleStoreModuleFilter; } -export interface DatabaseProvisionModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseName` field. */ - databaseName?: StringFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `subdomain` field. */ - subdomain?: StringFilter; - /** Filter by the object’s `domain` field. */ - domain?: StringFilter; - /** Filter by the object’s `modules` field. */ - modules?: JSONFilter; - /** Filter by the object’s `options` field. */ - options?: JSONFilter; - /** Filter by the object’s `bootstrapUser` field. */ - bootstrapUser?: BooleanFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `errorMessage` field. */ - errorMessage?: StringFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `completedAt` field. */ - completedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: DatabaseProvisionModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: DatabaseProvisionModuleFilter[]; - /** Negates the expression. */ - not?: DatabaseProvisionModuleFilter; -} -export interface ConfigSecretsModuleFilter { +export interface MerkleStoreModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ @@ -3978,34 +4070,38 @@ export interface ConfigSecretsModuleFilter { publicSchemaName?: StringFilter; /** Filter by the object’s `privateSchemaName` field. */ privateSchemaName?: StringFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `configDefinitionsTableId` field. */ - configDefinitionsTableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; + /** Filter by the object’s `objectTableId` field. */ + objectTableId?: UUIDFilter; + /** Filter by the object’s `storeTableId` field. */ + storeTableId?: UUIDFilter; + /** Filter by the object’s `commitTableId` field. */ + commitTableId?: UUIDFilter; + /** Filter by the object’s `refTableId` field. */ + refTableId?: UUIDFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; /** Filter by the object’s `privateApiName` field. */ privateApiName?: StringFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; - /** Filter by the object’s `entityTableId` field. */ - entityTableId?: UUIDFilter; - /** Filter by the object’s `policies` field. */ - policies?: JSONFilter; - /** Filter by the object’s `provisions` field. */ - provisions?: JSONFilter; - /** Filter by the object’s `hasConfig` field. */ - hasConfig?: BooleanFilter; + /** Filter by the object’s `functionPrefix` field. */ + functionPrefix?: StringFilter; + /** Filter by the object’s `permissionKey` field. */ + permissionKey?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Checks for all expressions in this list. */ - and?: ConfigSecretsModuleFilter[]; + and?: MerkleStoreModuleFilter[]; /** Checks for any expressions in this list. */ - or?: ConfigSecretsModuleFilter[]; + or?: MerkleStoreModuleFilter[]; /** Negates the expression. */ - not?: ConfigSecretsModuleFilter; + not?: MerkleStoreModuleFilter; + /** Filter by the object’s `graphModules` relation. */ + graphModules?: MerkleStoreModuleToManyGraphModuleFilter; + /** `graphModules` exist. */ + graphModulesExist?: boolean; } export interface RateLimitMetersModuleFilter { /** Filter by the object’s `id` field. */ @@ -4257,6 +4353,50 @@ export interface InvitesModuleFilter { /** Negates the expression. */ not?: InvitesModuleFilter; } +export interface PrincipalAuthModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `principalsTableId` field. */ + principalsTableId?: UUIDFilter; + /** Filter by the object’s `principalEntitiesTableId` field. */ + principalEntitiesTableId?: UUIDFilter; + /** Filter by the object’s `principalScopeOverridesTableId` field. */ + principalScopeOverridesTableId?: UUIDFilter; + /** Filter by the object’s `usersTableId` field. */ + usersTableId?: UUIDFilter; + /** Filter by the object’s `sessionsTableId` field. */ + sessionsTableId?: UUIDFilter; + /** Filter by the object’s `sessionCredentialsTableId` field. */ + sessionCredentialsTableId?: UUIDFilter; + /** Filter by the object’s `auditsTableId` field. */ + auditsTableId?: UUIDFilter; + /** Filter by the object’s `principalsTableName` field. */ + principalsTableName?: StringFilter; + /** Filter by the object’s `createPrincipalFunction` field. */ + createPrincipalFunction?: StringFilter; + /** Filter by the object’s `deletePrincipalFunction` field. */ + deletePrincipalFunction?: StringFilter; + /** Filter by the object’s `createOrgPrincipalFunction` field. */ + createOrgPrincipalFunction?: StringFilter; + /** Filter by the object’s `deleteOrgPrincipalFunction` field. */ + deleteOrgPrincipalFunction?: StringFilter; + /** Filter by the object’s `createOrgApiKeyFunction` field. */ + createOrgApiKeyFunction?: StringFilter; + /** Filter by the object’s `revokeOrgApiKeyFunction` field. */ + revokeOrgApiKeyFunction?: StringFilter; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalAuthModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalAuthModuleFilter[]; + /** Negates the expression. */ + not?: PrincipalAuthModuleFilter; +} export interface ComputeLogModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -4395,6 +4535,56 @@ export interface NamespaceModuleFilter { /** Negates the expression. */ not?: NamespaceModuleFilter; } +export interface ResourceModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `resourcesTableId` field. */ + resourcesTableId?: UUIDFilter; + /** Filter by the object’s `resourceEventsTableId` field. */ + resourceEventsTableId?: UUIDFilter; + /** Filter by the object’s `resourcesTableName` field. */ + resourcesTableName?: StringFilter; + /** Filter by the object’s `resourceEventsTableName` field. */ + resourceEventsTableName?: StringFilter; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `namespaceModuleId` field. */ + namespaceModuleId?: UUIDFilter; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `defaultPermissions` field. */ + defaultPermissions?: StringListFilter; + /** Checks for all expressions in this list. */ + and?: ResourceModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceModuleFilter[]; + /** Negates the expression. */ + not?: ResourceModuleFilter; + /** Filter by the object’s `namespaceModule` relation. */ + namespaceModule?: NamespaceModuleFilter; + /** A related `namespaceModule` exists. */ + namespaceModuleExists?: boolean; +} export interface StorageLogModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -6248,43 +6438,39 @@ export type SecureTableProvisionOrderBy = | 'POLICIES_DESC' | 'OUT_FIELDS_ASC' | 'OUT_FIELDS_DESC'; -export type MerkleStoreModuleOrderBy = +export type DatabaseProvisionModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' + | 'DATABASE_NAME_ASC' + | 'DATABASE_NAME_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SUBDOMAIN_ASC' + | 'SUBDOMAIN_DESC' + | 'DOMAIN_ASC' + | 'DOMAIN_DESC' + | 'MODULES_ASC' + | 'MODULES_DESC' + | 'OPTIONS_ASC' + | 'OPTIONS_DESC' + | 'BOOTSTRAP_USER_ASC' + | 'BOOTSTRAP_USER_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'ERROR_MESSAGE_ASC' + | 'ERROR_MESSAGE_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'SCHEMA_ID_ASC' - | 'SCHEMA_ID_DESC' - | 'PRIVATE_SCHEMA_ID_ASC' - | 'PRIVATE_SCHEMA_ID_DESC' - | 'PUBLIC_SCHEMA_NAME_ASC' - | 'PUBLIC_SCHEMA_NAME_DESC' - | 'PRIVATE_SCHEMA_NAME_ASC' - | 'PRIVATE_SCHEMA_NAME_DESC' - | 'OBJECT_TABLE_ID_ASC' - | 'OBJECT_TABLE_ID_DESC' - | 'STORE_TABLE_ID_ASC' - | 'STORE_TABLE_ID_DESC' - | 'COMMIT_TABLE_ID_ASC' - | 'COMMIT_TABLE_ID_DESC' - | 'REF_TABLE_ID_ASC' - | 'REF_TABLE_ID_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC' - | 'API_NAME_ASC' - | 'API_NAME_DESC' - | 'PRIVATE_API_NAME_ASC' - | 'PRIVATE_API_NAME_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' - | 'FUNCTION_PREFIX_ASC' - | 'FUNCTION_PREFIX_DESC' | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC'; -export type GraphModuleOrderBy = + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'COMPLETED_AT_ASC' + | 'COMPLETED_AT_DESC'; +export type ConfigSecretsModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' @@ -6292,17 +6478,55 @@ export type GraphModuleOrderBy = | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'PUBLIC_SCHEMA_ID_ASC' - | 'PUBLIC_SCHEMA_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'PUBLIC_SCHEMA_NAME_ASC' | 'PUBLIC_SCHEMA_NAME_DESC' | 'PRIVATE_SCHEMA_NAME_ASC' | 'PRIVATE_SCHEMA_NAME_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' - | 'PREFIX_ASC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'CONFIG_DEFINITIONS_TABLE_ID_ASC' + | 'CONFIG_DEFINITIONS_TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'HAS_CONFIG_ASC' + | 'HAS_CONFIG_DESC'; +export type GraphModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'PUBLIC_SCHEMA_ID_ASC' + | 'PUBLIC_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'PREFIX_ASC' | 'PREFIX_DESC' | 'MERKLE_STORE_MODULE_ID_ASC' | 'MERKLE_STORE_MODULE_ID_DESC' @@ -6322,39 +6546,7 @@ export type GraphModuleOrderBy = | 'DEFAULT_PERMISSIONS_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC'; -export type DatabaseProvisionModuleOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'DATABASE_NAME_ASC' - | 'DATABASE_NAME_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SUBDOMAIN_ASC' - | 'SUBDOMAIN_DESC' - | 'DOMAIN_ASC' - | 'DOMAIN_DESC' - | 'MODULES_ASC' - | 'MODULES_DESC' - | 'OPTIONS_ASC' - | 'OPTIONS_DESC' - | 'BOOTSTRAP_USER_ASC' - | 'BOOTSTRAP_USER_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'ERROR_MESSAGE_ASC' - | 'ERROR_MESSAGE_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'COMPLETED_AT_ASC' - | 'COMPLETED_AT_DESC'; -export type ConfigSecretsModuleOrderBy = +export type MerkleStoreModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' @@ -6370,28 +6562,28 @@ export type ConfigSecretsModuleOrderBy = | 'PUBLIC_SCHEMA_NAME_DESC' | 'PRIVATE_SCHEMA_NAME_ASC' | 'PRIVATE_SCHEMA_NAME_DESC' - | 'TABLE_ID_ASC' - | 'TABLE_ID_DESC' - | 'CONFIG_DEFINITIONS_TABLE_ID_ASC' - | 'CONFIG_DEFINITIONS_TABLE_ID_DESC' - | 'TABLE_NAME_ASC' - | 'TABLE_NAME_DESC' + | 'OBJECT_TABLE_ID_ASC' + | 'OBJECT_TABLE_ID_DESC' + | 'STORE_TABLE_ID_ASC' + | 'STORE_TABLE_ID_DESC' + | 'COMMIT_TABLE_ID_ASC' + | 'COMMIT_TABLE_ID_DESC' + | 'REF_TABLE_ID_ASC' + | 'REF_TABLE_ID_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' | 'API_NAME_ASC' | 'API_NAME_DESC' | 'PRIVATE_API_NAME_ASC' | 'PRIVATE_API_NAME_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC' - | 'ENTITY_TABLE_ID_ASC' - | 'ENTITY_TABLE_ID_DESC' - | 'POLICIES_ASC' - | 'POLICIES_DESC' - | 'PROVISIONS_ASC' - | 'PROVISIONS_DESC' - | 'HAS_CONFIG_ASC' - | 'HAS_CONFIG_DESC'; + | 'FUNCTION_PREFIX_ASC' + | 'FUNCTION_PREFIX_DESC' + | 'PERMISSION_KEY_ASC' + | 'PERMISSION_KEY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC'; export type RateLimitMetersModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -6618,6 +6810,46 @@ export type InvitesModuleOrderBy = | 'API_NAME_DESC' | 'PRIVATE_API_NAME_ASC' | 'PRIVATE_API_NAME_DESC'; +export type PrincipalAuthModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRINCIPALS_TABLE_ID_ASC' + | 'PRINCIPALS_TABLE_ID_DESC' + | 'PRINCIPAL_ENTITIES_TABLE_ID_ASC' + | 'PRINCIPAL_ENTITIES_TABLE_ID_DESC' + | 'PRINCIPAL_SCOPE_OVERRIDES_TABLE_ID_ASC' + | 'PRINCIPAL_SCOPE_OVERRIDES_TABLE_ID_DESC' + | 'USERS_TABLE_ID_ASC' + | 'USERS_TABLE_ID_DESC' + | 'SESSIONS_TABLE_ID_ASC' + | 'SESSIONS_TABLE_ID_DESC' + | 'SESSION_CREDENTIALS_TABLE_ID_ASC' + | 'SESSION_CREDENTIALS_TABLE_ID_DESC' + | 'AUDITS_TABLE_ID_ASC' + | 'AUDITS_TABLE_ID_DESC' + | 'PRINCIPALS_TABLE_NAME_ASC' + | 'PRINCIPALS_TABLE_NAME_DESC' + | 'CREATE_PRINCIPAL_FUNCTION_ASC' + | 'CREATE_PRINCIPAL_FUNCTION_DESC' + | 'DELETE_PRINCIPAL_FUNCTION_ASC' + | 'DELETE_PRINCIPAL_FUNCTION_DESC' + | 'CREATE_ORG_PRINCIPAL_FUNCTION_ASC' + | 'CREATE_ORG_PRINCIPAL_FUNCTION_DESC' + | 'DELETE_ORG_PRINCIPAL_FUNCTION_ASC' + | 'DELETE_ORG_PRINCIPAL_FUNCTION_DESC' + | 'CREATE_ORG_API_KEY_FUNCTION_ASC' + | 'CREATE_ORG_API_KEY_FUNCTION_DESC' + | 'REVOKE_ORG_API_KEY_FUNCTION_ASC' + | 'REVOKE_ORG_API_KEY_FUNCTION_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC'; export type ComputeLogModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -6744,6 +6976,48 @@ export type NamespaceModuleOrderBy = | 'PROVISIONS_DESC' | 'DEFAULT_PERMISSIONS_ASC' | 'DEFAULT_PERMISSIONS_DESC'; +export type ResourceModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'RESOURCES_TABLE_ID_ASC' + | 'RESOURCES_TABLE_ID_DESC' + | 'RESOURCE_EVENTS_TABLE_ID_ASC' + | 'RESOURCE_EVENTS_TABLE_ID_DESC' + | 'RESOURCES_TABLE_NAME_ASC' + | 'RESOURCES_TABLE_NAME_DESC' + | 'RESOURCE_EVENTS_TABLE_NAME_ASC' + | 'RESOURCE_EVENTS_TABLE_NAME_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'NAMESPACE_MODULE_ID_ASC' + | 'NAMESPACE_MODULE_ID_DESC' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'DEFAULT_PERMISSIONS_ASC' + | 'DEFAULT_PERMISSIONS_DESC'; export type StorageLogModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -8755,96 +9029,6 @@ export interface DeleteSecureTableProvisionInput { clientMutationId?: string; id: string; } -export interface CreateMerkleStoreModuleInput { - clientMutationId?: string; - merkleStoreModule: { - databaseId: string; - schemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - objectTableId?: string; - storeTableId?: string; - commitTableId?: string; - refTableId?: string; - prefix?: string; - apiName?: string; - privateApiName?: string; - scope?: string; - functionPrefix?: string; - }; -} -export interface MerkleStoreModulePatch { - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - objectTableId?: string | null; - storeTableId?: string | null; - commitTableId?: string | null; - refTableId?: string | null; - prefix?: string | null; - apiName?: string | null; - privateApiName?: string | null; - scope?: string | null; - functionPrefix?: string | null; -} -export interface UpdateMerkleStoreModuleInput { - clientMutationId?: string; - id: string; - merkleStoreModulePatch: MerkleStoreModulePatch; -} -export interface DeleteMerkleStoreModuleInput { - clientMutationId?: string; - id: string; -} -export interface CreateGraphModuleInput { - clientMutationId?: string; - graphModule: { - databaseId: string; - publicSchemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - scope?: string; - prefix?: string; - merkleStoreModuleId: string; - graphsTableId?: string; - apiName?: string; - privateApiName?: string; - entityTableId?: string; - policies?: Record; - provisions?: Record; - defaultPermissions?: string[]; - }; -} -export interface GraphModulePatch { - databaseId?: string | null; - publicSchemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - scope?: string | null; - prefix?: string | null; - merkleStoreModuleId?: string | null; - graphsTableId?: string | null; - apiName?: string | null; - privateApiName?: string | null; - entityTableId?: string | null; - policies?: Record | null; - provisions?: Record | null; - defaultPermissions?: string[] | null; -} -export interface UpdateGraphModuleInput { - clientMutationId?: string; - id: string; - graphModulePatch: GraphModulePatch; -} -export interface DeleteGraphModuleInput { - clientMutationId?: string; - id: string; -} export interface CreateDatabaseProvisionModuleInput { clientMutationId?: string; databaseProvisionModule: { @@ -8931,17 +9115,109 @@ export interface DeleteConfigSecretsModuleInput { clientMutationId?: string; id: string; } -export interface CreateRateLimitMetersModuleInput { +export interface CreateGraphModuleInput { clientMutationId?: string; - rateLimitMetersModule: { + graphModule: { databaseId: string; - schemaId?: string; + publicSchemaId?: string; privateSchemaId?: string; publicSchemaName?: string; privateSchemaName?: string; - rateLimitStateTableId?: string; - rateLimitStateTableName?: string; - rateLimitOverridesTableId?: string; + scope?: string; + prefix?: string; + merkleStoreModuleId: string; + graphsTableId?: string; + apiName?: string; + privateApiName?: string; + entityTableId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; + }; +} +export interface GraphModulePatch { + databaseId?: string | null; + publicSchemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + scope?: string | null; + prefix?: string | null; + merkleStoreModuleId?: string | null; + graphsTableId?: string | null; + apiName?: string | null; + privateApiName?: string | null; + entityTableId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; +} +export interface UpdateGraphModuleInput { + clientMutationId?: string; + id: string; + graphModulePatch: GraphModulePatch; +} +export interface DeleteGraphModuleInput { + clientMutationId?: string; + id: string; +} +export interface CreateMerkleStoreModuleInput { + clientMutationId?: string; + merkleStoreModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + objectTableId?: string; + storeTableId?: string; + commitTableId?: string; + refTableId?: string; + prefix?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + functionPrefix?: string; + permissionKey?: string; + }; +} +export interface MerkleStoreModulePatch { + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + objectTableId?: string | null; + storeTableId?: string | null; + commitTableId?: string | null; + refTableId?: string | null; + prefix?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + functionPrefix?: string | null; + permissionKey?: string | null; +} +export interface UpdateMerkleStoreModuleInput { + clientMutationId?: string; + id: string; + merkleStoreModulePatch: MerkleStoreModulePatch; +} +export interface DeleteMerkleStoreModuleInput { + clientMutationId?: string; + id: string; +} +export interface CreateRateLimitMetersModuleInput { + clientMutationId?: string; + rateLimitMetersModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + rateLimitStateTableId?: string; + rateLimitStateTableName?: string; + rateLimitOverridesTableId?: string; rateLimitOverridesTableName?: string; rateWindowLimitsTableId?: string; rateWindowLimitsTableName?: string; @@ -9217,6 +9493,56 @@ export interface DeleteInvitesModuleInput { clientMutationId?: string; id: string; } +export interface CreatePrincipalAuthModuleInput { + clientMutationId?: string; + principalAuthModule: { + databaseId: string; + schemaId?: string; + principalsTableId?: string; + principalEntitiesTableId?: string; + principalScopeOverridesTableId?: string; + usersTableId?: string; + sessionsTableId?: string; + sessionCredentialsTableId?: string; + auditsTableId?: string; + principalsTableName?: string; + createPrincipalFunction?: string; + deletePrincipalFunction?: string; + createOrgPrincipalFunction?: string; + deleteOrgPrincipalFunction?: string; + createOrgApiKeyFunction?: string; + revokeOrgApiKeyFunction?: string; + apiName?: string; + }; +} +export interface PrincipalAuthModulePatch { + databaseId?: string | null; + schemaId?: string | null; + principalsTableId?: string | null; + principalEntitiesTableId?: string | null; + principalScopeOverridesTableId?: string | null; + usersTableId?: string | null; + sessionsTableId?: string | null; + sessionCredentialsTableId?: string | null; + auditsTableId?: string | null; + principalsTableName?: string | null; + createPrincipalFunction?: string | null; + deletePrincipalFunction?: string | null; + createOrgPrincipalFunction?: string | null; + deleteOrgPrincipalFunction?: string | null; + createOrgApiKeyFunction?: string | null; + revokeOrgApiKeyFunction?: string | null; + apiName?: string | null; +} +export interface UpdatePrincipalAuthModuleInput { + clientMutationId?: string; + id: string; + principalAuthModulePatch: PrincipalAuthModulePatch; +} +export interface DeletePrincipalAuthModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateComputeLogModuleInput { clientMutationId?: string; computeLogModule: { @@ -9373,6 +9699,58 @@ export interface DeleteNamespaceModuleInput { clientMutationId?: string; id: string; } +export interface CreateResourceModuleInput { + clientMutationId?: string; + resourceModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + resourcesTableId?: string; + resourceEventsTableId?: string; + resourcesTableName?: string; + resourceEventsTableName?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + prefix?: string; + entityTableId?: string; + namespaceModuleId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; + }; +} +export interface ResourceModulePatch { + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + resourcesTableId?: string | null; + resourceEventsTableId?: string | null; + resourcesTableName?: string | null; + resourceEventsTableName?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + prefix?: string | null; + entityTableId?: string | null; + namespaceModuleId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; +} +export interface UpdateResourceModuleInput { + clientMutationId?: string; + id: string; + resourceModulePatch: ResourceModulePatch; +} +export interface DeleteResourceModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateStorageLogModuleInput { clientMutationId?: string; storageLogModule: { @@ -11348,45 +11726,6 @@ export interface SecureTableProvisionInput { /** Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. */ outFields?: string[]; } -/** An input for mutations affecting `MerkleStoreModule` */ -export interface MerkleStoreModuleInput { - id?: string; - databaseId: string; - schemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - objectTableId?: string; - storeTableId?: string; - commitTableId?: string; - refTableId?: string; - prefix?: string; - apiName?: string; - privateApiName?: string; - scope?: string; - functionPrefix?: string; - createdAt?: string; -} -/** An input for mutations affecting `GraphModule` */ -export interface GraphModuleInput { - id?: string; - databaseId: string; - publicSchemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - scope?: string; - prefix?: string; - merkleStoreModuleId: string; - graphsTableId?: string; - apiName?: string; - privateApiName?: string; - entityTableId?: string; - policies?: Record; - provisions?: Record; - defaultPermissions?: string[]; - createdAt?: string; -} /** An input for mutations affecting `DatabaseProvisionModule` */ export interface DatabaseProvisionModuleInput { id?: string; @@ -11433,6 +11772,46 @@ export interface ConfigSecretsModuleInput { provisions?: Record; hasConfig?: boolean; } +/** An input for mutations affecting `GraphModule` */ +export interface GraphModuleInput { + id?: string; + databaseId: string; + publicSchemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + scope?: string; + prefix?: string; + merkleStoreModuleId: string; + graphsTableId?: string; + apiName?: string; + privateApiName?: string; + entityTableId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; + createdAt?: string; +} +/** An input for mutations affecting `MerkleStoreModule` */ +export interface MerkleStoreModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + objectTableId?: string; + storeTableId?: string; + commitTableId?: string; + refTableId?: string; + prefix?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + functionPrefix?: string; + permissionKey?: string; + createdAt?: string; +} /** An input for mutations affecting `RateLimitMetersModule` */ export interface RateLimitMetersModuleInput { id?: string; @@ -11552,6 +11931,27 @@ export interface InvitesModuleInput { apiName?: string; privateApiName?: string; } +/** An input for mutations affecting `PrincipalAuthModule` */ +export interface PrincipalAuthModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + principalsTableId?: string; + principalEntitiesTableId?: string; + principalScopeOverridesTableId?: string; + usersTableId?: string; + sessionsTableId?: string; + sessionCredentialsTableId?: string; + auditsTableId?: string; + principalsTableName?: string; + createPrincipalFunction?: string; + deletePrincipalFunction?: string; + createOrgPrincipalFunction?: string; + deleteOrgPrincipalFunction?: string; + createOrgApiKeyFunction?: string; + revokeOrgApiKeyFunction?: string; + apiName?: string; +} /** An input for mutations affecting `ComputeLogModule` */ export interface ComputeLogModuleInput { id?: string; @@ -11618,28 +12018,50 @@ export interface NamespaceModuleInput { provisions?: Record; defaultPermissions?: string[]; } -/** An input for mutations affecting `StorageLogModule` */ -export interface StorageLogModuleInput { +/** An input for mutations affecting `ResourceModule` */ +export interface ResourceModuleInput { id?: string; databaseId: string; schemaId?: string; privateSchemaId?: string; publicSchemaName?: string; privateSchemaName?: string; - storageLogTableId?: string; - storageLogTableName?: string; - usageDailyTableId?: string; - usageDailyTableName?: string; - interval?: string; - retention?: string; - premake?: number; - scope?: string; - actorFkTableId?: string; - entityFkTableId?: string; - prefix?: string; + resourcesTableId?: string; + resourceEventsTableId?: string; + resourcesTableName?: string; + resourceEventsTableName?: string; apiName?: string; privateApiName?: string; -} + scope?: string; + prefix?: string; + entityTableId?: string; + namespaceModuleId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; +} +/** An input for mutations affecting `StorageLogModule` */ +export interface StorageLogModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + storageLogTableId?: string; + storageLogTableName?: string; + usageDailyTableId?: string; + usageDailyTableName?: string; + interval?: string; + retention?: string; + premake?: number; + scope?: string; + actorFkTableId?: string; + entityFkTableId?: string; + prefix?: string; + apiName?: string; + privateApiName?: string; +} /** An input for mutations affecting `TransferLogModule` */ export interface TransferLogModuleInput { id?: string; @@ -12970,6 +13392,8 @@ export interface MerkleStoreModuleFilter { scope?: StringFilter; /** Filter by the object’s `functionPrefix` field. */ functionPrefix?: StringFilter; + /** Filter by the object’s `permissionKey` field. */ + permissionKey?: StringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Checks for all expressions in this list. */ @@ -14248,96 +14672,6 @@ export type DeleteSecureTableProvisionPayloadSelect = { select: SecureTableProvisionEdgeSelect; }; }; -export interface CreateMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was created by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} -export type CreateMerkleStoreModulePayloadSelect = { - clientMutationId?: boolean; - merkleStoreModule?: { - select: MerkleStoreModuleSelect; - }; - merkleStoreModuleEdge?: { - select: MerkleStoreModuleEdgeSelect; - }; -}; -export interface UpdateMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was updated by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} -export type UpdateMerkleStoreModulePayloadSelect = { - clientMutationId?: boolean; - merkleStoreModule?: { - select: MerkleStoreModuleSelect; - }; - merkleStoreModuleEdge?: { - select: MerkleStoreModuleEdgeSelect; - }; -}; -export interface DeleteMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was deleted by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} -export type DeleteMerkleStoreModulePayloadSelect = { - clientMutationId?: boolean; - merkleStoreModule?: { - select: MerkleStoreModuleSelect; - }; - merkleStoreModuleEdge?: { - select: MerkleStoreModuleEdgeSelect; - }; -}; -export interface CreateGraphModulePayload { - clientMutationId?: string | null; - /** The `GraphModule` that was created by this mutation. */ - graphModule?: GraphModule | null; - graphModuleEdge?: GraphModuleEdge | null; -} -export type CreateGraphModulePayloadSelect = { - clientMutationId?: boolean; - graphModule?: { - select: GraphModuleSelect; - }; - graphModuleEdge?: { - select: GraphModuleEdgeSelect; - }; -}; -export interface UpdateGraphModulePayload { - clientMutationId?: string | null; - /** The `GraphModule` that was updated by this mutation. */ - graphModule?: GraphModule | null; - graphModuleEdge?: GraphModuleEdge | null; -} -export type UpdateGraphModulePayloadSelect = { - clientMutationId?: boolean; - graphModule?: { - select: GraphModuleSelect; - }; - graphModuleEdge?: { - select: GraphModuleEdgeSelect; - }; -}; -export interface DeleteGraphModulePayload { - clientMutationId?: string | null; - /** The `GraphModule` that was deleted by this mutation. */ - graphModule?: GraphModule | null; - graphModuleEdge?: GraphModuleEdge | null; -} -export type DeleteGraphModulePayloadSelect = { - clientMutationId?: boolean; - graphModule?: { - select: GraphModuleSelect; - }; - graphModuleEdge?: { - select: GraphModuleEdgeSelect; - }; -}; export interface CreateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was created by this mutation. */ @@ -14428,6 +14762,96 @@ export type DeleteConfigSecretsModulePayloadSelect = { select: ConfigSecretsModuleEdgeSelect; }; }; +export interface CreateGraphModulePayload { + clientMutationId?: string | null; + /** The `GraphModule` that was created by this mutation. */ + graphModule?: GraphModule | null; + graphModuleEdge?: GraphModuleEdge | null; +} +export type CreateGraphModulePayloadSelect = { + clientMutationId?: boolean; + graphModule?: { + select: GraphModuleSelect; + }; + graphModuleEdge?: { + select: GraphModuleEdgeSelect; + }; +}; +export interface UpdateGraphModulePayload { + clientMutationId?: string | null; + /** The `GraphModule` that was updated by this mutation. */ + graphModule?: GraphModule | null; + graphModuleEdge?: GraphModuleEdge | null; +} +export type UpdateGraphModulePayloadSelect = { + clientMutationId?: boolean; + graphModule?: { + select: GraphModuleSelect; + }; + graphModuleEdge?: { + select: GraphModuleEdgeSelect; + }; +}; +export interface DeleteGraphModulePayload { + clientMutationId?: string | null; + /** The `GraphModule` that was deleted by this mutation. */ + graphModule?: GraphModule | null; + graphModuleEdge?: GraphModuleEdge | null; +} +export type DeleteGraphModulePayloadSelect = { + clientMutationId?: boolean; + graphModule?: { + select: GraphModuleSelect; + }; + graphModuleEdge?: { + select: GraphModuleEdgeSelect; + }; +}; +export interface CreateMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was created by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} +export type CreateMerkleStoreModulePayloadSelect = { + clientMutationId?: boolean; + merkleStoreModule?: { + select: MerkleStoreModuleSelect; + }; + merkleStoreModuleEdge?: { + select: MerkleStoreModuleEdgeSelect; + }; +}; +export interface UpdateMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was updated by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} +export type UpdateMerkleStoreModulePayloadSelect = { + clientMutationId?: boolean; + merkleStoreModule?: { + select: MerkleStoreModuleSelect; + }; + merkleStoreModuleEdge?: { + select: MerkleStoreModuleEdgeSelect; + }; +}; +export interface DeleteMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was deleted by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} +export type DeleteMerkleStoreModulePayloadSelect = { + clientMutationId?: boolean; + merkleStoreModule?: { + select: MerkleStoreModuleSelect; + }; + merkleStoreModuleEdge?: { + select: MerkleStoreModuleEdgeSelect; + }; +}; export interface CreateRateLimitMetersModulePayload { clientMutationId?: string | null; /** The `RateLimitMetersModule` that was created by this mutation. */ @@ -14698,6 +15122,51 @@ export type DeleteInvitesModulePayloadSelect = { select: InvitesModuleEdgeSelect; }; }; +export interface CreatePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was created by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} +export type CreatePrincipalAuthModulePayloadSelect = { + clientMutationId?: boolean; + principalAuthModule?: { + select: PrincipalAuthModuleSelect; + }; + principalAuthModuleEdge?: { + select: PrincipalAuthModuleEdgeSelect; + }; +}; +export interface UpdatePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was updated by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} +export type UpdatePrincipalAuthModulePayloadSelect = { + clientMutationId?: boolean; + principalAuthModule?: { + select: PrincipalAuthModuleSelect; + }; + principalAuthModuleEdge?: { + select: PrincipalAuthModuleEdgeSelect; + }; +}; +export interface DeletePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was deleted by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} +export type DeletePrincipalAuthModulePayloadSelect = { + clientMutationId?: boolean; + principalAuthModule?: { + select: PrincipalAuthModuleSelect; + }; + principalAuthModuleEdge?: { + select: PrincipalAuthModuleEdgeSelect; + }; +}; export interface CreateComputeLogModulePayload { clientMutationId?: string | null; /** The `ComputeLogModule` that was created by this mutation. */ @@ -14833,6 +15302,51 @@ export type DeleteNamespaceModulePayloadSelect = { select: NamespaceModuleEdgeSelect; }; }; +export interface CreateResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was created by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} +export type CreateResourceModulePayloadSelect = { + clientMutationId?: boolean; + resourceModule?: { + select: ResourceModuleSelect; + }; + resourceModuleEdge?: { + select: ResourceModuleEdgeSelect; + }; +}; +export interface UpdateResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was updated by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} +export type UpdateResourceModulePayloadSelect = { + clientMutationId?: boolean; + resourceModule?: { + select: ResourceModuleSelect; + }; + resourceModuleEdge?: { + select: ResourceModuleEdgeSelect; + }; +}; +export interface DeleteResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was deleted by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} +export type DeleteResourceModulePayloadSelect = { + clientMutationId?: boolean; + resourceModule?: { + select: ResourceModuleSelect; + }; + resourceModuleEdge?: { + select: ResourceModuleEdgeSelect; + }; +}; export interface CreateStorageLogModulePayload { clientMutationId?: string | null; /** The `StorageLogModule` that was created by this mutation. */ @@ -16065,30 +16579,6 @@ export type SecureTableProvisionEdgeSelect = { select: SecureTableProvisionSelect; }; }; -/** A `MerkleStoreModule` edge in the connection. */ -export interface MerkleStoreModuleEdge { - cursor?: string | null; - /** The `MerkleStoreModule` at the end of the edge. */ - node?: MerkleStoreModule | null; -} -export type MerkleStoreModuleEdgeSelect = { - cursor?: boolean; - node?: { - select: MerkleStoreModuleSelect; - }; -}; -/** A `GraphModule` edge in the connection. */ -export interface GraphModuleEdge { - cursor?: string | null; - /** The `GraphModule` at the end of the edge. */ - node?: GraphModule | null; -} -export type GraphModuleEdgeSelect = { - cursor?: boolean; - node?: { - select: GraphModuleSelect; - }; -}; /** A `DatabaseProvisionModule` edge in the connection. */ export interface DatabaseProvisionModuleEdge { cursor?: string | null; @@ -16113,6 +16603,30 @@ export type ConfigSecretsModuleEdgeSelect = { select: ConfigSecretsModuleSelect; }; }; +/** A `GraphModule` edge in the connection. */ +export interface GraphModuleEdge { + cursor?: string | null; + /** The `GraphModule` at the end of the edge. */ + node?: GraphModule | null; +} +export type GraphModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: GraphModuleSelect; + }; +}; +/** A `MerkleStoreModule` edge in the connection. */ +export interface MerkleStoreModuleEdge { + cursor?: string | null; + /** The `MerkleStoreModule` at the end of the edge. */ + node?: MerkleStoreModule | null; +} +export type MerkleStoreModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: MerkleStoreModuleSelect; + }; +}; /** A `RateLimitMetersModule` edge in the connection. */ export interface RateLimitMetersModuleEdge { cursor?: string | null; @@ -16185,6 +16699,18 @@ export type InvitesModuleEdgeSelect = { select: InvitesModuleSelect; }; }; +/** A `PrincipalAuthModule` edge in the connection. */ +export interface PrincipalAuthModuleEdge { + cursor?: string | null; + /** The `PrincipalAuthModule` at the end of the edge. */ + node?: PrincipalAuthModule | null; +} +export type PrincipalAuthModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: PrincipalAuthModuleSelect; + }; +}; /** A `ComputeLogModule` edge in the connection. */ export interface ComputeLogModuleEdge { cursor?: string | null; @@ -16221,6 +16747,18 @@ export type NamespaceModuleEdgeSelect = { select: NamespaceModuleSelect; }; }; +/** A `ResourceModule` edge in the connection. */ +export interface ResourceModuleEdge { + cursor?: string | null; + /** The `ResourceModule` at the end of the edge. */ + node?: ResourceModule | null; +} +export type ResourceModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: ResourceModuleSelect; + }; +}; /** A `StorageLogModule` edge in the connection. */ export interface StorageLogModuleEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/modules/orm/models/index.ts b/sdk/constructive-react/src/modules/orm/models/index.ts index 2ff305f2fc..15e5dd1552 100644 --- a/sdk/constructive-react/src/modules/orm/models/index.ts +++ b/sdk/constructive-react/src/modules/orm/models/index.ts @@ -29,19 +29,21 @@ export { BlueprintConstructionModel } from './blueprintConstruction'; export { CryptoAuthModuleModel } from './cryptoAuthModule'; export { SessionsModuleModel } from './sessionsModule'; export { SecureTableProvisionModel } from './secureTableProvision'; -export { MerkleStoreModuleModel } from './merkleStoreModule'; -export { GraphModuleModel } from './graphModule'; export { DatabaseProvisionModuleModel } from './databaseProvisionModule'; export { ConfigSecretsModuleModel } from './configSecretsModule'; +export { GraphModuleModel } from './graphModule'; +export { MerkleStoreModuleModel } from './merkleStoreModule'; export { RateLimitMetersModuleModel } from './rateLimitMetersModule'; export { RealtimeModuleModel } from './realtimeModule'; export { WebauthnAuthModuleModel } from './webauthnAuthModule'; export { FunctionInvocationModuleModel } from './functionInvocationModule'; export { FunctionModuleModel } from './functionModule'; export { InvitesModuleModel } from './invitesModule'; +export { PrincipalAuthModuleModel } from './principalAuthModule'; export { ComputeLogModuleModel } from './computeLogModule'; export { InferenceLogModuleModel } from './inferenceLogModule'; export { NamespaceModuleModel } from './namespaceModule'; +export { ResourceModuleModel } from './resourceModule'; export { StorageLogModuleModel } from './storageLogModule'; export { TransferLogModuleModel } from './transferLogModule'; export { FunctionDeploymentModuleModel } from './functionDeploymentModule'; diff --git a/sdk/constructive-react/src/modules/orm/models/principalAuthModule.ts b/sdk/constructive-react/src/modules/orm/models/principalAuthModule.ts new file mode 100644 index 0000000000..c0e9d913d3 --- /dev/null +++ b/sdk/constructive-react/src/modules/orm/models/principalAuthModule.ts @@ -0,0 +1,245 @@ +/** + * PrincipalAuthModule 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 { + PrincipalAuthModule, + PrincipalAuthModuleWithRelations, + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy, + CreatePrincipalAuthModuleInput, + UpdatePrincipalAuthModuleInput, + PrincipalAuthModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalAuthModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalAuthModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalAuthModule', + 'principalAuthModules', + 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, + }, + 'PrincipalAuthModuleFilter', + 'PrincipalAuthModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalAuthModule', + fieldName: 'principalAuthModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalAuthModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PrincipalAuthModule', + 'principalAuthModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalAuthModuleFilter', + 'PrincipalAuthModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalAuthModule', + fieldName: 'principalAuthModule', + document, + variables, + transform: (data: { + principalAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalAuthModule: data.principalAuthModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalAuthModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalAuthModule', + 'principalAuthModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PrincipalAuthModuleFilter', + 'PrincipalAuthModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalAuthModule', + fieldName: 'principalAuthModule', + document, + variables, + transform: (data: { + principalAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalAuthModule: data.principalAuthModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PrincipalAuthModule', + 'createPrincipalAuthModule', + 'principalAuthModule', + args.select, + args.data, + 'CreatePrincipalAuthModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalAuthModule', + fieldName: 'createPrincipalAuthModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PrincipalAuthModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PrincipalAuthModule', + 'updatePrincipalAuthModule', + 'principalAuthModule', + args.select, + args.where.id, + args.data, + 'UpdatePrincipalAuthModuleInput', + 'id', + 'principalAuthModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalAuthModule', + fieldName: 'updatePrincipalAuthModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PrincipalAuthModule', + 'deletePrincipalAuthModule', + 'principalAuthModule', + { + id: args.where.id, + }, + 'DeletePrincipalAuthModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalAuthModule', + fieldName: 'deletePrincipalAuthModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/modules/orm/models/resourceModule.ts b/sdk/constructive-react/src/modules/orm/models/resourceModule.ts new file mode 100644 index 0000000000..8fef54a24a --- /dev/null +++ b/sdk/constructive-react/src/modules/orm/models/resourceModule.ts @@ -0,0 +1,245 @@ +/** + * ResourceModule 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 { + ResourceModule, + ResourceModuleWithRelations, + ResourceModuleSelect, + ResourceModuleFilter, + ResourceModuleOrderBy, + CreateResourceModuleInput, + UpdateResourceModuleInput, + ResourceModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ResourceModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceModule', + 'resourceModules', + 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, + }, + 'ResourceModuleFilter', + 'ResourceModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceModule', + fieldName: 'resourceModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ResourceModule', + 'resourceModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ResourceModuleFilter', + 'ResourceModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceModule', + fieldName: 'resourceModule', + document, + variables, + transform: (data: { + resourceModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceModule: data.resourceModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceModule', + 'resourceModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ResourceModuleFilter', + 'ResourceModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceModule', + fieldName: 'resourceModule', + document, + variables, + transform: (data: { + resourceModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceModule: data.resourceModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createResourceModule: { + resourceModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ResourceModule', + 'createResourceModule', + 'resourceModule', + args.select, + args.data, + 'CreateResourceModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceModule', + fieldName: 'createResourceModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ResourceModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateResourceModule: { + resourceModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ResourceModule', + 'updateResourceModule', + 'resourceModule', + args.select, + args.where.id, + args.data, + 'UpdateResourceModuleInput', + 'id', + 'resourceModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceModule', + fieldName: 'updateResourceModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteResourceModule: { + resourceModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ResourceModule', + 'deleteResourceModule', + 'resourceModule', + { + id: args.where.id, + }, + 'DeleteResourceModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceModule', + fieldName: 'deleteResourceModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/modules/schema-types.ts b/sdk/constructive-react/src/modules/schema-types.ts index 4750467dd8..15d3b4f5f5 100644 --- a/sdk/constructive-react/src/modules/schema-types.ts +++ b/sdk/constructive-react/src/modules/schema-types.ts @@ -45,11 +45,13 @@ import type { PermissionsModule, PhoneNumbersModule, PlansModule, + PrincipalAuthModule, ProfilesModule, RateLimitMetersModule, RateLimitsModule, RealtimeModule, RelationProvision, + ResourceModule, RlsModule, SecureTableProvision, SessionSecretsModule, @@ -696,6 +698,78 @@ export type SecureTableProvisionOrderBy = | 'POLICIES_DESC' | 'OUT_FIELDS_ASC' | 'OUT_FIELDS_DESC'; +/** Methods to use when ordering `DatabaseProvisionModule`. */ +export type DatabaseProvisionModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_NAME_ASC' + | 'DATABASE_NAME_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SUBDOMAIN_ASC' + | 'SUBDOMAIN_DESC' + | 'DOMAIN_ASC' + | 'DOMAIN_DESC' + | 'MODULES_ASC' + | 'MODULES_DESC' + | 'OPTIONS_ASC' + | 'OPTIONS_DESC' + | 'BOOTSTRAP_USER_ASC' + | 'BOOTSTRAP_USER_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'ERROR_MESSAGE_ASC' + | 'ERROR_MESSAGE_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'COMPLETED_AT_ASC' + | 'COMPLETED_AT_DESC'; +/** Methods to use when ordering `ConfigSecretsModule`. */ +export type ConfigSecretsModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'CONFIG_DEFINITIONS_TABLE_ID_ASC' + | 'CONFIG_DEFINITIONS_TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'HAS_CONFIG_ASC' + | 'HAS_CONFIG_DESC'; /** Methods to use when ordering `GraphModule`. */ export type GraphModuleOrderBy = | 'NATURAL' @@ -770,80 +844,10 @@ export type MerkleStoreModuleOrderBy = | 'SCOPE_DESC' | 'FUNCTION_PREFIX_ASC' | 'FUNCTION_PREFIX_DESC' + | 'PERMISSION_KEY_ASC' + | 'PERMISSION_KEY_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC'; -/** Methods to use when ordering `DatabaseProvisionModule`. */ -export type DatabaseProvisionModuleOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'DATABASE_NAME_ASC' - | 'DATABASE_NAME_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SUBDOMAIN_ASC' - | 'SUBDOMAIN_DESC' - | 'DOMAIN_ASC' - | 'DOMAIN_DESC' - | 'MODULES_ASC' - | 'MODULES_DESC' - | 'OPTIONS_ASC' - | 'OPTIONS_DESC' - | 'BOOTSTRAP_USER_ASC' - | 'BOOTSTRAP_USER_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'ERROR_MESSAGE_ASC' - | 'ERROR_MESSAGE_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'COMPLETED_AT_ASC' - | 'COMPLETED_AT_DESC'; -/** Methods to use when ordering `ConfigSecretsModule`. */ -export type ConfigSecretsModuleOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'SCHEMA_ID_ASC' - | 'SCHEMA_ID_DESC' - | 'PRIVATE_SCHEMA_ID_ASC' - | 'PRIVATE_SCHEMA_ID_DESC' - | 'PUBLIC_SCHEMA_NAME_ASC' - | 'PUBLIC_SCHEMA_NAME_DESC' - | 'PRIVATE_SCHEMA_NAME_ASC' - | 'PRIVATE_SCHEMA_NAME_DESC' - | 'TABLE_ID_ASC' - | 'TABLE_ID_DESC' - | 'CONFIG_DEFINITIONS_TABLE_ID_ASC' - | 'CONFIG_DEFINITIONS_TABLE_ID_DESC' - | 'TABLE_NAME_ASC' - | 'TABLE_NAME_DESC' - | 'API_NAME_ASC' - | 'API_NAME_DESC' - | 'PRIVATE_API_NAME_ASC' - | 'PRIVATE_API_NAME_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC' - | 'ENTITY_TABLE_ID_ASC' - | 'ENTITY_TABLE_ID_DESC' - | 'POLICIES_ASC' - | 'POLICIES_DESC' - | 'PROVISIONS_ASC' - | 'PROVISIONS_DESC' - | 'HAS_CONFIG_ASC' - | 'HAS_CONFIG_DESC'; /** Methods to use when ordering `RateLimitMetersModule`. */ export type RateLimitMetersModuleOrderBy = | 'NATURAL' @@ -1076,6 +1080,47 @@ export type InvitesModuleOrderBy = | 'API_NAME_DESC' | 'PRIVATE_API_NAME_ASC' | 'PRIVATE_API_NAME_DESC'; +/** Methods to use when ordering `PrincipalAuthModule`. */ +export type PrincipalAuthModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRINCIPALS_TABLE_ID_ASC' + | 'PRINCIPALS_TABLE_ID_DESC' + | 'PRINCIPAL_ENTITIES_TABLE_ID_ASC' + | 'PRINCIPAL_ENTITIES_TABLE_ID_DESC' + | 'PRINCIPAL_SCOPE_OVERRIDES_TABLE_ID_ASC' + | 'PRINCIPAL_SCOPE_OVERRIDES_TABLE_ID_DESC' + | 'USERS_TABLE_ID_ASC' + | 'USERS_TABLE_ID_DESC' + | 'SESSIONS_TABLE_ID_ASC' + | 'SESSIONS_TABLE_ID_DESC' + | 'SESSION_CREDENTIALS_TABLE_ID_ASC' + | 'SESSION_CREDENTIALS_TABLE_ID_DESC' + | 'AUDITS_TABLE_ID_ASC' + | 'AUDITS_TABLE_ID_DESC' + | 'PRINCIPALS_TABLE_NAME_ASC' + | 'PRINCIPALS_TABLE_NAME_DESC' + | 'CREATE_PRINCIPAL_FUNCTION_ASC' + | 'CREATE_PRINCIPAL_FUNCTION_DESC' + | 'DELETE_PRINCIPAL_FUNCTION_ASC' + | 'DELETE_PRINCIPAL_FUNCTION_DESC' + | 'CREATE_ORG_PRINCIPAL_FUNCTION_ASC' + | 'CREATE_ORG_PRINCIPAL_FUNCTION_DESC' + | 'DELETE_ORG_PRINCIPAL_FUNCTION_ASC' + | 'DELETE_ORG_PRINCIPAL_FUNCTION_DESC' + | 'CREATE_ORG_API_KEY_FUNCTION_ASC' + | 'CREATE_ORG_API_KEY_FUNCTION_DESC' + | 'REVOKE_ORG_API_KEY_FUNCTION_ASC' + | 'REVOKE_ORG_API_KEY_FUNCTION_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC'; /** Methods to use when ordering `ComputeLogModule`. */ export type ComputeLogModuleOrderBy = | 'NATURAL' @@ -1205,6 +1250,49 @@ export type NamespaceModuleOrderBy = | 'PROVISIONS_DESC' | 'DEFAULT_PERMISSIONS_ASC' | 'DEFAULT_PERMISSIONS_DESC'; +/** Methods to use when ordering `ResourceModule`. */ +export type ResourceModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'RESOURCES_TABLE_ID_ASC' + | 'RESOURCES_TABLE_ID_DESC' + | 'RESOURCE_EVENTS_TABLE_ID_ASC' + | 'RESOURCE_EVENTS_TABLE_ID_DESC' + | 'RESOURCES_TABLE_NAME_ASC' + | 'RESOURCES_TABLE_NAME_DESC' + | 'RESOURCE_EVENTS_TABLE_NAME_ASC' + | 'RESOURCE_EVENTS_TABLE_NAME_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'NAMESPACE_MODULE_ID_ASC' + | 'NAMESPACE_MODULE_ID_DESC' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'DEFAULT_PERMISSIONS_ASC' + | 'DEFAULT_PERMISSIONS_DESC'; /** Methods to use when ordering `StorageLogModule`. */ export type StorageLogModuleOrderBy = | 'NATURAL' @@ -3249,6 +3337,86 @@ export interface JSONListFilter { /** Any array item is greater than or equal to the specified value. */ anyGreaterThanOrEqualTo?: unknown; } +/** A filter to be used against `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseProvisionModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseName` field. */ + databaseName?: StringFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `subdomain` field. */ + subdomain?: StringFilter; + /** Filter by the object’s `domain` field. */ + domain?: StringFilter; + /** Filter by the object’s `modules` field. */ + modules?: JSONFilter; + /** Filter by the object’s `options` field. */ + options?: JSONFilter; + /** Filter by the object’s `bootstrapUser` field. */ + bootstrapUser?: BooleanFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `errorMessage` field. */ + errorMessage?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `completedAt` field. */ + completedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: DatabaseProvisionModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: DatabaseProvisionModuleFilter[]; + /** Negates the expression. */ + not?: DatabaseProvisionModuleFilter; +} +/** A filter to be used against `ConfigSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface ConfigSecretsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `configDefinitionsTableId` field. */ + configDefinitionsTableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `hasConfig` field. */ + hasConfig?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: ConfigSecretsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: ConfigSecretsModuleFilter[]; + /** Negates the expression. */ + not?: ConfigSecretsModuleFilter; +} /** A filter to be used against `GraphModule` object types. All fields are combined with a logical ‘and.’ */ export interface GraphModuleFilter { /** Filter by the object’s `id` field. */ @@ -3326,6 +3494,8 @@ export interface MerkleStoreModuleFilter { scope?: StringFilter; /** Filter by the object’s `functionPrefix` field. */ functionPrefix?: StringFilter; + /** Filter by the object’s `permissionKey` field. */ + permissionKey?: StringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Checks for all expressions in this list. */ @@ -3348,86 +3518,6 @@ export interface MerkleStoreModuleToManyGraphModuleFilter { /** Filters to entities where no related entity matches. */ none?: GraphModuleFilter; } -/** A filter to be used against `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ */ -export interface DatabaseProvisionModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseName` field. */ - databaseName?: StringFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `subdomain` field. */ - subdomain?: StringFilter; - /** Filter by the object’s `domain` field. */ - domain?: StringFilter; - /** Filter by the object’s `modules` field. */ - modules?: JSONFilter; - /** Filter by the object’s `options` field. */ - options?: JSONFilter; - /** Filter by the object’s `bootstrapUser` field. */ - bootstrapUser?: BooleanFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `errorMessage` field. */ - errorMessage?: StringFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `completedAt` field. */ - completedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: DatabaseProvisionModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: DatabaseProvisionModuleFilter[]; - /** Negates the expression. */ - not?: DatabaseProvisionModuleFilter; -} -/** A filter to be used against `ConfigSecretsModule` object types. All fields are combined with a logical ‘and.’ */ -export interface ConfigSecretsModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `publicSchemaName` field. */ - publicSchemaName?: StringFilter; - /** Filter by the object’s `privateSchemaName` field. */ - privateSchemaName?: StringFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `configDefinitionsTableId` field. */ - configDefinitionsTableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; - /** Filter by the object’s `apiName` field. */ - apiName?: StringFilter; - /** Filter by the object’s `privateApiName` field. */ - privateApiName?: StringFilter; - /** Filter by the object’s `scope` field. */ - scope?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; - /** Filter by the object’s `entityTableId` field. */ - entityTableId?: UUIDFilter; - /** Filter by the object’s `policies` field. */ - policies?: JSONFilter; - /** Filter by the object’s `provisions` field. */ - provisions?: JSONFilter; - /** Filter by the object’s `hasConfig` field. */ - hasConfig?: BooleanFilter; - /** Checks for all expressions in this list. */ - and?: ConfigSecretsModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: ConfigSecretsModuleFilter[]; - /** Negates the expression. */ - not?: ConfigSecretsModuleFilter; -} /** A filter to be used against `RateLimitMetersModule` object types. All fields are combined with a logical ‘and.’ */ export interface RateLimitMetersModuleFilter { /** Filter by the object’s `id` field. */ @@ -3684,6 +3774,51 @@ export interface InvitesModuleFilter { /** Negates the expression. */ not?: InvitesModuleFilter; } +/** A filter to be used against `PrincipalAuthModule` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalAuthModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `principalsTableId` field. */ + principalsTableId?: UUIDFilter; + /** Filter by the object’s `principalEntitiesTableId` field. */ + principalEntitiesTableId?: UUIDFilter; + /** Filter by the object’s `principalScopeOverridesTableId` field. */ + principalScopeOverridesTableId?: UUIDFilter; + /** Filter by the object’s `usersTableId` field. */ + usersTableId?: UUIDFilter; + /** Filter by the object’s `sessionsTableId` field. */ + sessionsTableId?: UUIDFilter; + /** Filter by the object’s `sessionCredentialsTableId` field. */ + sessionCredentialsTableId?: UUIDFilter; + /** Filter by the object’s `auditsTableId` field. */ + auditsTableId?: UUIDFilter; + /** Filter by the object’s `principalsTableName` field. */ + principalsTableName?: StringFilter; + /** Filter by the object’s `createPrincipalFunction` field. */ + createPrincipalFunction?: StringFilter; + /** Filter by the object’s `deletePrincipalFunction` field. */ + deletePrincipalFunction?: StringFilter; + /** Filter by the object’s `createOrgPrincipalFunction` field. */ + createOrgPrincipalFunction?: StringFilter; + /** Filter by the object’s `deleteOrgPrincipalFunction` field. */ + deleteOrgPrincipalFunction?: StringFilter; + /** Filter by the object’s `createOrgApiKeyFunction` field. */ + createOrgApiKeyFunction?: StringFilter; + /** Filter by the object’s `revokeOrgApiKeyFunction` field. */ + revokeOrgApiKeyFunction?: StringFilter; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalAuthModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalAuthModuleFilter[]; + /** Negates the expression. */ + not?: PrincipalAuthModuleFilter; +} /** A filter to be used against `ComputeLogModule` object types. All fields are combined with a logical ‘and.’ */ export interface ComputeLogModuleFilter { /** Filter by the object’s `id` field. */ @@ -3825,6 +3960,57 @@ export interface NamespaceModuleFilter { /** Negates the expression. */ not?: NamespaceModuleFilter; } +/** A filter to be used against `ResourceModule` object types. All fields are combined with a logical ‘and.’ */ +export interface ResourceModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `resourcesTableId` field. */ + resourcesTableId?: UUIDFilter; + /** Filter by the object’s `resourceEventsTableId` field. */ + resourceEventsTableId?: UUIDFilter; + /** Filter by the object’s `resourcesTableName` field. */ + resourcesTableName?: StringFilter; + /** Filter by the object’s `resourceEventsTableName` field. */ + resourceEventsTableName?: StringFilter; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `namespaceModuleId` field. */ + namespaceModuleId?: UUIDFilter; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `defaultPermissions` field. */ + defaultPermissions?: StringListFilter; + /** Checks for all expressions in this list. */ + and?: ResourceModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceModuleFilter[]; + /** Negates the expression. */ + not?: ResourceModuleFilter; + /** Filter by the object’s `namespaceModule` relation. */ + namespaceModule?: NamespaceModuleFilter; + /** A related `namespaceModule` exists. */ + namespaceModuleExists?: boolean; +} /** A filter to be used against `StorageLogModule` object types. All fields are combined with a logical ‘and.’ */ export interface StorageLogModuleFilter { /** Filter by the object’s `id` field. */ @@ -5654,30 +5840,6 @@ export interface SecureTableProvisionInput { /** Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. */ outFields?: string[]; } -export interface CreateMerkleStoreModuleInput { - clientMutationId?: string; - /** The `MerkleStoreModule` to be created by this mutation. */ - merkleStoreModule: MerkleStoreModuleInput; -} -/** An input for mutations affecting `MerkleStoreModule` */ -export interface MerkleStoreModuleInput { - id?: string; - databaseId: string; - schemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - objectTableId?: string; - storeTableId?: string; - commitTableId?: string; - refTableId?: string; - prefix?: string; - apiName?: string; - privateApiName?: string; - scope?: string; - functionPrefix?: string; - createdAt?: string; -} export interface CreateDatabaseProvisionModuleInput { clientMutationId?: string; /** The `DatabaseProvisionModule` to be created by this mutation. */ @@ -5759,6 +5921,31 @@ export interface GraphModuleInput { defaultPermissions?: string[]; createdAt?: string; } +export interface CreateMerkleStoreModuleInput { + clientMutationId?: string; + /** The `MerkleStoreModule` to be created by this mutation. */ + merkleStoreModule: MerkleStoreModuleInput; +} +/** An input for mutations affecting `MerkleStoreModule` */ +export interface MerkleStoreModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + objectTableId?: string; + storeTableId?: string; + commitTableId?: string; + refTableId?: string; + prefix?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + functionPrefix?: string; + permissionKey?: string; + createdAt?: string; +} export interface CreateRateLimitMetersModuleInput { clientMutationId?: string; /** The `RateLimitMetersModule` to be created by this mutation. */ @@ -5908,6 +6095,32 @@ export interface InvitesModuleInput { apiName?: string; privateApiName?: string; } +export interface CreatePrincipalAuthModuleInput { + clientMutationId?: string; + /** The `PrincipalAuthModule` to be created by this mutation. */ + principalAuthModule: PrincipalAuthModuleInput; +} +/** An input for mutations affecting `PrincipalAuthModule` */ +export interface PrincipalAuthModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + principalsTableId?: string; + principalEntitiesTableId?: string; + principalScopeOverridesTableId?: string; + usersTableId?: string; + sessionsTableId?: string; + sessionCredentialsTableId?: string; + auditsTableId?: string; + principalsTableName?: string; + createPrincipalFunction?: string; + deletePrincipalFunction?: string; + createOrgPrincipalFunction?: string; + deleteOrgPrincipalFunction?: string; + createOrgApiKeyFunction?: string; + revokeOrgApiKeyFunction?: string; + apiName?: string; +} export interface CreateComputeLogModuleInput { clientMutationId?: string; /** The `ComputeLogModule` to be created by this mutation. */ @@ -5989,6 +6202,33 @@ export interface NamespaceModuleInput { provisions?: unknown; defaultPermissions?: string[]; } +export interface CreateResourceModuleInput { + clientMutationId?: string; + /** The `ResourceModule` to be created by this mutation. */ + resourceModule: ResourceModuleInput; +} +/** An input for mutations affecting `ResourceModule` */ +export interface ResourceModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + resourcesTableId?: string; + resourceEventsTableId?: string; + resourcesTableName?: string; + resourceEventsTableName?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + prefix?: string; + entityTableId?: string; + namespaceModuleId?: string; + policies?: unknown; + provisions?: unknown; + defaultPermissions?: string[]; +} export interface CreateStorageLogModuleInput { clientMutationId?: string; /** The `StorageLogModule` to be created by this mutation. */ @@ -7538,31 +7778,6 @@ export interface SecureTableProvisionPatch { /** Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. */ outFields?: string[]; } -export interface UpdateMerkleStoreModuleInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `MerkleStoreModule` being updated. */ - merkleStoreModulePatch: MerkleStoreModulePatch; -} -/** Represents an update to a `MerkleStoreModule`. Fields that are set will be updated. */ -export interface MerkleStoreModulePatch { - id?: string; - databaseId?: string; - schemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - objectTableId?: string; - storeTableId?: string; - commitTableId?: string; - refTableId?: string; - prefix?: string; - apiName?: string; - privateApiName?: string; - scope?: string; - functionPrefix?: string; - createdAt?: string; -} export interface UpdateDatabaseProvisionModuleInput { clientMutationId?: string; id: string; @@ -7647,6 +7862,32 @@ export interface GraphModulePatch { defaultPermissions?: string[]; createdAt?: string; } +export interface UpdateMerkleStoreModuleInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `MerkleStoreModule` being updated. */ + merkleStoreModulePatch: MerkleStoreModulePatch; +} +/** Represents an update to a `MerkleStoreModule`. Fields that are set will be updated. */ +export interface MerkleStoreModulePatch { + id?: string; + databaseId?: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + objectTableId?: string; + storeTableId?: string; + commitTableId?: string; + refTableId?: string; + prefix?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + functionPrefix?: string; + permissionKey?: string; + createdAt?: string; +} export interface UpdateRateLimitMetersModuleInput { clientMutationId?: string; id: string; @@ -7802,6 +8043,33 @@ export interface InvitesModulePatch { apiName?: string; privateApiName?: string; } +export interface UpdatePrincipalAuthModuleInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `PrincipalAuthModule` being updated. */ + principalAuthModulePatch: PrincipalAuthModulePatch; +} +/** Represents an update to a `PrincipalAuthModule`. Fields that are set will be updated. */ +export interface PrincipalAuthModulePatch { + id?: string; + databaseId?: string; + schemaId?: string; + principalsTableId?: string; + principalEntitiesTableId?: string; + principalScopeOverridesTableId?: string; + usersTableId?: string; + sessionsTableId?: string; + sessionCredentialsTableId?: string; + auditsTableId?: string; + principalsTableName?: string; + createPrincipalFunction?: string; + deletePrincipalFunction?: string; + createOrgPrincipalFunction?: string; + deleteOrgPrincipalFunction?: string; + createOrgApiKeyFunction?: string; + revokeOrgApiKeyFunction?: string; + apiName?: string; +} export interface UpdateComputeLogModuleInput { clientMutationId?: string; id: string; @@ -7886,6 +8154,34 @@ export interface NamespaceModulePatch { provisions?: unknown; defaultPermissions?: string[]; } +export interface UpdateResourceModuleInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `ResourceModule` being updated. */ + resourceModulePatch: ResourceModulePatch; +} +/** Represents an update to a `ResourceModule`. Fields that are set will be updated. */ +export interface ResourceModulePatch { + id?: string; + databaseId?: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + resourcesTableId?: string; + resourceEventsTableId?: string; + resourcesTableName?: string; + resourceEventsTableName?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + prefix?: string; + entityTableId?: string; + namespaceModuleId?: string; + policies?: unknown; + provisions?: unknown; + defaultPermissions?: string[]; +} export interface UpdateStorageLogModuleInput { clientMutationId?: string; id: string; @@ -9075,10 +9371,6 @@ export interface DeleteSecureTableProvisionInput { /** Unique identifier for this provision row. */ id: string; } -export interface DeleteMerkleStoreModuleInput { - clientMutationId?: string; - id: string; -} export interface DeleteDatabaseProvisionModuleInput { clientMutationId?: string; id: string; @@ -9091,6 +9383,10 @@ export interface DeleteGraphModuleInput { clientMutationId?: string; id: string; } +export interface DeleteMerkleStoreModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteRateLimitMetersModuleInput { clientMutationId?: string; id: string; @@ -9115,6 +9411,10 @@ export interface DeleteInvitesModuleInput { clientMutationId?: string; id: string; } +export interface DeletePrincipalAuthModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteComputeLogModuleInput { clientMutationId?: string; id: string; @@ -9127,6 +9427,10 @@ export interface DeleteNamespaceModuleInput { clientMutationId?: string; id: string; } +export interface DeleteResourceModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteStorageLogModuleInput { clientMutationId?: string; id: string; @@ -9398,13 +9702,6 @@ export interface SecureTableProvisionConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `MerkleStoreModule` values. */ -export interface MerkleStoreModuleConnection { - nodes: MerkleStoreModule[]; - edges: MerkleStoreModuleEdge[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `DatabaseProvisionModule` values. */ export interface DatabaseProvisionModuleConnection { nodes: DatabaseProvisionModule[]; @@ -9426,6 +9723,13 @@ export interface GraphModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `MerkleStoreModule` values. */ +export interface MerkleStoreModuleConnection { + nodes: MerkleStoreModule[]; + edges: MerkleStoreModuleEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `RateLimitMetersModule` values. */ export interface RateLimitMetersModuleConnection { nodes: RateLimitMetersModule[]; @@ -9468,6 +9772,13 @@ export interface InvitesModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `PrincipalAuthModule` values. */ +export interface PrincipalAuthModuleConnection { + nodes: PrincipalAuthModule[]; + edges: PrincipalAuthModuleEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `ComputeLogModule` values. */ export interface ComputeLogModuleConnection { nodes: ComputeLogModule[]; @@ -9489,6 +9800,13 @@ export interface NamespaceModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `ResourceModule` values. */ +export interface ResourceModuleConnection { + nodes: ResourceModule[]; + edges: ResourceModuleEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `StorageLogModule` values. */ export interface StorageLogModuleConnection { nodes: StorageLogModule[]; @@ -9824,12 +10142,6 @@ export interface CreateSecureTableProvisionPayload { secureTableProvision?: SecureTableProvision | null; secureTableProvisionEdge?: SecureTableProvisionEdge | null; } -export interface CreateMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was created by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} export interface CreateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was created by this mutation. */ @@ -9848,6 +10160,12 @@ export interface CreateGraphModulePayload { graphModule?: GraphModule | null; graphModuleEdge?: GraphModuleEdge | null; } +export interface CreateMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was created by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} export interface CreateRateLimitMetersModulePayload { clientMutationId?: string | null; /** The `RateLimitMetersModule` that was created by this mutation. */ @@ -9884,6 +10202,12 @@ export interface CreateInvitesModulePayload { invitesModule?: InvitesModule | null; invitesModuleEdge?: InvitesModuleEdge | null; } +export interface CreatePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was created by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} export interface CreateComputeLogModulePayload { clientMutationId?: string | null; /** The `ComputeLogModule` that was created by this mutation. */ @@ -9902,6 +10226,12 @@ export interface CreateNamespaceModulePayload { namespaceModule?: NamespaceModule | null; namespaceModuleEdge?: NamespaceModuleEdge | null; } +export interface CreateResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was created by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} export interface CreateStorageLogModulePayload { clientMutationId?: string | null; /** The `StorageLogModule` that was created by this mutation. */ @@ -10178,12 +10508,6 @@ export interface UpdateSecureTableProvisionPayload { secureTableProvision?: SecureTableProvision | null; secureTableProvisionEdge?: SecureTableProvisionEdge | null; } -export interface UpdateMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was updated by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} export interface UpdateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was updated by this mutation. */ @@ -10202,6 +10526,12 @@ export interface UpdateGraphModulePayload { graphModule?: GraphModule | null; graphModuleEdge?: GraphModuleEdge | null; } +export interface UpdateMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was updated by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} export interface UpdateRateLimitMetersModulePayload { clientMutationId?: string | null; /** The `RateLimitMetersModule` that was updated by this mutation. */ @@ -10238,6 +10568,12 @@ export interface UpdateInvitesModulePayload { invitesModule?: InvitesModule | null; invitesModuleEdge?: InvitesModuleEdge | null; } +export interface UpdatePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was updated by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} export interface UpdateComputeLogModulePayload { clientMutationId?: string | null; /** The `ComputeLogModule` that was updated by this mutation. */ @@ -10256,6 +10592,12 @@ export interface UpdateNamespaceModulePayload { namespaceModule?: NamespaceModule | null; namespaceModuleEdge?: NamespaceModuleEdge | null; } +export interface UpdateResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was updated by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} export interface UpdateStorageLogModulePayload { clientMutationId?: string | null; /** The `StorageLogModule` that was updated by this mutation. */ @@ -10532,12 +10874,6 @@ export interface DeleteSecureTableProvisionPayload { secureTableProvision?: SecureTableProvision | null; secureTableProvisionEdge?: SecureTableProvisionEdge | null; } -export interface DeleteMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was deleted by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} export interface DeleteDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was deleted by this mutation. */ @@ -10556,6 +10892,12 @@ export interface DeleteGraphModulePayload { graphModule?: GraphModule | null; graphModuleEdge?: GraphModuleEdge | null; } +export interface DeleteMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was deleted by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} export interface DeleteRateLimitMetersModulePayload { clientMutationId?: string | null; /** The `RateLimitMetersModule` that was deleted by this mutation. */ @@ -10592,6 +10934,12 @@ export interface DeleteInvitesModulePayload { invitesModule?: InvitesModule | null; invitesModuleEdge?: InvitesModuleEdge | null; } +export interface DeletePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was deleted by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} export interface DeleteComputeLogModulePayload { clientMutationId?: string | null; /** The `ComputeLogModule` that was deleted by this mutation. */ @@ -10610,6 +10958,12 @@ export interface DeleteNamespaceModulePayload { namespaceModule?: NamespaceModule | null; namespaceModuleEdge?: NamespaceModuleEdge | null; } +export interface DeleteResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was deleted by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} export interface DeleteStorageLogModulePayload { clientMutationId?: string | null; /** The `StorageLogModule` that was deleted by this mutation. */ @@ -10911,12 +11265,6 @@ export interface SecureTableProvisionEdge { /** The `SecureTableProvision` at the end of the edge. */ node?: SecureTableProvision | null; } -/** A `MerkleStoreModule` edge in the connection. */ -export interface MerkleStoreModuleEdge { - cursor?: string | null; - /** The `MerkleStoreModule` at the end of the edge. */ - node?: MerkleStoreModule | null; -} /** A `DatabaseProvisionModule` edge in the connection. */ export interface DatabaseProvisionModuleEdge { cursor?: string | null; @@ -10935,6 +11283,12 @@ export interface GraphModuleEdge { /** The `GraphModule` at the end of the edge. */ node?: GraphModule | null; } +/** A `MerkleStoreModule` edge in the connection. */ +export interface MerkleStoreModuleEdge { + cursor?: string | null; + /** The `MerkleStoreModule` at the end of the edge. */ + node?: MerkleStoreModule | null; +} /** A `RateLimitMetersModule` edge in the connection. */ export interface RateLimitMetersModuleEdge { cursor?: string | null; @@ -10971,6 +11325,12 @@ export interface InvitesModuleEdge { /** The `InvitesModule` at the end of the edge. */ node?: InvitesModule | null; } +/** A `PrincipalAuthModule` edge in the connection. */ +export interface PrincipalAuthModuleEdge { + cursor?: string | null; + /** The `PrincipalAuthModule` at the end of the edge. */ + node?: PrincipalAuthModule | null; +} /** A `ComputeLogModule` edge in the connection. */ export interface ComputeLogModuleEdge { cursor?: string | null; @@ -10989,6 +11349,12 @@ export interface NamespaceModuleEdge { /** The `NamespaceModule` at the end of the edge. */ node?: NamespaceModule | null; } +/** A `ResourceModule` edge in the connection. */ +export interface ResourceModuleEdge { + cursor?: string | null; + /** The `ResourceModule` at the end of the edge. */ + node?: ResourceModule | null; +} /** A `StorageLogModule` edge in the connection. */ export interface StorageLogModuleEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/modules/types.ts b/sdk/constructive-react/src/modules/types.ts index 3cdbc9e2af..64fb486108 100644 --- a/sdk/constructive-react/src/modules/types.ts +++ b/sdk/constructive-react/src/modules/types.ts @@ -297,23 +297,40 @@ export interface SecureTableProvision { policies: unknown | null; outFields: string[] | null; } -export interface MerkleStoreModule { +export interface DatabaseProvisionModule { + id: string | null; + databaseName: string | null; + ownerId: string | null; + subdomain: string | null; + domain: string | null; + modules: unknown | null; + options: unknown | null; + bootstrapUser: boolean | null; + status: string | null; + errorMessage: string | null; + databaseId: string | null; + createdAt: string | null; + updatedAt: string | null; + completedAt: string | null; +} +export interface ConfigSecretsModule { id: string | null; databaseId: string | null; schemaId: string | null; privateSchemaId: string | null; publicSchemaName: string | null; privateSchemaName: string | null; - objectTableId: string | null; - storeTableId: string | null; - commitTableId: string | null; - refTableId: string | null; - prefix: string | null; + tableId: string | null; + configDefinitionsTableId: string | null; + tableName: string | null; apiName: string | null; privateApiName: string | null; scope: string | null; - functionPrefix: string | null; - createdAt: string | null; + prefix: string | null; + entityTableId: string | null; + policies: unknown | null; + provisions: unknown | null; + hasConfig: boolean | null; } export interface GraphModule { id: string | null; @@ -334,40 +351,24 @@ export interface GraphModule { defaultPermissions: string[] | null; createdAt: string | null; } -export interface DatabaseProvisionModule { - id: string | null; - databaseName: string | null; - ownerId: string | null; - subdomain: string | null; - domain: string | null; - modules: unknown | null; - options: unknown | null; - bootstrapUser: boolean | null; - status: string | null; - errorMessage: string | null; - databaseId: string | null; - createdAt: string | null; - updatedAt: string | null; - completedAt: string | null; -} -export interface ConfigSecretsModule { +export interface MerkleStoreModule { id: string | null; databaseId: string | null; schemaId: string | null; privateSchemaId: string | null; publicSchemaName: string | null; privateSchemaName: string | null; - tableId: string | null; - configDefinitionsTableId: string | null; - tableName: string | null; + objectTableId: string | null; + storeTableId: string | null; + commitTableId: string | null; + refTableId: string | null; + prefix: string | null; apiName: string | null; privateApiName: string | null; scope: string | null; - prefix: string | null; - entityTableId: string | null; - policies: unknown | null; - provisions: unknown | null; - hasConfig: boolean | null; + functionPrefix: string | null; + permissionKey: string | null; + createdAt: string | null; } export interface RateLimitMetersModule { id: string | null; @@ -482,6 +483,26 @@ export interface InvitesModule { apiName: string | null; privateApiName: string | null; } +export interface PrincipalAuthModule { + id: string | null; + databaseId: string | null; + schemaId: string | null; + principalsTableId: string | null; + principalEntitiesTableId: string | null; + principalScopeOverridesTableId: string | null; + usersTableId: string | null; + sessionsTableId: string | null; + sessionCredentialsTableId: string | null; + auditsTableId: string | null; + principalsTableName: string | null; + createPrincipalFunction: string | null; + deletePrincipalFunction: string | null; + createOrgPrincipalFunction: string | null; + deleteOrgPrincipalFunction: string | null; + createOrgApiKeyFunction: string | null; + revokeOrgApiKeyFunction: string | null; + apiName: string | null; +} export interface ComputeLogModule { id: string | null; databaseId: string | null; @@ -545,6 +566,27 @@ export interface NamespaceModule { provisions: unknown | null; defaultPermissions: string[] | null; } +export interface ResourceModule { + id: string | null; + databaseId: string | null; + schemaId: string | null; + privateSchemaId: string | null; + publicSchemaName: string | null; + privateSchemaName: string | null; + resourcesTableId: string | null; + resourceEventsTableId: string | null; + resourcesTableName: string | null; + resourceEventsTableName: string | null; + apiName: string | null; + privateApiName: string | null; + scope: string | null; + prefix: string | null; + entityTableId: string | null; + namespaceModuleId: string | null; + policies: unknown | null; + provisions: unknown | null; + defaultPermissions: string[] | null; +} export interface StorageLogModule { id: string | null; databaseId: string | null; diff --git a/sdk/constructive-sdk/schemas/api.graphql b/sdk/constructive-sdk/schemas/api.graphql index a135cb5868..8a6e282140 100644 --- a/sdk/constructive-sdk/schemas/api.graphql +++ b/sdk/constructive-sdk/schemas/api.graphql @@ -234,35 +234,6 @@ type Query { orderBy: [ViewGrantOrderBy!] = [PRIMARY_KEY_ASC] ): ViewGrantConnection - """Reads and enables pagination through a set of `Api`.""" - apis( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: ApiFilter - - """The method to use when ordering `Api`.""" - orderBy: [ApiOrderBy!] = [PRIMARY_KEY_ASC] - ): ApiConnection - """Reads and enables pagination through a set of `CorsSetting`.""" corsSettings( """Only read the first `n` values of the set.""" @@ -379,6 +350,35 @@ type Query { orderBy: [SiteModuleOrderBy!] = [PRIMARY_KEY_ASC] ): SiteModuleConnection + """Reads and enables pagination through a set of `Api`.""" + apis( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ApiFilter + + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!] = [PRIMARY_KEY_ASC] + ): ApiConnection + """Reads and enables pagination through a set of `SiteMetadatum`.""" siteMetadata( """Only read the first `n` values of the set.""" @@ -553,35 +553,6 @@ type Query { orderBy: [TableGrantOrderBy!] = [PRIMARY_KEY_ASC] ): TableGrantConnection - """Reads and enables pagination through a set of `Domain`.""" - domains( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: DomainFilter - - """The method to use when ordering `Domain`.""" - orderBy: [DomainOrderBy!] = [PRIMARY_KEY_ASC] - ): DomainConnection - """Reads and enables pagination through a set of `RlsSetting`.""" rlsSettings( """Only read the first `n` values of the set.""" @@ -669,8 +640,8 @@ type Query { orderBy: [PartitionOrderBy!] = [PRIMARY_KEY_ASC] ): PartitionConnection - """Reads and enables pagination through a set of `CompositeType`.""" - compositeTypes( + """Reads and enables pagination through a set of `Domain`.""" + domains( """Only read the first `n` values of the set.""" first: Int @@ -692,14 +663,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: CompositeTypeFilter + where: DomainFilter - """The method to use when ordering `CompositeType`.""" - orderBy: [CompositeTypeOrderBy!] = [PRIMARY_KEY_ASC] - ): CompositeTypeConnection + """The method to use when ordering `Domain`.""" + orderBy: [DomainOrderBy!] = [PRIMARY_KEY_ASC] + ): DomainConnection - """Reads and enables pagination through a set of `Enum`.""" - enums( + """Reads and enables pagination through a set of `CompositeType`.""" + compositeTypes( """Only read the first `n` values of the set.""" first: Int @@ -721,14 +692,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: EnumFilter + where: CompositeTypeFilter - """The method to use when ordering `Enum`.""" - orderBy: [EnumOrderBy!] = [PRIMARY_KEY_ASC] - ): EnumConnection + """The method to use when ordering `CompositeType`.""" + orderBy: [CompositeTypeOrderBy!] = [PRIMARY_KEY_ASC] + ): CompositeTypeConnection - """Reads and enables pagination through a set of `SqlAction`.""" - sqlActions( + """Reads and enables pagination through a set of `Enum`.""" + enums( """Only read the first `n` values of the set.""" first: Int @@ -750,11 +721,11 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: SqlActionFilter + where: EnumFilter - """The method to use when ordering `SqlAction`.""" - orderBy: [SqlActionOrderBy!] = [NATURAL] - ): SqlActionConnection + """The method to use when ordering `Enum`.""" + orderBy: [EnumOrderBy!] = [PRIMARY_KEY_ASC] + ): EnumConnection """Reads and enables pagination through a set of `View`.""" views( @@ -785,66 +756,8 @@ type Query { orderBy: [ViewOrderBy!] = [PRIMARY_KEY_ASC] ): ViewConnection - """Reads and enables pagination through a set of `DatabaseSetting`.""" - databaseSettings( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: DatabaseSettingFilter - - """The method to use when ordering `DatabaseSetting`.""" - orderBy: [DatabaseSettingOrderBy!] = [PRIMARY_KEY_ASC] - ): DatabaseSettingConnection - - """Reads and enables pagination through a set of `ApiSetting`.""" - apiSettings( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: ApiSettingFilter - - """The method to use when ordering `ApiSetting`.""" - orderBy: [ApiSettingOrderBy!] = [PRIMARY_KEY_ASC] - ): ApiSettingConnection - - """Reads and enables pagination through a set of `DatabaseTransfer`.""" - databaseTransfers( + """Reads and enables pagination through a set of `SqlAction`.""" + sqlActions( """Only read the first `n` values of the set.""" first: Int @@ -866,11 +779,11 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: DatabaseTransferFilter + where: SqlActionFilter - """The method to use when ordering `DatabaseTransfer`.""" - orderBy: [DatabaseTransferOrderBy!] = [PRIMARY_KEY_ASC] - ): DatabaseTransferConnection + """The method to use when ordering `SqlAction`.""" + orderBy: [SqlActionOrderBy!] = [NATURAL] + ): SqlActionConnection """Reads and enables pagination through a set of `PrimaryKeyConstraint`.""" primaryKeyConstraints( @@ -1046,8 +959,8 @@ type Query { orderBy: [PolicyOrderBy!] = [PRIMARY_KEY_ASC] ): PolicyConnection - """Reads and enables pagination through a set of `App`.""" - apps( + """Reads and enables pagination through a set of `ApiSetting`.""" + apiSettings( """Only read the first `n` values of the set.""" first: Int @@ -1069,14 +982,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: AppFilter + where: ApiSettingFilter - """The method to use when ordering `App`.""" - orderBy: [AppOrderBy!] = [PRIMARY_KEY_ASC] - ): AppConnection + """The method to use when ordering `ApiSetting`.""" + orderBy: [ApiSettingOrderBy!] = [PRIMARY_KEY_ASC] + ): ApiSettingConnection - """Reads and enables pagination through a set of `Site`.""" - sites( + """Reads and enables pagination through a set of `DatabaseTransfer`.""" + databaseTransfers( """Only read the first `n` values of the set.""" first: Int @@ -1098,11 +1011,11 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: SiteFilter + where: DatabaseTransferFilter - """The method to use when ordering `Site`.""" - orderBy: [SiteOrderBy!] = [PRIMARY_KEY_ASC] - ): SiteConnection + """The method to use when ordering `DatabaseTransfer`.""" + orderBy: [DatabaseTransferOrderBy!] = [PRIMARY_KEY_ASC] + ): DatabaseTransferConnection """Reads and enables pagination through a set of `Index`.""" indices( @@ -1133,8 +1046,8 @@ type Query { orderBy: [IndexOrderBy!] = [PRIMARY_KEY_ASC] ): IndexConnection - """Reads and enables pagination through a set of `ForeignKeyConstraint`.""" - foreignKeyConstraints( + """Reads and enables pagination through a set of `App`.""" + apps( """Only read the first `n` values of the set.""" first: Int @@ -1156,14 +1069,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: ForeignKeyConstraintFilter + where: AppFilter - """The method to use when ordering `ForeignKeyConstraint`.""" - orderBy: [ForeignKeyConstraintOrderBy!] = [PRIMARY_KEY_ASC] - ): ForeignKeyConstraintConnection + """The method to use when ordering `App`.""" + orderBy: [AppOrderBy!] = [PRIMARY_KEY_ASC] + ): AppConnection - """Reads and enables pagination through a set of `EmbeddingChunk`.""" - embeddingChunks( + """Reads and enables pagination through a set of `DatabaseSetting`.""" + databaseSettings( """Only read the first `n` values of the set.""" first: Int @@ -1185,14 +1098,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: EmbeddingChunkFilter + where: DatabaseSettingFilter - """The method to use when ordering `EmbeddingChunk`.""" - orderBy: [EmbeddingChunkOrderBy!] = [PRIMARY_KEY_ASC] - ): EmbeddingChunkConnection + """The method to use when ordering `DatabaseSetting`.""" + orderBy: [DatabaseSettingOrderBy!] = [PRIMARY_KEY_ASC] + ): DatabaseSettingConnection - """Reads and enables pagination through a set of `WebauthnSetting`.""" - webauthnSettings( + """Reads and enables pagination through a set of `Site`.""" + sites( """Only read the first `n` values of the set.""" first: Int @@ -1214,15 +1127,102 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: WebauthnSettingFilter + where: SiteFilter - """The method to use when ordering `WebauthnSetting`.""" - orderBy: [WebauthnSettingOrderBy!] = [PRIMARY_KEY_ASC] - ): WebauthnSettingConnection + """The method to use when ordering `Site`.""" + orderBy: [SiteOrderBy!] = [PRIMARY_KEY_ASC] + ): SiteConnection - """Reads and enables pagination through a set of `AstMigration`.""" - astMigrations( - """Only read the first `n` values of the set.""" + """Reads and enables pagination through a set of `ForeignKeyConstraint`.""" + foreignKeyConstraints( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ForeignKeyConstraintFilter + + """The method to use when ordering `ForeignKeyConstraint`.""" + orderBy: [ForeignKeyConstraintOrderBy!] = [PRIMARY_KEY_ASC] + ): ForeignKeyConstraintConnection + + """Reads and enables pagination through a set of `EmbeddingChunk`.""" + embeddingChunks( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: EmbeddingChunkFilter + + """The method to use when ordering `EmbeddingChunk`.""" + orderBy: [EmbeddingChunkOrderBy!] = [PRIMARY_KEY_ASC] + ): EmbeddingChunkConnection + + """Reads and enables pagination through a set of `WebauthnSetting`.""" + webauthnSettings( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: WebauthnSettingFilter + + """The method to use when ordering `WebauthnSetting`.""" + orderBy: [WebauthnSettingOrderBy!] = [PRIMARY_KEY_ASC] + ): WebauthnSettingConnection + + """Reads and enables pagination through a set of `AstMigration`.""" + astMigrations( + """Only read the first `n` values of the set.""" first: Int """Only read the last `n` values of the set.""" @@ -2513,7 +2513,6 @@ type Schema { description: String smartTags: JSON category: ObjectCategory! - scope: Int tags: [String]! isPublic: Boolean! apiExposure: ApiExposureLevel! @@ -2797,7 +2796,6 @@ type Table { description: String smartTags: JSON category: ObjectCategory! - scope: Int useRls: Boolean! timestamps: Boolean! peoplestamps: Boolean! @@ -3318,7 +3316,6 @@ type CheckConstraint { expr: JSON smartTags: JSON category: ObjectCategory! - scope: Int tags: [String]! createdAt: Datetime updatedAt: Datetime @@ -3388,9 +3385,6 @@ input CheckConstraintFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -3752,48 +3746,6 @@ input ObjectCategoryFilter { greaterThanOrEqualTo: ObjectCategory } -""" -A filter to be used against Int fields. All fields are combined with a logical ‘and.’ -""" -input IntFilter { - """ - Is null (if `true` is specified) or is not null (if `false` is specified). - """ - isNull: Boolean - - """Equal to the specified value.""" - equalTo: Int - - """Not equal to the specified value.""" - notEqualTo: Int - - """ - Not equal to the specified value, treating null like an ordinary value. - """ - distinctFrom: Int - - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: Int - - """Included in the specified list.""" - in: [Int!] - - """Not included in the specified list.""" - notIn: [Int!] - - """Less than the specified value.""" - lessThan: Int - - """Less than or equal to the specified value.""" - lessThanOrEqualTo: Int - - """Greater than the specified value.""" - greaterThan: Int - - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: Int -} - """ A filter to be used against String List fields. All fields are combined with a logical ‘and.’ """ @@ -4225,9 +4177,6 @@ input SchemaFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -4430,9 +4379,6 @@ input TableFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `useRls` field.""" useRls: BooleanFilter @@ -4685,9 +4631,6 @@ input FieldFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter @@ -4722,6 +4665,48 @@ input FieldFilter { spatialRelationsByRefFieldIdExist: Boolean } +""" +A filter to be used against Int fields. All fields are combined with a logical ‘and.’ +""" +input IntFilter { + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Equal to the specified value.""" + equalTo: Int + + """Not equal to the specified value.""" + notEqualTo: Int + + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: Int + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: Int + + """Included in the specified list.""" + in: [Int!] + + """Not included in the specified list.""" + notIn: [Int!] + + """Less than the specified value.""" + lessThan: Int + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: Int + + """Greater than the specified value.""" + greaterThan: Int + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: Int +} + """ A filter to be used against Float fields. All fields are combined with a logical ‘and.’ """ @@ -4812,9 +4797,6 @@ input SpatialRelationFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -4906,9 +4888,6 @@ input ForeignKeyConstraintFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -5061,9 +5040,6 @@ input IndexFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -5143,9 +5119,6 @@ input PolicyFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -5213,9 +5186,6 @@ input PrimaryKeyConstraintFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -5344,9 +5314,6 @@ input TriggerFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -5417,9 +5384,6 @@ input UniqueConstraintFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -5502,9 +5466,6 @@ input ViewFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -6078,9 +6039,6 @@ input EnumFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -6191,9 +6149,6 @@ input CompositeTypeFilter { """Filter by the object’s `category` field.""" category: ObjectCategoryFilter - """Filter by the object’s `scope` field.""" - scope: IntFilter - """Filter by the object’s `tags` field.""" tags: StringListFilter @@ -6287,6 +6242,12 @@ input ApiFilter { """Filter by the object’s `isPublic` field.""" isPublic: BooleanFilter + """Filter by the object’s `labels` field.""" + labels: JSONFilter + + """Filter by the object’s `annotations` field.""" + annotations: JSONFilter + """Checks for all expressions in this list.""" and: [ApiFilter!] @@ -6420,12 +6381,21 @@ input DomainFilter { """Filter by the object’s `siteId` field.""" siteId: UUIDFilter + """Filter by the object’s `serviceId` field.""" + serviceId: UUIDFilter + """Filter by the object’s `subdomain` field.""" subdomain: ConstructiveInternalTypeHostnameFilter """Filter by the object’s `domain` field.""" domain: ConstructiveInternalTypeHostnameFilter + """Filter by the object’s `labels` field.""" + labels: JSONFilter + + """Filter by the object’s `annotations` field.""" + annotations: JSONFilter + """Checks for all expressions in this list.""" and: [DomainFilter!] @@ -6616,6 +6586,12 @@ input SiteFilter { """Filter by the object’s `dbname` field.""" dbname: StringFilter + """Filter by the object’s `labels` field.""" + labels: JSONFilter + + """Filter by the object’s `annotations` field.""" + annotations: JSONFilter + """Checks for all expressions in this list.""" and: [SiteFilter!] @@ -7927,6 +7903,12 @@ input DatabaseSettingFilter { """Filter by the object’s `options` field.""" options: JSONFilter + """Filter by the object’s `labels` field.""" + labels: JSONFilter + + """Filter by the object’s `annotations` field.""" + annotations: JSONFilter + """Checks for all expressions in this list.""" and: [DatabaseSettingFilter!] @@ -8334,8 +8316,6 @@ enum CheckConstraintOrderBy { SMART_TAGS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC CREATED_AT_ASC @@ -8381,7 +8361,6 @@ type Field { max: Float tags: [String]! category: ObjectCategory! - scope: Int createdAt: Datetime updatedAt: Datetime @@ -8480,7 +8459,6 @@ type SpatialRelation { operator: String! paramName: String category: ObjectCategory! - scope: Int tags: [String]! createdAt: Datetime updatedAt: Datetime @@ -8535,8 +8513,6 @@ enum SpatialRelationOrderBy { PARAM_NAME_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC CREATED_AT_ASC @@ -8597,8 +8573,6 @@ enum FieldOrderBy { TAGS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC CREATED_AT_ASC CREATED_AT_DESC UPDATED_AT_ASC @@ -8638,7 +8612,6 @@ type ForeignKeyConstraint { deleteAction: String updateAction: String category: ObjectCategory! - scope: Int tags: [String]! createdAt: Datetime updatedAt: Datetime @@ -8695,8 +8668,6 @@ enum ForeignKeyConstraintOrderBy { UPDATE_ACTION_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC CREATED_AT_ASC @@ -8809,7 +8780,6 @@ type Index { opClasses: [String] smartTags: JSON category: ObjectCategory! - scope: Int tags: [String]! createdAt: Datetime updatedAt: Datetime @@ -8863,8 +8833,6 @@ enum IndexOrderBy { SMART_TAGS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC CREATED_AT_ASC @@ -8903,7 +8871,6 @@ type Policy { data: JSON smartTags: JSON category: ObjectCategory! - scope: Int tags: [String]! createdAt: Datetime updatedAt: Datetime @@ -8953,8 +8920,6 @@ enum PolicyOrderBy { SMART_TAGS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC CREATED_AT_ASC @@ -8991,7 +8956,6 @@ type PrimaryKeyConstraint { fieldIds: [UUID]! smartTags: JSON category: ObjectCategory! - scope: Int tags: [String]! createdAt: Datetime updatedAt: Datetime @@ -9035,8 +8999,6 @@ enum PrimaryKeyConstraintOrderBy { SMART_TAGS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC CREATED_AT_ASC @@ -9140,7 +9102,6 @@ type Trigger { functionName: String smartTags: JSON category: ObjectCategory! - scope: Int tags: [String]! createdAt: Datetime updatedAt: Datetime @@ -9182,8 +9143,6 @@ enum TriggerOrderBy { SMART_TAGS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC CREATED_AT_ASC @@ -9221,7 +9180,6 @@ type UniqueConstraint { type: String fieldIds: [UUID]! category: ObjectCategory! - scope: Int tags: [String]! createdAt: Datetime updatedAt: Datetime @@ -9265,8 +9223,6 @@ enum UniqueConstraintOrderBy { FIELD_IDS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC CREATED_AT_ASC @@ -9306,7 +9262,6 @@ type View { isReadOnly: Boolean smartTags: JSON category: ObjectCategory! - scope: Int tags: [String]! """Reads a single `Database` that is related to this `View`.""" @@ -9637,8 +9592,6 @@ enum ViewOrderBy { SMART_TAGS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC } @@ -9812,8 +9765,6 @@ enum TableOrderBy { SMART_TAGS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC USE_RLS_ASC USE_RLS_DESC TIMESTAMPS_ASC @@ -9994,7 +9945,6 @@ type Enum { values: [String]! smartTags: JSON category: ObjectCategory! - scope: Int tags: [String]! """Reads a single `Database` that is related to this `Enum`.""" @@ -10036,8 +9986,6 @@ enum EnumOrderBy { SMART_TAGS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC } @@ -10084,7 +10032,6 @@ type CompositeType { attributes: JSON! smartTags: JSON category: ObjectCategory! - scope: Int tags: [String]! """Reads a single `Database` that is related to this `CompositeType`.""" @@ -10126,8 +10073,6 @@ enum CompositeTypeOrderBy { SMART_TAGS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC } @@ -10200,6 +10145,12 @@ type Api { """Whether this API is publicly accessible without authentication""" isPublic: Boolean! + """Key/value pairs for selecting and filtering APIs""" + labels: JSON! + + """Freeform metadata for tooling and operational notes""" + annotations: JSON! + """Reads a single `Database` that is related to this `Api`.""" database: Database @@ -10437,15 +10388,28 @@ type Domain { """API endpoint this domain routes to (mutually exclusive with site_id)""" apiId: UUID - """Site this domain routes to (mutually exclusive with api_id)""" + """ + Site this domain routes to (mutually exclusive with api_id and service_id) + """ siteId: UUID + """ + Server deployment this domain routes to (mutually exclusive with api_id and site_id) + """ + serviceId: UUID + """Subdomain portion of the hostname""" subdomain: ConstructiveInternalTypeHostname """Root domain of the hostname""" domain: ConstructiveInternalTypeHostname + """Key/value pairs for selecting and filtering domains""" + labels: JSON! + + """Freeform metadata for tooling and operational notes""" + annotations: JSON! + """Reads a single `Api` that is related to this `Domain`.""" api: Api @@ -10487,6 +10451,12 @@ type Site { """PostgreSQL database name this site connects to""" dbname: String! + """Key/value pairs for selecting and filtering sites""" + labels: JSON! + + """Freeform metadata for tooling and operational notes""" + annotations: JSON! + """Reads a single `Database` that is related to this `Site`.""" database: Database @@ -10663,10 +10633,16 @@ enum DomainOrderBy { API_ID_DESC SITE_ID_ASC SITE_ID_DESC + SERVICE_ID_ASC + SERVICE_ID_DESC SUBDOMAIN_ASC SUBDOMAIN_DESC DOMAIN_ASC DOMAIN_DESC + LABELS_ASC + LABELS_DESC + ANNOTATIONS_ASC + ANNOTATIONS_DESC } """A connection to a list of `SiteMetadatum` values.""" @@ -11075,8 +11051,6 @@ enum SchemaOrderBy { SMART_TAGS_DESC CATEGORY_ASC CATEGORY_DESC - SCOPE_ASC - SCOPE_DESC TAGS_ASC TAGS_DESC IS_PUBLIC_ASC @@ -11335,6 +11309,10 @@ enum ApiOrderBy { ANON_ROLE_DESC IS_PUBLIC_ASC IS_PUBLIC_DESC + LABELS_ASC + LABELS_DESC + ANNOTATIONS_ASC + ANNOTATIONS_DESC } """A connection to a list of `Site` values.""" @@ -11386,6 +11364,10 @@ enum SiteOrderBy { LOGO_DESC DBNAME_ASC DBNAME_DESC + LABELS_ASC + LABELS_DESC + ANNOTATIONS_ASC + ANNOTATIONS_DESC } """A connection to a list of `App` values.""" @@ -11498,6 +11480,12 @@ type DatabaseSetting { """ options: JSON! + """Key/value pairs for selecting and filtering database settings""" + labels: JSON! + + """Freeform metadata for tooling and operational notes""" + annotations: JSON! + """Reads a single `Database` that is related to this `DatabaseSetting`.""" database: Database } @@ -12371,6 +12359,10 @@ enum DatabaseSettingOrderBy { ENABLE_I18N_DESC OPTIONS_ASC OPTIONS_DESC + LABELS_ASC + LABELS_DESC + ANNOTATIONS_ASC + ANNOTATIONS_DESC } """A connection to a list of `WebauthnSetting` values.""" @@ -12935,14 +12927,6 @@ type Mutation { input: CreateViewGrantInput! ): CreateViewGrantPayload - """Creates a single `Api`.""" - createApi( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateApiInput! - ): CreateApiPayload - """Creates a single `CorsSetting`.""" createCorsSetting( """ @@ -12975,6 +12959,14 @@ type Mutation { input: CreateSiteModuleInput! ): CreateSiteModulePayload + """Creates a single `Api`.""" + createApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateApiInput! + ): CreateApiPayload + """Creates a single `SiteMetadatum`.""" createSiteMetadatum( """ @@ -13023,14 +13015,6 @@ type Mutation { input: CreateTableGrantInput! ): CreateTableGrantPayload - """Creates a single `Domain`.""" - createDomain( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateDomainInput! - ): CreateDomainPayload - """Creates a single `RlsSetting`.""" createRlsSetting( """ @@ -13055,6 +13039,14 @@ type Mutation { input: CreatePartitionInput! ): CreatePartitionPayload + """Creates a single `Domain`.""" + createDomain( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateDomainInput! + ): CreateDomainPayload + """Creates a single `CompositeType`.""" createCompositeType( """ @@ -13071,14 +13063,6 @@ type Mutation { input: CreateEnumInput! ): CreateEnumPayload - """Creates a single `SqlAction`.""" - createSqlAction( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateSqlActionInput! - ): CreateSqlActionPayload - """Creates a single `View`.""" createView( """ @@ -13087,29 +13071,13 @@ type Mutation { input: CreateViewInput! ): CreateViewPayload - """Creates a single `DatabaseSetting`.""" - createDatabaseSetting( + """Creates a single `SqlAction`.""" + createSqlAction( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: CreateDatabaseSettingInput! - ): CreateDatabaseSettingPayload - - """Creates a single `ApiSetting`.""" - createApiSetting( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateApiSettingInput! - ): CreateApiSettingPayload - - """Creates a single `DatabaseTransfer`.""" - createDatabaseTransfer( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateDatabaseTransferInput! - ): CreateDatabaseTransferPayload + input: CreateSqlActionInput! + ): CreateSqlActionPayload """Creates a single `PrimaryKeyConstraint`.""" createPrimaryKeyConstraint( @@ -13159,21 +13127,21 @@ type Mutation { input: CreatePolicyInput! ): CreatePolicyPayload - """Creates a single `App`.""" - createApp( + """Creates a single `ApiSetting`.""" + createApiSetting( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: CreateAppInput! - ): CreateAppPayload + input: CreateApiSettingInput! + ): CreateApiSettingPayload - """Creates a single `Site`.""" - createSite( + """Creates a single `DatabaseTransfer`.""" + createDatabaseTransfer( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: CreateSiteInput! - ): CreateSitePayload + input: CreateDatabaseTransferInput! + ): CreateDatabaseTransferPayload """Creates a single `Index`.""" createIndex( @@ -13183,6 +13151,30 @@ type Mutation { input: CreateIndexInput! ): CreateIndexPayload + """Creates a single `App`.""" + createApp( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppInput! + ): CreateAppPayload + + """Creates a single `DatabaseSetting`.""" + createDatabaseSetting( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateDatabaseSettingInput! + ): CreateDatabaseSettingPayload + + """Creates a single `Site`.""" + createSite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateSiteInput! + ): CreateSitePayload + """Creates a single `ForeignKeyConstraint`.""" createForeignKeyConstraint( """ @@ -13295,14 +13287,6 @@ type Mutation { input: UpdateViewGrantInput! ): UpdateViewGrantPayload - """Updates a single `Api` using a unique key and a patch.""" - updateApi( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateApiInput! - ): UpdateApiPayload - """Updates a single `CorsSetting` using a unique key and a patch.""" updateCorsSetting( """ @@ -13335,6 +13319,14 @@ type Mutation { input: UpdateSiteModuleInput! ): UpdateSiteModulePayload + """Updates a single `Api` using a unique key and a patch.""" + updateApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateApiInput! + ): UpdateApiPayload + """Updates a single `SiteMetadatum` using a unique key and a patch.""" updateSiteMetadatum( """ @@ -13383,14 +13375,6 @@ type Mutation { input: UpdateTableGrantInput! ): UpdateTableGrantPayload - """Updates a single `Domain` using a unique key and a patch.""" - updateDomain( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateDomainInput! - ): UpdateDomainPayload - """Updates a single `RlsSetting` using a unique key and a patch.""" updateRlsSetting( """ @@ -13415,6 +13399,14 @@ type Mutation { input: UpdatePartitionInput! ): UpdatePartitionPayload + """Updates a single `Domain` using a unique key and a patch.""" + updateDomain( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateDomainInput! + ): UpdateDomainPayload + """Updates a single `CompositeType` using a unique key and a patch.""" updateCompositeType( """ @@ -13439,30 +13431,6 @@ type Mutation { input: UpdateViewInput! ): UpdateViewPayload - """Updates a single `DatabaseSetting` using a unique key and a patch.""" - updateDatabaseSetting( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateDatabaseSettingInput! - ): UpdateDatabaseSettingPayload - - """Updates a single `ApiSetting` using a unique key and a patch.""" - updateApiSetting( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateApiSettingInput! - ): UpdateApiSettingPayload - - """Updates a single `DatabaseTransfer` using a unique key and a patch.""" - updateDatabaseTransfer( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateDatabaseTransferInput! - ): UpdateDatabaseTransferPayload - """ Updates a single `PrimaryKeyConstraint` using a unique key and a patch. """ @@ -13513,21 +13481,21 @@ type Mutation { input: UpdatePolicyInput! ): UpdatePolicyPayload - """Updates a single `App` using a unique key and a patch.""" - updateApp( + """Updates a single `ApiSetting` using a unique key and a patch.""" + updateApiSetting( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: UpdateAppInput! - ): UpdateAppPayload + input: UpdateApiSettingInput! + ): UpdateApiSettingPayload - """Updates a single `Site` using a unique key and a patch.""" - updateSite( + """Updates a single `DatabaseTransfer` using a unique key and a patch.""" + updateDatabaseTransfer( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: UpdateSiteInput! - ): UpdateSitePayload + input: UpdateDatabaseTransferInput! + ): UpdateDatabaseTransferPayload """Updates a single `Index` using a unique key and a patch.""" updateIndex( @@ -13537,6 +13505,30 @@ type Mutation { input: UpdateIndexInput! ): UpdateIndexPayload + """Updates a single `App` using a unique key and a patch.""" + updateApp( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppInput! + ): UpdateAppPayload + + """Updates a single `DatabaseSetting` using a unique key and a patch.""" + updateDatabaseSetting( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateDatabaseSettingInput! + ): UpdateDatabaseSettingPayload + + """Updates a single `Site` using a unique key and a patch.""" + updateSite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateSiteInput! + ): UpdateSitePayload + """ Updates a single `ForeignKeyConstraint` using a unique key and a patch. """ @@ -13643,14 +13635,6 @@ type Mutation { input: DeleteViewGrantInput! ): DeleteViewGrantPayload - """Deletes a single `Api` using a unique key.""" - deleteApi( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteApiInput! - ): DeleteApiPayload - """Deletes a single `CorsSetting` using a unique key.""" deleteCorsSetting( """ @@ -13683,6 +13667,14 @@ type Mutation { input: DeleteSiteModuleInput! ): DeleteSiteModulePayload + """Deletes a single `Api` using a unique key.""" + deleteApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteApiInput! + ): DeleteApiPayload + """Deletes a single `SiteMetadatum` using a unique key.""" deleteSiteMetadatum( """ @@ -13731,14 +13723,6 @@ type Mutation { input: DeleteTableGrantInput! ): DeleteTableGrantPayload - """Deletes a single `Domain` using a unique key.""" - deleteDomain( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteDomainInput! - ): DeleteDomainPayload - """Deletes a single `RlsSetting` using a unique key.""" deleteRlsSetting( """ @@ -13763,6 +13747,14 @@ type Mutation { input: DeletePartitionInput! ): DeletePartitionPayload + """Deletes a single `Domain` using a unique key.""" + deleteDomain( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteDomainInput! + ): DeleteDomainPayload + """Deletes a single `CompositeType` using a unique key.""" deleteCompositeType( """ @@ -13787,30 +13779,6 @@ type Mutation { input: DeleteViewInput! ): DeleteViewPayload - """Deletes a single `DatabaseSetting` using a unique key.""" - deleteDatabaseSetting( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteDatabaseSettingInput! - ): DeleteDatabaseSettingPayload - - """Deletes a single `ApiSetting` using a unique key.""" - deleteApiSetting( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteApiSettingInput! - ): DeleteApiSettingPayload - - """Deletes a single `DatabaseTransfer` using a unique key.""" - deleteDatabaseTransfer( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteDatabaseTransferInput! - ): DeleteDatabaseTransferPayload - """Deletes a single `PrimaryKeyConstraint` using a unique key.""" deletePrimaryKeyConstraint( """ @@ -13859,21 +13827,21 @@ type Mutation { input: DeletePolicyInput! ): DeletePolicyPayload - """Deletes a single `App` using a unique key.""" - deleteApp( + """Deletes a single `ApiSetting` using a unique key.""" + deleteApiSetting( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: DeleteAppInput! - ): DeleteAppPayload + input: DeleteApiSettingInput! + ): DeleteApiSettingPayload - """Deletes a single `Site` using a unique key.""" - deleteSite( + """Deletes a single `DatabaseTransfer` using a unique key.""" + deleteDatabaseTransfer( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: DeleteSiteInput! - ): DeleteSitePayload + input: DeleteDatabaseTransferInput! + ): DeleteDatabaseTransferPayload """Deletes a single `Index` using a unique key.""" deleteIndex( @@ -13883,6 +13851,30 @@ type Mutation { input: DeleteIndexInput! ): DeleteIndexPayload + """Deletes a single `App` using a unique key.""" + deleteApp( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppInput! + ): DeleteAppPayload + + """Deletes a single `DatabaseSetting` using a unique key.""" + deleteDatabaseSetting( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteDatabaseSettingInput! + ): DeleteDatabaseSettingPayload + + """Deletes a single `Site` using a unique key.""" + deleteSite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteSiteInput! + ): DeleteSitePayload + """Deletes a single `ForeignKeyConstraint` using a unique key.""" deleteForeignKeyConstraint( """ @@ -14574,67 +14566,8 @@ input ViewGrantInput { isGrant: Boolean } -"""The output of our create `Api` mutation.""" -type CreateApiPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `Api` that was created by this mutation.""" - api: Api - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `Api`. May be used by Relay 1.""" - apiEdge( - """The method to use when ordering `Api`.""" - orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApiEdge -} - -"""All input for the create `Api` mutation.""" -input CreateApiInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `Api` to be created by this mutation.""" - api: ApiInput! -} - -"""An input for mutations affecting `Api`""" -input ApiInput { - """Unique identifier for this API""" - id: UUID - - """Reference to the metaschema database this API serves""" - databaseId: UUID! - - """Unique name for this API within its database""" - name: String! - - """PostgreSQL database name to connect to""" - dbname: String - - """PostgreSQL role used for authenticated requests""" - roleName: String - - """PostgreSQL role used for anonymous/unauthenticated requests""" - anonRole: String - - """Whether this API is publicly accessible without authentication""" - isPublic: Boolean -} - -"""The output of our create `CorsSetting` mutation.""" -type CreateCorsSettingPayload { +"""The output of our create `CorsSetting` mutation.""" +type CreateCorsSettingPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. @@ -14835,6 +14768,71 @@ input SiteModuleInput { data: JSON! } +"""The output of our create `Api` mutation.""" +type CreateApiPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Api` that was created by this mutation.""" + api: Api + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Api`. May be used by Relay 1.""" + apiEdge( + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiEdge +} + +"""All input for the create `Api` mutation.""" +input CreateApiInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `Api` to be created by this mutation.""" + api: ApiInput! +} + +"""An input for mutations affecting `Api`""" +input ApiInput { + """Unique identifier for this API""" + id: UUID + + """Reference to the metaschema database this API serves""" + databaseId: UUID! + + """Unique name for this API within its database""" + name: String! + + """PostgreSQL database name to connect to""" + dbname: String + + """PostgreSQL role used for authenticated requests""" + roleName: String + + """PostgreSQL role used for anonymous/unauthenticated requests""" + anonRole: String + + """Whether this API is publicly accessible without authentication""" + isPublic: Boolean + + """Key/value pairs for selecting and filtering APIs""" + labels: JSON + + """Freeform metadata for tooling and operational notes""" + annotations: JSON +} + """The output of our create `SiteMetadatum` mutation.""" type CreateSiteMetadatumPayload { """ @@ -15151,62 +15149,6 @@ input TableGrantInput { updatedAt: Datetime } -"""The output of our create `Domain` mutation.""" -type CreateDomainPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `Domain` that was created by this mutation.""" - domain: Domain - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `Domain`. May be used by Relay 1.""" - domainEdge( - """The method to use when ordering `Domain`.""" - orderBy: [DomainOrderBy!]! = [PRIMARY_KEY_ASC] - ): DomainEdge -} - -"""All input for the create `Domain` mutation.""" -input CreateDomainInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `Domain` to be created by this mutation.""" - domain: DomainInput! -} - -"""An input for mutations affecting `Domain`""" -input DomainInput { - """Unique identifier for this domain record""" - id: UUID - - """Reference to the metaschema database this domain belongs to""" - databaseId: UUID! - - """API endpoint this domain routes to (mutually exclusive with site_id)""" - apiId: UUID - - """Site this domain routes to (mutually exclusive with api_id)""" - siteId: UUID - - """Subdomain portion of the hostname""" - subdomain: ConstructiveInternalTypeHostname - - """Root domain of the hostname""" - domain: ConstructiveInternalTypeHostname -} - """The output of our create `RlsSetting` mutation.""" type CreateRlsSettingPayload { """ @@ -15392,6 +15334,75 @@ input PartitionInput { updatedAt: Datetime } +"""The output of our create `Domain` mutation.""" +type CreateDomainPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Domain` that was created by this mutation.""" + domain: Domain + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Domain`. May be used by Relay 1.""" + domainEdge( + """The method to use when ordering `Domain`.""" + orderBy: [DomainOrderBy!]! = [PRIMARY_KEY_ASC] + ): DomainEdge +} + +"""All input for the create `Domain` mutation.""" +input CreateDomainInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `Domain` to be created by this mutation.""" + domain: DomainInput! +} + +"""An input for mutations affecting `Domain`""" +input DomainInput { + """Unique identifier for this domain record""" + id: UUID + + """Reference to the metaschema database this domain belongs to""" + databaseId: UUID! + + """API endpoint this domain routes to (mutually exclusive with site_id)""" + apiId: UUID + + """ + Site this domain routes to (mutually exclusive with api_id and service_id) + """ + siteId: UUID + + """ + Server deployment this domain routes to (mutually exclusive with api_id and site_id) + """ + serviceId: UUID + + """Subdomain portion of the hostname""" + subdomain: ConstructiveInternalTypeHostname + + """Root domain of the hostname""" + domain: ConstructiveInternalTypeHostname + + """Key/value pairs for selecting and filtering domains""" + labels: JSON + + """Freeform metadata for tooling and operational notes""" + annotations: JSON +} + """The output of our create `CompositeType` mutation.""" type CreateCompositeTypePayload { """ @@ -15438,7 +15449,6 @@ input CompositeTypeInput { attributes: JSON smartTags: JSON category: ObjectCategory - scope: Int tags: [String] } @@ -15488,38 +15498,90 @@ input EnumInput { values: [String] smartTags: JSON category: ObjectCategory - scope: Int tags: [String] } -"""The output of our create `SqlAction` mutation.""" -type CreateSqlActionPayload { +"""The output of our create `View` mutation.""" +type CreateViewPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `SqlAction` that was created by this mutation.""" - sqlAction: SqlAction + """The `View` that was created by this mutation.""" + view: View """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query + + """An edge for our `View`. May be used by Relay 1.""" + viewEdge( + """The method to use when ordering `View`.""" + orderBy: [ViewOrderBy!]! = [PRIMARY_KEY_ASC] + ): ViewEdge } -"""All input for the create `SqlAction` mutation.""" -input CreateSqlActionInput { +"""All input for the create `View` mutation.""" +input CreateViewInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `SqlAction` to be created by this mutation.""" - sqlAction: SqlActionInput! -} + """The `View` to be created by this mutation.""" + view: ViewInput! +} + +"""An input for mutations affecting `View`""" +input ViewInput { + id: UUID + databaseId: UUID + schemaId: UUID! + name: String! + tableId: UUID + viewType: String! + data: JSON + filterType: String + filterData: JSON + securityInvoker: Boolean + isReadOnly: Boolean + smartTags: JSON + category: ObjectCategory + tags: [String] +} + +"""The output of our create `SqlAction` mutation.""" +type CreateSqlActionPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `SqlAction` that was created by this mutation.""" + sqlAction: SqlAction + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `SqlAction` mutation.""" +input CreateSqlActionInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `SqlAction` to be created by this mutation.""" + sqlAction: SqlActionInput! +} """An input for mutations affecting `SqlAction`""" input SqlActionInput { @@ -15538,151 +15600,312 @@ input SqlActionInput { actorId: UUID } -"""The output of our create `View` mutation.""" -type CreateViewPayload { +"""The output of our create `PrimaryKeyConstraint` mutation.""" +type CreatePrimaryKeyConstraintPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `View` that was created by this mutation.""" - view: View + """The `PrimaryKeyConstraint` that was created by this mutation.""" + primaryKeyConstraint: PrimaryKeyConstraint """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `View`. May be used by Relay 1.""" - viewEdge( - """The method to use when ordering `View`.""" - orderBy: [ViewOrderBy!]! = [PRIMARY_KEY_ASC] - ): ViewEdge + """An edge for our `PrimaryKeyConstraint`. May be used by Relay 1.""" + primaryKeyConstraintEdge( + """The method to use when ordering `PrimaryKeyConstraint`.""" + orderBy: [PrimaryKeyConstraintOrderBy!]! = [PRIMARY_KEY_ASC] + ): PrimaryKeyConstraintEdge } -"""All input for the create `View` mutation.""" -input CreateViewInput { +"""All input for the create `PrimaryKeyConstraint` mutation.""" +input CreatePrimaryKeyConstraintInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `View` to be created by this mutation.""" - view: ViewInput! + """The `PrimaryKeyConstraint` to be created by this mutation.""" + primaryKeyConstraint: PrimaryKeyConstraintInput! } -"""An input for mutations affecting `View`""" -input ViewInput { +"""An input for mutations affecting `PrimaryKeyConstraint`""" +input PrimaryKeyConstraintInput { id: UUID databaseId: UUID - schemaId: UUID! + tableId: UUID! + name: String + type: String + fieldIds: [UUID]! + smartTags: JSON + category: ObjectCategory + tags: [String] + createdAt: Datetime + updatedAt: Datetime +} + +"""The output of our create `Trigger` mutation.""" +type CreateTriggerPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Trigger` that was created by this mutation.""" + trigger: Trigger + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Trigger`. May be used by Relay 1.""" + triggerEdge( + """The method to use when ordering `Trigger`.""" + orderBy: [TriggerOrderBy!]! = [PRIMARY_KEY_ASC] + ): TriggerEdge +} + +"""All input for the create `Trigger` mutation.""" +input CreateTriggerInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `Trigger` to be created by this mutation.""" + trigger: TriggerInput! +} + +"""An input for mutations affecting `Trigger`""" +input TriggerInput { + id: UUID + databaseId: UUID + tableId: UUID! name: String! - tableId: UUID - viewType: String! - data: JSON - filterType: String - filterData: JSON - securityInvoker: Boolean - isReadOnly: Boolean + event: String + functionName: String smartTags: JSON category: ObjectCategory - scope: Int tags: [String] + createdAt: Datetime + updatedAt: Datetime } -"""The output of our create `DatabaseSetting` mutation.""" -type CreateDatabaseSettingPayload { +"""The output of our create `CheckConstraint` mutation.""" +type CreateCheckConstraintPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `DatabaseSetting` that was created by this mutation.""" - databaseSetting: DatabaseSetting + """The `CheckConstraint` that was created by this mutation.""" + checkConstraint: CheckConstraint """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `DatabaseSetting`. May be used by Relay 1.""" - databaseSettingEdge( - """The method to use when ordering `DatabaseSetting`.""" - orderBy: [DatabaseSettingOrderBy!]! = [PRIMARY_KEY_ASC] - ): DatabaseSettingEdge + """An edge for our `CheckConstraint`. May be used by Relay 1.""" + checkConstraintEdge( + """The method to use when ordering `CheckConstraint`.""" + orderBy: [CheckConstraintOrderBy!]! = [PRIMARY_KEY_ASC] + ): CheckConstraintEdge } -"""All input for the create `DatabaseSetting` mutation.""" -input CreateDatabaseSettingInput { +"""All input for the create `CheckConstraint` mutation.""" +input CreateCheckConstraintInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `DatabaseSetting` to be created by this mutation.""" - databaseSetting: DatabaseSettingInput! + """The `CheckConstraint` to be created by this mutation.""" + checkConstraint: CheckConstraintInput! } -"""An input for mutations affecting `DatabaseSetting`""" -input DatabaseSettingInput { - """Unique identifier for this settings record""" +"""An input for mutations affecting `CheckConstraint`""" +input CheckConstraintInput { id: UUID + databaseId: UUID + tableId: UUID! + name: String + type: String + fieldIds: [UUID]! + expr: JSON + smartTags: JSON + category: ObjectCategory + tags: [String] + createdAt: Datetime + updatedAt: Datetime +} - """Reference to the metaschema database these settings apply to""" - databaseId: UUID! +"""The output of our create `UniqueConstraint` mutation.""" +type CreateUniqueConstraintPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String - """Enable aggregate queries (sum, avg, min, max, etc.) in the GraphQL API""" - enableAggregates: Boolean + """The `UniqueConstraint` that was created by this mutation.""" + uniqueConstraint: UniqueConstraint - """Enable PostGIS spatial types and operators in the GraphQL API""" - enablePostgis: Boolean + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + """An edge for our `UniqueConstraint`. May be used by Relay 1.""" + uniqueConstraintEdge( + """The method to use when ordering `UniqueConstraint`.""" + orderBy: [UniqueConstraintOrderBy!]! = [PRIMARY_KEY_ASC] + ): UniqueConstraintEdge +} + +"""All input for the create `UniqueConstraint` mutation.""" +input CreateUniqueConstraintInput { """ - Enable unified search (tsvector, BM25, pg_trgm, pgvector) in the GraphQL API + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - enableSearch: Boolean + clientMutationId: String - """Enable direct (multipart) file upload mutations in the GraphQL API""" - enableDirectUploads: Boolean + """The `UniqueConstraint` to be created by this mutation.""" + uniqueConstraint: UniqueConstraintInput! +} - """Enable presigned URL upload flow for S3/MinIO storage""" - enablePresignedUploads: Boolean +"""An input for mutations affecting `UniqueConstraint`""" +input UniqueConstraintInput { + id: UUID + databaseId: UUID + tableId: UUID! + name: String + description: String + smartTags: JSON + type: String + fieldIds: [UUID]! + category: ObjectCategory + tags: [String] + createdAt: Datetime + updatedAt: Datetime +} - """Enable many-to-many relationship queries in the GraphQL API""" - enableManyToMany: Boolean +"""The output of our create `SpatialRelation` mutation.""" +type CreateSpatialRelationPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String - """Enable connection filter (where argument) in the GraphQL API""" - enableConnectionFilter: Boolean + """The `SpatialRelation` that was created by this mutation.""" + spatialRelation: SpatialRelation - """Enable ltree hierarchical data type support in the GraphQL API""" - enableLtree: Boolean + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query - """Enable LLM/AI integration features in the GraphQL API""" - enableLlm: Boolean + """An edge for our `SpatialRelation`. May be used by Relay 1.""" + spatialRelationEdge( + """The method to use when ordering `SpatialRelation`.""" + orderBy: [SpatialRelationOrderBy!]! = [PRIMARY_KEY_ASC] + ): SpatialRelationEdge +} +"""All input for the create `SpatialRelation` mutation.""" +input CreateSpatialRelationInput { """ - Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - enableRealtime: Boolean + clientMutationId: String + + """The `SpatialRelation` to be created by this mutation.""" + spatialRelation: SpatialRelationInput! +} + +"""An input for mutations affecting `SpatialRelation`""" +input SpatialRelationInput { + id: UUID + databaseId: UUID + tableId: UUID! + fieldId: UUID! + refTableId: UUID! + refFieldId: UUID! + name: String! + operator: String! + paramName: String + category: ObjectCategory + tags: [String] + createdAt: Datetime + updatedAt: Datetime +} +"""The output of our create `Policy` mutation.""" +type CreatePolicyPayload { """ - Enable bulk mutation operations (insert, upsert, update, delete) in the GraphQL API + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - enableBulk: Boolean + clientMutationId: String + + """The `Policy` that was created by this mutation.""" + policy: Policy """ - Enable internationalization plugin (localeStrings field, translation table discovery) in the GraphQL API + Our root query field type. Allows us to run any query from our mutation payload. """ - enableI18N: Boolean + query: Query + + """An edge for our `Policy`. May be used by Relay 1.""" + policyEdge( + """The method to use when ordering `Policy`.""" + orderBy: [PolicyOrderBy!]! = [PRIMARY_KEY_ASC] + ): PolicyEdge +} +"""All input for the create `Policy` mutation.""" +input CreatePolicyInput { """ - Extensible JSON for additional settings that do not have dedicated columns + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - options: JSON + clientMutationId: String + + """The `Policy` to be created by this mutation.""" + policy: PolicyInput! +} + +"""An input for mutations affecting `Policy`""" +input PolicyInput { + id: UUID + databaseId: UUID + tableId: UUID! + name: String + granteeName: String + privilege: String + permissive: Boolean + disabled: Boolean + policyType: String + data: JSON + smartTags: JSON + category: ObjectCategory + tags: [String] + createdAt: Datetime + updatedAt: Datetime } """The output of our create `ApiSetting` mutation.""" @@ -15778,457 +16001,298 @@ input ApiSettingInput { """ Override: enable realtime subscriptions (NULL = inherit from database_settings) - """ - enableRealtime: Boolean - - """ - Override: enable bulk mutations (NULL = inherit from database_settings) - """ - enableBulk: Boolean - - """ - Override: enable internationalization plugin (NULL = inherit from database_settings) - """ - enableI18N: Boolean - - """ - Extensible JSON for additional per-API settings that do not have dedicated columns - """ - options: JSON -} - -"""The output of our create `DatabaseTransfer` mutation.""" -type CreateDatabaseTransferPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `DatabaseTransfer` that was created by this mutation.""" - databaseTransfer: DatabaseTransfer - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `DatabaseTransfer`. May be used by Relay 1.""" - databaseTransferEdge( - """The method to use when ordering `DatabaseTransfer`.""" - orderBy: [DatabaseTransferOrderBy!]! = [PRIMARY_KEY_ASC] - ): DatabaseTransferEdge -} - -"""All input for the create `DatabaseTransfer` mutation.""" -input CreateDatabaseTransferInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `DatabaseTransfer` to be created by this mutation.""" - databaseTransfer: DatabaseTransferInput! -} - -"""An input for mutations affecting `DatabaseTransfer`""" -input DatabaseTransferInput { - id: UUID - databaseId: UUID! - targetOwnerId: UUID! - sourceApproved: Boolean - targetApproved: Boolean - sourceApprovedAt: Datetime - targetApprovedAt: Datetime - status: String - initiatedBy: UUID! - notes: String - expiresAt: Datetime - createdAt: Datetime - updatedAt: Datetime - completedAt: Datetime -} - -"""The output of our create `PrimaryKeyConstraint` mutation.""" -type CreatePrimaryKeyConstraintPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `PrimaryKeyConstraint` that was created by this mutation.""" - primaryKeyConstraint: PrimaryKeyConstraint - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `PrimaryKeyConstraint`. May be used by Relay 1.""" - primaryKeyConstraintEdge( - """The method to use when ordering `PrimaryKeyConstraint`.""" - orderBy: [PrimaryKeyConstraintOrderBy!]! = [PRIMARY_KEY_ASC] - ): PrimaryKeyConstraintEdge -} - -"""All input for the create `PrimaryKeyConstraint` mutation.""" -input CreatePrimaryKeyConstraintInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `PrimaryKeyConstraint` to be created by this mutation.""" - primaryKeyConstraint: PrimaryKeyConstraintInput! -} - -"""An input for mutations affecting `PrimaryKeyConstraint`""" -input PrimaryKeyConstraintInput { - id: UUID - databaseId: UUID - tableId: UUID! - name: String - type: String - fieldIds: [UUID]! - smartTags: JSON - category: ObjectCategory - scope: Int - tags: [String] - createdAt: Datetime - updatedAt: Datetime -} - -"""The output of our create `Trigger` mutation.""" -type CreateTriggerPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `Trigger` that was created by this mutation.""" - trigger: Trigger + """ + enableRealtime: Boolean """ - Our root query field type. Allows us to run any query from our mutation payload. + Override: enable bulk mutations (NULL = inherit from database_settings) """ - query: Query - - """An edge for our `Trigger`. May be used by Relay 1.""" - triggerEdge( - """The method to use when ordering `Trigger`.""" - orderBy: [TriggerOrderBy!]! = [PRIMARY_KEY_ASC] - ): TriggerEdge -} + enableBulk: Boolean -"""All input for the create `Trigger` mutation.""" -input CreateTriggerInput { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Override: enable internationalization plugin (NULL = inherit from database_settings) """ - clientMutationId: String - - """The `Trigger` to be created by this mutation.""" - trigger: TriggerInput! -} + enableI18N: Boolean -"""An input for mutations affecting `Trigger`""" -input TriggerInput { - id: UUID - databaseId: UUID - tableId: UUID! - name: String! - event: String - functionName: String - smartTags: JSON - category: ObjectCategory - scope: Int - tags: [String] - createdAt: Datetime - updatedAt: Datetime + """ + Extensible JSON for additional per-API settings that do not have dedicated columns + """ + options: JSON } -"""The output of our create `CheckConstraint` mutation.""" -type CreateCheckConstraintPayload { +"""The output of our create `DatabaseTransfer` mutation.""" +type CreateDatabaseTransferPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `CheckConstraint` that was created by this mutation.""" - checkConstraint: CheckConstraint + """The `DatabaseTransfer` that was created by this mutation.""" + databaseTransfer: DatabaseTransfer """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `CheckConstraint`. May be used by Relay 1.""" - checkConstraintEdge( - """The method to use when ordering `CheckConstraint`.""" - orderBy: [CheckConstraintOrderBy!]! = [PRIMARY_KEY_ASC] - ): CheckConstraintEdge + """An edge for our `DatabaseTransfer`. May be used by Relay 1.""" + databaseTransferEdge( + """The method to use when ordering `DatabaseTransfer`.""" + orderBy: [DatabaseTransferOrderBy!]! = [PRIMARY_KEY_ASC] + ): DatabaseTransferEdge } -"""All input for the create `CheckConstraint` mutation.""" -input CreateCheckConstraintInput { +"""All input for the create `DatabaseTransfer` mutation.""" +input CreateDatabaseTransferInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `CheckConstraint` to be created by this mutation.""" - checkConstraint: CheckConstraintInput! + """The `DatabaseTransfer` to be created by this mutation.""" + databaseTransfer: DatabaseTransferInput! } -"""An input for mutations affecting `CheckConstraint`""" -input CheckConstraintInput { +"""An input for mutations affecting `DatabaseTransfer`""" +input DatabaseTransferInput { id: UUID - databaseId: UUID - tableId: UUID! - name: String - type: String - fieldIds: [UUID]! - expr: JSON - smartTags: JSON - category: ObjectCategory - scope: Int - tags: [String] + databaseId: UUID! + targetOwnerId: UUID! + sourceApproved: Boolean + targetApproved: Boolean + sourceApprovedAt: Datetime + targetApprovedAt: Datetime + status: String + initiatedBy: UUID! + notes: String + expiresAt: Datetime createdAt: Datetime updatedAt: Datetime + completedAt: Datetime } -"""The output of our create `UniqueConstraint` mutation.""" -type CreateUniqueConstraintPayload { +"""The output of our create `Index` mutation.""" +type CreateIndexPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `UniqueConstraint` that was created by this mutation.""" - uniqueConstraint: UniqueConstraint + """The `Index` that was created by this mutation.""" + index: Index """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `UniqueConstraint`. May be used by Relay 1.""" - uniqueConstraintEdge( - """The method to use when ordering `UniqueConstraint`.""" - orderBy: [UniqueConstraintOrderBy!]! = [PRIMARY_KEY_ASC] - ): UniqueConstraintEdge + """An edge for our `Index`. May be used by Relay 1.""" + indexEdge( + """The method to use when ordering `Index`.""" + orderBy: [IndexOrderBy!]! = [PRIMARY_KEY_ASC] + ): IndexEdge } -"""All input for the create `UniqueConstraint` mutation.""" -input CreateUniqueConstraintInput { +"""All input for the create `Index` mutation.""" +input CreateIndexInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `UniqueConstraint` to be created by this mutation.""" - uniqueConstraint: UniqueConstraintInput! + """The `Index` to be created by this mutation.""" + index: IndexInput! } -"""An input for mutations affecting `UniqueConstraint`""" -input UniqueConstraintInput { +"""An input for mutations affecting `Index`""" +input IndexInput { id: UUID - databaseId: UUID + databaseId: UUID! tableId: UUID! name: String - description: String + fieldIds: [UUID] + includeFieldIds: [UUID] + accessMethod: String + indexParams: JSON + whereClause: JSON + isUnique: Boolean + options: JSON + opClasses: [String] smartTags: JSON - type: String - fieldIds: [UUID]! category: ObjectCategory - scope: Int tags: [String] createdAt: Datetime updatedAt: Datetime } -"""The output of our create `SpatialRelation` mutation.""" -type CreateSpatialRelationPayload { +"""The output of our create `App` mutation.""" +type CreateAppPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `SpatialRelation` that was created by this mutation.""" - spatialRelation: SpatialRelation + """The `App` that was created by this mutation.""" + app: App """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `SpatialRelation`. May be used by Relay 1.""" - spatialRelationEdge( - """The method to use when ordering `SpatialRelation`.""" - orderBy: [SpatialRelationOrderBy!]! = [PRIMARY_KEY_ASC] - ): SpatialRelationEdge + """An edge for our `App`. May be used by Relay 1.""" + appEdge( + """The method to use when ordering `App`.""" + orderBy: [AppOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEdge } -"""All input for the create `SpatialRelation` mutation.""" -input CreateSpatialRelationInput { +"""All input for the create `App` mutation.""" +input CreateAppInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `SpatialRelation` to be created by this mutation.""" - spatialRelation: SpatialRelationInput! + """The `App` to be created by this mutation.""" + app: AppInput! } -"""An input for mutations affecting `SpatialRelation`""" -input SpatialRelationInput { +"""An input for mutations affecting `App`""" +input AppInput { + """Unique identifier for this app""" id: UUID - databaseId: UUID - tableId: UUID! - fieldId: UUID! - refTableId: UUID! - refFieldId: UUID! - name: String! - operator: String! - paramName: String - category: ObjectCategory - scope: Int - tags: [String] - createdAt: Datetime - updatedAt: Datetime -} -"""The output of our create `Policy` mutation.""" -type CreatePolicyPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String + """Reference to the metaschema database this app belongs to""" + databaseId: UUID! - """The `Policy` that was created by this mutation.""" - policy: Policy + """Site this app is associated with (one app per site)""" + siteId: UUID! - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Display name of the app""" + name: String - """An edge for our `Policy`. May be used by Relay 1.""" - policyEdge( - """The method to use when ordering `Policy`.""" - orderBy: [PolicyOrderBy!]! = [PRIMARY_KEY_ASC] - ): PolicyEdge -} + """App icon or promotional image""" + appImage: ConstructiveInternalTypeImage + + """URL to the Apple App Store listing""" + appStoreLink: ConstructiveInternalTypeUrl + + """Apple App Store application identifier""" + appStoreId: String -"""All input for the create `Policy` mutation.""" -input CreatePolicyInput { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Apple App ID prefix (Team ID) for universal links and associated domains """ - clientMutationId: String - - """The `Policy` to be created by this mutation.""" - policy: PolicyInput! -} + appIdPrefix: String -"""An input for mutations affecting `Policy`""" -input PolicyInput { - id: UUID - databaseId: UUID - tableId: UUID! - name: String - granteeName: String - privilege: String - permissive: Boolean - disabled: Boolean - policyType: String - data: JSON - smartTags: JSON - category: ObjectCategory - scope: Int - tags: [String] - createdAt: Datetime - updatedAt: Datetime + """URL to the Google Play Store listing""" + playStoreLink: ConstructiveInternalTypeUrl } -"""The output of our create `App` mutation.""" -type CreateAppPayload { +"""The output of our create `DatabaseSetting` mutation.""" +type CreateDatabaseSettingPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `App` that was created by this mutation.""" - app: App + """The `DatabaseSetting` that was created by this mutation.""" + databaseSetting: DatabaseSetting """ Our root query field type. Allows us to run any query from our mutation payload. """ - query: Query - - """An edge for our `App`. May be used by Relay 1.""" - appEdge( - """The method to use when ordering `App`.""" - orderBy: [AppOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppEdge + query: Query + + """An edge for our `DatabaseSetting`. May be used by Relay 1.""" + databaseSettingEdge( + """The method to use when ordering `DatabaseSetting`.""" + orderBy: [DatabaseSettingOrderBy!]! = [PRIMARY_KEY_ASC] + ): DatabaseSettingEdge } -"""All input for the create `App` mutation.""" -input CreateAppInput { +"""All input for the create `DatabaseSetting` mutation.""" +input CreateDatabaseSettingInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `App` to be created by this mutation.""" - app: AppInput! + """The `DatabaseSetting` to be created by this mutation.""" + databaseSetting: DatabaseSettingInput! } -"""An input for mutations affecting `App`""" -input AppInput { - """Unique identifier for this app""" +"""An input for mutations affecting `DatabaseSetting`""" +input DatabaseSettingInput { + """Unique identifier for this settings record""" id: UUID - """Reference to the metaschema database this app belongs to""" + """Reference to the metaschema database these settings apply to""" databaseId: UUID! - """Site this app is associated with (one app per site)""" - siteId: UUID! + """Enable aggregate queries (sum, avg, min, max, etc.) in the GraphQL API""" + enableAggregates: Boolean - """Display name of the app""" - name: String + """Enable PostGIS spatial types and operators in the GraphQL API""" + enablePostgis: Boolean - """App icon or promotional image""" - appImage: ConstructiveInternalTypeImage + """ + Enable unified search (tsvector, BM25, pg_trgm, pgvector) in the GraphQL API + """ + enableSearch: Boolean - """URL to the Apple App Store listing""" - appStoreLink: ConstructiveInternalTypeUrl + """Enable direct (multipart) file upload mutations in the GraphQL API""" + enableDirectUploads: Boolean - """Apple App Store application identifier""" - appStoreId: String + """Enable presigned URL upload flow for S3/MinIO storage""" + enablePresignedUploads: Boolean + + """Enable many-to-many relationship queries in the GraphQL API""" + enableManyToMany: Boolean + + """Enable connection filter (where argument) in the GraphQL API""" + enableConnectionFilter: Boolean + + """Enable ltree hierarchical data type support in the GraphQL API""" + enableLtree: Boolean + + """Enable LLM/AI integration features in the GraphQL API""" + enableLlm: Boolean """ - Apple App ID prefix (Team ID) for universal links and associated domains + Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API """ - appIdPrefix: String + enableRealtime: Boolean - """URL to the Google Play Store listing""" - playStoreLink: ConstructiveInternalTypeUrl + """ + Enable bulk mutation operations (insert, upsert, update, delete) in the GraphQL API + """ + enableBulk: Boolean + + """ + Enable internationalization plugin (localeStrings field, translation table discovery) in the GraphQL API + """ + enableI18N: Boolean + + """ + Extensible JSON for additional settings that do not have dedicated columns + """ + options: JSON + + """Key/value pairs for selecting and filtering database settings""" + labels: JSON + + """Freeform metadata for tooling and operational notes""" + annotations: JSON } """The output of our create `Site` mutation.""" @@ -16294,63 +16358,12 @@ input SiteInput { """PostgreSQL database name this site connects to""" dbname: String -} - -"""The output of our create `Index` mutation.""" -type CreateIndexPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `Index` that was created by this mutation.""" - index: Index - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - """An edge for our `Index`. May be used by Relay 1.""" - indexEdge( - """The method to use when ordering `Index`.""" - orderBy: [IndexOrderBy!]! = [PRIMARY_KEY_ASC] - ): IndexEdge -} - -"""All input for the create `Index` mutation.""" -input CreateIndexInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `Index` to be created by this mutation.""" - index: IndexInput! -} + """Key/value pairs for selecting and filtering sites""" + labels: JSON -"""An input for mutations affecting `Index`""" -input IndexInput { - id: UUID - databaseId: UUID! - tableId: UUID! - name: String - fieldIds: [UUID] - includeFieldIds: [UUID] - accessMethod: String - indexParams: JSON - whereClause: JSON - isUnique: Boolean - options: JSON - opClasses: [String] - smartTags: JSON - category: ObjectCategory - scope: Int - tags: [String] - createdAt: Datetime - updatedAt: Datetime + """Freeform metadata for tooling and operational notes""" + annotations: JSON } """The output of our create `ForeignKeyConstraint` mutation.""" @@ -16403,7 +16416,6 @@ input ForeignKeyConstraintInput { deleteAction: String updateAction: String category: ObjectCategory - scope: Int tags: [String] createdAt: Datetime updatedAt: Datetime @@ -16662,7 +16674,6 @@ input SchemaInput { description: String smartTags: JSON category: ObjectCategory - scope: Int tags: [String] isPublic: Boolean apiExposure: ApiExposureLevel @@ -16726,7 +16737,6 @@ input FieldInput { max: Float tags: [String] category: ObjectCategory - scope: Int createdAt: Datetime updatedAt: Datetime } @@ -16776,7 +16786,6 @@ input TableInput { description: String smartTags: JSON category: ObjectCategory - scope: Int useRls: Boolean timestamps: Boolean peoplestamps: Boolean @@ -17161,70 +17170,6 @@ input ViewGrantPatch { isGrant: Boolean } -"""The output of our update `Api` mutation.""" -type UpdateApiPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `Api` that was updated by this mutation.""" - api: Api - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `Api`. May be used by Relay 1.""" - apiEdge( - """The method to use when ordering `Api`.""" - orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApiEdge -} - -"""All input for the `updateApi` mutation.""" -input UpdateApiInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """Unique identifier for this API""" - id: UUID! - - """ - An object where the defined keys will be set on the `Api` being updated. - """ - apiPatch: ApiPatch! -} - -"""Represents an update to a `Api`. Fields that are set will be updated.""" -input ApiPatch { - """Unique identifier for this API""" - id: UUID - - """Reference to the metaschema database this API serves""" - databaseId: UUID - - """Unique name for this API within its database""" - name: String - - """PostgreSQL database name to connect to""" - dbname: String - - """PostgreSQL role used for authenticated requests""" - roleName: String - - """PostgreSQL role used for anonymous/unauthenticated requests""" - anonRole: String - - """Whether this API is publicly accessible without authentication""" - isPublic: Boolean -} - """The output of our update `CorsSetting` mutation.""" type UpdateCorsSettingPayload { """ @@ -17433,24 +17378,94 @@ input UpdateSiteModuleInput { siteModulePatch: SiteModulePatch! } -""" -Represents an update to a `SiteModule`. Fields that are set will be updated. -""" -input SiteModulePatch { - """Unique identifier for this site module record""" +""" +Represents an update to a `SiteModule`. Fields that are set will be updated. +""" +input SiteModulePatch { + """Unique identifier for this site module record""" + id: UUID + + """Reference to the metaschema database""" + databaseId: UUID + + """Site this module configuration belongs to""" + siteId: UUID + + """Module name (e.g. user_auth_module, analytics)""" + name: String + + """JSON configuration data for this module""" + data: JSON +} + +"""The output of our update `Api` mutation.""" +type UpdateApiPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Api` that was updated by this mutation.""" + api: Api + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Api`. May be used by Relay 1.""" + apiEdge( + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiEdge +} + +"""All input for the `updateApi` mutation.""" +input UpdateApiInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Unique identifier for this API""" + id: UUID! + + """ + An object where the defined keys will be set on the `Api` being updated. + """ + apiPatch: ApiPatch! +} + +"""Represents an update to a `Api`. Fields that are set will be updated.""" +input ApiPatch { + """Unique identifier for this API""" id: UUID - """Reference to the metaschema database""" + """Reference to the metaschema database this API serves""" databaseId: UUID - """Site this module configuration belongs to""" - siteId: UUID - - """Module name (e.g. user_auth_module, analytics)""" + """Unique name for this API within its database""" name: String - """JSON configuration data for this module""" - data: JSON + """PostgreSQL database name to connect to""" + dbname: String + + """PostgreSQL role used for authenticated requests""" + roleName: String + + """PostgreSQL role used for anonymous/unauthenticated requests""" + anonRole: String + + """Whether this API is publicly accessible without authentication""" + isPublic: Boolean + + """Key/value pairs for selecting and filtering APIs""" + labels: JSON + + """Freeform metadata for tooling and operational notes""" + annotations: JSON } """The output of our update `SiteMetadatum` mutation.""" @@ -17654,81 +17669,277 @@ input SchemaGrantPatch { updatedAt: Datetime } -"""The output of our update `TriggerFunction` mutation.""" -type UpdateTriggerFunctionPayload { +"""The output of our update `TriggerFunction` mutation.""" +type UpdateTriggerFunctionPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `TriggerFunction` that was updated by this mutation.""" + triggerFunction: TriggerFunction + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `TriggerFunction`. May be used by Relay 1.""" + triggerFunctionEdge( + """The method to use when ordering `TriggerFunction`.""" + orderBy: [TriggerFunctionOrderBy!]! = [PRIMARY_KEY_ASC] + ): TriggerFunctionEdge +} + +"""All input for the `updateTriggerFunction` mutation.""" +input UpdateTriggerFunctionInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `TriggerFunction` being updated. + """ + triggerFunctionPatch: TriggerFunctionPatch! +} + +""" +Represents an update to a `TriggerFunction`. Fields that are set will be updated. +""" +input TriggerFunctionPatch { + id: UUID + databaseId: UUID + name: String + code: String + createdAt: Datetime + updatedAt: Datetime +} + +"""The output of our update `Database` mutation.""" +type UpdateDatabasePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Database` that was updated by this mutation.""" + database: Database + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Database`. May be used by Relay 1.""" + databaseEdge( + """The method to use when ordering `Database`.""" + orderBy: [DatabaseOrderBy!]! = [PRIMARY_KEY_ASC] + ): DatabaseEdge +} + +"""All input for the `updateDatabase` mutation.""" +input UpdateDatabaseInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `Database` being updated. + """ + databasePatch: DatabasePatch! +} + +""" +Represents an update to a `Database`. Fields that are set will be updated. +""" +input DatabasePatch { + id: UUID + ownerId: UUID + schemaHash: String + name: String + label: String + hash: UUID + createdAt: Datetime + updatedAt: Datetime +} + +"""The output of our update `TableGrant` mutation.""" +type UpdateTableGrantPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `TableGrant` that was updated by this mutation.""" + tableGrant: TableGrant + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `TableGrant`. May be used by Relay 1.""" + tableGrantEdge( + """The method to use when ordering `TableGrant`.""" + orderBy: [TableGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): TableGrantEdge +} + +"""All input for the `updateTableGrant` mutation.""" +input UpdateTableGrantInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `TableGrant` being updated. + """ + tableGrantPatch: TableGrantPatch! +} + +""" +Represents an update to a `TableGrant`. Fields that are set will be updated. +""" +input TableGrantPatch { + id: UUID + databaseId: UUID + tableId: UUID + privilege: String + granteeName: String + fieldIds: [UUID] + isGrant: Boolean + createdAt: Datetime + updatedAt: Datetime +} + +"""The output of our update `RlsSetting` mutation.""" +type UpdateRlsSettingPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `RlsSetting` that was updated by this mutation.""" + rlsSetting: RlsSetting + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `RlsSetting`. May be used by Relay 1.""" + rlsSettingEdge( + """The method to use when ordering `RlsSetting`.""" + orderBy: [RlsSettingOrderBy!]! = [PRIMARY_KEY_ASC] + ): RlsSettingEdge +} + +"""All input for the `updateRlsSetting` mutation.""" +input UpdateRlsSettingInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Unique identifier for this RLS settings record""" + id: UUID! + + """ + An object where the defined keys will be set on the `RlsSetting` being updated. + """ + rlsSettingPatch: RlsSettingPatch! +} + +""" +Represents an update to a `RlsSetting`. Fields that are set will be updated. +""" +input RlsSettingPatch { + """Unique identifier for this RLS settings record""" + id: UUID + + """Reference to the metaschema database""" + databaseId: UUID + + """ + Schema containing authenticate/authenticate_strict functions (FK to metaschema_public.schema) + """ + authenticateSchemaId: UUID + + """ + Schema containing current_role and related functions (FK to metaschema_public.schema) + """ + roleSchemaId: UUID + + """ + Reference to the authenticate function (FK to metaschema_public.function) + """ + authenticateFunctionId: UUID + + """ + Reference to the strict authenticate function (FK to metaschema_public.function) + """ + authenticateStrictFunctionId: UUID + """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Reference to the current_role function (FK to metaschema_public.function) """ - clientMutationId: String - - """The `TriggerFunction` that was updated by this mutation.""" - triggerFunction: TriggerFunction + currentRoleFunctionId: UUID """ - Our root query field type. Allows us to run any query from our mutation payload. + Reference to the current_role_id function (FK to metaschema_public.function) """ - query: Query - - """An edge for our `TriggerFunction`. May be used by Relay 1.""" - triggerFunctionEdge( - """The method to use when ordering `TriggerFunction`.""" - orderBy: [TriggerFunctionOrderBy!]! = [PRIMARY_KEY_ASC] - ): TriggerFunctionEdge -} + currentRoleIdFunctionId: UUID -"""All input for the `updateTriggerFunction` mutation.""" -input UpdateTriggerFunctionInput { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Reference to the current_user_agent function (FK to metaschema_public.function) """ - clientMutationId: String - id: UUID! + currentUserAgentFunctionId: UUID """ - An object where the defined keys will be set on the `TriggerFunction` being updated. + Reference to the current_ip_address function (FK to metaschema_public.function) """ - triggerFunctionPatch: TriggerFunctionPatch! -} - -""" -Represents an update to a `TriggerFunction`. Fields that are set will be updated. -""" -input TriggerFunctionPatch { - id: UUID - databaseId: UUID - name: String - code: String - createdAt: Datetime - updatedAt: Datetime + currentIpAddressFunctionId: UUID } -"""The output of our update `Database` mutation.""" -type UpdateDatabasePayload { +"""The output of our update `FullTextSearch` mutation.""" +type UpdateFullTextSearchPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `Database` that was updated by this mutation.""" - database: Database + """The `FullTextSearch` that was updated by this mutation.""" + fullTextSearch: FullTextSearch """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `Database`. May be used by Relay 1.""" - databaseEdge( - """The method to use when ordering `Database`.""" - orderBy: [DatabaseOrderBy!]! = [PRIMARY_KEY_ASC] - ): DatabaseEdge + """An edge for our `FullTextSearch`. May be used by Relay 1.""" + fullTextSearchEdge( + """The method to use when ordering `FullTextSearch`.""" + orderBy: [FullTextSearchOrderBy!]! = [PRIMARY_KEY_ASC] + ): FullTextSearchEdge } -"""All input for the `updateDatabase` mutation.""" -input UpdateDatabaseInput { +"""All input for the `updateFullTextSearch` mutation.""" +input UpdateFullTextSearchInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -17737,50 +17948,52 @@ input UpdateDatabaseInput { id: UUID! """ - An object where the defined keys will be set on the `Database` being updated. + An object where the defined keys will be set on the `FullTextSearch` being updated. """ - databasePatch: DatabasePatch! + fullTextSearchPatch: FullTextSearchPatch! } """ -Represents an update to a `Database`. Fields that are set will be updated. +Represents an update to a `FullTextSearch`. Fields that are set will be updated. """ -input DatabasePatch { +input FullTextSearchPatch { id: UUID - ownerId: UUID - schemaHash: String - name: String - label: String - hash: UUID + databaseId: UUID + tableId: UUID + fieldId: UUID + fieldIds: [UUID] + weights: [String] + langs: [String] + langColumn: String createdAt: Datetime updatedAt: Datetime } -"""The output of our update `TableGrant` mutation.""" -type UpdateTableGrantPayload { +"""The output of our update `Partition` mutation.""" +type UpdatePartitionPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `TableGrant` that was updated by this mutation.""" - tableGrant: TableGrant + """The `Partition` that was updated by this mutation.""" + partition: Partition """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `TableGrant`. May be used by Relay 1.""" - tableGrantEdge( - """The method to use when ordering `TableGrant`.""" - orderBy: [TableGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): TableGrantEdge + """An edge for our `Partition`. May be used by Relay 1.""" + partitionEdge( + """The method to use when ordering `Partition`.""" + orderBy: [PartitionOrderBy!]! = [PRIMARY_KEY_ASC] + ): PartitionEdge } -"""All input for the `updateTableGrant` mutation.""" -input UpdateTableGrantInput { +"""All input for the `updatePartition` mutation.""" +input UpdatePartitionInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -17789,22 +18002,26 @@ input UpdateTableGrantInput { id: UUID! """ - An object where the defined keys will be set on the `TableGrant` being updated. + An object where the defined keys will be set on the `Partition` being updated. """ - tableGrantPatch: TableGrantPatch! + partitionPatch: PartitionPatch! } """ -Represents an update to a `TableGrant`. Fields that are set will be updated. +Represents an update to a `Partition`. Fields that are set will be updated. """ -input TableGrantPatch { +input PartitionPatch { id: UUID databaseId: UUID tableId: UUID - privilege: String - granteeName: String - fieldIds: [UUID] - isGrant: Boolean + strategy: String + partitionKeyId: UUID + interval: String + retention: String + retentionKeepTable: Boolean + premake: Int + namingPattern: String + isParented: Boolean createdAt: Datetime updatedAt: Datetime } @@ -17862,132 +18079,216 @@ input DomainPatch { """API endpoint this domain routes to (mutually exclusive with site_id)""" apiId: UUID - """Site this domain routes to (mutually exclusive with api_id)""" + """ + Site this domain routes to (mutually exclusive with api_id and service_id) + """ siteId: UUID + """ + Server deployment this domain routes to (mutually exclusive with api_id and site_id) + """ + serviceId: UUID + """Subdomain portion of the hostname""" subdomain: ConstructiveInternalTypeHostname """Root domain of the hostname""" domain: ConstructiveInternalTypeHostname + + """Key/value pairs for selecting and filtering domains""" + labels: JSON + + """Freeform metadata for tooling and operational notes""" + annotations: JSON } -"""The output of our update `RlsSetting` mutation.""" -type UpdateRlsSettingPayload { +"""The output of our update `CompositeType` mutation.""" +type UpdateCompositeTypePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `RlsSetting` that was updated by this mutation.""" - rlsSetting: RlsSetting + """The `CompositeType` that was updated by this mutation.""" + compositeType: CompositeType """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `RlsSetting`. May be used by Relay 1.""" - rlsSettingEdge( - """The method to use when ordering `RlsSetting`.""" - orderBy: [RlsSettingOrderBy!]! = [PRIMARY_KEY_ASC] - ): RlsSettingEdge + """An edge for our `CompositeType`. May be used by Relay 1.""" + compositeTypeEdge( + """The method to use when ordering `CompositeType`.""" + orderBy: [CompositeTypeOrderBy!]! = [PRIMARY_KEY_ASC] + ): CompositeTypeEdge } -"""All input for the `updateRlsSetting` mutation.""" -input UpdateRlsSettingInput { +"""All input for the `updateCompositeType` mutation.""" +input UpdateCompositeTypeInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - - """Unique identifier for this RLS settings record""" id: UUID! """ - An object where the defined keys will be set on the `RlsSetting` being updated. + An object where the defined keys will be set on the `CompositeType` being updated. """ - rlsSettingPatch: RlsSettingPatch! + compositeTypePatch: CompositeTypePatch! } """ -Represents an update to a `RlsSetting`. Fields that are set will be updated. +Represents an update to a `CompositeType`. Fields that are set will be updated. """ -input RlsSettingPatch { - """Unique identifier for this RLS settings record""" +input CompositeTypePatch { id: UUID - - """Reference to the metaschema database""" databaseId: UUID + schemaId: UUID + name: String + label: String + description: String + attributes: JSON + smartTags: JSON + category: ObjectCategory + tags: [String] +} +"""The output of our update `Enum` mutation.""" +type UpdateEnumPayload { """ - Schema containing authenticate/authenticate_strict functions (FK to metaschema_public.schema) + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - authenticateSchemaId: UUID + clientMutationId: String + + """The `Enum` that was updated by this mutation.""" + enum: Enum """ - Schema containing current_role and related functions (FK to metaschema_public.schema) + Our root query field type. Allows us to run any query from our mutation payload. """ - roleSchemaId: UUID + query: Query + + """An edge for our `Enum`. May be used by Relay 1.""" + enumEdge( + """The method to use when ordering `Enum`.""" + orderBy: [EnumOrderBy!]! = [PRIMARY_KEY_ASC] + ): EnumEdge +} +"""All input for the `updateEnum` mutation.""" +input UpdateEnumInput { """ - Reference to the authenticate function (FK to metaschema_public.function) + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - authenticateFunctionId: UUID + clientMutationId: String + id: UUID! """ - Reference to the strict authenticate function (FK to metaschema_public.function) + An object where the defined keys will be set on the `Enum` being updated. """ - authenticateStrictFunctionId: UUID + enumPatch: EnumPatch! +} + +"""Represents an update to a `Enum`. Fields that are set will be updated.""" +input EnumPatch { + id: UUID + databaseId: UUID + schemaId: UUID + name: String + label: String + description: String + values: [String] + smartTags: JSON + category: ObjectCategory + tags: [String] +} +"""The output of our update `View` mutation.""" +type UpdateViewPayload { """ - Reference to the current_role function (FK to metaschema_public.function) + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - currentRoleFunctionId: UUID + clientMutationId: String + + """The `View` that was updated by this mutation.""" + view: View """ - Reference to the current_role_id function (FK to metaschema_public.function) + Our root query field type. Allows us to run any query from our mutation payload. """ - currentRoleIdFunctionId: UUID + query: Query + + """An edge for our `View`. May be used by Relay 1.""" + viewEdge( + """The method to use when ordering `View`.""" + orderBy: [ViewOrderBy!]! = [PRIMARY_KEY_ASC] + ): ViewEdge +} +"""All input for the `updateView` mutation.""" +input UpdateViewInput { """ - Reference to the current_user_agent function (FK to metaschema_public.function) + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - currentUserAgentFunctionId: UUID + clientMutationId: String + id: UUID! """ - Reference to the current_ip_address function (FK to metaschema_public.function) + An object where the defined keys will be set on the `View` being updated. """ - currentIpAddressFunctionId: UUID + viewPatch: ViewPatch! } -"""The output of our update `FullTextSearch` mutation.""" -type UpdateFullTextSearchPayload { +"""Represents an update to a `View`. Fields that are set will be updated.""" +input ViewPatch { + id: UUID + databaseId: UUID + schemaId: UUID + name: String + tableId: UUID + viewType: String + data: JSON + filterType: String + filterData: JSON + securityInvoker: Boolean + isReadOnly: Boolean + smartTags: JSON + category: ObjectCategory + tags: [String] +} + +"""The output of our update `PrimaryKeyConstraint` mutation.""" +type UpdatePrimaryKeyConstraintPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `FullTextSearch` that was updated by this mutation.""" - fullTextSearch: FullTextSearch + """The `PrimaryKeyConstraint` that was updated by this mutation.""" + primaryKeyConstraint: PrimaryKeyConstraint """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `FullTextSearch`. May be used by Relay 1.""" - fullTextSearchEdge( - """The method to use when ordering `FullTextSearch`.""" - orderBy: [FullTextSearchOrderBy!]! = [PRIMARY_KEY_ASC] - ): FullTextSearchEdge + """An edge for our `PrimaryKeyConstraint`. May be used by Relay 1.""" + primaryKeyConstraintEdge( + """The method to use when ordering `PrimaryKeyConstraint`.""" + orderBy: [PrimaryKeyConstraintOrderBy!]! = [PRIMARY_KEY_ASC] + ): PrimaryKeyConstraintEdge } -"""All input for the `updateFullTextSearch` mutation.""" -input UpdateFullTextSearchInput { +"""All input for the `updatePrimaryKeyConstraint` mutation.""" +input UpdatePrimaryKeyConstraintInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -17996,52 +18297,53 @@ input UpdateFullTextSearchInput { id: UUID! """ - An object where the defined keys will be set on the `FullTextSearch` being updated. + An object where the defined keys will be set on the `PrimaryKeyConstraint` being updated. """ - fullTextSearchPatch: FullTextSearchPatch! + primaryKeyConstraintPatch: PrimaryKeyConstraintPatch! } """ -Represents an update to a `FullTextSearch`. Fields that are set will be updated. +Represents an update to a `PrimaryKeyConstraint`. Fields that are set will be updated. """ -input FullTextSearchPatch { +input PrimaryKeyConstraintPatch { id: UUID databaseId: UUID tableId: UUID - fieldId: UUID + name: String + type: String fieldIds: [UUID] - weights: [String] - langs: [String] - langColumn: String + smartTags: JSON + category: ObjectCategory + tags: [String] createdAt: Datetime updatedAt: Datetime } -"""The output of our update `Partition` mutation.""" -type UpdatePartitionPayload { +"""The output of our update `Trigger` mutation.""" +type UpdateTriggerPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `Partition` that was updated by this mutation.""" - partition: Partition + """The `Trigger` that was updated by this mutation.""" + trigger: Trigger """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `Partition`. May be used by Relay 1.""" - partitionEdge( - """The method to use when ordering `Partition`.""" - orderBy: [PartitionOrderBy!]! = [PRIMARY_KEY_ASC] - ): PartitionEdge + """An edge for our `Trigger`. May be used by Relay 1.""" + triggerEdge( + """The method to use when ordering `Trigger`.""" + orderBy: [TriggerOrderBy!]! = [PRIMARY_KEY_ASC] + ): TriggerEdge } -"""All input for the `updatePartition` mutation.""" -input UpdatePartitionInput { +"""All input for the `updateTrigger` mutation.""" +input UpdateTriggerInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -18050,55 +18352,53 @@ input UpdatePartitionInput { id: UUID! """ - An object where the defined keys will be set on the `Partition` being updated. + An object where the defined keys will be set on the `Trigger` being updated. """ - partitionPatch: PartitionPatch! + triggerPatch: TriggerPatch! } """ -Represents an update to a `Partition`. Fields that are set will be updated. +Represents an update to a `Trigger`. Fields that are set will be updated. """ -input PartitionPatch { +input TriggerPatch { id: UUID databaseId: UUID tableId: UUID - strategy: String - partitionKeyId: UUID - interval: String - retention: String - retentionKeepTable: Boolean - premake: Int - namingPattern: String - isParented: Boolean + name: String + event: String + functionName: String + smartTags: JSON + category: ObjectCategory + tags: [String] createdAt: Datetime updatedAt: Datetime } -"""The output of our update `CompositeType` mutation.""" -type UpdateCompositeTypePayload { +"""The output of our update `CheckConstraint` mutation.""" +type UpdateCheckConstraintPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `CompositeType` that was updated by this mutation.""" - compositeType: CompositeType + """The `CheckConstraint` that was updated by this mutation.""" + checkConstraint: CheckConstraint """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `CompositeType`. May be used by Relay 1.""" - compositeTypeEdge( - """The method to use when ordering `CompositeType`.""" - orderBy: [CompositeTypeOrderBy!]! = [PRIMARY_KEY_ASC] - ): CompositeTypeEdge + """An edge for our `CheckConstraint`. May be used by Relay 1.""" + checkConstraintEdge( + """The method to use when ordering `CheckConstraint`.""" + orderBy: [CheckConstraintOrderBy!]! = [PRIMARY_KEY_ASC] + ): CheckConstraintEdge } -"""All input for the `updateCompositeType` mutation.""" -input UpdateCompositeTypeInput { +"""All input for the `updateCheckConstraint` mutation.""" +input UpdateCheckConstraintInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -18107,53 +18407,54 @@ input UpdateCompositeTypeInput { id: UUID! """ - An object where the defined keys will be set on the `CompositeType` being updated. + An object where the defined keys will be set on the `CheckConstraint` being updated. """ - compositeTypePatch: CompositeTypePatch! + checkConstraintPatch: CheckConstraintPatch! } """ -Represents an update to a `CompositeType`. Fields that are set will be updated. +Represents an update to a `CheckConstraint`. Fields that are set will be updated. """ -input CompositeTypePatch { +input CheckConstraintPatch { id: UUID databaseId: UUID - schemaId: UUID + tableId: UUID name: String - label: String - description: String - attributes: JSON + type: String + fieldIds: [UUID] + expr: JSON smartTags: JSON category: ObjectCategory - scope: Int tags: [String] + createdAt: Datetime + updatedAt: Datetime } -"""The output of our update `Enum` mutation.""" -type UpdateEnumPayload { +"""The output of our update `UniqueConstraint` mutation.""" +type UpdateUniqueConstraintPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `Enum` that was updated by this mutation.""" - enum: Enum + """The `UniqueConstraint` that was updated by this mutation.""" + uniqueConstraint: UniqueConstraint """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `Enum`. May be used by Relay 1.""" - enumEdge( - """The method to use when ordering `Enum`.""" - orderBy: [EnumOrderBy!]! = [PRIMARY_KEY_ASC] - ): EnumEdge + """An edge for our `UniqueConstraint`. May be used by Relay 1.""" + uniqueConstraintEdge( + """The method to use when ordering `UniqueConstraint`.""" + orderBy: [UniqueConstraintOrderBy!]! = [PRIMARY_KEY_ASC] + ): UniqueConstraintEdge } -"""All input for the `updateEnum` mutation.""" -input UpdateEnumInput { +"""All input for the `updateUniqueConstraint` mutation.""" +input UpdateUniqueConstraintInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -18162,51 +18463,54 @@ input UpdateEnumInput { id: UUID! """ - An object where the defined keys will be set on the `Enum` being updated. + An object where the defined keys will be set on the `UniqueConstraint` being updated. """ - enumPatch: EnumPatch! + uniqueConstraintPatch: UniqueConstraintPatch! } -"""Represents an update to a `Enum`. Fields that are set will be updated.""" -input EnumPatch { +""" +Represents an update to a `UniqueConstraint`. Fields that are set will be updated. +""" +input UniqueConstraintPatch { id: UUID databaseId: UUID - schemaId: UUID + tableId: UUID name: String - label: String description: String - values: [String] smartTags: JSON + type: String + fieldIds: [UUID] category: ObjectCategory - scope: Int tags: [String] + createdAt: Datetime + updatedAt: Datetime } -"""The output of our update `View` mutation.""" -type UpdateViewPayload { +"""The output of our update `SpatialRelation` mutation.""" +type UpdateSpatialRelationPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `View` that was updated by this mutation.""" - view: View + """The `SpatialRelation` that was updated by this mutation.""" + spatialRelation: SpatialRelation """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `View`. May be used by Relay 1.""" - viewEdge( - """The method to use when ordering `View`.""" - orderBy: [ViewOrderBy!]! = [PRIMARY_KEY_ASC] - ): ViewEdge + """An edge for our `SpatialRelation`. May be used by Relay 1.""" + spatialRelationEdge( + """The method to use when ordering `SpatialRelation`.""" + orderBy: [SpatialRelationOrderBy!]! = [PRIMARY_KEY_ASC] + ): SpatialRelationEdge } -"""All input for the `updateView` mutation.""" -input UpdateViewInput { +"""All input for the `updateSpatialRelation` mutation.""" +input UpdateSpatialRelationInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -18215,128 +18519,87 @@ input UpdateViewInput { id: UUID! """ - An object where the defined keys will be set on the `View` being updated. + An object where the defined keys will be set on the `SpatialRelation` being updated. """ - viewPatch: ViewPatch! + spatialRelationPatch: SpatialRelationPatch! } -"""Represents an update to a `View`. Fields that are set will be updated.""" -input ViewPatch { +""" +Represents an update to a `SpatialRelation`. Fields that are set will be updated. +""" +input SpatialRelationPatch { id: UUID databaseId: UUID - schemaId: UUID - name: String tableId: UUID - viewType: String - data: JSON - filterType: String - filterData: JSON - securityInvoker: Boolean - isReadOnly: Boolean - smartTags: JSON + fieldId: UUID + refTableId: UUID + refFieldId: UUID + name: String + operator: String + paramName: String category: ObjectCategory - scope: Int tags: [String] + createdAt: Datetime + updatedAt: Datetime } -"""The output of our update `DatabaseSetting` mutation.""" -type UpdateDatabaseSettingPayload { +"""The output of our update `Policy` mutation.""" +type UpdatePolicyPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `DatabaseSetting` that was updated by this mutation.""" - databaseSetting: DatabaseSetting + """The `Policy` that was updated by this mutation.""" + policy: Policy """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `DatabaseSetting`. May be used by Relay 1.""" - databaseSettingEdge( - """The method to use when ordering `DatabaseSetting`.""" - orderBy: [DatabaseSettingOrderBy!]! = [PRIMARY_KEY_ASC] - ): DatabaseSettingEdge + """An edge for our `Policy`. May be used by Relay 1.""" + policyEdge( + """The method to use when ordering `Policy`.""" + orderBy: [PolicyOrderBy!]! = [PRIMARY_KEY_ASC] + ): PolicyEdge } -"""All input for the `updateDatabaseSetting` mutation.""" -input UpdateDatabaseSettingInput { +"""All input for the `updatePolicy` mutation.""" +input UpdatePolicyInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - - """Unique identifier for this settings record""" id: UUID! """ - An object where the defined keys will be set on the `DatabaseSetting` being updated. + An object where the defined keys will be set on the `Policy` being updated. """ - databaseSettingPatch: DatabaseSettingPatch! + policyPatch: PolicyPatch! } """ -Represents an update to a `DatabaseSetting`. Fields that are set will be updated. +Represents an update to a `Policy`. Fields that are set will be updated. """ -input DatabaseSettingPatch { - """Unique identifier for this settings record""" +input PolicyPatch { id: UUID - - """Reference to the metaschema database these settings apply to""" databaseId: UUID - - """Enable aggregate queries (sum, avg, min, max, etc.) in the GraphQL API""" - enableAggregates: Boolean - - """Enable PostGIS spatial types and operators in the GraphQL API""" - enablePostgis: Boolean - - """ - Enable unified search (tsvector, BM25, pg_trgm, pgvector) in the GraphQL API - """ - enableSearch: Boolean - - """Enable direct (multipart) file upload mutations in the GraphQL API""" - enableDirectUploads: Boolean - - """Enable presigned URL upload flow for S3/MinIO storage""" - enablePresignedUploads: Boolean - - """Enable many-to-many relationship queries in the GraphQL API""" - enableManyToMany: Boolean - - """Enable connection filter (where argument) in the GraphQL API""" - enableConnectionFilter: Boolean - - """Enable ltree hierarchical data type support in the GraphQL API""" - enableLtree: Boolean - - """Enable LLM/AI integration features in the GraphQL API""" - enableLlm: Boolean - - """ - Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API - """ - enableRealtime: Boolean - - """ - Enable bulk mutation operations (insert, upsert, update, delete) in the GraphQL API - """ - enableBulk: Boolean - - """ - Enable internationalization plugin (localeStrings field, translation table discovery) in the GraphQL API - """ - enableI18N: Boolean - - """ - Extensible JSON for additional settings that do not have dedicated columns - """ - options: JSON + tableId: UUID + name: String + granteeName: String + privilege: String + permissive: Boolean + disabled: Boolean + policyType: String + data: JSON + smartTags: JSON + category: ObjectCategory + tags: [String] + createdAt: Datetime + updatedAt: Datetime } """The output of our update `ApiSetting` mutation.""" @@ -18444,215 +18707,45 @@ input ApiSettingPatch { """ Override: enable bulk mutations (NULL = inherit from database_settings) - """ - enableBulk: Boolean - - """ - Override: enable internationalization plugin (NULL = inherit from database_settings) - """ - enableI18N: Boolean - - """ - Extensible JSON for additional per-API settings that do not have dedicated columns - """ - options: JSON -} - -"""The output of our update `DatabaseTransfer` mutation.""" -type UpdateDatabaseTransferPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `DatabaseTransfer` that was updated by this mutation.""" - databaseTransfer: DatabaseTransfer - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `DatabaseTransfer`. May be used by Relay 1.""" - databaseTransferEdge( - """The method to use when ordering `DatabaseTransfer`.""" - orderBy: [DatabaseTransferOrderBy!]! = [PRIMARY_KEY_ASC] - ): DatabaseTransferEdge -} - -"""All input for the `updateDatabaseTransfer` mutation.""" -input UpdateDatabaseTransferInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `DatabaseTransfer` being updated. - """ - databaseTransferPatch: DatabaseTransferPatch! -} - -""" -Represents an update to a `DatabaseTransfer`. Fields that are set will be updated. -""" -input DatabaseTransferPatch { - id: UUID - databaseId: UUID - targetOwnerId: UUID - sourceApproved: Boolean - targetApproved: Boolean - sourceApprovedAt: Datetime - targetApprovedAt: Datetime - status: String - initiatedBy: UUID - notes: String - expiresAt: Datetime - createdAt: Datetime - updatedAt: Datetime - completedAt: Datetime -} - -"""The output of our update `PrimaryKeyConstraint` mutation.""" -type UpdatePrimaryKeyConstraintPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `PrimaryKeyConstraint` that was updated by this mutation.""" - primaryKeyConstraint: PrimaryKeyConstraint - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `PrimaryKeyConstraint`. May be used by Relay 1.""" - primaryKeyConstraintEdge( - """The method to use when ordering `PrimaryKeyConstraint`.""" - orderBy: [PrimaryKeyConstraintOrderBy!]! = [PRIMARY_KEY_ASC] - ): PrimaryKeyConstraintEdge -} - -"""All input for the `updatePrimaryKeyConstraint` mutation.""" -input UpdatePrimaryKeyConstraintInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `PrimaryKeyConstraint` being updated. - """ - primaryKeyConstraintPatch: PrimaryKeyConstraintPatch! -} - -""" -Represents an update to a `PrimaryKeyConstraint`. Fields that are set will be updated. -""" -input PrimaryKeyConstraintPatch { - id: UUID - databaseId: UUID - tableId: UUID - name: String - type: String - fieldIds: [UUID] - smartTags: JSON - category: ObjectCategory - scope: Int - tags: [String] - createdAt: Datetime - updatedAt: Datetime -} - -"""The output of our update `Trigger` mutation.""" -type UpdateTriggerPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `Trigger` that was updated by this mutation.""" - trigger: Trigger - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `Trigger`. May be used by Relay 1.""" - triggerEdge( - """The method to use when ordering `Trigger`.""" - orderBy: [TriggerOrderBy!]! = [PRIMARY_KEY_ASC] - ): TriggerEdge -} - -"""All input for the `updateTrigger` mutation.""" -input UpdateTriggerInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `Trigger` being updated. - """ - triggerPatch: TriggerPatch! -} - -""" -Represents an update to a `Trigger`. Fields that are set will be updated. -""" -input TriggerPatch { - id: UUID - databaseId: UUID - tableId: UUID - name: String - event: String - functionName: String - smartTags: JSON - category: ObjectCategory - scope: Int - tags: [String] - createdAt: Datetime - updatedAt: Datetime + """ + enableBulk: Boolean + + """ + Override: enable internationalization plugin (NULL = inherit from database_settings) + """ + enableI18N: Boolean + + """ + Extensible JSON for additional per-API settings that do not have dedicated columns + """ + options: JSON } -"""The output of our update `CheckConstraint` mutation.""" -type UpdateCheckConstraintPayload { +"""The output of our update `DatabaseTransfer` mutation.""" +type UpdateDatabaseTransferPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `CheckConstraint` that was updated by this mutation.""" - checkConstraint: CheckConstraint + """The `DatabaseTransfer` that was updated by this mutation.""" + databaseTransfer: DatabaseTransfer """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `CheckConstraint`. May be used by Relay 1.""" - checkConstraintEdge( - """The method to use when ordering `CheckConstraint`.""" - orderBy: [CheckConstraintOrderBy!]! = [PRIMARY_KEY_ASC] - ): CheckConstraintEdge + """An edge for our `DatabaseTransfer`. May be used by Relay 1.""" + databaseTransferEdge( + """The method to use when ordering `DatabaseTransfer`.""" + orderBy: [DatabaseTransferOrderBy!]! = [PRIMARY_KEY_ASC] + ): DatabaseTransferEdge } -"""All input for the `updateCheckConstraint` mutation.""" -input UpdateCheckConstraintInput { +"""All input for the `updateDatabaseTransfer` mutation.""" +input UpdateDatabaseTransferInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -18661,55 +18754,56 @@ input UpdateCheckConstraintInput { id: UUID! """ - An object where the defined keys will be set on the `CheckConstraint` being updated. + An object where the defined keys will be set on the `DatabaseTransfer` being updated. """ - checkConstraintPatch: CheckConstraintPatch! + databaseTransferPatch: DatabaseTransferPatch! } """ -Represents an update to a `CheckConstraint`. Fields that are set will be updated. +Represents an update to a `DatabaseTransfer`. Fields that are set will be updated. """ -input CheckConstraintPatch { +input DatabaseTransferPatch { id: UUID databaseId: UUID - tableId: UUID - name: String - type: String - fieldIds: [UUID] - expr: JSON - smartTags: JSON - category: ObjectCategory - scope: Int - tags: [String] + targetOwnerId: UUID + sourceApproved: Boolean + targetApproved: Boolean + sourceApprovedAt: Datetime + targetApprovedAt: Datetime + status: String + initiatedBy: UUID + notes: String + expiresAt: Datetime createdAt: Datetime updatedAt: Datetime + completedAt: Datetime } -"""The output of our update `UniqueConstraint` mutation.""" -type UpdateUniqueConstraintPayload { +"""The output of our update `Index` mutation.""" +type UpdateIndexPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `UniqueConstraint` that was updated by this mutation.""" - uniqueConstraint: UniqueConstraint + """The `Index` that was updated by this mutation.""" + index: Index """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `UniqueConstraint`. May be used by Relay 1.""" - uniqueConstraintEdge( - """The method to use when ordering `UniqueConstraint`.""" - orderBy: [UniqueConstraintOrderBy!]! = [PRIMARY_KEY_ASC] - ): UniqueConstraintEdge + """An edge for our `Index`. May be used by Relay 1.""" + indexEdge( + """The method to use when ordering `Index`.""" + orderBy: [IndexOrderBy!]! = [PRIMARY_KEY_ASC] + ): IndexEdge } -"""All input for the `updateUniqueConstraint` mutation.""" -input UpdateUniqueConstraintInput { +"""All input for the `updateIndex` mutation.""" +input UpdateIndexInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -18718,221 +18812,213 @@ input UpdateUniqueConstraintInput { id: UUID! """ - An object where the defined keys will be set on the `UniqueConstraint` being updated. + An object where the defined keys will be set on the `Index` being updated. """ - uniqueConstraintPatch: UniqueConstraintPatch! + indexPatch: IndexPatch! } """ -Represents an update to a `UniqueConstraint`. Fields that are set will be updated. +Represents an update to a `Index`. Fields that are set will be updated. """ -input UniqueConstraintPatch { +input IndexPatch { id: UUID databaseId: UUID tableId: UUID name: String - description: String - smartTags: JSON - type: String fieldIds: [UUID] + includeFieldIds: [UUID] + accessMethod: String + indexParams: JSON + whereClause: JSON + isUnique: Boolean + options: JSON + opClasses: [String] + smartTags: JSON category: ObjectCategory - scope: Int tags: [String] createdAt: Datetime updatedAt: Datetime } -"""The output of our update `SpatialRelation` mutation.""" -type UpdateSpatialRelationPayload { +"""The output of our update `App` mutation.""" +type UpdateAppPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `SpatialRelation` that was updated by this mutation.""" - spatialRelation: SpatialRelation + """The `App` that was updated by this mutation.""" + app: App """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `SpatialRelation`. May be used by Relay 1.""" - spatialRelationEdge( - """The method to use when ordering `SpatialRelation`.""" - orderBy: [SpatialRelationOrderBy!]! = [PRIMARY_KEY_ASC] - ): SpatialRelationEdge + """An edge for our `App`. May be used by Relay 1.""" + appEdge( + """The method to use when ordering `App`.""" + orderBy: [AppOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEdge } -"""All input for the `updateSpatialRelation` mutation.""" -input UpdateSpatialRelationInput { +"""All input for the `updateApp` mutation.""" +input UpdateAppInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String + + """Unique identifier for this app""" id: UUID! """ - An object where the defined keys will be set on the `SpatialRelation` being updated. + An object where the defined keys will be set on the `App` being updated. """ - spatialRelationPatch: SpatialRelationPatch! + appPatch: AppPatch! } -""" -Represents an update to a `SpatialRelation`. Fields that are set will be updated. -""" -input SpatialRelationPatch { +"""Represents an update to a `App`. Fields that are set will be updated.""" +input AppPatch { + """Unique identifier for this app""" id: UUID + + """Reference to the metaschema database this app belongs to""" databaseId: UUID - tableId: UUID - fieldId: UUID - refTableId: UUID - refFieldId: UUID + + """Site this app is associated with (one app per site)""" + siteId: UUID + + """Display name of the app""" name: String - operator: String - paramName: String - category: ObjectCategory - scope: Int - tags: [String] - createdAt: Datetime - updatedAt: Datetime + + """App icon or promotional image""" + appImage: ConstructiveInternalTypeImage + + """URL to the Apple App Store listing""" + appStoreLink: ConstructiveInternalTypeUrl + + """Apple App Store application identifier""" + appStoreId: String + + """ + Apple App ID prefix (Team ID) for universal links and associated domains + """ + appIdPrefix: String + + """URL to the Google Play Store listing""" + playStoreLink: ConstructiveInternalTypeUrl + + """Upload for App icon or promotional image""" + appImageUpload: Upload } -"""The output of our update `Policy` mutation.""" -type UpdatePolicyPayload { +"""The output of our update `DatabaseSetting` mutation.""" +type UpdateDatabaseSettingPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `Policy` that was updated by this mutation.""" - policy: Policy + """The `DatabaseSetting` that was updated by this mutation.""" + databaseSetting: DatabaseSetting """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `Policy`. May be used by Relay 1.""" - policyEdge( - """The method to use when ordering `Policy`.""" - orderBy: [PolicyOrderBy!]! = [PRIMARY_KEY_ASC] - ): PolicyEdge + """An edge for our `DatabaseSetting`. May be used by Relay 1.""" + databaseSettingEdge( + """The method to use when ordering `DatabaseSetting`.""" + orderBy: [DatabaseSettingOrderBy!]! = [PRIMARY_KEY_ASC] + ): DatabaseSettingEdge } -"""All input for the `updatePolicy` mutation.""" -input UpdatePolicyInput { +"""All input for the `updateDatabaseSetting` mutation.""" +input UpdateDatabaseSettingInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String + + """Unique identifier for this settings record""" id: UUID! """ - An object where the defined keys will be set on the `Policy` being updated. + An object where the defined keys will be set on the `DatabaseSetting` being updated. """ - policyPatch: PolicyPatch! + databaseSettingPatch: DatabaseSettingPatch! } """ -Represents an update to a `Policy`. Fields that are set will be updated. +Represents an update to a `DatabaseSetting`. Fields that are set will be updated. """ -input PolicyPatch { +input DatabaseSettingPatch { + """Unique identifier for this settings record""" id: UUID - databaseId: UUID - tableId: UUID - name: String - granteeName: String - privilege: String - permissive: Boolean - disabled: Boolean - policyType: String - data: JSON - smartTags: JSON - category: ObjectCategory - scope: Int - tags: [String] - createdAt: Datetime - updatedAt: Datetime -} - -"""The output of our update `App` mutation.""" -type UpdateAppPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `App` that was updated by this mutation.""" - app: App - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `App`. May be used by Relay 1.""" - appEdge( - """The method to use when ordering `App`.""" - orderBy: [AppOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppEdge -} + """Reference to the metaschema database these settings apply to""" + databaseId: UUID -"""All input for the `updateApp` mutation.""" -input UpdateAppInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String + """Enable aggregate queries (sum, avg, min, max, etc.) in the GraphQL API""" + enableAggregates: Boolean - """Unique identifier for this app""" - id: UUID! + """Enable PostGIS spatial types and operators in the GraphQL API""" + enablePostgis: Boolean """ - An object where the defined keys will be set on the `App` being updated. + Enable unified search (tsvector, BM25, pg_trgm, pgvector) in the GraphQL API """ - appPatch: AppPatch! -} + enableSearch: Boolean -"""Represents an update to a `App`. Fields that are set will be updated.""" -input AppPatch { - """Unique identifier for this app""" - id: UUID + """Enable direct (multipart) file upload mutations in the GraphQL API""" + enableDirectUploads: Boolean - """Reference to the metaschema database this app belongs to""" - databaseId: UUID + """Enable presigned URL upload flow for S3/MinIO storage""" + enablePresignedUploads: Boolean - """Site this app is associated with (one app per site)""" - siteId: UUID + """Enable many-to-many relationship queries in the GraphQL API""" + enableManyToMany: Boolean - """Display name of the app""" - name: String + """Enable connection filter (where argument) in the GraphQL API""" + enableConnectionFilter: Boolean - """App icon or promotional image""" - appImage: ConstructiveInternalTypeImage + """Enable ltree hierarchical data type support in the GraphQL API""" + enableLtree: Boolean - """URL to the Apple App Store listing""" - appStoreLink: ConstructiveInternalTypeUrl + """Enable LLM/AI integration features in the GraphQL API""" + enableLlm: Boolean - """Apple App Store application identifier""" - appStoreId: String + """ + Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API + """ + enableRealtime: Boolean """ - Apple App ID prefix (Team ID) for universal links and associated domains + Enable bulk mutation operations (insert, upsert, update, delete) in the GraphQL API """ - appIdPrefix: String + enableBulk: Boolean - """URL to the Google Play Store listing""" - playStoreLink: ConstructiveInternalTypeUrl + """ + Enable internationalization plugin (localeStrings field, translation table discovery) in the GraphQL API + """ + enableI18N: Boolean - """Upload for App icon or promotional image""" - appImageUpload: Upload + """ + Extensible JSON for additional settings that do not have dedicated columns + """ + options: JSON + + """Key/value pairs for selecting and filtering database settings""" + labels: JSON + + """Freeform metadata for tooling and operational notes""" + annotations: JSON } """The output of our update `Site` mutation.""" @@ -19004,6 +19090,12 @@ input SitePatch { """PostgreSQL database name this site connects to""" dbname: String + """Key/value pairs for selecting and filtering sites""" + labels: JSON + + """Freeform metadata for tooling and operational notes""" + annotations: JSON + """Upload for Open Graph image used for social media link previews""" ogImageUpload: Upload @@ -19017,68 +19109,6 @@ input SitePatch { logoUpload: Upload } -"""The output of our update `Index` mutation.""" -type UpdateIndexPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `Index` that was updated by this mutation.""" - index: Index - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `Index`. May be used by Relay 1.""" - indexEdge( - """The method to use when ordering `Index`.""" - orderBy: [IndexOrderBy!]! = [PRIMARY_KEY_ASC] - ): IndexEdge -} - -"""All input for the `updateIndex` mutation.""" -input UpdateIndexInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `Index` being updated. - """ - indexPatch: IndexPatch! -} - -""" -Represents an update to a `Index`. Fields that are set will be updated. -""" -input IndexPatch { - id: UUID - databaseId: UUID - tableId: UUID - name: String - fieldIds: [UUID] - includeFieldIds: [UUID] - accessMethod: String - indexParams: JSON - whereClause: JSON - isUnique: Boolean - options: JSON - opClasses: [String] - smartTags: JSON - category: ObjectCategory - scope: Int - tags: [String] - createdAt: Datetime - updatedAt: Datetime -} - """The output of our update `ForeignKeyConstraint` mutation.""" type UpdateForeignKeyConstraintPayload { """ @@ -19134,7 +19164,6 @@ input ForeignKeyConstraintPatch { deleteAction: String updateAction: String category: ObjectCategory - scope: Int tags: [String] createdAt: Datetime updatedAt: Datetime @@ -19364,7 +19393,6 @@ input SchemaPatch { description: String smartTags: JSON category: ObjectCategory - scope: Int tags: [String] isPublic: Boolean apiExposure: ApiExposureLevel @@ -19433,7 +19461,6 @@ input FieldPatch { max: Float tags: [String] category: ObjectCategory - scope: Int createdAt: Datetime updatedAt: Datetime } @@ -19488,7 +19515,6 @@ input TablePatch { description: String smartTags: JSON category: ObjectCategory - scope: Int useRls: Boolean timestamps: Boolean peoplestamps: Boolean @@ -19739,41 +19765,6 @@ input DeleteViewGrantInput { id: UUID! } -"""The output of our delete `Api` mutation.""" -type DeleteApiPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `Api` that was deleted by this mutation.""" - api: Api - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `Api`. May be used by Relay 1.""" - apiEdge( - """The method to use when ordering `Api`.""" - orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApiEdge -} - -"""All input for the `deleteApi` mutation.""" -input DeleteApiInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """Unique identifier for this API""" - id: UUID! -} - """The output of our delete `CorsSetting` mutation.""" type DeleteCorsSettingPayload { """ @@ -19912,6 +19903,41 @@ input DeleteSiteModuleInput { id: UUID! } +"""The output of our delete `Api` mutation.""" +type DeleteApiPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Api` that was deleted by this mutation.""" + api: Api + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Api`. May be used by Relay 1.""" + apiEdge( + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiEdge +} + +"""All input for the `deleteApi` mutation.""" +input DeleteApiInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Unique identifier for this API""" + id: UUID! +} + """The output of our delete `SiteMetadatum` mutation.""" type DeleteSiteMetadatumPayload { """ @@ -20114,41 +20140,6 @@ input DeleteTableGrantInput { id: UUID! } -"""The output of our delete `Domain` mutation.""" -type DeleteDomainPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `Domain` that was deleted by this mutation.""" - domain: Domain - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `Domain`. May be used by Relay 1.""" - domainEdge( - """The method to use when ordering `Domain`.""" - orderBy: [DomainOrderBy!]! = [PRIMARY_KEY_ASC] - ): DomainEdge -} - -"""All input for the `deleteDomain` mutation.""" -input DeleteDomainInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """Unique identifier for this domain record""" - id: UUID! -} - """The output of our delete `RlsSetting` mutation.""" type DeleteRlsSettingPayload { """ @@ -20250,6 +20241,41 @@ input DeletePartitionInput { id: UUID! } +"""The output of our delete `Domain` mutation.""" +type DeleteDomainPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Domain` that was deleted by this mutation.""" + domain: Domain + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Domain`. May be used by Relay 1.""" + domainEdge( + """The method to use when ordering `Domain`.""" + orderBy: [DomainOrderBy!]! = [PRIMARY_KEY_ASC] + ): DomainEdge +} + +"""All input for the `deleteDomain` mutation.""" +input DeleteDomainInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Unique identifier for this domain record""" + id: UUID! +} + """The output of our delete `CompositeType` mutation.""" type DeleteCompositeTypePayload { """ @@ -20349,109 +20375,6 @@ input DeleteViewInput { id: UUID! } -"""The output of our delete `DatabaseSetting` mutation.""" -type DeleteDatabaseSettingPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `DatabaseSetting` that was deleted by this mutation.""" - databaseSetting: DatabaseSetting - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `DatabaseSetting`. May be used by Relay 1.""" - databaseSettingEdge( - """The method to use when ordering `DatabaseSetting`.""" - orderBy: [DatabaseSettingOrderBy!]! = [PRIMARY_KEY_ASC] - ): DatabaseSettingEdge -} - -"""All input for the `deleteDatabaseSetting` mutation.""" -input DeleteDatabaseSettingInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """Unique identifier for this settings record""" - id: UUID! -} - -"""The output of our delete `ApiSetting` mutation.""" -type DeleteApiSettingPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `ApiSetting` that was deleted by this mutation.""" - apiSetting: ApiSetting - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `ApiSetting`. May be used by Relay 1.""" - apiSettingEdge( - """The method to use when ordering `ApiSetting`.""" - orderBy: [ApiSettingOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApiSettingEdge -} - -"""All input for the `deleteApiSetting` mutation.""" -input DeleteApiSettingInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """Unique identifier for this API settings record""" - id: UUID! -} - -"""The output of our delete `DatabaseTransfer` mutation.""" -type DeleteDatabaseTransferPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `DatabaseTransfer` that was deleted by this mutation.""" - databaseTransfer: DatabaseTransfer - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `DatabaseTransfer`. May be used by Relay 1.""" - databaseTransferEdge( - """The method to use when ordering `DatabaseTransfer`.""" - orderBy: [DatabaseTransferOrderBy!]! = [PRIMARY_KEY_ASC] - ): DatabaseTransferEdge -} - -"""All input for the `deleteDatabaseTransfer` mutation.""" -input DeleteDatabaseTransferInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! -} - """The output of our delete `PrimaryKeyConstraint` mutation.""" type DeletePrimaryKeyConstraintPayload { """ @@ -20650,6 +20573,107 @@ input DeletePolicyInput { id: UUID! } +"""The output of our delete `ApiSetting` mutation.""" +type DeleteApiSettingPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `ApiSetting` that was deleted by this mutation.""" + apiSetting: ApiSetting + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `ApiSetting`. May be used by Relay 1.""" + apiSettingEdge( + """The method to use when ordering `ApiSetting`.""" + orderBy: [ApiSettingOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiSettingEdge +} + +"""All input for the `deleteApiSetting` mutation.""" +input DeleteApiSettingInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Unique identifier for this API settings record""" + id: UUID! +} + +"""The output of our delete `DatabaseTransfer` mutation.""" +type DeleteDatabaseTransferPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `DatabaseTransfer` that was deleted by this mutation.""" + databaseTransfer: DatabaseTransfer + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `DatabaseTransfer`. May be used by Relay 1.""" + databaseTransferEdge( + """The method to use when ordering `DatabaseTransfer`.""" + orderBy: [DatabaseTransferOrderBy!]! = [PRIMARY_KEY_ASC] + ): DatabaseTransferEdge +} + +"""All input for the `deleteDatabaseTransfer` mutation.""" +input DeleteDatabaseTransferInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + +"""The output of our delete `Index` mutation.""" +type DeleteIndexPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Index` that was deleted by this mutation.""" + index: Index + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Index`. May be used by Relay 1.""" + indexEdge( + """The method to use when ordering `Index`.""" + orderBy: [IndexOrderBy!]! = [PRIMARY_KEY_ASC] + ): IndexEdge +} + +"""All input for the `deleteIndex` mutation.""" +input DeleteIndexInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `App` mutation.""" type DeleteAppPayload { """ @@ -20685,71 +20709,73 @@ input DeleteAppInput { id: UUID! } -"""The output of our delete `Site` mutation.""" -type DeleteSitePayload { +"""The output of our delete `DatabaseSetting` mutation.""" +type DeleteDatabaseSettingPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `Site` that was deleted by this mutation.""" - site: Site + """The `DatabaseSetting` that was deleted by this mutation.""" + databaseSetting: DatabaseSetting """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `Site`. May be used by Relay 1.""" - siteEdge( - """The method to use when ordering `Site`.""" - orderBy: [SiteOrderBy!]! = [PRIMARY_KEY_ASC] - ): SiteEdge + """An edge for our `DatabaseSetting`. May be used by Relay 1.""" + databaseSettingEdge( + """The method to use when ordering `DatabaseSetting`.""" + orderBy: [DatabaseSettingOrderBy!]! = [PRIMARY_KEY_ASC] + ): DatabaseSettingEdge } -"""All input for the `deleteSite` mutation.""" -input DeleteSiteInput { +"""All input for the `deleteDatabaseSetting` mutation.""" +input DeleteDatabaseSettingInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """Unique identifier for this site""" + """Unique identifier for this settings record""" id: UUID! } -"""The output of our delete `Index` mutation.""" -type DeleteIndexPayload { +"""The output of our delete `Site` mutation.""" +type DeleteSitePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `Index` that was deleted by this mutation.""" - index: Index + """The `Site` that was deleted by this mutation.""" + site: Site """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `Index`. May be used by Relay 1.""" - indexEdge( - """The method to use when ordering `Index`.""" - orderBy: [IndexOrderBy!]! = [PRIMARY_KEY_ASC] - ): IndexEdge + """An edge for our `Site`. May be used by Relay 1.""" + siteEdge( + """The method to use when ordering `Site`.""" + orderBy: [SiteOrderBy!]! = [PRIMARY_KEY_ASC] + ): SiteEdge } -"""All input for the `deleteIndex` mutation.""" -input DeleteIndexInput { +"""All input for the `deleteSite` mutation.""" +input DeleteSiteInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String + + """Unique identifier for this site""" id: UUID! } diff --git a/sdk/constructive-sdk/schemas/auth.graphql b/sdk/constructive-sdk/schemas/auth.graphql index 69d407d14e..cd74ba7cb9 100644 --- a/sdk/constructive-sdk/schemas/auth.graphql +++ b/sdk/constructive-sdk/schemas/auth.graphql @@ -1,8 +1,8 @@ """The root query type which gives access points into the data universe.""" type Query { currentUserAgent: String - currentIpAddress: InternetAddress currentUserId: UUID + currentIpAddress: InternetAddress requireStepUp(stepUpType: String): Boolean currentUser: User @@ -64,6 +64,35 @@ type Query { orderBy: [RoleTypeOrderBy!] = [PRIMARY_KEY_ASC] ): RoleTypeConnection + """Reads and enables pagination through a set of `PrincipalEntity`.""" + principalEntities( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PrincipalEntityFilter + + """The method to use when ordering `PrincipalEntity`.""" + orderBy: [PrincipalEntityOrderBy!] = [PRIMARY_KEY_ASC] + ): PrincipalEntityConnection + """Reads and enables pagination through a set of `UserConnectedAccount`.""" userConnectedAccounts( """Only read the first `n` values of the set.""" @@ -122,6 +151,35 @@ type Query { orderBy: [CryptoAddressOrderBy!] = [PRIMARY_KEY_ASC] ): CryptoAddressConnection + """Reads and enables pagination through a set of `Principal`.""" + principals( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PrincipalFilter + + """The method to use when ordering `Principal`.""" + orderBy: [PrincipalOrderBy!] = [PRIMARY_KEY_ASC] + ): PrincipalConnection + """Reads and enables pagination through a set of `PhoneNumber`.""" phoneNumbers( """Only read the first `n` values of the set.""" @@ -180,6 +238,66 @@ type Query { orderBy: [AuditLogAuthOrderBy!] = [PRIMARY_KEY_ASC] ): AuditLogAuthConnection + """ + Reads and enables pagination through a set of `PrincipalScopeOverride`. + """ + principalScopeOverrides( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PrincipalScopeOverrideFilter + + """The method to use when ordering `PrincipalScopeOverride`.""" + orderBy: [PrincipalScopeOverrideOrderBy!] = [PRIMARY_KEY_ASC] + ): PrincipalScopeOverrideConnection + + """Reads and enables pagination through a set of `OrgApiKeyList`.""" + orgApiKeyLists( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgApiKeyListFilter + + """The method to use when ordering `OrgApiKeyList`.""" + orderBy: [OrgApiKeyListOrderBy!] = [NATURAL] + ): OrgApiKeyListConnection + """Reads and enables pagination through a set of `Email`.""" emails( """Only read the first `n` values of the set.""" @@ -273,14 +391,14 @@ type Query { _meta: MetaSchema } -"""An IPv4 or IPv6 host address, and optionally its subnet.""" -scalar InternetAddress - """ A universally unique identifier as defined by [RFC 4122](https://tools.ietf.org/html/rfc4122). """ scalar UUID +"""An IPv4 or IPv6 host address, and optionally its subnet.""" +scalar InternetAddress + type User { id: UUID! username: String @@ -294,6 +412,93 @@ type User { """Reads a single `RoleType` that is related to this `User`.""" roleType: RoleType + """Reads and enables pagination through a set of `Principal`.""" + ownedPrincipals( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PrincipalFilter + + """The method to use when ordering `Principal`.""" + orderBy: [PrincipalOrderBy!] = [PRIMARY_KEY_ASC] + ): PrincipalConnection! + + """Reads and enables pagination through a set of `Principal`.""" + principals( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PrincipalFilter + + """The method to use when ordering `Principal`.""" + orderBy: [PrincipalOrderBy!] = [PRIMARY_KEY_ASC] + ): PrincipalConnection! + + """Reads and enables pagination through a set of `PrincipalEntity`.""" + principalEntitiesByEntityId( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PrincipalEntityFilter + + """The method to use when ordering `PrincipalEntity`.""" + orderBy: [PrincipalEntityOrderBy!] = [PRIMARY_KEY_ASC] + ): PrincipalEntityConnection! + """Reads and enables pagination through a set of `Email`.""" ownedEmails( """Only read the first `n` values of the set.""" @@ -474,96 +679,198 @@ type RoleType { name: String! } -"""A connection to a list of `Email` values.""" -type EmailConnection { - """A list of `Email` objects.""" - nodes: [Email]! +"""A connection to a list of `Principal` values.""" +type PrincipalConnection { + """A list of `Principal` objects.""" + nodes: [Principal]! """ - A list of edges which contains the `Email` and cursor to aid in pagination. + A list of edges which contains the `Principal` and cursor to aid in pagination. """ - edges: [EmailEdge]! + edges: [PrincipalEdge]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `Email` you could get from the connection.""" + """The count of *all* `Principal` you could get from the connection.""" totalCount: Int! } -"""User email addresses with verification and primary-email management""" -type Email { +"""Scoped sub-identities (API keys and agents) with precomputed SPRT""" +type Principal { id: UUID! + createdAt: Datetime + updatedAt: Datetime + + """The human user who owns and manages this principal""" ownerId: UUID! - """The email address""" - email: ConstructiveInternalTypeEmail! + """ + The user row (type=3 Principal) that represents this principal identity + """ + userId: UUID! - """Whether the email address has been verified via confirmation link""" - isVerified: Boolean! + """ + Human-readable label for this principal (e.g., billing-bot, ci-deploy-key) + """ + name: String! - """Whether this is the user's primary email address""" - isPrimary: Boolean! + """Permission bitmask subset; all-1s means inherit all parent permissions""" + allowedMask: BitString! - """Optional user-provided label for this email (e.g. "Work", "Personal").""" - name: String - createdAt: Datetime - updatedAt: Datetime + """Whether this principal is restricted to read-only operations""" + isReadOnly: Boolean! - """Reads a single `User` that is related to this `Email`.""" - owner: User -} + """Whether this principal bypasses MFA step-up requirements""" + bypassStepUp: Boolean! -scalar ConstructiveInternalTypeEmail + """Reads a single `User` that is related to this `Principal`.""" + owner: User -"""A `Email` edge in the connection.""" -type EmailEdge { - """A cursor for use in pagination.""" - cursor: Cursor + """Reads a single `User` that is related to this `Principal`.""" + user: User - """The `Email` at the end of the edge.""" - node: Email -} + """Reads and enables pagination through a set of `PrincipalEntity`.""" + principalEntities( + """Only read the first `n` values of the set.""" + first: Int -"""A location in a connection that can be used for resuming pagination.""" -scalar Cursor + """Only read the last `n` values of the set.""" + last: Int -"""Information about pagination in a connection.""" -type PageInfo { - """When paginating forwards, are there more items?""" - hasNextPage: Boolean! + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """When paginating backwards, are there more items?""" - hasPreviousPage: Boolean! + """Read all values in the set before (above) this cursor.""" + before: Cursor - """When paginating backwards, the cursor to continue.""" - startCursor: Cursor + """Read all values in the set after (below) this cursor.""" + after: Cursor - """When paginating forwards, the cursor to continue.""" - endCursor: Cursor -} + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PrincipalEntityFilter -""" -A filter to be used against `Email` object types. All fields are combined with a logical ‘and.’ -""" -input EmailFilter { - """Filter by the object’s `id` field.""" - id: UUIDFilter + """The method to use when ordering `PrincipalEntity`.""" + orderBy: [PrincipalEntityOrderBy!] = [PRIMARY_KEY_ASC] + ): PrincipalEntityConnection! - """Filter by the object’s `ownerId` field.""" - ownerId: UUIDFilter + """ + Reads and enables pagination through a set of `PrincipalScopeOverride`. + """ + principalScopeOverrides( + """Only read the first `n` values of the set.""" + first: Int - """Filter by the object’s `email` field.""" - email: ConstructiveInternalTypeEmailFilter + """Only read the last `n` values of the set.""" + last: Int - """Filter by the object’s `isVerified` field.""" - isVerified: BooleanFilter + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Filter by the object’s `isPrimary` field.""" - isPrimary: BooleanFilter + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Filter by the object’s `name` field.""" - name: StringFilter + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PrincipalScopeOverrideFilter + + """The method to use when ordering `PrincipalScopeOverride`.""" + orderBy: [PrincipalScopeOverrideOrderBy!] = [PRIMARY_KEY_ASC] + ): PrincipalScopeOverrideConnection! +} + +"""A string representing a series of binary bits""" +scalar BitString + +"""A connection to a list of `PrincipalEntity` values.""" +type PrincipalEntityConnection { + """A list of `PrincipalEntity` objects.""" + nodes: [PrincipalEntity]! + + """ + A list of edges which contains the `PrincipalEntity` and cursor to aid in pagination. + """ + edges: [PrincipalEntityEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `PrincipalEntity` you could get from the connection. + """ + totalCount: Int! +} + +"""Association table scoping principals to specific organizations""" +type PrincipalEntity { + id: UUID! + createdAt: Datetime + updatedAt: Datetime + + """The principal this scoping row belongs to""" + principalId: UUID! + + """The organization this principal is scoped to""" + entityId: UUID! + + """Denormalized owner_id from principals table for RLS""" + ownerId: UUID! + + """Reads a single `User` that is related to this `PrincipalEntity`.""" + entity: User + + """Reads a single `User` that is related to this `PrincipalEntity`.""" + owner: User + + """Reads a single `Principal` that is related to this `PrincipalEntity`.""" + principal: Principal +} + +"""A `PrincipalEntity` edge in the connection.""" +type PrincipalEntityEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PrincipalEntity` at the end of the edge.""" + node: PrincipalEntity +} + +"""A location in a connection that can be used for resuming pagination.""" +scalar Cursor + +"""Information about pagination in a connection.""" +type PageInfo { + """When paginating forwards, are there more items?""" + hasNextPage: Boolean! + + """When paginating backwards, are there more items?""" + hasPreviousPage: Boolean! + + """When paginating backwards, the cursor to continue.""" + startCursor: Cursor + + """When paginating forwards, the cursor to continue.""" + endCursor: Cursor +} + +""" +A filter to be used against `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ +""" +input PrincipalEntityFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter @@ -571,17 +878,32 @@ input EmailFilter { """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter + """Filter by the object’s `principalId` field.""" + principalId: UUIDFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `ownerId` field.""" + ownerId: UUIDFilter + """Checks for all expressions in this list.""" - and: [EmailFilter!] + and: [PrincipalEntityFilter!] """Checks for any expressions in this list.""" - or: [EmailFilter!] + or: [PrincipalEntityFilter!] """Negates the expression.""" - not: EmailFilter + not: PrincipalEntityFilter + + """Filter by the object’s `entity` relation.""" + entity: UserFilter """Filter by the object’s `owner` relation.""" owner: UserFilter + + """Filter by the object’s `principal` relation.""" + principal: PrincipalFilter } """ @@ -627,9 +949,155 @@ input UUIDFilter { } """ -A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ +A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ """ -input ConstructiveInternalTypeEmailFilter { +input DatetimeFilter { + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Equal to the specified value.""" + equalTo: Datetime + + """Not equal to the specified value.""" + notEqualTo: Datetime + + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: Datetime + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: Datetime + + """Included in the specified list.""" + in: [Datetime!] + + """Not included in the specified list.""" + notIn: [Datetime!] + + """Less than the specified value.""" + lessThan: Datetime + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: Datetime + + """Greater than the specified value.""" + greaterThan: Datetime + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: Datetime +} + +""" +A filter to be used against `User` object types. All fields are combined with a logical ‘and.’ +""" +input UserFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `username` field.""" + username: StringTrgmFilter + + """Filter by the object’s `displayName` field.""" + displayName: StringTrgmFilter + + """Filter by the object’s `profilePicture` field.""" + profilePicture: ConstructiveInternalTypeImageFilter + + """Filter by the object’s `searchTsv` field.""" + searchTsv: FullTextFilter + + """Filter by the object’s `type` field.""" + type: IntFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Checks for all expressions in this list.""" + and: [UserFilter!] + + """Checks for any expressions in this list.""" + or: [UserFilter!] + + """Negates the expression.""" + not: UserFilter + + """Filter by the object’s `roleType` relation.""" + roleType: RoleTypeFilter + + """Filter by the object’s `ownedPrincipals` relation.""" + ownedPrincipals: UserToManyPrincipalFilter + + """`ownedPrincipals` exist.""" + ownedPrincipalsExist: Boolean + + """Filter by the object’s `principals` relation.""" + principals: UserToManyPrincipalFilter + + """`principals` exist.""" + principalsExist: Boolean + + """Filter by the object’s `principalEntitiesByEntityId` relation.""" + principalEntitiesByEntityId: UserToManyPrincipalEntityFilter + + """`principalEntitiesByEntityId` exist.""" + principalEntitiesByEntityIdExist: Boolean + + """Filter by the object’s `ownedEmails` relation.""" + ownedEmails: UserToManyEmailFilter + + """`ownedEmails` exist.""" + ownedEmailsExist: Boolean + + """Filter by the object’s `ownedPhoneNumbers` relation.""" + ownedPhoneNumbers: UserToManyPhoneNumberFilter + + """`ownedPhoneNumbers` exist.""" + ownedPhoneNumbersExist: Boolean + + """Filter by the object’s `ownedCryptoAddresses` relation.""" + ownedCryptoAddresses: UserToManyCryptoAddressFilter + + """`ownedCryptoAddresses` exist.""" + ownedCryptoAddressesExist: Boolean + + """Filter by the object’s `ownedWebauthnCredentials` relation.""" + ownedWebauthnCredentials: UserToManyWebauthnCredentialFilter + + """`ownedWebauthnCredentials` exist.""" + ownedWebauthnCredentialsExist: Boolean + + """Filter by the object’s `auditLogAuthsByActorId` relation.""" + auditLogAuthsByActorId: UserToManyAuditLogAuthFilter + + """`auditLogAuthsByActorId` exist.""" + auditLogAuthsByActorIdExist: Boolean + + """TSV search on the `search_tsv` column.""" + tsvSearchTsv: String + + """TRGM search on the `display_name` column.""" + trgmDisplayName: TrgmSearchInput + + """ + Composite unified search. Provide a search string and it will be dispatched to + all text-compatible search algorithms (tsvector, BM25, pg_trgm) + simultaneously. When the LLM plugin is active, pgvector also participates via + auto-embedding. Rows matching ANY algorithm are returned. All matching score + fields are populated. + """ + unifiedSearch: String +} + +""" +A filter to be used against String fields with pg_trgm support. All fields are combined with a logical ‘and.’ +""" +input StringTrgmFilter { """ Is null (if `true` is specified) or is not null (if `false` is specified). """ @@ -674,10 +1142,10 @@ input ConstructiveInternalTypeEmailFilter { notIncludes: String """Contains the specified string (case-insensitive).""" - includesInsensitive: ConstructiveInternalTypeEmail + includesInsensitive: String """Does not contain the specified string (case-insensitive).""" - notIncludesInsensitive: ConstructiveInternalTypeEmail + notIncludesInsensitive: String """Starts with the specified string (case-sensitive).""" startsWith: String @@ -686,10 +1154,10 @@ input ConstructiveInternalTypeEmailFilter { notStartsWith: String """Starts with the specified string (case-insensitive).""" - startsWithInsensitive: ConstructiveInternalTypeEmail + startsWithInsensitive: String """Does not start with the specified string (case-insensitive).""" - notStartsWithInsensitive: ConstructiveInternalTypeEmail + notStartsWithInsensitive: String """Ends with the specified string (case-sensitive).""" endsWith: String @@ -698,10 +1166,10 @@ input ConstructiveInternalTypeEmailFilter { notEndsWith: String """Ends with the specified string (case-insensitive).""" - endsWithInsensitive: ConstructiveInternalTypeEmail + endsWithInsensitive: String """Does not end with the specified string (case-insensitive).""" - notEndsWithInsensitive: ConstructiveInternalTypeEmail + notEndsWithInsensitive: String """ Matches the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. @@ -716,88 +1184,221 @@ input ConstructiveInternalTypeEmailFilter { """ Matches the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. """ - likeInsensitive: ConstructiveInternalTypeEmail + likeInsensitive: String """ Does not match the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. """ - notLikeInsensitive: ConstructiveInternalTypeEmail + notLikeInsensitive: String """Equal to the specified value (case-insensitive).""" - equalToInsensitive: ConstructiveInternalTypeEmail + equalToInsensitive: String """Not equal to the specified value (case-insensitive).""" - notEqualToInsensitive: ConstructiveInternalTypeEmail + notEqualToInsensitive: String """ Not equal to the specified value, treating null like an ordinary value (case-insensitive). """ - distinctFromInsensitive: ConstructiveInternalTypeEmail + distinctFromInsensitive: String """ Equal to the specified value, treating null like an ordinary value (case-insensitive). """ - notDistinctFromInsensitive: ConstructiveInternalTypeEmail + notDistinctFromInsensitive: String """Included in the specified list (case-insensitive).""" - inInsensitive: [ConstructiveInternalTypeEmail!] + inInsensitive: [String!] """Not included in the specified list (case-insensitive).""" - notInInsensitive: [ConstructiveInternalTypeEmail!] + notInInsensitive: [String!] """Less than the specified value (case-insensitive).""" - lessThanInsensitive: ConstructiveInternalTypeEmail + lessThanInsensitive: String """Less than or equal to the specified value (case-insensitive).""" - lessThanOrEqualToInsensitive: ConstructiveInternalTypeEmail + lessThanOrEqualToInsensitive: String """Greater than the specified value (case-insensitive).""" - greaterThanInsensitive: ConstructiveInternalTypeEmail + greaterThanInsensitive: String """Greater than or equal to the specified value (case-insensitive).""" - greaterThanOrEqualToInsensitive: ConstructiveInternalTypeEmail + greaterThanOrEqualToInsensitive: String + + """ + Fuzzy matches using pg_trgm trigram similarity. Tolerates typos and misspellings. + """ + similarTo: TrgmSearchInput + + """ + Fuzzy matches using pg_trgm word_similarity. Finds the best matching substring within the column value. + """ + wordSimilarTo: TrgmSearchInput } """ -A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ +Input for pg_trgm fuzzy text matching. Provide a search value and optional similarity threshold. """ -input BooleanFilter { +input TrgmSearchInput { + """The text to fuzzy-match against. Typos and misspellings are tolerated.""" + value: String! + + """ + Minimum similarity threshold (0.0 to 1.0). Higher = stricter matching. Default is 0.3. + """ + threshold: Float +} + +""" +A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ +""" +input ConstructiveInternalTypeImageFilter { """ Is null (if `true` is specified) or is not null (if `false` is specified). """ isNull: Boolean """Equal to the specified value.""" - equalTo: Boolean + equalTo: ConstructiveInternalTypeImage """Not equal to the specified value.""" - notEqualTo: Boolean + notEqualTo: ConstructiveInternalTypeImage """ Not equal to the specified value, treating null like an ordinary value. """ - distinctFrom: Boolean + distinctFrom: ConstructiveInternalTypeImage """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: Boolean + notDistinctFrom: ConstructiveInternalTypeImage """Included in the specified list.""" - in: [Boolean!] + in: [ConstructiveInternalTypeImage!] """Not included in the specified list.""" - notIn: [Boolean!] + notIn: [ConstructiveInternalTypeImage!] """Less than the specified value.""" - lessThan: Boolean + lessThan: ConstructiveInternalTypeImage """Less than or equal to the specified value.""" - lessThanOrEqualTo: Boolean + lessThanOrEqualTo: ConstructiveInternalTypeImage """Greater than the specified value.""" - greaterThan: Boolean + greaterThan: ConstructiveInternalTypeImage """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: Boolean + greaterThanOrEqualTo: ConstructiveInternalTypeImage + + """Contains the specified JSON.""" + contains: ConstructiveInternalTypeImage + + """Contains the specified key.""" + containsKey: String + + """Contains all of the specified keys.""" + containsAllKeys: [String!] + + """Contains any of the specified keys.""" + containsAnyKeys: [String!] + + """Contained by the specified JSON.""" + containedBy: ConstructiveInternalTypeImage +} + +""" +A filter to be used against FullText fields. All fields are combined with a logical ‘and.’ +""" +input FullTextFilter { + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Equal to the specified value.""" + equalTo: FullText + + """Not equal to the specified value.""" + notEqualTo: FullText + + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: FullText + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: FullText + + """Included in the specified list.""" + in: [FullText!] + + """Not included in the specified list.""" + notIn: [FullText!] + + """Performs a full text search on the field.""" + matches: String +} + +""" +A filter to be used against Int fields. All fields are combined with a logical ‘and.’ +""" +input IntFilter { + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Equal to the specified value.""" + equalTo: Int + + """Not equal to the specified value.""" + notEqualTo: Int + + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: Int + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: Int + + """Included in the specified list.""" + in: [Int!] + + """Not included in the specified list.""" + notIn: [Int!] + + """Less than the specified value.""" + lessThan: Int + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: Int + + """Greater than the specified value.""" + greaterThan: Int + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: Int +} + +""" +A filter to be used against `RoleType` object types. All fields are combined with a logical ‘and.’ +""" +input RoleTypeFilter { + """Filter by the object’s `id` field.""" + id: IntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Checks for all expressions in this list.""" + and: [RoleTypeFilter!] + + """Checks for any expressions in this list.""" + or: [RoleTypeFilter!] + + """Negates the expression.""" + not: RoleTypeFilter } """ @@ -933,137 +1534,304 @@ input StringFilter { } """ -A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ +A filter to be used against many `Principal` object types. All fields are combined with a logical ‘and.’ """ -input DatetimeFilter { +input UserToManyPrincipalFilter { + """Filters to entities where at least one related entity matches.""" + some: PrincipalFilter + + """Filters to entities where every related entity matches.""" + every: PrincipalFilter + + """Filters to entities where no related entity matches.""" + none: PrincipalFilter +} + +""" +A filter to be used against `Principal` object types. All fields are combined with a logical ‘and.’ +""" +input PrincipalFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `ownerId` field.""" + ownerId: UUIDFilter + + """Filter by the object’s `userId` field.""" + userId: UUIDFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Filter by the object’s `allowedMask` field.""" + allowedMask: BitStringFilter + + """Filter by the object’s `isReadOnly` field.""" + isReadOnly: BooleanFilter + + """Filter by the object’s `bypassStepUp` field.""" + bypassStepUp: BooleanFilter + + """Checks for all expressions in this list.""" + and: [PrincipalFilter!] + + """Checks for any expressions in this list.""" + or: [PrincipalFilter!] + + """Negates the expression.""" + not: PrincipalFilter + + """Filter by the object’s `owner` relation.""" + owner: UserFilter + + """Filter by the object’s `user` relation.""" + user: UserFilter + + """Filter by the object’s `principalEntities` relation.""" + principalEntities: PrincipalToManyPrincipalEntityFilter + + """`principalEntities` exist.""" + principalEntitiesExist: Boolean + + """Filter by the object’s `principalScopeOverrides` relation.""" + principalScopeOverrides: PrincipalToManyPrincipalScopeOverrideFilter + + """`principalScopeOverrides` exist.""" + principalScopeOverridesExist: Boolean +} + +""" +A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ +""" +input BitStringFilter { """ Is null (if `true` is specified) or is not null (if `false` is specified). """ isNull: Boolean """Equal to the specified value.""" - equalTo: Datetime + equalTo: BitString """Not equal to the specified value.""" - notEqualTo: Datetime + notEqualTo: BitString """ Not equal to the specified value, treating null like an ordinary value. """ - distinctFrom: Datetime + distinctFrom: BitString """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: Datetime + notDistinctFrom: BitString """Included in the specified list.""" - in: [Datetime!] + in: [BitString!] """Not included in the specified list.""" - notIn: [Datetime!] + notIn: [BitString!] """Less than the specified value.""" - lessThan: Datetime + lessThan: BitString """Less than or equal to the specified value.""" - lessThanOrEqualTo: Datetime + lessThanOrEqualTo: BitString """Greater than the specified value.""" - greaterThan: Datetime + greaterThan: BitString """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: Datetime + greaterThanOrEqualTo: BitString } """ -A filter to be used against `User` object types. All fields are combined with a logical ‘and.’ +A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ """ -input UserFilter { - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `username` field.""" - username: StringTrgmFilter +input BooleanFilter { + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean - """Filter by the object’s `displayName` field.""" - displayName: StringTrgmFilter + """Equal to the specified value.""" + equalTo: Boolean - """Filter by the object’s `profilePicture` field.""" - profilePicture: ConstructiveInternalTypeImageFilter + """Not equal to the specified value.""" + notEqualTo: Boolean - """Filter by the object’s `searchTsv` field.""" - searchTsv: FullTextFilter + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: Boolean - """Filter by the object’s `type` field.""" - type: IntFilter + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: Boolean - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter + """Included in the specified list.""" + in: [Boolean!] - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter + """Not included in the specified list.""" + notIn: [Boolean!] + + """Less than the specified value.""" + lessThan: Boolean + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: Boolean + + """Greater than the specified value.""" + greaterThan: Boolean + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: Boolean +} + +""" +A filter to be used against many `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ +""" +input PrincipalToManyPrincipalEntityFilter { + """Filters to entities where at least one related entity matches.""" + some: PrincipalEntityFilter + + """Filters to entities where every related entity matches.""" + every: PrincipalEntityFilter + + """Filters to entities where no related entity matches.""" + none: PrincipalEntityFilter +} + +""" +A filter to be used against many `PrincipalScopeOverride` object types. All fields are combined with a logical ‘and.’ +""" +input PrincipalToManyPrincipalScopeOverrideFilter { + """Filters to entities where at least one related entity matches.""" + some: PrincipalScopeOverrideFilter + + """Filters to entities where every related entity matches.""" + every: PrincipalScopeOverrideFilter + + """Filters to entities where no related entity matches.""" + none: PrincipalScopeOverrideFilter +} + +""" +A filter to be used against `PrincipalScopeOverride` object types. All fields are combined with a logical ‘and.’ +""" +input PrincipalScopeOverrideFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `principalId` field.""" + principalId: UUIDFilter + + """Filter by the object’s `membershipType` field.""" + membershipType: IntFilter + + """Filter by the object’s `allowedMask` field.""" + allowedMask: BitStringFilter + + """Filter by the object’s `isAdmin` field.""" + isAdmin: BooleanFilter + + """Filter by the object’s `isReadOnly` field.""" + isReadOnly: BooleanFilter """Checks for all expressions in this list.""" - and: [UserFilter!] + and: [PrincipalScopeOverrideFilter!] """Checks for any expressions in this list.""" - or: [UserFilter!] + or: [PrincipalScopeOverrideFilter!] """Negates the expression.""" - not: UserFilter + not: PrincipalScopeOverrideFilter - """Filter by the object’s `roleType` relation.""" - roleType: RoleTypeFilter + """Filter by the object’s `principal` relation.""" + principal: PrincipalFilter +} - """Filter by the object’s `ownedEmails` relation.""" - ownedEmails: UserToManyEmailFilter +""" +A filter to be used against many `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ +""" +input UserToManyPrincipalEntityFilter { + """Filters to entities where at least one related entity matches.""" + some: PrincipalEntityFilter - """`ownedEmails` exist.""" - ownedEmailsExist: Boolean + """Filters to entities where every related entity matches.""" + every: PrincipalEntityFilter - """Filter by the object’s `ownedPhoneNumbers` relation.""" - ownedPhoneNumbers: UserToManyPhoneNumberFilter + """Filters to entities where no related entity matches.""" + none: PrincipalEntityFilter +} - """`ownedPhoneNumbers` exist.""" - ownedPhoneNumbersExist: Boolean +""" +A filter to be used against many `Email` object types. All fields are combined with a logical ‘and.’ +""" +input UserToManyEmailFilter { + """Filters to entities where at least one related entity matches.""" + some: EmailFilter - """Filter by the object’s `ownedCryptoAddresses` relation.""" - ownedCryptoAddresses: UserToManyCryptoAddressFilter + """Filters to entities where every related entity matches.""" + every: EmailFilter - """`ownedCryptoAddresses` exist.""" - ownedCryptoAddressesExist: Boolean + """Filters to entities where no related entity matches.""" + none: EmailFilter +} - """Filter by the object’s `ownedWebauthnCredentials` relation.""" - ownedWebauthnCredentials: UserToManyWebauthnCredentialFilter +""" +A filter to be used against `Email` object types. All fields are combined with a logical ‘and.’ +""" +input EmailFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter - """`ownedWebauthnCredentials` exist.""" - ownedWebauthnCredentialsExist: Boolean + """Filter by the object’s `ownerId` field.""" + ownerId: UUIDFilter - """Filter by the object’s `auditLogAuthsByActorId` relation.""" - auditLogAuthsByActorId: UserToManyAuditLogAuthFilter + """Filter by the object’s `email` field.""" + email: ConstructiveInternalTypeEmailFilter - """`auditLogAuthsByActorId` exist.""" - auditLogAuthsByActorIdExist: Boolean + """Filter by the object’s `isVerified` field.""" + isVerified: BooleanFilter - """TSV search on the `search_tsv` column.""" - tsvSearchTsv: String + """Filter by the object’s `isPrimary` field.""" + isPrimary: BooleanFilter - """TRGM search on the `display_name` column.""" - trgmDisplayName: TrgmSearchInput + """Filter by the object’s `name` field.""" + name: StringFilter - """ - Composite unified search. Provide a search string and it will be dispatched to - all text-compatible search algorithms (tsvector, BM25, pg_trgm) - simultaneously. When the LLM plugin is active, pgvector also participates via - auto-embedding. Rows matching ANY algorithm are returned. All matching score - fields are populated. - """ - unifiedSearch: String + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Checks for all expressions in this list.""" + and: [EmailFilter!] + + """Checks for any expressions in this list.""" + or: [EmailFilter!] + + """Negates the expression.""" + not: EmailFilter + + """Filter by the object’s `owner` relation.""" + owner: UserFilter } """ -A filter to be used against String fields with pg_trgm support. All fields are combined with a logical ‘and.’ +A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ """ -input StringTrgmFilter { +input ConstructiveInternalTypeEmailFilter { """ Is null (if `true` is specified) or is not null (if `false` is specified). """ @@ -1108,10 +1876,10 @@ input StringTrgmFilter { notIncludes: String """Contains the specified string (case-insensitive).""" - includesInsensitive: String + includesInsensitive: ConstructiveInternalTypeEmail """Does not contain the specified string (case-insensitive).""" - notIncludesInsensitive: String + notIncludesInsensitive: ConstructiveInternalTypeEmail """Starts with the specified string (case-sensitive).""" startsWith: String @@ -1120,10 +1888,10 @@ input StringTrgmFilter { notStartsWith: String """Starts with the specified string (case-insensitive).""" - startsWithInsensitive: String + startsWithInsensitive: ConstructiveInternalTypeEmail """Does not start with the specified string (case-insensitive).""" - notStartsWithInsensitive: String + notStartsWithInsensitive: ConstructiveInternalTypeEmail """Ends with the specified string (case-sensitive).""" endsWith: String @@ -1132,10 +1900,10 @@ input StringTrgmFilter { notEndsWith: String """Ends with the specified string (case-insensitive).""" - endsWithInsensitive: String + endsWithInsensitive: ConstructiveInternalTypeEmail """Does not end with the specified string (case-insensitive).""" - notEndsWithInsensitive: String + notEndsWithInsensitive: ConstructiveInternalTypeEmail """ Matches the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. @@ -1150,237 +1918,50 @@ input StringTrgmFilter { """ Matches the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. """ - likeInsensitive: String + likeInsensitive: ConstructiveInternalTypeEmail """ Does not match the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. """ - notLikeInsensitive: String + notLikeInsensitive: ConstructiveInternalTypeEmail """Equal to the specified value (case-insensitive).""" - equalToInsensitive: String + equalToInsensitive: ConstructiveInternalTypeEmail """Not equal to the specified value (case-insensitive).""" - notEqualToInsensitive: String + notEqualToInsensitive: ConstructiveInternalTypeEmail """ Not equal to the specified value, treating null like an ordinary value (case-insensitive). """ - distinctFromInsensitive: String + distinctFromInsensitive: ConstructiveInternalTypeEmail """ Equal to the specified value, treating null like an ordinary value (case-insensitive). """ - notDistinctFromInsensitive: String - - """Included in the specified list (case-insensitive).""" - inInsensitive: [String!] - - """Not included in the specified list (case-insensitive).""" - notInInsensitive: [String!] - - """Less than the specified value (case-insensitive).""" - lessThanInsensitive: String - - """Less than or equal to the specified value (case-insensitive).""" - lessThanOrEqualToInsensitive: String - - """Greater than the specified value (case-insensitive).""" - greaterThanInsensitive: String - - """Greater than or equal to the specified value (case-insensitive).""" - greaterThanOrEqualToInsensitive: String - - """ - Fuzzy matches using pg_trgm trigram similarity. Tolerates typos and misspellings. - """ - similarTo: TrgmSearchInput - - """ - Fuzzy matches using pg_trgm word_similarity. Finds the best matching substring within the column value. - """ - wordSimilarTo: TrgmSearchInput -} - -""" -Input for pg_trgm fuzzy text matching. Provide a search value and optional similarity threshold. -""" -input TrgmSearchInput { - """The text to fuzzy-match against. Typos and misspellings are tolerated.""" - value: String! - - """ - Minimum similarity threshold (0.0 to 1.0). Higher = stricter matching. Default is 0.3. - """ - threshold: Float -} - -""" -A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ -""" -input ConstructiveInternalTypeImageFilter { - """ - Is null (if `true` is specified) or is not null (if `false` is specified). - """ - isNull: Boolean - - """Equal to the specified value.""" - equalTo: ConstructiveInternalTypeImage - - """Not equal to the specified value.""" - notEqualTo: ConstructiveInternalTypeImage - - """ - Not equal to the specified value, treating null like an ordinary value. - """ - distinctFrom: ConstructiveInternalTypeImage - - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: ConstructiveInternalTypeImage - - """Included in the specified list.""" - in: [ConstructiveInternalTypeImage!] - - """Not included in the specified list.""" - notIn: [ConstructiveInternalTypeImage!] - - """Less than the specified value.""" - lessThan: ConstructiveInternalTypeImage - - """Less than or equal to the specified value.""" - lessThanOrEqualTo: ConstructiveInternalTypeImage - - """Greater than the specified value.""" - greaterThan: ConstructiveInternalTypeImage - - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: ConstructiveInternalTypeImage - - """Contains the specified JSON.""" - contains: ConstructiveInternalTypeImage - - """Contains the specified key.""" - containsKey: String - - """Contains all of the specified keys.""" - containsAllKeys: [String!] - - """Contains any of the specified keys.""" - containsAnyKeys: [String!] - - """Contained by the specified JSON.""" - containedBy: ConstructiveInternalTypeImage -} - -""" -A filter to be used against FullText fields. All fields are combined with a logical ‘and.’ -""" -input FullTextFilter { - """ - Is null (if `true` is specified) or is not null (if `false` is specified). - """ - isNull: Boolean - - """Equal to the specified value.""" - equalTo: FullText - - """Not equal to the specified value.""" - notEqualTo: FullText - - """ - Not equal to the specified value, treating null like an ordinary value. - """ - distinctFrom: FullText - - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: FullText - - """Included in the specified list.""" - in: [FullText!] - - """Not included in the specified list.""" - notIn: [FullText!] - - """Performs a full text search on the field.""" - matches: String -} - -""" -A filter to be used against Int fields. All fields are combined with a logical ‘and.’ -""" -input IntFilter { - """ - Is null (if `true` is specified) or is not null (if `false` is specified). - """ - isNull: Boolean - - """Equal to the specified value.""" - equalTo: Int - - """Not equal to the specified value.""" - notEqualTo: Int - - """ - Not equal to the specified value, treating null like an ordinary value. - """ - distinctFrom: Int - - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: Int - - """Included in the specified list.""" - in: [Int!] - - """Not included in the specified list.""" - notIn: [Int!] - - """Less than the specified value.""" - lessThan: Int - - """Less than or equal to the specified value.""" - lessThanOrEqualTo: Int - - """Greater than the specified value.""" - greaterThan: Int - - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: Int -} - -""" -A filter to be used against `RoleType` object types. All fields are combined with a logical ‘and.’ -""" -input RoleTypeFilter { - """Filter by the object’s `id` field.""" - id: IntFilter - - """Filter by the object’s `name` field.""" - name: StringFilter + notDistinctFromInsensitive: ConstructiveInternalTypeEmail - """Checks for all expressions in this list.""" - and: [RoleTypeFilter!] + """Included in the specified list (case-insensitive).""" + inInsensitive: [ConstructiveInternalTypeEmail!] - """Checks for any expressions in this list.""" - or: [RoleTypeFilter!] + """Not included in the specified list (case-insensitive).""" + notInInsensitive: [ConstructiveInternalTypeEmail!] - """Negates the expression.""" - not: RoleTypeFilter -} + """Less than the specified value (case-insensitive).""" + lessThanInsensitive: ConstructiveInternalTypeEmail -""" -A filter to be used against many `Email` object types. All fields are combined with a logical ‘and.’ -""" -input UserToManyEmailFilter { - """Filters to entities where at least one related entity matches.""" - some: EmailFilter + """Less than or equal to the specified value (case-insensitive).""" + lessThanOrEqualToInsensitive: ConstructiveInternalTypeEmail - """Filters to entities where every related entity matches.""" - every: EmailFilter + """Greater than the specified value (case-insensitive).""" + greaterThanInsensitive: ConstructiveInternalTypeEmail - """Filters to entities where no related entity matches.""" - none: EmailFilter + """Greater than or equal to the specified value (case-insensitive).""" + greaterThanOrEqualToInsensitive: ConstructiveInternalTypeEmail } +scalar ConstructiveInternalTypeEmail + """ A filter to be used against many `PhoneNumber` object types. All fields are combined with a logical ‘and.’ """ @@ -1961,6 +2542,192 @@ input InternetAddressFilter { containsOrContainedBy: InternetAddress } +"""Methods to use when ordering `PrincipalEntity`.""" +enum PrincipalEntityOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + PRINCIPAL_ID_ASC + PRINCIPAL_ID_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + OWNER_ID_ASC + OWNER_ID_DESC +} + +"""A connection to a list of `PrincipalScopeOverride` values.""" +type PrincipalScopeOverrideConnection { + """A list of `PrincipalScopeOverride` objects.""" + nodes: [PrincipalScopeOverride]! + + """ + A list of edges which contains the `PrincipalScopeOverride` and cursor to aid in pagination. + """ + edges: [PrincipalScopeOverrideEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `PrincipalScopeOverride` you could get from the connection. + """ + totalCount: Int! +} + +""" +Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. +""" +type PrincipalScopeOverride { + id: UUID! + createdAt: Datetime + updatedAt: Datetime + + """The principal this override applies to""" + principalId: UUID! + + """The scope level (membership_type) this override restricts""" + membershipType: Int! + + """ + Permission bitmask for this scope; AND-masked with parent permissions during cascade + """ + allowedMask: BitString! + + """ + Whether this principal has admin access at this scope (default true = inherit from parent) + """ + isAdmin: Boolean! + + """Whether this principal is restricted to read-only at this scope""" + isReadOnly: Boolean! + + """ + Reads a single `Principal` that is related to this `PrincipalScopeOverride`. + """ + principal: Principal +} + +"""A `PrincipalScopeOverride` edge in the connection.""" +type PrincipalScopeOverrideEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PrincipalScopeOverride` at the end of the edge.""" + node: PrincipalScopeOverride +} + +"""Methods to use when ordering `PrincipalScopeOverride`.""" +enum PrincipalScopeOverrideOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + PRINCIPAL_ID_ASC + PRINCIPAL_ID_DESC + MEMBERSHIP_TYPE_ASC + MEMBERSHIP_TYPE_DESC + ALLOWED_MASK_ASC + ALLOWED_MASK_DESC + IS_ADMIN_ASC + IS_ADMIN_DESC + IS_READ_ONLY_ASC + IS_READ_ONLY_DESC +} + +"""A `Principal` edge in the connection.""" +type PrincipalEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `Principal` at the end of the edge.""" + node: Principal +} + +"""Methods to use when ordering `Principal`.""" +enum PrincipalOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + OWNER_ID_ASC + OWNER_ID_DESC + USER_ID_ASC + USER_ID_DESC + NAME_ASC + NAME_DESC + ALLOWED_MASK_ASC + ALLOWED_MASK_DESC + IS_READ_ONLY_ASC + IS_READ_ONLY_DESC + BYPASS_STEP_UP_ASC + BYPASS_STEP_UP_DESC +} + +"""A connection to a list of `Email` values.""" +type EmailConnection { + """A list of `Email` objects.""" + nodes: [Email]! + + """ + A list of edges which contains the `Email` and cursor to aid in pagination. + """ + edges: [EmailEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `Email` you could get from the connection.""" + totalCount: Int! +} + +"""User email addresses with verification and primary-email management""" +type Email { + id: UUID! + ownerId: UUID! + + """The email address""" + email: ConstructiveInternalTypeEmail! + + """Whether the email address has been verified via confirmation link""" + isVerified: Boolean! + + """Whether this is the user's primary email address""" + isPrimary: Boolean! + + """Optional user-provided label for this email (e.g. "Work", "Personal").""" + name: String + createdAt: Datetime + updatedAt: Datetime + + """Reads a single `User` that is related to this `Email`.""" + owner: User +} + +"""A `Email` edge in the connection.""" +type EmailEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `Email` at the end of the edge.""" + node: Email +} + """Methods to use when ordering `Email`.""" enum EmailOrderBy { NATURAL @@ -2626,6 +3393,126 @@ enum UserConnectedAccountOrderBy { UPDATED_AT_DESC } +"""A connection to a list of `OrgApiKeyList` values.""" +type OrgApiKeyListConnection { + """A list of `OrgApiKeyList` objects.""" + nodes: [OrgApiKeyList]! + + """ + A list of edges which contains the `OrgApiKeyList` and cursor to aid in pagination. + """ + edges: [OrgApiKeyListEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `OrgApiKeyList` you could get from the connection.""" + totalCount: Int! +} + +type OrgApiKeyList { + id: UUID + keyId: String + name: String + principalId: UUID + orgId: UUID + expiresAt: Datetime + revokedAt: Datetime + lastUsedAt: Datetime + mfaLevel: String + accessLevel: String + createdAt: Datetime + updatedAt: Datetime +} + +"""A `OrgApiKeyList` edge in the connection.""" +type OrgApiKeyListEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgApiKeyList` at the end of the edge.""" + node: OrgApiKeyList +} + +""" +A filter to be used against `OrgApiKeyList` object types. All fields are combined with a logical ‘and.’ +""" +input OrgApiKeyListFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `keyId` field.""" + keyId: StringFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Filter by the object’s `principalId` field.""" + principalId: UUIDFilter + + """Filter by the object’s `orgId` field.""" + orgId: UUIDFilter + + """Filter by the object’s `expiresAt` field.""" + expiresAt: DatetimeFilter + + """Filter by the object’s `revokedAt` field.""" + revokedAt: DatetimeFilter + + """Filter by the object’s `lastUsedAt` field.""" + lastUsedAt: DatetimeFilter + + """Filter by the object’s `mfaLevel` field.""" + mfaLevel: StringFilter + + """Filter by the object’s `accessLevel` field.""" + accessLevel: StringFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Checks for all expressions in this list.""" + and: [OrgApiKeyListFilter!] + + """Checks for any expressions in this list.""" + or: [OrgApiKeyListFilter!] + + """Negates the expression.""" + not: OrgApiKeyListFilter +} + +"""Methods to use when ordering `OrgApiKeyList`.""" +enum OrgApiKeyListOrderBy { + NATURAL + ID_ASC + ID_DESC + KEY_ID_ASC + KEY_ID_DESC + NAME_ASC + NAME_DESC + PRINCIPAL_ID_ASC + PRINCIPAL_ID_DESC + ORG_ID_ASC + ORG_ID_DESC + EXPIRES_AT_ASC + EXPIRES_AT_DESC + REVOKED_AT_ASC + REVOKED_AT_DESC + LAST_USED_AT_ASC + LAST_USED_AT_DESC + MFA_LEVEL_ASC + MFA_LEVEL_DESC + ACCESS_LEVEL_ASC + ACCESS_LEVEL_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + """A connection to a list of `User` values.""" type UserConnection { """A list of `User` objects.""" @@ -2949,6 +3836,18 @@ type Mutation { """ input: CheckPasswordInput! ): CheckPasswordPayload + deleteOrgPrincipal( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgPrincipalInput! + ): DeleteOrgPrincipalPayload + deletePrincipal( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePrincipalInput! + ): DeletePrincipalPayload disconnectAccount( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -2985,6 +3884,12 @@ type Mutation { """ input: ConfirmDeleteAccountInput! ): ConfirmDeleteAccountPayload + revokeOrgApiKey( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: RevokeOrgApiKeyInput! + ): RevokeOrgApiKeyPayload setPassword( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -3045,12 +3950,24 @@ type Mutation { """ input: LinkIdentityInput! ): LinkIdentityPayload + createOrgPrincipal( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgPrincipalInput! + ): CreateOrgPrincipalPayload extendTokenExpires( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: ExtendTokenExpiresInput! ): ExtendTokenExpiresPayload + createOrgApiKey( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgApiKeyInput! + ): CreateOrgApiKeyPayload createApiKey( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -3063,6 +3980,12 @@ type Mutation { """ input: RequestCrossOriginTokenInput! ): RequestCrossOriginTokenPayload + createPrincipal( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePrincipalInput! + ): CreatePrincipalPayload forgotPassword( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -3092,6 +4015,14 @@ type Mutation { input: CreateRoleTypeInput! ): CreateRoleTypePayload + """Creates a single `PrincipalEntity`.""" + createPrincipalEntity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePrincipalEntityInput! + ): CreatePrincipalEntityPayload + """Creates a single `UserConnectedAccount`.""" createUserConnectedAccount( """ @@ -3124,6 +4055,14 @@ type Mutation { input: CreateAuditLogAuthInput! ): CreateAuditLogAuthPayload + """Creates a single `OrgApiKeyList`.""" + createOrgApiKeyList( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgApiKeyListInput! + ): CreateOrgApiKeyListPayload + """Creates a single `Email`.""" createEmail( """ @@ -3156,6 +4095,14 @@ type Mutation { input: UpdateRoleTypeInput! ): UpdateRoleTypePayload + """Updates a single `PrincipalEntity` using a unique key and a patch.""" + updatePrincipalEntity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePrincipalEntityInput! + ): UpdatePrincipalEntityPayload + """Updates a single `CryptoAddress` using a unique key and a patch.""" updateCryptoAddress( """ @@ -3212,6 +4159,14 @@ type Mutation { input: DeleteRoleTypeInput! ): DeleteRoleTypePayload + """Deletes a single `PrincipalEntity` using a unique key.""" + deletePrincipalEntity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePrincipalEntityInput! + ): DeletePrincipalEntityPayload + """Deletes a single `CryptoAddress` using a unique key.""" deleteCryptoAddress( """ @@ -3345,6 +4300,56 @@ input CheckPasswordInput { password: String } +"""The output of our `deleteOrgPrincipal` mutation.""" +type DeleteOrgPrincipalPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: Boolean + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgPrincipal` mutation.""" +input DeleteOrgPrincipalInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + principalId: UUID +} + +"""The output of our `deletePrincipal` mutation.""" +type DeletePrincipalPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: Boolean + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deletePrincipal` mutation.""" +input DeletePrincipalInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + principalId: UUID +} + """The output of our `disconnectAccount` mutation.""" type DisconnectAccountPayload { """ @@ -3496,6 +4501,32 @@ input ConfirmDeleteAccountInput { token: String } +"""The output of our `revokeOrgApiKey` mutation.""" +type RevokeOrgApiKeyPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: Boolean + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `revokeOrgApiKey` mutation.""" +input RevokeOrgApiKeyInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + keyId: UUID! + orgId: UUID! +} + """The output of our `setPassword` mutation.""" type SetPasswordPayload { """ @@ -3813,6 +4844,35 @@ input LinkIdentityInput { details: JSON } +"""The output of our `createOrgPrincipal` mutation.""" +type CreateOrgPrincipalPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: UUID + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `createOrgPrincipal` mutation.""" +input CreateOrgPrincipalInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + name: String + orgId: UUID + allowedMask: BitString + isReadOnly: Boolean + bypassStepUp: Boolean +} + """The output of our `extendTokenExpires` mutation.""" type ExtendTokenExpiresPayload { """ @@ -3871,6 +4931,42 @@ input IntervalInput { years: Int } +"""The output of our `createOrgApiKey` mutation.""" +type CreateOrgApiKeyPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: CreateOrgApiKeyRecord + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +type CreateOrgApiKeyRecord { + apiKey: String + keyId: UUID + expiresAt: Datetime +} + +"""All input for the `createOrgApiKey` mutation.""" +input CreateOrgApiKeyInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + orgId: UUID + principalId: UUID + keyName: String + accessLevel: String + mfaLevel: String + expiresIn: IntervalInput +} + """The output of our `createApiKey` mutation.""" type CreateApiKeyPayload { """ @@ -3903,6 +4999,7 @@ input CreateApiKeyInput { accessLevel: String mfaLevel: String expiresIn: IntervalInput + principalId: UUID } """The output of our `requestCrossOriginToken` mutation.""" @@ -3933,6 +5030,35 @@ input RequestCrossOriginTokenInput { rememberMe: Boolean } +"""The output of our `createPrincipal` mutation.""" +type CreatePrincipalPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: UUID + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `createPrincipal` mutation.""" +input CreatePrincipalInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + name: String + allowedMask: BitString + entityIds: [UUID] + isReadOnly: Boolean + bypassStepUp: Boolean +} + """The output of our `forgotPassword` mutation.""" type ForgotPasswordPayload { """ @@ -4061,6 +5187,57 @@ input RoleTypeInput { name: String! } +"""The output of our create `PrincipalEntity` mutation.""" +type CreatePrincipalEntityPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `PrincipalEntity` that was created by this mutation.""" + principalEntity: PrincipalEntity + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `PrincipalEntity`. May be used by Relay 1.""" + principalEntityEdge( + """The method to use when ordering `PrincipalEntity`.""" + orderBy: [PrincipalEntityOrderBy!]! = [PRIMARY_KEY_ASC] + ): PrincipalEntityEdge +} + +"""All input for the create `PrincipalEntity` mutation.""" +input CreatePrincipalEntityInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `PrincipalEntity` to be created by this mutation.""" + principalEntity: PrincipalEntityInput! +} + +"""An input for mutations affecting `PrincipalEntity`""" +input PrincipalEntityInput { + id: UUID + createdAt: Datetime + updatedAt: Datetime + + """The principal this scoping row belongs to""" + principalId: UUID! + + """The organization this principal is scoped to""" + entityId: UUID! + + """Denormalized owner_id from principals table for RLS""" + ownerId: UUID! +} + """The output of our create `UserConnectedAccount` mutation.""" type CreateUserConnectedAccountPayload { """ @@ -4286,6 +5463,51 @@ input AuditLogAuthInput { success: Boolean! } +"""The output of our create `OrgApiKeyList` mutation.""" +type CreateOrgApiKeyListPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `OrgApiKeyList` that was created by this mutation.""" + orgApiKeyList: OrgApiKeyList + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `OrgApiKeyList` mutation.""" +input CreateOrgApiKeyListInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `OrgApiKeyList` to be created by this mutation.""" + orgApiKeyList: OrgApiKeyListInput! +} + +"""An input for mutations affecting `OrgApiKeyList`""" +input OrgApiKeyListInput { + id: UUID + keyId: String + name: String + principalId: UUID + orgId: UUID + expiresAt: Datetime + revokedAt: Datetime + lastUsedAt: Datetime + mfaLevel: String + accessLevel: String + createdAt: Datetime + updatedAt: Datetime +} + """The output of our create `Email` mutation.""" type CreateEmailPayload { """ @@ -4522,6 +5744,62 @@ input RoleTypePatch { name: String } +"""The output of our update `PrincipalEntity` mutation.""" +type UpdatePrincipalEntityPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `PrincipalEntity` that was updated by this mutation.""" + principalEntity: PrincipalEntity + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `PrincipalEntity`. May be used by Relay 1.""" + principalEntityEdge( + """The method to use when ordering `PrincipalEntity`.""" + orderBy: [PrincipalEntityOrderBy!]! = [PRIMARY_KEY_ASC] + ): PrincipalEntityEdge +} + +"""All input for the `updatePrincipalEntity` mutation.""" +input UpdatePrincipalEntityInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `PrincipalEntity` being updated. + """ + principalEntityPatch: PrincipalEntityPatch! +} + +""" +Represents an update to a `PrincipalEntity`. Fields that are set will be updated. +""" +input PrincipalEntityPatch { + id: UUID + createdAt: Datetime + updatedAt: Datetime + + """The principal this scoping row belongs to""" + principalId: UUID + + """The organization this principal is scoped to""" + entityId: UUID + + """Denormalized owner_id from principals table for RLS""" + ownerId: UUID +} + """The output of our update `CryptoAddress` mutation.""" type UpdateCryptoAddressPayload { """ @@ -4968,6 +6246,39 @@ input DeleteRoleTypeInput { id: Int! } +"""The output of our delete `PrincipalEntity` mutation.""" +type DeletePrincipalEntityPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `PrincipalEntity` that was deleted by this mutation.""" + principalEntity: PrincipalEntity + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `PrincipalEntity`. May be used by Relay 1.""" + principalEntityEdge( + """The method to use when ordering `PrincipalEntity`.""" + orderBy: [PrincipalEntityOrderBy!]! = [PRIMARY_KEY_ASC] + ): PrincipalEntityEdge +} + +"""All input for the `deletePrincipalEntity` mutation.""" +input DeletePrincipalEntityInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `CryptoAddress` mutation.""" type DeleteCryptoAddressPayload { """ diff --git a/sdk/constructive-sdk/schemas/compute.graphql b/sdk/constructive-sdk/schemas/compute.graphql index fc805077ac..a91b860d0a 100644 --- a/sdk/constructive-sdk/schemas/compute.graphql +++ b/sdk/constructive-sdk/schemas/compute.graphql @@ -199,6 +199,35 @@ type Query { orderBy: [OrgFunctionExecutionLogOrderBy!] = [PRIMARY_KEY_ASC] ): OrgFunctionExecutionLogConnection + """Reads and enables pagination through a set of `ResourceEvent`.""" + resourceEvents( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ResourceEventFilter + + """The method to use when ordering `ResourceEvent`.""" + orderBy: [ResourceEventOrderBy!] = [PRIMARY_KEY_ASC] + ): ResourceEventConnection + """ Reads and enables pagination through a set of `FunctionGraphExecutionOutput`. """ @@ -317,6 +346,35 @@ type Query { orderBy: [FunctionExecutionLogOrderBy!] = [PRIMARY_KEY_ASC] ): FunctionExecutionLogConnection + """Reads and enables pagination through a set of `FunctionGraph`.""" + functionGraphs( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: FunctionGraphFilter + + """The method to use when ordering `FunctionGraph`.""" + orderBy: [FunctionGraphOrderBy!] = [PRIMARY_KEY_ASC] + ): FunctionGraphConnection + """ Reads and enables pagination through a set of `FunctionGraphExecutionNodeState`. """ @@ -348,8 +406,8 @@ type Query { orderBy: [FunctionGraphExecutionNodeStateOrderBy!] = [PRIMARY_KEY_ASC] ): FunctionGraphExecutionNodeStateConnection - """Reads and enables pagination through a set of `FunctionGraph`.""" - functionGraphs( + """Reads and enables pagination through a set of `PlatformNamespace`.""" + platformNamespaces( """Only read the first `n` values of the set.""" first: Int @@ -371,11 +429,11 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: FunctionGraphFilter + where: PlatformNamespaceFilter - """The method to use when ordering `FunctionGraph`.""" - orderBy: [FunctionGraphOrderBy!] = [PRIMARY_KEY_ASC] - ): FunctionGraphConnection + """The method to use when ordering `PlatformNamespace`.""" + orderBy: [PlatformNamespaceOrderBy!] = [PRIMARY_KEY_ASC] + ): PlatformNamespaceConnection """Reads and enables pagination through a set of `OrgFunctionInvocation`.""" orgFunctionInvocations( @@ -435,6 +493,66 @@ type Query { orderBy: [FunctionInvocationOrderBy!] = [PRIMARY_KEY_ASC] ): FunctionInvocationConnection + """Reads and enables pagination through a set of `Resource`.""" + resources( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ResourceFilter + + """The method to use when ordering `Resource`.""" + orderBy: [ResourceOrderBy!] = [PRIMARY_KEY_ASC] + ): ResourceConnection + + """ + Reads and enables pagination through a set of `PlatformNamespaceEvent`. + """ + platformNamespaceEvents( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlatformNamespaceEventFilter + + """The method to use when ordering `PlatformNamespaceEvent`.""" + orderBy: [PlatformNamespaceEventOrderBy!] = [PRIMARY_KEY_ASC] + ): PlatformNamespaceEventConnection + """Reads and enables pagination through a set of `FunctionDeployment`.""" functionDeployments( """Only read the first `n` values of the set.""" @@ -1507,6 +1625,170 @@ input FunctionDeploymentFilter { """Filter by the object’s `functionDefinition` relation.""" functionDefinition: FunctionDefinitionFilter + + """Filter by the object’s `namespace` relation.""" + namespace: PlatformNamespaceFilter +} + +""" +A filter to be used against `PlatformNamespace` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformNamespaceFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Filter by the object’s `namespaceName` field.""" + namespaceName: StringFilter + + """Filter by the object’s `description` field.""" + description: StringFilter + + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Filter by the object’s `labels` field.""" + labels: JSONFilter + + """Filter by the object’s `annotations` field.""" + annotations: JSONFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `sourceDatabaseId` field.""" + sourceDatabaseId: UUIDFilter + + """Filter by the object’s `sourceScope` field.""" + sourceScope: StringFilter + + """Filter by the object’s `isManaged` field.""" + isManaged: BooleanFilter + + """Checks for all expressions in this list.""" + and: [PlatformNamespaceFilter!] + + """Checks for any expressions in this list.""" + or: [PlatformNamespaceFilter!] + + """Negates the expression.""" + not: PlatformNamespaceFilter + + """Filter by the object’s `functionDeploymentsByNamespaceId` relation.""" + functionDeploymentsByNamespaceId: PlatformNamespaceToManyFunctionDeploymentFilter + + """`functionDeploymentsByNamespaceId` exist.""" + functionDeploymentsByNamespaceIdExist: Boolean + + """Filter by the object’s `resourcesByNamespaceId` relation.""" + resourcesByNamespaceId: PlatformNamespaceToManyResourceFilter + + """`resourcesByNamespaceId` exist.""" + resourcesByNamespaceIdExist: Boolean +} + +""" +A filter to be used against many `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformNamespaceToManyFunctionDeploymentFilter { + """Filters to entities where at least one related entity matches.""" + some: FunctionDeploymentFilter + + """Filters to entities where every related entity matches.""" + every: FunctionDeploymentFilter + + """Filters to entities where no related entity matches.""" + none: FunctionDeploymentFilter +} + +""" +A filter to be used against many `Resource` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformNamespaceToManyResourceFilter { + """Filters to entities where at least one related entity matches.""" + some: ResourceFilter + + """Filters to entities where every related entity matches.""" + every: ResourceFilter + + """Filters to entities where no related entity matches.""" + none: ResourceFilter +} + +""" +A filter to be used against `Resource` object types. All fields are combined with a logical ‘and.’ +""" +input ResourceFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `createdBy` field.""" + createdBy: UUIDFilter + + """Filter by the object’s `updatedBy` field.""" + updatedBy: UUIDFilter + + """Filter by the object’s `namespaceId` field.""" + namespaceId: UUIDFilter + + """Filter by the object’s `kind` field.""" + kind: StringFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Filter by the object’s `slug` field.""" + slug: StringFilter + + """Filter by the object’s `spec` field.""" + spec: JSONFilter + + """Filter by the object’s `status` field.""" + status: StringFilter + + """Filter by the object’s `statusObserved` field.""" + statusObserved: JSONFilter + + """Filter by the object’s `lastError` field.""" + lastError: StringFilter + + """Filter by the object’s `errorCount` field.""" + errorCount: IntFilter + + """Filter by the object’s `labels` field.""" + labels: JSONFilter + + """Filter by the object’s `annotations` field.""" + annotations: JSONFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [ResourceFilter!] + + """Checks for any expressions in this list.""" + or: [ResourceFilter!] + + """Negates the expression.""" + not: ResourceFilter + + """Filter by the object’s `namespace` relation.""" + namespace: PlatformNamespaceFilter } """Methods to use when ordering `FunctionApiBinding`.""" @@ -1621,35 +1903,136 @@ type FunctionDeployment { Reads a single `FunctionDefinition` that is related to this `FunctionDeployment`. """ functionDefinition: FunctionDefinition + + """ + Reads a single `PlatformNamespace` that is related to this `FunctionDeployment`. + """ + namespace: PlatformNamespace } -"""A `FunctionDeployment` edge in the connection.""" -type FunctionDeploymentEdge { - """A cursor for use in pagination.""" - cursor: Cursor +""" +Logical namespace containers for grouping secrets, config, functions, and other resources +""" +type PlatformNamespace { + id: UUID! + createdAt: Datetime + updatedAt: Datetime - """The `FunctionDeployment` at the end of the edge.""" - node: FunctionDeployment -} + """Human-readable namespace name (e.g. default, production, oauth)""" + name: String! -"""Methods to use when ordering `FunctionDeployment`.""" -enum FunctionDeploymentOrderBy { - NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - ID_ASC - ID_DESC - CREATED_AT_ASC - CREATED_AT_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC - FUNCTION_DEFINITION_ID_ASC - FUNCTION_DEFINITION_ID_DESC - NAMESPACE_ID_ASC - NAMESPACE_ID_DESC - STATUS_ASC - STATUS_DESC - SERVICE_URL_ASC + """ + Globally unique computed namespace identifier via inflection.underscore + """ + namespaceName: String! + + """Optional human-readable description of this namespace""" + description: String + + """Whether this namespace is active (soft-disable for filtering)""" + isActive: Boolean! + + """Key/value pairs for selecting and filtering namespaces""" + labels: JSON! + + """Freeform metadata for tooling and operational notes""" + annotations: JSON! + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """ + Database that created this namespace (NULL for platform-native namespaces) + """ + sourceDatabaseId: UUID + + """ + Origin scope: platform, org, app — indicates where this namespace was created + """ + sourceScope: String + + """ + true = created by a child scope mirror trigger, false = platform-native + """ + isManaged: Boolean! + + """Reads and enables pagination through a set of `FunctionDeployment`.""" + functionDeploymentsByNamespaceId( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: FunctionDeploymentFilter + + """The method to use when ordering `FunctionDeployment`.""" + orderBy: [FunctionDeploymentOrderBy!] = [PRIMARY_KEY_ASC] + ): FunctionDeploymentConnection! + + """Reads and enables pagination through a set of `Resource`.""" + resourcesByNamespaceId( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ResourceFilter + + """The method to use when ordering `Resource`.""" + orderBy: [ResourceOrderBy!] = [PRIMARY_KEY_ASC] + ): ResourceConnection! +} + +"""Methods to use when ordering `FunctionDeployment`.""" +enum FunctionDeploymentOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + FUNCTION_DEFINITION_ID_ASC + FUNCTION_DEFINITION_ID_DESC + NAMESPACE_ID_ASC + NAMESPACE_ID_DESC + STATUS_ASC + STATUS_DESC + SERVICE_URL_ASC SERVICE_URL_DESC SERVICE_NAME_ASC SERVICE_NAME_DESC @@ -1681,6 +2064,140 @@ enum FunctionDeploymentOrderBy { DATABASE_ID_DESC } +"""A connection to a list of `Resource` values.""" +type ResourceConnection { + """A list of `Resource` objects.""" + nodes: [Resource]! + + """ + A list of edges which contains the `Resource` and cursor to aid in pagination. + """ + edges: [ResourceEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `Resource` you could get from the connection.""" + totalCount: Int! +} + +""" +Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace +""" +type Resource { + id: UUID! + createdAt: Datetime + updatedAt: Datetime + createdBy: UUID + updatedBy: UUID + + """ + Namespace this resource belongs to (security boundary, maps to K8s namespace) + """ + namespaceId: UUID! + + """Resource kind: Deployment, StatefulSet, Service, Ingress, Certificate""" + kind: String! + + """Human-readable resource name""" + name: String! + + """URL-safe identifier, unique within (namespace_id, kind)""" + slug: String! + + """ + Desired state — kind-specific configuration (image, ports, resources, etc.). Opaque to DB; validated by K8s. + """ + spec: JSON! + + """ + Resource lifecycle status: pending, provisioning, active, failed, draining, deleting + """ + status: String! + + """ + Observed state from K8s — populated by handlers after reconciliation (service_url, clone_url, replicas, etc.) + """ + statusObserved: JSON + + """Most recent provisioning or runtime error message""" + lastError: String + + """Cumulative error count for this resource""" + errorCount: Int! + + """Key/value pairs for selecting and filtering resources""" + labels: JSON! + + """Freeform metadata for tooling and operational notes""" + annotations: JSON! + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """Reads a single `PlatformNamespace` that is related to this `Resource`.""" + namespace: PlatformNamespace +} + +"""A `Resource` edge in the connection.""" +type ResourceEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `Resource` at the end of the edge.""" + node: Resource +} + +"""Methods to use when ordering `Resource`.""" +enum ResourceOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + CREATED_BY_ASC + CREATED_BY_DESC + UPDATED_BY_ASC + UPDATED_BY_DESC + NAMESPACE_ID_ASC + NAMESPACE_ID_DESC + KIND_ASC + KIND_DESC + NAME_ASC + NAME_DESC + SLUG_ASC + SLUG_DESC + SPEC_ASC + SPEC_DESC + STATUS_ASC + STATUS_DESC + STATUS_OBSERVED_ASC + STATUS_OBSERVED_DESC + LAST_ERROR_ASC + LAST_ERROR_DESC + ERROR_COUNT_ASC + ERROR_COUNT_DESC + LABELS_ASC + LABELS_DESC + ANNOTATIONS_ASC + ANNOTATIONS_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC +} + +"""A `FunctionDeployment` edge in the connection.""" +type FunctionDeploymentEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `FunctionDeployment` at the end of the edge.""" + node: FunctionDeployment +} + """A `FunctionApiBinding` edge in the connection.""" type FunctionApiBindingEdge { """A cursor for use in pagination.""" @@ -2254,6 +2771,124 @@ enum OrgFunctionExecutionLogOrderBy { ACTOR_ID_DESC } +"""A connection to a list of `ResourceEvent` values.""" +type ResourceEventConnection { + """A list of `ResourceEvent` objects.""" + nodes: [ResourceEvent]! + + """ + A list of edges which contains the `ResourceEvent` and cursor to aid in pagination. + """ + edges: [ResourceEventEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `ResourceEvent` you could get from the connection.""" + totalCount: Int! +} + +""" +Resource lifecycle events — audit log of provisioning, updates, and failure events +""" +type ResourceEvent { + """Event timestamp (partition key)""" + createdAt: Datetime! + + """Unique event identifier""" + id: UUID! + + """Resource this event belongs to""" + resourceId: UUID! + + """ + Event type: provisioned, provisioning, updated, failed, deprovisioned, health_check + """ + eventType: String! + + """User who triggered this event (NULL for system/automated)""" + actorId: UUID + + """Human-readable description of the event""" + message: String + + """Structured context (old/new values, error details, etc.)""" + metadata: JSON + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! +} + +"""A `ResourceEvent` edge in the connection.""" +type ResourceEventEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `ResourceEvent` at the end of the edge.""" + node: ResourceEvent +} + +""" +A filter to be used against `ResourceEvent` object types. All fields are combined with a logical ‘and.’ +""" +input ResourceEventFilter { + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `resourceId` field.""" + resourceId: UUIDFilter + + """Filter by the object’s `eventType` field.""" + eventType: StringFilter + + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Filter by the object’s `message` field.""" + message: StringFilter + + """Filter by the object’s `metadata` field.""" + metadata: JSONFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [ResourceEventFilter!] + + """Checks for any expressions in this list.""" + or: [ResourceEventFilter!] + + """Negates the expression.""" + not: ResourceEventFilter +} + +"""Methods to use when ordering `ResourceEvent`.""" +enum ResourceEventOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + CREATED_AT_ASC + CREATED_AT_DESC + ID_ASC + ID_DESC + RESOURCE_ID_ASC + RESOURCE_ID_DESC + EVENT_TYPE_ASC + EVENT_TYPE_DESC + ACTOR_ID_ASC + ACTOR_ID_DESC + MESSAGE_ASC + MESSAGE_DESC + METADATA_ASC + METADATA_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC +} + """A connection to a list of `FunctionGraphExecutionOutput` values.""" type FunctionGraphExecutionOutputConnection { """A list of `FunctionGraphExecutionOutput` objects.""" @@ -2752,6 +3387,154 @@ enum FunctionExecutionLogOrderBy { DATABASE_ID_DESC } +"""A connection to a list of `FunctionGraph` values.""" +type FunctionGraphConnection { + """A list of `FunctionGraph` objects.""" + nodes: [FunctionGraph]! + + """ + A list of edges which contains the `FunctionGraph` and cursor to aid in pagination. + """ + edges: [FunctionGraphEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `FunctionGraph` you could get from the connection.""" + totalCount: Int! +} + +""" +Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store +""" +type FunctionGraph { + """Unique graph identifier""" + id: UUID! + + """Database scope for multi-tenant isolation""" + databaseId: UUID! + + """Graph store (Merkle store) holding the graph definition""" + storeId: UUID! + + """Evaluator/runtime context (function, js, sql, system)""" + context: String! + + """Graph name (unique per database)""" + name: String! + + """Human-readable description of the graph""" + description: String + + """Pinned definitions store commit for deterministic evaluation""" + definitionsCommitId: UUID + + """Whether graph passes structural validation""" + isValid: Boolean! + + """Array of validation error objects when is_valid = false""" + validationErrors: JSON + + """Actor who created this graph""" + createdBy: UUID + + """Timestamp of graph creation""" + createdAt: Datetime! + + """Timestamp of last modification""" + updatedAt: Datetime! +} + +"""A `FunctionGraph` edge in the connection.""" +type FunctionGraphEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `FunctionGraph` at the end of the edge.""" + node: FunctionGraph +} + +""" +A filter to be used against `FunctionGraph` object types. All fields are combined with a logical ‘and.’ +""" +input FunctionGraphFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `storeId` field.""" + storeId: UUIDFilter + + """Filter by the object’s `context` field.""" + context: StringFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Filter by the object’s `description` field.""" + description: StringFilter + + """Filter by the object’s `definitionsCommitId` field.""" + definitionsCommitId: UUIDFilter + + """Filter by the object’s `isValid` field.""" + isValid: BooleanFilter + + """Filter by the object’s `validationErrors` field.""" + validationErrors: JSONFilter + + """Filter by the object’s `createdBy` field.""" + createdBy: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Checks for all expressions in this list.""" + and: [FunctionGraphFilter!] + + """Checks for any expressions in this list.""" + or: [FunctionGraphFilter!] + + """Negates the expression.""" + not: FunctionGraphFilter +} + +"""Methods to use when ordering `FunctionGraph`.""" +enum FunctionGraphOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + STORE_ID_ASC + STORE_ID_DESC + CONTEXT_ASC + CONTEXT_DESC + NAME_ASC + NAME_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC + DEFINITIONS_COMMIT_ID_ASC + DEFINITIONS_COMMIT_ID_DESC + IS_VALID_ASC + IS_VALID_DESC + VALIDATION_ERRORS_ASC + VALIDATION_ERRORS_DESC + CREATED_BY_ASC + CREATED_BY_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + """A connection to a list of `FunctionGraphExecutionNodeState` values.""" type FunctionGraphExecutionNodeStateConnection { """A list of `FunctionGraphExecutionNodeState` objects.""" @@ -2904,160 +3687,65 @@ enum FunctionGraphExecutionNodeStateOrderBy { OUTPUT_ID_DESC } -"""A connection to a list of `FunctionGraph` values.""" -type FunctionGraphConnection { - """A list of `FunctionGraph` objects.""" - nodes: [FunctionGraph]! +"""A connection to a list of `PlatformNamespace` values.""" +type PlatformNamespaceConnection { + """A list of `PlatformNamespace` objects.""" + nodes: [PlatformNamespace]! """ - A list of edges which contains the `FunctionGraph` and cursor to aid in pagination. + A list of edges which contains the `PlatformNamespace` and cursor to aid in pagination. """ - edges: [FunctionGraphEdge]! + edges: [PlatformNamespaceEdge]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `FunctionGraph` you could get from the connection.""" + """ + The count of *all* `PlatformNamespace` you could get from the connection. + """ totalCount: Int! } -""" -Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store -""" -type FunctionGraph { - """Unique graph identifier""" - id: UUID! - - """Database scope for multi-tenant isolation""" - databaseId: UUID! - - """Graph store (Merkle store) holding the graph definition""" - storeId: UUID! - - """Entity context (org/team) for scoped billing""" - entityId: UUID - - """Evaluator/runtime context (function, js, sql, system)""" - context: String! - - """Graph name (unique per database)""" - name: String! - - """Human-readable description of the graph""" - description: String - - """Pinned definitions store commit for deterministic evaluation""" - definitionsCommitId: UUID - - """Whether graph passes structural validation""" - isValid: Boolean! - - """Array of validation error objects when is_valid = false""" - validationErrors: JSON - - """Actor who created this graph""" - createdBy: UUID - - """Timestamp of graph creation""" - createdAt: Datetime! - - """Timestamp of last modification""" - updatedAt: Datetime! -} - -"""A `FunctionGraph` edge in the connection.""" -type FunctionGraphEdge { +"""A `PlatformNamespace` edge in the connection.""" +type PlatformNamespaceEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `FunctionGraph` at the end of the edge.""" - node: FunctionGraph -} - -""" -A filter to be used against `FunctionGraph` object types. All fields are combined with a logical ‘and.’ -""" -input FunctionGraphFilter { - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `databaseId` field.""" - databaseId: UUIDFilter - - """Filter by the object’s `storeId` field.""" - storeId: UUIDFilter - - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter - - """Filter by the object’s `context` field.""" - context: StringFilter - - """Filter by the object’s `name` field.""" - name: StringFilter - - """Filter by the object’s `description` field.""" - description: StringFilter - - """Filter by the object’s `definitionsCommitId` field.""" - definitionsCommitId: UUIDFilter - - """Filter by the object’s `isValid` field.""" - isValid: BooleanFilter - - """Filter by the object’s `validationErrors` field.""" - validationErrors: JSONFilter - - """Filter by the object’s `createdBy` field.""" - createdBy: UUIDFilter - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter - - """Checks for all expressions in this list.""" - and: [FunctionGraphFilter!] - - """Checks for any expressions in this list.""" - or: [FunctionGraphFilter!] - - """Negates the expression.""" - not: FunctionGraphFilter + """The `PlatformNamespace` at the end of the edge.""" + node: PlatformNamespace } -"""Methods to use when ordering `FunctionGraph`.""" -enum FunctionGraphOrderBy { +"""Methods to use when ordering `PlatformNamespace`.""" +enum PlatformNamespaceOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC ID_ASC ID_DESC - DATABASE_ID_ASC - DATABASE_ID_DESC - STORE_ID_ASC - STORE_ID_DESC - ENTITY_ID_ASC - ENTITY_ID_DESC - CONTEXT_ASC - CONTEXT_DESC - NAME_ASC - NAME_DESC - DESCRIPTION_ASC - DESCRIPTION_DESC - DEFINITIONS_COMMIT_ID_ASC - DEFINITIONS_COMMIT_ID_DESC - IS_VALID_ASC - IS_VALID_DESC - VALIDATION_ERRORS_ASC - VALIDATION_ERRORS_DESC - CREATED_BY_ASC - CREATED_BY_DESC CREATED_AT_ASC CREATED_AT_DESC UPDATED_AT_ASC UPDATED_AT_DESC + NAME_ASC + NAME_DESC + NAMESPACE_NAME_ASC + NAMESPACE_NAME_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + LABELS_ASC + LABELS_DESC + ANNOTATIONS_ASC + ANNOTATIONS_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + SOURCE_DATABASE_ID_ASC + SOURCE_DATABASE_ID_DESC + SOURCE_SCOPE_ASC + SOURCE_SCOPE_DESC + IS_MANAGED_ASC + IS_MANAGED_DESC } """A connection to a list of `OrgFunctionInvocation` values.""" @@ -3453,6 +4141,182 @@ enum FunctionInvocationOrderBy { GRAPH_EXECUTION_ID_DESC } +"""A connection to a list of `PlatformNamespaceEvent` values.""" +type PlatformNamespaceEventConnection { + """A list of `PlatformNamespaceEvent` objects.""" + nodes: [PlatformNamespaceEvent]! + + """ + A list of edges which contains the `PlatformNamespaceEvent` and cursor to aid in pagination. + """ + edges: [PlatformNamespaceEventEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `PlatformNamespaceEvent` you could get from the connection. + """ + totalCount: Int! +} + +""" +Namespace lifecycle events — audit log of creation, activation, deactivation, label changes +""" +type PlatformNamespaceEvent { + """Event timestamp (partition key)""" + createdAt: Datetime! + + """Unique event identifier""" + id: UUID! + + """Namespace this event belongs to""" + namespaceId: UUID! + + """ + Event type: created, activated, deactivated, labels_updated, annotations_updated, renamed + """ + eventType: String! + + """User who triggered this event (NULL for system/automated)""" + actorId: UUID + + """Human-readable description of the event""" + message: String + + """Structured context (old/new values, labels diff, etc.)""" + metadata: JSON + + """CPU usage in millicores at time of event""" + cpuMillicores: Int + + """Memory usage in bytes at time of event""" + memoryBytes: BigInt + + """Storage usage in bytes at time of event""" + storageBytes: BigInt + + """Network ingress in bytes during event window""" + networkIngressBytes: BigInt + + """Network egress in bytes during event window""" + networkEgressBytes: BigInt + + """Number of active pods in the namespace at time of event""" + podCount: Int + + """Additional resource metrics (gpu, replicas, quotas, etc.)""" + metrics: JSON + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! +} + +"""A `PlatformNamespaceEvent` edge in the connection.""" +type PlatformNamespaceEventEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PlatformNamespaceEvent` at the end of the edge.""" + node: PlatformNamespaceEvent +} + +""" +A filter to be used against `PlatformNamespaceEvent` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformNamespaceEventFilter { + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `namespaceId` field.""" + namespaceId: UUIDFilter + + """Filter by the object’s `eventType` field.""" + eventType: StringFilter + + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Filter by the object’s `message` field.""" + message: StringFilter + + """Filter by the object’s `metadata` field.""" + metadata: JSONFilter + + """Filter by the object’s `cpuMillicores` field.""" + cpuMillicores: IntFilter + + """Filter by the object’s `memoryBytes` field.""" + memoryBytes: BigIntFilter + + """Filter by the object’s `storageBytes` field.""" + storageBytes: BigIntFilter + + """Filter by the object’s `networkIngressBytes` field.""" + networkIngressBytes: BigIntFilter + + """Filter by the object’s `networkEgressBytes` field.""" + networkEgressBytes: BigIntFilter + + """Filter by the object’s `podCount` field.""" + podCount: IntFilter + + """Filter by the object’s `metrics` field.""" + metrics: JSONFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [PlatformNamespaceEventFilter!] + + """Checks for any expressions in this list.""" + or: [PlatformNamespaceEventFilter!] + + """Negates the expression.""" + not: PlatformNamespaceEventFilter +} + +"""Methods to use when ordering `PlatformNamespaceEvent`.""" +enum PlatformNamespaceEventOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + CREATED_AT_ASC + CREATED_AT_DESC + ID_ASC + ID_DESC + NAMESPACE_ID_ASC + NAMESPACE_ID_DESC + EVENT_TYPE_ASC + EVENT_TYPE_DESC + ACTOR_ID_ASC + ACTOR_ID_DESC + MESSAGE_ASC + MESSAGE_DESC + METADATA_ASC + METADATA_DESC + CPU_MILLICORES_ASC + CPU_MILLICORES_DESC + MEMORY_BYTES_ASC + MEMORY_BYTES_DESC + STORAGE_BYTES_ASC + STORAGE_BYTES_DESC + NETWORK_INGRESS_BYTES_ASC + NETWORK_INGRESS_BYTES_DESC + NETWORK_EGRESS_BYTES_ASC + NETWORK_EGRESS_BYTES_DESC + POD_COUNT_ASC + POD_COUNT_DESC + METRICS_ASC + METRICS_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC +} + """A connection to a list of `FunctionGraphExecution` values.""" type FunctionGraphExecutionConnection { """A list of `FunctionGraphExecution` objects.""" @@ -3489,9 +4353,6 @@ type FunctionGraphExecution { """Scope for multi-tenant isolation""" databaseId: UUID! - """Entity context (org/team) for scoped billing""" - entityId: UUID - """Target output boundary node name to resolve""" outputNode: String! @@ -3582,9 +4443,6 @@ input FunctionGraphExecutionFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter - """Filter by the object’s `outputNode` field.""" outputNode: StringFilter @@ -3667,8 +4525,6 @@ enum FunctionGraphExecutionOrderBy { INVOCATION_ID_DESC DATABASE_ID_ASC DATABASE_ID_DESC - ENTITY_ID_ASC - ENTITY_ID_DESC OUTPUT_NODE_ASC OUTPUT_NODE_DESC OUTPUT_PORT_ASC @@ -4104,6 +4960,12 @@ type Mutation { """ input: CreateFunctionGraphInput! ): CreateFunctionGraphPayload + importGraphJson( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: ImportGraphJsonInput! + ): ImportGraphJsonPayload addEdge( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -4116,12 +4978,6 @@ type Mutation { """ input: AddNodeInput! ): AddNodePayload - importGraphJson( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ImportGraphJsonInput! - ): ImportGraphJsonPayload insertNodeAtPath( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -4183,6 +5039,14 @@ type Mutation { input: CreateOrgFunctionExecutionLogInput! ): CreateOrgFunctionExecutionLogPayload + """Creates a single `ResourceEvent`.""" + createResourceEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateResourceEventInput! + ): CreateResourceEventPayload + """Creates a single `FunctionGraphExecutionOutput`.""" createFunctionGraphExecutionOutput( """ @@ -4223,6 +5087,14 @@ type Mutation { input: CreateFunctionGraphExecutionNodeStateInput! ): CreateFunctionGraphExecutionNodeStatePayload + """Creates a single `PlatformNamespace`.""" + createPlatformNamespace( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlatformNamespaceInput! + ): CreatePlatformNamespacePayload + """Creates a single `OrgFunctionInvocation`.""" createOrgFunctionInvocation( """ @@ -4239,6 +5111,22 @@ type Mutation { input: CreateFunctionInvocationInput! ): CreateFunctionInvocationPayload + """Creates a single `Resource`.""" + createResource( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateResourceInput! + ): CreateResourcePayload + + """Creates a single `PlatformNamespaceEvent`.""" + createPlatformNamespaceEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlatformNamespaceEventInput! + ): CreatePlatformNamespaceEventPayload + """Creates a single `FunctionDeployment`.""" createFunctionDeployment( """ @@ -4315,6 +5203,14 @@ type Mutation { input: UpdateOrgFunctionExecutionLogInput! ): UpdateOrgFunctionExecutionLogPayload + """Updates a single `ResourceEvent` using a unique key and a patch.""" + updateResourceEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateResourceEventInput! + ): UpdateResourceEventPayload + """ Updates a single `FunctionGraphExecutionOutput` using a unique key and a patch. """ @@ -4351,6 +5247,14 @@ type Mutation { input: UpdateFunctionExecutionLogInput! ): UpdateFunctionExecutionLogPayload + """Updates a single `FunctionGraph` using a unique key and a patch.""" + updateFunctionGraph( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateFunctionGraphInput! + ): UpdateFunctionGraphPayload + """ Updates a single `FunctionGraphExecutionNodeState` using a unique key and a patch. """ @@ -4361,13 +5265,13 @@ type Mutation { input: UpdateFunctionGraphExecutionNodeStateInput! ): UpdateFunctionGraphExecutionNodeStatePayload - """Updates a single `FunctionGraph` using a unique key and a patch.""" - updateFunctionGraph( + """Updates a single `PlatformNamespace` using a unique key and a patch.""" + updatePlatformNamespace( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: UpdateFunctionGraphInput! - ): UpdateFunctionGraphPayload + input: UpdatePlatformNamespaceInput! + ): UpdatePlatformNamespacePayload """ Updates a single `OrgFunctionInvocation` using a unique key and a patch. @@ -4387,6 +5291,24 @@ type Mutation { input: UpdateFunctionInvocationInput! ): UpdateFunctionInvocationPayload + """Updates a single `Resource` using a unique key and a patch.""" + updateResource( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateResourceInput! + ): UpdateResourcePayload + + """ + Updates a single `PlatformNamespaceEvent` using a unique key and a patch. + """ + updatePlatformNamespaceEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlatformNamespaceEventInput! + ): UpdatePlatformNamespaceEventPayload + """Updates a single `FunctionDeployment` using a unique key and a patch.""" updateFunctionDeployment( """ @@ -4461,6 +5383,14 @@ type Mutation { input: DeleteOrgFunctionExecutionLogInput! ): DeleteOrgFunctionExecutionLogPayload + """Deletes a single `ResourceEvent` using a unique key.""" + deleteResourceEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteResourceEventInput! + ): DeleteResourceEventPayload + """Deletes a single `FunctionGraphExecutionOutput` using a unique key.""" deleteFunctionGraphExecutionOutput( """ @@ -4493,6 +5423,14 @@ type Mutation { input: DeleteFunctionExecutionLogInput! ): DeleteFunctionExecutionLogPayload + """Deletes a single `FunctionGraph` using a unique key.""" + deleteFunctionGraph( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteFunctionGraphInput! + ): DeleteFunctionGraphPayload + """Deletes a single `FunctionGraphExecutionNodeState` using a unique key.""" deleteFunctionGraphExecutionNodeState( """ @@ -4501,13 +5439,13 @@ type Mutation { input: DeleteFunctionGraphExecutionNodeStateInput! ): DeleteFunctionGraphExecutionNodeStatePayload - """Deletes a single `FunctionGraph` using a unique key.""" - deleteFunctionGraph( + """Deletes a single `PlatformNamespace` using a unique key.""" + deletePlatformNamespace( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: DeleteFunctionGraphInput! - ): DeleteFunctionGraphPayload + input: DeletePlatformNamespaceInput! + ): DeletePlatformNamespacePayload """Deletes a single `OrgFunctionInvocation` using a unique key.""" deleteOrgFunctionInvocation( @@ -4525,6 +5463,22 @@ type Mutation { input: DeleteFunctionInvocationInput! ): DeleteFunctionInvocationPayload + """Deletes a single `Resource` using a unique key.""" + deleteResource( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteResourceInput! + ): DeleteResourcePayload + + """Deletes a single `PlatformNamespaceEvent` using a unique key.""" + deletePlatformNamespaceEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlatformNamespaceEventInput! + ): DeletePlatformNamespaceEventPayload + """Deletes a single `FunctionDeployment` using a unique key.""" deleteFunctionDeployment( """ @@ -4808,13 +5762,12 @@ input CreateFunctionGraphInput { name: String context: String description: String - entityId: UUID createdBy: UUID definitionsCommitId: UUID } -"""The output of our `addEdge` mutation.""" -type AddEdgePayload { +"""The output of our `importGraphJson` mutation.""" +type ImportGraphJsonPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. @@ -4828,25 +5781,24 @@ type AddEdgePayload { query: Query } -"""All input for the `addEdge` mutation.""" -input AddEdgeInput { +"""All input for the `importGraphJson` mutation.""" +input ImportGraphJsonInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String databaseId: UUID - rootHash: UUID - srcNode: String - srcPort: String - dstNode: String - dstPort: String + name: String + graphJson: JSON context: String - graphName: String + description: String + createdBy: UUID + definitionsCommitId: UUID } -"""The output of our `addNode` mutation.""" -type AddNodePayload { +"""The output of our `addEdge` mutation.""" +type AddEdgePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. @@ -4860,8 +5812,8 @@ type AddNodePayload { query: Query } -"""All input for the `addNode` mutation.""" -input AddNodeInput { +"""All input for the `addEdge` mutation.""" +input AddEdgeInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -4869,16 +5821,16 @@ input AddNodeInput { clientMutationId: String databaseId: UUID rootHash: UUID - nodeName: String - nodeType: String + srcNode: String + srcPort: String + dstNode: String + dstPort: String context: String graphName: String - props: JSON - meta: JSON } -"""The output of our `importGraphJson` mutation.""" -type ImportGraphJsonPayload { +"""The output of our `addNode` mutation.""" +type AddNodePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. @@ -4892,21 +5844,21 @@ type ImportGraphJsonPayload { query: Query } -"""All input for the `importGraphJson` mutation.""" -input ImportGraphJsonInput { +"""All input for the `addNode` mutation.""" +input AddNodeInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String databaseId: UUID - name: String - graphJson: JSON + rootHash: UUID + nodeName: String + nodeType: String context: String - description: String - entityId: UUID - createdBy: UUID - definitionsCommitId: UUID + graphName: String + props: JSON + meta: JSON } """The output of our `insertNodeAtPath` mutation.""" @@ -5339,6 +6291,70 @@ input OrgFunctionExecutionLogInput { actorId: UUID } +"""The output of our create `ResourceEvent` mutation.""" +type CreateResourceEventPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `ResourceEvent` that was created by this mutation.""" + resourceEvent: ResourceEvent + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `ResourceEvent`. May be used by Relay 1.""" + resourceEventEdge( + """The method to use when ordering `ResourceEvent`.""" + orderBy: [ResourceEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): ResourceEventEdge +} + +"""All input for the create `ResourceEvent` mutation.""" +input CreateResourceEventInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `ResourceEvent` to be created by this mutation.""" + resourceEvent: ResourceEventInput! +} + +"""An input for mutations affecting `ResourceEvent`""" +input ResourceEventInput { + """Event timestamp (partition key)""" + createdAt: Datetime + + """Unique event identifier""" + id: UUID + + """Resource this event belongs to""" + resourceId: UUID! + + """ + Event type: provisioned, provisioning, updated, failed, deprovisioned, health_check + """ + eventType: String! + + """User who triggered this event (NULL for system/automated)""" + actorId: UUID + + """Human-readable description of the event""" + message: String + + """Structured context (old/new values, error details, etc.)""" + metadata: JSON + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! +} + """The output of our create `FunctionGraphExecutionOutput` mutation.""" type CreateFunctionGraphExecutionOutputPayload { """ @@ -5666,6 +6682,86 @@ input FunctionGraphExecutionNodeStateInput { outputId: UUID } +"""The output of our create `PlatformNamespace` mutation.""" +type CreatePlatformNamespacePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `PlatformNamespace` that was created by this mutation.""" + platformNamespace: PlatformNamespace + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `PlatformNamespace`. May be used by Relay 1.""" + platformNamespaceEdge( + """The method to use when ordering `PlatformNamespace`.""" + orderBy: [PlatformNamespaceOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformNamespaceEdge +} + +"""All input for the create `PlatformNamespace` mutation.""" +input CreatePlatformNamespaceInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `PlatformNamespace` to be created by this mutation.""" + platformNamespace: PlatformNamespaceInput! +} + +"""An input for mutations affecting `PlatformNamespace`""" +input PlatformNamespaceInput { + id: UUID + createdAt: Datetime + updatedAt: Datetime + + """Human-readable namespace name (e.g. default, production, oauth)""" + name: String! + + """ + Globally unique computed namespace identifier via inflection.underscore + """ + namespaceName: String! + + """Optional human-readable description of this namespace""" + description: String + + """Whether this namespace is active (soft-disable for filtering)""" + isActive: Boolean + + """Key/value pairs for selecting and filtering namespaces""" + labels: JSON + + """Freeform metadata for tooling and operational notes""" + annotations: JSON + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """ + Database that created this namespace (NULL for platform-native namespaces) + """ + sourceDatabaseId: UUID + + """ + Origin scope: platform, org, app — indicates where this namespace was created + """ + sourceScope: String + + """ + true = created by a child scope mirror trigger, false = platform-native + """ + isManaged: Boolean +} + """The output of our create `OrgFunctionInvocation` mutation.""" type CreateOrgFunctionInvocationPayload { """ @@ -5744,93 +6840,266 @@ input OrgFunctionInvocationInput { """Parent invocation when this is a child node of a flow graph execution""" parentInvocationId: UUID - """Groups all node invocations from a single flow graph execution""" - graphExecutionId: UUID + """Groups all node invocations from a single flow graph execution""" + graphExecutionId: UUID +} + +"""The output of our create `FunctionInvocation` mutation.""" +type CreateFunctionInvocationPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `FunctionInvocation` that was created by this mutation.""" + functionInvocation: FunctionInvocation + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `FunctionInvocation`. May be used by Relay 1.""" + functionInvocationEdge( + """The method to use when ordering `FunctionInvocation`.""" + orderBy: [FunctionInvocationOrderBy!]! = [PRIMARY_KEY_ASC] + ): FunctionInvocationEdge +} + +"""All input for the create `FunctionInvocation` mutation.""" +input CreateFunctionInvocationInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `FunctionInvocation` to be created by this mutation.""" + functionInvocation: FunctionInvocationInput! +} + +"""An input for mutations affecting `FunctionInvocation`""" +input FunctionInvocationInput { + """Invocation creation timestamp (partition key)""" + createdAt: Datetime + + """Unique invocation identifier""" + id: UUID + + """Who triggered the invocation (NULL for system/cron)""" + actorId: UUID + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """ + Function routing slug (scope:name). Links to function_definitions.task_identifier by convention — no FK. + """ + taskIdentifier: String! + + """Function input payload""" + payload: JSON + + """Lifecycle: pending → running → completed/failed/cancelled""" + status: String + + """Function return value (success) or structured error (failure)""" + result: JSON + + """Error message when status is failed""" + error: String + + """Wall-clock execution time in milliseconds""" + durationMs: Int + + """FK to app_jobs.jobs — the underlying transport""" + jobId: BigInt + + """When execution started""" + startedAt: Datetime + + """When execution completed""" + completedAt: Datetime + + """Parent invocation when this is a child node of a flow graph execution""" + parentInvocationId: UUID + + """Groups all node invocations from a single flow graph execution""" + graphExecutionId: UUID +} + +"""The output of our create `Resource` mutation.""" +type CreateResourcePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Resource` that was created by this mutation.""" + resource: Resource + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Resource`. May be used by Relay 1.""" + resourceEdge( + """The method to use when ordering `Resource`.""" + orderBy: [ResourceOrderBy!]! = [PRIMARY_KEY_ASC] + ): ResourceEdge +} + +"""All input for the create `Resource` mutation.""" +input CreateResourceInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `Resource` to be created by this mutation.""" + resource: ResourceInput! +} + +"""An input for mutations affecting `Resource`""" +input ResourceInput { + id: UUID + createdAt: Datetime + updatedAt: Datetime + createdBy: UUID + updatedBy: UUID + + """ + Namespace this resource belongs to (security boundary, maps to K8s namespace) + """ + namespaceId: UUID! + + """Resource kind: Deployment, StatefulSet, Service, Ingress, Certificate""" + kind: String! + + """Human-readable resource name""" + name: String! + + """URL-safe identifier, unique within (namespace_id, kind)""" + slug: String! + + """ + Desired state — kind-specific configuration (image, ports, resources, etc.). Opaque to DB; validated by K8s. + """ + spec: JSON + + """ + Resource lifecycle status: pending, provisioning, active, failed, draining, deleting + """ + status: String + + """ + Observed state from K8s — populated by handlers after reconciliation (service_url, clone_url, replicas, etc.) + """ + statusObserved: JSON + + """Most recent provisioning or runtime error message""" + lastError: String + + """Cumulative error count for this resource""" + errorCount: Int + + """Key/value pairs for selecting and filtering resources""" + labels: JSON + + """Freeform metadata for tooling and operational notes""" + annotations: JSON + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! } -"""The output of our create `FunctionInvocation` mutation.""" -type CreateFunctionInvocationPayload { +"""The output of our create `PlatformNamespaceEvent` mutation.""" +type CreatePlatformNamespaceEventPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `FunctionInvocation` that was created by this mutation.""" - functionInvocation: FunctionInvocation + """The `PlatformNamespaceEvent` that was created by this mutation.""" + platformNamespaceEvent: PlatformNamespaceEvent """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `FunctionInvocation`. May be used by Relay 1.""" - functionInvocationEdge( - """The method to use when ordering `FunctionInvocation`.""" - orderBy: [FunctionInvocationOrderBy!]! = [PRIMARY_KEY_ASC] - ): FunctionInvocationEdge + """An edge for our `PlatformNamespaceEvent`. May be used by Relay 1.""" + platformNamespaceEventEdge( + """The method to use when ordering `PlatformNamespaceEvent`.""" + orderBy: [PlatformNamespaceEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformNamespaceEventEdge } -"""All input for the create `FunctionInvocation` mutation.""" -input CreateFunctionInvocationInput { +"""All input for the create `PlatformNamespaceEvent` mutation.""" +input CreatePlatformNamespaceEventInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `FunctionInvocation` to be created by this mutation.""" - functionInvocation: FunctionInvocationInput! + """The `PlatformNamespaceEvent` to be created by this mutation.""" + platformNamespaceEvent: PlatformNamespaceEventInput! } -"""An input for mutations affecting `FunctionInvocation`""" -input FunctionInvocationInput { - """Invocation creation timestamp (partition key)""" +"""An input for mutations affecting `PlatformNamespaceEvent`""" +input PlatformNamespaceEventInput { + """Event timestamp (partition key)""" createdAt: Datetime - """Unique invocation identifier""" + """Unique event identifier""" id: UUID - """Who triggered the invocation (NULL for system/cron)""" - actorId: UUID - - """Database that owns this resource (database-scoped isolation)""" - databaseId: UUID! + """Namespace this event belongs to""" + namespaceId: UUID! """ - Function routing slug (scope:name). Links to function_definitions.task_identifier by convention — no FK. + Event type: created, activated, deactivated, labels_updated, annotations_updated, renamed """ - taskIdentifier: String! + eventType: String! - """Function input payload""" - payload: JSON + """User who triggered this event (NULL for system/automated)""" + actorId: UUID - """Lifecycle: pending → running → completed/failed/cancelled""" - status: String + """Human-readable description of the event""" + message: String - """Function return value (success) or structured error (failure)""" - result: JSON + """Structured context (old/new values, labels diff, etc.)""" + metadata: JSON - """Error message when status is failed""" - error: String + """CPU usage in millicores at time of event""" + cpuMillicores: Int - """Wall-clock execution time in milliseconds""" - durationMs: Int + """Memory usage in bytes at time of event""" + memoryBytes: BigInt - """FK to app_jobs.jobs — the underlying transport""" - jobId: BigInt + """Storage usage in bytes at time of event""" + storageBytes: BigInt - """When execution started""" - startedAt: Datetime + """Network ingress in bytes during event window""" + networkIngressBytes: BigInt - """When execution completed""" - completedAt: Datetime + """Network egress in bytes during event window""" + networkEgressBytes: BigInt - """Parent invocation when this is a child node of a flow graph execution""" - parentInvocationId: UUID + """Number of active pods in the namespace at time of event""" + podCount: Int - """Groups all node invocations from a single flow graph execution""" - graphExecutionId: UUID + """Additional resource metrics (gpu, replicas, quotas, etc.)""" + metrics: JSON + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! } """The output of our create `FunctionDeployment` mutation.""" @@ -5991,9 +7260,6 @@ input FunctionGraphExecutionInput { """Scope for multi-tenant isolation""" databaseId: UUID! - """Entity context (org/team) for scoped billing""" - entityId: UUID - """Target output boundary node name to resolve""" outputNode: String! @@ -6597,6 +7863,80 @@ input OrgFunctionExecutionLogPatch { actorId: UUID } +"""The output of our update `ResourceEvent` mutation.""" +type UpdateResourceEventPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `ResourceEvent` that was updated by this mutation.""" + resourceEvent: ResourceEvent + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `ResourceEvent`. May be used by Relay 1.""" + resourceEventEdge( + """The method to use when ordering `ResourceEvent`.""" + orderBy: [ResourceEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): ResourceEventEdge +} + +"""All input for the `updateResourceEvent` mutation.""" +input UpdateResourceEventInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Event timestamp (partition key)""" + createdAt: Datetime! + + """Unique event identifier""" + id: UUID! + + """ + An object where the defined keys will be set on the `ResourceEvent` being updated. + """ + resourceEventPatch: ResourceEventPatch! +} + +""" +Represents an update to a `ResourceEvent`. Fields that are set will be updated. +""" +input ResourceEventPatch { + """Event timestamp (partition key)""" + createdAt: Datetime + + """Unique event identifier""" + id: UUID + + """Resource this event belongs to""" + resourceId: UUID + + """ + Event type: provisioned, provisioning, updated, failed, deprovisioned, health_check + """ + eventType: String + + """User who triggered this event (NULL for system/automated)""" + actorId: UUID + + """Human-readable description of the event""" + message: String + + """Structured context (old/new values, error details, etc.)""" + metadata: JSON + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID +} + """The output of our update `FunctionGraphExecutionOutput` mutation.""" type UpdateFunctionGraphExecutionOutputPayload { """ @@ -6879,6 +8219,87 @@ input FunctionExecutionLogPatch { databaseId: UUID } +"""The output of our update `FunctionGraph` mutation.""" +type UpdateFunctionGraphPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `FunctionGraph` that was updated by this mutation.""" + functionGraph: FunctionGraph + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `FunctionGraph`. May be used by Relay 1.""" + functionGraphEdge( + """The method to use when ordering `FunctionGraph`.""" + orderBy: [FunctionGraphOrderBy!]! = [PRIMARY_KEY_ASC] + ): FunctionGraphEdge +} + +"""All input for the `updateFunctionGraph` mutation.""" +input UpdateFunctionGraphInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Unique graph identifier""" + id: UUID! + + """ + An object where the defined keys will be set on the `FunctionGraph` being updated. + """ + functionGraphPatch: FunctionGraphPatch! +} + +""" +Represents an update to a `FunctionGraph`. Fields that are set will be updated. +""" +input FunctionGraphPatch { + """Unique graph identifier""" + id: UUID + + """Database scope for multi-tenant isolation""" + databaseId: UUID + + """Graph store (Merkle store) holding the graph definition""" + storeId: UUID + + """Evaluator/runtime context (function, js, sql, system)""" + context: String + + """Graph name (unique per database)""" + name: String + + """Human-readable description of the graph""" + description: String + + """Pinned definitions store commit for deterministic evaluation""" + definitionsCommitId: UUID + + """Whether graph passes structural validation""" + isValid: Boolean + + """Array of validation error objects when is_valid = false""" + validationErrors: JSON + + """Actor who created this graph""" + createdBy: UUID + + """Timestamp of graph creation""" + createdAt: Datetime + + """Timestamp of last modification""" + updatedAt: Datetime +} + """The output of our update `FunctionGraphExecutionNodeState` mutation.""" type UpdateFunctionGraphExecutionNodeStatePayload { """ @@ -6969,88 +8390,89 @@ input FunctionGraphExecutionNodeStatePatch { outputId: UUID } -"""The output of our update `FunctionGraph` mutation.""" -type UpdateFunctionGraphPayload { +"""The output of our update `PlatformNamespace` mutation.""" +type UpdatePlatformNamespacePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `FunctionGraph` that was updated by this mutation.""" - functionGraph: FunctionGraph + """The `PlatformNamespace` that was updated by this mutation.""" + platformNamespace: PlatformNamespace """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `FunctionGraph`. May be used by Relay 1.""" - functionGraphEdge( - """The method to use when ordering `FunctionGraph`.""" - orderBy: [FunctionGraphOrderBy!]! = [PRIMARY_KEY_ASC] - ): FunctionGraphEdge + """An edge for our `PlatformNamespace`. May be used by Relay 1.""" + platformNamespaceEdge( + """The method to use when ordering `PlatformNamespace`.""" + orderBy: [PlatformNamespaceOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformNamespaceEdge } -"""All input for the `updateFunctionGraph` mutation.""" -input UpdateFunctionGraphInput { +"""All input for the `updatePlatformNamespace` mutation.""" +input UpdatePlatformNamespaceInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - - """Unique graph identifier""" id: UUID! """ - An object where the defined keys will be set on the `FunctionGraph` being updated. + An object where the defined keys will be set on the `PlatformNamespace` being updated. """ - functionGraphPatch: FunctionGraphPatch! + platformNamespacePatch: PlatformNamespacePatch! } """ -Represents an update to a `FunctionGraph`. Fields that are set will be updated. +Represents an update to a `PlatformNamespace`. Fields that are set will be updated. """ -input FunctionGraphPatch { - """Unique graph identifier""" +input PlatformNamespacePatch { id: UUID + createdAt: Datetime + updatedAt: Datetime - """Database scope for multi-tenant isolation""" - databaseId: UUID - - """Graph store (Merkle store) holding the graph definition""" - storeId: UUID - - """Entity context (org/team) for scoped billing""" - entityId: UUID - - """Evaluator/runtime context (function, js, sql, system)""" - context: String - - """Graph name (unique per database)""" + """Human-readable namespace name (e.g. default, production, oauth)""" name: String - """Human-readable description of the graph""" + """ + Globally unique computed namespace identifier via inflection.underscore + """ + namespaceName: String + + """Optional human-readable description of this namespace""" description: String - """Pinned definitions store commit for deterministic evaluation""" - definitionsCommitId: UUID + """Whether this namespace is active (soft-disable for filtering)""" + isActive: Boolean - """Whether graph passes structural validation""" - isValid: Boolean + """Key/value pairs for selecting and filtering namespaces""" + labels: JSON - """Array of validation error objects when is_valid = false""" - validationErrors: JSON + """Freeform metadata for tooling and operational notes""" + annotations: JSON - """Actor who created this graph""" - createdBy: UUID + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID - """Timestamp of graph creation""" - createdAt: Datetime + """ + Database that created this namespace (NULL for platform-native namespaces) + """ + sourceDatabaseId: UUID + + """ + Origin scope: platform, org, app — indicates where this namespace was created + """ + sourceScope: String - """Timestamp of last modification""" - updatedAt: Datetime + """ + true = created by a child scope mirror trigger, false = platform-native + """ + isManaged: Boolean } """The output of our update `OrgFunctionInvocation` mutation.""" @@ -7240,6 +8662,194 @@ input FunctionInvocationPatch { graphExecutionId: UUID } +"""The output of our update `Resource` mutation.""" +type UpdateResourcePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Resource` that was updated by this mutation.""" + resource: Resource + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Resource`. May be used by Relay 1.""" + resourceEdge( + """The method to use when ordering `Resource`.""" + orderBy: [ResourceOrderBy!]! = [PRIMARY_KEY_ASC] + ): ResourceEdge +} + +"""All input for the `updateResource` mutation.""" +input UpdateResourceInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `Resource` being updated. + """ + resourcePatch: ResourcePatch! +} + +""" +Represents an update to a `Resource`. Fields that are set will be updated. +""" +input ResourcePatch { + id: UUID + createdAt: Datetime + updatedAt: Datetime + createdBy: UUID + updatedBy: UUID + + """ + Namespace this resource belongs to (security boundary, maps to K8s namespace) + """ + namespaceId: UUID + + """Resource kind: Deployment, StatefulSet, Service, Ingress, Certificate""" + kind: String + + """Human-readable resource name""" + name: String + + """URL-safe identifier, unique within (namespace_id, kind)""" + slug: String + + """ + Desired state — kind-specific configuration (image, ports, resources, etc.). Opaque to DB; validated by K8s. + """ + spec: JSON + + """ + Resource lifecycle status: pending, provisioning, active, failed, draining, deleting + """ + status: String + + """ + Observed state from K8s — populated by handlers after reconciliation (service_url, clone_url, replicas, etc.) + """ + statusObserved: JSON + + """Most recent provisioning or runtime error message""" + lastError: String + + """Cumulative error count for this resource""" + errorCount: Int + + """Key/value pairs for selecting and filtering resources""" + labels: JSON + + """Freeform metadata for tooling and operational notes""" + annotations: JSON + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID +} + +"""The output of our update `PlatformNamespaceEvent` mutation.""" +type UpdatePlatformNamespaceEventPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `PlatformNamespaceEvent` that was updated by this mutation.""" + platformNamespaceEvent: PlatformNamespaceEvent + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `PlatformNamespaceEvent`. May be used by Relay 1.""" + platformNamespaceEventEdge( + """The method to use when ordering `PlatformNamespaceEvent`.""" + orderBy: [PlatformNamespaceEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformNamespaceEventEdge +} + +"""All input for the `updatePlatformNamespaceEvent` mutation.""" +input UpdatePlatformNamespaceEventInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Event timestamp (partition key)""" + createdAt: Datetime! + + """Unique event identifier""" + id: UUID! + + """ + An object where the defined keys will be set on the `PlatformNamespaceEvent` being updated. + """ + platformNamespaceEventPatch: PlatformNamespaceEventPatch! +} + +""" +Represents an update to a `PlatformNamespaceEvent`. Fields that are set will be updated. +""" +input PlatformNamespaceEventPatch { + """Event timestamp (partition key)""" + createdAt: Datetime + + """Unique event identifier""" + id: UUID + + """Namespace this event belongs to""" + namespaceId: UUID + + """ + Event type: created, activated, deactivated, labels_updated, annotations_updated, renamed + """ + eventType: String + + """User who triggered this event (NULL for system/automated)""" + actorId: UUID + + """Human-readable description of the event""" + message: String + + """Structured context (old/new values, labels diff, etc.)""" + metadata: JSON + + """CPU usage in millicores at time of event""" + cpuMillicores: Int + + """Memory usage in bytes at time of event""" + memoryBytes: BigInt + + """Storage usage in bytes at time of event""" + storageBytes: BigInt + + """Network ingress in bytes during event window""" + networkIngressBytes: BigInt + + """Network egress in bytes during event window""" + networkEgressBytes: BigInt + + """Number of active pods in the namespace at time of event""" + podCount: Int + + """Additional resource metrics (gpu, replicas, quotas, etc.)""" + metrics: JSON + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID +} + """The output of our update `FunctionDeployment` mutation.""" type UpdateFunctionDeploymentPayload { """ @@ -7413,9 +9023,6 @@ input FunctionGraphExecutionPatch { """Scope for multi-tenant isolation""" databaseId: UUID - """Entity context (org/team) for scoped billing""" - entityId: UUID - """Target output boundary node name to resolve""" outputNode: String @@ -7846,6 +9453,44 @@ input DeleteOrgFunctionExecutionLogInput { id: UUID! } +"""The output of our delete `ResourceEvent` mutation.""" +type DeleteResourceEventPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `ResourceEvent` that was deleted by this mutation.""" + resourceEvent: ResourceEvent + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `ResourceEvent`. May be used by Relay 1.""" + resourceEventEdge( + """The method to use when ordering `ResourceEvent`.""" + orderBy: [ResourceEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): ResourceEventEdge +} + +"""All input for the `deleteResourceEvent` mutation.""" +input DeleteResourceEventInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Event timestamp (partition key)""" + createdAt: Datetime! + + """Unique event identifier""" + id: UUID! +} + """The output of our delete `FunctionGraphExecutionOutput` mutation.""" type DeleteFunctionGraphExecutionOutputPayload { """ @@ -7995,6 +9640,41 @@ input DeleteFunctionExecutionLogInput { id: UUID! } +"""The output of our delete `FunctionGraph` mutation.""" +type DeleteFunctionGraphPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `FunctionGraph` that was deleted by this mutation.""" + functionGraph: FunctionGraph + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `FunctionGraph`. May be used by Relay 1.""" + functionGraphEdge( + """The method to use when ordering `FunctionGraph`.""" + orderBy: [FunctionGraphOrderBy!]! = [PRIMARY_KEY_ASC] + ): FunctionGraphEdge +} + +"""All input for the `deleteFunctionGraph` mutation.""" +input DeleteFunctionGraphInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Unique graph identifier""" + id: UUID! +} + """The output of our delete `FunctionGraphExecutionNodeState` mutation.""" type DeleteFunctionGraphExecutionNodeStatePayload { """ @@ -8037,38 +9717,36 @@ input DeleteFunctionGraphExecutionNodeStateInput { id: UUID! } -"""The output of our delete `FunctionGraph` mutation.""" -type DeleteFunctionGraphPayload { +"""The output of our delete `PlatformNamespace` mutation.""" +type DeletePlatformNamespacePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `FunctionGraph` that was deleted by this mutation.""" - functionGraph: FunctionGraph + """The `PlatformNamespace` that was deleted by this mutation.""" + platformNamespace: PlatformNamespace """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `FunctionGraph`. May be used by Relay 1.""" - functionGraphEdge( - """The method to use when ordering `FunctionGraph`.""" - orderBy: [FunctionGraphOrderBy!]! = [PRIMARY_KEY_ASC] - ): FunctionGraphEdge + """An edge for our `PlatformNamespace`. May be used by Relay 1.""" + platformNamespaceEdge( + """The method to use when ordering `PlatformNamespace`.""" + orderBy: [PlatformNamespaceOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformNamespaceEdge } -"""All input for the `deleteFunctionGraph` mutation.""" -input DeleteFunctionGraphInput { +"""All input for the `deletePlatformNamespace` mutation.""" +input DeletePlatformNamespaceInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - - """Unique graph identifier""" id: UUID! } @@ -8148,6 +9826,77 @@ input DeleteFunctionInvocationInput { id: UUID! } +"""The output of our delete `Resource` mutation.""" +type DeleteResourcePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `Resource` that was deleted by this mutation.""" + resource: Resource + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `Resource`. May be used by Relay 1.""" + resourceEdge( + """The method to use when ordering `Resource`.""" + orderBy: [ResourceOrderBy!]! = [PRIMARY_KEY_ASC] + ): ResourceEdge +} + +"""All input for the `deleteResource` mutation.""" +input DeleteResourceInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + +"""The output of our delete `PlatformNamespaceEvent` mutation.""" +type DeletePlatformNamespaceEventPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `PlatformNamespaceEvent` that was deleted by this mutation.""" + platformNamespaceEvent: PlatformNamespaceEvent + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `PlatformNamespaceEvent`. May be used by Relay 1.""" + platformNamespaceEventEdge( + """The method to use when ordering `PlatformNamespaceEvent`.""" + orderBy: [PlatformNamespaceEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformNamespaceEventEdge +} + +"""All input for the `deletePlatformNamespaceEvent` mutation.""" +input DeletePlatformNamespaceEventInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Event timestamp (partition key)""" + createdAt: Datetime! + + """Unique event identifier""" + id: UUID! +} + """The output of our delete `FunctionDeployment` mutation.""" type DeleteFunctionDeploymentPayload { """ diff --git a/sdk/constructive-sdk/schemas/modules.graphql b/sdk/constructive-sdk/schemas/modules.graphql index 750d6b37ec..54fc1c4592 100644 --- a/sdk/constructive-sdk/schemas/modules.graphql +++ b/sdk/constructive-sdk/schemas/modules.graphql @@ -747,8 +747,10 @@ type Query { orderBy: [SecureTableProvisionOrderBy!] = [PRIMARY_KEY_ASC] ): SecureTableProvisionConnection - """Reads and enables pagination through a set of `MerkleStoreModule`.""" - merkleStoreModules( + """ + Reads and enables pagination through a set of `DatabaseProvisionModule`. + """ + databaseProvisionModules( """Only read the first `n` values of the set.""" first: Int @@ -770,16 +772,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: MerkleStoreModuleFilter + where: DatabaseProvisionModuleFilter - """The method to use when ordering `MerkleStoreModule`.""" - orderBy: [MerkleStoreModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): MerkleStoreModuleConnection + """The method to use when ordering `DatabaseProvisionModule`.""" + orderBy: [DatabaseProvisionModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): DatabaseProvisionModuleConnection - """ - Reads and enables pagination through a set of `DatabaseProvisionModule`. - """ - databaseProvisionModules( + """Reads and enables pagination through a set of `ConfigSecretsModule`.""" + configSecretsModules( """Only read the first `n` values of the set.""" first: Int @@ -801,14 +801,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: DatabaseProvisionModuleFilter + where: ConfigSecretsModuleFilter - """The method to use when ordering `DatabaseProvisionModule`.""" - orderBy: [DatabaseProvisionModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): DatabaseProvisionModuleConnection + """The method to use when ordering `ConfigSecretsModule`.""" + orderBy: [ConfigSecretsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): ConfigSecretsModuleConnection - """Reads and enables pagination through a set of `ConfigSecretsModule`.""" - configSecretsModules( + """Reads and enables pagination through a set of `GraphModule`.""" + graphModules( """Only read the first `n` values of the set.""" first: Int @@ -830,14 +830,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: ConfigSecretsModuleFilter + where: GraphModuleFilter - """The method to use when ordering `ConfigSecretsModule`.""" - orderBy: [ConfigSecretsModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): ConfigSecretsModuleConnection + """The method to use when ordering `GraphModule`.""" + orderBy: [GraphModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): GraphModuleConnection - """Reads and enables pagination through a set of `GraphModule`.""" - graphModules( + """Reads and enables pagination through a set of `MerkleStoreModule`.""" + merkleStoreModules( """Only read the first `n` values of the set.""" first: Int @@ -859,11 +859,11 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: GraphModuleFilter + where: MerkleStoreModuleFilter - """The method to use when ordering `GraphModule`.""" - orderBy: [GraphModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): GraphModuleConnection + """The method to use when ordering `MerkleStoreModule`.""" + orderBy: [MerkleStoreModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): MerkleStoreModuleConnection """Reads and enables pagination through a set of `RateLimitMetersModule`.""" rateLimitMetersModules( @@ -1041,6 +1041,35 @@ type Query { orderBy: [InvitesModuleOrderBy!] = [PRIMARY_KEY_ASC] ): InvitesModuleConnection + """Reads and enables pagination through a set of `PrincipalAuthModule`.""" + principalAuthModules( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PrincipalAuthModuleFilter + + """The method to use when ordering `PrincipalAuthModule`.""" + orderBy: [PrincipalAuthModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): PrincipalAuthModuleConnection + """Reads and enables pagination through a set of `ComputeLogModule`.""" computeLogModules( """Only read the first `n` values of the set.""" @@ -1128,6 +1157,35 @@ type Query { orderBy: [NamespaceModuleOrderBy!] = [PRIMARY_KEY_ASC] ): NamespaceModuleConnection + """Reads and enables pagination through a set of `ResourceModule`.""" + resourceModules( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ResourceModuleFilter + + """The method to use when ordering `ResourceModule`.""" + orderBy: [ResourceModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): ResourceModuleConnection + """Reads and enables pagination through a set of `StorageLogModule`.""" storageLogModules( """Only read the first `n` values of the set.""" @@ -5611,196 +5669,226 @@ enum SecureTableProvisionOrderBy { OUT_FIELDS_DESC } -"""A connection to a list of `MerkleStoreModule` values.""" -type MerkleStoreModuleConnection { - """A list of `MerkleStoreModule` objects.""" - nodes: [MerkleStoreModule]! +"""A connection to a list of `DatabaseProvisionModule` values.""" +type DatabaseProvisionModuleConnection { + """A list of `DatabaseProvisionModule` objects.""" + nodes: [DatabaseProvisionModule]! """ - A list of edges which contains the `MerkleStoreModule` and cursor to aid in pagination. + A list of edges which contains the `DatabaseProvisionModule` and cursor to aid in pagination. """ - edges: [MerkleStoreModuleEdge]! + edges: [DatabaseProvisionModuleEdge]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `MerkleStoreModule` you could get from the connection. + The count of *all* `DatabaseProvisionModule` you could get from the connection. """ totalCount: Int! } -type MerkleStoreModule { +""" +Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. +""" +type DatabaseProvisionModule { id: UUID! - databaseId: UUID! - schemaId: UUID! - privateSchemaId: UUID! - publicSchemaName: String - privateSchemaName: String - objectTableId: UUID! - storeTableId: UUID! - commitTableId: UUID! - refTableId: UUID! - prefix: String! - apiName: String - privateApiName: String - scope: String! - functionPrefix: String - createdAt: Datetime! - - """Reads and enables pagination through a set of `GraphModule`.""" - graphModules( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int + """The name for the new database""" + databaseName: String! - """Read all values in the set before (above) this cursor.""" - before: Cursor + """UUID of the user who owns this database""" + ownerId: UUID! - """Read all values in the set after (below) this cursor.""" - after: Cursor + """ + Subdomain prefix for the database. If null, auto-generated using unique_names + random chars + """ + subdomain: String - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: GraphModuleFilter + """Base domain for the database (e.g., example.com)""" + domain: String! - """The method to use when ordering `GraphModule`.""" - orderBy: [GraphModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): GraphModuleConnection! -} + """ + JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) + """ + modules: JSON! -"""A connection to a list of `GraphModule` values.""" -type GraphModuleConnection { - """A list of `GraphModule` objects.""" - nodes: [GraphModule]! + """Additional configuration options for provisioning""" + options: JSON! """ - A list of edges which contains the `GraphModule` and cursor to aid in pagination. + When true, copies the owner user and password hash from source database to the newly provisioned database """ - edges: [GraphModuleEdge]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! + bootstrapUser: Boolean! - """The count of *all* `GraphModule` you could get from the connection.""" - totalCount: Int! -} + """Current status: pending, in_progress, completed, or failed""" + status: String! + errorMessage: String -type GraphModule { - id: UUID! - databaseId: UUID! - publicSchemaId: UUID! - privateSchemaId: UUID! - publicSchemaName: String - privateSchemaName: String - scope: String! - prefix: String! - merkleStoreModuleId: UUID! - graphsTableId: UUID! - apiName: String - privateApiName: String - entityTableId: UUID - policies: JSON - provisions: JSON - defaultPermissions: [String] + """The ID of the provisioned database (set by trigger before RLS check)""" + databaseId: UUID createdAt: Datetime! - - """ - Reads a single `MerkleStoreModule` that is related to this `GraphModule`. - """ - merkleStoreModule: MerkleStoreModule + updatedAt: Datetime! + completedAt: Datetime } -"""A `GraphModule` edge in the connection.""" -type GraphModuleEdge { +"""A `DatabaseProvisionModule` edge in the connection.""" +type DatabaseProvisionModuleEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `GraphModule` at the end of the edge.""" - node: GraphModule + """The `DatabaseProvisionModule` at the end of the edge.""" + node: DatabaseProvisionModule } """ -A filter to be used against `GraphModule` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ """ -input GraphModuleFilter { +input DatabaseProvisionModuleFilter { """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `databaseId` field.""" - databaseId: UUIDFilter + """Filter by the object’s `databaseName` field.""" + databaseName: StringFilter - """Filter by the object’s `publicSchemaId` field.""" - publicSchemaId: UUIDFilter + """Filter by the object’s `ownerId` field.""" + ownerId: UUIDFilter - """Filter by the object’s `privateSchemaId` field.""" - privateSchemaId: UUIDFilter + """Filter by the object’s `subdomain` field.""" + subdomain: StringFilter - """Filter by the object’s `publicSchemaName` field.""" - publicSchemaName: StringFilter + """Filter by the object’s `domain` field.""" + domain: StringFilter - """Filter by the object’s `privateSchemaName` field.""" - privateSchemaName: StringFilter + """Filter by the object’s `modules` field.""" + modules: JSONFilter - """Filter by the object’s `scope` field.""" - scope: StringFilter + """Filter by the object’s `options` field.""" + options: JSONFilter - """Filter by the object’s `prefix` field.""" - prefix: StringFilter + """Filter by the object’s `bootstrapUser` field.""" + bootstrapUser: BooleanFilter - """Filter by the object’s `merkleStoreModuleId` field.""" - merkleStoreModuleId: UUIDFilter - - """Filter by the object’s `graphsTableId` field.""" - graphsTableId: UUIDFilter - - """Filter by the object’s `apiName` field.""" - apiName: StringFilter - - """Filter by the object’s `privateApiName` field.""" - privateApiName: StringFilter - - """Filter by the object’s `entityTableId` field.""" - entityTableId: UUIDFilter - - """Filter by the object’s `policies` field.""" - policies: JSONFilter + """Filter by the object’s `status` field.""" + status: StringFilter - """Filter by the object’s `provisions` field.""" - provisions: JSONFilter + """Filter by the object’s `errorMessage` field.""" + errorMessage: StringFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `completedAt` field.""" + completedAt: DatetimeFilter + """Checks for all expressions in this list.""" - and: [GraphModuleFilter!] + and: [DatabaseProvisionModuleFilter!] """Checks for any expressions in this list.""" - or: [GraphModuleFilter!] + or: [DatabaseProvisionModuleFilter!] """Negates the expression.""" - not: GraphModuleFilter + not: DatabaseProvisionModuleFilter +} - """Filter by the object’s `merkleStoreModule` relation.""" - merkleStoreModule: MerkleStoreModuleFilter +"""Methods to use when ordering `DatabaseProvisionModule`.""" +enum DatabaseProvisionModuleOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + DATABASE_NAME_ASC + DATABASE_NAME_DESC + OWNER_ID_ASC + OWNER_ID_DESC + SUBDOMAIN_ASC + SUBDOMAIN_DESC + DOMAIN_ASC + DOMAIN_DESC + MODULES_ASC + MODULES_DESC + OPTIONS_ASC + OPTIONS_DESC + BOOTSTRAP_USER_ASC + BOOTSTRAP_USER_DESC + STATUS_ASC + STATUS_DESC + ERROR_MESSAGE_ASC + ERROR_MESSAGE_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + COMPLETED_AT_ASC + COMPLETED_AT_DESC +} + +"""A connection to a list of `ConfigSecretsModule` values.""" +type ConfigSecretsModuleConnection { + """A list of `ConfigSecretsModule` objects.""" + nodes: [ConfigSecretsModule]! + + """ + A list of edges which contains the `ConfigSecretsModule` and cursor to aid in pagination. + """ + edges: [ConfigSecretsModuleEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `ConfigSecretsModule` you could get from the connection. + """ + totalCount: Int! } """ -A filter to be used against `MerkleStoreModule` object types. All fields are combined with a logical ‘and.’ +Entity-aware PGP-encrypted key-value config/secrets module. Supports app-level (admin-only) + and org-scoped (per-org secrets with manage_secrets permission) via the scope column. + User-scoped bcrypt credentials are handled by user_credentials_module. """ -input MerkleStoreModuleFilter { +type ConfigSecretsModule { + id: UUID! + databaseId: UUID! + schemaId: UUID! + privateSchemaId: UUID! + publicSchemaName: String + privateSchemaName: String + tableId: UUID! + configDefinitionsTableId: UUID + tableName: String! + apiName: String + privateApiName: String + scope: String! + prefix: String! + entityTableId: UUID + policies: JSON + provisions: JSON + hasConfig: Boolean! +} + +"""A `ConfigSecretsModule` edge in the connection.""" +type ConfigSecretsModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `ConfigSecretsModule` at the end of the edge.""" + node: ConfigSecretsModule +} + +""" +A filter to be used against `ConfigSecretsModule` object types. All fields are combined with a logical ‘and.’ +""" +input ConfigSecretsModuleFilter { """Filter by the object’s `id` field.""" id: UUIDFilter @@ -5819,20 +5907,14 @@ input MerkleStoreModuleFilter { """Filter by the object’s `privateSchemaName` field.""" privateSchemaName: StringFilter - """Filter by the object’s `objectTableId` field.""" - objectTableId: UUIDFilter - - """Filter by the object’s `storeTableId` field.""" - storeTableId: UUIDFilter - - """Filter by the object’s `commitTableId` field.""" - commitTableId: UUIDFilter + """Filter by the object’s `tableId` field.""" + tableId: UUIDFilter - """Filter by the object’s `refTableId` field.""" - refTableId: UUIDFilter + """Filter by the object’s `configDefinitionsTableId` field.""" + configDefinitionsTableId: UUIDFilter - """Filter by the object’s `prefix` field.""" - prefix: StringFilter + """Filter by the object’s `tableName` field.""" + tableName: StringFilter """Filter by the object’s `apiName` field.""" apiName: StringFilter @@ -5843,44 +5925,33 @@ input MerkleStoreModuleFilter { """Filter by the object’s `scope` field.""" scope: StringFilter - """Filter by the object’s `functionPrefix` field.""" - functionPrefix: StringFilter - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Checks for all expressions in this list.""" - and: [MerkleStoreModuleFilter!] + """Filter by the object’s `prefix` field.""" + prefix: StringFilter - """Checks for any expressions in this list.""" - or: [MerkleStoreModuleFilter!] + """Filter by the object’s `entityTableId` field.""" + entityTableId: UUIDFilter - """Negates the expression.""" - not: MerkleStoreModuleFilter + """Filter by the object’s `policies` field.""" + policies: JSONFilter - """Filter by the object’s `graphModules` relation.""" - graphModules: MerkleStoreModuleToManyGraphModuleFilter + """Filter by the object’s `provisions` field.""" + provisions: JSONFilter - """`graphModules` exist.""" - graphModulesExist: Boolean -} + """Filter by the object’s `hasConfig` field.""" + hasConfig: BooleanFilter -""" -A filter to be used against many `GraphModule` object types. All fields are combined with a logical ‘and.’ -""" -input MerkleStoreModuleToManyGraphModuleFilter { - """Filters to entities where at least one related entity matches.""" - some: GraphModuleFilter + """Checks for all expressions in this list.""" + and: [ConfigSecretsModuleFilter!] - """Filters to entities where every related entity matches.""" - every: GraphModuleFilter + """Checks for any expressions in this list.""" + or: [ConfigSecretsModuleFilter!] - """Filters to entities where no related entity matches.""" - none: GraphModuleFilter + """Negates the expression.""" + not: ConfigSecretsModuleFilter } -"""Methods to use when ordering `GraphModule`.""" -enum GraphModuleOrderBy { +"""Methods to use when ordering `ConfigSecretsModule`.""" +enum ConfigSecretsModuleOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC @@ -5888,369 +5959,362 @@ enum GraphModuleOrderBy { ID_DESC DATABASE_ID_ASC DATABASE_ID_DESC - PUBLIC_SCHEMA_ID_ASC - PUBLIC_SCHEMA_ID_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC PRIVATE_SCHEMA_ID_ASC PRIVATE_SCHEMA_ID_DESC PUBLIC_SCHEMA_NAME_ASC PUBLIC_SCHEMA_NAME_DESC PRIVATE_SCHEMA_NAME_ASC PRIVATE_SCHEMA_NAME_DESC - SCOPE_ASC - SCOPE_DESC - PREFIX_ASC - PREFIX_DESC - MERKLE_STORE_MODULE_ID_ASC - MERKLE_STORE_MODULE_ID_DESC - GRAPHS_TABLE_ID_ASC - GRAPHS_TABLE_ID_DESC + TABLE_ID_ASC + TABLE_ID_DESC + CONFIG_DEFINITIONS_TABLE_ID_ASC + CONFIG_DEFINITIONS_TABLE_ID_DESC + TABLE_NAME_ASC + TABLE_NAME_DESC API_NAME_ASC API_NAME_DESC PRIVATE_API_NAME_ASC PRIVATE_API_NAME_DESC + SCOPE_ASC + SCOPE_DESC + PREFIX_ASC + PREFIX_DESC ENTITY_TABLE_ID_ASC ENTITY_TABLE_ID_DESC POLICIES_ASC POLICIES_DESC PROVISIONS_ASC PROVISIONS_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC - CREATED_AT_ASC - CREATED_AT_DESC + HAS_CONFIG_ASC + HAS_CONFIG_DESC } -"""A `MerkleStoreModule` edge in the connection.""" -type MerkleStoreModuleEdge { - """A cursor for use in pagination.""" - cursor: Cursor +"""A connection to a list of `GraphModule` values.""" +type GraphModuleConnection { + """A list of `GraphModule` objects.""" + nodes: [GraphModule]! - """The `MerkleStoreModule` at the end of the edge.""" - node: MerkleStoreModule + """ + A list of edges which contains the `GraphModule` and cursor to aid in pagination. + """ + edges: [GraphModuleEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `GraphModule` you could get from the connection.""" + totalCount: Int! } -"""Methods to use when ordering `MerkleStoreModule`.""" -enum MerkleStoreModuleOrderBy { - NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - ID_ASC - ID_DESC - DATABASE_ID_ASC - DATABASE_ID_DESC - SCHEMA_ID_ASC - SCHEMA_ID_DESC - PRIVATE_SCHEMA_ID_ASC - PRIVATE_SCHEMA_ID_DESC - PUBLIC_SCHEMA_NAME_ASC - PUBLIC_SCHEMA_NAME_DESC - PRIVATE_SCHEMA_NAME_ASC - PRIVATE_SCHEMA_NAME_DESC - OBJECT_TABLE_ID_ASC - OBJECT_TABLE_ID_DESC - STORE_TABLE_ID_ASC - STORE_TABLE_ID_DESC - COMMIT_TABLE_ID_ASC - COMMIT_TABLE_ID_DESC - REF_TABLE_ID_ASC - REF_TABLE_ID_DESC - PREFIX_ASC - PREFIX_DESC - API_NAME_ASC - API_NAME_DESC - PRIVATE_API_NAME_ASC - PRIVATE_API_NAME_DESC - SCOPE_ASC - SCOPE_DESC - FUNCTION_PREFIX_ASC - FUNCTION_PREFIX_DESC - CREATED_AT_ASC - CREATED_AT_DESC -} - -"""A connection to a list of `DatabaseProvisionModule` values.""" -type DatabaseProvisionModuleConnection { - """A list of `DatabaseProvisionModule` objects.""" - nodes: [DatabaseProvisionModule]! +type GraphModule { + id: UUID! + databaseId: UUID! + publicSchemaId: UUID! + privateSchemaId: UUID! + publicSchemaName: String + privateSchemaName: String + scope: String! + prefix: String! + merkleStoreModuleId: UUID! + graphsTableId: UUID! + apiName: String + privateApiName: String + entityTableId: UUID + policies: JSON + provisions: JSON + defaultPermissions: [String] + createdAt: Datetime! """ - A list of edges which contains the `DatabaseProvisionModule` and cursor to aid in pagination. + Reads a single `MerkleStoreModule` that is related to this `GraphModule`. """ - edges: [DatabaseProvisionModuleEdge]! + merkleStoreModule: MerkleStoreModule +} - """Information to aid in pagination.""" - pageInfo: PageInfo! +type MerkleStoreModule { + id: UUID! + databaseId: UUID! + schemaId: UUID! + privateSchemaId: UUID! + publicSchemaName: String + privateSchemaName: String + objectTableId: UUID! + storeTableId: UUID! + commitTableId: UUID! + refTableId: UUID! + prefix: String! + apiName: String + privateApiName: String + scope: String! + functionPrefix: String + permissionKey: String + createdAt: Datetime! - """ - The count of *all* `DatabaseProvisionModule` you could get from the connection. - """ - totalCount: Int! + """Reads and enables pagination through a set of `GraphModule`.""" + graphModules( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: GraphModuleFilter + + """The method to use when ordering `GraphModule`.""" + orderBy: [GraphModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): GraphModuleConnection! } """ -Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. +A filter to be used against `GraphModule` object types. All fields are combined with a logical ‘and.’ """ -type DatabaseProvisionModule { - id: UUID! +input GraphModuleFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter - """The name for the new database""" - databaseName: String! + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter - """UUID of the user who owns this database""" - ownerId: UUID! + """Filter by the object’s `publicSchemaId` field.""" + publicSchemaId: UUIDFilter - """ - Subdomain prefix for the database. If null, auto-generated using unique_names + random chars - """ - subdomain: String + """Filter by the object’s `privateSchemaId` field.""" + privateSchemaId: UUIDFilter - """Base domain for the database (e.g., example.com)""" - domain: String! + """Filter by the object’s `publicSchemaName` field.""" + publicSchemaName: StringFilter - """ - JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) - """ - modules: JSON! + """Filter by the object’s `privateSchemaName` field.""" + privateSchemaName: StringFilter - """Additional configuration options for provisioning""" - options: JSON! + """Filter by the object’s `scope` field.""" + scope: StringFilter - """ - When true, copies the owner user and password hash from source database to the newly provisioned database - """ - bootstrapUser: Boolean! + """Filter by the object’s `prefix` field.""" + prefix: StringFilter - """Current status: pending, in_progress, completed, or failed""" - status: String! - errorMessage: String + """Filter by the object’s `merkleStoreModuleId` field.""" + merkleStoreModuleId: UUIDFilter - """The ID of the provisioned database (set by trigger before RLS check)""" - databaseId: UUID - createdAt: Datetime! - updatedAt: Datetime! - completedAt: Datetime -} + """Filter by the object’s `graphsTableId` field.""" + graphsTableId: UUIDFilter -"""A `DatabaseProvisionModule` edge in the connection.""" -type DatabaseProvisionModuleEdge { - """A cursor for use in pagination.""" - cursor: Cursor + """Filter by the object’s `apiName` field.""" + apiName: StringFilter - """The `DatabaseProvisionModule` at the end of the edge.""" - node: DatabaseProvisionModule + """Filter by the object’s `privateApiName` field.""" + privateApiName: StringFilter + + """Filter by the object’s `entityTableId` field.""" + entityTableId: UUIDFilter + + """Filter by the object’s `policies` field.""" + policies: JSONFilter + + """Filter by the object’s `provisions` field.""" + provisions: JSONFilter + + """Filter by the object’s `defaultPermissions` field.""" + defaultPermissions: StringListFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Checks for all expressions in this list.""" + and: [GraphModuleFilter!] + + """Checks for any expressions in this list.""" + or: [GraphModuleFilter!] + + """Negates the expression.""" + not: GraphModuleFilter + + """Filter by the object’s `merkleStoreModule` relation.""" + merkleStoreModule: MerkleStoreModuleFilter } """ -A filter to be used against `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `MerkleStoreModule` object types. All fields are combined with a logical ‘and.’ """ -input DatabaseProvisionModuleFilter { +input MerkleStoreModuleFilter { """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `databaseName` field.""" - databaseName: StringFilter + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter - """Filter by the object’s `ownerId` field.""" - ownerId: UUIDFilter + """Filter by the object’s `schemaId` field.""" + schemaId: UUIDFilter - """Filter by the object’s `subdomain` field.""" - subdomain: StringFilter + """Filter by the object’s `privateSchemaId` field.""" + privateSchemaId: UUIDFilter - """Filter by the object’s `domain` field.""" - domain: StringFilter + """Filter by the object’s `publicSchemaName` field.""" + publicSchemaName: StringFilter - """Filter by the object’s `modules` field.""" - modules: JSONFilter + """Filter by the object’s `privateSchemaName` field.""" + privateSchemaName: StringFilter - """Filter by the object’s `options` field.""" - options: JSONFilter + """Filter by the object’s `objectTableId` field.""" + objectTableId: UUIDFilter - """Filter by the object’s `bootstrapUser` field.""" - bootstrapUser: BooleanFilter + """Filter by the object’s `storeTableId` field.""" + storeTableId: UUIDFilter - """Filter by the object’s `status` field.""" - status: StringFilter + """Filter by the object’s `commitTableId` field.""" + commitTableId: UUIDFilter - """Filter by the object’s `errorMessage` field.""" - errorMessage: StringFilter + """Filter by the object’s `refTableId` field.""" + refTableId: UUIDFilter - """Filter by the object’s `databaseId` field.""" - databaseId: UUIDFilter + """Filter by the object’s `prefix` field.""" + prefix: StringFilter - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter + """Filter by the object’s `apiName` field.""" + apiName: StringFilter - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter + """Filter by the object’s `privateApiName` field.""" + privateApiName: StringFilter - """Filter by the object’s `completedAt` field.""" - completedAt: DatetimeFilter + """Filter by the object’s `scope` field.""" + scope: StringFilter + + """Filter by the object’s `functionPrefix` field.""" + functionPrefix: StringFilter + + """Filter by the object’s `permissionKey` field.""" + permissionKey: StringFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter """Checks for all expressions in this list.""" - and: [DatabaseProvisionModuleFilter!] + and: [MerkleStoreModuleFilter!] """Checks for any expressions in this list.""" - or: [DatabaseProvisionModuleFilter!] + or: [MerkleStoreModuleFilter!] """Negates the expression.""" - not: DatabaseProvisionModuleFilter + not: MerkleStoreModuleFilter + + """Filter by the object’s `graphModules` relation.""" + graphModules: MerkleStoreModuleToManyGraphModuleFilter + + """`graphModules` exist.""" + graphModulesExist: Boolean } -"""Methods to use when ordering `DatabaseProvisionModule`.""" -enum DatabaseProvisionModuleOrderBy { +""" +A filter to be used against many `GraphModule` object types. All fields are combined with a logical ‘and.’ +""" +input MerkleStoreModuleToManyGraphModuleFilter { + """Filters to entities where at least one related entity matches.""" + some: GraphModuleFilter + + """Filters to entities where every related entity matches.""" + every: GraphModuleFilter + + """Filters to entities where no related entity matches.""" + none: GraphModuleFilter +} + +"""Methods to use when ordering `GraphModule`.""" +enum GraphModuleOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC ID_ASC ID_DESC - DATABASE_NAME_ASC - DATABASE_NAME_DESC - OWNER_ID_ASC - OWNER_ID_DESC - SUBDOMAIN_ASC - SUBDOMAIN_DESC - DOMAIN_ASC - DOMAIN_DESC - MODULES_ASC - MODULES_DESC - OPTIONS_ASC - OPTIONS_DESC - BOOTSTRAP_USER_ASC - BOOTSTRAP_USER_DESC - STATUS_ASC - STATUS_DESC - ERROR_MESSAGE_ASC - ERROR_MESSAGE_DESC DATABASE_ID_ASC DATABASE_ID_DESC + PUBLIC_SCHEMA_ID_ASC + PUBLIC_SCHEMA_ID_DESC + PRIVATE_SCHEMA_ID_ASC + PRIVATE_SCHEMA_ID_DESC + PUBLIC_SCHEMA_NAME_ASC + PUBLIC_SCHEMA_NAME_DESC + PRIVATE_SCHEMA_NAME_ASC + PRIVATE_SCHEMA_NAME_DESC + SCOPE_ASC + SCOPE_DESC + PREFIX_ASC + PREFIX_DESC + MERKLE_STORE_MODULE_ID_ASC + MERKLE_STORE_MODULE_ID_DESC + GRAPHS_TABLE_ID_ASC + GRAPHS_TABLE_ID_DESC + API_NAME_ASC + API_NAME_DESC + PRIVATE_API_NAME_ASC + PRIVATE_API_NAME_DESC + ENTITY_TABLE_ID_ASC + ENTITY_TABLE_ID_DESC + POLICIES_ASC + POLICIES_DESC + PROVISIONS_ASC + PROVISIONS_DESC + DEFAULT_PERMISSIONS_ASC + DEFAULT_PERMISSIONS_DESC CREATED_AT_ASC - CREATED_AT_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC - COMPLETED_AT_ASC - COMPLETED_AT_DESC -} - -"""A connection to a list of `ConfigSecretsModule` values.""" -type ConfigSecretsModuleConnection { - """A list of `ConfigSecretsModule` objects.""" - nodes: [ConfigSecretsModule]! - - """ - A list of edges which contains the `ConfigSecretsModule` and cursor to aid in pagination. - """ - edges: [ConfigSecretsModuleEdge]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """ - The count of *all* `ConfigSecretsModule` you could get from the connection. - """ - totalCount: Int! -} - -""" -Entity-aware PGP-encrypted key-value config/secrets module. Supports app-level (admin-only) - and org-scoped (per-org secrets with manage_secrets permission) via the scope column. - User-scoped bcrypt credentials are handled by user_credentials_module. -""" -type ConfigSecretsModule { - id: UUID! - databaseId: UUID! - schemaId: UUID! - privateSchemaId: UUID! - publicSchemaName: String - privateSchemaName: String - tableId: UUID! - configDefinitionsTableId: UUID - tableName: String! - apiName: String - privateApiName: String - scope: String! - prefix: String! - entityTableId: UUID - policies: JSON - provisions: JSON - hasConfig: Boolean! + CREATED_AT_DESC } -"""A `ConfigSecretsModule` edge in the connection.""" -type ConfigSecretsModuleEdge { +"""A `GraphModule` edge in the connection.""" +type GraphModuleEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `ConfigSecretsModule` at the end of the edge.""" - node: ConfigSecretsModule + """The `GraphModule` at the end of the edge.""" + node: GraphModule } -""" -A filter to be used against `ConfigSecretsModule` object types. All fields are combined with a logical ‘and.’ -""" -input ConfigSecretsModuleFilter { - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `databaseId` field.""" - databaseId: UUIDFilter - - """Filter by the object’s `schemaId` field.""" - schemaId: UUIDFilter - - """Filter by the object’s `privateSchemaId` field.""" - privateSchemaId: UUIDFilter - - """Filter by the object’s `publicSchemaName` field.""" - publicSchemaName: StringFilter - - """Filter by the object’s `privateSchemaName` field.""" - privateSchemaName: StringFilter - - """Filter by the object’s `tableId` field.""" - tableId: UUIDFilter - - """Filter by the object’s `configDefinitionsTableId` field.""" - configDefinitionsTableId: UUIDFilter - - """Filter by the object’s `tableName` field.""" - tableName: StringFilter - - """Filter by the object’s `apiName` field.""" - apiName: StringFilter - - """Filter by the object’s `privateApiName` field.""" - privateApiName: StringFilter - - """Filter by the object’s `scope` field.""" - scope: StringFilter - - """Filter by the object’s `prefix` field.""" - prefix: StringFilter - - """Filter by the object’s `entityTableId` field.""" - entityTableId: UUIDFilter - - """Filter by the object’s `policies` field.""" - policies: JSONFilter +"""A connection to a list of `MerkleStoreModule` values.""" +type MerkleStoreModuleConnection { + """A list of `MerkleStoreModule` objects.""" + nodes: [MerkleStoreModule]! - """Filter by the object’s `provisions` field.""" - provisions: JSONFilter + """ + A list of edges which contains the `MerkleStoreModule` and cursor to aid in pagination. + """ + edges: [MerkleStoreModuleEdge]! - """Filter by the object’s `hasConfig` field.""" - hasConfig: BooleanFilter + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Checks for all expressions in this list.""" - and: [ConfigSecretsModuleFilter!] + """ + The count of *all* `MerkleStoreModule` you could get from the connection. + """ + totalCount: Int! +} - """Checks for any expressions in this list.""" - or: [ConfigSecretsModuleFilter!] +"""A `MerkleStoreModule` edge in the connection.""" +type MerkleStoreModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Negates the expression.""" - not: ConfigSecretsModuleFilter + """The `MerkleStoreModule` at the end of the edge.""" + node: MerkleStoreModule } -"""Methods to use when ordering `ConfigSecretsModule`.""" -enum ConfigSecretsModuleOrderBy { +"""Methods to use when ordering `MerkleStoreModule`.""" +enum MerkleStoreModuleOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC @@ -6266,28 +6330,28 @@ enum ConfigSecretsModuleOrderBy { PUBLIC_SCHEMA_NAME_DESC PRIVATE_SCHEMA_NAME_ASC PRIVATE_SCHEMA_NAME_DESC - TABLE_ID_ASC - TABLE_ID_DESC - CONFIG_DEFINITIONS_TABLE_ID_ASC - CONFIG_DEFINITIONS_TABLE_ID_DESC - TABLE_NAME_ASC - TABLE_NAME_DESC + OBJECT_TABLE_ID_ASC + OBJECT_TABLE_ID_DESC + STORE_TABLE_ID_ASC + STORE_TABLE_ID_DESC + COMMIT_TABLE_ID_ASC + COMMIT_TABLE_ID_DESC + REF_TABLE_ID_ASC + REF_TABLE_ID_DESC + PREFIX_ASC + PREFIX_DESC API_NAME_ASC API_NAME_DESC PRIVATE_API_NAME_ASC PRIVATE_API_NAME_DESC SCOPE_ASC SCOPE_DESC - PREFIX_ASC - PREFIX_DESC - ENTITY_TABLE_ID_ASC - ENTITY_TABLE_ID_DESC - POLICIES_ASC - POLICIES_DESC - PROVISIONS_ASC - PROVISIONS_DESC - HAS_CONFIG_ASC - HAS_CONFIG_DESC + FUNCTION_PREFIX_ASC + FUNCTION_PREFIX_DESC + PERMISSION_KEY_ASC + PERMISSION_KEY_DESC + CREATED_AT_ASC + CREATED_AT_DESC } """A connection to a list of `RateLimitMetersModule` values.""" @@ -7119,48 +7183,211 @@ input InvitesModuleFilter { """Filter by the object’s `usersTableId` field.""" usersTableId: UUIDFilter - """Filter by the object’s `invitesTableId` field.""" - invitesTableId: UUIDFilter + """Filter by the object’s `invitesTableId` field.""" + invitesTableId: UUIDFilter + + """Filter by the object’s `claimedInvitesTableId` field.""" + claimedInvitesTableId: UUIDFilter + + """Filter by the object’s `invitesTableName` field.""" + invitesTableName: StringFilter + + """Filter by the object’s `claimedInvitesTableName` field.""" + claimedInvitesTableName: StringFilter + + """Filter by the object’s `submitInviteCodeFunction` field.""" + submitInviteCodeFunction: StringFilter + + """Filter by the object’s `scope` field.""" + scope: StringFilter + + """Filter by the object’s `prefix` field.""" + prefix: StringFilter + + """Filter by the object’s `entityTableId` field.""" + entityTableId: UUIDFilter + + """Filter by the object’s `apiName` field.""" + apiName: StringFilter + + """Filter by the object’s `privateApiName` field.""" + privateApiName: StringFilter + + """Checks for all expressions in this list.""" + and: [InvitesModuleFilter!] + + """Checks for any expressions in this list.""" + or: [InvitesModuleFilter!] + + """Negates the expression.""" + not: InvitesModuleFilter +} + +"""Methods to use when ordering `InvitesModule`.""" +enum InvitesModuleOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC + PRIVATE_SCHEMA_ID_ASC + PRIVATE_SCHEMA_ID_DESC + PUBLIC_SCHEMA_NAME_ASC + PUBLIC_SCHEMA_NAME_DESC + PRIVATE_SCHEMA_NAME_ASC + PRIVATE_SCHEMA_NAME_DESC + EMAILS_TABLE_ID_ASC + EMAILS_TABLE_ID_DESC + USERS_TABLE_ID_ASC + USERS_TABLE_ID_DESC + INVITES_TABLE_ID_ASC + INVITES_TABLE_ID_DESC + CLAIMED_INVITES_TABLE_ID_ASC + CLAIMED_INVITES_TABLE_ID_DESC + INVITES_TABLE_NAME_ASC + INVITES_TABLE_NAME_DESC + CLAIMED_INVITES_TABLE_NAME_ASC + CLAIMED_INVITES_TABLE_NAME_DESC + SUBMIT_INVITE_CODE_FUNCTION_ASC + SUBMIT_INVITE_CODE_FUNCTION_DESC + SCOPE_ASC + SCOPE_DESC + PREFIX_ASC + PREFIX_DESC + ENTITY_TABLE_ID_ASC + ENTITY_TABLE_ID_DESC + API_NAME_ASC + API_NAME_DESC + PRIVATE_API_NAME_ASC + PRIVATE_API_NAME_DESC +} + +"""A connection to a list of `PrincipalAuthModule` values.""" +type PrincipalAuthModuleConnection { + """A list of `PrincipalAuthModule` objects.""" + nodes: [PrincipalAuthModule]! + + """ + A list of edges which contains the `PrincipalAuthModule` and cursor to aid in pagination. + """ + edges: [PrincipalAuthModuleEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `PrincipalAuthModule` you could get from the connection. + """ + totalCount: Int! +} + +""" +Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. +""" +type PrincipalAuthModule { + id: UUID! + databaseId: UUID! + schemaId: UUID! + principalsTableId: UUID! + principalEntitiesTableId: UUID! + principalScopeOverridesTableId: UUID! + usersTableId: UUID! + sessionsTableId: UUID! + sessionCredentialsTableId: UUID! + auditsTableId: UUID! + principalsTableName: String! + createPrincipalFunction: String! + deletePrincipalFunction: String! + createOrgPrincipalFunction: String! + deleteOrgPrincipalFunction: String! + createOrgApiKeyFunction: String! + revokeOrgApiKeyFunction: String! + apiName: String +} + +"""A `PrincipalAuthModule` edge in the connection.""" +type PrincipalAuthModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PrincipalAuthModule` at the end of the edge.""" + node: PrincipalAuthModule +} + +""" +A filter to be used against `PrincipalAuthModule` object types. All fields are combined with a logical ‘and.’ +""" +input PrincipalAuthModuleFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `schemaId` field.""" + schemaId: UUIDFilter + + """Filter by the object’s `principalsTableId` field.""" + principalsTableId: UUIDFilter + + """Filter by the object’s `principalEntitiesTableId` field.""" + principalEntitiesTableId: UUIDFilter + + """Filter by the object’s `principalScopeOverridesTableId` field.""" + principalScopeOverridesTableId: UUIDFilter + + """Filter by the object’s `usersTableId` field.""" + usersTableId: UUIDFilter + + """Filter by the object’s `sessionsTableId` field.""" + sessionsTableId: UUIDFilter + + """Filter by the object’s `sessionCredentialsTableId` field.""" + sessionCredentialsTableId: UUIDFilter + + """Filter by the object’s `auditsTableId` field.""" + auditsTableId: UUIDFilter - """Filter by the object’s `claimedInvitesTableId` field.""" - claimedInvitesTableId: UUIDFilter + """Filter by the object’s `principalsTableName` field.""" + principalsTableName: StringFilter - """Filter by the object’s `invitesTableName` field.""" - invitesTableName: StringFilter + """Filter by the object’s `createPrincipalFunction` field.""" + createPrincipalFunction: StringFilter - """Filter by the object’s `claimedInvitesTableName` field.""" - claimedInvitesTableName: StringFilter + """Filter by the object’s `deletePrincipalFunction` field.""" + deletePrincipalFunction: StringFilter - """Filter by the object’s `submitInviteCodeFunction` field.""" - submitInviteCodeFunction: StringFilter + """Filter by the object’s `createOrgPrincipalFunction` field.""" + createOrgPrincipalFunction: StringFilter - """Filter by the object’s `scope` field.""" - scope: StringFilter + """Filter by the object’s `deleteOrgPrincipalFunction` field.""" + deleteOrgPrincipalFunction: StringFilter - """Filter by the object’s `prefix` field.""" - prefix: StringFilter + """Filter by the object’s `createOrgApiKeyFunction` field.""" + createOrgApiKeyFunction: StringFilter - """Filter by the object’s `entityTableId` field.""" - entityTableId: UUIDFilter + """Filter by the object’s `revokeOrgApiKeyFunction` field.""" + revokeOrgApiKeyFunction: StringFilter """Filter by the object’s `apiName` field.""" apiName: StringFilter - """Filter by the object’s `privateApiName` field.""" - privateApiName: StringFilter - """Checks for all expressions in this list.""" - and: [InvitesModuleFilter!] + and: [PrincipalAuthModuleFilter!] """Checks for any expressions in this list.""" - or: [InvitesModuleFilter!] + or: [PrincipalAuthModuleFilter!] """Negates the expression.""" - not: InvitesModuleFilter + not: PrincipalAuthModuleFilter } -"""Methods to use when ordering `InvitesModule`.""" -enum InvitesModuleOrderBy { +"""Methods to use when ordering `PrincipalAuthModule`.""" +enum PrincipalAuthModuleOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC @@ -7170,36 +7397,36 @@ enum InvitesModuleOrderBy { DATABASE_ID_DESC SCHEMA_ID_ASC SCHEMA_ID_DESC - PRIVATE_SCHEMA_ID_ASC - PRIVATE_SCHEMA_ID_DESC - PUBLIC_SCHEMA_NAME_ASC - PUBLIC_SCHEMA_NAME_DESC - PRIVATE_SCHEMA_NAME_ASC - PRIVATE_SCHEMA_NAME_DESC - EMAILS_TABLE_ID_ASC - EMAILS_TABLE_ID_DESC + PRINCIPALS_TABLE_ID_ASC + PRINCIPALS_TABLE_ID_DESC + PRINCIPAL_ENTITIES_TABLE_ID_ASC + PRINCIPAL_ENTITIES_TABLE_ID_DESC + PRINCIPAL_SCOPE_OVERRIDES_TABLE_ID_ASC + PRINCIPAL_SCOPE_OVERRIDES_TABLE_ID_DESC USERS_TABLE_ID_ASC USERS_TABLE_ID_DESC - INVITES_TABLE_ID_ASC - INVITES_TABLE_ID_DESC - CLAIMED_INVITES_TABLE_ID_ASC - CLAIMED_INVITES_TABLE_ID_DESC - INVITES_TABLE_NAME_ASC - INVITES_TABLE_NAME_DESC - CLAIMED_INVITES_TABLE_NAME_ASC - CLAIMED_INVITES_TABLE_NAME_DESC - SUBMIT_INVITE_CODE_FUNCTION_ASC - SUBMIT_INVITE_CODE_FUNCTION_DESC - SCOPE_ASC - SCOPE_DESC - PREFIX_ASC - PREFIX_DESC - ENTITY_TABLE_ID_ASC - ENTITY_TABLE_ID_DESC + SESSIONS_TABLE_ID_ASC + SESSIONS_TABLE_ID_DESC + SESSION_CREDENTIALS_TABLE_ID_ASC + SESSION_CREDENTIALS_TABLE_ID_DESC + AUDITS_TABLE_ID_ASC + AUDITS_TABLE_ID_DESC + PRINCIPALS_TABLE_NAME_ASC + PRINCIPALS_TABLE_NAME_DESC + CREATE_PRINCIPAL_FUNCTION_ASC + CREATE_PRINCIPAL_FUNCTION_DESC + DELETE_PRINCIPAL_FUNCTION_ASC + DELETE_PRINCIPAL_FUNCTION_DESC + CREATE_ORG_PRINCIPAL_FUNCTION_ASC + CREATE_ORG_PRINCIPAL_FUNCTION_DESC + DELETE_ORG_PRINCIPAL_FUNCTION_ASC + DELETE_ORG_PRINCIPAL_FUNCTION_DESC + CREATE_ORG_API_KEY_FUNCTION_ASC + CREATE_ORG_API_KEY_FUNCTION_DESC + REVOKE_ORG_API_KEY_FUNCTION_ASC + REVOKE_ORG_API_KEY_FUNCTION_DESC API_NAME_ASC API_NAME_DESC - PRIVATE_API_NAME_ASC - PRIVATE_API_NAME_DESC } """A connection to a list of `ComputeLogModule` values.""" @@ -7700,6 +7927,181 @@ enum NamespaceModuleOrderBy { DEFAULT_PERMISSIONS_DESC } +"""A connection to a list of `ResourceModule` values.""" +type ResourceModuleConnection { + """A list of `ResourceModule` objects.""" + nodes: [ResourceModule]! + + """ + A list of edges which contains the `ResourceModule` and cursor to aid in pagination. + """ + edges: [ResourceModuleEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `ResourceModule` you could get from the connection.""" + totalCount: Int! +} + +type ResourceModule { + id: UUID! + databaseId: UUID! + schemaId: UUID! + privateSchemaId: UUID! + publicSchemaName: String + privateSchemaName: String + resourcesTableId: UUID! + resourceEventsTableId: UUID! + resourcesTableName: String! + resourceEventsTableName: String! + apiName: String + privateApiName: String + scope: String! + prefix: String! + entityTableId: UUID + namespaceModuleId: UUID + policies: JSON + provisions: JSON + defaultPermissions: [String] + + """ + Reads a single `NamespaceModule` that is related to this `ResourceModule`. + """ + namespaceModule: NamespaceModule +} + +"""A `ResourceModule` edge in the connection.""" +type ResourceModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `ResourceModule` at the end of the edge.""" + node: ResourceModule +} + +""" +A filter to be used against `ResourceModule` object types. All fields are combined with a logical ‘and.’ +""" +input ResourceModuleFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `schemaId` field.""" + schemaId: UUIDFilter + + """Filter by the object’s `privateSchemaId` field.""" + privateSchemaId: UUIDFilter + + """Filter by the object’s `publicSchemaName` field.""" + publicSchemaName: StringFilter + + """Filter by the object’s `privateSchemaName` field.""" + privateSchemaName: StringFilter + + """Filter by the object’s `resourcesTableId` field.""" + resourcesTableId: UUIDFilter + + """Filter by the object’s `resourceEventsTableId` field.""" + resourceEventsTableId: UUIDFilter + + """Filter by the object’s `resourcesTableName` field.""" + resourcesTableName: StringFilter + + """Filter by the object’s `resourceEventsTableName` field.""" + resourceEventsTableName: StringFilter + + """Filter by the object’s `apiName` field.""" + apiName: StringFilter + + """Filter by the object’s `privateApiName` field.""" + privateApiName: StringFilter + + """Filter by the object’s `scope` field.""" + scope: StringFilter + + """Filter by the object’s `prefix` field.""" + prefix: StringFilter + + """Filter by the object’s `entityTableId` field.""" + entityTableId: UUIDFilter + + """Filter by the object’s `namespaceModuleId` field.""" + namespaceModuleId: UUIDFilter + + """Filter by the object’s `policies` field.""" + policies: JSONFilter + + """Filter by the object’s `provisions` field.""" + provisions: JSONFilter + + """Filter by the object’s `defaultPermissions` field.""" + defaultPermissions: StringListFilter + + """Checks for all expressions in this list.""" + and: [ResourceModuleFilter!] + + """Checks for any expressions in this list.""" + or: [ResourceModuleFilter!] + + """Negates the expression.""" + not: ResourceModuleFilter + + """Filter by the object’s `namespaceModule` relation.""" + namespaceModule: NamespaceModuleFilter + + """A related `namespaceModule` exists.""" + namespaceModuleExists: Boolean +} + +"""Methods to use when ordering `ResourceModule`.""" +enum ResourceModuleOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC + PRIVATE_SCHEMA_ID_ASC + PRIVATE_SCHEMA_ID_DESC + PUBLIC_SCHEMA_NAME_ASC + PUBLIC_SCHEMA_NAME_DESC + PRIVATE_SCHEMA_NAME_ASC + PRIVATE_SCHEMA_NAME_DESC + RESOURCES_TABLE_ID_ASC + RESOURCES_TABLE_ID_DESC + RESOURCE_EVENTS_TABLE_ID_ASC + RESOURCE_EVENTS_TABLE_ID_DESC + RESOURCES_TABLE_NAME_ASC + RESOURCES_TABLE_NAME_DESC + RESOURCE_EVENTS_TABLE_NAME_ASC + RESOURCE_EVENTS_TABLE_NAME_DESC + API_NAME_ASC + API_NAME_DESC + PRIVATE_API_NAME_ASC + PRIVATE_API_NAME_DESC + SCOPE_ASC + SCOPE_DESC + PREFIX_ASC + PREFIX_DESC + ENTITY_TABLE_ID_ASC + ENTITY_TABLE_ID_DESC + NAMESPACE_MODULE_ID_ASC + NAMESPACE_MODULE_ID_DESC + POLICIES_ASC + POLICIES_DESC + PROVISIONS_ASC + PROVISIONS_DESC + DEFAULT_PERMISSIONS_ASC + DEFAULT_PERMISSIONS_DESC +} + """A connection to a list of `StorageLogModule` values.""" type StorageLogModuleConnection { """A list of `StorageLogModule` objects.""" @@ -13034,14 +13436,6 @@ type Mutation { input: CreateSecureTableProvisionInput! ): CreateSecureTableProvisionPayload - """Creates a single `MerkleStoreModule`.""" - createMerkleStoreModule( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateMerkleStoreModuleInput! - ): CreateMerkleStoreModulePayload - """Creates a single `DatabaseProvisionModule`.""" createDatabaseProvisionModule( """ @@ -13066,6 +13460,14 @@ type Mutation { input: CreateGraphModuleInput! ): CreateGraphModulePayload + """Creates a single `MerkleStoreModule`.""" + createMerkleStoreModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateMerkleStoreModuleInput! + ): CreateMerkleStoreModulePayload + """Creates a single `RateLimitMetersModule`.""" createRateLimitMetersModule( """ @@ -13114,6 +13516,14 @@ type Mutation { input: CreateInvitesModuleInput! ): CreateInvitesModulePayload + """Creates a single `PrincipalAuthModule`.""" + createPrincipalAuthModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePrincipalAuthModuleInput! + ): CreatePrincipalAuthModulePayload + """Creates a single `ComputeLogModule`.""" createComputeLogModule( """ @@ -13138,6 +13548,14 @@ type Mutation { input: CreateNamespaceModuleInput! ): CreateNamespaceModulePayload + """Creates a single `ResourceModule`.""" + createResourceModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateResourceModuleInput! + ): CreateResourceModulePayload + """Creates a single `StorageLogModule`.""" createStorageLogModule( """ @@ -13530,14 +13948,6 @@ type Mutation { input: UpdateSecureTableProvisionInput! ): UpdateSecureTableProvisionPayload - """Updates a single `MerkleStoreModule` using a unique key and a patch.""" - updateMerkleStoreModule( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateMerkleStoreModuleInput! - ): UpdateMerkleStoreModulePayload - """ Updates a single `DatabaseProvisionModule` using a unique key and a patch. """ @@ -13564,6 +13974,14 @@ type Mutation { input: UpdateGraphModuleInput! ): UpdateGraphModulePayload + """Updates a single `MerkleStoreModule` using a unique key and a patch.""" + updateMerkleStoreModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateMerkleStoreModuleInput! + ): UpdateMerkleStoreModulePayload + """ Updates a single `RateLimitMetersModule` using a unique key and a patch. """ @@ -13616,6 +14034,14 @@ type Mutation { input: UpdateInvitesModuleInput! ): UpdateInvitesModulePayload + """Updates a single `PrincipalAuthModule` using a unique key and a patch.""" + updatePrincipalAuthModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePrincipalAuthModuleInput! + ): UpdatePrincipalAuthModulePayload + """Updates a single `ComputeLogModule` using a unique key and a patch.""" updateComputeLogModule( """ @@ -13640,6 +14066,14 @@ type Mutation { input: UpdateNamespaceModuleInput! ): UpdateNamespaceModulePayload + """Updates a single `ResourceModule` using a unique key and a patch.""" + updateResourceModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateResourceModuleInput! + ): UpdateResourceModulePayload + """Updates a single `StorageLogModule` using a unique key and a patch.""" updateStorageLogModule( """ @@ -14014,14 +14448,6 @@ type Mutation { input: DeleteSecureTableProvisionInput! ): DeleteSecureTableProvisionPayload - """Deletes a single `MerkleStoreModule` using a unique key.""" - deleteMerkleStoreModule( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteMerkleStoreModuleInput! - ): DeleteMerkleStoreModulePayload - """Deletes a single `DatabaseProvisionModule` using a unique key.""" deleteDatabaseProvisionModule( """ @@ -14046,6 +14472,14 @@ type Mutation { input: DeleteGraphModuleInput! ): DeleteGraphModulePayload + """Deletes a single `MerkleStoreModule` using a unique key.""" + deleteMerkleStoreModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteMerkleStoreModuleInput! + ): DeleteMerkleStoreModulePayload + """Deletes a single `RateLimitMetersModule` using a unique key.""" deleteRateLimitMetersModule( """ @@ -14094,6 +14528,14 @@ type Mutation { input: DeleteInvitesModuleInput! ): DeleteInvitesModulePayload + """Deletes a single `PrincipalAuthModule` using a unique key.""" + deletePrincipalAuthModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePrincipalAuthModuleInput! + ): DeletePrincipalAuthModulePayload + """Deletes a single `ComputeLogModule` using a unique key.""" deleteComputeLogModule( """ @@ -14118,6 +14560,14 @@ type Mutation { input: DeleteNamespaceModuleInput! ): DeleteNamespaceModulePayload + """Deletes a single `ResourceModule` using a unique key.""" + deleteResourceModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteResourceModuleInput! + ): DeleteResourceModulePayload + """Deletes a single `StorageLogModule` using a unique key.""" deleteStorageLogModule( """ @@ -15899,61 +16349,6 @@ input SecureTableProvisionInput { outFields: [UUID] } -"""The output of our create `MerkleStoreModule` mutation.""" -type CreateMerkleStoreModulePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `MerkleStoreModule` that was created by this mutation.""" - merkleStoreModule: MerkleStoreModule - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `MerkleStoreModule`. May be used by Relay 1.""" - merkleStoreModuleEdge( - """The method to use when ordering `MerkleStoreModule`.""" - orderBy: [MerkleStoreModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): MerkleStoreModuleEdge -} - -"""All input for the create `MerkleStoreModule` mutation.""" -input CreateMerkleStoreModuleInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `MerkleStoreModule` to be created by this mutation.""" - merkleStoreModule: MerkleStoreModuleInput! -} - -"""An input for mutations affecting `MerkleStoreModule`""" -input MerkleStoreModuleInput { - id: UUID - databaseId: UUID! - schemaId: UUID - privateSchemaId: UUID - publicSchemaName: String - privateSchemaName: String - objectTableId: UUID - storeTableId: UUID - commitTableId: UUID - refTableId: UUID - prefix: String - apiName: String - privateApiName: String - scope: String - functionPrefix: String - createdAt: Datetime -} - """The output of our create `DatabaseProvisionModule` mutation.""" type CreateDatabaseProvisionModulePayload { """ @@ -16143,6 +16538,62 @@ input GraphModuleInput { createdAt: Datetime } +"""The output of our create `MerkleStoreModule` mutation.""" +type CreateMerkleStoreModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `MerkleStoreModule` that was created by this mutation.""" + merkleStoreModule: MerkleStoreModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `MerkleStoreModule`. May be used by Relay 1.""" + merkleStoreModuleEdge( + """The method to use when ordering `MerkleStoreModule`.""" + orderBy: [MerkleStoreModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): MerkleStoreModuleEdge +} + +"""All input for the create `MerkleStoreModule` mutation.""" +input CreateMerkleStoreModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `MerkleStoreModule` to be created by this mutation.""" + merkleStoreModule: MerkleStoreModuleInput! +} + +"""An input for mutations affecting `MerkleStoreModule`""" +input MerkleStoreModuleInput { + id: UUID + databaseId: UUID! + schemaId: UUID + privateSchemaId: UUID + publicSchemaName: String + privateSchemaName: String + objectTableId: UUID + storeTableId: UUID + commitTableId: UUID + refTableId: UUID + prefix: String + apiName: String + privateApiName: String + scope: String + functionPrefix: String + permissionKey: String + createdAt: Datetime +} + """The output of our create `RateLimitMetersModule` mutation.""" type CreateRateLimitMetersModulePayload { """ @@ -16478,6 +16929,63 @@ input InvitesModuleInput { privateApiName: String } +"""The output of our create `PrincipalAuthModule` mutation.""" +type CreatePrincipalAuthModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `PrincipalAuthModule` that was created by this mutation.""" + principalAuthModule: PrincipalAuthModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `PrincipalAuthModule`. May be used by Relay 1.""" + principalAuthModuleEdge( + """The method to use when ordering `PrincipalAuthModule`.""" + orderBy: [PrincipalAuthModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): PrincipalAuthModuleEdge +} + +"""All input for the create `PrincipalAuthModule` mutation.""" +input CreatePrincipalAuthModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `PrincipalAuthModule` to be created by this mutation.""" + principalAuthModule: PrincipalAuthModuleInput! +} + +"""An input for mutations affecting `PrincipalAuthModule`""" +input PrincipalAuthModuleInput { + id: UUID + databaseId: UUID! + schemaId: UUID + principalsTableId: UUID + principalEntitiesTableId: UUID + principalScopeOverridesTableId: UUID + usersTableId: UUID + sessionsTableId: UUID + sessionCredentialsTableId: UUID + auditsTableId: UUID + principalsTableName: String + createPrincipalFunction: String + deletePrincipalFunction: String + createOrgPrincipalFunction: String + deleteOrgPrincipalFunction: String + createOrgApiKeyFunction: String + revokeOrgApiKeyFunction: String + apiName: String +} + """The output of our create `ComputeLogModule` mutation.""" type CreateComputeLogModulePayload { """ @@ -16652,6 +17160,64 @@ input NamespaceModuleInput { defaultPermissions: [String] } +"""The output of our create `ResourceModule` mutation.""" +type CreateResourceModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `ResourceModule` that was created by this mutation.""" + resourceModule: ResourceModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `ResourceModule`. May be used by Relay 1.""" + resourceModuleEdge( + """The method to use when ordering `ResourceModule`.""" + orderBy: [ResourceModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ResourceModuleEdge +} + +"""All input for the create `ResourceModule` mutation.""" +input CreateResourceModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `ResourceModule` to be created by this mutation.""" + resourceModule: ResourceModuleInput! +} + +"""An input for mutations affecting `ResourceModule`""" +input ResourceModuleInput { + id: UUID + databaseId: UUID! + schemaId: UUID + privateSchemaId: UUID + publicSchemaName: String + privateSchemaName: String + resourcesTableId: UUID + resourceEventsTableId: UUID + resourcesTableName: String + resourceEventsTableName: String + apiName: String + privateApiName: String + scope: String + prefix: String + entityTableId: UUID + namespaceModuleId: UUID + policies: JSON + provisions: JSON + defaultPermissions: [String] +} + """The output of our create `StorageLogModule` mutation.""" type CreateStorageLogModulePayload { """ @@ -19932,71 +20498,11 @@ input SecureTableProvisionPatch { Array of policy objects to create on the target table. Each element is a jsonb object with keys: "$type" (text, required — the Authz* policy generator type, e.g. AuthzEntityMembership, AuthzMembership, AuthzDirectOwner, AuthzPublishable, AuthzAllowAll), "data" (jsonb, optional — opaque configuration passed to metaschema.create_policy(), structure varies by type), "privileges" (text[], optional — privileges the policy applies to, e.g. ["select","insert"]; if omitted, derived from grants[] privilege verbs), "policy_role" (text, optional — role the policy targets; if omitted, falls back to first role in first grants[] entry, or 'authenticated' if no grants), "permissive" (boolean, optional — PERMISSIVE or RESTRICTIVE; defaults to true), "policy_name" (text, optional — custom suffix for the generated policy name; if omitted, auto-derived from $type by stripping Authz prefix). Supports multiple policies per row. Example: [{"$type": "AuthzEntityMembership", "data": {"entity_field": "owner_id", "membership_type": 3}, "privileges": ["select", "insert"]}, {"$type": "AuthzDirectOwner", "data": {"entity_field": "actor_id"}, "privileges": ["update", "delete"]}]. Defaults to '[]' (no policies created). When non-empty, the trigger automatically enables RLS. """ policies: JSON - - """ - Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. - """ - outFields: [UUID] -} - -"""The output of our update `MerkleStoreModule` mutation.""" -type UpdateMerkleStoreModulePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `MerkleStoreModule` that was updated by this mutation.""" - merkleStoreModule: MerkleStoreModule - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `MerkleStoreModule`. May be used by Relay 1.""" - merkleStoreModuleEdge( - """The method to use when ordering `MerkleStoreModule`.""" - orderBy: [MerkleStoreModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): MerkleStoreModuleEdge -} - -"""All input for the `updateMerkleStoreModule` mutation.""" -input UpdateMerkleStoreModuleInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `MerkleStoreModule` being updated. - """ - merkleStoreModulePatch: MerkleStoreModulePatch! -} - -""" -Represents an update to a `MerkleStoreModule`. Fields that are set will be updated. -""" -input MerkleStoreModulePatch { - id: UUID - databaseId: UUID - schemaId: UUID - privateSchemaId: UUID - publicSchemaName: String - privateSchemaName: String - objectTableId: UUID - storeTableId: UUID - commitTableId: UUID - refTableId: UUID - prefix: String - apiName: String - privateApiName: String - scope: String - functionPrefix: String - createdAt: Datetime + + """ + Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. + """ + outFields: [UUID] } """The output of our update `DatabaseProvisionModule` mutation.""" @@ -20203,6 +20709,67 @@ input GraphModulePatch { createdAt: Datetime } +"""The output of our update `MerkleStoreModule` mutation.""" +type UpdateMerkleStoreModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `MerkleStoreModule` that was updated by this mutation.""" + merkleStoreModule: MerkleStoreModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `MerkleStoreModule`. May be used by Relay 1.""" + merkleStoreModuleEdge( + """The method to use when ordering `MerkleStoreModule`.""" + orderBy: [MerkleStoreModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): MerkleStoreModuleEdge +} + +"""All input for the `updateMerkleStoreModule` mutation.""" +input UpdateMerkleStoreModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `MerkleStoreModule` being updated. + """ + merkleStoreModulePatch: MerkleStoreModulePatch! +} + +""" +Represents an update to a `MerkleStoreModule`. Fields that are set will be updated. +""" +input MerkleStoreModulePatch { + id: UUID + databaseId: UUID + schemaId: UUID + privateSchemaId: UUID + publicSchemaName: String + privateSchemaName: String + objectTableId: UUID + storeTableId: UUID + commitTableId: UUID + refTableId: UUID + prefix: String + apiName: String + privateApiName: String + scope: String + functionPrefix: String + permissionKey: String + createdAt: Datetime +} + """The output of our update `RateLimitMetersModule` mutation.""" type UpdateRateLimitMetersModulePayload { """ @@ -20568,6 +21135,68 @@ input InvitesModulePatch { privateApiName: String } +"""The output of our update `PrincipalAuthModule` mutation.""" +type UpdatePrincipalAuthModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `PrincipalAuthModule` that was updated by this mutation.""" + principalAuthModule: PrincipalAuthModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `PrincipalAuthModule`. May be used by Relay 1.""" + principalAuthModuleEdge( + """The method to use when ordering `PrincipalAuthModule`.""" + orderBy: [PrincipalAuthModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): PrincipalAuthModuleEdge +} + +"""All input for the `updatePrincipalAuthModule` mutation.""" +input UpdatePrincipalAuthModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `PrincipalAuthModule` being updated. + """ + principalAuthModulePatch: PrincipalAuthModulePatch! +} + +""" +Represents an update to a `PrincipalAuthModule`. Fields that are set will be updated. +""" +input PrincipalAuthModulePatch { + id: UUID + databaseId: UUID + schemaId: UUID + principalsTableId: UUID + principalEntitiesTableId: UUID + principalScopeOverridesTableId: UUID + usersTableId: UUID + sessionsTableId: UUID + sessionCredentialsTableId: UUID + auditsTableId: UUID + principalsTableName: String + createPrincipalFunction: String + deletePrincipalFunction: String + createOrgPrincipalFunction: String + deleteOrgPrincipalFunction: String + createOrgApiKeyFunction: String + revokeOrgApiKeyFunction: String + apiName: String +} + """The output of our update `ComputeLogModule` mutation.""" type UpdateComputeLogModulePayload { """ @@ -20757,6 +21386,69 @@ input NamespaceModulePatch { defaultPermissions: [String] } +"""The output of our update `ResourceModule` mutation.""" +type UpdateResourceModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `ResourceModule` that was updated by this mutation.""" + resourceModule: ResourceModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `ResourceModule`. May be used by Relay 1.""" + resourceModuleEdge( + """The method to use when ordering `ResourceModule`.""" + orderBy: [ResourceModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ResourceModuleEdge +} + +"""All input for the `updateResourceModule` mutation.""" +input UpdateResourceModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `ResourceModule` being updated. + """ + resourceModulePatch: ResourceModulePatch! +} + +""" +Represents an update to a `ResourceModule`. Fields that are set will be updated. +""" +input ResourceModulePatch { + id: UUID + databaseId: UUID + schemaId: UUID + privateSchemaId: UUID + publicSchemaName: String + privateSchemaName: String + resourcesTableId: UUID + resourceEventsTableId: UUID + resourcesTableName: String + resourceEventsTableName: String + apiName: String + privateApiName: String + scope: String + prefix: String + entityTableId: UUID + namespaceModuleId: UUID + policies: JSON + provisions: JSON + defaultPermissions: [String] +} + """The output of our update `StorageLogModule` mutation.""" type UpdateStorageLogModulePayload { """ @@ -23541,39 +24233,6 @@ input DeleteSecureTableProvisionInput { id: UUID! } -"""The output of our delete `MerkleStoreModule` mutation.""" -type DeleteMerkleStoreModulePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `MerkleStoreModule` that was deleted by this mutation.""" - merkleStoreModule: MerkleStoreModule - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `MerkleStoreModule`. May be used by Relay 1.""" - merkleStoreModuleEdge( - """The method to use when ordering `MerkleStoreModule`.""" - orderBy: [MerkleStoreModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): MerkleStoreModuleEdge -} - -"""All input for the `deleteMerkleStoreModule` mutation.""" -input DeleteMerkleStoreModuleInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! -} - """The output of our delete `DatabaseProvisionModule` mutation.""" type DeleteDatabaseProvisionModulePayload { """ @@ -23673,6 +24332,39 @@ input DeleteGraphModuleInput { id: UUID! } +"""The output of our delete `MerkleStoreModule` mutation.""" +type DeleteMerkleStoreModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `MerkleStoreModule` that was deleted by this mutation.""" + merkleStoreModule: MerkleStoreModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `MerkleStoreModule`. May be used by Relay 1.""" + merkleStoreModuleEdge( + """The method to use when ordering `MerkleStoreModule`.""" + orderBy: [MerkleStoreModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): MerkleStoreModuleEdge +} + +"""All input for the `deleteMerkleStoreModule` mutation.""" +input DeleteMerkleStoreModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `RateLimitMetersModule` mutation.""" type DeleteRateLimitMetersModulePayload { """ @@ -23871,6 +24563,39 @@ input DeleteInvitesModuleInput { id: UUID! } +"""The output of our delete `PrincipalAuthModule` mutation.""" +type DeletePrincipalAuthModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `PrincipalAuthModule` that was deleted by this mutation.""" + principalAuthModule: PrincipalAuthModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `PrincipalAuthModule`. May be used by Relay 1.""" + principalAuthModuleEdge( + """The method to use when ordering `PrincipalAuthModule`.""" + orderBy: [PrincipalAuthModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): PrincipalAuthModuleEdge +} + +"""All input for the `deletePrincipalAuthModule` mutation.""" +input DeletePrincipalAuthModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `ComputeLogModule` mutation.""" type DeleteComputeLogModulePayload { """ @@ -23970,6 +24695,39 @@ input DeleteNamespaceModuleInput { id: UUID! } +"""The output of our delete `ResourceModule` mutation.""" +type DeleteResourceModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `ResourceModule` that was deleted by this mutation.""" + resourceModule: ResourceModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `ResourceModule`. May be used by Relay 1.""" + resourceModuleEdge( + """The method to use when ordering `ResourceModule`.""" + orderBy: [ResourceModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ResourceModuleEdge +} + +"""All input for the `deleteResourceModule` mutation.""" +input DeleteResourceModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `StorageLogModule` mutation.""" type DeleteStorageLogModulePayload { """ diff --git a/sdk/constructive-sdk/src/api/orm/README.md b/sdk/constructive-sdk/src/api/orm/README.md index caf70c1803..1c2ec1c782 100644 --- a/sdk/constructive-sdk/src/api/orm/README.md +++ b/sdk/constructive-sdk/src/api/orm/README.md @@ -118,7 +118,6 @@ CRUD operations for Schema records. | `description` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `isPublic` | Boolean | Yes | | `apiExposure` | ApiExposureLevel | Yes | @@ -129,13 +128,13 @@ CRUD operations for Schema records. ```typescript // List all schema records -const items = await db.schema.findMany({ select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, scope: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.schema.findMany({ select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.schema.findOne({ id: '', select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, scope: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.schema.findOne({ id: '', select: { id: true, databaseId: true, name: true, schemaName: true, label: true, description: true, smartTags: true, category: true, tags: true, isPublic: true, apiExposure: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.schema.create({ data: { databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', scope: '', tags: '', isPublic: '', apiExposure: '' }, select: { id: true } }).execute(); +const created = await db.schema.create({ data: { databaseId: '', name: '', schemaName: '', label: '', description: '', smartTags: '', category: '', tags: '', isPublic: '', apiExposure: '' }, select: { id: true } }).execute(); // Update const updated = await db.schema.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -160,7 +159,6 @@ CRUD operations for Table records. | `description` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `useRls` | Boolean | Yes | | `timestamps` | Boolean | Yes | | `peoplestamps` | Boolean | Yes | @@ -179,13 +177,13 @@ CRUD operations for Table records. ```typescript // List all table records -const items = await db.table.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, scope: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); +const items = await db.table.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); // Get one by id -const item = await db.table.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, scope: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); +const item = await db.table.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, smartTags: true, category: true, useRls: true, timestamps: true, peoplestamps: true, pluralName: true, singularName: true, tags: true, partitioned: true, partitionStrategy: true, partitionKeyNames: true, partitionKeyTypes: true, createdAt: true, updatedAt: true, inheritsId: true } }).execute(); // Create -const created = await db.table.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', scope: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }, select: { id: true } }).execute(); +const created = await db.table.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', smartTags: '', category: '', useRls: '', timestamps: '', peoplestamps: '', pluralName: '', singularName: '', tags: '', partitioned: '', partitionStrategy: '', partitionKeyNames: '', partitionKeyTypes: '', inheritsId: '' }, select: { id: true } }).execute(); // Update const updated = await db.table.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -211,7 +209,6 @@ CRUD operations for CheckConstraint records. | `expr` | JSON | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -220,13 +217,13 @@ CRUD operations for CheckConstraint records. ```typescript // List all checkConstraint records -const items = await db.checkConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.checkConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.checkConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.checkConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, expr: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.checkConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.checkConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', expr: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.checkConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -262,7 +259,6 @@ CRUD operations for Field records. | `max` | Float | Yes | | `tags` | String | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -270,13 +266,13 @@ CRUD operations for Field records. ```typescript // List all field records -const items = await db.field.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, scope: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.field.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.field.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, scope: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.field.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, label: true, description: true, smartTags: true, isRequired: true, apiRequired: true, defaultValue: true, type: true, fieldOrder: true, regexp: true, chk: true, chkExpr: true, min: true, max: true, tags: true, category: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.field.create({ data: { databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.field.create({ data: { databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '' }, select: { id: true } }).execute(); // Update const updated = await db.field.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -303,7 +299,6 @@ CRUD operations for SpatialRelation records. | `operator` | String | Yes | | `paramName` | String | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -312,13 +307,13 @@ CRUD operations for SpatialRelation records. ```typescript // List all spatialRelation records -const items = await db.spatialRelation.findMany({ select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.spatialRelation.findMany({ select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.spatialRelation.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.spatialRelation.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.spatialRelation.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -348,7 +343,6 @@ CRUD operations for ForeignKeyConstraint records. | `deleteAction` | String | Yes | | `updateAction` | String | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -357,13 +351,13 @@ CRUD operations for ForeignKeyConstraint records. ```typescript // List all foreignKeyConstraint records -const items = await db.foreignKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.foreignKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.foreignKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.foreignKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, refTableId: true, refFieldIds: true, deleteAction: true, updateAction: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.foreignKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.foreignKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', refTableId: '', refFieldIds: '', deleteAction: '', updateAction: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.foreignKeyConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -432,7 +426,6 @@ CRUD operations for Index records. | `opClasses` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -441,13 +434,13 @@ CRUD operations for Index records. ```typescript // List all index records -const items = await db.index.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.index.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.index.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.index.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, fieldIds: true, includeFieldIds: true, accessMethod: true, indexParams: true, whereClause: true, isUnique: true, options: true, opClasses: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.index.create({ data: { databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.index.create({ data: { databaseId: '', tableId: '', name: '', fieldIds: '', includeFieldIds: '', accessMethod: '', indexParams: '', whereClause: '', isUnique: '', options: '', opClasses: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.index.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -476,7 +469,6 @@ CRUD operations for Policy records. | `data` | JSON | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -485,13 +477,13 @@ CRUD operations for Policy records. ```typescript // List all policy records -const items = await db.policy.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.policy.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.policy.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.policy.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, granteeName: true, privilege: true, permissive: true, disabled: true, policyType: true, data: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.policy.create({ data: { databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.policy.create({ data: { databaseId: '', tableId: '', name: '', granteeName: '', privilege: '', permissive: '', disabled: '', policyType: '', data: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.policy.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -516,7 +508,6 @@ CRUD operations for PrimaryKeyConstraint records. | `fieldIds` | UUID | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -525,13 +516,13 @@ CRUD operations for PrimaryKeyConstraint records. ```typescript // List all primaryKeyConstraint records -const items = await db.primaryKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.primaryKeyConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.primaryKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.primaryKeyConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, type: true, fieldIds: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.primaryKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.primaryKeyConstraint.create({ data: { databaseId: '', tableId: '', name: '', type: '', fieldIds: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.primaryKeyConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -593,7 +584,6 @@ CRUD operations for Trigger records. | `functionName` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -602,13 +592,13 @@ CRUD operations for Trigger records. ```typescript // List all trigger records -const items = await db.trigger.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.trigger.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.trigger.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.trigger.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, event: true, functionName: true, smartTags: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.trigger.create({ data: { databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.trigger.create({ data: { databaseId: '', tableId: '', name: '', event: '', functionName: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.trigger.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -634,7 +624,6 @@ CRUD operations for UniqueConstraint records. | `type` | String | Yes | | `fieldIds` | UUID | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | @@ -643,13 +632,13 @@ CRUD operations for UniqueConstraint records. ```typescript // List all uniqueConstraint records -const items = await db.uniqueConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const items = await db.uniqueConstraint.findMany({ select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.uniqueConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.uniqueConstraint.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, name: true, description: true, smartTags: true, type: true, fieldIds: true, category: true, tags: true, createdAt: true, updatedAt: true } }).execute(); // Create -const created = await db.uniqueConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.uniqueConstraint.create({ data: { databaseId: '', tableId: '', name: '', description: '', smartTags: '', type: '', fieldIds: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.uniqueConstraint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -679,20 +668,19 @@ CRUD operations for View records. | `isReadOnly` | Boolean | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | **Operations:** ```typescript // List all view records -const items = await db.view.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const items = await db.view.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, tags: true } }).execute(); // Get one by id -const item = await db.view.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const item = await db.view.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, tableId: true, viewType: true, data: true, filterType: true, filterData: true, securityInvoker: true, isReadOnly: true, smartTags: true, category: true, tags: true } }).execute(); // Create -const created = await db.view.create({ data: { databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.view.create({ data: { databaseId: '', schemaId: '', name: '', tableId: '', viewType: '', data: '', filterType: '', filterData: '', securityInvoker: '', isReadOnly: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.view.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -938,20 +926,19 @@ CRUD operations for Enum records. | `values` | String | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | **Operations:** ```typescript // List all enum records -const items = await db.enum.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const items = await db.enum.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, tags: true } }).execute(); // Get one by id -const item = await db.enum.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const item = await db.enum.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, values: true, smartTags: true, category: true, tags: true } }).execute(); // Create -const created = await db.enum.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.enum.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', values: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.enum.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -977,20 +964,19 @@ CRUD operations for CompositeType records. | `attributes` | JSON | Yes | | `smartTags` | JSON | Yes | | `category` | ObjectCategory | Yes | -| `scope` | Int | Yes | | `tags` | String | Yes | **Operations:** ```typescript // List all compositeType records -const items = await db.compositeType.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const items = await db.compositeType.findMany({ select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, tags: true } }).execute(); // Get one by id -const item = await db.compositeType.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, scope: true, tags: true } }).execute(); +const item = await db.compositeType.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, name: true, label: true, description: true, attributes: true, smartTags: true, category: true, tags: true } }).execute(); // Create -const created = await db.compositeType.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', scope: '', tags: '' }, select: { id: true } }).execute(); +const created = await db.compositeType.create({ data: { databaseId: '', schemaId: '', name: '', label: '', description: '', attributes: '', smartTags: '', category: '', tags: '' }, select: { id: true } }).execute(); // Update const updated = await db.compositeType.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1076,20 +1062,23 @@ CRUD operations for Domain records. | `databaseId` | UUID | Yes | | `apiId` | UUID | Yes | | `siteId` | UUID | Yes | +| `serviceId` | UUID | Yes | | `subdomain` | ConstructiveInternalTypeHostname | Yes | | `domain` | ConstructiveInternalTypeHostname | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all domain records -const items = await db.domain.findMany({ select: { id: true, databaseId: true, apiId: true, siteId: true, subdomain: true, domain: true } }).execute(); +const items = await db.domain.findMany({ select: { id: true, databaseId: true, apiId: true, siteId: true, serviceId: true, subdomain: true, domain: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.domain.findOne({ id: '', select: { id: true, databaseId: true, apiId: true, siteId: true, subdomain: true, domain: true } }).execute(); +const item = await db.domain.findOne({ id: '', select: { id: true, databaseId: true, apiId: true, siteId: true, serviceId: true, subdomain: true, domain: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.domain.create({ data: { databaseId: '', apiId: '', siteId: '', subdomain: '', domain: '' }, select: { id: true } }).execute(); +const created = await db.domain.create({ data: { databaseId: '', apiId: '', siteId: '', serviceId: '', subdomain: '', domain: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.domain.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1361,18 +1350,20 @@ CRUD operations for Api records. | `roleName` | String | Yes | | `anonRole` | String | Yes | | `isPublic` | Boolean | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all api records -const items = await db.api.findMany({ select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true } }).execute(); +const items = await db.api.findMany({ select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.api.findOne({ id: '', select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true } }).execute(); +const item = await db.api.findOne({ id: '', select: { id: true, databaseId: true, name: true, dbname: true, roleName: true, anonRole: true, isPublic: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.api.create({ data: { databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '' }, select: { id: true } }).execute(); +const created = await db.api.create({ data: { databaseId: '', name: '', dbname: '', roleName: '', anonRole: '', isPublic: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.api.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1398,18 +1389,20 @@ CRUD operations for Site records. | `appleTouchIcon` | ConstructiveInternalTypeImage | Yes | | `logo` | ConstructiveInternalTypeImage | Yes | | `dbname` | String | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all site records -const items = await db.site.findMany({ select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true } }).execute(); +const items = await db.site.findMany({ select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.site.findOne({ id: '', select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true } }).execute(); +const item = await db.site.findOne({ id: '', select: { id: true, databaseId: true, title: true, description: true, ogImage: true, favicon: true, appleTouchIcon: true, logo: true, dbname: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.site.create({ data: { databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '' }, select: { id: true } }).execute(); +const created = await db.site.create({ data: { databaseId: '', title: '', description: '', ogImage: '', favicon: '', appleTouchIcon: '', logo: '', dbname: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.site.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -1740,18 +1733,20 @@ CRUD operations for DatabaseSetting records. | `enableBulk` | Boolean | Yes | | `enableI18N` | Boolean | Yes | | `options` | JSON | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | **Operations:** ```typescript // List all databaseSetting records -const items = await db.databaseSetting.findMany({ select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true } }).execute(); +const items = await db.databaseSetting.findMany({ select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true, labels: true, annotations: true } }).execute(); // Get one by id -const item = await db.databaseSetting.findOne({ id: '', select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true } }).execute(); +const item = await db.databaseSetting.findOne({ id: '', select: { id: true, databaseId: true, enableAggregates: true, enablePostgis: true, enableSearch: true, enableDirectUploads: true, enablePresignedUploads: true, enableManyToMany: true, enableConnectionFilter: true, enableLtree: true, enableLlm: true, enableRealtime: true, enableBulk: true, enableI18N: true, options: true, labels: true, annotations: true } }).execute(); // Create -const created = await db.databaseSetting.create({ data: { databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '' }, select: { id: true } }).execute(); +const created = await db.databaseSetting.create({ data: { databaseId: '', enableAggregates: '', enablePostgis: '', enableSearch: '', enableDirectUploads: '', enablePresignedUploads: '', enableManyToMany: '', enableConnectionFilter: '', enableLtree: '', enableLlm: '', enableRealtime: '', enableBulk: '', enableI18N: '', options: '', labels: '', annotations: '' }, select: { id: true } }).execute(); // Update const updated = await db.databaseSetting.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); diff --git a/sdk/constructive-sdk/src/api/orm/input-types.ts b/sdk/constructive-sdk/src/api/orm/input-types.ts index b1e5d0f51c..60f796a207 100644 --- a/sdk/constructive-sdk/src/api/orm/input-types.ts +++ b/sdk/constructive-sdk/src/api/orm/input-types.ts @@ -255,7 +255,6 @@ export interface Schema { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; isPublic?: boolean | null; apiExposure?: ApiExposureLevel | null; @@ -271,7 +270,6 @@ export interface Table { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; useRls?: boolean | null; timestamps?: boolean | null; peoplestamps?: boolean | null; @@ -296,7 +294,6 @@ export interface CheckConstraint { expr?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -321,7 +318,6 @@ export interface Field { max?: number | null; tags?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; createdAt?: string | null; updatedAt?: string | null; } @@ -336,7 +332,6 @@ export interface SpatialRelation { operator?: string | null; paramName?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -355,7 +350,6 @@ export interface ForeignKeyConstraint { deleteAction?: string | null; updateAction?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -387,7 +381,6 @@ export interface Index { opClasses?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -405,7 +398,6 @@ export interface Policy { data?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -419,7 +411,6 @@ export interface PrimaryKeyConstraint { fieldIds?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -444,7 +435,6 @@ export interface Trigger { functionName?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -459,7 +449,6 @@ export interface UniqueConstraint { type?: string | null; fieldIds?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; createdAt?: string | null; updatedAt?: string | null; @@ -478,7 +467,6 @@ export interface View { isReadOnly?: boolean | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } /** Junction table linking views to their joined tables for referential integrity */ @@ -559,7 +547,6 @@ export interface Enum { values?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface CompositeType { @@ -572,7 +559,6 @@ export interface CompositeType { attributes?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } /** Join table linking APIs to the database schemas they expose; controls which schemas are accessible through each API */ @@ -607,12 +593,18 @@ export interface Domain { databaseId?: string | null; /** API endpoint this domain routes to (mutually exclusive with site_id) */ apiId?: string | null; - /** Site this domain routes to (mutually exclusive with api_id) */ + /** Site this domain routes to (mutually exclusive with api_id and service_id) */ siteId?: string | null; + /** Server deployment this domain routes to (mutually exclusive with api_id and site_id) */ + serviceId?: string | null; /** Subdomain portion of the hostname */ subdomain?: ConstructiveInternalTypeHostname | null; /** Root domain of the hostname */ domain?: ConstructiveInternalTypeHostname | null; + /** Key/value pairs for selecting and filtering domains */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** SEO and social sharing metadata for a site: page title, description, and Open Graph image */ export interface SiteMetadatum { @@ -719,6 +711,10 @@ export interface Api { anonRole?: string | null; /** Whether this API is publicly accessible without authentication */ isPublic?: boolean | null; + /** Key/value pairs for selecting and filtering APIs */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** Top-level site configuration: branding assets, title, and description for a deployed application */ export interface Site { @@ -740,6 +736,10 @@ export interface Site { logo?: ConstructiveInternalTypeImage | null; /** PostgreSQL database name this site connects to */ dbname?: string | null; + /** Key/value pairs for selecting and filtering sites */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** Mobile and native app configuration linked to a site, including store links and identifiers */ export interface App { @@ -912,6 +912,10 @@ export interface DatabaseSetting { enableI18N?: boolean | null; /** Extensible JSON for additional settings that do not have dedicated columns */ options?: Record | null; + /** Key/value pairs for selecting and filtering database settings */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; } /** Per-database WebAuthn/passkey runtime configuration; typed replacement for api_modules webauthn_challenge JSONB entries */ export interface WebauthnSetting { @@ -1328,7 +1332,6 @@ export type SchemaSelect = { description?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; isPublic?: boolean; apiExposure?: boolean; @@ -1395,7 +1398,6 @@ export type TableSelect = { description?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; useRls?: boolean; timestamps?: boolean; peoplestamps?: boolean; @@ -1528,7 +1530,6 @@ export type CheckConstraintSelect = { expr?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1559,7 +1560,6 @@ export type FieldSelect = { max?: boolean; tags?: boolean; category?: boolean; - scope?: boolean; createdAt?: boolean; updatedAt?: boolean; database?: { @@ -1592,7 +1592,6 @@ export type SpatialRelationSelect = { operator?: boolean; paramName?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1626,7 +1625,6 @@ export type ForeignKeyConstraintSelect = { deleteAction?: boolean; updateAction?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1673,7 +1671,6 @@ export type IndexSelect = { opClasses?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1697,7 +1694,6 @@ export type PolicySelect = { data?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1717,7 +1713,6 @@ export type PrimaryKeyConstraintSelect = { fieldIds?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1754,7 +1749,6 @@ export type TriggerSelect = { functionName?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1775,7 +1769,6 @@ export type UniqueConstraintSelect = { type?: boolean; fieldIds?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; createdAt?: boolean; updatedAt?: boolean; @@ -1800,7 +1793,6 @@ export type ViewSelect = { isReadOnly?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; database?: { select: DatabaseSelect; @@ -1952,7 +1944,6 @@ export type EnumSelect = { values?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; database?: { select: DatabaseSelect; @@ -1971,7 +1962,6 @@ export type CompositeTypeSelect = { attributes?: boolean; smartTags?: boolean; category?: boolean; - scope?: boolean; tags?: boolean; database?: { select: DatabaseSelect; @@ -2013,8 +2003,11 @@ export type DomainSelect = { databaseId?: boolean; apiId?: boolean; siteId?: boolean; + serviceId?: boolean; subdomain?: boolean; domain?: boolean; + labels?: boolean; + annotations?: boolean; api?: { select: ApiSelect; }; @@ -2138,6 +2131,8 @@ export type ApiSelect = { roleName?: boolean; anonRole?: boolean; isPublic?: boolean; + labels?: boolean; + annotations?: boolean; database?: { select: DatabaseSelect; }; @@ -2179,6 +2174,8 @@ export type SiteSelect = { appleTouchIcon?: boolean; logo?: boolean; dbname?: boolean; + labels?: boolean; + annotations?: boolean; database?: { select: DatabaseSelect; }; @@ -2608,6 +2605,8 @@ export type DatabaseSettingSelect = { enableBulk?: boolean; enableI18N?: boolean; options?: boolean; + labels?: boolean; + annotations?: boolean; database?: { select: DatabaseSelect; }; @@ -2715,8 +2714,6 @@ export interface SchemaFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `isPublic` field. */ @@ -2785,8 +2782,6 @@ export interface TableFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `useRls` field. */ useRls?: BooleanFilter; /** Filter by the object’s `timestamps` field. */ @@ -2915,8 +2910,6 @@ export interface CheckConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -2973,8 +2966,6 @@ export interface FieldFilter { tags?: StringListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ @@ -3019,8 +3010,6 @@ export interface SpatialRelationFilter { paramName?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3071,8 +3060,6 @@ export interface ForeignKeyConstraintFilter { updateAction?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3153,8 +3140,6 @@ export interface IndexFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3197,8 +3182,6 @@ export interface PolicyFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3233,8 +3216,6 @@ export interface PrimaryKeyConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3299,8 +3280,6 @@ export interface TriggerFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3337,8 +3316,6 @@ export interface UniqueConstraintFilter { fieldIds?: UUIDListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -3383,8 +3360,6 @@ export interface ViewFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -3623,8 +3598,6 @@ export interface EnumFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -3657,8 +3630,6 @@ export interface CompositeTypeFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -3723,10 +3694,16 @@ export interface DomainFilter { apiId?: UUIDFilter; /** Filter by the object’s `siteId` field. */ siteId?: UUIDFilter; + /** Filter by the object’s `serviceId` field. */ + serviceId?: UUIDFilter; /** Filter by the object’s `subdomain` field. */ subdomain?: ConstructiveInternalTypeHostnameFilter; /** Filter by the object’s `domain` field. */ domain?: ConstructiveInternalTypeHostnameFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DomainFilter[]; /** Checks for any expressions in this list. */ @@ -3945,6 +3922,10 @@ export interface ApiFilter { anonRole?: StringFilter; /** Filter by the object’s `isPublic` field. */ isPublic?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: ApiFilter[]; /** Checks for any expressions in this list. */ @@ -3993,6 +3974,10 @@ export interface SiteFilter { logo?: ConstructiveInternalTypeImageFilter; /** Filter by the object’s `dbname` field. */ dbname?: StringFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: SiteFilter[]; /** Checks for any expressions in this list. */ @@ -4493,6 +4478,10 @@ export interface DatabaseSettingFilter { enableI18N?: BooleanFilter; /** Filter by the object’s `options` field. */ options?: JSONFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DatabaseSettingFilter[]; /** Checks for any expressions in this list. */ @@ -4651,8 +4640,6 @@ export type SchemaOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'IS_PUBLIC_ASC' @@ -4683,8 +4670,6 @@ export type TableOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'USE_RLS_ASC' | 'USE_RLS_DESC' | 'TIMESTAMPS_ASC' @@ -4733,8 +4718,6 @@ export type CheckConstraintOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4783,8 +4766,6 @@ export type FieldOrderBy = | 'TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' @@ -4813,8 +4794,6 @@ export type SpatialRelationOrderBy = | 'PARAM_NAME_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4851,8 +4830,6 @@ export type ForeignKeyConstraintOrderBy = | 'UPDATE_ACTION_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4915,8 +4892,6 @@ export type IndexOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4951,8 +4926,6 @@ export type PolicyOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -4979,8 +4952,6 @@ export type PrimaryKeyConstraintOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -5029,8 +5000,6 @@ export type TriggerOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -5059,8 +5028,6 @@ export type UniqueConstraintOrderBy = | 'FIELD_IDS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'CREATED_AT_ASC' @@ -5097,8 +5064,6 @@ export type ViewOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; export type ViewTableOrderBy = @@ -5251,8 +5216,6 @@ export type EnumOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; export type CompositeTypeOrderBy = @@ -5277,8 +5240,6 @@ export type CompositeTypeOrderBy = | 'SMART_TAGS_DESC' | 'CATEGORY_ASC' | 'CATEGORY_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; export type ApiSchemaOrderBy = @@ -5319,10 +5280,16 @@ export type DomainOrderBy = | 'API_ID_DESC' | 'SITE_ID_ASC' | 'SITE_ID_DESC' + | 'SERVICE_ID_ASC' + | 'SERVICE_ID_DESC' | 'SUBDOMAIN_ASC' | 'SUBDOMAIN_DESC' | 'DOMAIN_ASC' - | 'DOMAIN_DESC'; + | 'DOMAIN_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type SiteMetadatumOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5472,7 +5439,11 @@ export type ApiOrderBy = | 'ANON_ROLE_ASC' | 'ANON_ROLE_DESC' | 'IS_PUBLIC_ASC' - | 'IS_PUBLIC_DESC'; + | 'IS_PUBLIC_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type SiteOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5494,7 +5465,11 @@ export type SiteOrderBy = | 'LOGO_ASC' | 'LOGO_DESC' | 'DBNAME_ASC' - | 'DBNAME_DESC'; + | 'DBNAME_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type AppOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5706,7 +5681,11 @@ export type DatabaseSettingOrderBy = | 'ENABLE_I18N_ASC' | 'ENABLE_I18N_DESC' | 'OPTIONS_ASC' - | 'OPTIONS_DESC'; + | 'OPTIONS_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC'; export type WebauthnSettingOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -5808,7 +5787,6 @@ export interface CreateSchemaInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; isPublic?: boolean; apiExposure?: ApiExposureLevel; @@ -5822,7 +5800,6 @@ export interface SchemaPatch { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; isPublic?: boolean | null; apiExposure?: ApiExposureLevel | null; @@ -5846,7 +5823,6 @@ export interface CreateTableInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; useRls?: boolean; timestamps?: boolean; peoplestamps?: boolean; @@ -5868,7 +5844,6 @@ export interface TablePatch { description?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; useRls?: boolean | null; timestamps?: boolean | null; peoplestamps?: boolean | null; @@ -5901,7 +5876,6 @@ export interface CreateCheckConstraintInput { expr?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -5914,7 +5888,6 @@ export interface CheckConstraintPatch { expr?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateCheckConstraintInput { @@ -5947,7 +5920,6 @@ export interface CreateFieldInput { max?: number; tags?: string[]; category?: ObjectCategory; - scope?: number; }; } export interface FieldPatch { @@ -5969,7 +5941,6 @@ export interface FieldPatch { max?: number | null; tags?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; } export interface UpdateFieldInput { clientMutationId?: string; @@ -5992,7 +5963,6 @@ export interface CreateSpatialRelationInput { operator: string; paramName?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6006,7 +5976,6 @@ export interface SpatialRelationPatch { operator?: string | null; paramName?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateSpatialRelationInput { @@ -6033,7 +6002,6 @@ export interface CreateForeignKeyConstraintInput { deleteAction?: string; updateAction?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6050,7 +6018,6 @@ export interface ForeignKeyConstraintPatch { deleteAction?: string | null; updateAction?: string | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateForeignKeyConstraintInput { @@ -6108,7 +6075,6 @@ export interface CreateIndexInput { opClasses?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6126,7 +6092,6 @@ export interface IndexPatch { opClasses?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateIndexInput { @@ -6152,7 +6117,6 @@ export interface CreatePolicyInput { data?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6168,7 +6132,6 @@ export interface PolicyPatch { data?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdatePolicyInput { @@ -6190,7 +6153,6 @@ export interface CreatePrimaryKeyConstraintInput { fieldIds: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6202,7 +6164,6 @@ export interface PrimaryKeyConstraintPatch { fieldIds?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdatePrimaryKeyConstraintInput { @@ -6252,7 +6213,6 @@ export interface CreateTriggerInput { functionName?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6264,7 +6224,6 @@ export interface TriggerPatch { functionName?: string | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateTriggerInput { @@ -6287,7 +6246,6 @@ export interface CreateUniqueConstraintInput { type?: string; fieldIds: string[]; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6300,7 +6258,6 @@ export interface UniqueConstraintPatch { type?: string | null; fieldIds?: string[] | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateUniqueConstraintInput { @@ -6327,7 +6284,6 @@ export interface CreateViewInput { isReadOnly?: boolean; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6344,7 +6300,6 @@ export interface ViewPatch { isReadOnly?: boolean | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateViewInput { @@ -6547,7 +6502,6 @@ export interface CreateEnumInput { values?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6560,7 +6514,6 @@ export interface EnumPatch { values?: string[] | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateEnumInput { @@ -6583,7 +6536,6 @@ export interface CreateCompositeTypeInput { attributes?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; }; } @@ -6596,7 +6548,6 @@ export interface CompositeTypePatch { attributes?: Record | null; smartTags?: Record | null; category?: ObjectCategory | null; - scope?: number | null; tags?: string[] | null; } export interface UpdateCompositeTypeInput { @@ -6660,16 +6611,22 @@ export interface CreateDomainInput { databaseId: string; apiId?: string; siteId?: string; + serviceId?: string; subdomain?: ConstructiveInternalTypeHostname; domain?: ConstructiveInternalTypeHostname; + labels?: Record; + annotations?: Record; }; } export interface DomainPatch { databaseId?: string | null; apiId?: string | null; siteId?: string | null; + serviceId?: string | null; subdomain?: ConstructiveInternalTypeHostname | null; domain?: ConstructiveInternalTypeHostname | null; + labels?: Record | null; + annotations?: Record | null; } export interface UpdateDomainInput { clientMutationId?: string; @@ -6880,6 +6837,8 @@ export interface CreateApiInput { roleName?: string; anonRole?: string; isPublic?: boolean; + labels?: Record; + annotations?: Record; }; } export interface ApiPatch { @@ -6889,6 +6848,8 @@ export interface ApiPatch { roleName?: string | null; anonRole?: string | null; isPublic?: boolean | null; + labels?: Record | null; + annotations?: Record | null; } export interface UpdateApiInput { clientMutationId?: string; @@ -6910,6 +6871,8 @@ export interface CreateSiteInput { appleTouchIcon?: ConstructiveInternalTypeImage; logo?: ConstructiveInternalTypeImage; dbname?: string; + labels?: Record; + annotations?: Record; }; } export interface SitePatch { @@ -6921,6 +6884,8 @@ export interface SitePatch { appleTouchIcon?: ConstructiveInternalTypeImage | null; logo?: ConstructiveInternalTypeImage | null; dbname?: string | null; + labels?: Record | null; + annotations?: Record | null; ogImageUpload?: File | null; faviconUpload?: File | null; appleTouchIconUpload?: File | null; @@ -7211,6 +7176,8 @@ export interface CreateDatabaseSettingInput { enableBulk?: boolean; enableI18N?: boolean; options?: Record; + labels?: Record; + annotations?: Record; }; } export interface DatabaseSettingPatch { @@ -7228,6 +7195,8 @@ export interface DatabaseSettingPatch { enableBulk?: boolean | null; enableI18N?: boolean | null; options?: Record | null; + labels?: Record | null; + annotations?: Record | null; } export interface UpdateDatabaseSettingInput { clientMutationId?: string; @@ -8488,7 +8457,6 @@ export interface SchemaInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; isPublic?: boolean; apiExposure?: ApiExposureLevel; @@ -8505,7 +8473,6 @@ export interface TableInput { description?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; useRls?: boolean; timestamps?: boolean; peoplestamps?: boolean; @@ -8531,7 +8498,6 @@ export interface CheckConstraintInput { expr?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8557,7 +8523,6 @@ export interface FieldInput { max?: number; tags?: string[]; category?: ObjectCategory; - scope?: number; createdAt?: string; updatedAt?: string; } @@ -8573,7 +8538,6 @@ export interface SpatialRelationInput { operator: string; paramName?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8593,7 +8557,6 @@ export interface ForeignKeyConstraintInput { deleteAction?: string; updateAction?: string; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8627,7 +8590,6 @@ export interface IndexInput { opClasses?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8646,7 +8608,6 @@ export interface PolicyInput { data?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8661,7 +8622,6 @@ export interface PrimaryKeyConstraintInput { fieldIds: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8688,7 +8648,6 @@ export interface TriggerInput { functionName?: string; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8704,7 +8663,6 @@ export interface UniqueConstraintInput { type?: string; fieldIds: string[]; category?: ObjectCategory; - scope?: number; tags?: string[]; createdAt?: string; updatedAt?: string; @@ -8724,7 +8682,6 @@ export interface ViewInput { isReadOnly?: boolean; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; } /** An input for mutations affecting `ViewTable` */ @@ -8810,7 +8767,6 @@ export interface EnumInput { values?: string[]; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; } /** An input for mutations affecting `CompositeType` */ @@ -8824,7 +8780,6 @@ export interface CompositeTypeInput { attributes?: Record; smartTags?: Record; category?: ObjectCategory; - scope?: number; tags?: string[]; } /** An input for mutations affecting `ApiSchema` */ @@ -8859,12 +8814,18 @@ export interface DomainInput { databaseId: string; /** API endpoint this domain routes to (mutually exclusive with site_id) */ apiId?: string; - /** Site this domain routes to (mutually exclusive with api_id) */ + /** Site this domain routes to (mutually exclusive with api_id and service_id) */ siteId?: string; + /** Server deployment this domain routes to (mutually exclusive with api_id and site_id) */ + serviceId?: string; /** Subdomain portion of the hostname */ subdomain?: ConstructiveInternalTypeHostname; /** Root domain of the hostname */ domain?: ConstructiveInternalTypeHostname; + /** Key/value pairs for selecting and filtering domains */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `SiteMetadatum` */ export interface SiteMetadatumInput { @@ -8974,6 +8935,10 @@ export interface ApiInput { anonRole?: string; /** Whether this API is publicly accessible without authentication */ isPublic?: boolean; + /** Key/value pairs for selecting and filtering APIs */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `Site` */ export interface SiteInput { @@ -8995,6 +8960,10 @@ export interface SiteInput { logo?: ConstructiveInternalTypeImage; /** PostgreSQL database name this site connects to */ dbname?: string; + /** Key/value pairs for selecting and filtering sites */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `App` */ export interface AppInput { @@ -9171,6 +9140,10 @@ export interface DatabaseSettingInput { enableI18N?: boolean; /** Extensible JSON for additional settings that do not have dedicated columns */ options?: Record; + /** Key/value pairs for selecting and filtering database settings */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; } /** An input for mutations affecting `WebauthnSetting` */ export interface WebauthnSettingInput { @@ -9264,8 +9237,6 @@ export interface TableFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `useRls` field. */ useRls?: BooleanFilter; /** Filter by the object’s `timestamps` field. */ @@ -9428,8 +9399,6 @@ export interface ViewFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -9506,8 +9475,6 @@ export interface EnumFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -9562,8 +9529,6 @@ export interface CompositeTypeFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Checks for all expressions in this list. */ @@ -9620,8 +9585,6 @@ export interface CheckConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9679,8 +9642,6 @@ export interface FieldFilter { tags?: StringListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ @@ -9732,8 +9693,6 @@ export interface ForeignKeyConstraintFilter { updateAction?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9816,8 +9775,6 @@ export interface IndexFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9861,8 +9818,6 @@ export interface PolicyFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9898,8 +9853,6 @@ export interface PrimaryKeyConstraintFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -9966,8 +9919,6 @@ export interface TriggerFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -10005,8 +9956,6 @@ export interface UniqueConstraintFilter { fieldIds?: UUIDListFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -10138,8 +10087,6 @@ export interface SpatialRelationFilter { paramName?: StringFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `createdAt` field. */ @@ -10246,10 +10193,16 @@ export interface DomainFilter { apiId?: UUIDFilter; /** Filter by the object’s `siteId` field. */ siteId?: UUIDFilter; + /** Filter by the object’s `serviceId` field. */ + serviceId?: UUIDFilter; /** Filter by the object’s `subdomain` field. */ subdomain?: ConstructiveInternalTypeHostnameFilter; /** Filter by the object’s `domain` field. */ domain?: ConstructiveInternalTypeHostnameFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DomainFilter[]; /** Checks for any expressions in this list. */ @@ -10375,8 +10328,6 @@ export interface SchemaFilter { smartTags?: JSONFilter; /** Filter by the object’s `category` field. */ category?: ObjectCategoryFilter; - /** Filter by the object’s `scope` field. */ - scope?: IntFilter; /** Filter by the object’s `tags` field. */ tags?: StringListFilter; /** Filter by the object’s `isPublic` field. */ @@ -10547,6 +10498,10 @@ export interface ApiFilter { anonRole?: StringFilter; /** Filter by the object’s `isPublic` field. */ isPublic?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: ApiFilter[]; /** Checks for any expressions in this list. */ @@ -10596,6 +10551,10 @@ export interface SiteFilter { logo?: ConstructiveInternalTypeImageFilter; /** Filter by the object’s `dbname` field. */ dbname?: StringFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: SiteFilter[]; /** Checks for any expressions in this list. */ @@ -10838,31 +10797,6 @@ export interface JSONFilter { /** Contained by the specified JSON. */ containedBy?: Record; } -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: number; - /** Not equal to the specified value. */ - notEqualTo?: number; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; - /** Included in the specified list. */ - in?: number[]; - /** Not included in the specified list. */ - notIn?: number[]; - /** Less than the specified value. */ - lessThan?: number; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; - /** Greater than the specified value. */ - greaterThan?: number; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; -} /** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ export interface BooleanFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -11180,6 +11114,31 @@ export interface UUIDListFilter { /** Any array item is greater than or equal to the specified value. */ anyGreaterThanOrEqualTo?: string; } +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Included in the specified list. */ + in?: number[]; + /** Not included in the specified list. */ + notIn?: number[]; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; +} /** A filter to be used against Float fields. All fields are combined with a logical ‘and.’ */ export interface FloatFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -11237,6 +11196,10 @@ export interface DatabaseSettingFilter { enableI18N?: BooleanFilter; /** Filter by the object’s `options` field. */ options?: JSONFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; /** Checks for all expressions in this list. */ and?: DatabaseSettingFilter[]; /** Checks for any expressions in this list. */ diff --git a/sdk/constructive-sdk/src/auth/README.md b/sdk/constructive-sdk/src/auth/README.md index e7bb3828bf..e56c8f42cc 100644 --- a/sdk/constructive-sdk/src/auth/README.md +++ b/sdk/constructive-sdk/src/auth/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 9 +- **Tables:** 13 - **Custom queries:** 5 -- **Custom mutations:** 25 +- **Custom mutations:** 29 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/auth/orm/README.md b/sdk/constructive-sdk/src/auth/orm/README.md index 68bf0ce72d..343ccbb2bd 100644 --- a/sdk/constructive-sdk/src/auth/orm/README.md +++ b/sdk/constructive-sdk/src/auth/orm/README.md @@ -21,6 +21,9 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `principal` | findMany, findOne, create, update, delete | +| `principalEntity` | findMany, findOne, create, update, delete | +| `principalScopeOverride` | findMany, findOne, create, update, delete | | `email` | findMany, findOne, create, update, delete | | `phoneNumber` | findMany, findOne, create, update, delete | | `cryptoAddress` | findMany, findOne, create, update, delete | @@ -29,10 +32,118 @@ const db = createClient({ | `identityProvider` | findMany, findOne, create, update, delete | | `roleType` | findMany, findOne, create, update, delete | | `userConnectedAccount` | findMany, findOne, create, update, delete | +| `orgApiKeyList` | findMany, findOne, create, update, delete | | `user` | findMany, findOne, create, update, delete | ## Table Operations +### `db.principal` + +CRUD operations for Principal records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `ownerId` | UUID | Yes | +| `userId` | UUID | Yes | +| `name` | String | Yes | +| `allowedMask` | BitString | Yes | +| `isReadOnly` | Boolean | Yes | +| `bypassStepUp` | Boolean | Yes | + +**Operations:** + +```typescript +// List all principal records +const items = await db.principal.findMany({ select: { id: true, createdAt: true, updatedAt: true, ownerId: true, userId: true, name: true, allowedMask: true, isReadOnly: true, bypassStepUp: true } }).execute(); + +// Get one by principalId +const item = await db.principal.findOne({ principalId: '', select: { id: true, createdAt: true, updatedAt: true, ownerId: true, userId: true, name: true, allowedMask: true, isReadOnly: true, bypassStepUp: true } }).execute(); + +// Create +const created = await db.principal.create({ data: { id: '', ownerId: '', userId: '', name: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' }, select: { principalId: true } }).execute(); + +// Update +const updated = await db.principal.update({ where: { principalId: '' }, data: { id: '' }, select: { principalId: true } }).execute(); + +// Delete +const deleted = await db.principal.delete({ where: { principalId: '' } }).execute(); +``` + +### `db.principalEntity` + +CRUD operations for PrincipalEntity records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `principalId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `ownerId` | UUID | Yes | + +**Operations:** + +```typescript +// List all principalEntity records +const items = await db.principalEntity.findMany({ select: { id: true, createdAt: true, updatedAt: true, principalId: true, entityId: true, ownerId: true } }).execute(); + +// Get one by id +const item = await db.principalEntity.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, principalId: true, entityId: true, ownerId: true } }).execute(); + +// Create +const created = await db.principalEntity.create({ data: { principalId: '', entityId: '', ownerId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.principalEntity.update({ where: { id: '' }, data: { principalId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.principalEntity.delete({ where: { id: '' } }).execute(); +``` + +### `db.principalScopeOverride` + +CRUD operations for PrincipalScopeOverride records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `principalId` | UUID | Yes | +| `membershipType` | Int | Yes | +| `allowedMask` | BitString | Yes | +| `isAdmin` | Boolean | Yes | +| `isReadOnly` | Boolean | Yes | + +**Operations:** + +```typescript +// List all principalScopeOverride records +const items = await db.principalScopeOverride.findMany({ select: { id: true, createdAt: true, updatedAt: true, principalId: true, membershipType: true, allowedMask: true, isAdmin: true, isReadOnly: true } }).execute(); + +// Get one by id +const item = await db.principalScopeOverride.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, principalId: true, membershipType: true, allowedMask: true, isAdmin: true, isReadOnly: true } }).execute(); + +// Create +const created = await db.principalScopeOverride.create({ data: { principalId: '', membershipType: '', allowedMask: '', isAdmin: '', isReadOnly: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.principalScopeOverride.update({ where: { id: '' }, data: { principalId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.principalScopeOverride.delete({ where: { id: '' } }).execute(); +``` + ### `db.email` CRUD operations for Email records. @@ -319,6 +430,46 @@ const updated = await db.userConnectedAccount.update({ where: { id: '' }, const deleted = await db.userConnectedAccount.delete({ where: { id: '' } }).execute(); ``` +### `db.orgApiKeyList` + +CRUD operations for OrgApiKeyList records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `keyId` | String | Yes | +| `name` | String | Yes | +| `principalId` | UUID | Yes | +| `orgId` | UUID | Yes | +| `expiresAt` | Datetime | Yes | +| `revokedAt` | Datetime | Yes | +| `lastUsedAt` | Datetime | Yes | +| `mfaLevel` | String | Yes | +| `accessLevel` | String | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all orgApiKeyList records +const items = await db.orgApiKeyList.findMany({ select: { id: true, keyId: true, name: true, principalId: true, orgId: true, expiresAt: true, revokedAt: true, lastUsedAt: true, mfaLevel: true, accessLevel: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.orgApiKeyList.findOne({ id: '', select: { id: true, keyId: true, name: true, principalId: true, orgId: true, expiresAt: true, revokedAt: true, lastUsedAt: true, mfaLevel: true, accessLevel: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.orgApiKeyList.create({ data: { keyId: '', name: '', principalId: '', orgId: '', expiresAt: '', revokedAt: '', lastUsedAt: '', mfaLevel: '', accessLevel: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgApiKeyList.update({ where: { id: '' }, data: { keyId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgApiKeyList.delete({ where: { id: '' } }).execute(); +``` + ### `db.user` CRUD operations for User records. @@ -374,26 +525,26 @@ currentUserAgent const result = await db.query.currentUserAgent().execute(); ``` -### `db.query.currentIpAddress` +### `db.query.currentUserId` -currentIpAddress +currentUserId - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentIpAddress().execute(); +const result = await db.query.currentUserId().execute(); ``` -### `db.query.currentUserId` +### `db.query.currentIpAddress` -currentUserId +currentIpAddress - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentUserId().execute(); +const result = await db.query.currentIpAddress().execute(); ``` ### `db.query.requireStepUp` @@ -467,6 +618,21 @@ checkPassword const result = await db.mutation.checkPassword({ input: { password: '' } }).execute(); ``` +### `db.mutation.deleteOrgPrincipal` + +deleteOrgPrincipal + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DeleteOrgPrincipalInput (required) | + +```typescript +const result = await db.mutation.deleteOrgPrincipal({ input: { principalId: '' } }).execute(); +``` + ### `db.mutation.disconnectAccount` disconnectAccount @@ -557,6 +723,21 @@ confirmDeleteAccount const result = await db.mutation.confirmDeleteAccount({ input: { userId: '', token: '' } }).execute(); ``` +### `db.mutation.revokeOrgApiKey` + +revokeOrgApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeOrgApiKeyInput (required) | + +```typescript +const result = await db.mutation.revokeOrgApiKey({ input: { keyId: '', orgId: '' } }).execute(); +``` + ### `db.mutation.setPassword` setPassword @@ -707,6 +888,21 @@ linkIdentity const result = await db.mutation.linkIdentity({ input: { service: '', identifier: '', details: '' } }).execute(); ``` +### `db.mutation.createOrgPrincipal` + +createOrgPrincipal + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateOrgPrincipalInput (required) | + +```typescript +const result = await db.mutation.createOrgPrincipal({ input: { name: '', orgId: '', allowedMask: '', isReadOnly: '', bypassStepUp: '' } }).execute(); +``` + ### `db.mutation.extendTokenExpires` extendTokenExpires @@ -722,6 +918,21 @@ extendTokenExpires const result = await db.mutation.extendTokenExpires({ input: { amount: '' } }).execute(); ``` +### `db.mutation.createOrgApiKey` + +createOrgApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateOrgApiKeyInput (required) | + +```typescript +const result = await db.mutation.createOrgApiKey({ input: '' }).execute(); +``` + ### `db.mutation.createApiKey` createApiKey @@ -734,7 +945,7 @@ createApiKey | `input` | CreateApiKeyInput (required) | ```typescript -const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '' } }).execute(); +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '', expiresIn: '', principalId: '' } }).execute(); ``` ### `db.mutation.requestCrossOriginToken` diff --git a/sdk/constructive-sdk/src/auth/orm/index.ts b/sdk/constructive-sdk/src/auth/orm/index.ts index 35448d7362..f3ecc5703a 100644 --- a/sdk/constructive-sdk/src/auth/orm/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/index.ts @@ -5,6 +5,9 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { PrincipalModel } from './models/principal'; +import { PrincipalEntityModel } from './models/principalEntity'; +import { PrincipalScopeOverrideModel } from './models/principalScopeOverride'; import { EmailModel } from './models/email'; import { PhoneNumberModel } from './models/phoneNumber'; import { CryptoAddressModel } from './models/cryptoAddress'; @@ -13,6 +16,7 @@ import { AuditLogAuthModel } from './models/auditLogAuth'; import { IdentityProviderModel } from './models/identityProvider'; import { RoleTypeModel } from './models/roleType'; import { UserConnectedAccountModel } from './models/userConnectedAccount'; +import { OrgApiKeyListModel } from './models/orgApiKeyList'; import { UserModel } from './models/user'; import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; @@ -49,6 +53,9 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + principal: new PrincipalModel(client), + principalEntity: new PrincipalEntityModel(client), + principalScopeOverride: new PrincipalScopeOverrideModel(client), email: new EmailModel(client), phoneNumber: new PhoneNumberModel(client), cryptoAddress: new CryptoAddressModel(client), @@ -57,6 +64,7 @@ export function createClient(config: OrmClientConfig) { identityProvider: new IdentityProviderModel(client), roleType: new RoleTypeModel(client), userConnectedAccount: new UserConnectedAccountModel(client), + orgApiKeyList: new OrgApiKeyListModel(client), user: new UserModel(client), query: createQueryOperations(client), mutation: createMutationOperations(client), diff --git a/sdk/constructive-sdk/src/auth/orm/input-types.ts b/sdk/constructive-sdk/src/auth/orm/input-types.ts index 734fe10c3a..f47ec67005 100644 --- a/sdk/constructive-sdk/src/auth/orm/input-types.ts +++ b/sdk/constructive-sdk/src/auth/orm/input-types.ts @@ -235,8 +235,54 @@ export type Base64EncodedBinary = unknown; export type ConstructiveInternalTypeEmail = unknown; export type ConstructiveInternalTypeImage = unknown; export type ConstructiveInternalTypeOrigin = unknown; -/** User email addresses with verification and primary-email management */ +/** Scoped sub-identities (API keys and agents) with precomputed SPRT */ // ============ Entity Types ============ +export interface Principal { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** The human user who owns and manages this principal */ + ownerId?: string | null; + /** The user row (type=3 Principal) that represents this principal identity */ + userId?: string | null; + /** Human-readable label for this principal (e.g., billing-bot, ci-deploy-key) */ + name?: string | null; + /** Permission bitmask subset; all-1s means inherit all parent permissions */ + allowedMask?: string | null; + /** Whether this principal is restricted to read-only operations */ + isReadOnly?: boolean | null; + /** Whether this principal bypasses MFA step-up requirements */ + bypassStepUp?: boolean | null; +} +/** Association table scoping principals to specific organizations */ +export interface PrincipalEntity { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** The principal this scoping row belongs to */ + principalId?: string | null; + /** The organization this principal is scoped to */ + entityId?: string | null; + /** Denormalized owner_id from principals table for RLS */ + ownerId?: string | null; +} +/** Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. */ +export interface PrincipalScopeOverride { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** The principal this override applies to */ + principalId?: string | null; + /** The scope level (membership_type) this override restricts */ + membershipType?: number | null; + /** Permission bitmask for this scope; AND-masked with parent permissions during cascade */ + allowedMask?: string | null; + /** Whether this principal has admin access at this scope (default true = inherit from parent) */ + isAdmin?: boolean | null; + /** Whether this principal is restricted to read-only at this scope */ + isReadOnly?: boolean | null; +} +/** User email addresses with verification and primary-email management */ export interface Email { id: string; ownerId?: string | null; @@ -349,6 +395,20 @@ export interface UserConnectedAccount { createdAt?: string | null; updatedAt?: string | null; } +export interface OrgApiKeyList { + id: string; + keyId?: string | null; + name?: string | null; + principalId?: string | null; + orgId?: string | null; + expiresAt?: string | null; + revokedAt?: string | null; + lastUsedAt?: string | null; + mfaLevel?: string | null; + accessLevel?: string | null; + createdAt?: string | null; + updatedAt?: string | null; +} export interface User { id: string; username?: string | null; @@ -378,6 +438,20 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface PrincipalRelations { + owner?: User | null; + user?: User | null; + principalEntities?: ConnectionResult; + principalScopeOverrides?: ConnectionResult; +} +export interface PrincipalEntityRelations { + entity?: User | null; + owner?: User | null; + principal?: Principal | null; +} +export interface PrincipalScopeOverrideRelations { + principal?: Principal | null; +} export interface EmailRelations { owner?: User | null; } @@ -396,8 +470,12 @@ export interface AuditLogAuthRelations { export interface IdentityProviderRelations {} export interface RoleTypeRelations {} export interface UserConnectedAccountRelations {} +export interface OrgApiKeyListRelations {} export interface UserRelations { roleType?: RoleType | null; + ownedPrincipals?: ConnectionResult; + principals?: ConnectionResult; + principalEntitiesByEntityId?: ConnectionResult; ownedEmails?: ConnectionResult; ownedPhoneNumbers?: ConnectionResult; ownedCryptoAddresses?: ConnectionResult; @@ -405,6 +483,10 @@ export interface UserRelations { auditLogAuthsByActorId?: ConnectionResult; } // ============ Entity Types With Relations ============ +export type PrincipalWithRelations = Principal & PrincipalRelations; +export type PrincipalEntityWithRelations = PrincipalEntity & PrincipalEntityRelations; +export type PrincipalScopeOverrideWithRelations = PrincipalScopeOverride & + PrincipalScopeOverrideRelations; export type EmailWithRelations = Email & EmailRelations; export type PhoneNumberWithRelations = PhoneNumber & PhoneNumberRelations; export type CryptoAddressWithRelations = CryptoAddress & CryptoAddressRelations; @@ -414,8 +496,68 @@ export type IdentityProviderWithRelations = IdentityProvider & IdentityProviderR export type RoleTypeWithRelations = RoleType & RoleTypeRelations; export type UserConnectedAccountWithRelations = UserConnectedAccount & UserConnectedAccountRelations; +export type OrgApiKeyListWithRelations = OrgApiKeyList & OrgApiKeyListRelations; export type UserWithRelations = User & UserRelations; // ============ Entity Select Types ============ +export type PrincipalSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + ownerId?: boolean; + userId?: boolean; + name?: boolean; + allowedMask?: boolean; + isReadOnly?: boolean; + bypassStepUp?: boolean; + owner?: { + select: UserSelect; + }; + user?: { + select: UserSelect; + }; + principalEntities?: { + select: PrincipalEntitySelect; + first?: number; + filter?: PrincipalEntityFilter; + orderBy?: PrincipalEntityOrderBy[]; + }; + principalScopeOverrides?: { + select: PrincipalScopeOverrideSelect; + first?: number; + filter?: PrincipalScopeOverrideFilter; + orderBy?: PrincipalScopeOverrideOrderBy[]; + }; +}; +export type PrincipalEntitySelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + principalId?: boolean; + entityId?: boolean; + ownerId?: boolean; + entity?: { + select: UserSelect; + }; + owner?: { + select: UserSelect; + }; + principal?: { + select: PrincipalSelect; + }; +}; +export type PrincipalScopeOverrideSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + principalId?: boolean; + membershipType?: boolean; + allowedMask?: boolean; + isAdmin?: boolean; + isReadOnly?: boolean; + principal?: { + select: PrincipalSelect; + }; +}; export type EmailSelect = { id?: boolean; ownerId?: boolean; @@ -509,6 +651,20 @@ export type UserConnectedAccountSelect = { createdAt?: boolean; updatedAt?: boolean; }; +export type OrgApiKeyListSelect = { + id?: boolean; + keyId?: boolean; + name?: boolean; + principalId?: boolean; + orgId?: boolean; + expiresAt?: boolean; + revokedAt?: boolean; + lastUsedAt?: boolean; + mfaLevel?: boolean; + accessLevel?: boolean; + createdAt?: boolean; + updatedAt?: boolean; +}; export type UserSelect = { id?: boolean; username?: boolean; @@ -524,6 +680,24 @@ export type UserSelect = { roleType?: { select: RoleTypeSelect; }; + ownedPrincipals?: { + select: PrincipalSelect; + first?: number; + filter?: PrincipalFilter; + orderBy?: PrincipalOrderBy[]; + }; + principals?: { + select: PrincipalSelect; + first?: number; + filter?: PrincipalFilter; + orderBy?: PrincipalOrderBy[]; + }; + principalEntitiesByEntityId?: { + select: PrincipalEntitySelect; + first?: number; + filter?: PrincipalEntityFilter; + orderBy?: PrincipalEntityOrderBy[]; + }; ownedEmails?: { select: EmailSelect; first?: number; @@ -556,6 +730,96 @@ export type UserSelect = { }; }; // ============ Table Filter Types ============ +export interface PrincipalFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `userId` field. */ + userId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Filter by the object’s `bypassStepUp` field. */ + bypassStepUp?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalFilter[]; + /** Negates the expression. */ + not?: PrincipalFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `user` relation. */ + user?: UserFilter; + /** Filter by the object’s `principalEntities` relation. */ + principalEntities?: PrincipalToManyPrincipalEntityFilter; + /** `principalEntities` exist. */ + principalEntitiesExist?: boolean; + /** Filter by the object’s `principalScopeOverrides` relation. */ + principalScopeOverrides?: PrincipalToManyPrincipalScopeOverrideFilter; + /** `principalScopeOverrides` exist. */ + principalScopeOverridesExist?: boolean; +} +export interface PrincipalEntityFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalEntityFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalEntityFilter[]; + /** Negates the expression. */ + not?: PrincipalEntityFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} +export interface PrincipalScopeOverrideFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `membershipType` field. */ + membershipType?: IntFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalScopeOverrideFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalScopeOverrideFilter[]; + /** Negates the expression. */ + not?: PrincipalScopeOverrideFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} export interface EmailFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -756,6 +1020,38 @@ export interface UserConnectedAccountFilter { /** Negates the expression. */ not?: UserConnectedAccountFilter; } +export interface OrgApiKeyListFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `keyId` field. */ + keyId?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `orgId` field. */ + orgId?: UUIDFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `revokedAt` field. */ + revokedAt?: DatetimeFilter; + /** Filter by the object’s `lastUsedAt` field. */ + lastUsedAt?: DatetimeFilter; + /** Filter by the object’s `mfaLevel` field. */ + mfaLevel?: StringFilter; + /** Filter by the object’s `accessLevel` field. */ + accessLevel?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: OrgApiKeyListFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgApiKeyListFilter[]; + /** Negates the expression. */ + not?: OrgApiKeyListFilter; +} export interface UserFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -781,6 +1077,18 @@ export interface UserFilter { not?: UserFilter; /** Filter by the object’s `roleType` relation. */ roleType?: RoleTypeFilter; + /** Filter by the object’s `ownedPrincipals` relation. */ + ownedPrincipals?: UserToManyPrincipalFilter; + /** `ownedPrincipals` exist. */ + ownedPrincipalsExist?: boolean; + /** Filter by the object’s `principals` relation. */ + principals?: UserToManyPrincipalFilter; + /** `principals` exist. */ + principalsExist?: boolean; + /** Filter by the object’s `principalEntitiesByEntityId` relation. */ + principalEntitiesByEntityId?: UserToManyPrincipalEntityFilter; + /** `principalEntitiesByEntityId` exist. */ + principalEntitiesByEntityIdExist?: boolean; /** Filter by the object’s `ownedEmails` relation. */ ownedEmails?: UserToManyEmailFilter; /** `ownedEmails` exist. */ @@ -815,6 +1123,64 @@ export interface UserFilter { unifiedSearch?: string; } // ============ OrderBy Types ============ +export type PrincipalOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'USER_ID_ASC' + | 'USER_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'ALLOWED_MASK_ASC' + | 'ALLOWED_MASK_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' + | 'BYPASS_STEP_UP_ASC' + | 'BYPASS_STEP_UP_DESC'; +export type PrincipalEntityOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC'; +export type PrincipalScopeOverrideOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'MEMBERSHIP_TYPE_ASC' + | 'MEMBERSHIP_TYPE_DESC' + | 'ALLOWED_MASK_ASC' + | 'ALLOWED_MASK_DESC' + | 'IS_ADMIN_ASC' + | 'IS_ADMIN_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC'; export type EmailOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -967,6 +1333,32 @@ export type UserConnectedAccountOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type OrgApiKeyListOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'KEY_ID_ASC' + | 'KEY_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'PRINCIPAL_ID_ASC' + | 'PRINCIPAL_ID_DESC' + | 'ORG_ID_ASC' + | 'ORG_ID_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'REVOKED_AT_ASC' + | 'REVOKED_AT_DESC' + | 'LAST_USED_AT_ASC' + | 'LAST_USED_AT_DESC' + | 'MFA_LEVEL_ASC' + | 'MFA_LEVEL_DESC' + | 'ACCESS_LEVEL_ASC' + | 'ACCESS_LEVEL_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type UserOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -994,6 +1386,82 @@ export type UserOrderBy = | 'SEARCH_SCORE_ASC' | 'SEARCH_SCORE_DESC'; // ============ CRUD Input Types ============ +export interface CreatePrincipalInput { + clientMutationId?: string; + principal: { + ownerId: string; + userId: string; + name?: string; + allowedMask?: string; + isReadOnly?: boolean; + bypassStepUp?: boolean; + }; +} +export interface PrincipalPatch { + ownerId?: string | null; + userId?: string | null; + name?: string | null; + allowedMask?: string | null; + isReadOnly?: boolean | null; + bypassStepUp?: boolean | null; +} +export interface UpdatePrincipalInput { + clientMutationId?: string; + principalId: string; + principalPatch: PrincipalPatch; +} +export interface DeletePrincipalInput { + clientMutationId?: string; + principalId: string; +} +export interface CreatePrincipalEntityInput { + clientMutationId?: string; + principalEntity: { + principalId: string; + entityId: string; + ownerId: string; + }; +} +export interface PrincipalEntityPatch { + principalId?: string | null; + entityId?: string | null; + ownerId?: string | null; +} +export interface UpdatePrincipalEntityInput { + clientMutationId?: string; + id: string; + principalEntityPatch: PrincipalEntityPatch; +} +export interface DeletePrincipalEntityInput { + clientMutationId?: string; + id: string; +} +export interface CreatePrincipalScopeOverrideInput { + clientMutationId?: string; + principalScopeOverride: { + principalId: string; + membershipType?: number; + allowedMask?: string; + isAdmin?: boolean; + isReadOnly?: boolean; + }; +} +export interface PrincipalScopeOverridePatch { + principalId?: string | null; + membershipType?: number | null; + allowedMask?: string | null; + isAdmin?: boolean | null; + isReadOnly?: boolean | null; +} +export interface UpdatePrincipalScopeOverrideInput { + clientMutationId?: string; + id: string; + principalScopeOverridePatch: PrincipalScopeOverridePatch; +} +export interface DeletePrincipalScopeOverrideInput { + clientMutationId?: string; + id: string; +} export interface CreateEmailInput { clientMutationId?: string; email: { @@ -1210,6 +1678,40 @@ export interface DeleteUserConnectedAccountInput { clientMutationId?: string; id: string; } +export interface CreateOrgApiKeyListInput { + clientMutationId?: string; + orgApiKeyList: { + keyId?: string; + name?: string; + principalId?: string; + orgId?: string; + expiresAt?: string; + revokedAt?: string; + lastUsedAt?: string; + mfaLevel?: string; + accessLevel?: string; + }; +} +export interface OrgApiKeyListPatch { + keyId?: string | null; + name?: string | null; + principalId?: string | null; + orgId?: string | null; + expiresAt?: string | null; + revokedAt?: string | null; + lastUsedAt?: string | null; + mfaLevel?: string | null; + accessLevel?: string | null; +} +export interface UpdateOrgApiKeyListInput { + clientMutationId?: string; + id: string; + orgApiKeyListPatch: OrgApiKeyListPatch; +} +export interface DeleteOrgApiKeyListInput { + clientMutationId?: string; + id: string; +} export interface CreateUserInput { clientMutationId?: string; user: { @@ -1237,7 +1739,14 @@ export interface DeleteUserInput { } // ============ Connection Fields Map ============ export const connectionFieldsMap = { + Principal: { + principalEntities: 'PrincipalEntity', + principalScopeOverrides: 'PrincipalScopeOverride', + }, User: { + ownedPrincipals: 'Principal', + principals: 'Principal', + principalEntitiesByEntityId: 'PrincipalEntity', ownedEmails: 'Email', ownedPhoneNumbers: 'PhoneNumber', ownedCryptoAddresses: 'CryptoAddress', @@ -1256,6 +1765,10 @@ export interface CheckPasswordInput { clientMutationId?: string; password?: string; } +export interface DeleteOrgPrincipalInput { + clientMutationId?: string; + principalId?: string; +} export interface DisconnectAccountInput { clientMutationId?: string; accountId: string; @@ -1281,6 +1794,11 @@ export interface ConfirmDeleteAccountInput { userId?: string; token?: string; } +export interface RevokeOrgApiKeyInput { + clientMutationId?: string; + keyId: string; + orgId: string; +} export interface SetPasswordInput { clientMutationId?: string; currentPassword?: string; @@ -1347,16 +1865,34 @@ export interface LinkIdentityInput { identifier: string; details?: Record; } +export interface CreateOrgPrincipalInput { + clientMutationId?: string; + name?: string; + orgId?: string; + allowedMask?: string; + isReadOnly?: boolean; + bypassStepUp?: boolean; +} export interface ExtendTokenExpiresInput { clientMutationId?: string; amount?: IntervalInput; } +export interface CreateOrgApiKeyInput { + clientMutationId?: string; + orgId?: string; + principalId?: string; + keyName?: string; + accessLevel?: string; + mfaLevel?: string; + expiresIn?: IntervalInput; +} export interface CreateApiKeyInput { clientMutationId?: string; keyName?: string; accessLevel?: string; mfaLevel?: string; expiresIn?: IntervalInput; + principalId?: string; } export interface RequestCrossOriginTokenInput { clientMutationId?: string; @@ -1382,6 +1918,24 @@ export interface ProvisionBucketInput { */ ownerId?: string; } +/** A filter to be used against many `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalToManyPrincipalEntityFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalEntityFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalEntityFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalEntityFilter; +} +/** A filter to be used against many `PrincipalScopeOverride` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalToManyPrincipalScopeOverrideFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalScopeOverrideFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalScopeOverrideFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalScopeOverrideFilter; +} /** A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ */ export interface ConstructiveInternalTypeEmailFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -1669,6 +2223,24 @@ export interface ConstructiveInternalTypeImageFilter { /** Contained by the specified JSON. */ containedBy?: ConstructiveInternalTypeImage; } +/** A filter to be used against many `Principal` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyPrincipalFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalFilter; +} +/** A filter to be used against many `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyPrincipalEntityFilter { + /** Filters to entities where at least one related entity matches. */ + some?: PrincipalEntityFilter; + /** Filters to entities where every related entity matches. */ + every?: PrincipalEntityFilter; + /** Filters to entities where no related entity matches. */ + none?: PrincipalEntityFilter; +} /** A filter to be used against many `Email` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyEmailFilter { /** Filters to entities where at least one related entity matches. */ @@ -1721,6 +2293,18 @@ export interface TrgmSearchInput { /** Minimum similarity threshold (0.0 to 1.0). Higher = stricter matching. Default is 0.3. */ threshold?: number; } +/** An input for mutations affecting `PrincipalEntity` */ +export interface PrincipalEntityInput { + id?: string; + createdAt?: string; + updatedAt?: string; + /** The principal this scoping row belongs to */ + principalId: string; + /** The organization this principal is scoped to */ + entityId: string; + /** Denormalized owner_id from principals table for RLS */ + ownerId: string; +} /** An input for mutations affecting `Email` */ export interface EmailInput { id?: string; @@ -1837,7 +2421,22 @@ export interface UserConnectedAccountInput { createdAt?: string; updatedAt?: string; } -/** An input for mutations affecting `User` */ +/** An input for mutations affecting `OrgApiKeyList` */ +export interface OrgApiKeyListInput { + id?: string; + keyId?: string; + name?: string; + principalId?: string; + orgId?: string; + expiresAt?: string; + revokedAt?: string; + lastUsedAt?: string; + mfaLevel?: string; + accessLevel?: string; + createdAt?: string; + updatedAt?: string; +} +/** An input for mutations affecting `User` */ export interface UserInput { id?: string; username?: string; @@ -1866,6 +2465,99 @@ export interface IntervalInput { /** A quantity of years. */ years?: number; } +/** A filter to be used against `PrincipalEntity` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalEntityFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalEntityFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalEntityFilter[]; + /** Negates the expression. */ + not?: PrincipalEntityFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} +/** A filter to be used against `PrincipalScopeOverride` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalScopeOverrideFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `principalId` field. */ + principalId?: UUIDFilter; + /** Filter by the object’s `membershipType` field. */ + membershipType?: IntFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalScopeOverrideFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalScopeOverrideFilter[]; + /** Negates the expression. */ + not?: PrincipalScopeOverrideFilter; + /** Filter by the object’s `principal` relation. */ + principal?: PrincipalFilter; +} +/** A filter to be used against `Principal` object types. All fields are combined with a logical ‘and.’ */ +export interface PrincipalFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `userId` field. */ + userId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `allowedMask` field. */ + allowedMask?: BitStringFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Filter by the object’s `bypassStepUp` field. */ + bypassStepUp?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalFilter[]; + /** Negates the expression. */ + not?: PrincipalFilter; + /** Filter by the object’s `owner` relation. */ + owner?: UserFilter; + /** Filter by the object’s `user` relation. */ + user?: UserFilter; + /** Filter by the object’s `principalEntities` relation. */ + principalEntities?: PrincipalToManyPrincipalEntityFilter; + /** `principalEntities` exist. */ + principalEntitiesExist?: boolean; + /** Filter by the object’s `principalScopeOverrides` relation. */ + principalScopeOverrides?: PrincipalToManyPrincipalScopeOverrideFilter; + /** `principalScopeOverrides` exist. */ + principalScopeOverridesExist?: boolean; +} /** A filter to be used against `Email` object types. All fields are combined with a logical ‘and.’ */ export interface EmailFilter { /** Filter by the object’s `id` field. */ @@ -2042,6 +2734,152 @@ export interface UUIDFilter { /** Greater than or equal to the specified value. */ greaterThanOrEqualTo?: string; } +/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ +export interface DatetimeFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Included in the specified list. */ + in?: string[]; + /** Not included in the specified list. */ + notIn?: string[]; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; +} +/** A filter to be used against `User` object types. All fields are combined with a logical ‘and.’ */ +export interface UserFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `username` field. */ + username?: StringTrgmFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringTrgmFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `searchTsv` field. */ + searchTsv?: FullTextFilter; + /** Filter by the object’s `type` field. */ + type?: IntFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: UserFilter[]; + /** Checks for any expressions in this list. */ + or?: UserFilter[]; + /** Negates the expression. */ + not?: UserFilter; + /** Filter by the object’s `roleType` relation. */ + roleType?: RoleTypeFilter; + /** Filter by the object’s `ownedPrincipals` relation. */ + ownedPrincipals?: UserToManyPrincipalFilter; + /** `ownedPrincipals` exist. */ + ownedPrincipalsExist?: boolean; + /** Filter by the object’s `principals` relation. */ + principals?: UserToManyPrincipalFilter; + /** `principals` exist. */ + principalsExist?: boolean; + /** Filter by the object’s `principalEntitiesByEntityId` relation. */ + principalEntitiesByEntityId?: UserToManyPrincipalEntityFilter; + /** `principalEntitiesByEntityId` exist. */ + principalEntitiesByEntityIdExist?: boolean; + /** Filter by the object’s `ownedEmails` relation. */ + ownedEmails?: UserToManyEmailFilter; + /** `ownedEmails` exist. */ + ownedEmailsExist?: boolean; + /** Filter by the object’s `ownedPhoneNumbers` relation. */ + ownedPhoneNumbers?: UserToManyPhoneNumberFilter; + /** `ownedPhoneNumbers` exist. */ + ownedPhoneNumbersExist?: boolean; + /** Filter by the object’s `ownedCryptoAddresses` relation. */ + ownedCryptoAddresses?: UserToManyCryptoAddressFilter; + /** `ownedCryptoAddresses` exist. */ + ownedCryptoAddressesExist?: boolean; + /** Filter by the object’s `ownedWebauthnCredentials` relation. */ + ownedWebauthnCredentials?: UserToManyWebauthnCredentialFilter; + /** `ownedWebauthnCredentials` exist. */ + ownedWebauthnCredentialsExist?: boolean; + /** Filter by the object’s `auditLogAuthsByActorId` relation. */ + auditLogAuthsByActorId?: UserToManyAuditLogAuthFilter; + /** `auditLogAuthsByActorId` exist. */ + auditLogAuthsByActorIdExist?: boolean; + /** TSV search on the `search_tsv` column. */ + tsvSearchTsv?: string; + /** TRGM search on the `display_name` column. */ + trgmDisplayName?: TrgmSearchInput; + /** + * Composite unified search. Provide a search string and it will be dispatched to + * all text-compatible search algorithms (tsvector, BM25, pg_trgm) + * simultaneously. When the LLM plugin is active, pgvector also participates via + * auto-embedding. Rows matching ANY algorithm are returned. All matching score + * fields are populated. + */ + unifiedSearch?: string; +} +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Included in the specified list. */ + in?: number[]; + /** Not included in the specified list. */ + notIn?: number[]; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; +} +/** A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ */ +export interface BitStringFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Included in the specified list. */ + in?: string[]; + /** Not included in the specified list. */ + notIn?: string[]; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; +} /** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ export interface BooleanFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -2144,90 +2982,6 @@ export interface StringFilter { /** Greater than or equal to the specified value (case-insensitive). */ greaterThanOrEqualToInsensitive?: string; } -/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ -export interface DatetimeFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Included in the specified list. */ - in?: string[]; - /** Not included in the specified list. */ - notIn?: string[]; - /** Less than the specified value. */ - lessThan?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; -} -/** A filter to be used against `User` object types. All fields are combined with a logical ‘and.’ */ -export interface UserFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `username` field. */ - username?: StringTrgmFilter; - /** Filter by the object’s `displayName` field. */ - displayName?: StringTrgmFilter; - /** Filter by the object’s `profilePicture` field. */ - profilePicture?: ConstructiveInternalTypeImageFilter; - /** Filter by the object’s `searchTsv` field. */ - searchTsv?: FullTextFilter; - /** Filter by the object’s `type` field. */ - type?: IntFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: UserFilter[]; - /** Checks for any expressions in this list. */ - or?: UserFilter[]; - /** Negates the expression. */ - not?: UserFilter; - /** Filter by the object’s `roleType` relation. */ - roleType?: RoleTypeFilter; - /** Filter by the object’s `ownedEmails` relation. */ - ownedEmails?: UserToManyEmailFilter; - /** `ownedEmails` exist. */ - ownedEmailsExist?: boolean; - /** Filter by the object’s `ownedPhoneNumbers` relation. */ - ownedPhoneNumbers?: UserToManyPhoneNumberFilter; - /** `ownedPhoneNumbers` exist. */ - ownedPhoneNumbersExist?: boolean; - /** Filter by the object’s `ownedCryptoAddresses` relation. */ - ownedCryptoAddresses?: UserToManyCryptoAddressFilter; - /** `ownedCryptoAddresses` exist. */ - ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedWebauthnCredentials` relation. */ - ownedWebauthnCredentials?: UserToManyWebauthnCredentialFilter; - /** `ownedWebauthnCredentials` exist. */ - ownedWebauthnCredentialsExist?: boolean; - /** Filter by the object’s `auditLogAuthsByActorId` relation. */ - auditLogAuthsByActorId?: UserToManyAuditLogAuthFilter; - /** `auditLogAuthsByActorId` exist. */ - auditLogAuthsByActorIdExist?: boolean; - /** TSV search on the `search_tsv` column. */ - tsvSearchTsv?: string; - /** TRGM search on the `display_name` column. */ - trgmDisplayName?: TrgmSearchInput; - /** - * Composite unified search. Provide a search string and it will be dispatched to - * all text-compatible search algorithms (tsvector, BM25, pg_trgm) - * simultaneously. When the LLM plugin is active, pgvector also participates via - * auto-embedding. Rows matching ANY algorithm are returned. All matching score - * fields are populated. - */ - unifiedSearch?: string; -} /** A filter to be used against BigInt fields. All fields are combined with a logical ‘and.’ */ export interface BigIntFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -2346,31 +3100,6 @@ export interface FullTextFilter { /** Performs a full text search on the field. */ matches?: string; } -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: number; - /** Not equal to the specified value. */ - notEqualTo?: number; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; - /** Included in the specified list. */ - in?: number[]; - /** Not included in the specified list. */ - notIn?: number[]; - /** Less than the specified value. */ - lessThan?: number; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; - /** Greater than the specified value. */ - greaterThan?: number; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; -} /** A filter to be used against `RoleType` object types. All fields are combined with a logical ‘and.’ */ export interface RoleTypeFilter { /** Filter by the object’s `id` field. */ @@ -2405,6 +3134,14 @@ export interface CheckPasswordPayload { export type CheckPasswordPayloadSelect = { clientMutationId?: boolean; }; +export interface DeleteOrgPrincipalPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DeleteOrgPrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface DisconnectAccountPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2453,6 +3190,14 @@ export type ConfirmDeleteAccountPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface RevokeOrgApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeOrgApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface SetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2543,6 +3288,14 @@ export type LinkIdentityPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface CreateOrgPrincipalPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type CreateOrgPrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; @@ -2553,6 +3306,16 @@ export type ExtendTokenExpiresPayloadSelect = { select: ExtendTokenExpiresRecordSelect; }; }; +export interface CreateOrgApiKeyPayload { + clientMutationId?: string | null; + result?: CreateOrgApiKeyRecord | null; +} +export type CreateOrgApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: CreateOrgApiKeyRecordSelect; + }; +}; export interface CreateApiKeyPayload { clientMutationId?: string | null; result?: CreateApiKeyRecord | null; @@ -2607,6 +3370,67 @@ export type ProvisionBucketPayloadSelect = { endpoint?: boolean; error?: boolean; }; +export interface CreatePrincipalPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type CreatePrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface DeletePrincipalPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DeletePrincipalPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface CreatePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was created by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} +export type CreatePrincipalEntityPayloadSelect = { + clientMutationId?: boolean; + principalEntity?: { + select: PrincipalEntitySelect; + }; + principalEntityEdge?: { + select: PrincipalEntityEdgeSelect; + }; +}; +export interface UpdatePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was updated by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} +export type UpdatePrincipalEntityPayloadSelect = { + clientMutationId?: boolean; + principalEntity?: { + select: PrincipalEntitySelect; + }; + principalEntityEdge?: { + select: PrincipalEntityEdgeSelect; + }; +}; +export interface DeletePrincipalEntityPayload { + clientMutationId?: string | null; + /** The `PrincipalEntity` that was deleted by this mutation. */ + principalEntity?: PrincipalEntity | null; + principalEntityEdge?: PrincipalEntityEdge | null; +} +export type DeletePrincipalEntityPayloadSelect = { + clientMutationId?: boolean; + principalEntity?: { + select: PrincipalEntitySelect; + }; + principalEntityEdge?: { + select: PrincipalEntityEdgeSelect; + }; +}; export interface CreateEmailPayload { clientMutationId?: string | null; /** The `Email` that was created by this mutation. */ @@ -2899,6 +3723,17 @@ export type CreateUserConnectedAccountPayloadSelect = { select: UserConnectedAccountSelect; }; }; +export interface CreateOrgApiKeyListPayload { + clientMutationId?: string | null; + /** The `OrgApiKeyList` that was created by this mutation. */ + orgApiKeyList?: OrgApiKeyList | null; +} +export type CreateOrgApiKeyListPayloadSelect = { + clientMutationId?: boolean; + orgApiKeyList?: { + select: OrgApiKeyListSelect; + }; +}; export interface CreateUserPayload { clientMutationId?: string | null; /** The `User` that was created by this mutation. */ @@ -3026,6 +3861,16 @@ export type ExtendTokenExpiresRecordSelect = { sessionId?: boolean; expiresAt?: boolean; }; +export interface CreateOrgApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; + expiresAt?: string | null; +} +export type CreateOrgApiKeyRecordSelect = { + apiKey?: boolean; + keyId?: boolean; + expiresAt?: boolean; +}; export interface CreateApiKeyRecord { apiKey?: string | null; keyId?: string | null; @@ -3036,6 +3881,18 @@ export type CreateApiKeyRecordSelect = { keyId?: boolean; expiresAt?: boolean; }; +/** A `PrincipalEntity` edge in the connection. */ +export interface PrincipalEntityEdge { + cursor?: string | null; + /** The `PrincipalEntity` at the end of the edge. */ + node?: PrincipalEntity | null; +} +export type PrincipalEntityEdgeSelect = { + cursor?: boolean; + node?: { + select: PrincipalEntitySelect; + }; +}; /** A `Email` edge in the connection. */ export interface EmailEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/auth/orm/models/index.ts b/sdk/constructive-sdk/src/auth/orm/models/index.ts index f0ecad3b71..d041785e90 100644 --- a/sdk/constructive-sdk/src/auth/orm/models/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/models/index.ts @@ -3,6 +3,9 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { PrincipalModel } from './principal'; +export { PrincipalEntityModel } from './principalEntity'; +export { PrincipalScopeOverrideModel } from './principalScopeOverride'; export { EmailModel } from './email'; export { PhoneNumberModel } from './phoneNumber'; export { CryptoAddressModel } from './cryptoAddress'; @@ -11,4 +14,5 @@ export { AuditLogAuthModel } from './auditLogAuth'; export { IdentityProviderModel } from './identityProvider'; export { RoleTypeModel } from './roleType'; export { UserConnectedAccountModel } from './userConnectedAccount'; +export { OrgApiKeyListModel } from './orgApiKeyList'; export { UserModel } from './user'; diff --git a/sdk/constructive-sdk/src/auth/orm/models/orgApiKeyList.ts b/sdk/constructive-sdk/src/auth/orm/models/orgApiKeyList.ts new file mode 100644 index 0000000000..fe7120ee8a --- /dev/null +++ b/sdk/constructive-sdk/src/auth/orm/models/orgApiKeyList.ts @@ -0,0 +1,174 @@ +/** + * OrgApiKeyList 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 { + OrgApiKeyList, + OrgApiKeyListWithRelations, + OrgApiKeyListSelect, + OrgApiKeyListFilter, + OrgApiKeyListOrderBy, + CreateOrgApiKeyListInput, + UpdateOrgApiKeyListInput, + OrgApiKeyListPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgApiKeyListModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgApiKeyLists: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgApiKeyList', + 'orgApiKeyLists', + 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, + }, + 'OrgApiKeyListFilter', + 'OrgApiKeyListOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgApiKeyList', + fieldName: 'orgApiKeyLists', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgApiKeyList: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgApiKeyList', + 'orgApiKeyLists', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgApiKeyListFilter', + 'OrgApiKeyListOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgApiKeyList', + fieldName: 'orgApiKeyList', + document, + variables, + transform: (data: { + orgApiKeyLists?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgApiKeyList: data.orgApiKeyLists?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgApiKeyList: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgApiKeyList', + 'orgApiKeyLists', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgApiKeyListFilter', + 'OrgApiKeyListOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgApiKeyList', + fieldName: 'orgApiKeyList', + document, + variables, + transform: (data: { + orgApiKeyLists?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgApiKeyList: data.orgApiKeyLists?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgApiKeyList: { + orgApiKeyList: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgApiKeyList', + 'createOrgApiKeyList', + 'orgApiKeyList', + args.select, + args.data, + 'CreateOrgApiKeyListInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgApiKeyList', + fieldName: 'createOrgApiKeyList', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/auth/orm/models/principal.ts b/sdk/constructive-sdk/src/auth/orm/models/principal.ts new file mode 100644 index 0000000000..66c9d2ff40 --- /dev/null +++ b/sdk/constructive-sdk/src/auth/orm/models/principal.ts @@ -0,0 +1,208 @@ +/** + * Principal 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 { + Principal, + PrincipalWithRelations, + PrincipalSelect, + PrincipalFilter, + PrincipalOrderBy, + CreatePrincipalInput, + UpdatePrincipalInput, + PrincipalPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principals: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Principal', + 'principals', + 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, + }, + 'PrincipalFilter', + 'PrincipalOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Principal', + fieldName: 'principals', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principal: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Principal', + 'principals', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalFilter', + 'PrincipalOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Principal', + fieldName: 'principal', + document, + variables, + transform: (data: { + principals?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principal: data.principals?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + principalId: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principal: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Principal', + 'principals', + args.select, + { + where: { + principalId: { + equalTo: args.principalId, + }, + }, + first: 1, + }, + 'PrincipalFilter', + 'PrincipalOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Principal', + fieldName: 'principal', + document, + variables, + transform: (data: { + principals?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principal: data.principals?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipal: { + principal: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Principal', + 'createPrincipal', + 'principal', + args.select, + args.data, + 'CreatePrincipalInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Principal', + fieldName: 'createPrincipal', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + principalId: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePrincipal: { + principal: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Principal', + 'deletePrincipal', + 'principal', + { + principalId: args.where.principalId, + }, + 'DeletePrincipalInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Principal', + fieldName: 'deletePrincipal', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/auth/orm/models/principalEntity.ts b/sdk/constructive-sdk/src/auth/orm/models/principalEntity.ts new file mode 100644 index 0000000000..0c265501f5 --- /dev/null +++ b/sdk/constructive-sdk/src/auth/orm/models/principalEntity.ts @@ -0,0 +1,245 @@ +/** + * PrincipalEntity 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 { + PrincipalEntity, + PrincipalEntityWithRelations, + PrincipalEntitySelect, + PrincipalEntityFilter, + PrincipalEntityOrderBy, + CreatePrincipalEntityInput, + UpdatePrincipalEntityInput, + PrincipalEntityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalEntityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalEntities: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalEntity', + 'principalEntities', + 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, + }, + 'PrincipalEntityFilter', + 'PrincipalEntityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalEntity', + fieldName: 'principalEntities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalEntity: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PrincipalEntity', + 'principalEntities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalEntityFilter', + 'PrincipalEntityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalEntity', + fieldName: 'principalEntity', + document, + variables, + transform: (data: { + principalEntities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalEntity: data.principalEntities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalEntity: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalEntity', + 'principalEntities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PrincipalEntityFilter', + 'PrincipalEntityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalEntity', + fieldName: 'principalEntity', + document, + variables, + transform: (data: { + principalEntities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalEntity: data.principalEntities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipalEntity: { + principalEntity: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PrincipalEntity', + 'createPrincipalEntity', + 'principalEntity', + args.select, + args.data, + 'CreatePrincipalEntityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalEntity', + fieldName: 'createPrincipalEntity', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PrincipalEntityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePrincipalEntity: { + principalEntity: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PrincipalEntity', + 'updatePrincipalEntity', + 'principalEntity', + args.select, + args.where.id, + args.data, + 'UpdatePrincipalEntityInput', + 'id', + 'principalEntityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalEntity', + fieldName: 'updatePrincipalEntity', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePrincipalEntity: { + principalEntity: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PrincipalEntity', + 'deletePrincipalEntity', + 'principalEntity', + { + id: args.where.id, + }, + 'DeletePrincipalEntityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalEntity', + fieldName: 'deletePrincipalEntity', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/auth/orm/models/principalScopeOverride.ts b/sdk/constructive-sdk/src/auth/orm/models/principalScopeOverride.ts new file mode 100644 index 0000000000..3d3e7bedd3 --- /dev/null +++ b/sdk/constructive-sdk/src/auth/orm/models/principalScopeOverride.ts @@ -0,0 +1,176 @@ +/** + * PrincipalScopeOverride 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 { + PrincipalScopeOverride, + PrincipalScopeOverrideWithRelations, + PrincipalScopeOverrideSelect, + PrincipalScopeOverrideFilter, + PrincipalScopeOverrideOrderBy, + CreatePrincipalScopeOverrideInput, + UpdatePrincipalScopeOverrideInput, + PrincipalScopeOverridePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalScopeOverrideModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalScopeOverrides: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalScopeOverride', + 'principalScopeOverrides', + 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, + }, + 'PrincipalScopeOverrideFilter', + 'PrincipalScopeOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalScopeOverride', + fieldName: 'principalScopeOverrides', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalScopeOverride: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PrincipalScopeOverride', + 'principalScopeOverrides', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalScopeOverrideFilter', + 'PrincipalScopeOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalScopeOverride', + fieldName: 'principalScopeOverride', + document, + variables, + transform: (data: { + principalScopeOverrides?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalScopeOverride: data.principalScopeOverrides?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalScopeOverride: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalScopeOverride', + 'principalScopeOverrides', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PrincipalScopeOverrideFilter', + 'PrincipalScopeOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalScopeOverride', + fieldName: 'principalScopeOverride', + document, + variables, + transform: (data: { + principalScopeOverrides?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalScopeOverride: data.principalScopeOverrides?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipalScopeOverride: { + principalScopeOverride: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PrincipalScopeOverride', + 'createPrincipalScopeOverride', + 'principalScopeOverride', + args.select, + args.data, + 'CreatePrincipalScopeOverrideInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalScopeOverride', + fieldName: 'createPrincipalScopeOverride', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/auth/orm/mutation/index.ts b/sdk/constructive-sdk/src/auth/orm/mutation/index.ts index d8864374dd..de98ebe402 100644 --- a/sdk/constructive-sdk/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/mutation/index.ts @@ -10,12 +10,14 @@ import type { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, + DeleteOrgPrincipalInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, ConfirmDeleteAccountInput, + RevokeOrgApiKeyInput, SetPasswordInput, VerifyEmailInput, ProvisionNewUserInput, @@ -26,7 +28,9 @@ import type { SignUpInput, SignInInput, LinkIdentityInput, + CreateOrgPrincipalInput, ExtendTokenExpiresInput, + CreateOrgApiKeyInput, CreateApiKeyInput, RequestCrossOriginTokenInput, ForgotPasswordInput, @@ -35,12 +39,14 @@ import type { SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, + DeleteOrgPrincipalPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, ConfirmDeleteAccountPayload, + RevokeOrgApiKeyPayload, SetPasswordPayload, VerifyEmailPayload, ProvisionNewUserPayload, @@ -51,7 +57,9 @@ import type { SignUpPayload, SignInPayload, LinkIdentityPayload, + CreateOrgPrincipalPayload, ExtendTokenExpiresPayload, + CreateOrgApiKeyPayload, CreateApiKeyPayload, RequestCrossOriginTokenPayload, ForgotPasswordPayload, @@ -60,12 +68,14 @@ import type { SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, + DeleteOrgPrincipalPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, ConfirmDeleteAccountPayloadSelect, + RevokeOrgApiKeyPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, ProvisionNewUserPayloadSelect, @@ -76,7 +86,9 @@ import type { SignUpPayloadSelect, SignInPayloadSelect, LinkIdentityPayloadSelect, + CreateOrgPrincipalPayloadSelect, ExtendTokenExpiresPayloadSelect, + CreateOrgApiKeyPayloadSelect, CreateApiKeyPayloadSelect, RequestCrossOriginTokenPayloadSelect, ForgotPasswordPayloadSelect, @@ -93,6 +105,9 @@ export interface SendAccountDeletionEmailVariables { export interface CheckPasswordVariables { input: CheckPasswordInput; } +export interface DeleteOrgPrincipalVariables { + input: DeleteOrgPrincipalInput; +} export interface DisconnectAccountVariables { input: DisconnectAccountInput; } @@ -111,6 +126,9 @@ export interface VerifyTotpVariables { export interface ConfirmDeleteAccountVariables { input: ConfirmDeleteAccountInput; } +export interface RevokeOrgApiKeyVariables { + input: RevokeOrgApiKeyInput; +} export interface SetPasswordVariables { input: SetPasswordInput; } @@ -141,9 +159,15 @@ export interface SignInVariables { export interface LinkIdentityVariables { input: LinkIdentityInput; } +export interface CreateOrgPrincipalVariables { + input: CreateOrgPrincipalInput; +} export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; } +export interface CreateOrgApiKeyVariables { + input: CreateOrgApiKeyInput; +} export interface CreateApiKeyVariables { input: CreateApiKeyInput; } @@ -255,6 +279,35 @@ export function createMutationOperations(client: OrmClient) { 'CheckPasswordPayload' ), }), + deleteOrgPrincipal: ( + args: DeleteOrgPrincipalVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + deleteOrgPrincipal: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'DeleteOrgPrincipal', + fieldName: 'deleteOrgPrincipal', + ...buildCustomDocument( + 'mutation', + 'DeleteOrgPrincipal', + 'deleteOrgPrincipal', + options.select, + args, + [ + { + name: 'input', + type: 'DeleteOrgPrincipalInput!', + }, + ], + connectionFieldsMap, + 'DeleteOrgPrincipalPayload' + ), + }), disconnectAccount: ( args: DisconnectAccountVariables, options: { @@ -429,6 +482,35 @@ export function createMutationOperations(client: OrmClient) { 'ConfirmDeleteAccountPayload' ), }), + revokeOrgApiKey: ( + args: RevokeOrgApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeOrgApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeOrgApiKey', + fieldName: 'revokeOrgApiKey', + ...buildCustomDocument( + 'mutation', + 'RevokeOrgApiKey', + 'revokeOrgApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeOrgApiKeyInput!', + }, + ], + connectionFieldsMap, + 'RevokeOrgApiKeyPayload' + ), + }), setPassword: ( args: SetPasswordVariables, options: { @@ -719,6 +801,35 @@ export function createMutationOperations(client: OrmClient) { 'LinkIdentityPayload' ), }), + createOrgPrincipal: ( + args: CreateOrgPrincipalVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + createOrgPrincipal: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'CreateOrgPrincipal', + fieldName: 'createOrgPrincipal', + ...buildCustomDocument( + 'mutation', + 'CreateOrgPrincipal', + 'createOrgPrincipal', + options.select, + args, + [ + { + name: 'input', + type: 'CreateOrgPrincipalInput!', + }, + ], + connectionFieldsMap, + 'CreateOrgPrincipalPayload' + ), + }), extendTokenExpires: ( args: ExtendTokenExpiresVariables, options: { @@ -748,6 +859,35 @@ export function createMutationOperations(client: OrmClient) { 'ExtendTokenExpiresPayload' ), }), + createOrgApiKey: ( + args: CreateOrgApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + createOrgApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'CreateOrgApiKey', + fieldName: 'createOrgApiKey', + ...buildCustomDocument( + 'mutation', + 'CreateOrgApiKey', + 'createOrgApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'CreateOrgApiKeyInput!', + }, + ], + connectionFieldsMap, + 'CreateOrgApiKeyPayload' + ), + }), createApiKey: ( args: CreateApiKeyVariables, options: { diff --git a/sdk/constructive-sdk/src/auth/orm/query/index.ts b/sdk/constructive-sdk/src/auth/orm/query/index.ts index 408632294d..c91b14032e 100644 --- a/sdk/constructive-sdk/src/auth/orm/query/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/query/index.ts @@ -32,18 +32,18 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentIpAddress: (options?: { select?: Record }) => + currentUserId: (options?: { select?: Record }) => new QueryBuilder<{ - currentIpAddress: string | null; + currentUserId: string | null; }>({ client, operation: 'query', - operationName: 'CurrentIpAddress', - fieldName: 'currentIpAddress', + operationName: 'CurrentUserId', + fieldName: 'currentUserId', ...buildCustomDocument( 'query', - 'CurrentIpAddress', - 'currentIpAddress', + 'CurrentUserId', + 'currentUserId', options?.select, undefined, [], @@ -51,18 +51,18 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentUserId: (options?: { select?: Record }) => + currentIpAddress: (options?: { select?: Record }) => new QueryBuilder<{ - currentUserId: string | null; + currentIpAddress: string | null; }>({ client, operation: 'query', - operationName: 'CurrentUserId', - fieldName: 'currentUserId', + operationName: 'CurrentIpAddress', + fieldName: 'currentIpAddress', ...buildCustomDocument( 'query', - 'CurrentUserId', - 'currentUserId', + 'CurrentIpAddress', + 'currentIpAddress', options?.select, undefined, [], diff --git a/sdk/constructive-sdk/src/compute/README.md b/sdk/constructive-sdk/src/compute/README.md index 53845f0511..c405062545 100644 --- a/sdk/constructive-sdk/src/compute/README.md +++ b/sdk/constructive-sdk/src/compute/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 18 +- **Tables:** 22 - **Custom queries:** 1 - **Custom mutations:** 14 diff --git a/sdk/constructive-sdk/src/compute/orm/README.md b/sdk/constructive-sdk/src/compute/orm/README.md index c266bdfcb7..2ea41b7b40 100644 --- a/sdk/constructive-sdk/src/compute/orm/README.md +++ b/sdk/constructive-sdk/src/compute/orm/README.md @@ -24,19 +24,23 @@ const db = createClient({ | `getAllRecord` | findMany, findOne, create, update, delete | | `functionApiBinding` | findMany, findOne, create, update, delete | | `functionDeployment` | findMany, findOne, create, update, delete | +| `resource` | findMany, findOne, create, update, delete | | `functionGraphRef` | findMany, findOne, create, update, delete | | `functionGraphStore` | findMany, findOne, create, update, delete | | `functionGraphObject` | findMany, findOne, create, update, delete | | `functionDeploymentEvent` | findMany, findOne, create, update, delete | | `orgFunctionExecutionLog` | findMany, findOne, create, update, delete | +| `resourceEvent` | findMany, findOne, create, update, delete | | `functionGraphExecutionOutput` | findMany, findOne, create, update, delete | | `functionGraphCommit` | findMany, findOne, create, update, delete | | `secretDefinition` | findMany, findOne, create, update, delete | | `functionExecutionLog` | findMany, findOne, create, update, delete | -| `functionGraphExecutionNodeState` | findMany, findOne, create, update, delete | | `functionGraph` | findMany, findOne, create, update, delete | +| `functionGraphExecutionNodeState` | findMany, findOne, create, update, delete | +| `platformNamespace` | findMany, findOne, create, update, delete | | `orgFunctionInvocation` | findMany, findOne, create, update, delete | | `functionInvocation` | findMany, findOne, create, update, delete | +| `platformNamespaceEvent` | findMany, findOne, create, update, delete | | `functionGraphExecution` | findMany, findOne, create, update, delete | | `functionDefinition` | findMany, findOne, create, update, delete | @@ -154,6 +158,51 @@ const updated = await db.functionDeployment.update({ where: { id: '' }, da const deleted = await db.functionDeployment.delete({ where: { id: '' } }).execute(); ``` +### `db.resource` + +CRUD operations for Resource records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `updatedBy` | UUID | Yes | +| `namespaceId` | UUID | Yes | +| `kind` | String | Yes | +| `name` | String | Yes | +| `slug` | String | Yes | +| `spec` | JSON | Yes | +| `status` | String | Yes | +| `statusObserved` | JSON | Yes | +| `lastError` | String | Yes | +| `errorCount` | Int | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | +| `databaseId` | UUID | Yes | + +**Operations:** + +```typescript +// List all resource records +const items = await db.resource.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, namespaceId: true, kind: true, name: true, slug: true, spec: true, status: true, statusObserved: true, lastError: true, errorCount: true, labels: true, annotations: true, databaseId: true } }).execute(); + +// Get one by id +const item = await db.resource.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, namespaceId: true, kind: true, name: true, slug: true, spec: true, status: true, statusObserved: true, lastError: true, errorCount: true, labels: true, annotations: true, databaseId: true } }).execute(); + +// Create +const created = await db.resource.create({ data: { createdBy: '', updatedBy: '', namespaceId: '', kind: '', name: '', slug: '', spec: '', status: '', statusObserved: '', lastError: '', errorCount: '', labels: '', annotations: '', databaseId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.resource.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.resource.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphRef` CRUD operations for FunctionGraphRef records. @@ -326,6 +375,42 @@ const updated = await db.orgFunctionExecutionLog.update({ where: { id: '' const deleted = await db.orgFunctionExecutionLog.delete({ where: { id: '' } }).execute(); ``` +### `db.resourceEvent` + +CRUD operations for ResourceEvent records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `resourceId` | UUID | Yes | +| `eventType` | String | Yes | +| `actorId` | UUID | Yes | +| `message` | String | Yes | +| `metadata` | JSON | Yes | +| `databaseId` | UUID | Yes | + +**Operations:** + +```typescript +// List all resourceEvent records +const items = await db.resourceEvent.findMany({ select: { createdAt: true, id: true, resourceId: true, eventType: true, actorId: true, message: true, metadata: true, databaseId: true } }).execute(); + +// Get one by id +const item = await db.resourceEvent.findOne({ id: '', select: { createdAt: true, id: true, resourceId: true, eventType: true, actorId: true, message: true, metadata: true, databaseId: true } }).execute(); + +// Create +const created = await db.resourceEvent.create({ data: { resourceId: '', eventType: '', actorId: '', message: '', metadata: '', databaseId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.resourceEvent.update({ where: { id: '' }, data: { resourceId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.resourceEvent.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphExecutionOutput` CRUD operations for FunctionGraphExecutionOutput records. @@ -470,6 +555,46 @@ const updated = await db.functionExecutionLog.update({ where: { id: '' }, const deleted = await db.functionExecutionLog.delete({ where: { id: '' } }).execute(); ``` +### `db.functionGraph` + +CRUD operations for FunctionGraph records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `storeId` | UUID | Yes | +| `context` | String | Yes | +| `name` | String | Yes | +| `description` | String | Yes | +| `definitionsCommitId` | UUID | Yes | +| `isValid` | Boolean | Yes | +| `validationErrors` | JSON | Yes | +| `createdBy` | UUID | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all functionGraph records +const items = await db.functionGraph.findMany({ select: { id: true, databaseId: true, storeId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.functionGraph.findOne({ id: '', select: { id: true, databaseId: true, storeId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.functionGraph.create({ data: { databaseId: '', storeId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.functionGraph.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.functionGraph.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphExecutionNodeState` CRUD operations for FunctionGraphExecutionNodeState records. @@ -510,45 +635,45 @@ const updated = await db.functionGraphExecutionNodeState.update({ where: { id: ' const deleted = await db.functionGraphExecutionNodeState.delete({ where: { id: '' } }).execute(); ``` -### `db.functionGraph` +### `db.platformNamespace` -CRUD operations for FunctionGraph records. +CRUD operations for PlatformNamespace records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | -| `databaseId` | UUID | Yes | -| `storeId` | UUID | Yes | -| `entityId` | UUID | Yes | -| `context` | String | Yes | -| `name` | String | Yes | -| `description` | String | Yes | -| `definitionsCommitId` | UUID | Yes | -| `isValid` | Boolean | Yes | -| `validationErrors` | JSON | Yes | -| `createdBy` | UUID | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | +| `name` | String | Yes | +| `namespaceName` | String | Yes | +| `description` | String | Yes | +| `isActive` | Boolean | Yes | +| `labels` | JSON | Yes | +| `annotations` | JSON | Yes | +| `databaseId` | UUID | Yes | +| `sourceDatabaseId` | UUID | Yes | +| `sourceScope` | String | Yes | +| `isManaged` | Boolean | Yes | **Operations:** ```typescript -// List all functionGraph records -const items = await db.functionGraph.findMany({ select: { id: true, databaseId: true, storeId: true, entityId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); +// List all platformNamespace records +const items = await db.platformNamespace.findMany({ select: { id: true, createdAt: true, updatedAt: true, name: true, namespaceName: true, description: true, isActive: true, labels: true, annotations: true, databaseId: true, sourceDatabaseId: true, sourceScope: true, isManaged: true } }).execute(); // Get one by id -const item = await db.functionGraph.findOne({ id: '', select: { id: true, databaseId: true, storeId: true, entityId: true, context: true, name: true, description: true, definitionsCommitId: true, isValid: true, validationErrors: true, createdBy: true, createdAt: true, updatedAt: true } }).execute(); +const item = await db.platformNamespace.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, name: true, namespaceName: true, description: true, isActive: true, labels: true, annotations: true, databaseId: true, sourceDatabaseId: true, sourceScope: true, isManaged: true } }).execute(); // Create -const created = await db.functionGraph.create({ data: { databaseId: '', storeId: '', entityId: '', context: '', name: '', description: '', definitionsCommitId: '', isValid: '', validationErrors: '', createdBy: '' }, select: { id: true } }).execute(); +const created = await db.platformNamespace.create({ data: { name: '', namespaceName: '', description: '', isActive: '', labels: '', annotations: '', databaseId: '', sourceDatabaseId: '', sourceScope: '', isManaged: '' }, select: { id: true } }).execute(); // Update -const updated = await db.functionGraph.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.platformNamespace.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.functionGraph.delete({ where: { id: '' } }).execute(); +const deleted = await db.platformNamespace.delete({ where: { id: '' } }).execute(); ``` ### `db.orgFunctionInvocation` @@ -636,6 +761,49 @@ const updated = await db.functionInvocation.update({ where: { id: '' }, da const deleted = await db.functionInvocation.delete({ where: { id: '' } }).execute(); ``` +### `db.platformNamespaceEvent` + +CRUD operations for PlatformNamespaceEvent records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `namespaceId` | UUID | Yes | +| `eventType` | String | Yes | +| `actorId` | UUID | Yes | +| `message` | String | Yes | +| `metadata` | JSON | Yes | +| `cpuMillicores` | Int | Yes | +| `memoryBytes` | BigInt | Yes | +| `storageBytes` | BigInt | Yes | +| `networkIngressBytes` | BigInt | Yes | +| `networkEgressBytes` | BigInt | Yes | +| `podCount` | Int | Yes | +| `metrics` | JSON | Yes | +| `databaseId` | UUID | Yes | + +**Operations:** + +```typescript +// List all platformNamespaceEvent records +const items = await db.platformNamespaceEvent.findMany({ select: { createdAt: true, id: true, namespaceId: true, eventType: true, actorId: true, message: true, metadata: true, cpuMillicores: true, memoryBytes: true, storageBytes: true, networkIngressBytes: true, networkEgressBytes: true, podCount: true, metrics: true, databaseId: true } }).execute(); + +// Get one by id +const item = await db.platformNamespaceEvent.findOne({ id: '', select: { createdAt: true, id: true, namespaceId: true, eventType: true, actorId: true, message: true, metadata: true, cpuMillicores: true, memoryBytes: true, storageBytes: true, networkIngressBytes: true, networkEgressBytes: true, podCount: true, metrics: true, databaseId: true } }).execute(); + +// Create +const created = await db.platformNamespaceEvent.create({ data: { namespaceId: '', eventType: '', actorId: '', message: '', metadata: '', cpuMillicores: '', memoryBytes: '', storageBytes: '', networkIngressBytes: '', networkEgressBytes: '', podCount: '', metrics: '', databaseId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformNamespaceEvent.update({ where: { id: '' }, data: { namespaceId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformNamespaceEvent.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionGraphExecution` CRUD operations for FunctionGraphExecution records. @@ -649,7 +817,6 @@ CRUD operations for FunctionGraphExecution records. | `graphId` | UUID | Yes | | `invocationId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `entityId` | UUID | Yes | | `outputNode` | String | Yes | | `outputPort` | String | Yes | | `status` | String | Yes | @@ -673,13 +840,13 @@ CRUD operations for FunctionGraphExecution records. ```typescript // List all functionGraphExecution records -const items = await db.functionGraphExecution.findMany({ select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, entityId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); +const items = await db.functionGraphExecution.findMany({ select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); // Get one by id -const item = await db.functionGraphExecution.findOne({ id: '', select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, entityId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); +const item = await db.functionGraphExecution.findOne({ id: '', select: { startedAt: true, id: true, graphId: true, invocationId: true, databaseId: true, outputNode: true, outputPort: true, status: true, inputPayload: true, outputPayload: true, nodeOutputs: true, executionPlan: true, currentWave: true, parentExecutionId: true, parentNodeName: true, definitionsCommitId: true, tickCount: true, completedAt: true, maxTicks: true, maxPendingJobs: true, timeoutAt: true, errorCode: true, errorMessage: true } }).execute(); // Create -const created = await db.functionGraphExecution.create({ data: { startedAt: '', graphId: '', invocationId: '', databaseId: '', entityId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }, select: { id: true } }).execute(); +const created = await db.functionGraphExecution.create({ data: { startedAt: '', graphId: '', invocationId: '', databaseId: '', outputNode: '', outputPort: '', status: '', inputPayload: '', outputPayload: '', nodeOutputs: '', executionPlan: '', currentWave: '', parentExecutionId: '', parentNodeName: '', definitionsCommitId: '', tickCount: '', completedAt: '', maxTicks: '', maxPendingJobs: '', timeoutAt: '', errorCode: '', errorMessage: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionGraphExecution.update({ where: { id: '' }, data: { startedAt: '' }, select: { id: true } }).execute(); @@ -882,49 +1049,49 @@ addNodeAndSave const result = await db.mutation.addNodeAndSave({ input: '' }).execute(); ``` -### `db.mutation.addEdge` +### `db.mutation.importGraphJson` -addEdge +importGraphJson - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | AddEdgeInput (required) | + | `input` | ImportGraphJsonInput (required) | ```typescript -const result = await db.mutation.addEdge({ input: '' }).execute(); +const result = await db.mutation.importGraphJson({ input: '' }).execute(); ``` -### `db.mutation.addNode` +### `db.mutation.addEdge` -addNode +addEdge - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | AddNodeInput (required) | + | `input` | AddEdgeInput (required) | ```typescript -const result = await db.mutation.addNode({ input: '' }).execute(); +const result = await db.mutation.addEdge({ input: '' }).execute(); ``` -### `db.mutation.importGraphJson` +### `db.mutation.addNode` -importGraphJson +addNode - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | ImportGraphJsonInput (required) | + | `input` | AddNodeInput (required) | ```typescript -const result = await db.mutation.importGraphJson({ input: '' }).execute(); +const result = await db.mutation.addNode({ input: '' }).execute(); ``` ### `db.mutation.insertNodeAtPath` diff --git a/sdk/constructive-sdk/src/compute/orm/index.ts b/sdk/constructive-sdk/src/compute/orm/index.ts index 99193c1d28..ba7ce4651f 100644 --- a/sdk/constructive-sdk/src/compute/orm/index.ts +++ b/sdk/constructive-sdk/src/compute/orm/index.ts @@ -8,19 +8,23 @@ import type { OrmClientConfig } from './client'; import { GetAllRecordModel } from './models/getAllRecord'; import { FunctionApiBindingModel } from './models/functionApiBinding'; import { FunctionDeploymentModel } from './models/functionDeployment'; +import { ResourceModel } from './models/resource'; import { FunctionGraphRefModel } from './models/functionGraphRef'; import { FunctionGraphStoreModel } from './models/functionGraphStore'; import { FunctionGraphObjectModel } from './models/functionGraphObject'; import { FunctionDeploymentEventModel } from './models/functionDeploymentEvent'; import { OrgFunctionExecutionLogModel } from './models/orgFunctionExecutionLog'; +import { ResourceEventModel } from './models/resourceEvent'; import { FunctionGraphExecutionOutputModel } from './models/functionGraphExecutionOutput'; import { FunctionGraphCommitModel } from './models/functionGraphCommit'; import { SecretDefinitionModel } from './models/secretDefinition'; import { FunctionExecutionLogModel } from './models/functionExecutionLog'; -import { FunctionGraphExecutionNodeStateModel } from './models/functionGraphExecutionNodeState'; import { FunctionGraphModel } from './models/functionGraph'; +import { FunctionGraphExecutionNodeStateModel } from './models/functionGraphExecutionNodeState'; +import { PlatformNamespaceModel } from './models/platformNamespace'; import { OrgFunctionInvocationModel } from './models/orgFunctionInvocation'; import { FunctionInvocationModel } from './models/functionInvocation'; +import { PlatformNamespaceEventModel } from './models/platformNamespaceEvent'; import { FunctionGraphExecutionModel } from './models/functionGraphExecution'; import { FunctionDefinitionModel } from './models/functionDefinition'; import { createQueryOperations } from './query'; @@ -61,19 +65,23 @@ export function createClient(config: OrmClientConfig) { getAllRecord: new GetAllRecordModel(client), functionApiBinding: new FunctionApiBindingModel(client), functionDeployment: new FunctionDeploymentModel(client), + resource: new ResourceModel(client), functionGraphRef: new FunctionGraphRefModel(client), functionGraphStore: new FunctionGraphStoreModel(client), functionGraphObject: new FunctionGraphObjectModel(client), functionDeploymentEvent: new FunctionDeploymentEventModel(client), orgFunctionExecutionLog: new OrgFunctionExecutionLogModel(client), + resourceEvent: new ResourceEventModel(client), functionGraphExecutionOutput: new FunctionGraphExecutionOutputModel(client), functionGraphCommit: new FunctionGraphCommitModel(client), secretDefinition: new SecretDefinitionModel(client), functionExecutionLog: new FunctionExecutionLogModel(client), - functionGraphExecutionNodeState: new FunctionGraphExecutionNodeStateModel(client), functionGraph: new FunctionGraphModel(client), + functionGraphExecutionNodeState: new FunctionGraphExecutionNodeStateModel(client), + platformNamespace: new PlatformNamespaceModel(client), orgFunctionInvocation: new OrgFunctionInvocationModel(client), functionInvocation: new FunctionInvocationModel(client), + platformNamespaceEvent: new PlatformNamespaceEventModel(client), functionGraphExecution: new FunctionGraphExecutionModel(client), functionDefinition: new FunctionDefinitionModel(client), query: createQueryOperations(client), diff --git a/sdk/constructive-sdk/src/compute/orm/input-types.ts b/sdk/constructive-sdk/src/compute/orm/input-types.ts index f88c3e77d1..6b89295abc 100644 --- a/sdk/constructive-sdk/src/compute/orm/input-types.ts +++ b/sdk/constructive-sdk/src/compute/orm/input-types.ts @@ -292,6 +292,38 @@ export interface FunctionDeployment { /** Database that owns this resource (database-scoped isolation) */ databaseId?: string | null; } +/** Unified K8s resource declarations — stores desired state (spec) and observed state (status) for all resource kinds within a namespace */ +export interface Resource { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + createdBy?: string | null; + updatedBy?: string | null; + /** Namespace this resource belongs to (security boundary, maps to K8s namespace) */ + namespaceId?: string | null; + /** Resource kind: Deployment, StatefulSet, Service, Ingress, Certificate */ + kind?: string | null; + /** Human-readable resource name */ + name?: string | null; + /** URL-safe identifier, unique within (namespace_id, kind) */ + slug?: string | null; + /** Desired state — kind-specific configuration (image, ports, resources, etc.). Opaque to DB; validated by K8s. */ + spec?: Record | null; + /** Resource lifecycle status: pending, provisioning, active, failed, draining, deleting */ + status?: string | null; + /** Observed state from K8s — populated by handlers after reconciliation (service_url, clone_url, replicas, etc.) */ + statusObserved?: Record | null; + /** Most recent provisioning or runtime error message */ + lastError?: string | null; + /** Cumulative error count for this resource */ + errorCount?: number | null; + /** Key/value pairs for selecting and filtering resources */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; +} /** Branch heads — mutable pointers into the commit chain */ export interface FunctionGraphRef { /** Unique ref identifier */ @@ -371,6 +403,25 @@ export interface OrgFunctionExecutionLog { /** User who triggered the execution (NULL for system/cron) */ actorId?: string | null; } +/** Resource lifecycle events — audit log of provisioning, updates, and failure events */ +export interface ResourceEvent { + /** Event timestamp (partition key) */ + createdAt?: string | null; + /** Unique event identifier */ + id: string; + /** Resource this event belongs to */ + resourceId?: string | null; + /** Event type: provisioned, provisioning, updated, failed, deprovisioned, health_check */ + eventType?: string | null; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string | null; + /** Human-readable description of the event */ + message?: string | null; + /** Structured context (old/new values, error details, etc.) */ + metadata?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; +} /** Content-addressed store for execution outputs — hash-referenced from node_outputs */ export interface FunctionGraphExecutionOutput { /** Timestamp of output creation */ @@ -444,6 +495,33 @@ export interface FunctionExecutionLog { /** Database that owns this resource (database-scoped isolation) */ databaseId?: string | null; } +/** Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store */ +export interface FunctionGraph { + /** Unique graph identifier */ + id: string; + /** Database scope for multi-tenant isolation */ + databaseId?: string | null; + /** Graph store (Merkle store) holding the graph definition */ + storeId?: string | null; + /** Evaluator/runtime context (function, js, sql, system) */ + context?: string | null; + /** Graph name (unique per database) */ + name?: string | null; + /** Human-readable description of the graph */ + description?: string | null; + /** Pinned definitions store commit for deterministic evaluation */ + definitionsCommitId?: string | null; + /** Whether graph passes structural validation */ + isValid?: boolean | null; + /** Array of validation error objects when is_valid = false */ + validationErrors?: Record | null; + /** Actor who created this graph */ + createdBy?: string | null; + /** Timestamp of graph creation */ + createdAt?: string | null; + /** Timestamp of last modification */ + updatedAt?: string | null; +} /** Per-node execution state — tracks individual node lifecycle for debugging */ export interface FunctionGraphExecutionNodeState { /** Timestamp of node state creation (partition key) */ @@ -471,34 +549,31 @@ export interface FunctionGraphExecutionNodeState { /** FK to execution_outputs — content-addressed output blob for this node */ outputId?: string | null; } -/** Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store */ -export interface FunctionGraph { - /** Unique graph identifier */ +/** Logical namespace containers for grouping secrets, config, functions, and other resources */ +export interface PlatformNamespace { id: string; - /** Database scope for multi-tenant isolation */ - databaseId?: string | null; - /** Graph store (Merkle store) holding the graph definition */ - storeId?: string | null; - /** Entity context (org/team) for scoped billing */ - entityId?: string | null; - /** Evaluator/runtime context (function, js, sql, system) */ - context?: string | null; - /** Graph name (unique per database) */ - name?: string | null; - /** Human-readable description of the graph */ - description?: string | null; - /** Pinned definitions store commit for deterministic evaluation */ - definitionsCommitId?: string | null; - /** Whether graph passes structural validation */ - isValid?: boolean | null; - /** Array of validation error objects when is_valid = false */ - validationErrors?: Record | null; - /** Actor who created this graph */ - createdBy?: string | null; - /** Timestamp of graph creation */ createdAt?: string | null; - /** Timestamp of last modification */ updatedAt?: string | null; + /** Human-readable namespace name (e.g. default, production, oauth) */ + name?: string | null; + /** Globally unique computed namespace identifier via inflection.underscore */ + namespaceName?: string | null; + /** Optional human-readable description of this namespace */ + description?: string | null; + /** Whether this namespace is active (soft-disable for filtering) */ + isActive?: boolean | null; + /** Key/value pairs for selecting and filtering namespaces */ + labels?: Record | null; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Database that created this namespace (NULL for platform-native namespaces) */ + sourceDatabaseId?: string | null; + /** Origin scope: platform, org, app — indicates where this namespace was created */ + sourceScope?: string | null; + /** true = created by a child scope mirror trigger, false = platform-native */ + isManaged?: boolean | null; } /** Function invocation log — INSERT to call a function (business-layer, metered). Linked to definitions by task_identifier string. */ export interface OrgFunctionInvocation { @@ -564,6 +639,39 @@ export interface FunctionInvocation { /** Groups all node invocations from a single flow graph execution */ graphExecutionId?: string | null; } +/** Namespace lifecycle events — audit log of creation, activation, deactivation, label changes */ +export interface PlatformNamespaceEvent { + /** Event timestamp (partition key) */ + createdAt?: string | null; + /** Unique event identifier */ + id: string; + /** Namespace this event belongs to */ + namespaceId?: string | null; + /** Event type: created, activated, deactivated, labels_updated, annotations_updated, renamed */ + eventType?: string | null; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string | null; + /** Human-readable description of the event */ + message?: string | null; + /** Structured context (old/new values, labels diff, etc.) */ + metadata?: Record | null; + /** CPU usage in millicores at time of event */ + cpuMillicores?: number | null; + /** Memory usage in bytes at time of event */ + memoryBytes?: string | null; + /** Storage usage in bytes at time of event */ + storageBytes?: string | null; + /** Network ingress in bytes during event window */ + networkIngressBytes?: string | null; + /** Network egress in bytes during event window */ + networkEgressBytes?: string | null; + /** Number of active pods in the namespace at time of event */ + podCount?: number | null; + /** Additional resource metrics (gpu, replicas, quotas, etc.) */ + metrics?: Record | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; +} /** Ephemeral execution state for flow graph evaluation */ export interface FunctionGraphExecution { /** Execution start timestamp */ @@ -576,8 +684,6 @@ export interface FunctionGraphExecution { invocationId?: string | null; /** Scope for multi-tenant isolation */ databaseId?: string | null; - /** Entity context (org/team) for scoped billing */ - entityId?: string | null; /** Target output boundary node name to resolve */ outputNode?: string | null; /** Target output port name (default: value) */ @@ -692,20 +798,30 @@ export interface FunctionApiBindingRelations { } export interface FunctionDeploymentRelations { functionDefinition?: FunctionDefinition | null; + namespace?: PlatformNamespace | null; +} +export interface ResourceRelations { + namespace?: PlatformNamespace | null; } export interface FunctionGraphRefRelations {} export interface FunctionGraphStoreRelations {} export interface FunctionGraphObjectRelations {} export interface FunctionDeploymentEventRelations {} export interface OrgFunctionExecutionLogRelations {} +export interface ResourceEventRelations {} export interface FunctionGraphExecutionOutputRelations {} export interface FunctionGraphCommitRelations {} export interface SecretDefinitionRelations {} export interface FunctionExecutionLogRelations {} -export interface FunctionGraphExecutionNodeStateRelations {} export interface FunctionGraphRelations {} +export interface FunctionGraphExecutionNodeStateRelations {} +export interface PlatformNamespaceRelations { + functionDeploymentsByNamespaceId?: ConnectionResult; + resourcesByNamespaceId?: ConnectionResult; +} export interface OrgFunctionInvocationRelations {} export interface FunctionInvocationRelations {} +export interface PlatformNamespaceEventRelations {} export interface FunctionGraphExecutionRelations { graph?: FunctionGraph | null; } @@ -717,6 +833,7 @@ export interface FunctionDefinitionRelations { export type GetAllRecordWithRelations = GetAllRecord & GetAllRecordRelations; export type FunctionApiBindingWithRelations = FunctionApiBinding & FunctionApiBindingRelations; export type FunctionDeploymentWithRelations = FunctionDeployment & FunctionDeploymentRelations; +export type ResourceWithRelations = Resource & ResourceRelations; export type FunctionGraphRefWithRelations = FunctionGraphRef & FunctionGraphRefRelations; export type FunctionGraphStoreWithRelations = FunctionGraphStore & FunctionGraphStoreRelations; export type FunctionGraphObjectWithRelations = FunctionGraphObject & FunctionGraphObjectRelations; @@ -724,18 +841,22 @@ export type FunctionDeploymentEventWithRelations = FunctionDeploymentEvent & FunctionDeploymentEventRelations; export type OrgFunctionExecutionLogWithRelations = OrgFunctionExecutionLog & OrgFunctionExecutionLogRelations; +export type ResourceEventWithRelations = ResourceEvent & ResourceEventRelations; export type FunctionGraphExecutionOutputWithRelations = FunctionGraphExecutionOutput & FunctionGraphExecutionOutputRelations; export type FunctionGraphCommitWithRelations = FunctionGraphCommit & FunctionGraphCommitRelations; export type SecretDefinitionWithRelations = SecretDefinition & SecretDefinitionRelations; export type FunctionExecutionLogWithRelations = FunctionExecutionLog & FunctionExecutionLogRelations; +export type FunctionGraphWithRelations = FunctionGraph & FunctionGraphRelations; export type FunctionGraphExecutionNodeStateWithRelations = FunctionGraphExecutionNodeState & FunctionGraphExecutionNodeStateRelations; -export type FunctionGraphWithRelations = FunctionGraph & FunctionGraphRelations; +export type PlatformNamespaceWithRelations = PlatformNamespace & PlatformNamespaceRelations; export type OrgFunctionInvocationWithRelations = OrgFunctionInvocation & OrgFunctionInvocationRelations; export type FunctionInvocationWithRelations = FunctionInvocation & FunctionInvocationRelations; +export type PlatformNamespaceEventWithRelations = PlatformNamespaceEvent & + PlatformNamespaceEventRelations; export type FunctionGraphExecutionWithRelations = FunctionGraphExecution & FunctionGraphExecutionRelations; export type FunctionDefinitionWithRelations = FunctionDefinition & FunctionDefinitionRelations; @@ -779,6 +900,31 @@ export type FunctionDeploymentSelect = { functionDefinition?: { select: FunctionDefinitionSelect; }; + namespace?: { + select: PlatformNamespaceSelect; + }; +}; +export type ResourceSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + createdBy?: boolean; + updatedBy?: boolean; + namespaceId?: boolean; + kind?: boolean; + name?: boolean; + slug?: boolean; + spec?: boolean; + status?: boolean; + statusObserved?: boolean; + lastError?: boolean; + errorCount?: boolean; + labels?: boolean; + annotations?: boolean; + databaseId?: boolean; + namespace?: { + select: PlatformNamespaceSelect; + }; }; export type FunctionGraphRefSelect = { id?: boolean; @@ -822,6 +968,16 @@ export type OrgFunctionExecutionLogSelect = { metadata?: boolean; actorId?: boolean; }; +export type ResourceEventSelect = { + createdAt?: boolean; + id?: boolean; + resourceId?: boolean; + eventType?: boolean; + actorId?: boolean; + message?: boolean; + metadata?: boolean; + databaseId?: boolean; +}; export type FunctionGraphExecutionOutputSelect = { createdAt?: boolean; id?: boolean; @@ -862,6 +1018,20 @@ export type FunctionExecutionLogSelect = { actorId?: boolean; databaseId?: boolean; }; +export type FunctionGraphSelect = { + id?: boolean; + databaseId?: boolean; + storeId?: boolean; + context?: boolean; + name?: boolean; + description?: boolean; + definitionsCommitId?: boolean; + isValid?: boolean; + validationErrors?: boolean; + createdBy?: boolean; + createdAt?: boolean; + updatedAt?: boolean; +}; export type FunctionGraphExecutionNodeStateSelect = { createdAt?: boolean; id?: boolean; @@ -876,20 +1046,32 @@ export type FunctionGraphExecutionNodeStateSelect = { errorMessage?: boolean; outputId?: boolean; }; -export type FunctionGraphSelect = { +export type PlatformNamespaceSelect = { id?: boolean; - databaseId?: boolean; - storeId?: boolean; - entityId?: boolean; - context?: boolean; - name?: boolean; - description?: boolean; - definitionsCommitId?: boolean; - isValid?: boolean; - validationErrors?: boolean; - createdBy?: boolean; createdAt?: boolean; updatedAt?: boolean; + name?: boolean; + namespaceName?: boolean; + description?: boolean; + isActive?: boolean; + labels?: boolean; + annotations?: boolean; + databaseId?: boolean; + sourceDatabaseId?: boolean; + sourceScope?: boolean; + isManaged?: boolean; + functionDeploymentsByNamespaceId?: { + select: FunctionDeploymentSelect; + first?: number; + filter?: FunctionDeploymentFilter; + orderBy?: FunctionDeploymentOrderBy[]; + }; + resourcesByNamespaceId?: { + select: ResourceSelect; + first?: number; + filter?: ResourceFilter; + orderBy?: ResourceOrderBy[]; + }; }; export type OrgFunctionInvocationSelect = { createdAt?: boolean; @@ -924,13 +1106,29 @@ export type FunctionInvocationSelect = { parentInvocationId?: boolean; graphExecutionId?: boolean; }; +export type PlatformNamespaceEventSelect = { + createdAt?: boolean; + id?: boolean; + namespaceId?: boolean; + eventType?: boolean; + actorId?: boolean; + message?: boolean; + metadata?: boolean; + cpuMillicores?: boolean; + memoryBytes?: boolean; + storageBytes?: boolean; + networkIngressBytes?: boolean; + networkEgressBytes?: boolean; + podCount?: boolean; + metrics?: boolean; + databaseId?: boolean; +}; export type FunctionGraphExecutionSelect = { startedAt?: boolean; id?: boolean; graphId?: boolean; invocationId?: boolean; databaseId?: boolean; - entityId?: boolean; outputNode?: boolean; outputPort?: boolean; status?: boolean; @@ -1075,6 +1273,52 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Filter by the object’s `functionDefinition` relation. */ functionDefinition?: FunctionDefinitionFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; +} +export interface ResourceFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `spec` field. */ + spec?: JSONFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `statusObserved` field. */ + statusObserved?: JSONFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `errorCount` field. */ + errorCount?: IntFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: ResourceFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceFilter[]; + /** Negates the expression. */ + not?: ResourceFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; } export interface FunctionGraphRefFilter { /** Filter by the object’s `id` field. */ @@ -1180,6 +1424,30 @@ export interface OrgFunctionExecutionLogFilter { /** Negates the expression. */ not?: OrgFunctionExecutionLogFilter; } +export interface ResourceEventFilter { + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `resourceId` field. */ + resourceId?: UUIDFilter; + /** Filter by the object’s `eventType` field. */ + eventType?: StringFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `message` field. */ + message?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: ResourceEventFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceEventFilter[]; + /** Negates the expression. */ + not?: ResourceEventFilter; +} export interface FunctionGraphExecutionOutputFilter { /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; @@ -1276,6 +1544,38 @@ export interface FunctionExecutionLogFilter { /** Negates the expression. */ not?: FunctionExecutionLogFilter; } +export interface FunctionGraphFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `storeId` field. */ + storeId?: UUIDFilter; + /** Filter by the object’s `context` field. */ + context?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `definitionsCommitId` field. */ + definitionsCommitId?: UUIDFilter; + /** Filter by the object’s `isValid` field. */ + isValid?: BooleanFilter; + /** Filter by the object’s `validationErrors` field. */ + validationErrors?: JSONFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: FunctionGraphFilter[]; + /** Checks for any expressions in this list. */ + or?: FunctionGraphFilter[]; + /** Negates the expression. */ + not?: FunctionGraphFilter; +} export interface FunctionGraphExecutionNodeStateFilter { /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; @@ -1308,39 +1608,47 @@ export interface FunctionGraphExecutionNodeStateFilter { /** Negates the expression. */ not?: FunctionGraphExecutionNodeStateFilter; } -export interface FunctionGraphFilter { +export interface PlatformNamespaceFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `storeId` field. */ - storeId?: UUIDFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; - /** Filter by the object’s `context` field. */ - context?: StringFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `definitionsCommitId` field. */ - definitionsCommitId?: UUIDFilter; - /** Filter by the object’s `isValid` field. */ - isValid?: BooleanFilter; - /** Filter by the object’s `validationErrors` field. */ - validationErrors?: JSONFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `namespaceName` field. */ + namespaceName?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `sourceDatabaseId` field. */ + sourceDatabaseId?: UUIDFilter; + /** Filter by the object’s `sourceScope` field. */ + sourceScope?: StringFilter; + /** Filter by the object’s `isManaged` field. */ + isManaged?: BooleanFilter; /** Checks for all expressions in this list. */ - and?: FunctionGraphFilter[]; + and?: PlatformNamespaceFilter[]; /** Checks for any expressions in this list. */ - or?: FunctionGraphFilter[]; + or?: PlatformNamespaceFilter[]; /** Negates the expression. */ - not?: FunctionGraphFilter; + not?: PlatformNamespaceFilter; + /** Filter by the object’s `functionDeploymentsByNamespaceId` relation. */ + functionDeploymentsByNamespaceId?: PlatformNamespaceToManyFunctionDeploymentFilter; + /** `functionDeploymentsByNamespaceId` exist. */ + functionDeploymentsByNamespaceIdExist?: boolean; + /** Filter by the object’s `resourcesByNamespaceId` relation. */ + resourcesByNamespaceId?: PlatformNamespaceToManyResourceFilter; + /** `resourcesByNamespaceId` exist. */ + resourcesByNamespaceIdExist?: boolean; } export interface OrgFunctionInvocationFilter { /** Filter by the object’s `createdAt` field. */ @@ -1416,6 +1724,44 @@ export interface FunctionInvocationFilter { /** Negates the expression. */ not?: FunctionInvocationFilter; } +export interface PlatformNamespaceEventFilter { + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Filter by the object’s `eventType` field. */ + eventType?: StringFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `message` field. */ + message?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `cpuMillicores` field. */ + cpuMillicores?: IntFilter; + /** Filter by the object’s `memoryBytes` field. */ + memoryBytes?: BigIntFilter; + /** Filter by the object’s `storageBytes` field. */ + storageBytes?: BigIntFilter; + /** Filter by the object’s `networkIngressBytes` field. */ + networkIngressBytes?: BigIntFilter; + /** Filter by the object’s `networkEgressBytes` field. */ + networkEgressBytes?: BigIntFilter; + /** Filter by the object’s `podCount` field. */ + podCount?: IntFilter; + /** Filter by the object’s `metrics` field. */ + metrics?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: PlatformNamespaceEventFilter[]; + /** Checks for any expressions in this list. */ + or?: PlatformNamespaceEventFilter[]; + /** Negates the expression. */ + not?: PlatformNamespaceEventFilter; +} export interface FunctionGraphExecutionFilter { /** Filter by the object’s `startedAt` field. */ startedAt?: DatetimeFilter; @@ -1427,8 +1773,6 @@ export interface FunctionGraphExecutionFilter { invocationId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; /** Filter by the object’s `outputNode` field. */ outputNode?: StringFilter; /** Filter by the object’s `outputPort` field. */ @@ -1613,6 +1957,44 @@ export type FunctionDeploymentOrderBy = | 'ANNOTATIONS_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC'; +export type ResourceOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'UPDATED_BY_ASC' + | 'UPDATED_BY_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'SPEC_ASC' + | 'SPEC_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'STATUS_OBSERVED_ASC' + | 'STATUS_OBSERVED_DESC' + | 'LAST_ERROR_ASC' + | 'LAST_ERROR_DESC' + | 'ERROR_COUNT_ASC' + | 'ERROR_COUNT_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; export type FunctionGraphRefOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1697,6 +2079,26 @@ export type OrgFunctionExecutionLogOrderBy = | 'METADATA_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC'; +export type ResourceEventOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'RESOURCE_ID_ASC' + | 'RESOURCE_ID_DESC' + | 'EVENT_TYPE_ASC' + | 'EVENT_TYPE_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'MESSAGE_ASC' + | 'MESSAGE_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; export type FunctionGraphExecutionOutputOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1777,6 +2179,34 @@ export type FunctionExecutionLogOrderBy = | 'ACTOR_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC'; +export type FunctionGraphOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'STORE_ID_ASC' + | 'STORE_ID_DESC' + | 'CONTEXT_ASC' + | 'CONTEXT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'DEFINITIONS_COMMIT_ID_ASC' + | 'DEFINITIONS_COMMIT_ID_DESC' + | 'IS_VALID_ASC' + | 'IS_VALID_DESC' + | 'VALIDATION_ERRORS_ASC' + | 'VALIDATION_ERRORS_DESC' + | 'CREATED_BY_ASC' + | 'CREATED_BY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type FunctionGraphExecutionNodeStateOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1805,36 +2235,36 @@ export type FunctionGraphExecutionNodeStateOrderBy = | 'ERROR_MESSAGE_DESC' | 'OUTPUT_ID_ASC' | 'OUTPUT_ID_DESC'; -export type FunctionGraphOrderBy = +export type PlatformNamespaceOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'STORE_ID_ASC' - | 'STORE_ID_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' - | 'CONTEXT_ASC' - | 'CONTEXT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' | 'NAME_ASC' | 'NAME_DESC' + | 'NAMESPACE_NAME_ASC' + | 'NAMESPACE_NAME_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' - | 'DEFINITIONS_COMMIT_ID_ASC' - | 'DEFINITIONS_COMMIT_ID_DESC' - | 'IS_VALID_ASC' - | 'IS_VALID_DESC' - | 'VALIDATION_ERRORS_ASC' - | 'VALIDATION_ERRORS_DESC' - | 'CREATED_BY_ASC' - | 'CREATED_BY_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'LABELS_ASC' + | 'LABELS_DESC' + | 'ANNOTATIONS_ASC' + | 'ANNOTATIONS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SOURCE_DATABASE_ID_ASC' + | 'SOURCE_DATABASE_ID_DESC' + | 'SOURCE_SCOPE_ASC' + | 'SOURCE_SCOPE_DESC' + | 'IS_MANAGED_ASC' + | 'IS_MANAGED_DESC'; export type OrgFunctionInvocationOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1901,6 +2331,40 @@ export type FunctionInvocationOrderBy = | 'PARENT_INVOCATION_ID_DESC' | 'GRAPH_EXECUTION_ID_ASC' | 'GRAPH_EXECUTION_ID_DESC'; +export type PlatformNamespaceEventOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAMESPACE_ID_ASC' + | 'NAMESPACE_ID_DESC' + | 'EVENT_TYPE_ASC' + | 'EVENT_TYPE_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'MESSAGE_ASC' + | 'MESSAGE_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'CPU_MILLICORES_ASC' + | 'CPU_MILLICORES_DESC' + | 'MEMORY_BYTES_ASC' + | 'MEMORY_BYTES_DESC' + | 'STORAGE_BYTES_ASC' + | 'STORAGE_BYTES_DESC' + | 'NETWORK_INGRESS_BYTES_ASC' + | 'NETWORK_INGRESS_BYTES_DESC' + | 'NETWORK_EGRESS_BYTES_ASC' + | 'NETWORK_EGRESS_BYTES_DESC' + | 'POD_COUNT_ASC' + | 'POD_COUNT_DESC' + | 'METRICS_ASC' + | 'METRICS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC'; export type FunctionGraphExecutionOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1915,8 +2379,6 @@ export type FunctionGraphExecutionOrderBy = | 'INVOCATION_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' | 'OUTPUT_NODE_ASC' | 'OUTPUT_NODE_DESC' | 'OUTPUT_PORT_ASC' @@ -2112,6 +2574,50 @@ export interface DeleteFunctionDeploymentInput { clientMutationId?: string; id: string; } +export interface CreateResourceInput { + clientMutationId?: string; + resource: { + createdBy?: string; + updatedBy?: string; + namespaceId: string; + kind: string; + name: string; + slug: string; + spec?: Record; + status?: string; + statusObserved?: Record; + lastError?: string; + errorCount?: number; + labels?: Record; + annotations?: Record; + databaseId: string; + }; +} +export interface ResourcePatch { + createdBy?: string | null; + updatedBy?: string | null; + namespaceId?: string | null; + kind?: string | null; + name?: string | null; + slug?: string | null; + spec?: Record | null; + status?: string | null; + statusObserved?: Record | null; + lastError?: string | null; + errorCount?: number | null; + labels?: Record | null; + annotations?: Record | null; + databaseId?: string | null; +} +export interface UpdateResourceInput { + clientMutationId?: string; + id: string; + resourcePatch: ResourcePatch; +} +export interface DeleteResourceInput { + clientMutationId?: string; + id: string; +} export interface CreateFunctionGraphRefInput { clientMutationId?: string; functionGraphRef: { @@ -2238,6 +2744,34 @@ export interface DeleteOrgFunctionExecutionLogInput { clientMutationId?: string; id: string; } +export interface CreateResourceEventInput { + clientMutationId?: string; + resourceEvent: { + resourceId: string; + eventType: string; + actorId?: string; + message?: string; + metadata?: Record; + databaseId: string; + }; +} +export interface ResourceEventPatch { + resourceId?: string | null; + eventType?: string | null; + actorId?: string | null; + message?: string | null; + metadata?: Record | null; + databaseId?: string | null; +} +export interface UpdateResourceEventInput { + clientMutationId?: string; + id: string; + resourceEventPatch: ResourceEventPatch; +} +export interface DeleteResourceEventInput { + clientMutationId?: string; + id: string; +} export interface CreateFunctionGraphExecutionOutputInput { clientMutationId?: string; functionGraphExecutionOutput: { @@ -2332,21 +2866,55 @@ export interface CreateFunctionExecutionLogInput { databaseId: string; }; } -export interface FunctionExecutionLogPatch { - invocationId?: string | null; - taskIdentifier?: string | null; - logLevel?: string | null; - message?: string | null; - metadata?: Record | null; - actorId?: string | null; +export interface FunctionExecutionLogPatch { + invocationId?: string | null; + taskIdentifier?: string | null; + logLevel?: string | null; + message?: string | null; + metadata?: Record | null; + actorId?: string | null; + databaseId?: string | null; +} +export interface UpdateFunctionExecutionLogInput { + clientMutationId?: string; + id: string; + functionExecutionLogPatch: FunctionExecutionLogPatch; +} +export interface DeleteFunctionExecutionLogInput { + clientMutationId?: string; + id: string; +} +export interface CreateFunctionGraphInput { + clientMutationId?: string; + functionGraph: { + databaseId: string; + storeId: string; + context?: string; + name?: string; + description?: string; + definitionsCommitId: string; + isValid?: boolean; + validationErrors?: Record; + createdBy?: string; + }; +} +export interface FunctionGraphPatch { databaseId?: string | null; + storeId?: string | null; + context?: string | null; + name?: string | null; + description?: string | null; + definitionsCommitId?: string | null; + isValid?: boolean | null; + validationErrors?: Record | null; + createdBy?: string | null; } -export interface UpdateFunctionExecutionLogInput { +export interface UpdateFunctionGraphInput { clientMutationId?: string; id: string; - functionExecutionLogPatch: FunctionExecutionLogPatch; + functionGraphPatch: FunctionGraphPatch; } -export interface DeleteFunctionExecutionLogInput { +export interface DeleteFunctionGraphInput { clientMutationId?: string; id: string; } @@ -2386,39 +2954,39 @@ export interface DeleteFunctionGraphExecutionNodeStateInput { clientMutationId?: string; id: string; } -export interface CreateFunctionGraphInput { +export interface CreatePlatformNamespaceInput { clientMutationId?: string; - functionGraph: { - databaseId: string; - storeId: string; - entityId: string; - context?: string; - name?: string; + platformNamespace: { + name: string; + namespaceName: string; description?: string; - definitionsCommitId: string; - isValid?: boolean; - validationErrors?: Record; - createdBy?: string; + isActive?: boolean; + labels?: Record; + annotations?: Record; + databaseId: string; + sourceDatabaseId?: string; + sourceScope?: string; + isManaged?: boolean; }; } -export interface FunctionGraphPatch { - databaseId?: string | null; - storeId?: string | null; - entityId?: string | null; - context?: string | null; +export interface PlatformNamespacePatch { name?: string | null; + namespaceName?: string | null; description?: string | null; - definitionsCommitId?: string | null; - isValid?: boolean | null; - validationErrors?: Record | null; - createdBy?: string | null; + isActive?: boolean | null; + labels?: Record | null; + annotations?: Record | null; + databaseId?: string | null; + sourceDatabaseId?: string | null; + sourceScope?: string | null; + isManaged?: boolean | null; } -export interface UpdateFunctionGraphInput { +export interface UpdatePlatformNamespaceInput { clientMutationId?: string; id: string; - functionGraphPatch: FunctionGraphPatch; + platformNamespacePatch: PlatformNamespacePatch; } -export interface DeleteFunctionGraphInput { +export interface DeletePlatformNamespaceInput { clientMutationId?: string; id: string; } @@ -2504,6 +3072,48 @@ export interface DeleteFunctionInvocationInput { clientMutationId?: string; id: string; } +export interface CreatePlatformNamespaceEventInput { + clientMutationId?: string; + platformNamespaceEvent: { + namespaceId: string; + eventType: string; + actorId?: string; + message?: string; + metadata?: Record; + cpuMillicores?: number; + memoryBytes?: string; + storageBytes?: string; + networkIngressBytes?: string; + networkEgressBytes?: string; + podCount?: number; + metrics?: Record; + databaseId: string; + }; +} +export interface PlatformNamespaceEventPatch { + namespaceId?: string | null; + eventType?: string | null; + actorId?: string | null; + message?: string | null; + metadata?: Record | null; + cpuMillicores?: number | null; + memoryBytes?: string | null; + storageBytes?: string | null; + networkIngressBytes?: string | null; + networkEgressBytes?: string | null; + podCount?: number | null; + metrics?: Record | null; + databaseId?: string | null; +} +export interface UpdatePlatformNamespaceEventInput { + clientMutationId?: string; + id: string; + platformNamespaceEventPatch: PlatformNamespaceEventPatch; +} +export interface DeletePlatformNamespaceEventInput { + clientMutationId?: string; + id: string; +} export interface CreateFunctionGraphExecutionInput { clientMutationId?: string; functionGraphExecution: { @@ -2511,7 +3121,6 @@ export interface CreateFunctionGraphExecutionInput { graphId: string; invocationId?: string; databaseId: string; - entityId?: string; outputNode: string; outputPort?: string; status?: string; @@ -2537,7 +3146,6 @@ export interface FunctionGraphExecutionPatch { graphId?: string | null; invocationId?: string | null; databaseId?: string | null; - entityId?: string | null; outputNode?: string | null; outputPort?: string | null; status?: string | null; @@ -2636,6 +3244,10 @@ export interface DeleteFunctionDefinitionInput { } // ============ Connection Fields Map ============ export const connectionFieldsMap = { + PlatformNamespace: { + functionDeploymentsByNamespaceId: 'FunctionDeployment', + resourcesByNamespaceId: 'Resource', + }, FunctionDefinition: { functionApiBindings: 'FunctionApiBinding', functionDeployments: 'FunctionDeployment', @@ -2695,6 +3307,16 @@ export interface AddNodeAndSaveInput { meta?: Record; message?: string; } +export interface ImportGraphJsonInput { + clientMutationId?: string; + databaseId?: string; + name?: string; + graphJson?: Record; + context?: string; + description?: string; + createdBy?: string; + definitionsCommitId?: string; +} export interface AddEdgeInput { clientMutationId?: string; databaseId?: string; @@ -2717,17 +3339,6 @@ export interface AddNodeInput { props?: Record; meta?: Record; } -export interface ImportGraphJsonInput { - clientMutationId?: string; - databaseId?: string; - name?: string; - graphJson?: Record; - context?: string; - description?: string; - entityId?: string; - createdBy?: string; - definitionsCommitId?: string; -} export interface InsertNodeAtPathInput { clientMutationId?: string; sId?: string; @@ -2775,6 +3386,24 @@ export interface Base64EncodedBinaryFilter { /** Not included in the specified list. */ notIn?: Base64EncodedBinary[]; } +/** A filter to be used against many `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyFunctionDeploymentFilter { + /** Filters to entities where at least one related entity matches. */ + some?: FunctionDeploymentFilter; + /** Filters to entities where every related entity matches. */ + every?: FunctionDeploymentFilter; + /** Filters to entities where no related entity matches. */ + none?: FunctionDeploymentFilter; +} +/** A filter to be used against many `Resource` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceToManyResourceFilter { + /** Filters to entities where at least one related entity matches. */ + some?: ResourceFilter; + /** Filters to entities where every related entity matches. */ + every?: ResourceFilter; + /** Filters to entities where no related entity matches. */ + none?: ResourceFilter; +} /** A filter to be used against many `FunctionApiBinding` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionDefinitionToManyFunctionApiBindingFilter { /** Filters to entities where at least one related entity matches. */ @@ -2847,6 +3476,38 @@ export interface FunctionDeploymentInput { /** Database that owns this resource (database-scoped isolation) */ databaseId: string; } +/** An input for mutations affecting `Resource` */ +export interface ResourceInput { + id?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: string; + updatedBy?: string; + /** Namespace this resource belongs to (security boundary, maps to K8s namespace) */ + namespaceId: string; + /** Resource kind: Deployment, StatefulSet, Service, Ingress, Certificate */ + kind: string; + /** Human-readable resource name */ + name: string; + /** URL-safe identifier, unique within (namespace_id, kind) */ + slug: string; + /** Desired state — kind-specific configuration (image, ports, resources, etc.). Opaque to DB; validated by K8s. */ + spec?: Record; + /** Resource lifecycle status: pending, provisioning, active, failed, draining, deleting */ + status?: string; + /** Observed state from K8s — populated by handlers after reconciliation (service_url, clone_url, replicas, etc.) */ + statusObserved?: Record; + /** Most recent provisioning or runtime error message */ + lastError?: string; + /** Cumulative error count for this resource */ + errorCount?: number; + /** Key/value pairs for selecting and filtering resources */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; +} /** An input for mutations affecting `FunctionGraphRef` */ export interface FunctionGraphRefInput { /** Unique ref identifier */ @@ -2926,6 +3587,25 @@ export interface OrgFunctionExecutionLogInput { /** User who triggered the execution (NULL for system/cron) */ actorId?: string; } +/** An input for mutations affecting `ResourceEvent` */ +export interface ResourceEventInput { + /** Event timestamp (partition key) */ + createdAt?: string; + /** Unique event identifier */ + id?: string; + /** Resource this event belongs to */ + resourceId: string; + /** Event type: provisioned, provisioning, updated, failed, deprovisioned, health_check */ + eventType: string; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string; + /** Human-readable description of the event */ + message?: string; + /** Structured context (old/new values, error details, etc.) */ + metadata?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; +} /** An input for mutations affecting `FunctionGraphExecutionOutput` */ export interface FunctionGraphExecutionOutputInput { /** Timestamp of output creation */ @@ -3026,6 +3706,32 @@ export interface FunctionGraphExecutionNodeStateInput { /** FK to execution_outputs — content-addressed output blob for this node */ outputId?: string; } +/** An input for mutations affecting `PlatformNamespace` */ +export interface PlatformNamespaceInput { + id?: string; + createdAt?: string; + updatedAt?: string; + /** Human-readable namespace name (e.g. default, production, oauth) */ + name: string; + /** Globally unique computed namespace identifier via inflection.underscore */ + namespaceName: string; + /** Optional human-readable description of this namespace */ + description?: string; + /** Whether this namespace is active (soft-disable for filtering) */ + isActive?: boolean; + /** Key/value pairs for selecting and filtering namespaces */ + labels?: Record; + /** Freeform metadata for tooling and operational notes */ + annotations?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Database that created this namespace (NULL for platform-native namespaces) */ + sourceDatabaseId?: string; + /** Origin scope: platform, org, app — indicates where this namespace was created */ + sourceScope?: string; + /** true = created by a child scope mirror trigger, false = platform-native */ + isManaged?: boolean; +} /** An input for mutations affecting `OrgFunctionInvocation` */ export interface OrgFunctionInvocationInput { /** Invocation creation timestamp (partition key) */ @@ -3090,6 +3796,39 @@ export interface FunctionInvocationInput { /** Groups all node invocations from a single flow graph execution */ graphExecutionId?: string; } +/** An input for mutations affecting `PlatformNamespaceEvent` */ +export interface PlatformNamespaceEventInput { + /** Event timestamp (partition key) */ + createdAt?: string; + /** Unique event identifier */ + id?: string; + /** Namespace this event belongs to */ + namespaceId: string; + /** Event type: created, activated, deactivated, labels_updated, annotations_updated, renamed */ + eventType: string; + /** User who triggered this event (NULL for system/automated) */ + actorId?: string; + /** Human-readable description of the event */ + message?: string; + /** Structured context (old/new values, labels diff, etc.) */ + metadata?: Record; + /** CPU usage in millicores at time of event */ + cpuMillicores?: number; + /** Memory usage in bytes at time of event */ + memoryBytes?: string; + /** Storage usage in bytes at time of event */ + storageBytes?: string; + /** Network ingress in bytes during event window */ + networkIngressBytes?: string; + /** Network egress in bytes during event window */ + networkEgressBytes?: string; + /** Number of active pods in the namespace at time of event */ + podCount?: number; + /** Additional resource metrics (gpu, replicas, quotas, etc.) */ + metrics?: Record; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; +} /** An input for mutations affecting `FunctionGraphExecution` */ export interface FunctionGraphExecutionInput { /** Execution start timestamp */ @@ -3102,8 +3841,6 @@ export interface FunctionGraphExecutionInput { invocationId?: string; /** Scope for multi-tenant isolation */ databaseId: string; - /** Entity context (org/team) for scoped billing */ - entityId?: string; /** Target output boundary node name to resolve */ outputNode: string; /** Target output port name (default: value) */ @@ -3223,27 +3960,6 @@ export interface IntervalInput { /** A quantity of years. */ years?: number; } -/** A filter to be used against `FunctionApiBinding` object types. All fields are combined with a logical ‘and.’ */ -export interface FunctionApiBindingFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `functionDefinitionId` field. */ - functionDefinitionId?: UUIDFilter; - /** Filter by the object’s `apiId` field. */ - apiId?: UUIDFilter; - /** Filter by the object’s `alias` field. */ - alias?: StringFilter; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Checks for all expressions in this list. */ - and?: FunctionApiBindingFilter[]; - /** Checks for any expressions in this list. */ - or?: FunctionApiBindingFilter[]; - /** Negates the expression. */ - not?: FunctionApiBindingFilter; - /** Filter by the object’s `functionDefinition` relation. */ - functionDefinition?: FunctionDefinitionFilter; -} /** A filter to be used against `FunctionDeployment` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionDeploymentFilter { /** Filter by the object’s `id` field. */ @@ -3296,6 +4012,74 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Filter by the object’s `functionDefinition` relation. */ functionDefinition?: FunctionDefinitionFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; +} +/** A filter to be used against `Resource` object types. All fields are combined with a logical ‘and.’ */ +export interface ResourceFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `namespaceId` field. */ + namespaceId?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `spec` field. */ + spec?: JSONFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `statusObserved` field. */ + statusObserved?: JSONFilter; + /** Filter by the object’s `lastError` field. */ + lastError?: StringFilter; + /** Filter by the object’s `errorCount` field. */ + errorCount?: IntFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: ResourceFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceFilter[]; + /** Negates the expression. */ + not?: ResourceFilter; + /** Filter by the object’s `namespace` relation. */ + namespace?: PlatformNamespaceFilter; +} +/** A filter to be used against `FunctionApiBinding` object types. All fields are combined with a logical ‘and.’ */ +export interface FunctionApiBindingFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `functionDefinitionId` field. */ + functionDefinitionId?: UUIDFilter; + /** Filter by the object’s `apiId` field. */ + apiId?: UUIDFilter; + /** Filter by the object’s `alias` field. */ + alias?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Checks for all expressions in this list. */ + and?: FunctionApiBindingFilter[]; + /** Checks for any expressions in this list. */ + or?: FunctionApiBindingFilter[]; + /** Negates the expression. */ + not?: FunctionApiBindingFilter; + /** Filter by the object’s `functionDefinition` relation. */ + functionDefinition?: FunctionDefinitionFilter; } /** A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ */ export interface UUIDFilter { @@ -3322,6 +4106,31 @@ export interface UUIDFilter { /** Greater than or equal to the specified value. */ greaterThanOrEqualTo?: string; } +/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ +export interface DatetimeFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Included in the specified list. */ + in?: string[]; + /** Not included in the specified list. */ + notIn?: string[]; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; +} /** A filter to be used against String fields. All fields are combined with a logical ‘and.’ */ export interface StringFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -3399,6 +4208,31 @@ export interface StringFilter { /** Greater than or equal to the specified value (case-insensitive). */ greaterThanOrEqualToInsensitive?: string; } +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Equal to the specified value. */ + equalTo?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Included in the specified list. */ + in?: number[]; + /** Not included in the specified list. */ + notIn?: number[]; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; +} /** A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ */ export interface JSONFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -3505,55 +4339,48 @@ export interface FunctionDefinitionFilter { /** `functionDeployments` exist. */ functionDeploymentsExist?: boolean; } -/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ -export interface DatetimeFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Included in the specified list. */ - in?: string[]; - /** Not included in the specified list. */ - notIn?: string[]; - /** Less than the specified value. */ - lessThan?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; -} -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: number; - /** Not equal to the specified value. */ - notEqualTo?: number; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; - /** Included in the specified list. */ - in?: number[]; - /** Not included in the specified list. */ - notIn?: number[]; - /** Less than the specified value. */ - lessThan?: number; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; - /** Greater than the specified value. */ - greaterThan?: number; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; +/** A filter to be used against `PlatformNamespace` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformNamespaceFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `namespaceName` field. */ + namespaceName?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `labels` field. */ + labels?: JSONFilter; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `sourceDatabaseId` field. */ + sourceDatabaseId?: UUIDFilter; + /** Filter by the object’s `sourceScope` field. */ + sourceScope?: StringFilter; + /** Filter by the object’s `isManaged` field. */ + isManaged?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PlatformNamespaceFilter[]; + /** Checks for any expressions in this list. */ + or?: PlatformNamespaceFilter[]; + /** Negates the expression. */ + not?: PlatformNamespaceFilter; + /** Filter by the object’s `functionDeploymentsByNamespaceId` relation. */ + functionDeploymentsByNamespaceId?: PlatformNamespaceToManyFunctionDeploymentFilter; + /** `functionDeploymentsByNamespaceId` exist. */ + functionDeploymentsByNamespaceIdExist?: boolean; + /** Filter by the object’s `resourcesByNamespaceId` relation. */ + resourcesByNamespaceId?: PlatformNamespaceToManyResourceFilter; + /** `resourcesByNamespaceId` exist. */ + resourcesByNamespaceIdExist?: boolean; } /** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ export interface BooleanFilter { @@ -3680,27 +4507,27 @@ export type AddNodeAndSavePayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface AddEdgePayload { +export interface ImportGraphJsonPayload { clientMutationId?: string | null; result?: string | null; } -export type AddEdgePayloadSelect = { +export type ImportGraphJsonPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface AddNodePayload { +export interface AddEdgePayload { clientMutationId?: string | null; result?: string | null; } -export type AddNodePayloadSelect = { +export type AddEdgePayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface ImportGraphJsonPayload { +export interface AddNodePayload { clientMutationId?: string | null; result?: string | null; } -export type ImportGraphJsonPayloadSelect = { +export type AddNodePayloadSelect = { clientMutationId?: boolean; result?: boolean; }; @@ -3832,6 +4659,51 @@ export type DeleteFunctionDeploymentPayloadSelect = { select: FunctionDeploymentEdgeSelect; }; }; +export interface CreateResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was created by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export type CreateResourcePayloadSelect = { + clientMutationId?: boolean; + resource?: { + select: ResourceSelect; + }; + resourceEdge?: { + select: ResourceEdgeSelect; + }; +}; +export interface UpdateResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was updated by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export type UpdateResourcePayloadSelect = { + clientMutationId?: boolean; + resource?: { + select: ResourceSelect; + }; + resourceEdge?: { + select: ResourceEdgeSelect; + }; +}; +export interface DeleteResourcePayload { + clientMutationId?: string | null; + /** The `Resource` that was deleted by this mutation. */ + resource?: Resource | null; + resourceEdge?: ResourceEdge | null; +} +export type DeleteResourcePayloadSelect = { + clientMutationId?: boolean; + resource?: { + select: ResourceSelect; + }; + resourceEdge?: { + select: ResourceEdgeSelect; + }; +}; export interface CreateFunctionGraphRefPayload { clientMutationId?: string | null; /** The `FunctionGraphRef` that was created by this mutation. */ @@ -4057,6 +4929,51 @@ export type DeleteOrgFunctionExecutionLogPayloadSelect = { select: OrgFunctionExecutionLogEdgeSelect; }; }; +export interface CreateResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was created by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} +export type CreateResourceEventPayloadSelect = { + clientMutationId?: boolean; + resourceEvent?: { + select: ResourceEventSelect; + }; + resourceEventEdge?: { + select: ResourceEventEdgeSelect; + }; +}; +export interface UpdateResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was updated by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} +export type UpdateResourceEventPayloadSelect = { + clientMutationId?: boolean; + resourceEvent?: { + select: ResourceEventSelect; + }; + resourceEventEdge?: { + select: ResourceEventEdgeSelect; + }; +}; +export interface DeleteResourceEventPayload { + clientMutationId?: string | null; + /** The `ResourceEvent` that was deleted by this mutation. */ + resourceEvent?: ResourceEvent | null; + resourceEventEdge?: ResourceEventEdge | null; +} +export type DeleteResourceEventPayloadSelect = { + clientMutationId?: boolean; + resourceEvent?: { + select: ResourceEventSelect; + }; + resourceEventEdge?: { + select: ResourceEventEdgeSelect; + }; +}; export interface CreateFunctionGraphExecutionOutputPayload { clientMutationId?: string | null; /** The `FunctionGraphExecutionOutput` that was created by this mutation. */ @@ -4237,6 +5154,44 @@ export type DeleteFunctionExecutionLogPayloadSelect = { select: FunctionExecutionLogEdgeSelect; }; }; +export interface CreateFunctionGraphPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type CreateFunctionGraphPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface UpdateFunctionGraphPayload { + clientMutationId?: string | null; + /** The `FunctionGraph` that was updated by this mutation. */ + functionGraph?: FunctionGraph | null; + functionGraphEdge?: FunctionGraphEdge | null; +} +export type UpdateFunctionGraphPayloadSelect = { + clientMutationId?: boolean; + functionGraph?: { + select: FunctionGraphSelect; + }; + functionGraphEdge?: { + select: FunctionGraphEdgeSelect; + }; +}; +export interface DeleteFunctionGraphPayload { + clientMutationId?: string | null; + /** The `FunctionGraph` that was deleted by this mutation. */ + functionGraph?: FunctionGraph | null; + functionGraphEdge?: FunctionGraphEdge | null; +} +export type DeleteFunctionGraphPayloadSelect = { + clientMutationId?: boolean; + functionGraph?: { + select: FunctionGraphSelect; + }; + functionGraphEdge?: { + select: FunctionGraphEdgeSelect; + }; +}; export interface CreateFunctionGraphExecutionNodeStatePayload { clientMutationId?: string | null; /** The `FunctionGraphExecutionNodeState` that was created by this mutation. */ @@ -4282,42 +5237,49 @@ export type DeleteFunctionGraphExecutionNodeStatePayloadSelect = { select: FunctionGraphExecutionNodeStateEdgeSelect; }; }; -export interface CreateFunctionGraphPayload { +export interface CreatePlatformNamespacePayload { clientMutationId?: string | null; - result?: string | null; + /** The `PlatformNamespace` that was created by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; } -export type CreateFunctionGraphPayloadSelect = { +export type CreatePlatformNamespacePayloadSelect = { clientMutationId?: boolean; - result?: boolean; + platformNamespace?: { + select: PlatformNamespaceSelect; + }; + platformNamespaceEdge?: { + select: PlatformNamespaceEdgeSelect; + }; }; -export interface UpdateFunctionGraphPayload { +export interface UpdatePlatformNamespacePayload { clientMutationId?: string | null; - /** The `FunctionGraph` that was updated by this mutation. */ - functionGraph?: FunctionGraph | null; - functionGraphEdge?: FunctionGraphEdge | null; + /** The `PlatformNamespace` that was updated by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; } -export type UpdateFunctionGraphPayloadSelect = { +export type UpdatePlatformNamespacePayloadSelect = { clientMutationId?: boolean; - functionGraph?: { - select: FunctionGraphSelect; + platformNamespace?: { + select: PlatformNamespaceSelect; }; - functionGraphEdge?: { - select: FunctionGraphEdgeSelect; + platformNamespaceEdge?: { + select: PlatformNamespaceEdgeSelect; }; }; -export interface DeleteFunctionGraphPayload { +export interface DeletePlatformNamespacePayload { clientMutationId?: string | null; - /** The `FunctionGraph` that was deleted by this mutation. */ - functionGraph?: FunctionGraph | null; - functionGraphEdge?: FunctionGraphEdge | null; + /** The `PlatformNamespace` that was deleted by this mutation. */ + platformNamespace?: PlatformNamespace | null; + platformNamespaceEdge?: PlatformNamespaceEdge | null; } -export type DeleteFunctionGraphPayloadSelect = { +export type DeletePlatformNamespacePayloadSelect = { clientMutationId?: boolean; - functionGraph?: { - select: FunctionGraphSelect; + platformNamespace?: { + select: PlatformNamespaceSelect; }; - functionGraphEdge?: { - select: FunctionGraphEdgeSelect; + platformNamespaceEdge?: { + select: PlatformNamespaceEdgeSelect; }; }; export interface CreateOrgFunctionInvocationPayload { @@ -4410,6 +5372,51 @@ export type DeleteFunctionInvocationPayloadSelect = { select: FunctionInvocationEdgeSelect; }; }; +export interface CreatePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was created by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} +export type CreatePlatformNamespaceEventPayloadSelect = { + clientMutationId?: boolean; + platformNamespaceEvent?: { + select: PlatformNamespaceEventSelect; + }; + platformNamespaceEventEdge?: { + select: PlatformNamespaceEventEdgeSelect; + }; +}; +export interface UpdatePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was updated by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} +export type UpdatePlatformNamespaceEventPayloadSelect = { + clientMutationId?: boolean; + platformNamespaceEvent?: { + select: PlatformNamespaceEventSelect; + }; + platformNamespaceEventEdge?: { + select: PlatformNamespaceEventEdgeSelect; + }; +}; +export interface DeletePlatformNamespaceEventPayload { + clientMutationId?: string | null; + /** The `PlatformNamespaceEvent` that was deleted by this mutation. */ + platformNamespaceEvent?: PlatformNamespaceEvent | null; + platformNamespaceEventEdge?: PlatformNamespaceEventEdge | null; +} +export type DeletePlatformNamespaceEventPayloadSelect = { + clientMutationId?: boolean; + platformNamespaceEvent?: { + select: PlatformNamespaceEventSelect; + }; + platformNamespaceEventEdge?: { + select: PlatformNamespaceEventEdgeSelect; + }; +}; export interface CreateFunctionGraphExecutionPayload { clientMutationId?: string | null; /** The `FunctionGraphExecution` that was created by this mutation. */ @@ -4524,6 +5531,18 @@ export type FunctionDeploymentEdgeSelect = { select: FunctionDeploymentSelect; }; }; +/** A `Resource` edge in the connection. */ +export interface ResourceEdge { + cursor?: string | null; + /** The `Resource` at the end of the edge. */ + node?: Resource | null; +} +export type ResourceEdgeSelect = { + cursor?: boolean; + node?: { + select: ResourceSelect; + }; +}; /** A `FunctionGraphRef` edge in the connection. */ export interface FunctionGraphRefEdge { cursor?: string | null; @@ -4584,6 +5603,18 @@ export type OrgFunctionExecutionLogEdgeSelect = { select: OrgFunctionExecutionLogSelect; }; }; +/** A `ResourceEvent` edge in the connection. */ +export interface ResourceEventEdge { + cursor?: string | null; + /** The `ResourceEvent` at the end of the edge. */ + node?: ResourceEvent | null; +} +export type ResourceEventEdgeSelect = { + cursor?: boolean; + node?: { + select: ResourceEventSelect; + }; +}; /** A `FunctionGraphExecutionOutput` edge in the connection. */ export interface FunctionGraphExecutionOutputEdge { cursor?: string | null; @@ -4632,6 +5663,18 @@ export type FunctionExecutionLogEdgeSelect = { select: FunctionExecutionLogSelect; }; }; +/** A `FunctionGraph` edge in the connection. */ +export interface FunctionGraphEdge { + cursor?: string | null; + /** The `FunctionGraph` at the end of the edge. */ + node?: FunctionGraph | null; +} +export type FunctionGraphEdgeSelect = { + cursor?: boolean; + node?: { + select: FunctionGraphSelect; + }; +}; /** A `FunctionGraphExecutionNodeState` edge in the connection. */ export interface FunctionGraphExecutionNodeStateEdge { cursor?: string | null; @@ -4644,16 +5687,16 @@ export type FunctionGraphExecutionNodeStateEdgeSelect = { select: FunctionGraphExecutionNodeStateSelect; }; }; -/** A `FunctionGraph` edge in the connection. */ -export interface FunctionGraphEdge { +/** A `PlatformNamespace` edge in the connection. */ +export interface PlatformNamespaceEdge { cursor?: string | null; - /** The `FunctionGraph` at the end of the edge. */ - node?: FunctionGraph | null; + /** The `PlatformNamespace` at the end of the edge. */ + node?: PlatformNamespace | null; } -export type FunctionGraphEdgeSelect = { +export type PlatformNamespaceEdgeSelect = { cursor?: boolean; node?: { - select: FunctionGraphSelect; + select: PlatformNamespaceSelect; }; }; /** A `OrgFunctionInvocation` edge in the connection. */ @@ -4680,6 +5723,18 @@ export type FunctionInvocationEdgeSelect = { select: FunctionInvocationSelect; }; }; +/** A `PlatformNamespaceEvent` edge in the connection. */ +export interface PlatformNamespaceEventEdge { + cursor?: string | null; + /** The `PlatformNamespaceEvent` at the end of the edge. */ + node?: PlatformNamespaceEvent | null; +} +export type PlatformNamespaceEventEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformNamespaceEventSelect; + }; +}; /** A `FunctionGraphExecution` edge in the connection. */ export interface FunctionGraphExecutionEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/compute/orm/models/index.ts b/sdk/constructive-sdk/src/compute/orm/models/index.ts index 51e9b9f05d..cce3b40556 100644 --- a/sdk/constructive-sdk/src/compute/orm/models/index.ts +++ b/sdk/constructive-sdk/src/compute/orm/models/index.ts @@ -6,18 +6,22 @@ export { GetAllRecordModel } from './getAllRecord'; export { FunctionApiBindingModel } from './functionApiBinding'; export { FunctionDeploymentModel } from './functionDeployment'; +export { ResourceModel } from './resource'; export { FunctionGraphRefModel } from './functionGraphRef'; export { FunctionGraphStoreModel } from './functionGraphStore'; export { FunctionGraphObjectModel } from './functionGraphObject'; export { FunctionDeploymentEventModel } from './functionDeploymentEvent'; export { OrgFunctionExecutionLogModel } from './orgFunctionExecutionLog'; +export { ResourceEventModel } from './resourceEvent'; export { FunctionGraphExecutionOutputModel } from './functionGraphExecutionOutput'; export { FunctionGraphCommitModel } from './functionGraphCommit'; export { SecretDefinitionModel } from './secretDefinition'; export { FunctionExecutionLogModel } from './functionExecutionLog'; -export { FunctionGraphExecutionNodeStateModel } from './functionGraphExecutionNodeState'; export { FunctionGraphModel } from './functionGraph'; +export { FunctionGraphExecutionNodeStateModel } from './functionGraphExecutionNodeState'; +export { PlatformNamespaceModel } from './platformNamespace'; export { OrgFunctionInvocationModel } from './orgFunctionInvocation'; export { FunctionInvocationModel } from './functionInvocation'; +export { PlatformNamespaceEventModel } from './platformNamespaceEvent'; export { FunctionGraphExecutionModel } from './functionGraphExecution'; export { FunctionDefinitionModel } from './functionDefinition'; diff --git a/sdk/constructive-sdk/src/compute/orm/models/platformNamespace.ts b/sdk/constructive-sdk/src/compute/orm/models/platformNamespace.ts new file mode 100644 index 0000000000..c4dff94953 --- /dev/null +++ b/sdk/constructive-sdk/src/compute/orm/models/platformNamespace.ts @@ -0,0 +1,245 @@ +/** + * PlatformNamespace 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 { + PlatformNamespace, + PlatformNamespaceWithRelations, + PlatformNamespaceSelect, + PlatformNamespaceFilter, + PlatformNamespaceOrderBy, + CreatePlatformNamespaceInput, + UpdatePlatformNamespaceInput, + PlatformNamespacePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformNamespaceModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaces: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespace', + 'platformNamespaces', + 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, + }, + 'PlatformNamespaceFilter', + 'PlatformNamespaceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespace', + fieldName: 'platformNamespaces', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespace: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformNamespace', + 'platformNamespaces', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformNamespaceFilter', + 'PlatformNamespaceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespace', + fieldName: 'platformNamespace', + document, + variables, + transform: (data: { + platformNamespaces?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespace: data.platformNamespaces?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespace: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespace', + 'platformNamespaces', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformNamespaceFilter', + 'PlatformNamespaceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespace', + fieldName: 'platformNamespace', + document, + variables, + transform: (data: { + platformNamespaces?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespace: data.platformNamespaces?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformNamespace', + 'createPlatformNamespace', + 'platformNamespace', + args.select, + args.data, + 'CreatePlatformNamespaceInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespace', + fieldName: 'createPlatformNamespace', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformNamespacePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformNamespace', + 'updatePlatformNamespace', + 'platformNamespace', + args.select, + args.where.id, + args.data, + 'UpdatePlatformNamespaceInput', + 'id', + 'platformNamespacePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespace', + fieldName: 'updatePlatformNamespace', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformNamespace: { + platformNamespace: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformNamespace', + 'deletePlatformNamespace', + 'platformNamespace', + { + id: args.where.id, + }, + 'DeletePlatformNamespaceInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespace', + fieldName: 'deletePlatformNamespace', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/compute/orm/models/platformNamespaceEvent.ts b/sdk/constructive-sdk/src/compute/orm/models/platformNamespaceEvent.ts new file mode 100644 index 0000000000..198afe79ae --- /dev/null +++ b/sdk/constructive-sdk/src/compute/orm/models/platformNamespaceEvent.ts @@ -0,0 +1,252 @@ +/** + * PlatformNamespaceEvent 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 { + PlatformNamespaceEvent, + PlatformNamespaceEventWithRelations, + PlatformNamespaceEventSelect, + PlatformNamespaceEventFilter, + PlatformNamespaceEventOrderBy, + CreatePlatformNamespaceEventInput, + UpdatePlatformNamespaceEventInput, + PlatformNamespaceEventPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformNamespaceEventModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaceEvents: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespaceEvent', + 'platformNamespaceEvents', + 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, + }, + 'PlatformNamespaceEventFilter', + 'PlatformNamespaceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespaceEvent', + fieldName: 'platformNamespaceEvents', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformNamespaceEvent', + 'platformNamespaceEvents', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformNamespaceEventFilter', + 'PlatformNamespaceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespaceEvent', + fieldName: 'platformNamespaceEvent', + document, + variables, + transform: (data: { + platformNamespaceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespaceEvent: data.platformNamespaceEvents?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformNamespaceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformNamespaceEvent', + 'platformNamespaceEvents', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformNamespaceEventFilter', + 'PlatformNamespaceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformNamespaceEvent', + fieldName: 'platformNamespaceEvent', + document, + variables, + transform: (data: { + platformNamespaceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformNamespaceEvent: data.platformNamespaceEvents?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformNamespaceEvent', + 'createPlatformNamespaceEvent', + 'platformNamespaceEvent', + args.select, + args.data, + 'CreatePlatformNamespaceEventInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespaceEvent', + fieldName: 'createPlatformNamespaceEvent', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + createdAt: string; + }, + PlatformNamespaceEventPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformNamespaceEvent', + 'updatePlatformNamespaceEvent', + 'platformNamespaceEvent', + args.select, + args.where.id, + args.data, + 'UpdatePlatformNamespaceEventInput', + 'id', + 'platformNamespaceEventPatch', + connectionFieldsMap, + { + createdAt: args.where.createdAt, + } + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespaceEvent', + fieldName: 'updatePlatformNamespaceEvent', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + createdAt: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformNamespaceEvent: { + platformNamespaceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformNamespaceEvent', + 'deletePlatformNamespaceEvent', + 'platformNamespaceEvent', + { + id: args.where.id, + createdAt: args.where.createdAt, + }, + 'DeletePlatformNamespaceEventInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformNamespaceEvent', + fieldName: 'deletePlatformNamespaceEvent', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/compute/orm/models/resource.ts b/sdk/constructive-sdk/src/compute/orm/models/resource.ts new file mode 100644 index 0000000000..b4b60ad6f3 --- /dev/null +++ b/sdk/constructive-sdk/src/compute/orm/models/resource.ts @@ -0,0 +1,245 @@ +/** + * Resource 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 { + Resource, + ResourceWithRelations, + ResourceSelect, + ResourceFilter, + ResourceOrderBy, + CreateResourceInput, + UpdateResourceInput, + ResourcePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ResourceModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resources: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Resource', + 'resources', + 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, + }, + 'ResourceFilter', + 'ResourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Resource', + fieldName: 'resources', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resource: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Resource', + 'resources', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ResourceFilter', + 'ResourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Resource', + fieldName: 'resource', + document, + variables, + transform: (data: { + resources?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resource: data.resources?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + resource: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Resource', + 'resources', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ResourceFilter', + 'ResourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Resource', + fieldName: 'resource', + document, + variables, + transform: (data: { + resources?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resource: data.resources?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createResource: { + resource: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Resource', + 'createResource', + 'resource', + args.select, + args.data, + 'CreateResourceInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Resource', + fieldName: 'createResource', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ResourcePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateResource: { + resource: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'Resource', + 'updateResource', + 'resource', + args.select, + args.where.id, + args.data, + 'UpdateResourceInput', + 'id', + 'resourcePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Resource', + fieldName: 'updateResource', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteResource: { + resource: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Resource', + 'deleteResource', + 'resource', + { + id: args.where.id, + }, + 'DeleteResourceInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Resource', + fieldName: 'deleteResource', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/compute/orm/models/resourceEvent.ts b/sdk/constructive-sdk/src/compute/orm/models/resourceEvent.ts new file mode 100644 index 0000000000..9796098dc8 --- /dev/null +++ b/sdk/constructive-sdk/src/compute/orm/models/resourceEvent.ts @@ -0,0 +1,250 @@ +/** + * ResourceEvent 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 { + ResourceEvent, + ResourceEventWithRelations, + ResourceEventSelect, + ResourceEventFilter, + ResourceEventOrderBy, + CreateResourceEventInput, + UpdateResourceEventInput, + ResourceEventPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ResourceEventModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceEvents: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceEvent', + 'resourceEvents', + 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, + }, + 'ResourceEventFilter', + 'ResourceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceEvent', + fieldName: 'resourceEvents', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ResourceEvent', + 'resourceEvents', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ResourceEventFilter', + 'ResourceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceEvent', + fieldName: 'resourceEvent', + document, + variables, + transform: (data: { + resourceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceEvent: data.resourceEvents?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceEvent', + 'resourceEvents', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ResourceEventFilter', + 'ResourceEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceEvent', + fieldName: 'resourceEvent', + document, + variables, + transform: (data: { + resourceEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceEvent: data.resourceEvents?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createResourceEvent: { + resourceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ResourceEvent', + 'createResourceEvent', + 'resourceEvent', + args.select, + args.data, + 'CreateResourceEventInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceEvent', + fieldName: 'createResourceEvent', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + createdAt: string; + }, + ResourceEventPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateResourceEvent: { + resourceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ResourceEvent', + 'updateResourceEvent', + 'resourceEvent', + args.select, + args.where.id, + args.data, + 'UpdateResourceEventInput', + 'id', + 'resourceEventPatch', + connectionFieldsMap, + { + createdAt: args.where.createdAt, + } + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceEvent', + fieldName: 'updateResourceEvent', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + createdAt: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteResourceEvent: { + resourceEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ResourceEvent', + 'deleteResourceEvent', + 'resourceEvent', + { + id: args.where.id, + createdAt: args.where.createdAt, + }, + 'DeleteResourceEventInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceEvent', + fieldName: 'deleteResourceEvent', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/compute/orm/mutation/index.ts b/sdk/constructive-sdk/src/compute/orm/mutation/index.ts index b4abf9132b..932f75c399 100644 --- a/sdk/constructive-sdk/src/compute/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/compute/orm/mutation/index.ts @@ -15,9 +15,9 @@ import type { SaveGraphInput, AddEdgeAndSaveInput, AddNodeAndSaveInput, + ImportGraphJsonInput, AddEdgeInput, AddNodeInput, - ImportGraphJsonInput, InsertNodeAtPathInput, StartExecutionInput, ProvisionBucketInput, @@ -29,9 +29,9 @@ import type { SaveGraphPayload, AddEdgeAndSavePayload, AddNodeAndSavePayload, + ImportGraphJsonPayload, AddEdgePayload, AddNodePayload, - ImportGraphJsonPayload, InsertNodeAtPathPayload, StartExecutionPayload, ProvisionBucketPayload, @@ -43,9 +43,9 @@ import type { SaveGraphPayloadSelect, AddEdgeAndSavePayloadSelect, AddNodeAndSavePayloadSelect, + ImportGraphJsonPayloadSelect, AddEdgePayloadSelect, AddNodePayloadSelect, - ImportGraphJsonPayloadSelect, InsertNodeAtPathPayloadSelect, StartExecutionPayloadSelect, ProvisionBucketPayloadSelect, @@ -75,15 +75,15 @@ export interface AddEdgeAndSaveVariables { export interface AddNodeAndSaveVariables { input: AddNodeAndSaveInput; } +export interface ImportGraphJsonVariables { + input: ImportGraphJsonInput; +} export interface AddEdgeVariables { input: AddEdgeInput; } export interface AddNodeVariables { input: AddNodeInput; } -export interface ImportGraphJsonVariables { - input: ImportGraphJsonInput; -} export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } @@ -334,6 +334,35 @@ export function createMutationOperations(client: OrmClient) { 'AddNodeAndSavePayload' ), }), + importGraphJson: ( + args: ImportGraphJsonVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + importGraphJson: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ImportGraphJson', + fieldName: 'importGraphJson', + ...buildCustomDocument( + 'mutation', + 'ImportGraphJson', + 'importGraphJson', + options.select, + args, + [ + { + name: 'input', + type: 'ImportGraphJsonInput!', + }, + ], + connectionFieldsMap, + 'ImportGraphJsonPayload' + ), + }), addEdge: ( args: AddEdgeVariables, options: { @@ -392,35 +421,6 @@ export function createMutationOperations(client: OrmClient) { 'AddNodePayload' ), }), - importGraphJson: ( - args: ImportGraphJsonVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - importGraphJson: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ImportGraphJson', - fieldName: 'importGraphJson', - ...buildCustomDocument( - 'mutation', - 'ImportGraphJson', - 'importGraphJson', - options.select, - args, - [ - { - name: 'input', - type: 'ImportGraphJsonInput!', - }, - ], - connectionFieldsMap, - 'ImportGraphJsonPayload' - ), - }), insertNodeAtPath: ( args: InsertNodeAtPathVariables, options: { diff --git a/sdk/constructive-sdk/src/modules/README.md b/sdk/constructive-sdk/src/modules/README.md index da85bdefa2..e11097fd55 100644 --- a/sdk/constructive-sdk/src/modules/README.md +++ b/sdk/constructive-sdk/src/modules/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 59 +- **Tables:** 61 - **Custom queries:** 2 - **Custom mutations:** 10 diff --git a/sdk/constructive-sdk/src/modules/orm/README.md b/sdk/constructive-sdk/src/modules/orm/README.md index 495d56755f..90e60f2bd9 100644 --- a/sdk/constructive-sdk/src/modules/orm/README.md +++ b/sdk/constructive-sdk/src/modules/orm/README.md @@ -47,19 +47,21 @@ const db = createClient({ | `cryptoAuthModule` | findMany, findOne, create, update, delete | | `sessionsModule` | findMany, findOne, create, update, delete | | `secureTableProvision` | findMany, findOne, create, update, delete | -| `merkleStoreModule` | findMany, findOne, create, update, delete | -| `graphModule` | findMany, findOne, create, update, delete | | `databaseProvisionModule` | findMany, findOne, create, update, delete | | `configSecretsModule` | findMany, findOne, create, update, delete | +| `graphModule` | findMany, findOne, create, update, delete | +| `merkleStoreModule` | findMany, findOne, create, update, delete | | `rateLimitMetersModule` | findMany, findOne, create, update, delete | | `realtimeModule` | findMany, findOne, create, update, delete | | `webauthnAuthModule` | findMany, findOne, create, update, delete | | `functionInvocationModule` | findMany, findOne, create, update, delete | | `functionModule` | findMany, findOne, create, update, delete | | `invitesModule` | findMany, findOne, create, update, delete | +| `principalAuthModule` | findMany, findOne, create, update, delete | | `computeLogModule` | findMany, findOne, create, update, delete | | `inferenceLogModule` | findMany, findOne, create, update, delete | | `namespaceModule` | findMany, findOne, create, update, delete | +| `resourceModule` | findMany, findOne, create, update, delete | | `storageLogModule` | findMany, findOne, create, update, delete | | `transferLogModule` | findMany, findOne, create, update, delete | | `functionDeploymentModule` | findMany, findOne, create, update, delete | @@ -1053,53 +1055,51 @@ const updated = await db.secureTableProvision.update({ where: { id: '' }, const deleted = await db.secureTableProvision.delete({ where: { id: '' } }).execute(); ``` -### `db.merkleStoreModule` +### `db.databaseProvisionModule` -CRUD operations for MerkleStoreModule records. +CRUD operations for DatabaseProvisionModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | +| `databaseName` | String | Yes | +| `ownerId` | UUID | Yes | +| `subdomain` | String | Yes | +| `domain` | String | Yes | +| `modules` | JSON | Yes | +| `options` | JSON | Yes | +| `bootstrapUser` | Boolean | Yes | +| `status` | String | Yes | +| `errorMessage` | String | Yes | | `databaseId` | UUID | Yes | -| `schemaId` | UUID | Yes | -| `privateSchemaId` | UUID | Yes | -| `publicSchemaName` | String | Yes | -| `privateSchemaName` | String | Yes | -| `objectTableId` | UUID | Yes | -| `storeTableId` | UUID | Yes | -| `commitTableId` | UUID | Yes | -| `refTableId` | UUID | Yes | -| `prefix` | String | Yes | -| `apiName` | String | Yes | -| `privateApiName` | String | Yes | -| `scope` | String | Yes | -| `functionPrefix` | String | Yes | | `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `completedAt` | Datetime | Yes | **Operations:** ```typescript -// List all merkleStoreModule records -const items = await db.merkleStoreModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, createdAt: true } }).execute(); +// List all databaseProvisionModule records +const items = await db.databaseProvisionModule.findMany({ select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); // Get one by id -const item = await db.merkleStoreModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, createdAt: true } }).execute(); +const item = await db.databaseProvisionModule.findOne({ id: '', select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); // Create -const created = await db.merkleStoreModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '' }, select: { id: true } }).execute(); +const created = await db.databaseProvisionModule.create({ data: { databaseName: '', ownerId: '', subdomain: '', domain: '', modules: '', options: '', bootstrapUser: '', status: '', errorMessage: '', databaseId: '', completedAt: '' }, select: { id: true } }).execute(); // Update -const updated = await db.merkleStoreModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.databaseProvisionModule.update({ where: { id: '' }, data: { databaseName: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.merkleStoreModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.databaseProvisionModule.delete({ where: { id: '' } }).execute(); ``` -### `db.graphModule` +### `db.configSecretsModule` -CRUD operations for GraphModule records. +CRUD operations for ConfigSecretsModule records. **Fields:** @@ -1107,86 +1107,89 @@ CRUD operations for GraphModule records. |-------|------|----------| | `id` | UUID | No | | `databaseId` | UUID | Yes | -| `publicSchemaId` | UUID | Yes | +| `schemaId` | UUID | Yes | | `privateSchemaId` | UUID | Yes | | `publicSchemaName` | String | Yes | | `privateSchemaName` | String | Yes | -| `scope` | String | Yes | -| `prefix` | String | Yes | -| `merkleStoreModuleId` | UUID | Yes | -| `graphsTableId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `configDefinitionsTableId` | UUID | Yes | +| `tableName` | String | Yes | | `apiName` | String | Yes | | `privateApiName` | String | Yes | +| `scope` | String | Yes | +| `prefix` | String | Yes | | `entityTableId` | UUID | Yes | | `policies` | JSON | Yes | | `provisions` | JSON | Yes | -| `defaultPermissions` | String | Yes | -| `createdAt` | Datetime | No | +| `hasConfig` | Boolean | Yes | **Operations:** ```typescript -// List all graphModule records -const items = await db.graphModule.findMany({ select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); +// List all configSecretsModule records +const items = await db.configSecretsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); // Get one by id -const item = await db.graphModule.findOne({ id: '', select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); +const item = await db.configSecretsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); // Create -const created = await db.graphModule.create({ data: { databaseId: '', publicSchemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', scope: '', prefix: '', merkleStoreModuleId: '', graphsTableId: '', apiName: '', privateApiName: '', entityTableId: '', policies: '', provisions: '', defaultPermissions: '' }, select: { id: true } }).execute(); +const created = await db.configSecretsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', tableId: '', configDefinitionsTableId: '', tableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', policies: '', provisions: '', hasConfig: '' }, select: { id: true } }).execute(); // Update -const updated = await db.graphModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.configSecretsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.graphModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.configSecretsModule.delete({ where: { id: '' } }).execute(); ``` -### `db.databaseProvisionModule` +### `db.graphModule` -CRUD operations for DatabaseProvisionModule records. +CRUD operations for GraphModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | -| `databaseName` | String | Yes | -| `ownerId` | UUID | Yes | -| `subdomain` | String | Yes | -| `domain` | String | Yes | -| `modules` | JSON | Yes | -| `options` | JSON | Yes | -| `bootstrapUser` | Boolean | Yes | -| `status` | String | Yes | -| `errorMessage` | String | Yes | | `databaseId` | UUID | Yes | +| `publicSchemaId` | UUID | Yes | +| `privateSchemaId` | UUID | Yes | +| `publicSchemaName` | String | Yes | +| `privateSchemaName` | String | Yes | +| `scope` | String | Yes | +| `prefix` | String | Yes | +| `merkleStoreModuleId` | UUID | Yes | +| `graphsTableId` | UUID | Yes | +| `apiName` | String | Yes | +| `privateApiName` | String | Yes | +| `entityTableId` | UUID | Yes | +| `policies` | JSON | Yes | +| `provisions` | JSON | Yes | +| `defaultPermissions` | String | Yes | | `createdAt` | Datetime | No | -| `updatedAt` | Datetime | No | -| `completedAt` | Datetime | Yes | **Operations:** ```typescript -// List all databaseProvisionModule records -const items = await db.databaseProvisionModule.findMany({ select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); +// List all graphModule records +const items = await db.graphModule.findMany({ select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); // Get one by id -const item = await db.databaseProvisionModule.findOne({ id: '', select: { id: true, databaseName: true, ownerId: true, subdomain: true, domain: true, modules: true, options: true, bootstrapUser: true, status: true, errorMessage: true, databaseId: true, createdAt: true, updatedAt: true, completedAt: true } }).execute(); +const item = await db.graphModule.findOne({ id: '', select: { id: true, databaseId: true, publicSchemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, scope: true, prefix: true, merkleStoreModuleId: true, graphsTableId: true, apiName: true, privateApiName: true, entityTableId: true, policies: true, provisions: true, defaultPermissions: true, createdAt: true } }).execute(); // Create -const created = await db.databaseProvisionModule.create({ data: { databaseName: '', ownerId: '', subdomain: '', domain: '', modules: '', options: '', bootstrapUser: '', status: '', errorMessage: '', databaseId: '', completedAt: '' }, select: { id: true } }).execute(); +const created = await db.graphModule.create({ data: { databaseId: '', publicSchemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', scope: '', prefix: '', merkleStoreModuleId: '', graphsTableId: '', apiName: '', privateApiName: '', entityTableId: '', policies: '', provisions: '', defaultPermissions: '' }, select: { id: true } }).execute(); // Update -const updated = await db.databaseProvisionModule.update({ where: { id: '' }, data: { databaseName: '' }, select: { id: true } }).execute(); +const updated = await db.graphModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.databaseProvisionModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.graphModule.delete({ where: { id: '' } }).execute(); ``` -### `db.configSecretsModule` +### `db.merkleStoreModule` -CRUD operations for ConfigSecretsModule records. +CRUD operations for MerkleStoreModule records. **Fields:** @@ -1198,35 +1201,35 @@ CRUD operations for ConfigSecretsModule records. | `privateSchemaId` | UUID | Yes | | `publicSchemaName` | String | Yes | | `privateSchemaName` | String | Yes | -| `tableId` | UUID | Yes | -| `configDefinitionsTableId` | UUID | Yes | -| `tableName` | String | Yes | +| `objectTableId` | UUID | Yes | +| `storeTableId` | UUID | Yes | +| `commitTableId` | UUID | Yes | +| `refTableId` | UUID | Yes | +| `prefix` | String | Yes | | `apiName` | String | Yes | | `privateApiName` | String | Yes | | `scope` | String | Yes | -| `prefix` | String | Yes | -| `entityTableId` | UUID | Yes | -| `policies` | JSON | Yes | -| `provisions` | JSON | Yes | -| `hasConfig` | Boolean | Yes | +| `functionPrefix` | String | Yes | +| `permissionKey` | String | Yes | +| `createdAt` | Datetime | No | **Operations:** ```typescript -// List all configSecretsModule records -const items = await db.configSecretsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); +// List all merkleStoreModule records +const items = await db.merkleStoreModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, permissionKey: true, createdAt: true } }).execute(); // Get one by id -const item = await db.configSecretsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, tableId: true, configDefinitionsTableId: true, tableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, policies: true, provisions: true, hasConfig: true } }).execute(); +const item = await db.merkleStoreModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, objectTableId: true, storeTableId: true, commitTableId: true, refTableId: true, prefix: true, apiName: true, privateApiName: true, scope: true, functionPrefix: true, permissionKey: true, createdAt: true } }).execute(); // Create -const created = await db.configSecretsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', tableId: '', configDefinitionsTableId: '', tableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', policies: '', provisions: '', hasConfig: '' }, select: { id: true } }).execute(); +const created = await db.merkleStoreModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', objectTableId: '', storeTableId: '', commitTableId: '', refTableId: '', prefix: '', apiName: '', privateApiName: '', scope: '', functionPrefix: '', permissionKey: '' }, select: { id: true } }).execute(); // Update -const updated = await db.configSecretsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); +const updated = await db.merkleStoreModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.configSecretsModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.merkleStoreModule.delete({ where: { id: '' } }).execute(); ``` ### `db.rateLimitMetersModule` @@ -1498,6 +1501,52 @@ const updated = await db.invitesModule.update({ where: { id: '' }, data: { const deleted = await db.invitesModule.delete({ where: { id: '' } }).execute(); ``` +### `db.principalAuthModule` + +CRUD operations for PrincipalAuthModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `principalsTableId` | UUID | Yes | +| `principalEntitiesTableId` | UUID | Yes | +| `principalScopeOverridesTableId` | UUID | Yes | +| `usersTableId` | UUID | Yes | +| `sessionsTableId` | UUID | Yes | +| `sessionCredentialsTableId` | UUID | Yes | +| `auditsTableId` | UUID | Yes | +| `principalsTableName` | String | Yes | +| `createPrincipalFunction` | String | Yes | +| `deletePrincipalFunction` | String | Yes | +| `createOrgPrincipalFunction` | String | Yes | +| `deleteOrgPrincipalFunction` | String | Yes | +| `createOrgApiKeyFunction` | String | Yes | +| `revokeOrgApiKeyFunction` | String | Yes | +| `apiName` | String | Yes | + +**Operations:** + +```typescript +// List all principalAuthModule records +const items = await db.principalAuthModule.findMany({ select: { id: true, databaseId: true, schemaId: true, principalsTableId: true, principalEntitiesTableId: true, principalScopeOverridesTableId: true, usersTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, principalsTableName: true, createPrincipalFunction: true, deletePrincipalFunction: true, createOrgPrincipalFunction: true, deleteOrgPrincipalFunction: true, createOrgApiKeyFunction: true, revokeOrgApiKeyFunction: true, apiName: true } }).execute(); + +// Get one by id +const item = await db.principalAuthModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, principalsTableId: true, principalEntitiesTableId: true, principalScopeOverridesTableId: true, usersTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, principalsTableName: true, createPrincipalFunction: true, deletePrincipalFunction: true, createOrgPrincipalFunction: true, deleteOrgPrincipalFunction: true, createOrgApiKeyFunction: true, revokeOrgApiKeyFunction: true, apiName: true } }).execute(); + +// Create +const created = await db.principalAuthModule.create({ data: { databaseId: '', schemaId: '', principalsTableId: '', principalEntitiesTableId: '', principalScopeOverridesTableId: '', usersTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', principalsTableName: '', createPrincipalFunction: '', deletePrincipalFunction: '', createOrgPrincipalFunction: '', deleteOrgPrincipalFunction: '', createOrgApiKeyFunction: '', revokeOrgApiKeyFunction: '', apiName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.principalAuthModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.principalAuthModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.computeLogModule` CRUD operations for ComputeLogModule records. @@ -1639,6 +1688,53 @@ const updated = await db.namespaceModule.update({ where: { id: '' }, data: const deleted = await db.namespaceModule.delete({ where: { id: '' } }).execute(); ``` +### `db.resourceModule` + +CRUD operations for ResourceModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `privateSchemaId` | UUID | Yes | +| `publicSchemaName` | String | Yes | +| `privateSchemaName` | String | Yes | +| `resourcesTableId` | UUID | Yes | +| `resourceEventsTableId` | UUID | Yes | +| `resourcesTableName` | String | Yes | +| `resourceEventsTableName` | String | Yes | +| `apiName` | String | Yes | +| `privateApiName` | String | Yes | +| `scope` | String | Yes | +| `prefix` | String | Yes | +| `entityTableId` | UUID | Yes | +| `namespaceModuleId` | UUID | Yes | +| `policies` | JSON | Yes | +| `provisions` | JSON | Yes | +| `defaultPermissions` | String | Yes | + +**Operations:** + +```typescript +// List all resourceModule records +const items = await db.resourceModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, resourcesTableId: true, resourceEventsTableId: true, resourcesTableName: true, resourceEventsTableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, namespaceModuleId: true, policies: true, provisions: true, defaultPermissions: true } }).execute(); + +// Get one by id +const item = await db.resourceModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, publicSchemaName: true, privateSchemaName: true, resourcesTableId: true, resourceEventsTableId: true, resourcesTableName: true, resourceEventsTableName: true, apiName: true, privateApiName: true, scope: true, prefix: true, entityTableId: true, namespaceModuleId: true, policies: true, provisions: true, defaultPermissions: true } }).execute(); + +// Create +const created = await db.resourceModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', publicSchemaName: '', privateSchemaName: '', resourcesTableId: '', resourceEventsTableId: '', resourcesTableName: '', resourceEventsTableName: '', apiName: '', privateApiName: '', scope: '', prefix: '', entityTableId: '', namespaceModuleId: '', policies: '', provisions: '', defaultPermissions: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.resourceModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.resourceModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.storageLogModule` CRUD operations for StorageLogModule records. diff --git a/sdk/constructive-sdk/src/modules/orm/index.ts b/sdk/constructive-sdk/src/modules/orm/index.ts index 7c5a882c52..c425b183cd 100644 --- a/sdk/constructive-sdk/src/modules/orm/index.ts +++ b/sdk/constructive-sdk/src/modules/orm/index.ts @@ -31,19 +31,21 @@ import { BlueprintConstructionModel } from './models/blueprintConstruction'; import { CryptoAuthModuleModel } from './models/cryptoAuthModule'; import { SessionsModuleModel } from './models/sessionsModule'; import { SecureTableProvisionModel } from './models/secureTableProvision'; -import { MerkleStoreModuleModel } from './models/merkleStoreModule'; -import { GraphModuleModel } from './models/graphModule'; import { DatabaseProvisionModuleModel } from './models/databaseProvisionModule'; import { ConfigSecretsModuleModel } from './models/configSecretsModule'; +import { GraphModuleModel } from './models/graphModule'; +import { MerkleStoreModuleModel } from './models/merkleStoreModule'; import { RateLimitMetersModuleModel } from './models/rateLimitMetersModule'; import { RealtimeModuleModel } from './models/realtimeModule'; import { WebauthnAuthModuleModel } from './models/webauthnAuthModule'; import { FunctionInvocationModuleModel } from './models/functionInvocationModule'; import { FunctionModuleModel } from './models/functionModule'; import { InvitesModuleModel } from './models/invitesModule'; +import { PrincipalAuthModuleModel } from './models/principalAuthModule'; import { ComputeLogModuleModel } from './models/computeLogModule'; import { InferenceLogModuleModel } from './models/inferenceLogModule'; import { NamespaceModuleModel } from './models/namespaceModule'; +import { ResourceModuleModel } from './models/resourceModule'; import { StorageLogModuleModel } from './models/storageLogModule'; import { TransferLogModuleModel } from './models/transferLogModule'; import { FunctionDeploymentModuleModel } from './models/functionDeploymentModule'; @@ -125,19 +127,21 @@ export function createClient(config: OrmClientConfig) { cryptoAuthModule: new CryptoAuthModuleModel(client), sessionsModule: new SessionsModuleModel(client), secureTableProvision: new SecureTableProvisionModel(client), - merkleStoreModule: new MerkleStoreModuleModel(client), - graphModule: new GraphModuleModel(client), databaseProvisionModule: new DatabaseProvisionModuleModel(client), configSecretsModule: new ConfigSecretsModuleModel(client), + graphModule: new GraphModuleModel(client), + merkleStoreModule: new MerkleStoreModuleModel(client), rateLimitMetersModule: new RateLimitMetersModuleModel(client), realtimeModule: new RealtimeModuleModel(client), webauthnAuthModule: new WebauthnAuthModuleModel(client), functionInvocationModule: new FunctionInvocationModuleModel(client), functionModule: new FunctionModuleModel(client), invitesModule: new InvitesModuleModel(client), + principalAuthModule: new PrincipalAuthModuleModel(client), computeLogModule: new ComputeLogModuleModel(client), inferenceLogModule: new InferenceLogModuleModel(client), namespaceModule: new NamespaceModuleModel(client), + resourceModule: new ResourceModuleModel(client), storageLogModule: new StorageLogModuleModel(client), transferLogModule: new TransferLogModuleModel(client), functionDeploymentModule: new FunctionDeploymentModuleModel(client), diff --git a/sdk/constructive-sdk/src/modules/orm/input-types.ts b/sdk/constructive-sdk/src/modules/orm/input-types.ts index ddd8bf6a34..2a57e98f03 100644 --- a/sdk/constructive-sdk/src/modules/orm/input-types.ts +++ b/sdk/constructive-sdk/src/modules/orm/input-types.ts @@ -606,43 +606,6 @@ export interface SecureTableProvision { /** Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. */ outFields?: string[] | null; } -export interface MerkleStoreModule { - id: string; - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - objectTableId?: string | null; - storeTableId?: string | null; - commitTableId?: string | null; - refTableId?: string | null; - prefix?: string | null; - apiName?: string | null; - privateApiName?: string | null; - scope?: string | null; - functionPrefix?: string | null; - createdAt?: string | null; -} -export interface GraphModule { - id: string; - databaseId?: string | null; - publicSchemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - scope?: string | null; - prefix?: string | null; - merkleStoreModuleId?: string | null; - graphsTableId?: string | null; - apiName?: string | null; - privateApiName?: string | null; - entityTableId?: string | null; - policies?: Record | null; - provisions?: Record | null; - defaultPermissions?: string[] | null; - createdAt?: string | null; -} /** Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. */ export interface DatabaseProvisionModule { id: string; @@ -693,6 +656,44 @@ export interface ConfigSecretsModule { provisions?: Record | null; hasConfig?: boolean | null; } +export interface GraphModule { + id: string; + databaseId?: string | null; + publicSchemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + scope?: string | null; + prefix?: string | null; + merkleStoreModuleId?: string | null; + graphsTableId?: string | null; + apiName?: string | null; + privateApiName?: string | null; + entityTableId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; + createdAt?: string | null; +} +export interface MerkleStoreModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + objectTableId?: string | null; + storeTableId?: string | null; + commitTableId?: string | null; + refTableId?: string | null; + prefix?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + functionPrefix?: string | null; + permissionKey?: string | null; + createdAt?: string | null; +} export interface RateLimitMetersModule { id: string; databaseId?: string | null; @@ -806,6 +807,27 @@ export interface InvitesModule { apiName?: string | null; privateApiName?: string | null; } +/** Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database. */ +export interface PrincipalAuthModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + principalsTableId?: string | null; + principalEntitiesTableId?: string | null; + principalScopeOverridesTableId?: string | null; + usersTableId?: string | null; + sessionsTableId?: string | null; + sessionCredentialsTableId?: string | null; + auditsTableId?: string | null; + principalsTableName?: string | null; + createPrincipalFunction?: string | null; + deletePrincipalFunction?: string | null; + createOrgPrincipalFunction?: string | null; + deleteOrgPrincipalFunction?: string | null; + createOrgApiKeyFunction?: string | null; + revokeOrgApiKeyFunction?: string | null; + apiName?: string | null; +} export interface ComputeLogModule { id: string; databaseId?: string | null; @@ -869,6 +891,27 @@ export interface NamespaceModule { provisions?: Record | null; defaultPermissions?: string[] | null; } +export interface ResourceModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + resourcesTableId?: string | null; + resourceEventsTableId?: string | null; + resourcesTableName?: string | null; + resourceEventsTableName?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + prefix?: string | null; + entityTableId?: string | null; + namespaceModuleId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; +} export interface StorageLogModule { id: string; databaseId?: string | null; @@ -1831,23 +1874,27 @@ export interface BlueprintConstructionRelations { export interface CryptoAuthModuleRelations {} export interface SessionsModuleRelations {} export interface SecureTableProvisionRelations {} -export interface MerkleStoreModuleRelations { - graphModules?: ConnectionResult; -} +export interface DatabaseProvisionModuleRelations {} +export interface ConfigSecretsModuleRelations {} export interface GraphModuleRelations { merkleStoreModule?: MerkleStoreModule | null; } -export interface DatabaseProvisionModuleRelations {} -export interface ConfigSecretsModuleRelations {} +export interface MerkleStoreModuleRelations { + graphModules?: ConnectionResult; +} export interface RateLimitMetersModuleRelations {} export interface RealtimeModuleRelations {} export interface WebauthnAuthModuleRelations {} export interface FunctionInvocationModuleRelations {} export interface FunctionModuleRelations {} export interface InvitesModuleRelations {} +export interface PrincipalAuthModuleRelations {} export interface ComputeLogModuleRelations {} export interface InferenceLogModuleRelations {} export interface NamespaceModuleRelations {} +export interface ResourceModuleRelations { + namespaceModule?: NamespaceModule | null; +} export interface StorageLogModuleRelations {} export interface TransferLogModuleRelations {} export interface FunctionDeploymentModuleRelations { @@ -1912,11 +1959,11 @@ export type CryptoAuthModuleWithRelations = CryptoAuthModule & CryptoAuthModuleR export type SessionsModuleWithRelations = SessionsModule & SessionsModuleRelations; export type SecureTableProvisionWithRelations = SecureTableProvision & SecureTableProvisionRelations; -export type MerkleStoreModuleWithRelations = MerkleStoreModule & MerkleStoreModuleRelations; -export type GraphModuleWithRelations = GraphModule & GraphModuleRelations; export type DatabaseProvisionModuleWithRelations = DatabaseProvisionModule & DatabaseProvisionModuleRelations; export type ConfigSecretsModuleWithRelations = ConfigSecretsModule & ConfigSecretsModuleRelations; +export type GraphModuleWithRelations = GraphModule & GraphModuleRelations; +export type MerkleStoreModuleWithRelations = MerkleStoreModule & MerkleStoreModuleRelations; export type RateLimitMetersModuleWithRelations = RateLimitMetersModule & RateLimitMetersModuleRelations; export type RealtimeModuleWithRelations = RealtimeModule & RealtimeModuleRelations; @@ -1925,9 +1972,11 @@ export type FunctionInvocationModuleWithRelations = FunctionInvocationModule & FunctionInvocationModuleRelations; export type FunctionModuleWithRelations = FunctionModule & FunctionModuleRelations; export type InvitesModuleWithRelations = InvitesModule & InvitesModuleRelations; +export type PrincipalAuthModuleWithRelations = PrincipalAuthModule & PrincipalAuthModuleRelations; export type ComputeLogModuleWithRelations = ComputeLogModule & ComputeLogModuleRelations; export type InferenceLogModuleWithRelations = InferenceLogModule & InferenceLogModuleRelations; export type NamespaceModuleWithRelations = NamespaceModule & NamespaceModuleRelations; +export type ResourceModuleWithRelations = ResourceModule & ResourceModuleRelations; export type StorageLogModuleWithRelations = StorageLogModule & StorageLogModuleRelations; export type TransferLogModuleWithRelations = TransferLogModule & TransferLogModuleRelations; export type FunctionDeploymentModuleWithRelations = FunctionDeploymentModule & @@ -2273,29 +2322,40 @@ export type SecureTableProvisionSelect = { policies?: boolean; outFields?: boolean; }; -export type MerkleStoreModuleSelect = { +export type DatabaseProvisionModuleSelect = { + id?: boolean; + databaseName?: boolean; + ownerId?: boolean; + subdomain?: boolean; + domain?: boolean; + modules?: boolean; + options?: boolean; + bootstrapUser?: boolean; + status?: boolean; + errorMessage?: boolean; + databaseId?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + completedAt?: boolean; +}; +export type ConfigSecretsModuleSelect = { id?: boolean; databaseId?: boolean; schemaId?: boolean; privateSchemaId?: boolean; publicSchemaName?: boolean; privateSchemaName?: boolean; - objectTableId?: boolean; - storeTableId?: boolean; - commitTableId?: boolean; - refTableId?: boolean; - prefix?: boolean; + tableId?: boolean; + configDefinitionsTableId?: boolean; + tableName?: boolean; apiName?: boolean; privateApiName?: boolean; scope?: boolean; - functionPrefix?: boolean; - createdAt?: boolean; - graphModules?: { - select: GraphModuleSelect; - first?: number; - filter?: GraphModuleFilter; - orderBy?: GraphModuleOrderBy[]; - }; + prefix?: boolean; + entityTableId?: boolean; + policies?: boolean; + provisions?: boolean; + hasConfig?: boolean; }; export type GraphModuleSelect = { id?: boolean; @@ -2319,40 +2379,30 @@ export type GraphModuleSelect = { select: MerkleStoreModuleSelect; }; }; -export type DatabaseProvisionModuleSelect = { - id?: boolean; - databaseName?: boolean; - ownerId?: boolean; - subdomain?: boolean; - domain?: boolean; - modules?: boolean; - options?: boolean; - bootstrapUser?: boolean; - status?: boolean; - errorMessage?: boolean; - databaseId?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - completedAt?: boolean; -}; -export type ConfigSecretsModuleSelect = { +export type MerkleStoreModuleSelect = { id?: boolean; databaseId?: boolean; schemaId?: boolean; privateSchemaId?: boolean; publicSchemaName?: boolean; privateSchemaName?: boolean; - tableId?: boolean; - configDefinitionsTableId?: boolean; - tableName?: boolean; + objectTableId?: boolean; + storeTableId?: boolean; + commitTableId?: boolean; + refTableId?: boolean; + prefix?: boolean; apiName?: boolean; privateApiName?: boolean; scope?: boolean; - prefix?: boolean; - entityTableId?: boolean; - policies?: boolean; - provisions?: boolean; - hasConfig?: boolean; + functionPrefix?: boolean; + permissionKey?: boolean; + createdAt?: boolean; + graphModules?: { + select: GraphModuleSelect; + first?: number; + filter?: GraphModuleFilter; + orderBy?: GraphModuleOrderBy[]; + }; }; export type RateLimitMetersModuleSelect = { id?: boolean; @@ -2467,6 +2517,26 @@ export type InvitesModuleSelect = { apiName?: boolean; privateApiName?: boolean; }; +export type PrincipalAuthModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + principalsTableId?: boolean; + principalEntitiesTableId?: boolean; + principalScopeOverridesTableId?: boolean; + usersTableId?: boolean; + sessionsTableId?: boolean; + sessionCredentialsTableId?: boolean; + auditsTableId?: boolean; + principalsTableName?: boolean; + createPrincipalFunction?: boolean; + deletePrincipalFunction?: boolean; + createOrgPrincipalFunction?: boolean; + deleteOrgPrincipalFunction?: boolean; + createOrgApiKeyFunction?: boolean; + revokeOrgApiKeyFunction?: boolean; + apiName?: boolean; +}; export type ComputeLogModuleSelect = { id?: boolean; databaseId?: boolean; @@ -2530,6 +2600,30 @@ export type NamespaceModuleSelect = { provisions?: boolean; defaultPermissions?: boolean; }; +export type ResourceModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + privateSchemaId?: boolean; + publicSchemaName?: boolean; + privateSchemaName?: boolean; + resourcesTableId?: boolean; + resourceEventsTableId?: boolean; + resourcesTableName?: boolean; + resourceEventsTableName?: boolean; + apiName?: boolean; + privateApiName?: boolean; + scope?: boolean; + prefix?: boolean; + entityTableId?: boolean; + namespaceModuleId?: boolean; + policies?: boolean; + provisions?: boolean; + defaultPermissions?: boolean; + namespaceModule?: { + select: NamespaceModuleSelect; + }; +}; export type StorageLogModuleSelect = { id?: boolean; databaseId?: boolean; @@ -3841,49 +3935,83 @@ export interface SecureTableProvisionFilter { /** Negates the expression. */ not?: SecureTableProvisionFilter; } -export interface MerkleStoreModuleFilter { +export interface DatabaseProvisionModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `databaseName` field. */ + databaseName?: StringFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `subdomain` field. */ + subdomain?: StringFilter; + /** Filter by the object’s `domain` field. */ + domain?: StringFilter; + /** Filter by the object’s `modules` field. */ + modules?: JSONFilter; + /** Filter by the object’s `options` field. */ + options?: JSONFilter; + /** Filter by the object’s `bootstrapUser` field. */ + bootstrapUser?: BooleanFilter; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `errorMessage` field. */ + errorMessage?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `publicSchemaName` field. */ - publicSchemaName?: StringFilter; - /** Filter by the object’s `privateSchemaName` field. */ - privateSchemaName?: StringFilter; - /** Filter by the object’s `objectTableId` field. */ - objectTableId?: UUIDFilter; - /** Filter by the object’s `storeTableId` field. */ - storeTableId?: UUIDFilter; - /** Filter by the object’s `commitTableId` field. */ - commitTableId?: UUIDFilter; - /** Filter by the object’s `refTableId` field. */ - refTableId?: UUIDFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `completedAt` field. */ + completedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: DatabaseProvisionModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: DatabaseProvisionModuleFilter[]; + /** Negates the expression. */ + not?: DatabaseProvisionModuleFilter; +} +export interface ConfigSecretsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `configDefinitionsTableId` field. */ + configDefinitionsTableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; /** Filter by the object’s `privateApiName` field. */ privateApiName?: StringFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; - /** Filter by the object’s `functionPrefix` field. */ - functionPrefix?: StringFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `hasConfig` field. */ + hasConfig?: BooleanFilter; /** Checks for all expressions in this list. */ - and?: MerkleStoreModuleFilter[]; + and?: ConfigSecretsModuleFilter[]; /** Checks for any expressions in this list. */ - or?: MerkleStoreModuleFilter[]; + or?: ConfigSecretsModuleFilter[]; /** Negates the expression. */ - not?: MerkleStoreModuleFilter; - /** Filter by the object’s `graphModules` relation. */ - graphModules?: MerkleStoreModuleToManyGraphModuleFilter; - /** `graphModules` exist. */ - graphModulesExist?: boolean; + not?: ConfigSecretsModuleFilter; } export interface GraphModuleFilter { /** Filter by the object’s `id` field. */ @@ -3929,43 +4057,7 @@ export interface GraphModuleFilter { /** Filter by the object’s `merkleStoreModule` relation. */ merkleStoreModule?: MerkleStoreModuleFilter; } -export interface DatabaseProvisionModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseName` field. */ - databaseName?: StringFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `subdomain` field. */ - subdomain?: StringFilter; - /** Filter by the object’s `domain` field. */ - domain?: StringFilter; - /** Filter by the object’s `modules` field. */ - modules?: JSONFilter; - /** Filter by the object’s `options` field. */ - options?: JSONFilter; - /** Filter by the object’s `bootstrapUser` field. */ - bootstrapUser?: BooleanFilter; - /** Filter by the object’s `status` field. */ - status?: StringFilter; - /** Filter by the object’s `errorMessage` field. */ - errorMessage?: StringFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `completedAt` field. */ - completedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: DatabaseProvisionModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: DatabaseProvisionModuleFilter[]; - /** Negates the expression. */ - not?: DatabaseProvisionModuleFilter; -} -export interface ConfigSecretsModuleFilter { +export interface MerkleStoreModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ @@ -3978,34 +4070,38 @@ export interface ConfigSecretsModuleFilter { publicSchemaName?: StringFilter; /** Filter by the object’s `privateSchemaName` field. */ privateSchemaName?: StringFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `configDefinitionsTableId` field. */ - configDefinitionsTableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; + /** Filter by the object’s `objectTableId` field. */ + objectTableId?: UUIDFilter; + /** Filter by the object’s `storeTableId` field. */ + storeTableId?: UUIDFilter; + /** Filter by the object’s `commitTableId` field. */ + commitTableId?: UUIDFilter; + /** Filter by the object’s `refTableId` field. */ + refTableId?: UUIDFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; /** Filter by the object’s `privateApiName` field. */ privateApiName?: StringFilter; /** Filter by the object’s `scope` field. */ scope?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; - /** Filter by the object’s `entityTableId` field. */ - entityTableId?: UUIDFilter; - /** Filter by the object’s `policies` field. */ - policies?: JSONFilter; - /** Filter by the object’s `provisions` field. */ - provisions?: JSONFilter; - /** Filter by the object’s `hasConfig` field. */ - hasConfig?: BooleanFilter; + /** Filter by the object’s `functionPrefix` field. */ + functionPrefix?: StringFilter; + /** Filter by the object’s `permissionKey` field. */ + permissionKey?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Checks for all expressions in this list. */ - and?: ConfigSecretsModuleFilter[]; + and?: MerkleStoreModuleFilter[]; /** Checks for any expressions in this list. */ - or?: ConfigSecretsModuleFilter[]; + or?: MerkleStoreModuleFilter[]; /** Negates the expression. */ - not?: ConfigSecretsModuleFilter; + not?: MerkleStoreModuleFilter; + /** Filter by the object’s `graphModules` relation. */ + graphModules?: MerkleStoreModuleToManyGraphModuleFilter; + /** `graphModules` exist. */ + graphModulesExist?: boolean; } export interface RateLimitMetersModuleFilter { /** Filter by the object’s `id` field. */ @@ -4257,6 +4353,50 @@ export interface InvitesModuleFilter { /** Negates the expression. */ not?: InvitesModuleFilter; } +export interface PrincipalAuthModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `principalsTableId` field. */ + principalsTableId?: UUIDFilter; + /** Filter by the object’s `principalEntitiesTableId` field. */ + principalEntitiesTableId?: UUIDFilter; + /** Filter by the object’s `principalScopeOverridesTableId` field. */ + principalScopeOverridesTableId?: UUIDFilter; + /** Filter by the object’s `usersTableId` field. */ + usersTableId?: UUIDFilter; + /** Filter by the object’s `sessionsTableId` field. */ + sessionsTableId?: UUIDFilter; + /** Filter by the object’s `sessionCredentialsTableId` field. */ + sessionCredentialsTableId?: UUIDFilter; + /** Filter by the object’s `auditsTableId` field. */ + auditsTableId?: UUIDFilter; + /** Filter by the object’s `principalsTableName` field. */ + principalsTableName?: StringFilter; + /** Filter by the object’s `createPrincipalFunction` field. */ + createPrincipalFunction?: StringFilter; + /** Filter by the object’s `deletePrincipalFunction` field. */ + deletePrincipalFunction?: StringFilter; + /** Filter by the object’s `createOrgPrincipalFunction` field. */ + createOrgPrincipalFunction?: StringFilter; + /** Filter by the object’s `deleteOrgPrincipalFunction` field. */ + deleteOrgPrincipalFunction?: StringFilter; + /** Filter by the object’s `createOrgApiKeyFunction` field. */ + createOrgApiKeyFunction?: StringFilter; + /** Filter by the object’s `revokeOrgApiKeyFunction` field. */ + revokeOrgApiKeyFunction?: StringFilter; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Checks for all expressions in this list. */ + and?: PrincipalAuthModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: PrincipalAuthModuleFilter[]; + /** Negates the expression. */ + not?: PrincipalAuthModuleFilter; +} export interface ComputeLogModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -4395,6 +4535,56 @@ export interface NamespaceModuleFilter { /** Negates the expression. */ not?: NamespaceModuleFilter; } +export interface ResourceModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `resourcesTableId` field. */ + resourcesTableId?: UUIDFilter; + /** Filter by the object’s `resourceEventsTableId` field. */ + resourceEventsTableId?: UUIDFilter; + /** Filter by the object’s `resourcesTableName` field. */ + resourcesTableName?: StringFilter; + /** Filter by the object’s `resourceEventsTableName` field. */ + resourceEventsTableName?: StringFilter; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `namespaceModuleId` field. */ + namespaceModuleId?: UUIDFilter; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `defaultPermissions` field. */ + defaultPermissions?: StringListFilter; + /** Checks for all expressions in this list. */ + and?: ResourceModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: ResourceModuleFilter[]; + /** Negates the expression. */ + not?: ResourceModuleFilter; + /** Filter by the object’s `namespaceModule` relation. */ + namespaceModule?: NamespaceModuleFilter; + /** A related `namespaceModule` exists. */ + namespaceModuleExists?: boolean; +} export interface StorageLogModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -6248,43 +6438,39 @@ export type SecureTableProvisionOrderBy = | 'POLICIES_DESC' | 'OUT_FIELDS_ASC' | 'OUT_FIELDS_DESC'; -export type MerkleStoreModuleOrderBy = +export type DatabaseProvisionModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' + | 'DATABASE_NAME_ASC' + | 'DATABASE_NAME_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SUBDOMAIN_ASC' + | 'SUBDOMAIN_DESC' + | 'DOMAIN_ASC' + | 'DOMAIN_DESC' + | 'MODULES_ASC' + | 'MODULES_DESC' + | 'OPTIONS_ASC' + | 'OPTIONS_DESC' + | 'BOOTSTRAP_USER_ASC' + | 'BOOTSTRAP_USER_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'ERROR_MESSAGE_ASC' + | 'ERROR_MESSAGE_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'SCHEMA_ID_ASC' - | 'SCHEMA_ID_DESC' - | 'PRIVATE_SCHEMA_ID_ASC' - | 'PRIVATE_SCHEMA_ID_DESC' - | 'PUBLIC_SCHEMA_NAME_ASC' - | 'PUBLIC_SCHEMA_NAME_DESC' - | 'PRIVATE_SCHEMA_NAME_ASC' - | 'PRIVATE_SCHEMA_NAME_DESC' - | 'OBJECT_TABLE_ID_ASC' - | 'OBJECT_TABLE_ID_DESC' - | 'STORE_TABLE_ID_ASC' - | 'STORE_TABLE_ID_DESC' - | 'COMMIT_TABLE_ID_ASC' - | 'COMMIT_TABLE_ID_DESC' - | 'REF_TABLE_ID_ASC' - | 'REF_TABLE_ID_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC' - | 'API_NAME_ASC' - | 'API_NAME_DESC' - | 'PRIVATE_API_NAME_ASC' - | 'PRIVATE_API_NAME_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' - | 'FUNCTION_PREFIX_ASC' - | 'FUNCTION_PREFIX_DESC' | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC'; -export type GraphModuleOrderBy = + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'COMPLETED_AT_ASC' + | 'COMPLETED_AT_DESC'; +export type ConfigSecretsModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' @@ -6292,17 +6478,55 @@ export type GraphModuleOrderBy = | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'PUBLIC_SCHEMA_ID_ASC' - | 'PUBLIC_SCHEMA_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'PUBLIC_SCHEMA_NAME_ASC' | 'PUBLIC_SCHEMA_NAME_DESC' | 'PRIVATE_SCHEMA_NAME_ASC' | 'PRIVATE_SCHEMA_NAME_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' - | 'PREFIX_ASC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'CONFIG_DEFINITIONS_TABLE_ID_ASC' + | 'CONFIG_DEFINITIONS_TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'HAS_CONFIG_ASC' + | 'HAS_CONFIG_DESC'; +export type GraphModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'PUBLIC_SCHEMA_ID_ASC' + | 'PUBLIC_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'PREFIX_ASC' | 'PREFIX_DESC' | 'MERKLE_STORE_MODULE_ID_ASC' | 'MERKLE_STORE_MODULE_ID_DESC' @@ -6322,39 +6546,7 @@ export type GraphModuleOrderBy = | 'DEFAULT_PERMISSIONS_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC'; -export type DatabaseProvisionModuleOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'DATABASE_NAME_ASC' - | 'DATABASE_NAME_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SUBDOMAIN_ASC' - | 'SUBDOMAIN_DESC' - | 'DOMAIN_ASC' - | 'DOMAIN_DESC' - | 'MODULES_ASC' - | 'MODULES_DESC' - | 'OPTIONS_ASC' - | 'OPTIONS_DESC' - | 'BOOTSTRAP_USER_ASC' - | 'BOOTSTRAP_USER_DESC' - | 'STATUS_ASC' - | 'STATUS_DESC' - | 'ERROR_MESSAGE_ASC' - | 'ERROR_MESSAGE_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'COMPLETED_AT_ASC' - | 'COMPLETED_AT_DESC'; -export type ConfigSecretsModuleOrderBy = +export type MerkleStoreModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' @@ -6370,28 +6562,28 @@ export type ConfigSecretsModuleOrderBy = | 'PUBLIC_SCHEMA_NAME_DESC' | 'PRIVATE_SCHEMA_NAME_ASC' | 'PRIVATE_SCHEMA_NAME_DESC' - | 'TABLE_ID_ASC' - | 'TABLE_ID_DESC' - | 'CONFIG_DEFINITIONS_TABLE_ID_ASC' - | 'CONFIG_DEFINITIONS_TABLE_ID_DESC' - | 'TABLE_NAME_ASC' - | 'TABLE_NAME_DESC' + | 'OBJECT_TABLE_ID_ASC' + | 'OBJECT_TABLE_ID_DESC' + | 'STORE_TABLE_ID_ASC' + | 'STORE_TABLE_ID_DESC' + | 'COMMIT_TABLE_ID_ASC' + | 'COMMIT_TABLE_ID_DESC' + | 'REF_TABLE_ID_ASC' + | 'REF_TABLE_ID_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' | 'API_NAME_ASC' | 'API_NAME_DESC' | 'PRIVATE_API_NAME_ASC' | 'PRIVATE_API_NAME_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC' - | 'ENTITY_TABLE_ID_ASC' - | 'ENTITY_TABLE_ID_DESC' - | 'POLICIES_ASC' - | 'POLICIES_DESC' - | 'PROVISIONS_ASC' - | 'PROVISIONS_DESC' - | 'HAS_CONFIG_ASC' - | 'HAS_CONFIG_DESC'; + | 'FUNCTION_PREFIX_ASC' + | 'FUNCTION_PREFIX_DESC' + | 'PERMISSION_KEY_ASC' + | 'PERMISSION_KEY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC'; export type RateLimitMetersModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -6618,6 +6810,46 @@ export type InvitesModuleOrderBy = | 'API_NAME_DESC' | 'PRIVATE_API_NAME_ASC' | 'PRIVATE_API_NAME_DESC'; +export type PrincipalAuthModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRINCIPALS_TABLE_ID_ASC' + | 'PRINCIPALS_TABLE_ID_DESC' + | 'PRINCIPAL_ENTITIES_TABLE_ID_ASC' + | 'PRINCIPAL_ENTITIES_TABLE_ID_DESC' + | 'PRINCIPAL_SCOPE_OVERRIDES_TABLE_ID_ASC' + | 'PRINCIPAL_SCOPE_OVERRIDES_TABLE_ID_DESC' + | 'USERS_TABLE_ID_ASC' + | 'USERS_TABLE_ID_DESC' + | 'SESSIONS_TABLE_ID_ASC' + | 'SESSIONS_TABLE_ID_DESC' + | 'SESSION_CREDENTIALS_TABLE_ID_ASC' + | 'SESSION_CREDENTIALS_TABLE_ID_DESC' + | 'AUDITS_TABLE_ID_ASC' + | 'AUDITS_TABLE_ID_DESC' + | 'PRINCIPALS_TABLE_NAME_ASC' + | 'PRINCIPALS_TABLE_NAME_DESC' + | 'CREATE_PRINCIPAL_FUNCTION_ASC' + | 'CREATE_PRINCIPAL_FUNCTION_DESC' + | 'DELETE_PRINCIPAL_FUNCTION_ASC' + | 'DELETE_PRINCIPAL_FUNCTION_DESC' + | 'CREATE_ORG_PRINCIPAL_FUNCTION_ASC' + | 'CREATE_ORG_PRINCIPAL_FUNCTION_DESC' + | 'DELETE_ORG_PRINCIPAL_FUNCTION_ASC' + | 'DELETE_ORG_PRINCIPAL_FUNCTION_DESC' + | 'CREATE_ORG_API_KEY_FUNCTION_ASC' + | 'CREATE_ORG_API_KEY_FUNCTION_DESC' + | 'REVOKE_ORG_API_KEY_FUNCTION_ASC' + | 'REVOKE_ORG_API_KEY_FUNCTION_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC'; export type ComputeLogModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -6744,6 +6976,48 @@ export type NamespaceModuleOrderBy = | 'PROVISIONS_DESC' | 'DEFAULT_PERMISSIONS_ASC' | 'DEFAULT_PERMISSIONS_DESC'; +export type ResourceModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'RESOURCES_TABLE_ID_ASC' + | 'RESOURCES_TABLE_ID_DESC' + | 'RESOURCE_EVENTS_TABLE_ID_ASC' + | 'RESOURCE_EVENTS_TABLE_ID_DESC' + | 'RESOURCES_TABLE_NAME_ASC' + | 'RESOURCES_TABLE_NAME_DESC' + | 'RESOURCE_EVENTS_TABLE_NAME_ASC' + | 'RESOURCE_EVENTS_TABLE_NAME_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'NAMESPACE_MODULE_ID_ASC' + | 'NAMESPACE_MODULE_ID_DESC' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'DEFAULT_PERMISSIONS_ASC' + | 'DEFAULT_PERMISSIONS_DESC'; export type StorageLogModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -8755,96 +9029,6 @@ export interface DeleteSecureTableProvisionInput { clientMutationId?: string; id: string; } -export interface CreateMerkleStoreModuleInput { - clientMutationId?: string; - merkleStoreModule: { - databaseId: string; - schemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - objectTableId?: string; - storeTableId?: string; - commitTableId?: string; - refTableId?: string; - prefix?: string; - apiName?: string; - privateApiName?: string; - scope?: string; - functionPrefix?: string; - }; -} -export interface MerkleStoreModulePatch { - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - objectTableId?: string | null; - storeTableId?: string | null; - commitTableId?: string | null; - refTableId?: string | null; - prefix?: string | null; - apiName?: string | null; - privateApiName?: string | null; - scope?: string | null; - functionPrefix?: string | null; -} -export interface UpdateMerkleStoreModuleInput { - clientMutationId?: string; - id: string; - merkleStoreModulePatch: MerkleStoreModulePatch; -} -export interface DeleteMerkleStoreModuleInput { - clientMutationId?: string; - id: string; -} -export interface CreateGraphModuleInput { - clientMutationId?: string; - graphModule: { - databaseId: string; - publicSchemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - scope?: string; - prefix?: string; - merkleStoreModuleId: string; - graphsTableId?: string; - apiName?: string; - privateApiName?: string; - entityTableId?: string; - policies?: Record; - provisions?: Record; - defaultPermissions?: string[]; - }; -} -export interface GraphModulePatch { - databaseId?: string | null; - publicSchemaId?: string | null; - privateSchemaId?: string | null; - publicSchemaName?: string | null; - privateSchemaName?: string | null; - scope?: string | null; - prefix?: string | null; - merkleStoreModuleId?: string | null; - graphsTableId?: string | null; - apiName?: string | null; - privateApiName?: string | null; - entityTableId?: string | null; - policies?: Record | null; - provisions?: Record | null; - defaultPermissions?: string[] | null; -} -export interface UpdateGraphModuleInput { - clientMutationId?: string; - id: string; - graphModulePatch: GraphModulePatch; -} -export interface DeleteGraphModuleInput { - clientMutationId?: string; - id: string; -} export interface CreateDatabaseProvisionModuleInput { clientMutationId?: string; databaseProvisionModule: { @@ -8931,17 +9115,109 @@ export interface DeleteConfigSecretsModuleInput { clientMutationId?: string; id: string; } -export interface CreateRateLimitMetersModuleInput { +export interface CreateGraphModuleInput { clientMutationId?: string; - rateLimitMetersModule: { + graphModule: { databaseId: string; - schemaId?: string; + publicSchemaId?: string; privateSchemaId?: string; publicSchemaName?: string; privateSchemaName?: string; - rateLimitStateTableId?: string; - rateLimitStateTableName?: string; - rateLimitOverridesTableId?: string; + scope?: string; + prefix?: string; + merkleStoreModuleId: string; + graphsTableId?: string; + apiName?: string; + privateApiName?: string; + entityTableId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; + }; +} +export interface GraphModulePatch { + databaseId?: string | null; + publicSchemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + scope?: string | null; + prefix?: string | null; + merkleStoreModuleId?: string | null; + graphsTableId?: string | null; + apiName?: string | null; + privateApiName?: string | null; + entityTableId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; +} +export interface UpdateGraphModuleInput { + clientMutationId?: string; + id: string; + graphModulePatch: GraphModulePatch; +} +export interface DeleteGraphModuleInput { + clientMutationId?: string; + id: string; +} +export interface CreateMerkleStoreModuleInput { + clientMutationId?: string; + merkleStoreModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + objectTableId?: string; + storeTableId?: string; + commitTableId?: string; + refTableId?: string; + prefix?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + functionPrefix?: string; + permissionKey?: string; + }; +} +export interface MerkleStoreModulePatch { + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + objectTableId?: string | null; + storeTableId?: string | null; + commitTableId?: string | null; + refTableId?: string | null; + prefix?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + functionPrefix?: string | null; + permissionKey?: string | null; +} +export interface UpdateMerkleStoreModuleInput { + clientMutationId?: string; + id: string; + merkleStoreModulePatch: MerkleStoreModulePatch; +} +export interface DeleteMerkleStoreModuleInput { + clientMutationId?: string; + id: string; +} +export interface CreateRateLimitMetersModuleInput { + clientMutationId?: string; + rateLimitMetersModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + rateLimitStateTableId?: string; + rateLimitStateTableName?: string; + rateLimitOverridesTableId?: string; rateLimitOverridesTableName?: string; rateWindowLimitsTableId?: string; rateWindowLimitsTableName?: string; @@ -9217,6 +9493,56 @@ export interface DeleteInvitesModuleInput { clientMutationId?: string; id: string; } +export interface CreatePrincipalAuthModuleInput { + clientMutationId?: string; + principalAuthModule: { + databaseId: string; + schemaId?: string; + principalsTableId?: string; + principalEntitiesTableId?: string; + principalScopeOverridesTableId?: string; + usersTableId?: string; + sessionsTableId?: string; + sessionCredentialsTableId?: string; + auditsTableId?: string; + principalsTableName?: string; + createPrincipalFunction?: string; + deletePrincipalFunction?: string; + createOrgPrincipalFunction?: string; + deleteOrgPrincipalFunction?: string; + createOrgApiKeyFunction?: string; + revokeOrgApiKeyFunction?: string; + apiName?: string; + }; +} +export interface PrincipalAuthModulePatch { + databaseId?: string | null; + schemaId?: string | null; + principalsTableId?: string | null; + principalEntitiesTableId?: string | null; + principalScopeOverridesTableId?: string | null; + usersTableId?: string | null; + sessionsTableId?: string | null; + sessionCredentialsTableId?: string | null; + auditsTableId?: string | null; + principalsTableName?: string | null; + createPrincipalFunction?: string | null; + deletePrincipalFunction?: string | null; + createOrgPrincipalFunction?: string | null; + deleteOrgPrincipalFunction?: string | null; + createOrgApiKeyFunction?: string | null; + revokeOrgApiKeyFunction?: string | null; + apiName?: string | null; +} +export interface UpdatePrincipalAuthModuleInput { + clientMutationId?: string; + id: string; + principalAuthModulePatch: PrincipalAuthModulePatch; +} +export interface DeletePrincipalAuthModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateComputeLogModuleInput { clientMutationId?: string; computeLogModule: { @@ -9373,6 +9699,58 @@ export interface DeleteNamespaceModuleInput { clientMutationId?: string; id: string; } +export interface CreateResourceModuleInput { + clientMutationId?: string; + resourceModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + resourcesTableId?: string; + resourceEventsTableId?: string; + resourcesTableName?: string; + resourceEventsTableName?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + prefix?: string; + entityTableId?: string; + namespaceModuleId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; + }; +} +export interface ResourceModulePatch { + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + publicSchemaName?: string | null; + privateSchemaName?: string | null; + resourcesTableId?: string | null; + resourceEventsTableId?: string | null; + resourcesTableName?: string | null; + resourceEventsTableName?: string | null; + apiName?: string | null; + privateApiName?: string | null; + scope?: string | null; + prefix?: string | null; + entityTableId?: string | null; + namespaceModuleId?: string | null; + policies?: Record | null; + provisions?: Record | null; + defaultPermissions?: string[] | null; +} +export interface UpdateResourceModuleInput { + clientMutationId?: string; + id: string; + resourceModulePatch: ResourceModulePatch; +} +export interface DeleteResourceModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateStorageLogModuleInput { clientMutationId?: string; storageLogModule: { @@ -11348,45 +11726,6 @@ export interface SecureTableProvisionInput { /** Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. */ outFields?: string[]; } -/** An input for mutations affecting `MerkleStoreModule` */ -export interface MerkleStoreModuleInput { - id?: string; - databaseId: string; - schemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - objectTableId?: string; - storeTableId?: string; - commitTableId?: string; - refTableId?: string; - prefix?: string; - apiName?: string; - privateApiName?: string; - scope?: string; - functionPrefix?: string; - createdAt?: string; -} -/** An input for mutations affecting `GraphModule` */ -export interface GraphModuleInput { - id?: string; - databaseId: string; - publicSchemaId?: string; - privateSchemaId?: string; - publicSchemaName?: string; - privateSchemaName?: string; - scope?: string; - prefix?: string; - merkleStoreModuleId: string; - graphsTableId?: string; - apiName?: string; - privateApiName?: string; - entityTableId?: string; - policies?: Record; - provisions?: Record; - defaultPermissions?: string[]; - createdAt?: string; -} /** An input for mutations affecting `DatabaseProvisionModule` */ export interface DatabaseProvisionModuleInput { id?: string; @@ -11433,6 +11772,46 @@ export interface ConfigSecretsModuleInput { provisions?: Record; hasConfig?: boolean; } +/** An input for mutations affecting `GraphModule` */ +export interface GraphModuleInput { + id?: string; + databaseId: string; + publicSchemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + scope?: string; + prefix?: string; + merkleStoreModuleId: string; + graphsTableId?: string; + apiName?: string; + privateApiName?: string; + entityTableId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; + createdAt?: string; +} +/** An input for mutations affecting `MerkleStoreModule` */ +export interface MerkleStoreModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + objectTableId?: string; + storeTableId?: string; + commitTableId?: string; + refTableId?: string; + prefix?: string; + apiName?: string; + privateApiName?: string; + scope?: string; + functionPrefix?: string; + permissionKey?: string; + createdAt?: string; +} /** An input for mutations affecting `RateLimitMetersModule` */ export interface RateLimitMetersModuleInput { id?: string; @@ -11552,6 +11931,27 @@ export interface InvitesModuleInput { apiName?: string; privateApiName?: string; } +/** An input for mutations affecting `PrincipalAuthModule` */ +export interface PrincipalAuthModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + principalsTableId?: string; + principalEntitiesTableId?: string; + principalScopeOverridesTableId?: string; + usersTableId?: string; + sessionsTableId?: string; + sessionCredentialsTableId?: string; + auditsTableId?: string; + principalsTableName?: string; + createPrincipalFunction?: string; + deletePrincipalFunction?: string; + createOrgPrincipalFunction?: string; + deleteOrgPrincipalFunction?: string; + createOrgApiKeyFunction?: string; + revokeOrgApiKeyFunction?: string; + apiName?: string; +} /** An input for mutations affecting `ComputeLogModule` */ export interface ComputeLogModuleInput { id?: string; @@ -11618,28 +12018,50 @@ export interface NamespaceModuleInput { provisions?: Record; defaultPermissions?: string[]; } -/** An input for mutations affecting `StorageLogModule` */ -export interface StorageLogModuleInput { +/** An input for mutations affecting `ResourceModule` */ +export interface ResourceModuleInput { id?: string; databaseId: string; schemaId?: string; privateSchemaId?: string; publicSchemaName?: string; privateSchemaName?: string; - storageLogTableId?: string; - storageLogTableName?: string; - usageDailyTableId?: string; - usageDailyTableName?: string; - interval?: string; - retention?: string; - premake?: number; - scope?: string; - actorFkTableId?: string; - entityFkTableId?: string; - prefix?: string; + resourcesTableId?: string; + resourceEventsTableId?: string; + resourcesTableName?: string; + resourceEventsTableName?: string; apiName?: string; privateApiName?: string; -} + scope?: string; + prefix?: string; + entityTableId?: string; + namespaceModuleId?: string; + policies?: Record; + provisions?: Record; + defaultPermissions?: string[]; +} +/** An input for mutations affecting `StorageLogModule` */ +export interface StorageLogModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + publicSchemaName?: string; + privateSchemaName?: string; + storageLogTableId?: string; + storageLogTableName?: string; + usageDailyTableId?: string; + usageDailyTableName?: string; + interval?: string; + retention?: string; + premake?: number; + scope?: string; + actorFkTableId?: string; + entityFkTableId?: string; + prefix?: string; + apiName?: string; + privateApiName?: string; +} /** An input for mutations affecting `TransferLogModule` */ export interface TransferLogModuleInput { id?: string; @@ -12970,6 +13392,8 @@ export interface MerkleStoreModuleFilter { scope?: StringFilter; /** Filter by the object’s `functionPrefix` field. */ functionPrefix?: StringFilter; + /** Filter by the object’s `permissionKey` field. */ + permissionKey?: StringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Checks for all expressions in this list. */ @@ -14248,96 +14672,6 @@ export type DeleteSecureTableProvisionPayloadSelect = { select: SecureTableProvisionEdgeSelect; }; }; -export interface CreateMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was created by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} -export type CreateMerkleStoreModulePayloadSelect = { - clientMutationId?: boolean; - merkleStoreModule?: { - select: MerkleStoreModuleSelect; - }; - merkleStoreModuleEdge?: { - select: MerkleStoreModuleEdgeSelect; - }; -}; -export interface UpdateMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was updated by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} -export type UpdateMerkleStoreModulePayloadSelect = { - clientMutationId?: boolean; - merkleStoreModule?: { - select: MerkleStoreModuleSelect; - }; - merkleStoreModuleEdge?: { - select: MerkleStoreModuleEdgeSelect; - }; -}; -export interface DeleteMerkleStoreModulePayload { - clientMutationId?: string | null; - /** The `MerkleStoreModule` that was deleted by this mutation. */ - merkleStoreModule?: MerkleStoreModule | null; - merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; -} -export type DeleteMerkleStoreModulePayloadSelect = { - clientMutationId?: boolean; - merkleStoreModule?: { - select: MerkleStoreModuleSelect; - }; - merkleStoreModuleEdge?: { - select: MerkleStoreModuleEdgeSelect; - }; -}; -export interface CreateGraphModulePayload { - clientMutationId?: string | null; - /** The `GraphModule` that was created by this mutation. */ - graphModule?: GraphModule | null; - graphModuleEdge?: GraphModuleEdge | null; -} -export type CreateGraphModulePayloadSelect = { - clientMutationId?: boolean; - graphModule?: { - select: GraphModuleSelect; - }; - graphModuleEdge?: { - select: GraphModuleEdgeSelect; - }; -}; -export interface UpdateGraphModulePayload { - clientMutationId?: string | null; - /** The `GraphModule` that was updated by this mutation. */ - graphModule?: GraphModule | null; - graphModuleEdge?: GraphModuleEdge | null; -} -export type UpdateGraphModulePayloadSelect = { - clientMutationId?: boolean; - graphModule?: { - select: GraphModuleSelect; - }; - graphModuleEdge?: { - select: GraphModuleEdgeSelect; - }; -}; -export interface DeleteGraphModulePayload { - clientMutationId?: string | null; - /** The `GraphModule` that was deleted by this mutation. */ - graphModule?: GraphModule | null; - graphModuleEdge?: GraphModuleEdge | null; -} -export type DeleteGraphModulePayloadSelect = { - clientMutationId?: boolean; - graphModule?: { - select: GraphModuleSelect; - }; - graphModuleEdge?: { - select: GraphModuleEdgeSelect; - }; -}; export interface CreateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was created by this mutation. */ @@ -14428,6 +14762,96 @@ export type DeleteConfigSecretsModulePayloadSelect = { select: ConfigSecretsModuleEdgeSelect; }; }; +export interface CreateGraphModulePayload { + clientMutationId?: string | null; + /** The `GraphModule` that was created by this mutation. */ + graphModule?: GraphModule | null; + graphModuleEdge?: GraphModuleEdge | null; +} +export type CreateGraphModulePayloadSelect = { + clientMutationId?: boolean; + graphModule?: { + select: GraphModuleSelect; + }; + graphModuleEdge?: { + select: GraphModuleEdgeSelect; + }; +}; +export interface UpdateGraphModulePayload { + clientMutationId?: string | null; + /** The `GraphModule` that was updated by this mutation. */ + graphModule?: GraphModule | null; + graphModuleEdge?: GraphModuleEdge | null; +} +export type UpdateGraphModulePayloadSelect = { + clientMutationId?: boolean; + graphModule?: { + select: GraphModuleSelect; + }; + graphModuleEdge?: { + select: GraphModuleEdgeSelect; + }; +}; +export interface DeleteGraphModulePayload { + clientMutationId?: string | null; + /** The `GraphModule` that was deleted by this mutation. */ + graphModule?: GraphModule | null; + graphModuleEdge?: GraphModuleEdge | null; +} +export type DeleteGraphModulePayloadSelect = { + clientMutationId?: boolean; + graphModule?: { + select: GraphModuleSelect; + }; + graphModuleEdge?: { + select: GraphModuleEdgeSelect; + }; +}; +export interface CreateMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was created by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} +export type CreateMerkleStoreModulePayloadSelect = { + clientMutationId?: boolean; + merkleStoreModule?: { + select: MerkleStoreModuleSelect; + }; + merkleStoreModuleEdge?: { + select: MerkleStoreModuleEdgeSelect; + }; +}; +export interface UpdateMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was updated by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} +export type UpdateMerkleStoreModulePayloadSelect = { + clientMutationId?: boolean; + merkleStoreModule?: { + select: MerkleStoreModuleSelect; + }; + merkleStoreModuleEdge?: { + select: MerkleStoreModuleEdgeSelect; + }; +}; +export interface DeleteMerkleStoreModulePayload { + clientMutationId?: string | null; + /** The `MerkleStoreModule` that was deleted by this mutation. */ + merkleStoreModule?: MerkleStoreModule | null; + merkleStoreModuleEdge?: MerkleStoreModuleEdge | null; +} +export type DeleteMerkleStoreModulePayloadSelect = { + clientMutationId?: boolean; + merkleStoreModule?: { + select: MerkleStoreModuleSelect; + }; + merkleStoreModuleEdge?: { + select: MerkleStoreModuleEdgeSelect; + }; +}; export interface CreateRateLimitMetersModulePayload { clientMutationId?: string | null; /** The `RateLimitMetersModule` that was created by this mutation. */ @@ -14698,6 +15122,51 @@ export type DeleteInvitesModulePayloadSelect = { select: InvitesModuleEdgeSelect; }; }; +export interface CreatePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was created by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} +export type CreatePrincipalAuthModulePayloadSelect = { + clientMutationId?: boolean; + principalAuthModule?: { + select: PrincipalAuthModuleSelect; + }; + principalAuthModuleEdge?: { + select: PrincipalAuthModuleEdgeSelect; + }; +}; +export interface UpdatePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was updated by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} +export type UpdatePrincipalAuthModulePayloadSelect = { + clientMutationId?: boolean; + principalAuthModule?: { + select: PrincipalAuthModuleSelect; + }; + principalAuthModuleEdge?: { + select: PrincipalAuthModuleEdgeSelect; + }; +}; +export interface DeletePrincipalAuthModulePayload { + clientMutationId?: string | null; + /** The `PrincipalAuthModule` that was deleted by this mutation. */ + principalAuthModule?: PrincipalAuthModule | null; + principalAuthModuleEdge?: PrincipalAuthModuleEdge | null; +} +export type DeletePrincipalAuthModulePayloadSelect = { + clientMutationId?: boolean; + principalAuthModule?: { + select: PrincipalAuthModuleSelect; + }; + principalAuthModuleEdge?: { + select: PrincipalAuthModuleEdgeSelect; + }; +}; export interface CreateComputeLogModulePayload { clientMutationId?: string | null; /** The `ComputeLogModule` that was created by this mutation. */ @@ -14833,6 +15302,51 @@ export type DeleteNamespaceModulePayloadSelect = { select: NamespaceModuleEdgeSelect; }; }; +export interface CreateResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was created by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} +export type CreateResourceModulePayloadSelect = { + clientMutationId?: boolean; + resourceModule?: { + select: ResourceModuleSelect; + }; + resourceModuleEdge?: { + select: ResourceModuleEdgeSelect; + }; +}; +export interface UpdateResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was updated by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} +export type UpdateResourceModulePayloadSelect = { + clientMutationId?: boolean; + resourceModule?: { + select: ResourceModuleSelect; + }; + resourceModuleEdge?: { + select: ResourceModuleEdgeSelect; + }; +}; +export interface DeleteResourceModulePayload { + clientMutationId?: string | null; + /** The `ResourceModule` that was deleted by this mutation. */ + resourceModule?: ResourceModule | null; + resourceModuleEdge?: ResourceModuleEdge | null; +} +export type DeleteResourceModulePayloadSelect = { + clientMutationId?: boolean; + resourceModule?: { + select: ResourceModuleSelect; + }; + resourceModuleEdge?: { + select: ResourceModuleEdgeSelect; + }; +}; export interface CreateStorageLogModulePayload { clientMutationId?: string | null; /** The `StorageLogModule` that was created by this mutation. */ @@ -16065,30 +16579,6 @@ export type SecureTableProvisionEdgeSelect = { select: SecureTableProvisionSelect; }; }; -/** A `MerkleStoreModule` edge in the connection. */ -export interface MerkleStoreModuleEdge { - cursor?: string | null; - /** The `MerkleStoreModule` at the end of the edge. */ - node?: MerkleStoreModule | null; -} -export type MerkleStoreModuleEdgeSelect = { - cursor?: boolean; - node?: { - select: MerkleStoreModuleSelect; - }; -}; -/** A `GraphModule` edge in the connection. */ -export interface GraphModuleEdge { - cursor?: string | null; - /** The `GraphModule` at the end of the edge. */ - node?: GraphModule | null; -} -export type GraphModuleEdgeSelect = { - cursor?: boolean; - node?: { - select: GraphModuleSelect; - }; -}; /** A `DatabaseProvisionModule` edge in the connection. */ export interface DatabaseProvisionModuleEdge { cursor?: string | null; @@ -16113,6 +16603,30 @@ export type ConfigSecretsModuleEdgeSelect = { select: ConfigSecretsModuleSelect; }; }; +/** A `GraphModule` edge in the connection. */ +export interface GraphModuleEdge { + cursor?: string | null; + /** The `GraphModule` at the end of the edge. */ + node?: GraphModule | null; +} +export type GraphModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: GraphModuleSelect; + }; +}; +/** A `MerkleStoreModule` edge in the connection. */ +export interface MerkleStoreModuleEdge { + cursor?: string | null; + /** The `MerkleStoreModule` at the end of the edge. */ + node?: MerkleStoreModule | null; +} +export type MerkleStoreModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: MerkleStoreModuleSelect; + }; +}; /** A `RateLimitMetersModule` edge in the connection. */ export interface RateLimitMetersModuleEdge { cursor?: string | null; @@ -16185,6 +16699,18 @@ export type InvitesModuleEdgeSelect = { select: InvitesModuleSelect; }; }; +/** A `PrincipalAuthModule` edge in the connection. */ +export interface PrincipalAuthModuleEdge { + cursor?: string | null; + /** The `PrincipalAuthModule` at the end of the edge. */ + node?: PrincipalAuthModule | null; +} +export type PrincipalAuthModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: PrincipalAuthModuleSelect; + }; +}; /** A `ComputeLogModule` edge in the connection. */ export interface ComputeLogModuleEdge { cursor?: string | null; @@ -16221,6 +16747,18 @@ export type NamespaceModuleEdgeSelect = { select: NamespaceModuleSelect; }; }; +/** A `ResourceModule` edge in the connection. */ +export interface ResourceModuleEdge { + cursor?: string | null; + /** The `ResourceModule` at the end of the edge. */ + node?: ResourceModule | null; +} +export type ResourceModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: ResourceModuleSelect; + }; +}; /** A `StorageLogModule` edge in the connection. */ export interface StorageLogModuleEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/modules/orm/models/index.ts b/sdk/constructive-sdk/src/modules/orm/models/index.ts index 2ff305f2fc..15e5dd1552 100644 --- a/sdk/constructive-sdk/src/modules/orm/models/index.ts +++ b/sdk/constructive-sdk/src/modules/orm/models/index.ts @@ -29,19 +29,21 @@ export { BlueprintConstructionModel } from './blueprintConstruction'; export { CryptoAuthModuleModel } from './cryptoAuthModule'; export { SessionsModuleModel } from './sessionsModule'; export { SecureTableProvisionModel } from './secureTableProvision'; -export { MerkleStoreModuleModel } from './merkleStoreModule'; -export { GraphModuleModel } from './graphModule'; export { DatabaseProvisionModuleModel } from './databaseProvisionModule'; export { ConfigSecretsModuleModel } from './configSecretsModule'; +export { GraphModuleModel } from './graphModule'; +export { MerkleStoreModuleModel } from './merkleStoreModule'; export { RateLimitMetersModuleModel } from './rateLimitMetersModule'; export { RealtimeModuleModel } from './realtimeModule'; export { WebauthnAuthModuleModel } from './webauthnAuthModule'; export { FunctionInvocationModuleModel } from './functionInvocationModule'; export { FunctionModuleModel } from './functionModule'; export { InvitesModuleModel } from './invitesModule'; +export { PrincipalAuthModuleModel } from './principalAuthModule'; export { ComputeLogModuleModel } from './computeLogModule'; export { InferenceLogModuleModel } from './inferenceLogModule'; export { NamespaceModuleModel } from './namespaceModule'; +export { ResourceModuleModel } from './resourceModule'; export { StorageLogModuleModel } from './storageLogModule'; export { TransferLogModuleModel } from './transferLogModule'; export { FunctionDeploymentModuleModel } from './functionDeploymentModule'; diff --git a/sdk/constructive-sdk/src/modules/orm/models/principalAuthModule.ts b/sdk/constructive-sdk/src/modules/orm/models/principalAuthModule.ts new file mode 100644 index 0000000000..c0e9d913d3 --- /dev/null +++ b/sdk/constructive-sdk/src/modules/orm/models/principalAuthModule.ts @@ -0,0 +1,245 @@ +/** + * PrincipalAuthModule 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 { + PrincipalAuthModule, + PrincipalAuthModuleWithRelations, + PrincipalAuthModuleSelect, + PrincipalAuthModuleFilter, + PrincipalAuthModuleOrderBy, + CreatePrincipalAuthModuleInput, + UpdatePrincipalAuthModuleInput, + PrincipalAuthModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PrincipalAuthModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalAuthModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalAuthModule', + 'principalAuthModules', + 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, + }, + 'PrincipalAuthModuleFilter', + 'PrincipalAuthModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalAuthModule', + fieldName: 'principalAuthModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalAuthModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PrincipalAuthModule', + 'principalAuthModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PrincipalAuthModuleFilter', + 'PrincipalAuthModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalAuthModule', + fieldName: 'principalAuthModule', + document, + variables, + transform: (data: { + principalAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalAuthModule: data.principalAuthModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + principalAuthModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PrincipalAuthModule', + 'principalAuthModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PrincipalAuthModuleFilter', + 'PrincipalAuthModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PrincipalAuthModule', + fieldName: 'principalAuthModule', + document, + variables, + transform: (data: { + principalAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + principalAuthModule: data.principalAuthModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PrincipalAuthModule', + 'createPrincipalAuthModule', + 'principalAuthModule', + args.select, + args.data, + 'CreatePrincipalAuthModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalAuthModule', + fieldName: 'createPrincipalAuthModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PrincipalAuthModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PrincipalAuthModule', + 'updatePrincipalAuthModule', + 'principalAuthModule', + args.select, + args.where.id, + args.data, + 'UpdatePrincipalAuthModuleInput', + 'id', + 'principalAuthModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalAuthModule', + fieldName: 'updatePrincipalAuthModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePrincipalAuthModule: { + principalAuthModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PrincipalAuthModule', + 'deletePrincipalAuthModule', + 'principalAuthModule', + { + id: args.where.id, + }, + 'DeletePrincipalAuthModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PrincipalAuthModule', + fieldName: 'deletePrincipalAuthModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/modules/orm/models/resourceModule.ts b/sdk/constructive-sdk/src/modules/orm/models/resourceModule.ts new file mode 100644 index 0000000000..8fef54a24a --- /dev/null +++ b/sdk/constructive-sdk/src/modules/orm/models/resourceModule.ts @@ -0,0 +1,245 @@ +/** + * ResourceModule 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 { + ResourceModule, + ResourceModuleWithRelations, + ResourceModuleSelect, + ResourceModuleFilter, + ResourceModuleOrderBy, + CreateResourceModuleInput, + UpdateResourceModuleInput, + ResourceModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ResourceModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceModule', + 'resourceModules', + 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, + }, + 'ResourceModuleFilter', + 'ResourceModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceModule', + fieldName: 'resourceModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ResourceModule', + 'resourceModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ResourceModuleFilter', + 'ResourceModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceModule', + fieldName: 'resourceModule', + document, + variables, + transform: (data: { + resourceModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceModule: data.resourceModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + resourceModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ResourceModule', + 'resourceModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ResourceModuleFilter', + 'ResourceModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ResourceModule', + fieldName: 'resourceModule', + document, + variables, + transform: (data: { + resourceModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + resourceModule: data.resourceModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createResourceModule: { + resourceModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ResourceModule', + 'createResourceModule', + 'resourceModule', + args.select, + args.data, + 'CreateResourceModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceModule', + fieldName: 'createResourceModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ResourceModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateResourceModule: { + resourceModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ResourceModule', + 'updateResourceModule', + 'resourceModule', + args.select, + args.where.id, + args.data, + 'UpdateResourceModuleInput', + 'id', + 'resourceModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceModule', + fieldName: 'updateResourceModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteResourceModule: { + resourceModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ResourceModule', + 'deleteResourceModule', + 'resourceModule', + { + id: args.where.id, + }, + 'DeleteResourceModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ResourceModule', + fieldName: 'deleteResourceModule', + document, + variables, + }); + } +}