From f9827ba485679c52564c4eae3317a6b2b3922ebe Mon Sep 17 00:00:00 2001 From: saltcod <105593+saltcod@users.noreply.github.com> Date: Mon, 18 Aug 2025 00:29:59 +0000 Subject: [PATCH] feat: update mgmt api docs --- apps/docs/spec/api_v1_openapi.json | 5413 +++++-- apps/docs/spec/common-api-sections.json | 312 +- apps/docs/spec/supabase_swift_v2.yml | 8 +- .../transforms/api_v1_openapi_deparsed.json | 13007 +++++++++++----- 4 files changed, 13044 insertions(+), 5696 deletions(-) diff --git a/apps/docs/spec/api_v1_openapi.json b/apps/docs/spec/api_v1_openapi.json index ce2edf917b5bc..6f7977724d0f6 100644 --- a/apps/docs/spec/api_v1_openapi.json +++ b/apps/docs/spec/api_v1_openapi.json @@ -12,7 +12,7 @@ "required": true, "in": "path", "description": "Branch ID", - "schema": { "type": "string" } + "schema": { "format": "uuid", "type": "string" } } ], "responses": { @@ -39,7 +39,7 @@ "required": true, "in": "path", "description": "Branch ID", - "schema": { "type": "string" } + "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { @@ -70,7 +70,7 @@ "required": true, "in": "path", "description": "Branch ID", - "schema": { "type": "string" } + "schema": { "format": "uuid", "type": "string" } } ], "responses": { @@ -99,9 +99,15 @@ "required": true, "in": "path", "description": "Branch ID", - "schema": { "type": "string" } + "schema": { "format": "uuid", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BranchActionBody" } } + } + }, "responses": { "201": { "description": "", @@ -117,6 +123,41 @@ "security": [{ "bearer": [] }] } }, + "/v1/branches/{branch_id}/merge": { + "post": { + "operationId": "v1-merge-a-branch", + "summary": "Merges a database branch", + "description": "Merges the specified database branch", + "parameters": [ + { + "name": "branch_id", + "required": true, + "in": "path", + "description": "Branch ID", + "schema": { "format": "uuid", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BranchActionBody" } } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BranchUpdateResponse" } + } + } + }, + "500": { "description": "Failed to merge database branch" } + }, + "tags": ["Environments"], + "security": [{ "bearer": [] }] + } + }, "/v1/branches/{branch_id}/reset": { "post": { "operationId": "v1-reset-a-branch", @@ -128,9 +169,15 @@ "required": true, "in": "path", "description": "Branch ID", - "schema": { "type": "string" } + "schema": { "format": "uuid", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BranchActionBody" } } + } + }, "responses": { "201": { "description": "", @@ -146,6 +193,37 @@ "security": [{ "bearer": [] }] } }, + "/v1/branches/{branch_id}/diff": { + "get": { + "operationId": "v1-diff-a-branch", + "summary": "[Beta] Diffs a database branch", + "description": "Diffs the specified database branch", + "parameters": [ + { + "name": "branch_id", + "required": true, + "in": "path", + "description": "Branch ID", + "schema": { "format": "uuid", "type": "string" } + }, + { + "name": "included_schemas", + "required": false, + "in": "query", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "text/plain": { "schema": { "type": "string" } } }, + "description": "" + }, + "500": { "description": "Failed to diff database branch" } + }, + "tags": ["Environments"], + "security": [{ "bearer": [] }] + } + }, "/v1/projects": { "get": { "operationId": "v1-list-all-projects", @@ -175,9 +253,7 @@ "requestBody": { "required": true, "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/V1CreateProjectBodyDto" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/V1CreateProjectBody" } } } }, "responses": { @@ -223,7 +299,7 @@ "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/CreateOrganizationV1Dto" } + "schema": { "$ref": "#/components/schemas/CreateOrganizationV1" } } } }, @@ -247,7 +323,12 @@ "operationId": "v1-authorize-user", "summary": "[Beta] Authorize user through oauth", "parameters": [ - { "name": "client_id", "required": true, "in": "query", "schema": { "type": "string" } }, + { + "name": "client_id", + "required": true, + "in": "query", + "schema": { "format": "uuid", "type": "string" } + }, { "name": "response_type", "required": true, @@ -279,9 +360,23 @@ "required": false, "in": "query", "schema": { "enum": ["plain", "sha256", "S256"], "type": "string" } + }, + { + "name": "organization_slug", + "required": false, + "in": "query", + "description": "Organization slug", + "schema": { "pattern": "^[\\w-]+$", "type": "string" } + }, + { + "name": "resource", + "required": false, + "in": "query", + "description": "Resource indicator for MCP (Model Context Protocol) clients", + "schema": { "enum": ["https://api.supabase.io/mcp"], "type": "string" } } ], - "responses": { "303": { "description": "" } }, + "responses": { "204": { "description": "" } }, "tags": ["OAuth"], "security": [{ "oauth2": ["read"] }] } @@ -322,7 +417,7 @@ "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/OAuthRevokeTokenBodyDto" } + "schema": { "$ref": "#/components/schemas/OAuthRevokeTokenBody" } } } }, @@ -331,11 +426,75 @@ "security": [{ "oauth2": ["write"] }] } }, + "/v1/oauth/authorize/project-claim": { + "get": { + "operationId": "v1-oauth-authorize-project-claim", + "x-internal": true, + "summary": "Authorize user through oauth and claim a project", + "description": "Initiates the OAuth authorization flow for the specified provider. After successful authentication, the user can claim ownership of the specified project.", + "parameters": [ + { + "name": "project_ref", + "required": true, + "in": "query", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "client_id", + "required": true, + "in": "query", + "schema": { "format": "uuid", "type": "string" } + }, + { + "name": "response_type", + "required": true, + "in": "query", + "schema": { "enum": ["code", "token", "id_token token"], "type": "string" } + }, + { + "name": "redirect_uri", + "required": true, + "in": "query", + "schema": { "type": "string" } + }, + { "name": "state", "required": false, "in": "query", "schema": { "type": "string" } }, + { + "name": "response_mode", + "required": false, + "in": "query", + "schema": { "type": "string" } + }, + { + "name": "code_challenge", + "required": false, + "in": "query", + "schema": { "type": "string" } + }, + { + "name": "code_challenge_method", + "required": false, + "in": "query", + "schema": { "enum": ["plain", "sha256", "S256"], "type": "string" } + } + ], + "responses": { "204": { "description": "" } }, + "tags": ["OAuth"], + "security": [{ "bearer": [] }] + } + }, "/v1/snippets": { "get": { "operationId": "v1-list-all-snippets", "summary": "Lists SQL snippets for the logged in user", "parameters": [ + { + "name": "project_ref", + "required": false, + "in": "query", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, { "name": "cursor", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "limit", @@ -354,12 +513,6 @@ "required": false, "in": "query", "schema": { "enum": ["asc", "desc"], "type": "string" } - }, - { - "name": "project_ref", - "required": false, - "in": "query", - "schema": { "type": "string" } } ], "responses": { @@ -410,9 +563,15 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, - { "name": "reveal", "required": true, "in": "query", "schema": { "type": "boolean" } } + { + "name": "reveal", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + } ], "responses": { "200": { @@ -425,23 +584,30 @@ } } } - } + }, + "403": { "description": "" } }, "tags": ["Secrets"], "security": [{ "bearer": [] }] }, "post": { - "operationId": "createApiKey", - "summary": "[Alpha] Creates a new API key for the project", + "operationId": "v1-create-project-api-key", + "summary": "Creates a new API key for the project", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, - { "name": "reveal", "required": true, "in": "query", "schema": { "type": "boolean" } } + { + "name": "reveal", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + } ], "requestBody": { "required": true, @@ -455,83 +621,106 @@ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyResponse" } } } - } + }, + "403": { "description": "" } }, "tags": ["Secrets"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/api-keys/{id}": { - "patch": { - "operationId": "updateApiKey", - "summary": "[Alpha] Updates an API key for the project", + "/v1/projects/{ref}/api-keys/legacy": { + "get": { + "operationId": "v1-get-project-legacy-api-keys", + "summary": "Check whether JWT based legacy (anon, service_role) API keys are enabled. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } - }, - { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, - { "name": "reveal", "required": true, "in": "query", "schema": { "type": "boolean" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/UpdateApiKeyBody" } } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } - }, + ], "responses": { "200": { "description": "", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/LegacyApiKeysResponse" } + } } - } + }, + "403": { "description": "" } }, "tags": ["Secrets"], "security": [{ "bearer": [] }] }, - "get": { - "operationId": "getApiKey", - "summary": "[Alpha] Get API key", + "put": { + "operationId": "v1-update-project-legacy-api-keys", + "summary": "Disable or re-enable JWT based legacy (anon, service_role) API keys. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, - { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, - { "name": "reveal", "required": true, "in": "query", "schema": { "type": "boolean" } } + { + "name": "enabled", + "required": true, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + } ], "responses": { "200": { "description": "", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/LegacyApiKeysResponse" } + } } - } + }, + "403": { "description": "" } }, "tags": ["Secrets"], "security": [{ "bearer": [] }] - }, - "delete": { - "operationId": "deleteApiKey", - "summary": "[Alpha] Deletes an API key for the project", + } + }, + "/v1/projects/{ref}/api-keys/{id}": { + "patch": { + "operationId": "v1-update-project-api-key", + "summary": "Updates an API key for the project", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } }, - { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, - { "name": "reveal", "required": true, "in": "query", "schema": { "type": "boolean" } } + { + "name": "reveal", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + } ], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/UpdateApiKeyBody" } } + } + }, "responses": { "200": { "description": "", @@ -543,52 +732,135 @@ }, "tags": ["Secrets"], "security": [{ "bearer": [] }] - } - }, - "/v1/projects/{ref}/branches": { + }, "get": { - "operationId": "v1-list-all-branches", - "summary": "List all database branches", - "description": "Returns all database branches of the specified project.", + "operationId": "v1-get-project-api-key", + "summary": "Get API key", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + }, + { + "name": "reveal", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "", "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/BranchResponse" } - } - } + "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyResponse" } } } }, - "500": { "description": "Failed to retrieve database branches" } + "403": { "description": "" } }, - "tags": ["Environments"], + "tags": ["Secrets"], "security": [{ "bearer": [] }] }, - "post": { - "operationId": "v1-create-a-branch", - "summary": "Create a database branch", - "description": "Creates a database branch from the specified project.", + "delete": { + "operationId": "v1-delete-project-api-key", + "summary": "Deletes an API key for the project", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } - } - ], + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + }, + { + "name": "reveal", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + }, + { + "name": "was_compromised", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + }, + { "name": "reason", "required": false, "in": "query", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyResponse" } } + } + }, + "403": { "description": "" } + }, + "tags": ["Secrets"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/branches": { + "get": { + "operationId": "v1-list-all-branches", + "summary": "List all database branches", + "description": "Returns all database branches of the specified project.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/BranchResponse" } + } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to retrieve database branches" } + }, + "tags": ["Environments"], + "security": [{ "bearer": [] }] + }, + "post": { + "operationId": "v1-create-a-branch", + "summary": "Create a database branch", + "description": "Creates a database branch from the specified project.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], "requestBody": { "required": true, "content": { @@ -602,6 +874,7 @@ "application/json": { "schema": { "$ref": "#/components/schemas/BranchResponse" } } } }, + "403": { "description": "" }, "500": { "description": "Failed to create database branch" } }, "tags": ["Environments"], @@ -617,17 +890,47 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { "200": { "description": "" }, + "403": { "description": "" }, "500": { "description": "Failed to disable preview branching" } }, "tags": ["Environments"], "security": [{ "bearer": [] }] } }, + "/v1/projects/{ref}/branches/{name}": { + "get": { + "operationId": "v1-get-a-branch", + "summary": "Get a database branch", + "description": "Fetches the specified database branch by its name.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BranchResponse" } } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to fetch database branch" } + }, + "tags": ["Environments"], + "security": [{ "bearer": [] }] + } + }, "/v1/projects/{ref}/custom-hostname": { "get": { "operationId": "v1-get-hostname-config", @@ -638,7 +941,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -665,7 +968,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -687,7 +990,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -724,7 +1027,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -753,7 +1056,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -782,7 +1085,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -801,6 +1104,35 @@ "security": [{ "bearer": [] }] } }, + "/v1/projects/{ref}/network-bans/retrieve/enriched": { + "post": { + "operationId": "v1-list-all-network-bans-enriched", + "summary": "[Beta] Gets project's network bans with additional information about which databases they affect", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/NetworkBanResponseEnriched" } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to retrieve project's enriched network bans" } + }, + "tags": ["Projects"], + "security": [{ "bearer": [] }] + } + }, "/v1/projects/{ref}/network-bans": { "delete": { "operationId": "v1-delete-network-bans", @@ -811,7 +1143,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -841,7 +1173,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -870,7 +1202,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -907,7 +1239,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -934,7 +1266,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -971,7 +1303,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -998,14 +1330,14 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/UpdatePostgrestConfigBody" } + "schema": { "$ref": "#/components/schemas/V1UpdatePostgrestConfigBody" } } } }, @@ -1035,7 +1367,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1047,6 +1379,7 @@ } } }, + "403": { "description": "" }, "500": { "description": "Failed to retrieve project" } }, "tags": ["Projects"], @@ -1061,7 +1394,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1090,7 +1423,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1121,18 +1454,13 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { "required": true, "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/CreateSecretBody" } - } - } + "application/json": { "schema": { "$ref": "#/components/schemas/CreateSecretBody" } } } }, "responses": { @@ -1153,7 +1481,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -1163,10 +1491,7 @@ } }, "responses": { - "200": { - "description": "", - "content": { "application/json": { "schema": { "type": "object" } } } - }, + "200": { "description": "" }, "403": { "description": "" }, "500": { "description": "Failed to delete secrets with given names" } }, @@ -1184,7 +1509,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1211,7 +1536,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -1255,7 +1580,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1284,7 +1609,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1311,7 +1636,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1333,7 +1658,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -1368,7 +1693,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -1403,7 +1728,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -1438,7 +1763,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1467,7 +1792,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, { "name": "tracking_id", @@ -1502,7 +1827,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1514,6 +1839,7 @@ } } }, + "403": { "description": "" }, "500": { "description": "Failed to get project readonly mode status" } }, "tags": ["Database"], @@ -1530,11 +1856,12 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { "201": { "description": "" }, + "403": { "description": "" }, "500": { "description": "Failed to disable project's readonly mode" } }, "tags": ["Database"], @@ -1551,7 +1878,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -1581,7 +1908,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -1611,13 +1938,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } - }, - { - "name": "timeout_ms", - "required": false, - "in": "query", - "schema": { "minimum": 0, "maximum": 10000, "type": "integer" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, { "name": "services", @@ -1627,9 +1948,24 @@ "type": "array", "items": { "type": "string", - "enum": ["auth", "db", "pooler", "realtime", "rest", "storage"] + "enum": [ + "auth", + "db", + "db_postgres_user", + "pooler", + "realtime", + "rest", + "storage", + "pg_bouncer" + ] } } + }, + { + "name": "timeout_ms", + "required": false, + "in": "query", + "schema": { "minimum": 0, "maximum": 10000, "type": "integer" } } ], "responses": { @@ -1651,74 +1987,43 @@ "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/config/storage": { - "get": { - "operationId": "v1-get-storage-config", - "summary": "Gets project's storage config", + "/v1/projects/{ref}/config/auth/signing-keys/legacy": { + "post": { + "operationId": "v1-create-legacy-signing-key", + "summary": "Set up the project's existing JWT secret as an in_use JWT signing key. This endpoint will be removed in the future always check for HTTP 404 Not Found.", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { - "200": { + "201": { "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/StorageConfigResponse" } + "schema": { "$ref": "#/components/schemas/SigningKeyResponse" } } } }, - "403": { "description": "" }, - "500": { "description": "Failed to retrieve project's storage config" } + "403": { "description": "" } }, - "tags": ["Storage"], + "tags": ["Auth"], "security": [{ "bearer": [] }] }, - "patch": { - "operationId": "v1-update-storage-config", - "summary": "Updates project's storage config", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/UpdateStorageConfigBody" } - } - } - }, - "responses": { - "200": { "description": "" }, - "403": { "description": "" }, - "500": { "description": "Failed to update project's storage config" } - }, - "tags": ["Storage"], - "security": [{ "bearer": [] }] - } - }, - "/v1/projects/{ref}/config/database/postgres": { "get": { - "operationId": "v1-get-postgres-config", - "summary": "Gets project's Postgres config", + "operationId": "v1-get-legacy-signing-key", + "summary": "Get the signing key information for the JWT secret imported as signing key for this project. This endpoint will be removed in the future, check for HTTP 404 Not Found.", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1726,62 +2031,61 @@ "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/PostgresConfigResponse" } + "schema": { "$ref": "#/components/schemas/SigningKeyResponse" } } } }, - "500": { "description": "Failed to retrieve project's Postgres config" } + "403": { "description": "" } }, - "tags": ["Database"], + "tags": ["Auth"], "security": [{ "bearer": [] }] - }, - "put": { - "operationId": "v1-update-postgres-config", - "summary": "Updates project's Postgres config", + } + }, + "/v1/projects/{ref}/config/auth/signing-keys": { + "post": { + "operationId": "v1-create-project-signing-key", + "summary": "Create a new signing key for the project in standby status", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/UpdatePostgresConfigBody" } + "schema": { "$ref": "#/components/schemas/CreateSigningKeyBody" } } } }, "responses": { - "200": { + "201": { "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/PostgresConfigResponse" } + "schema": { "$ref": "#/components/schemas/SigningKeyResponse" } } } }, - "403": { "description": "" }, - "500": { "description": "Failed to update project's Postgres config" } + "403": { "description": "" } }, - "tags": ["Database"], + "tags": ["Auth"], "security": [{ "bearer": [] }] - } - }, - "/v1/projects/{ref}/config/database/pgbouncer": { + }, "get": { - "operationId": "v1-get-project-pgbouncer-config", - "summary": "Get project's pgbouncer config", + "operationId": "v1-get-project-signing-keys", + "summary": "List all signing keys for the project", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1789,26 +2093,33 @@ "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/V1PgbouncerConfigResponse" } + "schema": { "$ref": "#/components/schemas/SigningKeysResponse" } } } }, - "500": { "description": "Failed to retrieve project's pgbouncer config" } + "403": { "description": "" } }, - "tags": ["Database"] + "tags": ["Auth"], + "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/config/database/pooler": { + "/v1/projects/{ref}/config/auth/signing-keys/{id}": { "get": { - "operationId": "v1-get-supavisor-config", - "summary": "Gets project's supavisor config", + "operationId": "v1-get-project-signing-key", + "summary": "Get information about a signing key", "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + }, { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1816,48 +2127,298 @@ "description": "", "content": { "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/SupavisorConfigResponse" } - } + "schema": { "$ref": "#/components/schemas/SigningKeyResponse" } } } }, - "500": { "description": "Failed to retrieve project's supavisor config" } + "403": { "description": "" } }, - "tags": ["Database"], + "tags": ["Auth"], "security": [{ "bearer": [] }] }, - "patch": { - "operationId": "v1-update-supavisor-config", - "summary": "Updates project's supavisor config", + "delete": { + "operationId": "v1-remove-project-signing-key", + "summary": "Remove a signing key from a project. Only possible if the key has been in revoked status for a while.", "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + }, { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/UpdateSupavisorConfigBody" } - } - } - }, "responses": { "200": { "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/UpdateSupavisorConfigResponse" } + "schema": { "$ref": "#/components/schemas/SigningKeyResponse" } } } }, - "403": { "description": "" }, + "403": { "description": "" } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + }, + "patch": { + "operationId": "v1-update-project-signing-key", + "summary": "Update a signing key, mainly its status", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + }, + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UpdateSigningKeyBody" } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/SigningKeyResponse" } + } + } + }, + "403": { "description": "" } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/config/storage": { + "get": { + "operationId": "v1-get-storage-config", + "summary": "Gets project's storage config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/StorageConfigResponse" } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to retrieve project's storage config" } + }, + "tags": ["Storage"], + "security": [{ "bearer": [] }] + }, + "patch": { + "operationId": "v1-update-storage-config", + "summary": "Updates project's storage config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UpdateStorageConfigBody" } + } + } + }, + "responses": { + "200": { "description": "" }, + "403": { "description": "" }, + "500": { "description": "Failed to update project's storage config" } + }, + "tags": ["Storage"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/config/database/postgres": { + "get": { + "operationId": "v1-get-postgres-config", + "summary": "Gets project's Postgres config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PostgresConfigResponse" } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to retrieve project's Postgres config" } + }, + "tags": ["Database"], + "security": [{ "bearer": [] }] + }, + "put": { + "operationId": "v1-update-postgres-config", + "summary": "Updates project's Postgres config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UpdatePostgresConfigBody" } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PostgresConfigResponse" } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to update project's Postgres config" } + }, + "tags": ["Database"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/config/database/pgbouncer": { + "get": { + "operationId": "v1-get-project-pgbouncer-config", + "summary": "Get project's pgbouncer config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V1PgbouncerConfigResponse" } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to retrieve project's pgbouncer config" } + }, + "tags": ["Database"] + } + }, + "/v1/projects/{ref}/config/database/pooler": { + "get": { + "operationId": "v1-get-pooler-config", + "summary": "Gets project's supavisor config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/SupavisorConfigResponse" } + } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to retrieve project's supavisor config" } + }, + "tags": ["Database"], + "security": [{ "bearer": [] }] + }, + "patch": { + "operationId": "v1-update-pooler-config", + "summary": "Updates project's supavisor config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UpdateSupavisorConfigBody" } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UpdateSupavisorConfigResponse" } + } + } + }, + "403": { "description": "" }, "500": { "description": "Failed to update project's supavisor config" } }, "tags": ["Database"], @@ -1874,7 +2435,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1901,7 +2462,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -1930,7 +2491,7 @@ }, "/v1/projects/{ref}/config/auth/third-party-auth": { "post": { - "operationId": "createTPAForProject", + "operationId": "v1-create-project-tpa-integration", "summary": "Creates a new third-party auth integration", "parameters": [ { @@ -1938,7 +2499,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -1962,15 +2523,15 @@ "security": [{ "bearer": [] }] }, "get": { - "operationId": "listTPAForProject", - "summary": "[Alpha] Lists all third-party auth integrations", + "operationId": "v1-list-project-tpa-integrations", + "summary": "Lists all third-party auth integrations", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -1993,17 +2554,22 @@ }, "/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}": { "delete": { - "operationId": "deleteTPAForProject", - "summary": "[Alpha] Removes a third-party auth integration", + "operationId": "v1-delete-project-tpa-integration", + "summary": "Removes a third-party auth integration", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, - { "name": "tpa_id", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "tpa_id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + } ], "responses": { "200": { @@ -2018,17 +2584,22 @@ "security": [{ "bearer": [] }] }, "get": { - "operationId": "getTPAForProject", - "summary": "[Alpha] Get a third-party integration", + "operationId": "v1-get-project-tpa-integration", + "summary": "Get a third-party integration", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, - { "name": "tpa_id", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "tpa_id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + } ], "responses": { "200": { @@ -2053,7 +2624,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { "200": { "description": "" }, "403": { "description": "" } }, @@ -2066,11 +2637,17 @@ "operationId": "v1-list-available-restore-versions", "summary": "Lists available restore versions for the given project", "parameters": [ - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } - ], - "responses": { - "200": { - "description": "", + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { @@ -2088,16 +2665,14 @@ "operationId": "v1-restore-a-project", "summary": "Restores the given project", "parameters": [ - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/RestoreProjectBodyDto" } - } + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } - }, + ], "responses": { "200": { "description": "" }, "403": { "description": "" } }, "tags": ["Projects"], "security": [{ "bearer": [] }] @@ -2108,137 +2683,171 @@ "operationId": "v1-cancel-a-project-restoration", "summary": "Cancels the given project restoration", "parameters": [ - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } ], "responses": { "200": { "description": "" }, "403": { "description": "" } }, "tags": ["Projects"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/analytics/endpoints/logs.all": { + "/v1/projects/{ref}/billing/addons": { "get": { - "operationId": "getLogs", - "summary": "Gets project's logs", + "operationId": "v1-list-project-addons", + "summary": "Lists project addons", "parameters": [ { - "name": "iso_timestamp_end", - "required": false, - "in": "query", - "schema": { "type": "string" } - }, - { - "name": "iso_timestamp_start", - "required": false, - "in": "query", - "schema": { "type": "string" } - }, - { "name": "sql", "required": false, "in": "query", "schema": { "type": "string" } }, - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } ], "responses": { "200": { "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/V1AnalyticsResponse" } + "schema": { "$ref": "#/components/schemas/ListProjectAddonsResponse" } } } }, - "403": { "description": "" } + "403": { "description": "" }, + "500": { "description": "Failed to list project addons" } }, - "tags": ["Analytics"], + "tags": ["Billing"], "security": [{ "bearer": [] }] - } - }, - "/v1/projects/{ref}/database/query": { - "post": { - "operationId": "v1-run-a-query", - "summary": "[Beta] Run sql query", + }, + "patch": { + "operationId": "v1-apply-project-addon", + "summary": "Applies project addon", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { "required": true, "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/V1RunQueryBody" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/ApplyProjectAddonBody" } + } } }, "responses": { - "201": { - "description": "", - "content": { "application/json": { "schema": { "type": "object" } } } - }, + "200": { "description": "" }, "403": { "description": "" }, - "500": { "description": "Failed to run sql query" } + "500": { "description": "Failed to apply project addon" } }, - "tags": ["Database"], + "tags": ["Billing"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/database/webhooks/enable": { - "post": { - "operationId": "v1-enable-database-webhook", - "summary": "[Beta] Enables Database Webhooks on the project", + "/v1/projects/{ref}/billing/addons/{addon_variant}": { + "delete": { + "operationId": "v1-remove-project-addon", + "summary": "Removes project addon", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "addon_variant", + "required": true, + "in": "path", + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { "type": "string", "enum": ["cd_default"] }, + { "type": "string", "enum": ["pitr_7", "pitr_14", "pitr_28"] }, + { "type": "string", "enum": ["ipv4_default"] } + ], + "schema": {} } ], "responses": { - "201": { "description": "" }, + "200": { "description": "" }, "403": { "description": "" }, - "500": { "description": "Failed to enable Database Webhooks on the project" } + "500": { "description": "Failed to remove project addon" } }, - "tags": ["Database"], + "tags": ["Billing"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/database/context": { + "/v1/projects/{ref}/claim-token": { "get": { - "operationId": "getDatabaseMetadata", - "summary": "Gets database metadata for the given project.", - "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", - "deprecated": true, + "operationId": "v1-get-project-claim-token", + "x-internal": true, + "summary": "Gets project claim token", "parameters": [ - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } ], "responses": { "200": { "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/GetProjectDbMetadataResponseDto" } + "schema": { "$ref": "#/components/schemas/ProjectClaimTokenResponse" } } } }, "403": { "description": "" } }, - "tags": ["Database"], + "tags": ["Projects"], "security": [{ "bearer": [] }] - } - }, - "/v1/projects/{ref}/functions": { - "get": { - "operationId": "v1-list-all-functions", - "summary": "List all functions", - "description": "Returns all functions you've previously added to the specified project.", + }, + "post": { + "operationId": "v1-create-project-claim-token", + "x-internal": true, + "summary": "Creates project claim token", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -2246,424 +2855,371 @@ "description": "", "content": { "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/FunctionResponse" } - } + "schema": { "$ref": "#/components/schemas/CreateProjectClaimTokenResponse" } } } }, - "403": { "description": "" }, - "500": { "description": "Failed to retrieve project's functions" } + "403": { "description": "" } }, - "tags": ["Edge Functions"], + "tags": ["Projects"], "security": [{ "bearer": [] }] }, - "post": { - "operationId": "v1-create-a-function", - "summary": "Create a function", - "description": "This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.", - "deprecated": true, + "delete": { + "operationId": "v1-delete-project-claim-token", + "x-internal": true, + "summary": "Revokes project claim token", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } - }, - { - "name": "slug", - "required": false, - "in": "query", - "schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" } - }, - { "name": "name", "required": false, "in": "query", "schema": { "type": "string" } }, - { - "name": "verify_jwt", - "required": false, - "in": "query", - "schema": { "type": "boolean" } - }, - { - "name": "import_map", - "required": false, - "in": "query", - "schema": { "type": "boolean" } - }, - { - "name": "entrypoint_path", - "required": false, - "in": "query", - "schema": { "type": "string" } - }, - { - "name": "import_map_path", - "required": false, - "in": "query", - "schema": { "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/V1CreateFunctionBody" } - }, - "application/vnd.denoland.eszip": { - "schema": { "$ref": "#/components/schemas/V1CreateFunctionBody" } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/FunctionResponse" } } - } - }, - "403": { "description": "" }, - "500": { "description": "Failed to create project's function" } - }, - "tags": ["Edge Functions"], + "responses": { "204": { "description": "" }, "403": { "description": "" } }, + "tags": ["Projects"], "security": [{ "bearer": [] }] - }, - "put": { - "operationId": "v1-bulk-update-functions", - "summary": "Bulk update functions", - "description": "Bulk update functions. It will create a new function or replace existing. The operation is idempotent. NOTE: You will need to manually bump the version.", + } + }, + "/v1/projects/{ref}/advisors/performance": { + "get": { + "operationId": "v1-get-performance-advisors", + "summary": "Gets project performance advisors.", + "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", + "deprecated": true, "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/BulkUpdateFunctionBody" } - } - } - } - }, "responses": { "200": { "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BulkUpdateFunctionResponse" } + "schema": { "$ref": "#/components/schemas/V1ProjectAdvisorsResponse" } } } }, - "403": { "description": "" }, - "500": { "description": "Failed to update functions" } + "403": { "description": "" } }, - "tags": ["Edge Functions"], + "tags": ["Advisors"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/functions/deploy": { - "post": { - "operationId": "v1-deploy-a-function", - "summary": "Deploy a function", - "description": "A new endpoint to deploy functions. It will create if function does not exist.", + "/v1/projects/{ref}/advisors/security": { + "get": { + "operationId": "v1-get-security-advisors", + "summary": "Gets project security advisors.", + "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", + "deprecated": true, "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } - }, - { - "name": "slug", - "required": false, - "in": "query", - "schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, { - "name": "bundleOnly", + "name": "lint_type", "required": false, "in": "query", - "schema": { "type": "boolean" } + "schema": { "enum": ["sql"], "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { "$ref": "#/components/schemas/FunctionDeployBody" } - } - } - }, "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/DeployFunctionResponse" } + "schema": { "$ref": "#/components/schemas/V1ProjectAdvisorsResponse" } } } }, - "403": { "description": "" }, - "500": { "description": "Failed to deploy function" } + "403": { "description": "" } }, - "tags": ["Edge Functions"], + "tags": ["Advisors"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/functions/{function_slug}": { + "/v1/projects/{ref}/analytics/endpoints/logs.all": { "get": { - "operationId": "v1-get-a-function", - "summary": "Retrieve a function", - "description": "Retrieves a function with the specified slug and project.", + "operationId": "v1-get-project-logs", + "summary": "Gets project's logs", + "description": "Executes a SQL query on the project's logs.\n\nEither the 'iso_timestamp_start' and 'iso_timestamp_end' parameters must be provided.\nIf both are not provided, only the last 1 minute of logs will be queried.\nThe timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown.\n", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, + { "name": "sql", "required": false, "in": "query", "schema": { "type": "string" } }, { - "name": "function_slug", - "required": true, - "in": "path", - "description": "Function slug", - "schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" } + "name": "iso_timestamp_start", + "required": false, + "in": "query", + "schema": { "format": "date-time", "type": "string" } + }, + { + "name": "iso_timestamp_end", + "required": false, + "in": "query", + "schema": { "format": "date-time", "type": "string" } } ], "responses": { "200": { "description": "", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/FunctionSlugResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsResponse" } } } }, - "403": { "description": "" }, - "500": { "description": "Failed to retrieve function with given slug" } + "403": { "description": "" } }, - "tags": ["Edge Functions"], + "tags": ["Analytics"], "security": [{ "bearer": [] }] - }, - "patch": { - "operationId": "v1-update-a-function", - "summary": "Update a function", - "description": "Updates a function with the specified slug and project.", + } + }, + "/v1/projects/{ref}/analytics/endpoints/usage.api-counts": { + "get": { + "operationId": "v1-get-project-usage-api-count", + "summary": "Gets project's usage api counts", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } - }, - { - "name": "function_slug", - "required": true, - "in": "path", - "description": "Function slug", - "schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" } - }, - { - "name": "slug", - "required": false, - "in": "query", - "schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" } - }, - { "name": "name", "required": false, "in": "query", "schema": { "type": "string" } }, - { - "name": "verify_jwt", - "required": false, - "in": "query", - "schema": { "type": "boolean" } - }, - { - "name": "import_map", - "required": false, - "in": "query", - "schema": { "type": "boolean" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, { - "name": "entrypoint_path", - "required": false, - "in": "query", - "schema": { "type": "string" } - }, - { - "name": "import_map_path", + "name": "interval", "required": false, "in": "query", - "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/V1UpdateFunctionBody" } - }, - "application/vnd.denoland.eszip": { - "schema": { "$ref": "#/components/schemas/V1UpdateFunctionBody" } + "schema": { + "enum": ["15min", "30min", "1hr", "3hr", "1day", "3day", "7day"], + "type": "string" } } - }, + ], "responses": { "200": { "description": "", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/FunctionResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/V1GetUsageApiCountResponse" } + } } }, "403": { "description": "" }, - "500": { "description": "Failed to update function with given slug" } + "500": { "description": "Failed to get project's usage api counts" } }, - "tags": ["Edge Functions"], + "tags": ["Analytics"], "security": [{ "bearer": [] }] - }, - "delete": { - "operationId": "v1-delete-a-function", - "summary": "Delete a function", - "description": "Deletes a function with the specified slug from the specified project.", + } + }, + "/v1/projects/{ref}/analytics/endpoints/usage.api-requests-count": { + "get": { + "operationId": "v1-get-project-usage-request-count", + "summary": "Gets project's usage api requests count", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } - }, - { - "name": "function_slug", - "required": true, - "in": "path", - "description": "Function slug", - "schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { - "200": { "description": "" }, + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V1GetUsageApiRequestsCountResponse" } + } + } + }, "403": { "description": "" }, - "500": { "description": "Failed to delete function with given slug" } + "500": { "description": "Failed to get project's usage api requests count" } }, - "tags": ["Edge Functions"], + "tags": ["Analytics"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/functions/{function_slug}/body": { + "/v1/projects/{ref}/database/migrations": { "get": { - "operationId": "v1-get-a-function-body", - "summary": "Retrieve a function body", - "description": "Retrieves a function body for the specified slug and project.", + "operationId": "v1-list-migration-history", + "summary": "[Beta] List applied migration versions", + "description": "Only available to selected partner OAuth apps", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V1ListMigrationsResponse" } + } + } }, + "403": { "description": "" }, + "500": { "description": "Failed to list database migrations" } + }, + "tags": ["Database"], + "security": [{ "bearer": [] }] + }, + "post": { + "operationId": "v1-apply-a-migration", + "summary": "[Beta] Apply a database migration", + "description": "Only available to selected partner OAuth apps", + "parameters": [ { - "name": "function_slug", + "name": "ref", "required": true, "in": "path", - "description": "Function slug", - "schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" } + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "Idempotency-Key", + "required": false, + "in": "header", + "description": "A unique key to ensure the same migration is tracked only once.", + "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V1CreateMigrationBody" } + } + } + }, "responses": { "200": { "description": "" }, "403": { "description": "" }, - "500": { "description": "Failed to retrieve function body with given slug" } + "500": { "description": "Failed to apply database migration" } }, - "tags": ["Edge Functions"], + "tags": ["Database"], "security": [{ "bearer": [] }] - } - }, - "/v1/projects/{ref}/storage/buckets": { - "get": { - "operationId": "v1-list-all-buckets", - "summary": "Lists all buckets", + }, + "put": { + "operationId": "v1-upsert-a-migration", + "summary": "[Beta] Upsert a database migration without applying", + "description": "Only available to selected partner OAuth apps", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "Idempotency-Key", + "required": false, + "in": "header", + "description": "A unique key to ensure the same migration is tracked only once.", + "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/V1StorageBucketResponse" } - } - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V1UpsertMigrationBody" } } - }, + } + }, + "responses": { + "200": { "description": "" }, "403": { "description": "" }, - "500": { "description": "Failed to get list of buckets" } + "500": { "description": "Failed to upsert database migration" } }, - "tags": ["Storage"], + "tags": ["Database"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/config/auth/sso/providers": { + "/v1/projects/{ref}/database/query": { "post": { - "operationId": "v1-create-a-sso-provider", - "summary": "Creates a new SSO provider", + "operationId": "v1-run-a-query", + "summary": "[Beta] Run sql query", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { "required": true, "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/CreateProviderBody" } } + "application/json": { "schema": { "$ref": "#/components/schemas/V1RunQueryBody" } } } }, "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/CreateProviderResponse" } - } - } - }, + "201": { "description": "" }, "403": { "description": "" }, - "404": { "description": "SAML 2.0 support is not enabled for this project" } + "500": { "description": "Failed to run sql query" } }, - "tags": ["Auth"], + "tags": ["Database"], "security": [{ "bearer": [] }] - }, + } + }, + "/v1/projects/{ref}/database/webhooks/enable": { + "post": { + "operationId": "v1-enable-database-webhook", + "summary": "[Beta] Enables Database Webhooks on the project", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "201": { "description": "" }, + "403": { "description": "" }, + "500": { "description": "Failed to enable Database Webhooks on the project" } + }, + "tags": ["Database"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/database/context": { "get": { - "operationId": "v1-list-all-sso-provider", - "summary": "Lists all SSO providers", + "operationId": "v1-get-database-metadata", + "summary": "Gets database metadata for the given project.", + "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", + "deprecated": true, "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -2671,117 +3227,724 @@ "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/ListProvidersResponse" } + "schema": { "$ref": "#/components/schemas/GetProjectDbMetadataResponse" } } } }, - "403": { "description": "" }, - "404": { "description": "SAML 2.0 support is not enabled for this project" } + "403": { "description": "" } }, - "tags": ["Auth"], + "tags": ["Database"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/config/auth/sso/providers/{provider_id}": { + "/v1/projects/{ref}/database/jit": { "get": { - "operationId": "v1-get-a-sso-provider", - "summary": "Gets a SSO provider by its UUID", + "operationId": "v1-get-jit-access", + "summary": "Get user-id to role mappings for JIT access", + "description": "Mappings of roles a user can assume in the project database", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } - }, - { "name": "provider_id", "required": true, "in": "path", "schema": { "type": "string" } } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } ], "responses": { "200": { "description": "", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/GetProviderResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/JitAccessResponse" } } } }, "403": { "description": "" }, - "404": { - "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" - } + "500": { "description": "Failed to list database jit access" } }, - "tags": ["Auth"], + "tags": ["Database"], "security": [{ "bearer": [] }] }, "put": { - "operationId": "v1-update-a-sso-provider", - "summary": "Updates a SSO provider by its UUID", + "operationId": "v1-update-jit-access", + "summary": "Updates a user mapping for JIT access", + "description": "Modifies the roles that can be assumed and for how long", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } - }, - { "name": "provider_id", "required": true, "in": "path", "schema": { "type": "string" } } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } ], "requestBody": { "required": true, "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProviderBody" } } + "application/json": { "schema": { "$ref": "#/components/schemas/UpdateJitAccessBody" } } } }, "responses": { "200": { "description": "", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/UpdateProviderResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/JitAccessResponse" } } } }, "403": { "description": "" }, - "404": { - "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" - } + "500": { "description": "Failed to upsert database migration" } }, - "tags": ["Auth"], + "tags": ["Database"], "security": [{ "bearer": [] }] - }, - "delete": { - "operationId": "v1-delete-a-sso-provider", - "summary": "Removes a SSO provider by its UUID", + } + }, + "/v1/projects/{ref}/database/jit/list": { + "get": { + "operationId": "v1-list-jit-access", + "summary": "List all user-id to role mappings for JIT access", + "description": "Mappings of roles a user can assume in the project database", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } - }, - { "name": "provider_id", "required": true, "in": "path", "schema": { "type": "string" } } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } ], "responses": { "200": { "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/DeleteProviderResponse" } + "schema": { "$ref": "#/components/schemas/JitListAccessResponse" } } } }, "403": { "description": "" }, - "404": { - "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" - } + "500": { "description": "Failed to list database jit access" } }, - "tags": ["Auth"], + "tags": ["Database"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/database/backups": { - "get": { + "/v1/projects/{ref}/database/jit/{user_id}": { + "delete": { + "operationId": "v1-delete-jit-access", + "summary": "Delete JIT access by user-id", + "description": "Remove JIT mappings of a user, revoking all JIT database access", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "user_id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + } + ], + "responses": { + "200": { "description": "" }, + "403": { "description": "" }, + "500": { "description": "Failed to remove JIT access" } + }, + "tags": ["Database"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/functions": { + "get": { + "operationId": "v1-list-all-functions", + "summary": "List all functions", + "description": "Returns all functions you've previously added to the specified project.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/FunctionResponse" } + } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to retrieve project's functions" } + }, + "tags": ["Edge Functions"], + "security": [{ "bearer": [] }] + }, + "post": { + "operationId": "v1-create-a-function", + "summary": "Create a function", + "description": "This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.", + "deprecated": true, + "requestBody": { + "required": true, + "content": { + "application/vnd.denoland.eszip": { + "schema": { "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { "$ref": "#/components/schemas/V1CreateFunctionBody" } + } + } + }, + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "slug", + "required": false, + "in": "query", + "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } + }, + { "name": "name", "required": false, "in": "query", "schema": { "type": "string" } }, + { + "name": "verify_jwt", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + }, + { + "name": "import_map", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + }, + { + "name": "entrypoint_path", + "required": false, + "in": "query", + "schema": { "type": "string" } + }, + { + "name": "import_map_path", + "required": false, + "in": "query", + "schema": { "type": "string" } + }, + { + "name": "ezbr_sha256", + "required": false, + "in": "query", + "schema": { "type": "string" } + } + ], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/FunctionResponse" } } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to create project's function" } + }, + "tags": ["Edge Functions"], + "security": [{ "bearer": [] }] + }, + "put": { + "operationId": "v1-bulk-update-functions", + "summary": "Bulk update functions", + "description": "Bulk update functions. It will create a new function or replace existing. The operation is idempotent. NOTE: You will need to manually bump the version.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BulkUpdateFunctionBody" } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BulkUpdateFunctionResponse" } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to update functions" } + }, + "tags": ["Edge Functions"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/functions/deploy": { + "post": { + "operationId": "v1-deploy-a-function", + "summary": "Deploy a function", + "description": "A new endpoint to deploy functions. It will create if function does not exist.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "slug", + "required": false, + "in": "query", + "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } + }, + { + "name": "bundleOnly", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { "$ref": "#/components/schemas/FunctionDeployBody" } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/DeployFunctionResponse" } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to deploy function" } + }, + "tags": ["Edge Functions"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/functions/{function_slug}": { + "get": { + "operationId": "v1-get-a-function", + "summary": "Retrieve a function", + "description": "Retrieves a function with the specified slug and project.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "function_slug", + "required": true, + "in": "path", + "description": "Function slug", + "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/FunctionSlugResponse" } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to retrieve function with given slug" } + }, + "tags": ["Edge Functions"], + "security": [{ "bearer": [] }] + }, + "patch": { + "operationId": "v1-update-a-function", + "summary": "Update a function", + "description": "Updates a function with the specified slug and project.", + "requestBody": { + "required": true, + "content": { + "application/vnd.denoland.eszip": { + "schema": { "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { "$ref": "#/components/schemas/V1UpdateFunctionBody" } + } + } + }, + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "function_slug", + "required": true, + "in": "path", + "description": "Function slug", + "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } + }, + { + "name": "slug", + "required": false, + "in": "query", + "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } + }, + { "name": "name", "required": false, "in": "query", "schema": { "type": "string" } }, + { + "name": "verify_jwt", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + }, + { + "name": "import_map", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + }, + { + "name": "entrypoint_path", + "required": false, + "in": "query", + "schema": { "type": "string" } + }, + { + "name": "import_map_path", + "required": false, + "in": "query", + "schema": { "type": "string" } + }, + { + "name": "ezbr_sha256", + "required": false, + "in": "query", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/FunctionResponse" } } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to update function with given slug" } + }, + "tags": ["Edge Functions"], + "security": [{ "bearer": [] }] + }, + "delete": { + "operationId": "v1-delete-a-function", + "summary": "Delete a function", + "description": "Deletes a function with the specified slug from the specified project.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "function_slug", + "required": true, + "in": "path", + "description": "Function slug", + "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } + } + ], + "responses": { + "200": { "description": "" }, + "403": { "description": "" }, + "500": { "description": "Failed to delete function with given slug" } + }, + "tags": ["Edge Functions"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/functions/{function_slug}/body": { + "get": { + "operationId": "v1-get-a-function-body", + "summary": "Retrieve a function body", + "description": "Retrieves a function body for the specified slug and project.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "function_slug", + "required": true, + "in": "path", + "description": "Function slug", + "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/StreamableFile" } } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to retrieve function body with given slug" } + }, + "tags": ["Edge Functions"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/storage/buckets": { + "get": { + "operationId": "v1-list-all-buckets", + "summary": "Lists all buckets", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/V1StorageBucketResponse" } + } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to get list of buckets" } + }, + "tags": ["Storage"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/config/auth/sso/providers": { + "post": { + "operationId": "v1-create-a-sso-provider", + "summary": "Creates a new SSO provider", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/CreateProviderBody" } } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CreateProviderResponse" } + } + } + }, + "403": { "description": "" }, + "404": { "description": "SAML 2.0 support is not enabled for this project" } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + }, + "get": { + "operationId": "v1-list-all-sso-provider", + "summary": "Lists all SSO providers", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ListProvidersResponse" } + } + } + }, + "403": { "description": "" }, + "404": { "description": "SAML 2.0 support is not enabled for this project" } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/config/auth/sso/providers/{provider_id}": { + "get": { + "operationId": "v1-get-a-sso-provider", + "summary": "Gets a SSO provider by its UUID", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "provider_id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GetProviderResponse" } + } + } + }, + "403": { "description": "" }, + "404": { + "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" + } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + }, + "put": { + "operationId": "v1-update-a-sso-provider", + "summary": "Updates a SSO provider by its UUID", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "provider_id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProviderBody" } } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UpdateProviderResponse" } + } + } + }, + "403": { "description": "" }, + "404": { + "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" + } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + }, + "delete": { + "operationId": "v1-delete-a-sso-provider", + "summary": "Removes a SSO provider by its UUID", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "provider_id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/DeleteProviderResponse" } + } + } + }, + "403": { "description": "" }, + "404": { + "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" + } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/database/backups": { + "get": { "operationId": "v1-list-all-backups", "summary": "Lists all backups", "parameters": [ @@ -2790,7 +3953,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -2800,6 +3963,7 @@ "application/json": { "schema": { "$ref": "#/components/schemas/V1BackupsResponse" } } } }, + "403": { "description": "" }, "500": { "description": "Failed to get backups" } }, "tags": ["Database"], @@ -2808,24 +3972,120 @@ }, "/v1/projects/{ref}/database/backups/restore-pitr": { "post": { - "operationId": "v1-restore-pitr-backup", - "summary": "Restores a PITR backup for a database", + "operationId": "v1-restore-pitr-backup", + "summary": "Restores a PITR backup for a database", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/V1RestorePitrBody" } } + } + }, + "responses": { "201": { "description": "" }, "403": { "description": "" } }, + "tags": ["Database"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/database/backups/restore-point": { + "post": { + "operationId": "v1-create-restore-point", + "x-internal": true, + "summary": "Initiates a creation of a restore point for a database", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V1RestorePointPostBody" } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V1RestorePointResponse" } + } + } + }, + "403": { "description": "" } + }, + "tags": ["Database"], + "security": [{ "bearer": [] }] + }, + "get": { + "operationId": "v1-get-restore-point", + "x-internal": true, + "summary": "Get restore points for project", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "name", + "required": false, + "in": "query", + "schema": { "maxLength": 20, "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V1RestorePointResponse" } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to get requested restore points" } + }, + "tags": ["Database"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/database/backups/undo": { + "post": { + "operationId": "v1-undo", + "x-internal": true, + "summary": "Initiates an undo to a given restore point", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { "required": true, "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/V1RestorePitrBody" } } + "application/json": { "schema": { "$ref": "#/components/schemas/V1UndoBody" } } } }, - "responses": { "201": { "description": "" } }, + "responses": { "201": { "description": "" }, "403": { "description": "" } }, "tags": ["Database"], "security": [{ "bearer": [] }] } @@ -2835,7 +4095,13 @@ "operationId": "v1-list-organization-members", "summary": "List members of an organization", "parameters": [ - { "name": "slug", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { "pattern": "^[\\w-]+$", "type": "string" } + } ], "responses": { "200": { @@ -2848,7 +4114,8 @@ } } } - } + }, + "403": { "description": "" } }, "tags": ["Organizations"], "security": [{ "bearer": [] }] @@ -2859,7 +4126,13 @@ "operationId": "v1-get-an-organization", "summary": "Gets information about the organization", "parameters": [ - { "name": "slug", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { "pattern": "^[\\w-]+$", "type": "string" } + } ], "responses": { "200": { @@ -2869,10 +4142,59 @@ "schema": { "$ref": "#/components/schemas/V1OrganizationSlugResponse" } } } - } + }, + "403": { "description": "" } + }, + "tags": ["Organizations"], + "security": [{ "bearer": [] }] + } + }, + "/v1/organizations/{slug}/project-claim/{token}": { + "get": { + "operationId": "v1-get-organization-project-claim", + "x-internal": true, + "summary": "Gets project details for the specified organization and claim token", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { "pattern": "^[\\w-]+$", "type": "string" } + }, + { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/OrganizationProjectClaimResponse" } + } + } + }, + "403": { "description": "" } }, "tags": ["Organizations"], "security": [{ "bearer": [] }] + }, + "post": { + "operationId": "v1-claim-project-for-organization", + "x-internal": true, + "summary": "Claims project for the specified organization", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { "pattern": "^[\\w-]+$", "type": "string" } + }, + { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "responses": { "204": { "description": "" }, "403": { "description": "" } }, + "tags": ["Organizations"], + "security": [{ "bearer": [] }] } } }, @@ -2883,7 +4205,10 @@ "contact": {} }, "tags": [ + { "name": "Advisors", "description": "Advisors related endpoints" }, + { "name": "Analytics", "description": "Analytics related endpoints" }, { "name": "Auth", "description": "Auth related endpoints" }, + { "name": "Billing", "description": "Billing related endpoints" }, { "name": "Database", "description": "Database related endpoints" }, { "name": "Domains", "description": "Domains related endpoints" }, { "name": "Edge Functions", "description": "Edge related endpoints" }, @@ -2902,6 +4227,10 @@ "BranchDetailResponse": { "type": "object", "properties": { + "ref": { "type": "string" }, + "postgres_version": { "type": "string" }, + "postgres_engine": { "type": "string" }, + "release_channel": { "type": "string" }, "status": { "type": "string", "enum": [ @@ -2922,36 +4251,32 @@ "RESIZING" ] }, - "db_port": { "type": "integer" }, - "ref": { "type": "string" }, - "postgres_version": { "type": "string" }, - "postgres_engine": { "type": "string" }, - "release_channel": { "type": "string" }, "db_host": { "type": "string" }, + "db_port": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, "db_user": { "type": "string" }, "db_pass": { "type": "string" }, "jwt_secret": { "type": "string" } }, "required": [ - "status", - "db_port", "ref", "postgres_version", "postgres_engine", "release_channel", - "db_host" + "status", + "db_host", + "db_port" ] }, "UpdateBranchBody": { "type": "object", "properties": { + "branch_name": { "type": "string" }, + "git_branch": { "type": "string" }, "reset_on_push": { "type": "boolean", - "deprecated": true, - "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead." + "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead.", + "deprecated": true }, - "branch_name": { "type": "string" }, - "git_branch": { "type": "string" }, "persistent": { "type": "boolean" }, "status": { "type": "string", @@ -2963,18 +4288,26 @@ "FUNCTIONS_DEPLOYED", "FUNCTIONS_FAILED" ] - } + }, + "request_review": { "type": "boolean" } } }, "BranchResponse": { "type": "object", "properties": { + "id": { "type": "string", "format": "uuid" }, + "name": { "type": "string" }, + "project_ref": { "type": "string" }, + "parent_project_ref": { "type": "string" }, + "is_default": { "type": "boolean" }, + "git_branch": { "type": "string" }, "pr_number": { "type": "integer", "format": "int32" }, "latest_check_run_id": { "type": "number", - "deprecated": true, - "description": "This field is deprecated and will not be populated." + "description": "This field is deprecated and will not be populated.", + "deprecated": true }, + "persistent": { "type": "boolean" }, "status": { "type": "string", "enum": [ @@ -2986,47 +4319,38 @@ "FUNCTIONS_FAILED" ] }, - "id": { "type": "string" }, - "name": { "type": "string" }, - "project_ref": { "type": "string" }, - "parent_project_ref": { "type": "string" }, - "is_default": { "type": "boolean" }, - "git_branch": { "type": "string" }, - "persistent": { "type": "boolean" }, - "created_at": { "type": "string" }, - "updated_at": { "type": "string" } + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" }, + "review_requested_at": { "type": "string", "format": "date-time" } }, "required": [ - "status", "id", "name", "project_ref", "parent_project_ref", "is_default", "persistent", + "status", "created_at", "updated_at" ] }, "BranchDeleteResponse": { "type": "object", - "properties": { "message": { "type": "string" } }, + "properties": { "message": { "type": "string", "enum": ["ok"] } }, "required": ["message"] }, - "BranchUpdateResponse": { + "BranchActionBody": { "type": "object", - "properties": { "workflow_run_id": { "type": "string" }, "message": { "type": "string" } }, - "required": ["workflow_run_id", "message"] + "properties": { "migration_version": { "type": "string" } } }, - "V1DatabaseResponse": { + "BranchUpdateResponse": { "type": "object", "properties": { - "host": { "type": "string", "description": "Database host" }, - "version": { "type": "string", "description": "Database version" }, - "postgres_engine": { "type": "string", "description": "Database engine" }, - "release_channel": { "type": "string", "description": "Release channel" } + "workflow_run_id": { "type": "string" }, + "message": { "type": "string", "enum": ["ok"] } }, - "required": ["host", "version", "postgres_engine", "release_channel"] + "required": ["workflow_run_id", "message"] }, "V1ProjectWithDatabaseResponse": { "type": "object", @@ -3064,15 +4388,24 @@ "RESIZING" ] }, - "database": { "$ref": "#/components/schemas/V1DatabaseResponse" } + "database": { + "type": "object", + "properties": { + "host": { "type": "string", "description": "Database host" }, + "version": { "type": "string", "description": "Database version" }, + "postgres_engine": { "type": "string", "description": "Database engine" }, + "release_channel": { "type": "string", "description": "Release channel" } + }, + "required": ["host", "version", "postgres_engine", "release_channel"] + } }, "required": ["id", "organization_id", "name", "region", "created_at", "status", "database"] }, - "V1CreateProjectBodyDto": { + "V1CreateProjectBody": { "type": "object", "properties": { "db_pass": { "type": "string", "description": "Database password" }, - "name": { "type": "string", "description": "Name of your project" }, + "name": { "type": "string", "maxLength": 256, "description": "Name of your project" }, "organization_id": { "type": "string", "description": "Slug of your organization" }, "plan": { "type": "string", @@ -3112,6 +4445,8 @@ "desired_instance_size": { "type": "string", "enum": [ + "pico", + "nano", "micro", "small", "medium", @@ -3121,7 +4456,15 @@ "4xlarge", "8xlarge", "12xlarge", - "16xlarge" + "16xlarge", + "24xlarge", + "24xlarge_optimized_memory", + "24xlarge_optimized_cpu", + "24xlarge_high_memory", + "48xlarge", + "48xlarge_optimized_memory", + "48xlarge_optimized_cpu", + "48xlarge_high_memory" ] }, "template_url": { @@ -3179,7 +4522,7 @@ "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": ["id", "name"] }, - "CreateOrganizationV1Dto": { + "CreateOrganizationV1": { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], @@ -3188,27 +4531,33 @@ "OAuthTokenBody": { "type": "object", "properties": { - "grant_type": { "enum": ["authorization_code", "refresh_token"], "type": "string" }, - "client_id": { "type": "string" }, + "grant_type": { "type": "string", "enum": ["authorization_code", "refresh_token"] }, + "client_id": { "type": "string", "format": "uuid" }, "client_secret": { "type": "string" }, "code": { "type": "string" }, "code_verifier": { "type": "string" }, "redirect_uri": { "type": "string" }, - "refresh_token": { "type": "string" } + "refresh_token": { "type": "string" }, + "resource": { + "type": "string", + "enum": ["https://api.supabase.io/mcp"], + "description": "Resource indicator for MCP (Model Context Protocol) clients" + } }, - "required": ["grant_type", "client_id", "client_secret"] + "additionalProperties": false }, "OAuthTokenResponse": { "type": "object", "properties": { - "expires_in": { "type": "integer", "format": "int64" }, - "token_type": { "type": "string", "enum": ["Bearer"] }, "access_token": { "type": "string" }, - "refresh_token": { "type": "string" } + "refresh_token": { "type": "string" }, + "expires_in": { "type": "integer" }, + "token_type": { "type": "string", "enum": ["Bearer"] } }, - "required": ["expires_in", "token_type", "access_token", "refresh_token"] + "required": ["access_token", "refresh_token", "expires_in", "token_type"], + "additionalProperties": false }, - "OAuthRevokeTokenBodyDto": { + "OAuthRevokeTokenBody": { "type": "object", "properties": { "client_id": { "type": "string", "format": "uuid" }, @@ -3218,66 +4567,55 @@ "required": ["client_id", "client_secret", "refresh_token"], "additionalProperties": false }, - "SnippetProject": { - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64" }, - "name": { "type": "string" } - }, - "required": ["id", "name"] - }, - "SnippetUser": { - "type": "object", - "properties": { - "id": { "type": "integer", "format": "int64" }, - "username": { "type": "string" } - }, - "required": ["id", "username"] - }, - "SnippetMeta": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "inserted_at": { "type": "string" }, - "updated_at": { "type": "string" }, - "type": { "type": "string", "enum": ["sql"] }, - "visibility": { "type": "string", "enum": ["user", "project", "org", "public"] }, - "name": { "type": "string" }, - "description": { "type": "string", "nullable": true }, - "project": { "$ref": "#/components/schemas/SnippetProject" }, - "owner": { "$ref": "#/components/schemas/SnippetUser" }, - "updated_by": { "$ref": "#/components/schemas/SnippetUser" } - }, - "required": [ - "id", - "inserted_at", - "updated_at", - "type", - "visibility", - "name", - "description", - "project", - "owner", - "updated_by" - ] - }, "SnippetList": { "type": "object", "properties": { - "data": { "type": "array", "items": { "$ref": "#/components/schemas/SnippetMeta" } }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "inserted_at": { "type": "string" }, + "updated_at": { "type": "string" }, + "type": { "type": "string", "enum": ["sql"] }, + "visibility": { "type": "string", "enum": ["user", "project", "org", "public"] }, + "name": { "type": "string" }, + "description": { "type": "string", "nullable": true }, + "project": { + "type": "object", + "properties": { "id": { "type": "number" }, "name": { "type": "string" } }, + "required": ["id", "name"] + }, + "owner": { + "type": "object", + "properties": { "id": { "type": "number" }, "username": { "type": "string" } }, + "required": ["id", "username"] + }, + "updated_by": { + "type": "object", + "properties": { "id": { "type": "number" }, "username": { "type": "string" } }, + "required": ["id", "username"] + } + }, + "required": [ + "id", + "inserted_at", + "updated_at", + "type", + "visibility", + "name", + "description", + "project", + "owner", + "updated_by" + ] + } + }, "cursor": { "type": "string" } }, "required": ["data"] }, - "SnippetContent": { - "type": "object", - "properties": { - "favorite": { "type": "boolean" }, - "schema_version": { "type": "string" }, - "sql": { "type": "string" } - }, - "required": ["favorite", "schema_version", "sql"] - }, "SnippetResponse": { "type": "object", "properties": { @@ -3285,13 +4623,33 @@ "inserted_at": { "type": "string" }, "updated_at": { "type": "string" }, "type": { "type": "string", "enum": ["sql"] }, - "visibility": { "enum": ["user", "project", "org", "public"], "type": "string" }, + "visibility": { "type": "string", "enum": ["user", "project", "org", "public"] }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, - "project": { "$ref": "#/components/schemas/SnippetProject" }, - "owner": { "$ref": "#/components/schemas/SnippetUser" }, - "updated_by": { "$ref": "#/components/schemas/SnippetUser" }, - "content": { "$ref": "#/components/schemas/SnippetContent" } + "project": { + "type": "object", + "properties": { "id": { "type": "number" }, "name": { "type": "string" } }, + "required": ["id", "name"] + }, + "owner": { + "type": "object", + "properties": { "id": { "type": "number" }, "username": { "type": "string" } }, + "required": ["id", "username"] + }, + "updated_by": { + "type": "object", + "properties": { "id": { "type": "number" }, "username": { "type": "string" } }, + "required": ["id", "username"] + }, + "content": { + "type": "object", + "properties": { + "favorite": { "type": "boolean" }, + "schema_version": { "type": "string" }, + "sql": { "type": "string" } + }, + "required": ["favorite", "schema_version", "sql"] + } }, "required": [ "id", @@ -3307,172 +4665,189 @@ "content" ] }, - "ApiKeySecretJWTTemplate": { - "type": "object", - "properties": { "role": { "type": "string" } }, - "required": ["role"] - }, "ApiKeyResponse": { "type": "object", "properties": { + "api_key": { "type": "string", "nullable": true }, + "id": { "type": "string", "nullable": true }, "type": { - "nullable": true, "type": "string", - "enum": ["publishable", "secret", "legacy"] + "enum": ["legacy", "publishable", "secret"], + "nullable": true }, - "name": { "type": "string" }, - "api_key": { "type": "string" }, - "id": { "type": "string", "nullable": true }, "prefix": { "type": "string", "nullable": true }, + "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "hash": { "type": "string", "nullable": true }, - "secret_jwt_template": { - "nullable": true, - "allOf": [{ "$ref": "#/components/schemas/ApiKeySecretJWTTemplate" }] - }, - "inserted_at": { "type": "string", "nullable": true }, - "updated_at": { "type": "string", "nullable": true } + "secret_jwt_template": { "type": "object", "additionalProperties": {}, "nullable": true }, + "inserted_at": { "type": "string", "format": "date-time", "nullable": true }, + "updated_at": { "type": "string", "format": "date-time", "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] + }, + "LegacyApiKeysResponse": { + "type": "object", + "properties": { "enabled": { "type": "boolean" } }, + "required": ["enabled"] }, "CreateApiKeyBody": { "type": "object", "properties": { - "type": { "enum": ["publishable", "secret"], "type": "string" }, + "type": { "type": "string", "enum": ["publishable", "secret"] }, + "name": { + "type": "string", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z_][a-z0-9_]+$" + }, "description": { "type": "string", "nullable": true }, - "secret_jwt_template": { - "nullable": true, - "allOf": [{ "$ref": "#/components/schemas/ApiKeySecretJWTTemplate" }] - } + "secret_jwt_template": { "type": "object", "additionalProperties": {}, "nullable": true } }, - "required": ["type"] + "required": ["type", "name"] }, "UpdateApiKeyBody": { "type": "object", "properties": { + "name": { + "type": "string", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z_][a-z0-9_]+$" + }, "description": { "type": "string", "nullable": true }, - "secret_jwt_template": { - "nullable": true, - "allOf": [{ "$ref": "#/components/schemas/ApiKeySecretJWTTemplate" }] - } + "secret_jwt_template": { "type": "object", "additionalProperties": {}, "nullable": true } } }, - "DesiredInstanceSize": { - "type": "string", - "enum": [ - "micro", - "small", - "medium", - "large", - "xlarge", - "2xlarge", - "4xlarge", - "8xlarge", - "12xlarge", - "16xlarge" - ] - }, - "ReleaseChannel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "PostgresEngine": { - "type": "string", - "description": "Postgres engine version. If not provided, the latest version will be used.", - "enum": ["15", "17-oriole"] - }, "CreateBranchBody": { "type": "object", "properties": { - "desired_instance_size": { "$ref": "#/components/schemas/DesiredInstanceSize" }, - "release_channel": { "$ref": "#/components/schemas/ReleaseChannel" }, - "postgres_engine": { "$ref": "#/components/schemas/PostgresEngine" }, - "branch_name": { "type": "string" }, + "branch_name": { "type": "string", "minLength": 1 }, "git_branch": { "type": "string" }, + "is_default": { "type": "boolean" }, "persistent": { "type": "boolean" }, - "region": { "type": "string" } - }, - "required": ["branch_name"] - }, - "ValidationRecord": { - "type": "object", - "properties": { "txt_name": { "type": "string" }, "txt_value": { "type": "string" } }, - "required": ["txt_name", "txt_value"] - }, - "ValidationError": { - "type": "object", - "properties": { "message": { "type": "string" } }, - "required": ["message"] - }, - "SslValidation": { - "type": "object", - "properties": { - "status": { "type": "string" }, - "validation_records": { - "type": "array", - "items": { "$ref": "#/components/schemas/ValidationRecord" } + "region": { "type": "string" }, + "desired_instance_size": { + "type": "string", + "enum": [ + "pico", + "nano", + "micro", + "small", + "medium", + "large", + "xlarge", + "2xlarge", + "4xlarge", + "8xlarge", + "12xlarge", + "16xlarge", + "24xlarge", + "24xlarge_optimized_memory", + "24xlarge_optimized_cpu", + "24xlarge_high_memory", + "48xlarge", + "48xlarge_optimized_memory", + "48xlarge_optimized_cpu", + "48xlarge_high_memory" + ] }, - "validation_errors": { - "type": "array", - "items": { "$ref": "#/components/schemas/ValidationError" } - } - }, - "required": ["status", "validation_records"] - }, - "OwnershipVerification": { - "type": "object", - "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "value": { "type": "string" } - }, - "required": ["type", "name", "value"] - }, - "CustomHostnameDetails": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "hostname": { "type": "string" }, - "ssl": { "$ref": "#/components/schemas/SslValidation" }, - "ownership_verification": { "$ref": "#/components/schemas/OwnershipVerification" }, - "custom_origin_server": { "type": "string" }, - "verification_errors": { "type": "array", "items": { "type": "string" } }, - "status": { "type": "string" } - }, - "required": [ - "id", - "hostname", - "ssl", - "ownership_verification", - "custom_origin_server", - "status" - ] - }, - "CfResponse": { - "type": "object", - "properties": { - "success": { "type": "boolean" }, - "errors": { "type": "array", "items": { "type": "object" } }, - "messages": { "type": "array", "items": { "type": "object" } }, - "result": { "$ref": "#/components/schemas/CustomHostnameDetails" } + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"], + "description": "Release channel. If not provided, GA will be used." + }, + "postgres_engine": { + "type": "string", + "enum": ["15", "17", "17-oriole"], + "description": "Postgres engine version. If not provided, the latest version will be used." + }, + "secrets": { "type": "object", "additionalProperties": { "type": "string" } }, + "with_data": { "type": "boolean" } }, - "required": ["success", "errors", "messages", "result"] + "required": ["branch_name"] }, "UpdateCustomHostnameResponse": { "type": "object", "properties": { "status": { + "type": "string", "enum": [ "1_not_started", "2_initiated", "3_challenge_verified", "4_origin_setup_completed", "5_services_reconfigured" - ], - "type": "string" + ] }, "custom_hostname": { "type": "string" }, - "data": { "$ref": "#/components/schemas/CfResponse" } + "data": { + "type": "object", + "properties": { + "success": { "type": "boolean" }, + "errors": { + "type": "array", + "items": { "description": "Any JSON-serializable value" } + }, + "messages": { + "type": "array", + "items": { "description": "Any JSON-serializable value" } + }, + "result": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "hostname": { "type": "string" }, + "ssl": { + "type": "object", + "properties": { + "status": { "type": "string" }, + "validation_records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "txt_name": { "type": "string" }, + "txt_value": { "type": "string" } + }, + "required": ["txt_name", "txt_value"] + } + }, + "validation_errors": { + "type": "array", + "items": { + "type": "object", + "properties": { "message": { "type": "string" } }, + "required": ["message"] + } + } + }, + "required": ["status", "validation_records"] + }, + "ownership_verification": { + "type": "object", + "properties": { + "type": { "type": "string" }, + "name": { "type": "string" }, + "value": { "type": "string" } + }, + "required": ["type", "name", "value"] + }, + "custom_origin_server": { "type": "string" }, + "verification_errors": { "type": "array", "items": { "type": "string" } }, + "status": { "type": "string" } + }, + "required": [ + "id", + "hostname", + "ssl", + "ownership_verification", + "custom_origin_server", + "status" + ] + } + }, + "required": ["success", "errors", "messages", "result"] + } }, "required": ["status", "custom_hostname", "data"] }, @@ -3488,28 +4863,63 @@ }, "required": ["banned_ipv4_addresses"] }, - "RemoveNetworkBanRequest": { + "NetworkBanResponseEnriched": { "type": "object", - "properties": { "ipv4_addresses": { "type": "array", "items": { "type": "string" } } }, - "required": ["ipv4_addresses"] + "properties": { + "banned_ipv4_addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "banned_address": { "type": "string" }, + "identifier": { "type": "string" }, + "type": { "type": "string" } + }, + "required": ["banned_address", "identifier", "type"] + } + } + }, + "required": ["banned_ipv4_addresses"] }, - "NetworkRestrictionsRequest": { + "RemoveNetworkBanRequest": { "type": "object", "properties": { - "dbAllowedCidrs": { "type": "array", "items": { "type": "string" } }, - "dbAllowedCidrsV6": { "type": "array", "items": { "type": "string" } } - } + "ipv4_addresses": { "type": "array", "items": { "type": "string" } }, + "identifier": { "type": "string" } + }, + "required": ["ipv4_addresses"] }, "NetworkRestrictionsResponse": { "type": "object", "properties": { - "entitlement": { "enum": ["disallowed", "allowed"], "type": "string" }, - "config": { "$ref": "#/components/schemas/NetworkRestrictionsRequest" }, - "old_config": { "$ref": "#/components/schemas/NetworkRestrictionsRequest" }, - "status": { "enum": ["stored", "applied"], "type": "string" } + "entitlement": { "type": "string", "enum": ["disallowed", "allowed"] }, + "config": { + "type": "object", + "properties": { + "dbAllowedCidrs": { "type": "array", "items": { "type": "string" } }, + "dbAllowedCidrsV6": { "type": "array", "items": { "type": "string" } } + }, + "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." + }, + "old_config": { + "type": "object", + "properties": { + "dbAllowedCidrs": { "type": "array", "items": { "type": "string" } }, + "dbAllowedCidrsV6": { "type": "array", "items": { "type": "string" } } + }, + "description": "Populated when a new config has been received, but not registered as successfully applied to a project." + }, + "status": { "type": "string", "enum": ["stored", "applied"] } }, "required": ["entitlement", "config", "status"] }, + "NetworkRestrictionsRequest": { + "type": "object", + "properties": { + "dbAllowedCidrs": { "type": "array", "items": { "type": "string" } }, + "dbAllowedCidrsV6": { "type": "array", "items": { "type": "string" } } + } + }, "PgsodiumConfigResponse": { "type": "object", "properties": { "root_key": { "type": "string" } }, @@ -3523,85 +4933,97 @@ "PostgrestConfigWithJWTSecretResponse": { "type": "object", "properties": { + "db_schema": { "type": "string" }, "max_rows": { "type": "integer" }, + "db_extra_search_path": { "type": "string" }, "db_pool": { "type": "integer", "nullable": true, "description": "If `null`, the value is automatically configured based on compute size." }, - "db_schema": { "type": "string" }, - "db_extra_search_path": { "type": "string" }, "jwt_secret": { "type": "string" } }, - "required": ["max_rows", "db_pool", "db_schema", "db_extra_search_path"] + "required": ["db_schema", "max_rows", "db_extra_search_path", "db_pool"] }, - "UpdatePostgrestConfigBody": { + "V1UpdatePostgrestConfigBody": { "type": "object", "properties": { - "max_rows": { "type": "integer", "minimum": 0, "maximum": 1000000 }, - "db_pool": { "type": "integer", "minimum": 0, "maximum": 1000 }, "db_extra_search_path": { "type": "string" }, - "db_schema": { "type": "string" } + "db_schema": { "type": "string" }, + "max_rows": { "type": "integer", "minimum": 0, "maximum": 1000000 }, + "db_pool": { "type": "integer", "minimum": 0, "maximum": 1000 } } }, "V1PostgrestConfigResponse": { "type": "object", "properties": { + "db_schema": { "type": "string" }, "max_rows": { "type": "integer" }, + "db_extra_search_path": { "type": "string" }, "db_pool": { "type": "integer", "nullable": true, "description": "If `null`, the value is automatically configured based on compute size." - }, - "db_schema": { "type": "string" }, - "db_extra_search_path": { "type": "string" } + } }, - "required": ["max_rows", "db_pool", "db_schema", "db_extra_search_path"] + "required": ["db_schema", "max_rows", "db_extra_search_path", "db_pool"] }, "V1ProjectRefResponse": { "type": "object", "properties": { - "id": { "type": "integer", "format": "int64" }, + "id": { "type": "integer" }, "ref": { "type": "string" }, "name": { "type": "string" } }, "required": ["id", "ref", "name"] }, "SecretResponse": { - "type": "object", - "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, - "required": ["name", "value"] - }, - "CreateSecretBody": { "type": "object", "properties": { - "name": { - "type": "string", - "maxLength": 256, - "pattern": "/^(?!SUPABASE_).*/", - "description": "Secret name must not start with the SUPABASE_ prefix.", - "example": "string" - }, - "value": { "type": "string", "maxLength": 24576 } + "name": { "type": "string" }, + "value": { "type": "string" }, + "updated_at": { "type": "string" } }, "required": ["name", "value"] }, - "SslEnforcements": { - "type": "object", - "properties": { "database": { "type": "boolean" } }, - "required": ["database"] + "CreateSecretBody": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "pattern": "^(?!SUPABASE_).*", + "description": "Secret name must not start with the SUPABASE_ prefix.", + "example": "string" + }, + "value": { "type": "string", "maxLength": 24576 } + }, + "required": ["name", "value"] + } }, "SslEnforcementResponse": { "type": "object", "properties": { - "currentConfig": { "$ref": "#/components/schemas/SslEnforcements" }, + "currentConfig": { + "type": "object", + "properties": { "database": { "type": "boolean" } }, + "required": ["database"] + }, "appliedSuccessfully": { "type": "boolean" } }, "required": ["currentConfig", "appliedSuccessfully"] }, "SslEnforcementRequest": { "type": "object", - "properties": { "requestedConfig": { "$ref": "#/components/schemas/SslEnforcements" } }, + "properties": { + "requestedConfig": { + "type": "object", + "properties": { "database": { "type": "boolean" } }, + "required": ["database"] + } + }, "required": ["requestedConfig"] }, "TypescriptResponse": { @@ -3612,7 +5034,7 @@ "VanitySubdomainConfigResponse": { "type": "object", "properties": { - "status": { "enum": ["not-used", "custom-domain-used", "active"], "type": "string" }, + "status": { "type": "string", "enum": ["not-used", "custom-domain-used", "active"] }, "custom_domain": { "type": "string" } }, "required": ["status"] @@ -3635,99 +5057,112 @@ "UpgradeDatabaseBody": { "type": "object", "properties": { - "release_channel": { "$ref": "#/components/schemas/ReleaseChannel" }, - "target_version": { "type": "string" } + "target_version": { "type": "string" }, + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + } }, - "required": ["release_channel", "target_version"] + "required": ["target_version"] }, "ProjectUpgradeInitiateResponse": { "type": "object", "properties": { "tracking_id": { "type": "string" } }, "required": ["tracking_id"] }, - "ProjectVersion": { - "type": "object", - "properties": { - "postgres_version": { "$ref": "#/components/schemas/PostgresEngine" }, - "release_channel": { "$ref": "#/components/schemas/ReleaseChannel" }, - "app_version": { "type": "string" } - }, - "required": ["postgres_version", "release_channel", "app_version"] - }, "ProjectUpgradeEligibilityResponse": { "type": "object", "properties": { - "current_app_version_release_channel": { "$ref": "#/components/schemas/ReleaseChannel" }, - "duration_estimate_hours": { "type": "integer" }, "eligible": { "type": "boolean" }, "current_app_version": { "type": "string" }, + "current_app_version_release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + }, "latest_app_version": { "type": "string" }, "target_upgrade_versions": { "type": "array", - "items": { "$ref": "#/components/schemas/ProjectVersion" } + "items": { + "type": "object", + "properties": { + "postgres_version": { + "type": "string", + "enum": ["13", "14", "15", "17", "17-oriole"] + }, + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + }, + "app_version": { "type": "string" } + }, + "required": ["postgres_version", "release_channel", "app_version"] + } }, - "potential_breaking_changes": { "type": "array", "items": { "type": "string" } }, + "duration_estimate_hours": { "type": "number" }, "legacy_auth_custom_roles": { "type": "array", "items": { "type": "string" } }, - "extension_dependent_objects": { "type": "array", "items": { "type": "string" } } + "objects_to_be_dropped": { "type": "array", "items": { "type": "string" } }, + "unsupported_extensions": { "type": "array", "items": { "type": "string" } }, + "user_defined_objects_in_internal_schemas": { + "type": "array", + "items": { "type": "string" } + } }, "required": [ - "current_app_version_release_channel", - "duration_estimate_hours", "eligible", "current_app_version", + "current_app_version_release_channel", "latest_app_version", "target_upgrade_versions", - "potential_breaking_changes", + "duration_estimate_hours", "legacy_auth_custom_roles", - "extension_dependent_objects" + "objects_to_be_dropped", + "unsupported_extensions", + "user_defined_objects_in_internal_schemas" ] }, - "DatabaseUpgradeStatus": { - "type": "object", - "properties": { - "target_version": { "type": "integer" }, - "status": { "enum": [0, 1, 2], "type": "integer" }, - "initiated_at": { "type": "string" }, - "latest_status_at": { "type": "string" }, - "error": { - "type": "string", - "enum": [ - "1_upgraded_instance_launch_failed", - "2_volume_detachchment_from_upgraded_instance_failed", - "3_volume_attachment_to_original_instance_failed", - "4_data_upgrade_initiation_failed", - "5_data_upgrade_completion_failed", - "6_volume_detachchment_from_original_instance_failed", - "7_volume_attachment_to_upgraded_instance_failed", - "8_upgrade_completion_failed", - "9_post_physical_backup_failed" - ] - }, - "progress": { - "type": "string", - "enum": [ - "0_requested", - "1_started", - "2_launched_upgraded_instance", - "3_detached_volume_from_upgraded_instance", - "4_attached_volume_to_original_instance", - "5_initiated_data_upgrade", - "6_completed_data_upgrade", - "7_detached_volume_from_original_instance", - "8_attached_volume_to_upgraded_instance", - "9_completed_upgrade", - "10_completed_post_physical_backup" - ] - } - }, - "required": ["target_version", "status", "initiated_at", "latest_status_at"] - }, "DatabaseUpgradeStatusResponse": { "type": "object", "properties": { "databaseUpgradeStatus": { - "nullable": true, - "allOf": [{ "$ref": "#/components/schemas/DatabaseUpgradeStatus" }] + "type": "object", + "properties": { + "initiated_at": { "type": "string" }, + "latest_status_at": { "type": "string" }, + "target_version": { "type": "number" }, + "error": { + "type": "string", + "enum": [ + "1_upgraded_instance_launch_failed", + "2_volume_detachchment_from_upgraded_instance_failed", + "3_volume_attachment_to_original_instance_failed", + "4_data_upgrade_initiation_failed", + "5_data_upgrade_completion_failed", + "6_volume_detachchment_from_original_instance_failed", + "7_volume_attachment_to_upgraded_instance_failed", + "8_upgrade_completion_failed", + "9_post_physical_backup_failed" + ] + }, + "progress": { + "type": "string", + "enum": [ + "0_requested", + "1_started", + "2_launched_upgraded_instance", + "3_detached_volume_from_upgraded_instance", + "4_attached_volume_to_original_instance", + "5_initiated_data_upgrade", + "6_completed_data_upgrade", + "7_detached_volume_from_original_instance", + "8_attached_volume_to_upgraded_instance", + "9_completed_upgrade", + "10_completed_post_physical_backup" + ] + }, + "status": { "type": "number" } + }, + "required": ["initiated_at", "latest_status_at", "target_version", "status"], + "nullable": true } }, "required": ["databaseUpgradeStatus"] @@ -3777,62 +5212,205 @@ "properties": { "database_identifier": { "type": "string" } }, "required": ["database_identifier"] }, - "AuthHealthResponse": { - "type": "object", - "properties": { "name": { "type": "string", "enum": ["GoTrue"] } }, - "required": ["name"] - }, - "RealtimeHealthResponse": { - "type": "object", - "properties": { "connected_cluster": { "type": "integer" } }, - "required": ["connected_cluster"] - }, "V1ServiceHealthResponse": { "type": "object", "properties": { + "name": { + "type": "string", + "enum": [ + "auth", + "db", + "db_postgres_user", + "pooler", + "realtime", + "rest", + "storage", + "pg_bouncer" + ] + }, + "healthy": { "type": "boolean" }, + "status": { "type": "string", "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"] }, "info": { "oneOf": [ - { "$ref": "#/components/schemas/AuthHealthResponse" }, - { "$ref": "#/components/schemas/RealtimeHealthResponse" } + { + "type": "object", + "properties": { + "name": { "type": "string", "enum": ["GoTrue"] }, + "version": { "type": "string" }, + "description": { "type": "string" } + }, + "required": ["name", "version", "description"] + }, + { + "type": "object", + "properties": { + "healthy": { "type": "boolean" }, + "db_connected": { "type": "boolean" }, + "connected_cluster": { "type": "integer" } + }, + "required": ["healthy", "db_connected", "connected_cluster"] + } ] }, - "name": { - "enum": ["auth", "db", "pooler", "realtime", "rest", "storage"], - "type": "string" - }, - "healthy": { "type": "boolean" }, - "status": { "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"], "type": "string" }, "error": { "type": "string" } }, "required": ["name", "healthy", "status"] }, - "StorageFeatureImageTransformation": { + "SigningKeyResponse": { "type": "object", - "properties": { "enabled": { "type": "boolean" } }, - "required": ["enabled"] + "properties": { + "id": { "type": "string", "format": "uuid" }, + "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { "nullable": true }, + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false }, - "StorageFeatureS3Protocol": { + "CreateSigningKeyBody": { "type": "object", - "properties": { "enabled": { "type": "boolean" } }, - "required": ["enabled"] + "properties": { + "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, + "status": { "type": "string", "enum": ["in_use", "standby"] }, + "private_jwk": { + "discriminator": { "propertyName": "kty" }, + "oneOf": [ + { + "type": "object", + "properties": { + "kty": { "type": "string", "enum": ["RSA"] }, + "n": { "type": "string" }, + "e": { "type": "string", "enum": ["AQAB"] }, + "d": { "type": "string" }, + "p": { "type": "string" }, + "q": { "type": "string" }, + "dp": { "type": "string" }, + "dq": { "type": "string" }, + "qi": { "type": "string" } + }, + "required": ["kty", "n", "e", "d", "p", "q", "dp", "dq", "qi"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kty": { "type": "string", "enum": ["EC"] }, + "crv": { "type": "string", "enum": ["P-256"] }, + "x": { "type": "string" }, + "y": { "type": "string" }, + "d": { "type": "string" } + }, + "required": ["kty", "crv", "x", "y", "d"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kty": { "type": "string", "enum": ["OKP"] }, + "crv": { "type": "string", "enum": ["Ed25519"] }, + "x": { "type": "string" }, + "d": { "type": "string" } + }, + "required": ["kty", "crv", "x", "d"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kty": { "type": "string", "enum": ["oct"] }, + "k": { "type": "string", "minLength": 16 } + }, + "required": ["kty", "k"], + "additionalProperties": false + } + ] + } + }, + "required": ["algorithm"], + "additionalProperties": false }, - "StorageFeatures": { + "SigningKeysResponse": { "type": "object", "properties": { - "imageTransformation": { - "$ref": "#/components/schemas/StorageFeatureImageTransformation" - }, - "s3Protocol": { "$ref": "#/components/schemas/StorageFeatureS3Protocol" } + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string", "format": "uuid" }, + "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { "nullable": true }, + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false + } + } + }, + "required": ["keys"], + "additionalProperties": false + }, + "UpdateSigningKeyBody": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + } }, - "required": ["imageTransformation", "s3Protocol"] + "required": ["status"], + "additionalProperties": false }, "StorageConfigResponse": { "type": "object", "properties": { "fileSizeLimit": { "type": "integer", "format": "int64" }, - "features": { "$ref": "#/components/schemas/StorageFeatures" } + "features": { + "type": "object", + "properties": { + "imageTransformation": { + "type": "object", + "properties": { "enabled": { "type": "boolean" } }, + "required": ["enabled"] + }, + "s3Protocol": { + "type": "object", + "properties": { "enabled": { "type": "boolean" } }, + "required": ["enabled"] + }, + "icebergCatalog": { + "type": "object", + "properties": { "enabled": { "type": "boolean" } }, + "required": ["enabled"] + } + }, + "required": ["imageTransformation", "s3Protocol"] + }, + "capabilities": { + "type": "object", + "properties": { + "list_v2": { "type": "boolean" }, + "iceberg_catalog": { "type": "boolean" } + }, + "required": ["list_v2", "iceberg_catalog"] + }, + "external": { + "type": "object", + "properties": { "upstreamTarget": { "type": "string", "enum": ["main", "canary"] } }, + "required": ["upstreamTarget"] + } }, - "required": ["fileSizeLimit", "features"] + "required": ["fileSizeLimit", "features", "capabilities", "external"] }, "UpdateStorageConfigBody": { "type": "object", @@ -3840,11 +5418,37 @@ "fileSizeLimit": { "type": "integer", "minimum": 0, - "maximum": 53687091200, + "maximum": 536870912000, "format": "int64" }, - "features": { "$ref": "#/components/schemas/StorageFeatures" } - } + "features": { + "type": "object", + "properties": { + "imageTransformation": { + "type": "object", + "properties": { "enabled": { "type": "boolean" } }, + "required": ["enabled"] + }, + "s3Protocol": { + "type": "object", + "properties": { "enabled": { "type": "boolean" } }, + "required": ["enabled"] + }, + "icebergCatalog": { + "type": "object", + "properties": { "enabled": { "type": "boolean" } }, + "required": ["enabled"] + } + }, + "required": ["imageTransformation", "s3Protocol"] + }, + "external": { + "type": "object", + "properties": { "upstreamTarget": { "type": "string", "enum": ["main", "canary"] } }, + "required": ["upstreamTarget"] + } + }, + "additionalProperties": false }, "PostgresConfigResponse": { "type": "object", @@ -3865,13 +5469,13 @@ "max_wal_size": { "type": "string" }, "max_wal_senders": { "type": "integer" }, "max_worker_processes": { "type": "integer", "minimum": 0, "maximum": 262143 }, + "session_replication_role": { "type": "string", "enum": ["origin", "replica", "local"] }, "shared_buffers": { "type": "string" }, "statement_timeout": { "type": "string" }, "track_commit_timestamp": { "type": "boolean" }, "wal_keep_size": { "type": "string" }, "wal_sender_timeout": { "type": "string" }, - "work_mem": { "type": "string" }, - "session_replication_role": { "enum": ["origin", "replica", "local"], "type": "string" } + "work_mem": { "type": "string" } } }, "UpdatePostgresConfigBody": { @@ -3893,52 +5497,58 @@ "max_wal_size": { "type": "string" }, "max_wal_senders": { "type": "integer" }, "max_worker_processes": { "type": "integer", "minimum": 0, "maximum": 262143 }, + "session_replication_role": { "type": "string", "enum": ["origin", "replica", "local"] }, "shared_buffers": { "type": "string" }, "statement_timeout": { "type": "string" }, "track_commit_timestamp": { "type": "boolean" }, "wal_keep_size": { "type": "string" }, "wal_sender_timeout": { "type": "string" }, "work_mem": { "type": "string" }, - "restart_database": { "type": "boolean" }, - "session_replication_role": { "enum": ["origin", "replica", "local"], "type": "string" } + "restart_database": { "type": "boolean" } } }, "V1PgbouncerConfigResponse": { "type": "object", "properties": { - "pool_mode": { "type": "string", "enum": ["transaction", "session", "statement"] }, - "default_pool_size": { "type": "number" }, + "default_pool_size": { "type": "integer" }, "ignore_startup_parameters": { "type": "string" }, - "max_client_conn": { "type": "number" }, - "connection_string": { "type": "string" } + "max_client_conn": { "type": "integer" }, + "pool_mode": { "type": "string", "enum": ["transaction", "session", "statement"] }, + "connection_string": { "type": "string" }, + "server_idle_timeout": { "type": "integer" }, + "server_lifetime": { "type": "integer" }, + "query_wait_timeout": { "type": "integer" }, + "reserve_pool_size": { "type": "integer" } } }, "SupavisorConfigResponse": { "type": "object", "properties": { - "database_type": { "type": "string", "enum": ["PRIMARY", "READ_REPLICA"] }, - "db_port": { "type": "integer" }, - "default_pool_size": { "type": "integer", "nullable": true }, - "max_client_conn": { "type": "integer", "nullable": true }, "identifier": { "type": "string" }, + "database_type": { "type": "string", "enum": ["PRIMARY", "READ_REPLICA"] }, "is_using_scram_auth": { "type": "boolean" }, "db_user": { "type": "string" }, "db_host": { "type": "string" }, + "db_port": { "type": "integer" }, "db_name": { "type": "string" }, - "connectionString": { "type": "string" }, - "pool_mode": { "enum": ["transaction", "session"], "type": "string" } + "connection_string": { "type": "string" }, + "connectionString": { "type": "string", "description": "Use connection_string instead" }, + "default_pool_size": { "type": "integer", "nullable": true }, + "max_client_conn": { "type": "integer", "nullable": true }, + "pool_mode": { "type": "string", "enum": ["transaction", "session"] } }, "required": [ - "database_type", - "db_port", - "default_pool_size", - "max_client_conn", "identifier", + "database_type", "is_using_scram_auth", "db_user", "db_host", + "db_port", "db_name", + "connection_string", "connectionString", + "default_pool_size", + "max_client_conn", "pool_mode" ] }, @@ -3947,51 +5557,30 @@ "properties": { "default_pool_size": { "type": "integer", - "nullable": true, "minimum": 0, - "maximum": 1000 + "maximum": 3000, + "nullable": true }, "pool_mode": { - "enum": ["transaction", "session"], "type": "string", - "deprecated": true, - "description": "This field is deprecated and is ignored in this request" + "enum": ["transaction", "session"], + "description": "Dedicated pooler mode for the project" } } }, "UpdateSupavisorConfigResponse": { "type": "object", - "properties": { - "default_pool_size": { "type": "integer", "nullable": true }, - "pool_mode": { "enum": ["transaction", "session"], "type": "string" } - }, - "required": ["default_pool_size", "pool_mode"] - }, - "AuthConfigResponse": { - "type": "object", - "properties": { - "api_max_request_duration": { "type": "integer", "nullable": true }, - "db_max_pool_size": { "type": "integer", "nullable": true }, - "jwt_exp": { "type": "integer", "nullable": true }, - "mailer_otp_exp": { "type": "integer" }, - "mailer_otp_length": { "type": "integer", "nullable": true }, - "mfa_max_enrolled_factors": { "type": "integer", "nullable": true }, - "mfa_phone_otp_length": { "type": "integer" }, - "mfa_phone_max_frequency": { "type": "integer", "nullable": true }, - "password_min_length": { "type": "integer", "nullable": true }, - "rate_limit_anonymous_users": { "type": "integer", "nullable": true }, - "rate_limit_email_sent": { "type": "integer", "nullable": true }, - "rate_limit_sms_sent": { "type": "integer", "nullable": true }, - "rate_limit_token_refresh": { "type": "integer", "nullable": true }, - "rate_limit_verify": { "type": "integer", "nullable": true }, - "rate_limit_otp": { "type": "integer", "nullable": true }, - "security_refresh_token_reuse_interval": { "type": "integer", "nullable": true }, - "sessions_inactivity_timeout": { "type": "integer", "nullable": true }, - "sessions_timebox": { "type": "integer", "nullable": true }, - "sms_max_frequency": { "type": "integer", "nullable": true }, - "sms_otp_exp": { "type": "integer", "nullable": true }, - "sms_otp_length": { "type": "integer" }, - "smtp_max_frequency": { "type": "integer", "nullable": true }, + "properties": { + "default_pool_size": { "type": "integer", "nullable": true }, + "pool_mode": { "type": "string" } + }, + "required": ["default_pool_size", "pool_mode"] + }, + "AuthConfigResponse": { + "type": "object", + "properties": { + "api_max_request_duration": { "type": "integer", "nullable": true }, + "db_max_pool_size": { "type": "integer", "nullable": true }, "disable_signup": { "type": "boolean", "nullable": true }, "external_anonymous_users_enabled": { "type": "boolean", "nullable": true }, "external_apple_additional_client_ids": { "type": "string", "nullable": true }, @@ -4060,6 +5649,8 @@ "external_workos_enabled": { "type": "boolean", "nullable": true }, "external_workos_secret": { "type": "string", "nullable": true }, "external_workos_url": { "type": "string", "nullable": true }, + "external_web3_solana_enabled": { "type": "boolean", "nullable": true }, + "external_web3_ethereum_enabled": { "type": "boolean", "nullable": true }, "external_zoom_client_id": { "type": "string", "nullable": true }, "external_zoom_enabled": { "type": "boolean", "nullable": true }, "external_zoom_secret": { "type": "string", "nullable": true }, @@ -4078,8 +5669,14 @@ "hook_send_email_enabled": { "type": "boolean", "nullable": true }, "hook_send_email_uri": { "type": "string", "nullable": true }, "hook_send_email_secrets": { "type": "string", "nullable": true }, + "hook_before_user_created_enabled": { "type": "boolean", "nullable": true }, + "hook_before_user_created_uri": { "type": "string", "nullable": true }, + "hook_before_user_created_secrets": { "type": "string", "nullable": true }, + "jwt_exp": { "type": "integer", "nullable": true }, "mailer_allow_unverified_email_sign_ins": { "type": "boolean", "nullable": true }, "mailer_autoconfirm": { "type": "boolean", "nullable": true }, + "mailer_otp_exp": { "type": "integer" }, + "mailer_otp_length": { "type": "integer", "nullable": true }, "mailer_secure_email_change_enabled": { "type": "boolean", "nullable": true }, "mailer_subjects_confirmation": { "type": "string", "nullable": true }, "mailer_subjects_email_change": { "type": "string", "nullable": true }, @@ -4093,37 +5690,71 @@ "mailer_templates_magic_link_content": { "type": "string", "nullable": true }, "mailer_templates_reauthentication_content": { "type": "string", "nullable": true }, "mailer_templates_recovery_content": { "type": "string", "nullable": true }, + "mfa_max_enrolled_factors": { "type": "integer", "nullable": true }, "mfa_totp_enroll_enabled": { "type": "boolean", "nullable": true }, "mfa_totp_verify_enabled": { "type": "boolean", "nullable": true }, "mfa_phone_enroll_enabled": { "type": "boolean", "nullable": true }, "mfa_phone_verify_enabled": { "type": "boolean", "nullable": true }, "mfa_web_authn_enroll_enabled": { "type": "boolean", "nullable": true }, "mfa_web_authn_verify_enabled": { "type": "boolean", "nullable": true }, + "mfa_phone_otp_length": { "type": "integer" }, "mfa_phone_template": { "type": "string", "nullable": true }, + "mfa_phone_max_frequency": { "type": "integer", "nullable": true }, "password_hibp_enabled": { "type": "boolean", "nullable": true }, - "password_required_characters": { "type": "string", "nullable": true }, + "password_min_length": { "type": "integer", "nullable": true }, + "password_required_characters": { + "type": "string", + "enum": [ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", + "" + ], + "nullable": true + }, + "rate_limit_anonymous_users": { "type": "integer", "nullable": true }, + "rate_limit_email_sent": { "type": "integer", "nullable": true }, + "rate_limit_sms_sent": { "type": "integer", "nullable": true }, + "rate_limit_token_refresh": { "type": "integer", "nullable": true }, + "rate_limit_verify": { "type": "integer", "nullable": true }, + "rate_limit_otp": { "type": "integer", "nullable": true }, + "rate_limit_web3": { "type": "integer", "nullable": true }, "refresh_token_rotation_enabled": { "type": "boolean", "nullable": true }, "saml_enabled": { "type": "boolean", "nullable": true }, "saml_external_url": { "type": "string", "nullable": true }, "saml_allow_encrypted_assertions": { "type": "boolean", "nullable": true }, "security_captcha_enabled": { "type": "boolean", "nullable": true }, - "security_captcha_provider": { "type": "string", "nullable": true }, + "security_captcha_provider": { + "type": "string", + "enum": ["turnstile", "hcaptcha"], + "nullable": true + }, "security_captcha_secret": { "type": "string", "nullable": true }, "security_manual_linking_enabled": { "type": "boolean", "nullable": true }, + "security_refresh_token_reuse_interval": { "type": "integer", "nullable": true }, "security_update_password_require_reauthentication": { "type": "boolean", "nullable": true }, + "sessions_inactivity_timeout": { "type": "integer", "nullable": true }, "sessions_single_per_user": { "type": "boolean", "nullable": true }, "sessions_tags": { "type": "string", "nullable": true }, + "sessions_timebox": { "type": "integer", "nullable": true }, "site_url": { "type": "string", "nullable": true }, "sms_autoconfirm": { "type": "boolean", "nullable": true }, + "sms_max_frequency": { "type": "integer", "nullable": true }, "sms_messagebird_access_key": { "type": "string", "nullable": true }, "sms_messagebird_originator": { "type": "string", "nullable": true }, - "sms_provider": { "type": "string", "nullable": true }, + "sms_otp_exp": { "type": "integer", "nullable": true }, + "sms_otp_length": { "type": "integer" }, + "sms_provider": { + "type": "string", + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "nullable": true + }, "sms_template": { "type": "string", "nullable": true }, "sms_test_otp": { "type": "string", "nullable": true }, - "sms_test_otp_valid_until": { "type": "string", "nullable": true }, + "sms_test_otp_valid_until": { "type": "string", "format": "date-time", "nullable": true }, "sms_textlocal_api_key": { "type": "string", "nullable": true }, "sms_textlocal_sender": { "type": "string", "nullable": true }, "sms_twilio_account_sid": { "type": "string", "nullable": true }, @@ -4136,8 +5767,9 @@ "sms_vonage_api_key": { "type": "string", "nullable": true }, "sms_vonage_api_secret": { "type": "string", "nullable": true }, "sms_vonage_from": { "type": "string", "nullable": true }, - "smtp_admin_email": { "type": "string", "nullable": true }, + "smtp_admin_email": { "type": "string", "format": "email", "nullable": true }, "smtp_host": { "type": "string", "nullable": true }, + "smtp_max_frequency": { "type": "integer", "nullable": true }, "smtp_pass": { "type": "string", "nullable": true }, "smtp_port": { "type": "string", "nullable": true }, "smtp_sender_name": { "type": "string", "nullable": true }, @@ -4147,26 +5779,6 @@ "required": [ "api_max_request_duration", "db_max_pool_size", - "jwt_exp", - "mailer_otp_exp", - "mailer_otp_length", - "mfa_max_enrolled_factors", - "mfa_phone_otp_length", - "mfa_phone_max_frequency", - "password_min_length", - "rate_limit_anonymous_users", - "rate_limit_email_sent", - "rate_limit_sms_sent", - "rate_limit_token_refresh", - "rate_limit_verify", - "rate_limit_otp", - "security_refresh_token_reuse_interval", - "sessions_inactivity_timeout", - "sessions_timebox", - "sms_max_frequency", - "sms_otp_exp", - "sms_otp_length", - "smtp_max_frequency", "disable_signup", "external_anonymous_users_enabled", "external_apple_additional_client_ids", @@ -4235,6 +5847,8 @@ "external_workos_enabled", "external_workos_secret", "external_workos_url", + "external_web3_solana_enabled", + "external_web3_ethereum_enabled", "external_zoom_client_id", "external_zoom_enabled", "external_zoom_secret", @@ -4253,8 +5867,14 @@ "hook_send_email_enabled", "hook_send_email_uri", "hook_send_email_secrets", + "hook_before_user_created_enabled", + "hook_before_user_created_uri", + "hook_before_user_created_secrets", + "jwt_exp", "mailer_allow_unverified_email_sign_ins", "mailer_autoconfirm", + "mailer_otp_exp", + "mailer_otp_length", "mailer_secure_email_change_enabled", "mailer_subjects_confirmation", "mailer_subjects_email_change", @@ -4268,15 +5888,26 @@ "mailer_templates_magic_link_content", "mailer_templates_reauthentication_content", "mailer_templates_recovery_content", + "mfa_max_enrolled_factors", "mfa_totp_enroll_enabled", "mfa_totp_verify_enabled", "mfa_phone_enroll_enabled", "mfa_phone_verify_enabled", "mfa_web_authn_enroll_enabled", "mfa_web_authn_verify_enabled", + "mfa_phone_otp_length", "mfa_phone_template", + "mfa_phone_max_frequency", "password_hibp_enabled", + "password_min_length", "password_required_characters", + "rate_limit_anonymous_users", + "rate_limit_email_sent", + "rate_limit_sms_sent", + "rate_limit_token_refresh", + "rate_limit_verify", + "rate_limit_otp", + "rate_limit_web3", "refresh_token_rotation_enabled", "saml_enabled", "saml_external_url", @@ -4285,13 +5916,19 @@ "security_captcha_provider", "security_captcha_secret", "security_manual_linking_enabled", + "security_refresh_token_reuse_interval", "security_update_password_require_reauthentication", + "sessions_inactivity_timeout", "sessions_single_per_user", "sessions_tags", + "sessions_timebox", "site_url", "sms_autoconfirm", + "sms_max_frequency", "sms_messagebird_access_key", "sms_messagebird_originator", + "sms_otp_exp", + "sms_otp_length", "sms_provider", "sms_template", "sms_test_otp", @@ -4310,6 +5947,7 @@ "sms_vonage_from", "smtp_admin_email", "smtp_host", + "smtp_max_frequency", "smtp_pass", "smtp_port", "smtp_sender_name", @@ -4320,190 +5958,284 @@ "UpdateAuthConfigBody": { "type": "object", "properties": { - "jwt_exp": { "type": "integer", "minimum": 0, "maximum": 604800 }, - "smtp_max_frequency": { "type": "integer", "minimum": 0, "maximum": 32767 }, - "mfa_max_enrolled_factors": { "type": "integer", "minimum": 0, "maximum": 2147483647 }, - "sessions_timebox": { "type": "integer", "minimum": 0 }, - "sessions_inactivity_timeout": { "type": "integer", "minimum": 0 }, - "rate_limit_anonymous_users": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, - "rate_limit_email_sent": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, - "rate_limit_sms_sent": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, - "rate_limit_verify": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, - "rate_limit_token_refresh": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, - "rate_limit_otp": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, - "password_min_length": { "type": "integer", "minimum": 6, "maximum": 32767 }, + "site_url": { "type": "string", "pattern": "^[^,]+$", "nullable": true }, + "disable_signup": { "type": "boolean", "nullable": true }, + "jwt_exp": { "type": "integer", "minimum": 0, "maximum": 604800, "nullable": true }, + "smtp_admin_email": { "type": "string", "format": "email", "nullable": true }, + "smtp_host": { "type": "string", "nullable": true }, + "smtp_port": { "type": "string", "nullable": true }, + "smtp_user": { "type": "string", "nullable": true }, + "smtp_pass": { "type": "string", "nullable": true }, + "smtp_max_frequency": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true + }, + "smtp_sender_name": { "type": "string", "nullable": true }, + "mailer_allow_unverified_email_sign_ins": { "type": "boolean", "nullable": true }, + "mailer_autoconfirm": { "type": "boolean", "nullable": true }, + "mailer_subjects_invite": { "type": "string", "nullable": true }, + "mailer_subjects_confirmation": { "type": "string", "nullable": true }, + "mailer_subjects_recovery": { "type": "string", "nullable": true }, + "mailer_subjects_email_change": { "type": "string", "nullable": true }, + "mailer_subjects_magic_link": { "type": "string", "nullable": true }, + "mailer_subjects_reauthentication": { "type": "string", "nullable": true }, + "mailer_templates_invite_content": { "type": "string", "nullable": true }, + "mailer_templates_confirmation_content": { "type": "string", "nullable": true }, + "mailer_templates_recovery_content": { "type": "string", "nullable": true }, + "mailer_templates_email_change_content": { "type": "string", "nullable": true }, + "mailer_templates_magic_link_content": { "type": "string", "nullable": true }, + "mailer_templates_reauthentication_content": { "type": "string", "nullable": true }, + "mfa_max_enrolled_factors": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647, + "nullable": true + }, + "uri_allow_list": { "type": "string", "nullable": true }, + "external_anonymous_users_enabled": { "type": "boolean", "nullable": true }, + "external_email_enabled": { "type": "boolean", "nullable": true }, + "external_phone_enabled": { "type": "boolean", "nullable": true }, + "saml_enabled": { "type": "boolean", "nullable": true }, + "saml_external_url": { "type": "string", "pattern": "^[^,]+$", "nullable": true }, + "security_captcha_enabled": { "type": "boolean", "nullable": true }, + "security_captcha_provider": { + "type": "string", + "enum": ["turnstile", "hcaptcha"], + "nullable": true + }, + "security_captcha_secret": { "type": "string", "nullable": true }, + "sessions_timebox": { "type": "integer", "minimum": 0, "nullable": true }, + "sessions_inactivity_timeout": { "type": "integer", "minimum": 0, "nullable": true }, + "sessions_single_per_user": { "type": "boolean", "nullable": true }, + "sessions_tags": { + "type": "string", + "pattern": "^\\s*([a-zA-Z0-9_-]+(\\s*,+\\s*)?)*\\s*$", + "nullable": true + }, + "rate_limit_anonymous_users": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_email_sent": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_sms_sent": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_verify": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_token_refresh": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_otp": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_web3": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "mailer_secure_email_change_enabled": { "type": "boolean", "nullable": true }, + "refresh_token_rotation_enabled": { "type": "boolean", "nullable": true }, + "password_hibp_enabled": { "type": "boolean", "nullable": true }, + "password_min_length": { + "type": "integer", + "minimum": 6, + "maximum": 32767, + "nullable": true + }, + "password_required_characters": { + "type": "string", + "enum": [ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", + "" + ], + "nullable": true + }, + "security_manual_linking_enabled": { "type": "boolean", "nullable": true }, + "security_update_password_require_reauthentication": { + "type": "boolean", + "nullable": true + }, "security_refresh_token_reuse_interval": { "type": "integer", "minimum": 0, - "maximum": 2147483647 - }, - "mailer_otp_exp": { "type": "integer", "minimum": 0, "maximum": 2147483647 }, - "mailer_otp_length": { "type": "integer", "minimum": 6, "maximum": 10 }, - "sms_max_frequency": { "type": "integer", "minimum": 0, "maximum": 32767 }, - "sms_otp_exp": { "type": "integer", "minimum": 0, "maximum": 2147483647 }, - "sms_otp_length": { "type": "integer", "minimum": 0, "maximum": 32767 }, - "db_max_pool_size": { "type": "integer" }, - "api_max_request_duration": { "type": "integer" }, - "mfa_phone_max_frequency": { "type": "integer", "minimum": 0, "maximum": 32767 }, - "mfa_phone_otp_length": { "type": "integer", "minimum": 0, "maximum": 32767 }, - "site_url": { "type": "string", "pattern": "/^[^,]+$/" }, - "disable_signup": { "type": "boolean" }, - "smtp_admin_email": { "type": "string" }, - "smtp_host": { "type": "string" }, - "smtp_port": { "type": "string" }, - "smtp_user": { "type": "string" }, - "smtp_pass": { "type": "string" }, - "smtp_sender_name": { "type": "string" }, - "mailer_allow_unverified_email_sign_ins": { "type": "boolean" }, - "mailer_autoconfirm": { "type": "boolean" }, - "mailer_subjects_invite": { "type": "string" }, - "mailer_subjects_confirmation": { "type": "string" }, - "mailer_subjects_recovery": { "type": "string" }, - "mailer_subjects_email_change": { "type": "string" }, - "mailer_subjects_magic_link": { "type": "string" }, - "mailer_subjects_reauthentication": { "type": "string" }, - "mailer_templates_invite_content": { "type": "string" }, - "mailer_templates_confirmation_content": { "type": "string" }, - "mailer_templates_recovery_content": { "type": "string" }, - "mailer_templates_email_change_content": { "type": "string" }, - "mailer_templates_magic_link_content": { "type": "string" }, - "mailer_templates_reauthentication_content": { "type": "string" }, - "uri_allow_list": { "type": "string" }, - "external_anonymous_users_enabled": { "type": "boolean" }, - "external_email_enabled": { "type": "boolean" }, - "external_phone_enabled": { "type": "boolean" }, - "saml_enabled": { "type": "boolean" }, - "saml_external_url": { "type": "string", "pattern": "/^[^,]+$/" }, - "security_captcha_enabled": { "type": "boolean" }, - "security_captcha_provider": { "type": "string" }, - "security_captcha_secret": { "type": "string" }, - "sessions_single_per_user": { "type": "boolean" }, - "sessions_tags": { - "type": "string", - "pattern": "/^\\s*([a-z0-9_-]+(\\s*,+\\s*)?)*\\s*$/i" + "maximum": 2147483647, + "nullable": true + }, + "mailer_otp_exp": { "type": "integer", "minimum": 0, "maximum": 2147483647 }, + "mailer_otp_length": { "type": "integer", "minimum": 6, "maximum": 10, "nullable": true }, + "sms_autoconfirm": { "type": "boolean", "nullable": true }, + "sms_max_frequency": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true + }, + "sms_otp_exp": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647, + "nullable": true + }, + "sms_otp_length": { "type": "integer", "minimum": 0, "maximum": 32767 }, + "sms_provider": { + "type": "string", + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "nullable": true + }, + "sms_messagebird_access_key": { "type": "string", "nullable": true }, + "sms_messagebird_originator": { "type": "string", "nullable": true }, + "sms_test_otp": { + "type": "string", + "pattern": "^([0-9]{1,15}=[0-9]+,?)*$", + "nullable": true + }, + "sms_test_otp_valid_until": { "type": "string", "format": "date-time", "nullable": true }, + "sms_textlocal_api_key": { "type": "string", "nullable": true }, + "sms_textlocal_sender": { "type": "string", "nullable": true }, + "sms_twilio_account_sid": { "type": "string", "nullable": true }, + "sms_twilio_auth_token": { "type": "string", "nullable": true }, + "sms_twilio_content_sid": { "type": "string", "nullable": true }, + "sms_twilio_message_service_sid": { "type": "string", "nullable": true }, + "sms_twilio_verify_account_sid": { "type": "string", "nullable": true }, + "sms_twilio_verify_auth_token": { "type": "string", "nullable": true }, + "sms_twilio_verify_message_service_sid": { "type": "string", "nullable": true }, + "sms_vonage_api_key": { "type": "string", "nullable": true }, + "sms_vonage_api_secret": { "type": "string", "nullable": true }, + "sms_vonage_from": { "type": "string", "nullable": true }, + "sms_template": { "type": "string", "nullable": true }, + "hook_mfa_verification_attempt_enabled": { "type": "boolean", "nullable": true }, + "hook_mfa_verification_attempt_uri": { "type": "string", "nullable": true }, + "hook_mfa_verification_attempt_secrets": { "type": "string", "nullable": true }, + "hook_password_verification_attempt_enabled": { "type": "boolean", "nullable": true }, + "hook_password_verification_attempt_uri": { "type": "string", "nullable": true }, + "hook_password_verification_attempt_secrets": { "type": "string", "nullable": true }, + "hook_custom_access_token_enabled": { "type": "boolean", "nullable": true }, + "hook_custom_access_token_uri": { "type": "string", "nullable": true }, + "hook_custom_access_token_secrets": { "type": "string", "nullable": true }, + "hook_send_sms_enabled": { "type": "boolean", "nullable": true }, + "hook_send_sms_uri": { "type": "string", "nullable": true }, + "hook_send_sms_secrets": { "type": "string", "nullable": true }, + "hook_send_email_enabled": { "type": "boolean", "nullable": true }, + "hook_send_email_uri": { "type": "string", "nullable": true }, + "hook_send_email_secrets": { "type": "string", "nullable": true }, + "hook_before_user_created_enabled": { "type": "boolean", "nullable": true }, + "hook_before_user_created_uri": { "type": "string", "nullable": true }, + "hook_before_user_created_secrets": { "type": "string", "nullable": true }, + "external_apple_enabled": { "type": "boolean", "nullable": true }, + "external_apple_client_id": { "type": "string", "nullable": true }, + "external_apple_secret": { "type": "string", "nullable": true }, + "external_apple_additional_client_ids": { "type": "string", "nullable": true }, + "external_azure_enabled": { "type": "boolean", "nullable": true }, + "external_azure_client_id": { "type": "string", "nullable": true }, + "external_azure_secret": { "type": "string", "nullable": true }, + "external_azure_url": { "type": "string", "nullable": true }, + "external_bitbucket_enabled": { "type": "boolean", "nullable": true }, + "external_bitbucket_client_id": { "type": "string", "nullable": true }, + "external_bitbucket_secret": { "type": "string", "nullable": true }, + "external_discord_enabled": { "type": "boolean", "nullable": true }, + "external_discord_client_id": { "type": "string", "nullable": true }, + "external_discord_secret": { "type": "string", "nullable": true }, + "external_facebook_enabled": { "type": "boolean", "nullable": true }, + "external_facebook_client_id": { "type": "string", "nullable": true }, + "external_facebook_secret": { "type": "string", "nullable": true }, + "external_figma_enabled": { "type": "boolean", "nullable": true }, + "external_figma_client_id": { "type": "string", "nullable": true }, + "external_figma_secret": { "type": "string", "nullable": true }, + "external_github_enabled": { "type": "boolean", "nullable": true }, + "external_github_client_id": { "type": "string", "nullable": true }, + "external_github_secret": { "type": "string", "nullable": true }, + "external_gitlab_enabled": { "type": "boolean", "nullable": true }, + "external_gitlab_client_id": { "type": "string", "nullable": true }, + "external_gitlab_secret": { "type": "string", "nullable": true }, + "external_gitlab_url": { "type": "string", "nullable": true }, + "external_google_enabled": { "type": "boolean", "nullable": true }, + "external_google_client_id": { "type": "string", "nullable": true }, + "external_google_secret": { "type": "string", "nullable": true }, + "external_google_additional_client_ids": { "type": "string", "nullable": true }, + "external_google_skip_nonce_check": { "type": "boolean", "nullable": true }, + "external_kakao_enabled": { "type": "boolean", "nullable": true }, + "external_kakao_client_id": { "type": "string", "nullable": true }, + "external_kakao_secret": { "type": "string", "nullable": true }, + "external_keycloak_enabled": { "type": "boolean", "nullable": true }, + "external_keycloak_client_id": { "type": "string", "nullable": true }, + "external_keycloak_secret": { "type": "string", "nullable": true }, + "external_keycloak_url": { "type": "string", "nullable": true }, + "external_linkedin_oidc_enabled": { "type": "boolean", "nullable": true }, + "external_linkedin_oidc_client_id": { "type": "string", "nullable": true }, + "external_linkedin_oidc_secret": { "type": "string", "nullable": true }, + "external_slack_oidc_enabled": { "type": "boolean", "nullable": true }, + "external_slack_oidc_client_id": { "type": "string", "nullable": true }, + "external_slack_oidc_secret": { "type": "string", "nullable": true }, + "external_notion_enabled": { "type": "boolean", "nullable": true }, + "external_notion_client_id": { "type": "string", "nullable": true }, + "external_notion_secret": { "type": "string", "nullable": true }, + "external_slack_enabled": { "type": "boolean", "nullable": true }, + "external_slack_client_id": { "type": "string", "nullable": true }, + "external_slack_secret": { "type": "string", "nullable": true }, + "external_spotify_enabled": { "type": "boolean", "nullable": true }, + "external_spotify_client_id": { "type": "string", "nullable": true }, + "external_spotify_secret": { "type": "string", "nullable": true }, + "external_twitch_enabled": { "type": "boolean", "nullable": true }, + "external_twitch_client_id": { "type": "string", "nullable": true }, + "external_twitch_secret": { "type": "string", "nullable": true }, + "external_twitter_enabled": { "type": "boolean", "nullable": true }, + "external_twitter_client_id": { "type": "string", "nullable": true }, + "external_twitter_secret": { "type": "string", "nullable": true }, + "external_workos_enabled": { "type": "boolean", "nullable": true }, + "external_workos_client_id": { "type": "string", "nullable": true }, + "external_workos_secret": { "type": "string", "nullable": true }, + "external_workos_url": { "type": "string", "nullable": true }, + "external_web3_solana_enabled": { "type": "boolean", "nullable": true }, + "external_web3_ethereum_enabled": { "type": "boolean", "nullable": true }, + "external_zoom_enabled": { "type": "boolean", "nullable": true }, + "external_zoom_client_id": { "type": "string", "nullable": true }, + "external_zoom_secret": { "type": "string", "nullable": true }, + "db_max_pool_size": { "type": "integer", "nullable": true }, + "api_max_request_duration": { "type": "integer", "nullable": true }, + "mfa_totp_enroll_enabled": { "type": "boolean", "nullable": true }, + "mfa_totp_verify_enabled": { "type": "boolean", "nullable": true }, + "mfa_web_authn_enroll_enabled": { "type": "boolean", "nullable": true }, + "mfa_web_authn_verify_enabled": { "type": "boolean", "nullable": true }, + "mfa_phone_enroll_enabled": { "type": "boolean", "nullable": true }, + "mfa_phone_verify_enabled": { "type": "boolean", "nullable": true }, + "mfa_phone_max_frequency": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true }, - "mailer_secure_email_change_enabled": { "type": "boolean" }, - "refresh_token_rotation_enabled": { "type": "boolean" }, - "password_hibp_enabled": { "type": "boolean" }, - "password_required_characters": { - "type": "string", - "enum": [ - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", - "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", - "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "" - ] + "mfa_phone_otp_length": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true }, - "security_manual_linking_enabled": { "type": "boolean" }, - "security_update_password_require_reauthentication": { "type": "boolean" }, - "sms_autoconfirm": { "type": "boolean" }, - "sms_provider": { "type": "string" }, - "sms_messagebird_access_key": { "type": "string" }, - "sms_messagebird_originator": { "type": "string" }, - "sms_test_otp": { "type": "string", "pattern": "/^([0-9]{1,15}=[0-9]+,?)*$/" }, - "sms_test_otp_valid_until": { "type": "string" }, - "sms_textlocal_api_key": { "type": "string" }, - "sms_textlocal_sender": { "type": "string" }, - "sms_twilio_account_sid": { "type": "string" }, - "sms_twilio_auth_token": { "type": "string" }, - "sms_twilio_content_sid": { "type": "string" }, - "sms_twilio_message_service_sid": { "type": "string" }, - "sms_twilio_verify_account_sid": { "type": "string" }, - "sms_twilio_verify_auth_token": { "type": "string" }, - "sms_twilio_verify_message_service_sid": { "type": "string" }, - "sms_vonage_api_key": { "type": "string" }, - "sms_vonage_api_secret": { "type": "string" }, - "sms_vonage_from": { "type": "string" }, - "sms_template": { "type": "string" }, - "hook_mfa_verification_attempt_enabled": { "type": "boolean" }, - "hook_mfa_verification_attempt_uri": { "type": "string" }, - "hook_mfa_verification_attempt_secrets": { "type": "string" }, - "hook_password_verification_attempt_enabled": { "type": "boolean" }, - "hook_password_verification_attempt_uri": { "type": "string" }, - "hook_password_verification_attempt_secrets": { "type": "string" }, - "hook_custom_access_token_enabled": { "type": "boolean" }, - "hook_custom_access_token_uri": { "type": "string" }, - "hook_custom_access_token_secrets": { "type": "string" }, - "hook_send_sms_enabled": { "type": "boolean" }, - "hook_send_sms_uri": { "type": "string" }, - "hook_send_sms_secrets": { "type": "string" }, - "hook_send_email_enabled": { "type": "boolean" }, - "hook_send_email_uri": { "type": "string" }, - "hook_send_email_secrets": { "type": "string" }, - "external_apple_enabled": { "type": "boolean" }, - "external_apple_client_id": { "type": "string" }, - "external_apple_secret": { "type": "string" }, - "external_apple_additional_client_ids": { "type": "string" }, - "external_azure_enabled": { "type": "boolean" }, - "external_azure_client_id": { "type": "string" }, - "external_azure_secret": { "type": "string" }, - "external_azure_url": { "type": "string" }, - "external_bitbucket_enabled": { "type": "boolean" }, - "external_bitbucket_client_id": { "type": "string" }, - "external_bitbucket_secret": { "type": "string" }, - "external_discord_enabled": { "type": "boolean" }, - "external_discord_client_id": { "type": "string" }, - "external_discord_secret": { "type": "string" }, - "external_facebook_enabled": { "type": "boolean" }, - "external_facebook_client_id": { "type": "string" }, - "external_facebook_secret": { "type": "string" }, - "external_figma_enabled": { "type": "boolean" }, - "external_figma_client_id": { "type": "string" }, - "external_figma_secret": { "type": "string" }, - "external_github_enabled": { "type": "boolean" }, - "external_github_client_id": { "type": "string" }, - "external_github_secret": { "type": "string" }, - "external_gitlab_enabled": { "type": "boolean" }, - "external_gitlab_client_id": { "type": "string" }, - "external_gitlab_secret": { "type": "string" }, - "external_gitlab_url": { "type": "string" }, - "external_google_enabled": { "type": "boolean" }, - "external_google_client_id": { "type": "string" }, - "external_google_secret": { "type": "string" }, - "external_google_additional_client_ids": { "type": "string" }, - "external_google_skip_nonce_check": { "type": "boolean" }, - "external_kakao_enabled": { "type": "boolean" }, - "external_kakao_client_id": { "type": "string" }, - "external_kakao_secret": { "type": "string" }, - "external_keycloak_enabled": { "type": "boolean" }, - "external_keycloak_client_id": { "type": "string" }, - "external_keycloak_secret": { "type": "string" }, - "external_keycloak_url": { "type": "string" }, - "external_linkedin_oidc_enabled": { "type": "boolean" }, - "external_linkedin_oidc_client_id": { "type": "string" }, - "external_linkedin_oidc_secret": { "type": "string" }, - "external_slack_oidc_enabled": { "type": "boolean" }, - "external_slack_oidc_client_id": { "type": "string" }, - "external_slack_oidc_secret": { "type": "string" }, - "external_notion_enabled": { "type": "boolean" }, - "external_notion_client_id": { "type": "string" }, - "external_notion_secret": { "type": "string" }, - "external_slack_enabled": { "type": "boolean" }, - "external_slack_client_id": { "type": "string" }, - "external_slack_secret": { "type": "string" }, - "external_spotify_enabled": { "type": "boolean" }, - "external_spotify_client_id": { "type": "string" }, - "external_spotify_secret": { "type": "string" }, - "external_twitch_enabled": { "type": "boolean" }, - "external_twitch_client_id": { "type": "string" }, - "external_twitch_secret": { "type": "string" }, - "external_twitter_enabled": { "type": "boolean" }, - "external_twitter_client_id": { "type": "string" }, - "external_twitter_secret": { "type": "string" }, - "external_workos_enabled": { "type": "boolean" }, - "external_workos_client_id": { "type": "string" }, - "external_workos_secret": { "type": "string" }, - "external_workos_url": { "type": "string" }, - "external_zoom_enabled": { "type": "boolean" }, - "external_zoom_client_id": { "type": "string" }, - "external_zoom_secret": { "type": "string" }, - "mfa_totp_enroll_enabled": { "type": "boolean" }, - "mfa_totp_verify_enabled": { "type": "boolean" }, - "mfa_web_authn_enroll_enabled": { "type": "boolean" }, - "mfa_web_authn_verify_enabled": { "type": "boolean" }, - "mfa_phone_enroll_enabled": { "type": "boolean" }, - "mfa_phone_verify_enabled": { "type": "boolean" }, - "mfa_phone_template": { "type": "string" } + "mfa_phone_template": { "type": "string", "nullable": true } } }, "CreateThirdPartyAuthBody": { @@ -4511,87 +6243,518 @@ "properties": { "oidc_issuer_url": { "type": "string" }, "jwks_url": { "type": "string" }, - "custom_jwks": { "type": "object" } + "custom_jwks": {} } }, "ThirdPartyAuth": { "type": "object", "properties": { - "id": { "type": "string" }, + "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" }, "oidc_issuer_url": { "type": "string", "nullable": true }, "jwks_url": { "type": "string", "nullable": true }, - "custom_jwks": { "type": "object", "nullable": true }, - "resolved_jwks": { "type": "object", "nullable": true }, + "custom_jwks": { "nullable": true }, + "resolved_jwks": { "nullable": true }, "inserted_at": { "type": "string" }, "updated_at": { "type": "string" }, "resolved_at": { "type": "string", "nullable": true } }, "required": ["id", "type", "inserted_at", "updated_at"] }, - "ProjectAvailableRestoreVersion": { + "GetProjectAvailableRestoreVersionsResponse": { "type": "object", "properties": { - "version": { "type": "string" }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "postgres_engine": { "type": "string", "enum": ["13", "14", "15", "17", "17-oriole"] } + "available_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { "type": "string" }, + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + }, + "postgres_engine": { + "type": "string", + "enum": ["13", "14", "15", "17", "17-oriole"] + } + }, + "required": ["version", "release_channel", "postgres_engine"] + } + } }, - "required": ["version", "release_channel", "postgres_engine"] + "required": ["available_versions"] }, - "GetProjectAvailableRestoreVersionsResponse": { + "ListProjectAddonsResponse": { "type": "object", "properties": { - "available_versions": { + "selected_addons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain" + ] + }, + "variant": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { "type": "string", "enum": ["cd_default"] }, + { "type": "string", "enum": ["pitr_7", "pitr_14", "pitr_28"] }, + { "type": "string", "enum": ["ipv4_default"] }, + { "type": "string", "enum": ["auth_mfa_phone_default"] }, + { "type": "string", "enum": ["auth_mfa_web_authn_default"] }, + { "type": "string", "enum": ["log_drain_default"] } + ] + }, + "name": { "type": "string" }, + "price": { + "type": "object", + "properties": { + "description": { "type": "string" }, + "type": { "type": "string", "enum": ["fixed", "usage"] }, + "interval": { "type": "string", "enum": ["monthly", "hourly"] }, + "amount": { "type": "number" } + }, + "required": ["description", "type", "interval", "amount"] + }, + "meta": { "description": "Any JSON-serializable value" } + }, + "required": ["id", "name", "price"] + } + }, + "required": ["type", "variant"] + } + }, + "available_addons": { "type": "array", - "items": { "$ref": "#/components/schemas/ProjectAvailableRestoreVersion" } + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain" + ] + }, + "name": { "type": "string" }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { "type": "string", "enum": ["cd_default"] }, + { "type": "string", "enum": ["pitr_7", "pitr_14", "pitr_28"] }, + { "type": "string", "enum": ["ipv4_default"] }, + { "type": "string", "enum": ["auth_mfa_phone_default"] }, + { "type": "string", "enum": ["auth_mfa_web_authn_default"] }, + { "type": "string", "enum": ["log_drain_default"] } + ] + }, + "name": { "type": "string" }, + "price": { + "type": "object", + "properties": { + "description": { "type": "string" }, + "type": { "type": "string", "enum": ["fixed", "usage"] }, + "interval": { "type": "string", "enum": ["monthly", "hourly"] }, + "amount": { "type": "number" } + }, + "required": ["description", "type", "interval", "amount"] + }, + "meta": { "description": "Any JSON-serializable value" } + }, + "required": ["id", "name", "price"] + } + } + }, + "required": ["type", "name", "variants"] + } } }, - "required": ["available_versions"] + "required": ["selected_addons", "available_addons"] }, - "RestoreProjectBodyDto": { + "ApplyProjectAddonBody": { "type": "object", - "properties": {}, - "hideDefinitions": ["release_channel", "postgres_engine"] + "properties": { + "addon_variant": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { "type": "string", "enum": ["cd_default"] }, + { "type": "string", "enum": ["pitr_7", "pitr_14", "pitr_28"] }, + { "type": "string", "enum": ["ipv4_default"] } + ] + }, + "addon_type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain" + ] + } + }, + "required": ["addon_variant", "addon_type"] + }, + "ProjectClaimTokenResponse": { + "type": "object", + "properties": { + "token_alias": { "type": "string" }, + "expires_at": { "type": "string" }, + "created_at": { "type": "string" }, + "created_by": { "type": "string", "format": "uuid" } + }, + "required": ["token_alias", "expires_at", "created_at", "created_by"] + }, + "CreateProjectClaimTokenResponse": { + "type": "object", + "properties": { + "token": { "type": "string" }, + "token_alias": { "type": "string" }, + "expires_at": { "type": "string" }, + "created_at": { "type": "string" }, + "created_by": { "type": "string", "format": "uuid" } + }, + "required": ["token", "token_alias", "expires_at", "created_at", "created_by"] + }, + "V1ProjectAdvisorsResponse": { + "type": "object", + "properties": { + "lints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "unindexed_foreign_keys", + "auth_users_exposed", + "auth_rls_initplan", + "no_primary_key", + "unused_index", + "multiple_permissive_policies", + "policy_exists_rls_disabled", + "rls_enabled_no_policy", + "duplicate_index", + "security_definer_view", + "function_search_path_mutable", + "rls_disabled_in_public", + "extension_in_public", + "rls_references_user_metadata", + "materialized_view_in_api", + "foreign_table_in_api", + "unsupported_reg_types", + "auth_otp_long_expiry", + "auth_otp_short_length", + "ssl_not_enforced", + "network_restrictions_not_set", + "password_requirements_min_length", + "pitr_not_enabled", + "auth_leaked_password_protection", + "auth_insufficient_mfa_options", + "auth_password_policy_missing", + "leaked_service_key", + "no_backup_admin" + ] + }, + "title": { "type": "string" }, + "level": { "type": "string", "enum": ["ERROR", "WARN", "INFO"] }, + "facing": { "type": "string", "enum": ["EXTERNAL"] }, + "categories": { + "type": "array", + "items": { "type": "string", "enum": ["PERFORMANCE", "SECURITY"] } + }, + "description": { "type": "string" }, + "detail": { "type": "string" }, + "remediation": { "type": "string" }, + "metadata": { + "type": "object", + "properties": { + "schema": { "type": "string" }, + "name": { "type": "string" }, + "entity": { "type": "string" }, + "type": { + "type": "string", + "enum": ["table", "view", "auth", "function", "extension", "compliance"] + }, + "fkey_name": { "type": "string" }, + "fkey_columns": { "type": "array", "items": { "type": "number" } } + } + }, + "cache_key": { "type": "string" } + }, + "required": [ + "name", + "title", + "level", + "facing", + "categories", + "description", + "detail", + "remediation", + "cache_key" + ] + } + } + }, + "required": ["lints"] }, - "V1AnalyticsResponse": { + "AnalyticsResponse": { "type": "object", "properties": { + "result": { "type": "array", "items": {} }, "error": { "oneOf": [ + { "type": "string" }, { + "type": "object", "properties": { "code": { "type": "number" }, "errors": { "type": "array", "items": { + "type": "object", "properties": { "domain": { "type": "string" }, "location": { "type": "string" }, "locationType": { "type": "string" }, "message": { "type": "string" }, "reason": { "type": "string" } - } + }, + "required": ["domain", "location", "locationType", "message", "reason"] } }, "message": { "type": "string" }, "status": { "type": "string" } - } + }, + "required": ["code", "errors", "message", "status"] + } + ] + } + } + }, + "V1GetUsageApiCountResponse": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "timestamp": { "type": "string", "format": "date-time" }, + "total_auth_requests": { "type": "number" }, + "total_realtime_requests": { "type": "number" }, + "total_rest_requests": { "type": "number" }, + "total_storage_requests": { "type": "number" } }, - { "type": "string" } + "required": [ + "timestamp", + "total_auth_requests", + "total_realtime_requests", + "total_rest_requests", + "total_storage_requests" + ] + } + }, + "error": { + "oneOf": [ + { "type": "string" }, + { + "type": "object", + "properties": { + "code": { "type": "number" }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { "type": "string" }, + "location": { "type": "string" }, + "locationType": { "type": "string" }, + "message": { "type": "string" }, + "reason": { "type": "string" } + }, + "required": ["domain", "location", "locationType", "message", "reason"] + } + }, + "message": { "type": "string" }, + "status": { "type": "string" } + }, + "required": ["code", "errors", "message", "status"] + } + ] + } + } + }, + "V1GetUsageApiRequestsCountResponse": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { "count": { "type": "number" } }, + "required": ["count"] + } + }, + "error": { + "oneOf": [ + { "type": "string" }, + { + "type": "object", + "properties": { + "code": { "type": "number" }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { "type": "string" }, + "location": { "type": "string" }, + "locationType": { "type": "string" }, + "message": { "type": "string" }, + "reason": { "type": "string" } + }, + "required": ["domain", "location", "locationType", "message", "reason"] + } + }, + "message": { "type": "string" }, + "status": { "type": "string" } + }, + "required": ["code", "errors", "message", "status"] + } ] + } + } + }, + "V1ListMigrationsResponse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { "type": "string", "minLength": 1 }, + "name": { "type": "string" } }, - "result": { "type": "array", "items": { "type": "object" } } + "required": ["version"] } }, + "V1CreateMigrationBody": { + "type": "object", + "properties": { + "query": { "type": "string", "minLength": 1 }, + "name": { "type": "string" } + }, + "required": ["query"] + }, + "V1UpsertMigrationBody": { + "type": "object", + "properties": { + "query": { "type": "string", "minLength": 1 }, + "name": { "type": "string" } + }, + "required": ["query"] + }, "V1RunQueryBody": { "type": "object", - "properties": { "query": { "type": "string" } }, + "properties": { + "query": { "type": "string", "minLength": 1 }, + "read_only": { "type": "boolean" } + }, "required": ["query"] }, - "GetProjectDbMetadataResponseDto": { + "GetProjectDbMetadataResponse": { "type": "object", "properties": { "databases": { @@ -4610,34 +6773,98 @@ } } }, - "required": ["name", "schemas"], - "additionalProperties": true + "required": ["name", "schemas"], + "additionalProperties": true + } + } + }, + "required": ["databases"] + }, + "JitAccessResponse": { + "type": "object", + "properties": { + "user_id": { "type": "string", "format": "uuid" }, + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { "type": "string", "minLength": 1 }, + "expires_at": { "type": "string" } + }, + "required": ["role"] + } + } + }, + "required": ["user_id", "user_roles"] + }, + "JitListAccessResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { "type": "string", "format": "uuid" }, + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { "type": "string", "minLength": 1 }, + "expires_at": { "type": "string" } + }, + "required": ["role"] + } + } + }, + "required": ["user_id", "user_roles"] + } + } + }, + "required": ["items"] + }, + "UpdateJitAccessBody": { + "type": "object", + "properties": { + "user_id": { "type": "string", "format": "uuid", "minLength": 1 }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { "type": "string", "minLength": 1 }, + "expires_at": { "type": "string" } + }, + "required": ["role"] } } }, - "required": ["databases"] + "required": ["user_id", "roles"] }, "FunctionResponse": { "type": "object", "properties": { - "version": { "type": "integer" }, - "created_at": { "type": "integer", "format": "int64" }, - "updated_at": { "type": "integer", "format": "int64" }, "id": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, - "status": { "enum": ["ACTIVE", "REMOVED", "THROTTLED"], "type": "string" }, + "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, + "updated_at": { "type": "integer", "format": "int64" }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, - "import_map_path": { "type": "string" } + "import_map_path": { "type": "string" }, + "ezbr_sha256": { "type": "string" } }, - "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] + "required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] }, "V1CreateFunctionBody": { "type": "object", "properties": { - "slug": { "type": "string", "pattern": "/^[A-Za-z0-9_-]+$/" }, + "slug": { "type": "string", "pattern": "^[A-Za-z0-9_-]+$" }, "name": { "type": "string" }, "body": { "type": "string" }, "verify_jwt": { "type": "boolean" } @@ -4645,84 +6872,107 @@ "required": ["slug", "name", "body"] }, "BulkUpdateFunctionBody": { - "type": "object", - "properties": { - "version": { "type": "integer" }, - "created_at": { "type": "integer", "format": "int64" }, - "id": { "type": "string" }, - "slug": { "type": "string" }, - "name": { "type": "string" }, - "status": { "enum": ["ACTIVE", "REMOVED", "THROTTLED"], "type": "string" }, - "verify_jwt": { "type": "boolean" }, - "import_map": { "type": "boolean" }, - "entrypoint_path": { "type": "string" }, - "import_map_path": { "type": "string" } - }, - "required": ["version", "id", "slug", "name", "status"] + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "slug": { "type": "string", "pattern": "^[A-Za-z0-9_-]+$" }, + "name": { "type": "string" }, + "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, + "verify_jwt": { "type": "boolean" }, + "import_map": { "type": "boolean" }, + "entrypoint_path": { "type": "string" }, + "import_map_path": { "type": "string" }, + "ezbr_sha256": { "type": "string" } + }, + "required": ["id", "slug", "name", "status", "version"] + } }, "BulkUpdateFunctionResponse": { "type": "object", "properties": { "functions": { "type": "array", - "items": { "$ref": "#/components/schemas/FunctionResponse" } + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "slug": { "type": "string" }, + "name": { "type": "string" }, + "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, + "updated_at": { "type": "integer", "format": "int64" }, + "verify_jwt": { "type": "boolean" }, + "import_map": { "type": "boolean" }, + "entrypoint_path": { "type": "string" }, + "import_map_path": { "type": "string" }, + "ezbr_sha256": { "type": "string" } + }, + "required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] + } } }, "required": ["functions"] }, - "FunctionDeployMetadata": { - "type": "object", - "properties": { - "entrypoint_path": { "type": "string" }, - "import_map_path": { "type": "string" }, - "static_patterns": { "type": "array", "items": { "type": "string" } }, - "verify_jwt": { "type": "boolean" }, - "name": { "type": "string" } - }, - "required": ["entrypoint_path"] - }, "FunctionDeployBody": { "type": "object", "properties": { "file": { "type": "array", "items": { "type": "string", "format": "binary" } }, - "metadata": { "$ref": "#/components/schemas/FunctionDeployMetadata" } + "metadata": { + "type": "object", + "properties": { + "entrypoint_path": { "type": "string" }, + "import_map_path": { "type": "string" }, + "static_patterns": { "type": "array", "items": { "type": "string" } }, + "verify_jwt": { "type": "boolean" }, + "name": { "type": "string" } + }, + "required": ["entrypoint_path"] + } }, - "required": ["file", "metadata"] + "required": ["metadata"] }, "DeployFunctionResponse": { "type": "object", "properties": { - "version": { "type": "integer" }, - "created_at": { "type": "integer", "format": "int64" }, - "updated_at": { "type": "integer", "format": "int64" }, "id": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, - "status": { "enum": ["ACTIVE", "REMOVED", "THROTTLED"], "type": "string" }, + "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, + "updated_at": { "type": "integer", "format": "int64" }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, - "import_map_path": { "type": "string" } + "import_map_path": { "type": "string" }, + "ezbr_sha256": { "type": "string" } }, - "required": ["version", "id", "slug", "name", "status"] + "required": ["id", "slug", "name", "status", "version"] }, "FunctionSlugResponse": { "type": "object", "properties": { - "version": { "type": "integer" }, - "created_at": { "type": "integer", "format": "int64" }, - "updated_at": { "type": "integer", "format": "int64" }, "id": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, - "status": { "enum": ["ACTIVE", "REMOVED", "THROTTLED"], "type": "string" }, + "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, + "updated_at": { "type": "integer", "format": "int64" }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, - "import_map_path": { "type": "string" } + "import_map_path": { "type": "string" }, + "ezbr_sha256": { "type": "string" } }, - "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] + "required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] }, + "StreamableFile": { "type": "object", "properties": {} }, "V1UpdateFunctionBody": { "type": "object", "properties": { @@ -4743,32 +6993,6 @@ }, "required": ["id", "name", "owner", "created_at", "updated_at", "public"] }, - "AttributeValue": { - "type": "object", - "properties": { - "default": { - "oneOf": [ - { "type": "object" }, - { "type": "number" }, - { "type": "string" }, - { "type": "boolean" } - ] - }, - "name": { "type": "string" }, - "names": { "type": "array", "items": { "type": "string" } }, - "array": { "type": "boolean" } - } - }, - "AttributeMapping": { - "type": "object", - "properties": { - "keys": { - "type": "object", - "additionalProperties": { "$ref": "#/components/schemas/AttributeValue" } - } - }, - "required": ["keys"] - }, "CreateProviderBody": { "type": "object", "properties": { @@ -4780,48 +7004,86 @@ "metadata_xml": { "type": "string" }, "metadata_url": { "type": "string" }, "domains": { "type": "array", "items": { "type": "string" } }, - "attribute_mapping": { "$ref": "#/components/schemas/AttributeMapping" } + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "names": { "type": "array", "items": { "type": "string" } }, + "default": { + "oneOf": [ + { "type": "object", "properties": {} }, + { "type": "number" }, + { "type": "string" }, + { "type": "boolean" } + ] + }, + "array": { "type": "boolean" } + } + } + } + }, + "required": ["keys"] + } }, "required": ["type"] }, - "SamlDescriptor": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "entity_id": { "type": "string" }, - "metadata_url": { "type": "string" }, - "metadata_xml": { "type": "string" }, - "attribute_mapping": { "$ref": "#/components/schemas/AttributeMapping" } - }, - "required": ["id", "entity_id"] - }, - "Domain": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "domain": { "type": "string" }, - "created_at": { "type": "string" }, - "updated_at": { "type": "string" } - }, - "required": ["id"] - }, "CreateProviderResponse": { "type": "object", "properties": { "id": { "type": "string" }, - "saml": { "$ref": "#/components/schemas/SamlDescriptor" }, - "domains": { "type": "array", "items": { "$ref": "#/components/schemas/Domain" } }, - "created_at": { "type": "string" }, - "updated_at": { "type": "string" } - }, - "required": ["id"] - }, - "Provider": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "saml": { "$ref": "#/components/schemas/SamlDescriptor" }, - "domains": { "type": "array", "items": { "$ref": "#/components/schemas/Domain" } }, + "saml": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "entity_id": { "type": "string" }, + "metadata_url": { "type": "string" }, + "metadata_xml": { "type": "string" }, + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "names": { "type": "array", "items": { "type": "string" } }, + "default": { + "oneOf": [ + { "type": "object", "properties": {} }, + { "type": "number" }, + { "type": "string" }, + { "type": "boolean" } + ] + }, + "array": { "type": "boolean" } + } + } + } + }, + "required": ["keys"] + } + }, + "required": ["id", "entity_id"] + }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "domain": { "type": "string" }, + "created_at": { "type": "string" }, + "updated_at": { "type": "string" } + }, + "required": ["id"] + } + }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, @@ -4830,7 +7092,66 @@ "ListProvidersResponse": { "type": "object", "properties": { - "items": { "type": "array", "items": { "$ref": "#/components/schemas/Provider" } } + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "saml": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "entity_id": { "type": "string" }, + "metadata_url": { "type": "string" }, + "metadata_xml": { "type": "string" }, + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "names": { "type": "array", "items": { "type": "string" } }, + "default": { + "oneOf": [ + { "type": "object", "properties": {} }, + { "type": "number" }, + { "type": "string" }, + { "type": "boolean" } + ] + }, + "array": { "type": "boolean" } + } + } + } + }, + "required": ["keys"] + } + }, + "required": ["id", "entity_id"] + }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "domain": { "type": "string" }, + "created_at": { "type": "string" }, + "updated_at": { "type": "string" } + }, + "required": ["id"] + } + }, + "created_at": { "type": "string" }, + "updated_at": { "type": "string" } + }, + "required": ["id"] + } + } }, "required": ["items"] }, @@ -4838,8 +7159,54 @@ "type": "object", "properties": { "id": { "type": "string" }, - "saml": { "$ref": "#/components/schemas/SamlDescriptor" }, - "domains": { "type": "array", "items": { "$ref": "#/components/schemas/Domain" } }, + "saml": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "entity_id": { "type": "string" }, + "metadata_url": { "type": "string" }, + "metadata_xml": { "type": "string" }, + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "names": { "type": "array", "items": { "type": "string" } }, + "default": { + "oneOf": [ + { "type": "object", "properties": {} }, + { "type": "number" }, + { "type": "string" }, + { "type": "boolean" } + ] + }, + "array": { "type": "boolean" } + } + } + } + }, + "required": ["keys"] + } + }, + "required": ["id", "entity_id"] + }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "domain": { "type": "string" }, + "created_at": { "type": "string" }, + "updated_at": { "type": "string" } + }, + "required": ["id"] + } + }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, @@ -4851,15 +7218,85 @@ "metadata_xml": { "type": "string" }, "metadata_url": { "type": "string" }, "domains": { "type": "array", "items": { "type": "string" } }, - "attribute_mapping": { "$ref": "#/components/schemas/AttributeMapping" } + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "names": { "type": "array", "items": { "type": "string" } }, + "default": { + "oneOf": [ + { "type": "object", "properties": {} }, + { "type": "number" }, + { "type": "string" }, + { "type": "boolean" } + ] + }, + "array": { "type": "boolean" } + } + } + } + }, + "required": ["keys"] + } } }, "UpdateProviderResponse": { "type": "object", "properties": { "id": { "type": "string" }, - "saml": { "$ref": "#/components/schemas/SamlDescriptor" }, - "domains": { "type": "array", "items": { "$ref": "#/components/schemas/Domain" } }, + "saml": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "entity_id": { "type": "string" }, + "metadata_url": { "type": "string" }, + "metadata_xml": { "type": "string" }, + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "names": { "type": "array", "items": { "type": "string" } }, + "default": { + "oneOf": [ + { "type": "object", "properties": {} }, + { "type": "number" }, + { "type": "string" }, + { "type": "boolean" } + ] + }, + "array": { "type": "boolean" } + } + } + } + }, + "required": ["keys"] + } + }, + "required": ["id", "entity_id"] + }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "domain": { "type": "string" }, + "created_at": { "type": "string" }, + "updated_at": { "type": "string" } + }, + "required": ["id"] + } + }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, @@ -4869,40 +7306,87 @@ "type": "object", "properties": { "id": { "type": "string" }, - "saml": { "$ref": "#/components/schemas/SamlDescriptor" }, - "domains": { "type": "array", "items": { "$ref": "#/components/schemas/Domain" } }, + "saml": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "entity_id": { "type": "string" }, + "metadata_url": { "type": "string" }, + "metadata_xml": { "type": "string" }, + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "names": { "type": "array", "items": { "type": "string" } }, + "default": { + "oneOf": [ + { "type": "object", "properties": {} }, + { "type": "number" }, + { "type": "string" }, + { "type": "boolean" } + ] + }, + "array": { "type": "boolean" } + } + } + } + }, + "required": ["keys"] + } + }, + "required": ["id", "entity_id"] + }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "domain": { "type": "string" }, + "created_at": { "type": "string" }, + "updated_at": { "type": "string" } + }, + "required": ["id"] + } + }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": ["id"] }, - "V1Backup": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["COMPLETED", "FAILED", "PENDING", "REMOVED", "ARCHIVED", "CANCELLED"] - }, - "is_physical_backup": { "type": "boolean" }, - "inserted_at": { "type": "string" } - }, - "required": ["status", "is_physical_backup", "inserted_at"] - }, - "V1PhysicalBackup": { - "type": "object", - "properties": { - "earliest_physical_backup_date_unix": { "type": "integer", "format": "int64" }, - "latest_physical_backup_date_unix": { "type": "integer", "format": "int64" } - } - }, "V1BackupsResponse": { "type": "object", "properties": { "region": { "type": "string" }, "walg_enabled": { "type": "boolean" }, "pitr_enabled": { "type": "boolean" }, - "backups": { "type": "array", "items": { "$ref": "#/components/schemas/V1Backup" } }, - "physical_backup_data": { "$ref": "#/components/schemas/V1PhysicalBackup" } + "backups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "is_physical_backup": { "type": "boolean" }, + "status": { + "type": "string", + "enum": ["COMPLETED", "FAILED", "PENDING", "REMOVED", "ARCHIVED", "CANCELLED"] + }, + "inserted_at": { "type": "string" } + }, + "required": ["is_physical_backup", "status", "inserted_at"] + } + }, + "physical_backup_data": { + "type": "object", + "properties": { + "earliest_physical_backup_date_unix": { "type": "integer" }, + "latest_physical_backup_date_unix": { "type": "integer" } + } + } }, "required": ["region", "walg_enabled", "pitr_enabled", "backups", "physical_backup_data"] }, @@ -4913,6 +7397,24 @@ }, "required": ["recovery_time_target_unix"] }, + "V1RestorePointPostBody": { + "type": "object", + "properties": { "name": { "type": "string", "maxLength": 20 } }, + "required": ["name"] + }, + "V1RestorePointResponse": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "status": { "type": "string", "enum": ["AVAILABLE", "PENDING", "REMOVED"] } + }, + "required": ["name", "status"] + }, + "V1UndoBody": { + "type": "object", + "properties": { "name": { "type": "string", "maxLength": 20 } }, + "required": ["name"] + }, "V1OrganizationMemberResponse": { "type": "object", "properties": { @@ -4924,23 +7426,106 @@ }, "required": ["user_id", "user_name", "role_name", "mfa_enabled"] }, - "BillingPlanId": { "type": "string", "enum": ["free", "pro", "team", "enterprise"] }, "V1OrganizationSlugResponse": { "type": "object", "properties": { - "plan": { "$ref": "#/components/schemas/BillingPlanId" }, + "id": { "type": "string" }, + "name": { "type": "string" }, + "plan": { "type": "string", "enum": ["free", "pro", "team", "enterprise"] }, "opt_in_tags": { "type": "array", - "items": { "type": "string", "enum": ["AI_SQL_GENERATOR_OPT_IN"] } + "items": { + "type": "string", + "enum": [ + "AI_SQL_GENERATOR_OPT_IN", + "AI_DATA_GENERATOR_OPT_IN", + "AI_LOG_GENERATOR_OPT_IN" + ] + } }, "allowed_release_channels": { "type": "array", - "items": { "$ref": "#/components/schemas/ReleaseChannel" } + "items": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + } + } + }, + "required": ["id", "name", "opt_in_tags", "allowed_release_channels"] + }, + "OrganizationProjectClaimResponse": { + "type": "object", + "properties": { + "project": { + "type": "object", + "properties": { "ref": { "type": "string" }, "name": { "type": "string" } }, + "required": ["ref", "name"] }, - "id": { "type": "string" }, - "name": { "type": "string" } + "preview": { + "type": "object", + "properties": { + "valid": { "type": "boolean" }, + "warnings": { + "type": "array", + "items": { + "type": "object", + "properties": { "key": { "type": "string" }, "message": { "type": "string" } }, + "required": ["key", "message"] + } + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { "key": { "type": "string" }, "message": { "type": "string" } }, + "required": ["key", "message"] + } + }, + "info": { + "type": "array", + "items": { + "type": "object", + "properties": { "key": { "type": "string" }, "message": { "type": "string" } }, + "required": ["key", "message"] + } + }, + "members_exceeding_free_project_limit": { + "type": "array", + "items": { + "type": "object", + "properties": { "name": { "type": "string" }, "limit": { "type": "number" } }, + "required": ["name", "limit"] + } + }, + "target_organization_eligible": { "type": "boolean", "nullable": true }, + "target_organization_has_free_project_slots": { "type": "boolean", "nullable": true }, + "source_subscription_plan": { + "type": "string", + "enum": ["free", "pro", "team", "enterprise"] + }, + "target_subscription_plan": { + "type": "string", + "enum": ["free", "pro", "team", "enterprise"], + "nullable": true + } + }, + "required": [ + "valid", + "warnings", + "errors", + "info", + "members_exceeding_free_project_limit", + "target_organization_eligible", + "target_organization_has_free_project_slots", + "source_subscription_plan", + "target_subscription_plan" + ] + }, + "expires_at": { "type": "string" }, + "created_at": { "type": "string" }, + "created_by": { "type": "string", "format": "uuid" } }, - "required": ["opt_in_tags", "allowed_release_channels", "id", "name"] + "required": ["project", "preview", "expires_at", "created_at", "created_by"] } } } diff --git a/apps/docs/spec/common-api-sections.json b/apps/docs/spec/common-api-sections.json index 49207e11edf3d..786f35b76f6f5 100644 --- a/apps/docs/spec/common-api-sections.json +++ b/apps/docs/spec/common-api-sections.json @@ -5,6 +5,48 @@ "slug": "introduction", "type": "markdown" }, + { + "type": "category", + "title": "Advisors", + "items": [ + { + "id": "v1-get-performance-advisors", + "title": "Get performance advisors", + "slug": "v1-get-performance-advisors", + "type": "operation" + }, + { + "id": "v1-get-security-advisors", + "title": "Get security advisors", + "slug": "v1-get-security-advisors", + "type": "operation" + } + ] + }, + { + "type": "category", + "title": "Analytics", + "items": [ + { + "id": "v1-get-project-logs", + "title": "Get project logs", + "slug": "v1-get-project-logs", + "type": "operation" + }, + { + "id": "v1-get-project-usage-api-count", + "title": "Get project usage api count", + "slug": "v1-get-project-usage-api-count", + "type": "operation" + }, + { + "id": "v1-get-project-usage-request-count", + "title": "Get project usage request count", + "slug": "v1-get-project-usage-request-count", + "type": "operation" + } + ] + }, { "type": "category", "title": "Auth", @@ -15,12 +57,36 @@ "slug": "v1-create-a-sso-provider", "type": "operation" }, + { + "id": "v1-create-legacy-signing-key", + "title": "Create legacy signing key", + "slug": "v1-create-legacy-signing-key", + "type": "operation" + }, + { + "id": "v1-create-project-signing-key", + "title": "Create project signing key", + "slug": "v1-create-project-signing-key", + "type": "operation" + }, + { + "id": "v1-create-project-tpa-integration", + "title": "Create project tpa integration", + "slug": "v1-create-project-tpa-integration", + "type": "operation" + }, { "id": "v1-delete-a-sso-provider", "title": "Delete a sso provider", "slug": "v1-delete-a-sso-provider", "type": "operation" }, + { + "id": "v1-delete-project-tpa-integration", + "title": "Delete project tpa integration", + "slug": "v1-delete-project-tpa-integration", + "type": "operation" + }, { "id": "v1-get-a-sso-provider", "title": "Get a sso provider", @@ -33,12 +99,48 @@ "slug": "v1-get-auth-service-config", "type": "operation" }, + { + "id": "v1-get-legacy-signing-key", + "title": "Get legacy signing key", + "slug": "v1-get-legacy-signing-key", + "type": "operation" + }, + { + "id": "v1-get-project-signing-key", + "title": "Get project signing key", + "slug": "v1-get-project-signing-key", + "type": "operation" + }, + { + "id": "v1-get-project-signing-keys", + "title": "Get project signing keys", + "slug": "v1-get-project-signing-keys", + "type": "operation" + }, + { + "id": "v1-get-project-tpa-integration", + "title": "Get project tpa integration", + "slug": "v1-get-project-tpa-integration", + "type": "operation" + }, { "id": "v1-list-all-sso-provider", "title": "List all sso provider", "slug": "v1-list-all-sso-provider", "type": "operation" }, + { + "id": "v1-list-project-tpa-integrations", + "title": "List project tpa integrations", + "slug": "v1-list-project-tpa-integrations", + "type": "operation" + }, + { + "id": "v1-remove-project-signing-key", + "title": "Remove project signing key", + "slug": "v1-remove-project-signing-key", + "type": "operation" + }, { "id": "v1-update-a-sso-provider", "title": "Update a sso provider", @@ -50,6 +152,36 @@ "title": "Update auth service config", "slug": "v1-update-auth-service-config", "type": "operation" + }, + { + "id": "v1-update-project-signing-key", + "title": "Update project signing key", + "slug": "v1-update-project-signing-key", + "type": "operation" + } + ] + }, + { + "type": "category", + "title": "Billing", + "items": [ + { + "id": "v1-apply-project-addon", + "title": "Apply project addon", + "slug": "v1-apply-project-addon", + "type": "operation" + }, + { + "id": "v1-list-project-addons", + "title": "List project addons", + "slug": "v1-list-project-addons", + "type": "operation" + }, + { + "id": "v1-remove-project-addon", + "title": "Remove project addon", + "slug": "v1-remove-project-addon", + "type": "operation" } ] }, @@ -57,6 +189,24 @@ "type": "category", "title": "Database", "items": [ + { + "id": "v1-apply-a-migration", + "title": "Apply a migration", + "slug": "v1-apply-a-migration", + "type": "operation" + }, + { + "id": "v1-create-restore-point", + "title": "Create restore point", + "slug": "v1-create-restore-point", + "type": "operation" + }, + { + "id": "v1-delete-jit-access", + "title": "Delete jit access", + "slug": "v1-delete-jit-access", + "type": "operation" + }, { "id": "v1-disable-readonly-mode-temporarily", "title": "Disable readonly mode temporarily", @@ -81,6 +231,24 @@ "slug": "v1-get-a-snippet", "type": "operation" }, + { + "id": "v1-get-database-metadata", + "title": "Get database metadata", + "slug": "v1-get-database-metadata", + "type": "operation" + }, + { + "id": "v1-get-jit-access", + "title": "Get jit access", + "slug": "v1-get-jit-access", + "type": "operation" + }, + { + "id": "v1-get-pooler-config", + "title": "Get pooler config", + "slug": "v1-get-pooler-config", + "type": "operation" + }, { "id": "v1-get-postgres-config", "title": "Get postgres config", @@ -100,15 +268,15 @@ "type": "operation" }, { - "id": "v1-get-ssl-enforcement-config", - "title": "Get ssl enforcement config", - "slug": "v1-get-ssl-enforcement-config", + "id": "v1-get-restore-point", + "title": "Get restore point", + "slug": "v1-get-restore-point", "type": "operation" }, { - "id": "v1-get-supavisor-config", - "title": "Get supavisor config", - "slug": "v1-get-supavisor-config", + "id": "v1-get-ssl-enforcement-config", + "title": "Get ssl enforcement config", + "slug": "v1-get-ssl-enforcement-config", "type": "operation" }, { @@ -123,6 +291,18 @@ "slug": "v1-list-all-snippets", "type": "operation" }, + { + "id": "v1-list-jit-access", + "title": "List jit access", + "slug": "v1-list-jit-access", + "type": "operation" + }, + { + "id": "v1-list-migration-history", + "title": "List migration history", + "slug": "v1-list-migration-history", + "type": "operation" + }, { "id": "v1-remove-a-read-replica", "title": "Remove a read replica", @@ -147,6 +327,24 @@ "slug": "v1-setup-a-read-replica", "type": "operation" }, + { + "id": "v1-undo", + "title": "Undo", + "slug": "v1-undo", + "type": "operation" + }, + { + "id": "v1-update-jit-access", + "title": "Update jit access", + "slug": "v1-update-jit-access", + "type": "operation" + }, + { + "id": "v1-update-pooler-config", + "title": "Update pooler config", + "slug": "v1-update-pooler-config", + "type": "operation" + }, { "id": "v1-update-postgres-config", "title": "Update postgres config", @@ -160,9 +358,9 @@ "type": "operation" }, { - "id": "v1-update-supavisor-config", - "title": "Update supavisor config", - "slug": "v1-update-supavisor-config", + "id": "v1-upsert-a-migration", + "title": "Upsert a migration", + "slug": "v1-upsert-a-migration", "type": "operation" } ] @@ -291,12 +489,24 @@ "slug": "v1-delete-a-branch", "type": "operation" }, + { + "id": "v1-diff-a-branch", + "title": "Diff a branch", + "slug": "v1-diff-a-branch", + "type": "operation" + }, { "id": "v1-disable-preview-branching", "title": "Disable preview branching", "slug": "v1-disable-preview-branching", "type": "operation" }, + { + "id": "v1-get-a-branch", + "title": "Get a branch", + "slug": "v1-get-a-branch", + "type": "operation" + }, { "id": "v1-get-a-branch-config", "title": "Get a branch config", @@ -309,6 +519,12 @@ "slug": "v1-list-all-branches", "type": "operation" }, + { + "id": "v1-merge-a-branch", + "title": "Merge a branch", + "slug": "v1-merge-a-branch", + "type": "operation" + }, { "id": "v1-push-a-branch", "title": "Push a branch", @@ -345,6 +561,12 @@ "slug": "v1-exchange-oauth-token", "type": "operation" }, + { + "id": "v1-oauth-authorize-project-claim", + "title": "Oauth authorize project claim", + "slug": "v1-oauth-authorize-project-claim", + "type": "operation" + }, { "id": "v1-revoke-token", "title": "Revoke token", @@ -357,6 +579,12 @@ "type": "category", "title": "Organizations", "items": [ + { + "id": "v1-claim-project-for-organization", + "title": "Claim project for organization", + "slug": "v1-claim-project-for-organization", + "type": "operation" + }, { "id": "v1-create-an-organization", "title": "Create an organization", @@ -369,6 +597,12 @@ "slug": "v1-get-an-organization", "type": "operation" }, + { + "id": "v1-get-organization-project-claim", + "title": "Get organization project claim", + "slug": "v1-get-organization-project-claim", + "type": "operation" + }, { "id": "v1-list-all-organizations", "title": "List all organizations", @@ -399,6 +633,12 @@ "slug": "v1-create-a-project", "type": "operation" }, + { + "id": "v1-create-project-claim-token", + "title": "Create project claim token", + "slug": "v1-create-project-claim-token", + "type": "operation" + }, { "id": "v1-delete-a-project", "title": "Delete a project", @@ -411,6 +651,12 @@ "slug": "v1-delete-network-bans", "type": "operation" }, + { + "id": "v1-delete-project-claim-token", + "title": "Delete project claim token", + "slug": "v1-delete-project-claim-token", + "type": "operation" + }, { "id": "v1-get-network-restrictions", "title": "Get network restrictions", @@ -435,6 +681,12 @@ "slug": "v1-get-project", "type": "operation" }, + { + "id": "v1-get-project-claim-token", + "title": "Get project claim token", + "slug": "v1-get-project-claim-token", + "type": "operation" + }, { "id": "v1-get-services-health", "title": "Get services health", @@ -447,6 +699,12 @@ "slug": "v1-list-all-network-bans", "type": "operation" }, + { + "id": "v1-list-all-network-bans-enriched", + "title": "List all network bans enriched", + "slug": "v1-list-all-network-bans-enriched", + "type": "operation" + }, { "id": "v1-list-all-projects", "title": "List all projects", @@ -519,18 +777,42 @@ "slug": "v1-bulk-delete-secrets", "type": "operation" }, + { + "id": "v1-create-project-api-key", + "title": "Create project api key", + "slug": "v1-create-project-api-key", + "type": "operation" + }, + { + "id": "v1-delete-project-api-key", + "title": "Delete project api key", + "slug": "v1-delete-project-api-key", + "type": "operation" + }, { "id": "v1-get-pgsodium-config", "title": "Get pgsodium config", "slug": "v1-get-pgsodium-config", "type": "operation" }, + { + "id": "v1-get-project-api-key", + "title": "Get project api key", + "slug": "v1-get-project-api-key", + "type": "operation" + }, { "id": "v1-get-project-api-keys", "title": "Get project api keys", "slug": "v1-get-project-api-keys", "type": "operation" }, + { + "id": "v1-get-project-legacy-api-keys", + "title": "Get project legacy api keys", + "slug": "v1-get-project-legacy-api-keys", + "type": "operation" + }, { "id": "v1-list-all-secrets", "title": "List all secrets", @@ -542,6 +824,18 @@ "title": "Update pgsodium config", "slug": "v1-update-pgsodium-config", "type": "operation" + }, + { + "id": "v1-update-project-api-key", + "title": "Update project api key", + "slug": "v1-update-project-api-key", + "type": "operation" + }, + { + "id": "v1-update-project-legacy-api-keys", + "title": "Update project legacy api keys", + "slug": "v1-update-project-legacy-api-keys", + "type": "operation" } ] }, diff --git a/apps/docs/spec/supabase_swift_v2.yml b/apps/docs/spec/supabase_swift_v2.yml index 45768e4754b87..4c83fb45c7350 100644 --- a/apps/docs/spec/supabase_swift_v2.yml +++ b/apps/docs/spec/supabase_swift_v2.yml @@ -26,7 +26,7 @@ functions: code: | ```swift import Supabase - + let client = SupabaseClient(supabaseURL: URL(string: "https://xyzcompany.supabase.co")!, supabaseKey: "public-anon-key") ``` - id: initialize-client-custom-options @@ -34,7 +34,7 @@ functions: code: | ```swift import Supabase - + let client = SupabaseClient( supabaseURL: URL(string: "https://xyzcompany.supabase.co")!, supabaseKey: "public-anon-key", @@ -58,7 +58,7 @@ functions: code: | ```swift import Supabase - + struct AppLogger: SupabaseLogger { func log(message: SupabaseLogMessage) { print(message.description) @@ -80,7 +80,7 @@ functions: code: | ```swift import Supabase - + let supabase = SupabaseClient( supabaseURL: URL(string: "https://xyzcompany.supabase.co")!, supabaseKey: "public-anon-key", diff --git a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json index 26c772546aaf8..85923f5a85814 100644 --- a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json +++ b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json @@ -8,10 +8,22 @@ }, "servers": [], "tags": [ + { + "name": "Advisors", + "description": "Advisors related endpoints" + }, + { + "name": "Analytics", + "description": "Analytics related endpoints" + }, { "name": "Auth", "description": "Auth related endpoints" }, + { + "name": "Billing", + "description": "Billing related endpoints" + }, { "name": "Database", "description": "Database related endpoints" @@ -66,6 +78,7 @@ "in": "path", "description": "Branch ID", "schema": { + "format": "uuid", "type": "string" } } @@ -78,6 +91,18 @@ "schema": { "type": "object", "properties": { + "ref": { + "type": "string" + }, + "postgres_version": { + "type": "string" + }, + "postgres_engine": { + "type": "string" + }, + "release_channel": { + "type": "string" + }, "status": { "type": "string", "enum": [ @@ -98,24 +123,14 @@ "RESIZING" ] }, - "db_port": { - "type": "integer" - }, - "ref": { - "type": "string" - }, - "postgres_version": { - "type": "string" - }, - "postgres_engine": { - "type": "string" - }, - "release_channel": { - "type": "string" - }, "db_host": { "type": "string" }, + "db_port": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, "db_user": { "type": "string" }, @@ -127,13 +142,13 @@ } }, "required": [ - "status", - "db_port", "ref", "postgres_version", "postgres_engine", "release_channel", - "db_host" + "status", + "db_host", + "db_port" ] } } @@ -161,6 +176,7 @@ "in": "path", "description": "Branch ID", "schema": { + "format": "uuid", "type": "string" } } @@ -172,17 +188,17 @@ "schema": { "type": "object", "properties": { - "reset_on_push": { - "type": "boolean", - "deprecated": true, - "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead." - }, "branch_name": { "type": "string" }, "git_branch": { "type": "string" }, + "reset_on_push": { + "type": "boolean", + "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead.", + "deprecated": true + }, "persistent": { "type": "boolean" }, @@ -196,6 +212,9 @@ "FUNCTIONS_DEPLOYED", "FUNCTIONS_FAILED" ] + }, + "request_review": { + "type": "boolean" } } } @@ -210,28 +229,9 @@ "schema": { "type": "object", "properties": { - "pr_number": { - "type": "integer", - "format": "int32" - }, - "latest_check_run_id": { - "type": "number", - "deprecated": true, - "description": "This field is deprecated and will not be populated." - }, - "status": { - "type": "string", - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ] - }, "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "name": { "type": "string" @@ -248,24 +248,50 @@ "git_branch": { "type": "string" }, + "pr_number": { + "type": "integer", + "format": "int32" + }, + "latest_check_run_id": { + "type": "number", + "description": "This field is deprecated and will not be populated.", + "deprecated": true + }, "persistent": { "type": "boolean" }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ] + }, "created_at": { - "type": "string" + "type": "string", + "format": "date-time" }, "updated_at": { - "type": "string" + "type": "string", + "format": "date-time" + }, + "review_requested_at": { + "type": "string", + "format": "date-time" } }, "required": [ - "status", "id", "name", "project_ref", "parent_project_ref", "is_default", "persistent", + "status", "created_at", "updated_at" ] @@ -295,6 +321,7 @@ "in": "path", "description": "Branch ID", "schema": { + "format": "uuid", "type": "string" } } @@ -308,7 +335,8 @@ "type": "object", "properties": { "message": { - "type": "string" + "type": "string", + "enum": ["ok"] } }, "required": ["message"] @@ -340,10 +368,26 @@ "in": "path", "description": "Branch ID", "schema": { + "format": "uuid", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "migration_version": { + "type": "string" + } + } + } + } + } + }, "responses": { "201": { "description": "", @@ -356,7 +400,8 @@ "type": "string" }, "message": { - "type": "string" + "type": "string", + "enum": ["ok"] } }, "required": ["workflow_run_id", "message"] @@ -376,6 +421,71 @@ ] } }, + "/v1/branches/{branch_id}/merge": { + "post": { + "operationId": "v1-merge-a-branch", + "summary": "Merges a database branch", + "description": "Merges the specified database branch", + "parameters": [ + { + "name": "branch_id", + "required": true, + "in": "path", + "description": "Branch ID", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "migration_version": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "workflow_run_id": { + "type": "string" + }, + "message": { + "type": "string", + "enum": ["ok"] + } + }, + "required": ["workflow_run_id", "message"] + } + } + } + }, + "500": { + "description": "Failed to merge database branch" + } + }, + "tags": ["Environments"], + "security": [ + { + "bearer": [] + } + ] + } + }, "/v1/branches/{branch_id}/reset": { "post": { "operationId": "v1-reset-a-branch", @@ -388,10 +498,26 @@ "in": "path", "description": "Branch ID", "schema": { + "format": "uuid", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "migration_version": { + "type": "string" + } + } + } + } + } + }, "responses": { "201": { "description": "", @@ -404,7 +530,8 @@ "type": "string" }, "message": { - "type": "string" + "type": "string", + "enum": ["ok"] } }, "required": ["workflow_run_id", "message"] @@ -424,6 +551,54 @@ ] } }, + "/v1/branches/{branch_id}/diff": { + "get": { + "operationId": "v1-diff-a-branch", + "summary": "[Beta] Diffs a database branch", + "description": "Diffs the specified database branch", + "parameters": [ + { + "name": "branch_id", + "required": true, + "in": "path", + "description": "Branch ID", + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "name": "included_schemas", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "" + }, + "500": { + "description": "Failed to diff database branch" + } + }, + "tags": ["Environments"], + "security": [ + { + "bearer": [] + } + ] + } + }, "/v1/projects": { "get": { "operationId": "v1-list-all-projects", @@ -544,6 +719,7 @@ }, "name": { "type": "string", + "maxLength": 256, "description": "Name of your project" }, "organization_id": { @@ -588,6 +764,8 @@ "desired_instance_size": { "type": "string", "enum": [ + "pico", + "nano", "micro", "small", "medium", @@ -597,7 +775,15 @@ "4xlarge", "8xlarge", "12xlarge", - "16xlarge" + "16xlarge", + "24xlarge", + "24xlarge_optimized_memory", + "24xlarge_optimized_cpu", + "24xlarge_high_memory", + "48xlarge", + "48xlarge_optimized_memory", + "48xlarge_optimized_cpu", + "48xlarge_high_memory" ] }, "template_url": { @@ -782,6 +968,7 @@ "required": true, "in": "query", "schema": { + "format": "uuid", "type": "string" } }, @@ -842,10 +1029,30 @@ "enum": ["plain", "sha256", "S256"], "type": "string" } + }, + { + "name": "organization_slug", + "required": false, + "in": "query", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "type": "string" + } + }, + { + "name": "resource", + "required": false, + "in": "query", + "description": "Resource indicator for MCP (Model Context Protocol) clients", + "schema": { + "enum": ["https://api.supabase.io/mcp"], + "type": "string" + } } ], "responses": { - "303": { + "204": { "description": "" } }, @@ -870,11 +1077,12 @@ "type": "object", "properties": { "grant_type": { - "enum": ["authorization_code", "refresh_token"], - "type": "string" + "type": "string", + "enum": ["authorization_code", "refresh_token"] }, "client_id": { - "type": "string" + "type": "string", + "format": "uuid" }, "client_secret": { "type": "string" @@ -890,9 +1098,14 @@ }, "refresh_token": { "type": "string" + }, + "resource": { + "type": "string", + "enum": ["https://api.supabase.io/mcp"], + "description": "Resource indicator for MCP (Model Context Protocol) clients" } }, - "required": ["grant_type", "client_id", "client_secret"] + "additionalProperties": false } } } @@ -905,22 +1118,22 @@ "schema": { "type": "object", "properties": { - "expires_in": { - "type": "integer", - "format": "int64" - }, - "token_type": { - "type": "string", - "enum": ["Bearer"] - }, "access_token": { "type": "string" }, "refresh_token": { "type": "string" + }, + "expires_in": { + "type": "integer" + }, + "token_type": { + "type": "string", + "enum": ["Bearer"] } }, - "required": ["expires_in", "token_type", "access_token", "refresh_token"] + "required": ["access_token", "refresh_token", "expires_in", "token_type"], + "additionalProperties": false } } } @@ -976,11 +1189,115 @@ ] } }, + "/v1/oauth/authorize/project-claim": { + "get": { + "operationId": "v1-oauth-authorize-project-claim", + "x-internal": true, + "summary": "Authorize user through oauth and claim a project", + "description": "Initiates the OAuth authorization flow for the specified provider. After successful authentication, the user can claim ownership of the specified project.", + "parameters": [ + { + "name": "project_ref", + "required": true, + "in": "query", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "client_id", + "required": true, + "in": "query", + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "name": "response_type", + "required": true, + "in": "query", + "schema": { + "enum": ["code", "token", "id_token token"], + "type": "string" + } + }, + { + "name": "redirect_uri", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "state", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "response_mode", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "code_challenge", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "code_challenge_method", + "required": false, + "in": "query", + "schema": { + "enum": ["plain", "sha256", "S256"], + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "" + } + }, + "tags": ["OAuth"], + "security": [ + { + "bearer": [] + } + ] + } + }, "/v1/snippets": { "get": { "operationId": "v1-list-all-snippets", "summary": "Lists SQL snippets for the logged in user", "parameters": [ + { + "name": "project_ref", + "required": false, + "in": "query", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, { "name": "cursor", "required": false, @@ -1016,14 +1333,6 @@ "enum": ["asc", "desc"], "type": "string" } - }, - { - "name": "project_ref", - "required": false, - "in": "query", - "schema": { - "type": "string" - } } ], "responses": { @@ -1067,8 +1376,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "name": { "type": "string" @@ -1080,8 +1388,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -1093,8 +1400,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -1175,8 +1481,8 @@ "enum": ["sql"] }, "visibility": { - "enum": ["user", "project", "org", "public"], - "type": "string" + "type": "string", + "enum": ["user", "project", "org", "public"] }, "name": { "type": "string" @@ -1189,8 +1495,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "name": { "type": "string" @@ -1202,8 +1507,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -1215,8 +1519,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -1282,13 +1585,15 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, { "name": "reveal", - "required": true, + "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "type": "boolean" } @@ -1304,25 +1609,26 @@ "items": { "type": "object", "properties": { - "type": { - "nullable": true, - "type": "string", - "enum": ["publishable", "secret", "legacy"] - }, - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", "nullable": true }, + "type": { + "type": "string", + "enum": ["legacy", "publishable", "secret"], + "nullable": true + }, "prefix": { "type": "string", "nullable": true }, + "name": { + "type": "string" + }, "description": { "type": "string", "nullable": true @@ -1332,33 +1638,29 @@ "nullable": true }, "secret_jwt_template": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - } - }, - "required": ["role"] - } - ] + "type": "object", + "additionalProperties": {}, + "nullable": true }, "inserted_at": { "type": "string", + "format": "date-time", "nullable": true }, "updated_at": { "type": "string", + "format": "date-time", "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] } } } } + }, + "403": { + "description": "" } }, "tags": ["Secrets"], @@ -1369,8 +1671,8 @@ ] }, "post": { - "operationId": "createApiKey", - "summary": "[Alpha] Creates a new API key for the project", + "operationId": "v1-create-project-api-key", + "summary": "Creates a new API key for the project", "parameters": [ { "name": "ref", @@ -1380,13 +1682,15 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, { "name": "reveal", - "required": true, + "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "type": "boolean" } @@ -1400,29 +1704,26 @@ "type": "object", "properties": { "type": { - "enum": ["publishable", "secret"], - "type": "string" + "type": "string", + "enum": ["publishable", "secret"] + }, + "name": { + "type": "string", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z_][a-z0-9_]+$" }, "description": { "type": "string", "nullable": true }, "secret_jwt_template": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - } - }, - "required": ["role"] - } - ] + "type": "object", + "additionalProperties": {}, + "nullable": true } }, - "required": ["type"] + "required": ["type", "name"] } } } @@ -1435,25 +1736,26 @@ "schema": { "type": "object", "properties": { - "type": { - "nullable": true, - "type": "string", - "enum": ["publishable", "secret", "legacy"] - }, - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", "nullable": true }, + "type": { + "type": "string", + "enum": ["legacy", "publishable", "secret"], + "nullable": true + }, "prefix": { "type": "string", "nullable": true }, + "name": { + "type": "string" + }, "description": { "type": "string", "nullable": true @@ -1463,32 +1765,28 @@ "nullable": true }, "secret_jwt_template": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - } - }, - "required": ["role"] - } - ] + "type": "object", + "additionalProperties": {}, + "nullable": true }, "inserted_at": { "type": "string", + "format": "date-time", "nullable": true }, "updated_at": { "type": "string", + "format": "date-time", "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] } } } + }, + "403": { + "description": "" } }, "tags": ["Secrets"], @@ -1499,10 +1797,10 @@ ] } }, - "/v1/projects/{ref}/api-keys/{id}": { - "patch": { - "operationId": "updateApiKey", - "summary": "[Alpha] Updates an API key for the project", + "/v1/projects/{ref}/api-keys/legacy": { + "get": { + "operationId": "v1-get-project-legacy-api-keys", + "summary": "Check whether JWT based legacy (anon, service_role) API keys are enabled. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", "parameters": [ { "name": "ref", @@ -1512,50 +1810,151 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + } + } + } }, + "403": { + "description": "" + } + }, + "tags": ["Secrets"], + "security": [ { - "name": "id", + "bearer": [] + } + ] + }, + "put": { + "operationId": "v1-update-project-legacy-api-keys", + "summary": "Disable or re-enable JWT based legacy (anon, service_role) API keys. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", + "parameters": [ + { + "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, { - "name": "reveal", + "name": "enabled", "required": true, "in": "query", + "description": "Boolean string, true or false", "schema": { "type": "boolean" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "description": { - "type": "string", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Secrets"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/api-keys/{id}": { + "patch": { + "operationId": "v1-update-project-api-key", + "summary": "Updates an API key for the project", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "name": "reveal", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z_][a-z0-9_]+$" + }, + "description": { + "type": "string", "nullable": true }, "secret_jwt_template": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - } - }, - "required": ["role"] - } - ] + "type": "object", + "additionalProperties": {}, + "nullable": true } } } @@ -1570,25 +1969,26 @@ "schema": { "type": "object", "properties": { - "type": { - "nullable": true, - "type": "string", - "enum": ["publishable", "secret", "legacy"] - }, - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", "nullable": true }, + "type": { + "type": "string", + "enum": ["legacy", "publishable", "secret"], + "nullable": true + }, "prefix": { "type": "string", "nullable": true }, + "name": { + "type": "string" + }, "description": { "type": "string", "nullable": true @@ -1598,32 +1998,28 @@ "nullable": true }, "secret_jwt_template": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - } - }, - "required": ["role"] - } - ] + "type": "object", + "additionalProperties": {}, + "nullable": true }, "inserted_at": { "type": "string", + "format": "date-time", "nullable": true }, "updated_at": { "type": "string", + "format": "date-time", "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] } } } + }, + "403": { + "description": "" } }, "tags": ["Secrets"], @@ -1634,8 +2030,8 @@ ] }, "get": { - "operationId": "getApiKey", - "summary": "[Alpha] Get API key", + "operationId": "v1-get-project-api-key", + "summary": "Get API key", "parameters": [ { "name": "ref", @@ -1645,6 +2041,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -1653,13 +2050,15 @@ "required": true, "in": "path", "schema": { + "format": "uuid", "type": "string" } }, { "name": "reveal", - "required": true, + "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "type": "boolean" } @@ -1673,25 +2072,26 @@ "schema": { "type": "object", "properties": { - "type": { - "nullable": true, - "type": "string", - "enum": ["publishable", "secret", "legacy"] - }, - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", "nullable": true }, + "type": { + "type": "string", + "enum": ["legacy", "publishable", "secret"], + "nullable": true + }, "prefix": { "type": "string", "nullable": true }, + "name": { + "type": "string" + }, "description": { "type": "string", "nullable": true @@ -1701,32 +2101,28 @@ "nullable": true }, "secret_jwt_template": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - } - }, - "required": ["role"] - } - ] + "type": "object", + "additionalProperties": {}, + "nullable": true }, "inserted_at": { "type": "string", + "format": "date-time", "nullable": true }, "updated_at": { "type": "string", + "format": "date-time", "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] } } } + }, + "403": { + "description": "" } }, "tags": ["Secrets"], @@ -1737,8 +2133,8 @@ ] }, "delete": { - "operationId": "deleteApiKey", - "summary": "[Alpha] Deletes an API key for the project", + "operationId": "v1-delete-project-api-key", + "summary": "Deletes an API key for the project", "parameters": [ { "name": "ref", @@ -1748,6 +2144,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -1756,16 +2153,35 @@ "required": true, "in": "path", "schema": { + "format": "uuid", "type": "string" } }, { "name": "reveal", - "required": true, + "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "type": "boolean" } + }, + { + "name": "was_compromised", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { + "type": "boolean" + } + }, + { + "name": "reason", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -1776,25 +2192,26 @@ "schema": { "type": "object", "properties": { - "type": { - "nullable": true, - "type": "string", - "enum": ["publishable", "secret", "legacy"] - }, - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", "nullable": true }, + "type": { + "type": "string", + "enum": ["legacy", "publishable", "secret"], + "nullable": true + }, "prefix": { "type": "string", "nullable": true }, + "name": { + "type": "string" + }, "description": { "type": "string", "nullable": true @@ -1804,29 +2221,22 @@ "nullable": true }, "secret_jwt_template": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - } - }, - "required": ["role"] - } - ] + "type": "object", + "additionalProperties": {}, + "nullable": true }, "inserted_at": { "type": "string", + "format": "date-time", "nullable": true }, "updated_at": { "type": "string", + "format": "date-time", "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] } } } @@ -1857,6 +2267,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -1871,28 +2282,9 @@ "items": { "type": "object", "properties": { - "pr_number": { - "type": "integer", - "format": "int32" - }, - "latest_check_run_id": { - "type": "number", - "deprecated": true, - "description": "This field is deprecated and will not be populated." - }, - "status": { - "type": "string", - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ] - }, "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "name": { "type": "string" @@ -1909,24 +2301,50 @@ "git_branch": { "type": "string" }, + "pr_number": { + "type": "integer", + "format": "int32" + }, + "latest_check_run_id": { + "type": "number", + "description": "This field is deprecated and will not be populated.", + "deprecated": true + }, "persistent": { "type": "boolean" }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ] + }, "created_at": { - "type": "string" + "type": "string", + "format": "date-time" }, "updated_at": { - "type": "string" + "type": "string", + "format": "date-time" + }, + "review_requested_at": { + "type": "string", + "format": "date-time" } }, "required": [ - "status", "id", "name", "project_ref", "parent_project_ref", "is_default", "persistent", + "status", "created_at", "updated_at" ] @@ -1935,6 +2353,9 @@ } } }, + "403": { + "description": "" + }, "500": { "description": "Failed to retrieve database branches" } @@ -1959,6 +2380,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -1970,41 +2392,65 @@ "schema": { "type": "object", "properties": { - "desired_instance_size": { + "branch_name": { "type": "string", - "enum": [ - "micro", - "small", - "medium", - "large", - "xlarge", - "2xlarge", - "4xlarge", - "8xlarge", - "12xlarge", - "16xlarge" - ] - }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "postgres_engine": { - "type": "string", - "description": "Postgres engine version. If not provided, the latest version will be used.", - "enum": ["15", "17-oriole"] - }, - "branch_name": { - "type": "string" + "minLength": 1 }, "git_branch": { "type": "string" }, + "is_default": { + "type": "boolean" + }, "persistent": { "type": "boolean" }, "region": { "type": "string" + }, + "desired_instance_size": { + "type": "string", + "enum": [ + "pico", + "nano", + "micro", + "small", + "medium", + "large", + "xlarge", + "2xlarge", + "4xlarge", + "8xlarge", + "12xlarge", + "16xlarge", + "24xlarge", + "24xlarge_optimized_memory", + "24xlarge_optimized_cpu", + "24xlarge_high_memory", + "48xlarge", + "48xlarge_optimized_memory", + "48xlarge_optimized_cpu", + "48xlarge_high_memory" + ] + }, + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"], + "description": "Release channel. If not provided, GA will be used." + }, + "postgres_engine": { + "type": "string", + "enum": ["15", "17", "17-oriole"], + "description": "Postgres engine version. If not provided, the latest version will be used." + }, + "secrets": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "with_data": { + "type": "boolean" } }, "required": ["branch_name"] @@ -2020,28 +2466,9 @@ "schema": { "type": "object", "properties": { - "pr_number": { - "type": "integer", - "format": "int32" - }, - "latest_check_run_id": { - "type": "number", - "deprecated": true, - "description": "This field is deprecated and will not be populated." - }, - "status": { - "type": "string", - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ] - }, "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "name": { "type": "string" @@ -2058,24 +2485,50 @@ "git_branch": { "type": "string" }, + "pr_number": { + "type": "integer", + "format": "int32" + }, + "latest_check_run_id": { + "type": "number", + "description": "This field is deprecated and will not be populated.", + "deprecated": true + }, "persistent": { "type": "boolean" }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ] + }, "created_at": { - "type": "string" + "type": "string", + "format": "date-time" }, "updated_at": { - "type": "string" + "type": "string", + "format": "date-time" + }, + "review_requested_at": { + "type": "string", + "format": "date-time" } }, "required": [ - "status", "id", "name", "project_ref", "parent_project_ref", "is_default", "persistent", + "status", "created_at", "updated_at" ] @@ -2083,6 +2536,9 @@ } } }, + "403": { + "description": "" + }, "500": { "description": "Failed to create database branch" } @@ -2107,6 +2563,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2115,6 +2572,9 @@ "200": { "description": "" }, + "403": { + "description": "" + }, "500": { "description": "Failed to disable preview branching" } @@ -2127,6 +2587,126 @@ ] } }, + "/v1/projects/{ref}/branches/{name}": { + "get": { + "operationId": "v1-get-a-branch", + "summary": "Get a database branch", + "description": "Fetches the specified database branch by its name.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "name", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "project_ref": { + "type": "string" + }, + "parent_project_ref": { + "type": "string" + }, + "is_default": { + "type": "boolean" + }, + "git_branch": { + "type": "string" + }, + "pr_number": { + "type": "integer", + "format": "int32" + }, + "latest_check_run_id": { + "type": "number", + "description": "This field is deprecated and will not be populated.", + "deprecated": true + }, + "persistent": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "review_requested_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "name", + "project_ref", + "parent_project_ref", + "is_default", + "persistent", + "status", + "created_at", + "updated_at" + ] + } + } + } + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to fetch database branch" + } + }, + "tags": ["Environments"], + "security": [ + { + "bearer": [] + } + ] + } + }, "/v1/projects/{ref}/custom-hostname": { "get": { "operationId": "v1-get-hostname-config", @@ -2140,6 +2720,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2153,14 +2734,14 @@ "type": "object", "properties": { "status": { + "type": "string", "enum": [ "1_not_started", "2_initiated", "3_challenge_verified", "4_origin_setup_completed", "5_services_reconfigured" - ], - "type": "string" + ] }, "custom_hostname": { "type": "string" @@ -2174,13 +2755,13 @@ "errors": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "messages": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "result": { @@ -2300,6 +2881,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2336,6 +2918,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2365,14 +2948,14 @@ "type": "object", "properties": { "status": { + "type": "string", "enum": [ "1_not_started", "2_initiated", "3_challenge_verified", "4_origin_setup_completed", "5_services_reconfigured" - ], - "type": "string" + ] }, "custom_hostname": { "type": "string" @@ -2386,13 +2969,13 @@ "errors": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "messages": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "result": { @@ -2514,6 +3097,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2527,14 +3111,14 @@ "type": "object", "properties": { "status": { + "type": "string", "enum": [ "1_not_started", "2_initiated", "3_challenge_verified", "4_origin_setup_completed", "5_services_reconfigured" - ], - "type": "string" + ] }, "custom_hostname": { "type": "string" @@ -2548,13 +3132,13 @@ "errors": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "messages": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "result": { @@ -2676,6 +3260,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2689,14 +3274,14 @@ "type": "object", "properties": { "status": { + "type": "string", "enum": [ "1_not_started", "2_initiated", "3_challenge_verified", "4_origin_setup_completed", "5_services_reconfigured" - ], - "type": "string" + ] }, "custom_hostname": { "type": "string" @@ -2710,13 +3295,13 @@ "errors": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "messages": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "result": { @@ -2838,6 +3423,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2877,10 +3463,10 @@ ] } }, - "/v1/projects/{ref}/network-bans": { - "delete": { - "operationId": "v1-delete-network-bans", - "summary": "[Beta] Remove network bans.", + "/v1/projects/{ref}/network-bans/retrieve/enriched": { + "post": { + "operationId": "v1-list-all-network-bans-enriched", + "summary": "[Beta] Gets project's network bans with additional information about which databases they affect", "parameters": [ { "name": "ref", @@ -2890,48 +3476,117 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ipv4_addresses": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["ipv4_addresses"] - } - } - } - }, "responses": { - "200": { - "description": "" - }, - "403": { - "description": "" - }, - "500": { - "description": "Failed to remove network bans." - } - }, - "tags": ["Projects"], - "security": [ - { - "bearer": [] - } - ] - } - }, + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "banned_ipv4_addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "banned_address": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": ["banned_address", "identifier", "type"] + } + } + }, + "required": ["banned_ipv4_addresses"] + } + } + } + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to retrieve project's enriched network bans" + } + }, + "tags": ["Projects"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/network-bans": { + "delete": { + "operationId": "v1-delete-network-bans", + "summary": "[Beta] Remove network bans.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ipv4_addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "identifier": { + "type": "string" + } + }, + "required": ["ipv4_addresses"] + } + } + } + }, + "responses": { + "200": { + "description": "" + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to remove network bans." + } + }, + "tags": ["Projects"], + "security": [ + { + "bearer": [] + } + ] + } + }, "/v1/projects/{ref}/network-restrictions": { "get": { "operationId": "v1-get-network-restrictions", @@ -2945,6 +3600,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2958,8 +3614,8 @@ "type": "object", "properties": { "entitlement": { - "enum": ["disallowed", "allowed"], - "type": "string" + "type": "string", + "enum": ["disallowed", "allowed"] }, "config": { "type": "object", @@ -2976,7 +3632,8 @@ "type": "string" } } - } + }, + "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." }, "old_config": { "type": "object", @@ -2993,11 +3650,12 @@ "type": "string" } } - } + }, + "description": "Populated when a new config has been received, but not registered as successfully applied to a project." }, "status": { - "enum": ["stored", "applied"], - "type": "string" + "type": "string", + "enum": ["stored", "applied"] } }, "required": ["entitlement", "config", "status"] @@ -3033,6 +3691,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3070,8 +3729,8 @@ "type": "object", "properties": { "entitlement": { - "enum": ["disallowed", "allowed"], - "type": "string" + "type": "string", + "enum": ["disallowed", "allowed"] }, "config": { "type": "object", @@ -3088,7 +3747,8 @@ "type": "string" } } - } + }, + "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." }, "old_config": { "type": "object", @@ -3105,11 +3765,12 @@ "type": "string" } } - } + }, + "description": "Populated when a new config has been received, but not registered as successfully applied to a project." }, "status": { - "enum": ["stored", "applied"], - "type": "string" + "type": "string", + "enum": ["stored", "applied"] } }, "required": ["entitlement", "config", "status"] @@ -3145,6 +3806,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3192,6 +3854,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3257,6 +3920,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3269,25 +3933,25 @@ "schema": { "type": "object", "properties": { + "db_schema": { + "type": "string" + }, "max_rows": { "type": "integer" }, + "db_extra_search_path": { + "type": "string" + }, "db_pool": { "type": "integer", "nullable": true, "description": "If `null`, the value is automatically configured based on compute size." }, - "db_schema": { - "type": "string" - }, - "db_extra_search_path": { - "type": "string" - }, "jwt_secret": { "type": "string" } }, - "required": ["max_rows", "db_pool", "db_schema", "db_extra_search_path"] + "required": ["db_schema", "max_rows", "db_extra_search_path", "db_pool"] } } } @@ -3318,6 +3982,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3329,6 +3994,12 @@ "schema": { "type": "object", "properties": { + "db_extra_search_path": { + "type": "string" + }, + "db_schema": { + "type": "string" + }, "max_rows": { "type": "integer", "minimum": 0, @@ -3338,12 +4009,6 @@ "type": "integer", "minimum": 0, "maximum": 1000 - }, - "db_extra_search_path": { - "type": "string" - }, - "db_schema": { - "type": "string" } } } @@ -3358,22 +4023,22 @@ "schema": { "type": "object", "properties": { + "db_schema": { + "type": "string" + }, "max_rows": { "type": "integer" }, + "db_extra_search_path": { + "type": "string" + }, "db_pool": { "type": "integer", "nullable": true, "description": "If `null`, the value is automatically configured based on compute size." - }, - "db_schema": { - "type": "string" - }, - "db_extra_search_path": { - "type": "string" } }, - "required": ["max_rows", "db_pool", "db_schema", "db_extra_search_path"] + "required": ["db_schema", "max_rows", "db_extra_search_path", "db_pool"] } } } @@ -3406,6 +4071,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3496,6 +4162,9 @@ } } }, + "403": { + "description": "" + }, "500": { "description": "Failed to retrieve project" } @@ -3519,6 +4188,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3532,8 +4202,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "integer" }, "ref": { "type": "string" @@ -3573,6 +4242,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3592,6 +4262,9 @@ }, "value": { "type": "string" + }, + "updated_at": { + "type": "string" } }, "required": ["name", "value"] @@ -3627,6 +4300,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3643,7 +4317,7 @@ "name": { "type": "string", "maxLength": 256, - "pattern": "/^(?!SUPABASE_).*/", + "pattern": "^(?!SUPABASE_).*", "description": "Secret name must not start with the SUPABASE_ prefix.", "example": "string" }, @@ -3689,6 +4363,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3708,14 +4383,7 @@ }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } + "description": "" }, "403": { "description": "" @@ -3745,6 +4413,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3801,6 +4470,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3891,6 +4561,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3940,6 +4611,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3953,8 +4625,8 @@ "type": "object", "properties": { "status": { - "enum": ["not-used", "custom-domain-used", "active"], - "type": "string" + "type": "string", + "enum": ["not-used", "custom-domain-used", "active"] }, "custom_domain": { "type": "string" @@ -3991,6 +4663,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4027,6 +4700,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4092,6 +4766,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4157,6 +4832,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4168,15 +4844,15 @@ "schema": { "type": "object", "properties": { + "target_version": { + "type": "string" + }, "release_channel": { "type": "string", "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "target_version": { - "type": "string" } }, - "required": ["release_channel", "target_version"] + "required": ["target_version"] } } } @@ -4226,6 +4902,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4238,19 +4915,16 @@ "schema": { "type": "object", "properties": { - "current_app_version_release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "duration_estimate_hours": { - "type": "integer" - }, "eligible": { "type": "boolean" }, "current_app_version": { "type": "string" }, + "current_app_version_release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + }, "latest_app_version": { "type": "string" }, @@ -4261,8 +4935,7 @@ "properties": { "postgres_version": { "type": "string", - "description": "Postgres engine version. If not provided, the latest version will be used.", - "enum": ["15", "17-oriole"] + "enum": ["13", "14", "15", "17", "17-oriole"] }, "release_channel": { "type": "string", @@ -4275,19 +4948,28 @@ "required": ["postgres_version", "release_channel", "app_version"] } }, - "potential_breaking_changes": { + "duration_estimate_hours": { + "type": "number" + }, + "legacy_auth_custom_roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "objects_to_be_dropped": { "type": "array", "items": { "type": "string" } }, - "legacy_auth_custom_roles": { + "unsupported_extensions": { "type": "array", "items": { "type": "string" } }, - "extension_dependent_objects": { + "user_defined_objects_in_internal_schemas": { "type": "array", "items": { "type": "string" @@ -4295,15 +4977,16 @@ } }, "required": [ - "current_app_version_release_channel", - "duration_estimate_hours", "eligible", "current_app_version", + "current_app_version_release_channel", "latest_app_version", "target_upgrade_versions", - "potential_breaking_changes", + "duration_estimate_hours", "legacy_auth_custom_roles", - "extension_dependent_objects" + "objects_to_be_dropped", + "unsupported_extensions", + "user_defined_objects_in_internal_schemas" ] } } @@ -4337,6 +5020,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -4358,63 +5042,53 @@ "type": "object", "properties": { "databaseUpgradeStatus": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "target_version": { - "type": "integer" - }, - "status": { - "enum": [0, 1, 2], - "type": "integer" - }, - "initiated_at": { - "type": "string" - }, - "latest_status_at": { - "type": "string" - }, - "error": { - "type": "string", - "enum": [ - "1_upgraded_instance_launch_failed", - "2_volume_detachchment_from_upgraded_instance_failed", - "3_volume_attachment_to_original_instance_failed", - "4_data_upgrade_initiation_failed", - "5_data_upgrade_completion_failed", - "6_volume_detachchment_from_original_instance_failed", - "7_volume_attachment_to_upgraded_instance_failed", - "8_upgrade_completion_failed", - "9_post_physical_backup_failed" - ] - }, - "progress": { - "type": "string", - "enum": [ - "0_requested", - "1_started", - "2_launched_upgraded_instance", - "3_detached_volume_from_upgraded_instance", - "4_attached_volume_to_original_instance", - "5_initiated_data_upgrade", - "6_completed_data_upgrade", - "7_detached_volume_from_original_instance", - "8_attached_volume_to_upgraded_instance", - "9_completed_upgrade", - "10_completed_post_physical_backup" - ] - } - }, - "required": [ - "target_version", - "status", - "initiated_at", - "latest_status_at" + "type": "object", + "properties": { + "initiated_at": { + "type": "string" + }, + "latest_status_at": { + "type": "string" + }, + "target_version": { + "type": "number" + }, + "error": { + "type": "string", + "enum": [ + "1_upgraded_instance_launch_failed", + "2_volume_detachchment_from_upgraded_instance_failed", + "3_volume_attachment_to_original_instance_failed", + "4_data_upgrade_initiation_failed", + "5_data_upgrade_completion_failed", + "6_volume_detachchment_from_original_instance_failed", + "7_volume_attachment_to_upgraded_instance_failed", + "8_upgrade_completion_failed", + "9_post_physical_backup_failed" + ] + }, + "progress": { + "type": "string", + "enum": [ + "0_requested", + "1_started", + "2_launched_upgraded_instance", + "3_detached_volume_from_upgraded_instance", + "4_attached_volume_to_original_instance", + "5_initiated_data_upgrade", + "6_completed_data_upgrade", + "7_detached_volume_from_original_instance", + "8_attached_volume_to_upgraded_instance", + "9_completed_upgrade", + "10_completed_post_physical_backup" ] + }, + "status": { + "type": "number" } - ] + }, + "required": ["initiated_at", "latest_status_at", "target_version", "status"], + "nullable": true } }, "required": ["databaseUpgradeStatus"] @@ -4450,6 +5124,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4477,6 +5152,9 @@ } } }, + "403": { + "description": "" + }, "500": { "description": "Failed to get project readonly mode status" } @@ -4502,6 +5180,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4510,6 +5189,9 @@ "201": { "description": "" }, + "403": { + "description": "" + }, "500": { "description": "Failed to disable project's readonly mode" } @@ -4535,6 +5217,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4609,6 +5292,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4661,19 +5345,10 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, - { - "name": "timeout_ms", - "required": false, - "in": "query", - "schema": { - "minimum": 0, - "maximum": 10000, - "type": "integer" - } - }, { "name": "services", "required": true, @@ -4682,10 +5357,29 @@ "type": "array", "items": { "type": "string", - "enum": ["auth", "db", "pooler", "realtime", "rest", "storage"] + "enum": [ + "auth", + "db", + "db_postgres_user", + "pooler", + "realtime", + "rest", + "storage", + "pg_bouncer" + ] } } - } + }, + { + "name": "timeout_ms", + "required": false, + "in": "query", + "schema": { + "minimum": 0, + "maximum": 10000, + "type": "integer" + } + } ], "responses": { "200": { @@ -4697,6 +5391,26 @@ "items": { "type": "object", "properties": { + "name": { + "type": "string", + "enum": [ + "auth", + "db", + "db_postgres_user", + "pooler", + "realtime", + "rest", + "storage", + "pg_bouncer" + ] + }, + "healthy": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"] + }, "info": { "oneOf": [ { @@ -4705,32 +5419,33 @@ "name": { "type": "string", "enum": ["GoTrue"] + }, + "version": { + "type": "string" + }, + "description": { + "type": "string" } }, - "required": ["name"] + "required": ["name", "version", "description"] }, { "type": "object", "properties": { + "healthy": { + "type": "boolean" + }, + "db_connected": { + "type": "boolean" + }, "connected_cluster": { "type": "integer" } }, - "required": ["connected_cluster"] + "required": ["healthy", "db_connected", "connected_cluster"] } ] }, - "name": { - "enum": ["auth", "db", "pooler", "realtime", "rest", "storage"], - "type": "string" - }, - "healthy": { - "type": "boolean" - }, - "status": { - "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"], - "type": "string" - }, "error": { "type": "string" } @@ -4756,10 +5471,10 @@ ] } }, - "/v1/projects/{ref}/config/storage": { - "get": { - "operationId": "v1-get-storage-config", - "summary": "Gets project's storage config", + "/v1/projects/{ref}/config/auth/signing-keys/legacy": { + "post": { + "operationId": "v1-create-legacy-signing-key", + "summary": "Set up the project's existing JWT secret as an in_use JWT signing key. This endpoint will be removed in the future always check for HTTP 404 Not Found.", "parameters": [ { "name": "ref", @@ -4769,69 +5484,63 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { - "200": { + "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "fileSizeLimit": { - "type": "integer", - "format": "int64" + "id": { + "type": "string", + "format": "uuid" }, - "features": { - "type": "object", - "properties": { - "imageTransformation": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "s3Protocol": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - } - }, - "required": ["imageTransformation", "s3Protocol"] + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" } }, - "required": ["fileSizeLimit", "features"] + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false } } } }, "403": { "description": "" - }, - "500": { - "description": "Failed to retrieve project's storage config" } }, - "tags": ["Storage"], + "tags": ["Auth"], "security": [ { "bearer": [] } ] }, - "patch": { - "operationId": "v1-update-storage-config", - "summary": "Updates project's storage config", + "get": { + "operationId": "v1-get-legacy-signing-key", + "summary": "Get the signing key information for the JWT secret imported as signing key for this project. This endpoint will be removed in the future, check for HTTP 404 Not Found.", "parameters": [ { "name": "ref", @@ -4841,64 +5550,54 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "fileSizeLimit": { - "type": "integer", - "minimum": 0, - "maximum": 53687091200, - "format": "int64" - }, - "features": { - "type": "object", - "properties": { - "imageTransformation": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "s3Protocol": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - } + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" }, - "required": ["imageTransformation", "s3Protocol"] - } + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false } } } - } - }, - "responses": { - "200": { - "description": "" }, "403": { "description": "" - }, - "500": { - "description": "Failed to update project's storage config" } }, - "tags": ["Storage"], + "tags": ["Auth"], "security": [ { "bearer": [] @@ -4906,10 +5605,10 @@ ] } }, - "/v1/projects/{ref}/config/database/postgres": { - "get": { - "operationId": "v1-get-postgres-config", - "summary": "Gets project's Postgres config", + "/v1/projects/{ref}/config/auth/signing-keys": { + "post": { + "operationId": "v1-create-project-signing-key", + "summary": "Create a new signing key for the project in standby status", "parameters": [ { "name": "ref", @@ -4919,119 +5618,188 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "standby"] + }, + "private_jwk": { + "discriminator": { + "propertyName": "kty" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "kty": { + "type": "string", + "enum": ["RSA"] + }, + "n": { + "type": "string" + }, + "e": { + "type": "string", + "enum": ["AQAB"] + }, + "d": { + "type": "string" + }, + "p": { + "type": "string" + }, + "q": { + "type": "string" + }, + "dp": { + "type": "string" + }, + "dq": { + "type": "string" + }, + "qi": { + "type": "string" + } + }, + "required": ["kty", "n", "e", "d", "p", "q", "dp", "dq", "qi"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kty": { + "type": "string", + "enum": ["EC"] + }, + "crv": { + "type": "string", + "enum": ["P-256"] + }, + "x": { + "type": "string" + }, + "y": { + "type": "string" + }, + "d": { + "type": "string" + } + }, + "required": ["kty", "crv", "x", "y", "d"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kty": { + "type": "string", + "enum": ["OKP"] + }, + "crv": { + "type": "string", + "enum": ["Ed25519"] + }, + "x": { + "type": "string" + }, + "d": { + "type": "string" + } + }, + "required": ["kty", "crv", "x", "d"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kty": { + "type": "string", + "enum": ["oct"] + }, + "k": { + "type": "string", + "minLength": 16 + } + }, + "required": ["kty", "k"], + "additionalProperties": false + } + ] + } + }, + "required": ["algorithm"], + "additionalProperties": false + } + } + } + }, "responses": { - "200": { + "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "effective_cache_size": { - "type": "string" + "id": { + "type": "string", + "format": "uuid" }, - "logical_decoding_work_mem": { - "type": "string" - }, - "maintenance_work_mem": { - "type": "string" - }, - "track_activity_query_size": { - "type": "string" - }, - "max_connections": { - "type": "integer", - "minimum": 1, - "maximum": 262143 - }, - "max_locks_per_transaction": { - "type": "integer", - "minimum": 10, - "maximum": 2147483640 - }, - "max_parallel_maintenance_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers_per_gather": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_replication_slots": { - "type": "integer" - }, - "max_slot_wal_keep_size": { - "type": "string" - }, - "max_standby_archive_delay": { - "type": "string" - }, - "max_standby_streaming_delay": { - "type": "string" - }, - "max_wal_size": { - "type": "string" - }, - "max_wal_senders": { - "type": "integer" - }, - "max_worker_processes": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, - "shared_buffers": { - "type": "string" - }, - "statement_timeout": { - "type": "string" - }, - "track_commit_timestamp": { - "type": "boolean" + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, - "wal_keep_size": { - "type": "string" + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] }, - "wal_sender_timeout": { - "type": "string" + "public_jwk": { + "nullable": true }, - "work_mem": { - "type": "string" + "created_at": { + "type": "string", + "format": "date-time" }, - "session_replication_role": { - "enum": ["origin", "replica", "local"], - "type": "string" + "updated_at": { + "type": "string", + "format": "date-time" } - } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false } } } }, - "500": { - "description": "Failed to retrieve project's Postgres config" + "403": { + "description": "" } }, - "tags": ["Database"], + "tags": ["Auth"], "security": [ { "bearer": [] } ] }, - "put": { - "operationId": "v1-update-postgres-config", - "summary": "Updates project's Postgres config", + "get": { + "operationId": "v1-get-project-signing-keys", + "summary": "List all signing keys for the project", "parameters": [ { "name": "ref", @@ -5041,107 +5809,98 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "effective_cache_size": { - "type": "string" - }, - "logical_decoding_work_mem": { - "type": "string" - }, - "maintenance_work_mem": { - "type": "string" - }, - "track_activity_query_size": { - "type": "string" - }, - "max_connections": { - "type": "integer", - "minimum": 1, - "maximum": 262143 - }, - "max_locks_per_transaction": { - "type": "integer", - "minimum": 10, - "maximum": 2147483640 - }, - "max_parallel_maintenance_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers_per_gather": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_replication_slots": { - "type": "integer" - }, - "max_slot_wal_keep_size": { - "type": "string" - }, - "max_standby_archive_delay": { - "type": "string" - }, - "max_standby_streaming_delay": { - "type": "string" - }, - "max_wal_size": { - "type": "string" - }, - "max_wal_senders": { - "type": "integer" - }, - "max_worker_processes": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, - "shared_buffers": { - "type": "string" - }, - "statement_timeout": { - "type": "string" - }, - "track_commit_timestamp": { - "type": "boolean" - }, - "wal_keep_size": { - "type": "string" - }, - "wal_sender_timeout": { - "type": "string" - }, - "work_mem": { - "type": "string" - }, - "restart_database": { - "type": "boolean" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false + } + } }, - "session_replication_role": { - "enum": ["origin", "replica", "local"], - "type": "string" - } + "required": ["keys"], + "additionalProperties": false } } } + }, + "403": { + "description": "" } }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/config/auth/signing-keys/{id}": { + "get": { + "operationId": "v1-get-project-signing-key", + "summary": "Get information about a signing key", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -5150,113 +5909,60 @@ "schema": { "type": "object", "properties": { - "effective_cache_size": { - "type": "string" + "id": { + "type": "string", + "format": "uuid" }, - "logical_decoding_work_mem": { - "type": "string" + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, - "maintenance_work_mem": { - "type": "string" - }, - "track_activity_query_size": { - "type": "string" - }, - "max_connections": { - "type": "integer", - "minimum": 1, - "maximum": 262143 - }, - "max_locks_per_transaction": { - "type": "integer", - "minimum": 10, - "maximum": 2147483640 - }, - "max_parallel_maintenance_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers_per_gather": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_replication_slots": { - "type": "integer" - }, - "max_slot_wal_keep_size": { - "type": "string" - }, - "max_standby_archive_delay": { - "type": "string" - }, - "max_standby_streaming_delay": { - "type": "string" - }, - "max_wal_size": { - "type": "string" - }, - "max_wal_senders": { - "type": "integer" - }, - "max_worker_processes": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, - "shared_buffers": { - "type": "string" - }, - "statement_timeout": { - "type": "string" - }, - "track_commit_timestamp": { - "type": "boolean" - }, - "wal_keep_size": { - "type": "string" + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] }, - "wal_sender_timeout": { - "type": "string" + "public_jwk": { + "nullable": true }, - "work_mem": { - "type": "string" + "created_at": { + "type": "string", + "format": "date-time" }, - "session_replication_role": { - "enum": ["origin", "replica", "local"], - "type": "string" + "updated_at": { + "type": "string", + "format": "date-time" } - } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false } } } }, "403": { "description": "" - }, - "500": { - "description": "Failed to update project's Postgres config" } }, - "tags": ["Database"], + "tags": ["Auth"], "security": [ { "bearer": [] } ] - } - }, - "/v1/projects/{ref}/config/database/pgbouncer": { - "get": { - "operationId": "v1-get-project-pgbouncer-config", - "summary": "Get project's pgbouncer config", + }, + "delete": { + "operationId": "v1-remove-project-signing-key", + "summary": "Remove a signing key from a project. Only possible if the key has been in revoked status for a while.", "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "type": "string" + } + }, { "name": "ref", "required": true, @@ -5265,6 +5971,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -5277,39 +5984,60 @@ "schema": { "type": "object", "properties": { - "pool_mode": { + "id": { "type": "string", - "enum": ["transaction", "session", "statement"] + "format": "uuid" }, - "default_pool_size": { - "type": "number" + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, - "ignore_startup_parameters": { - "type": "string" + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] }, - "max_client_conn": { - "type": "number" + "public_jwk": { + "nullable": true }, - "connection_string": { - "type": "string" + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" } - } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false } } } }, - "500": { - "description": "Failed to retrieve project's pgbouncer config" + "403": { + "description": "" } }, - "tags": ["Database"] - } - }, - "/v1/projects/{ref}/config/database/pooler": { - "get": { - "operationId": "v1-get-supavisor-config", - "summary": "Gets project's supavisor config", + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + }, + "patch": { + "operationId": "v1-update-project-signing-key", + "summary": "Update a signing key, mainly its status", "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "type": "string" + } + }, { "name": "ref", "required": true, @@ -5318,90 +6046,83 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + } + }, + "required": ["status"], + "additionalProperties": false + } + } + } + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "database_type": { - "type": "string", - "enum": ["PRIMARY", "READ_REPLICA"] - }, - "db_port": { - "type": "integer" - }, - "default_pool_size": { - "type": "integer", - "nullable": true - }, - "max_client_conn": { - "type": "integer", - "nullable": true - }, - "identifier": { - "type": "string" - }, - "is_using_scram_auth": { - "type": "boolean" - }, - "db_user": { - "type": "string" - }, - "db_host": { - "type": "string" - }, - "db_name": { - "type": "string" - }, - "connectionString": { - "type": "string" - }, - "pool_mode": { - "enum": ["transaction", "session"], - "type": "string" - } + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" }, - "required": [ - "database_type", - "db_port", - "default_pool_size", - "max_client_conn", - "identifier", - "is_using_scram_auth", - "db_user", - "db_host", - "db_name", - "connectionString", - "pool_mode" - ] - } + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false } } } }, - "500": { - "description": "Failed to retrieve project's supavisor config" + "403": { + "description": "" } }, - "tags": ["Database"], + "tags": ["Auth"], "security": [ { "bearer": [] } ] - }, - "patch": { - "operationId": "v1-update-supavisor-config", - "summary": "Updates project's supavisor config", + } + }, + "/v1/projects/{ref}/config/storage": { + "get": { + "operationId": "v1-get-storage-config", + "summary": "Gets project's storage config", "parameters": [ { "name": "ref", @@ -5411,34 +6132,11 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "default_pool_size": { - "type": "integer", - "nullable": true, - "minimum": 0, - "maximum": 1000 - }, - "pool_mode": { - "enum": ["transaction", "session"], - "type": "string", - "deprecated": true, - "description": "This field is deprecated and is ignored in this request" - } - } - } - } - } - }, "responses": { "200": { "description": "", @@ -5447,16 +6145,67 @@ "schema": { "type": "object", "properties": { - "default_pool_size": { + "fileSizeLimit": { "type": "integer", - "nullable": true + "format": "int64" }, - "pool_mode": { - "enum": ["transaction", "session"], - "type": "string" + "features": { + "type": "object", + "properties": { + "imageTransformation": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, + "s3Protocol": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, + "icebergCatalog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + } + }, + "required": ["imageTransformation", "s3Protocol"] + }, + "capabilities": { + "type": "object", + "properties": { + "list_v2": { + "type": "boolean" + }, + "iceberg_catalog": { + "type": "boolean" + } + }, + "required": ["list_v2", "iceberg_catalog"] + }, + "external": { + "type": "object", + "properties": { + "upstreamTarget": { + "type": "string", + "enum": ["main", "canary"] + } + }, + "required": ["upstreamTarget"] } }, - "required": ["default_pool_size", "pool_mode"] + "required": ["fileSizeLimit", "features", "capabilities", "external"] } } } @@ -5465,10 +6214,107 @@ "description": "" }, "500": { - "description": "Failed to update project's supavisor config" + "description": "Failed to retrieve project's storage config" } }, - "tags": ["Database"], + "tags": ["Storage"], + "security": [ + { + "bearer": [] + } + ] + }, + "patch": { + "operationId": "v1-update-storage-config", + "summary": "Updates project's storage config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "fileSizeLimit": { + "type": "integer", + "minimum": 0, + "maximum": 536870912000, + "format": "int64" + }, + "features": { + "type": "object", + "properties": { + "imageTransformation": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, + "s3Protocol": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, + "icebergCatalog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + } + }, + "required": ["imageTransformation", "s3Protocol"] + }, + "external": { + "type": "object", + "properties": { + "upstreamTarget": { + "type": "string", + "enum": ["main", "canary"] + } + }, + "required": ["upstreamTarget"] + } + }, + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "" + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to update project's storage config" + } + }, + "tags": ["Storage"], "security": [ { "bearer": [] @@ -5476,10 +6322,10 @@ ] } }, - "/v1/projects/{ref}/config/auth": { + "/v1/projects/{ref}/config/database/postgres": { "get": { - "operationId": "v1-get-auth-service-config", - "summary": "Gets project's auth config", + "operationId": "v1-get-postgres-config", + "summary": "Gets project's Postgres config", "parameters": [ { "name": "ref", @@ -5489,6 +6335,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -5501,680 +6348,1313 @@ "schema": { "type": "object", "properties": { - "api_max_request_duration": { - "type": "integer", - "nullable": true + "effective_cache_size": { + "type": "string" }, - "db_max_pool_size": { - "type": "integer", - "nullable": true + "logical_decoding_work_mem": { + "type": "string" }, - "jwt_exp": { - "type": "integer", - "nullable": true + "maintenance_work_mem": { + "type": "string" }, - "mailer_otp_exp": { - "type": "integer" + "track_activity_query_size": { + "type": "string" }, - "mailer_otp_length": { + "max_connections": { "type": "integer", - "nullable": true + "minimum": 1, + "maximum": 262143 }, - "mfa_max_enrolled_factors": { + "max_locks_per_transaction": { "type": "integer", - "nullable": true - }, - "mfa_phone_otp_length": { - "type": "integer" + "minimum": 10, + "maximum": 2147483640 }, - "mfa_phone_max_frequency": { + "max_parallel_maintenance_workers": { "type": "integer", - "nullable": true + "minimum": 0, + "maximum": 1024 }, - "password_min_length": { + "max_parallel_workers": { "type": "integer", - "nullable": true + "minimum": 0, + "maximum": 1024 }, - "rate_limit_anonymous_users": { + "max_parallel_workers_per_gather": { "type": "integer", - "nullable": true + "minimum": 0, + "maximum": 1024 }, - "rate_limit_email_sent": { - "type": "integer", - "nullable": true + "max_replication_slots": { + "type": "integer" }, - "rate_limit_sms_sent": { - "type": "integer", - "nullable": true + "max_slot_wal_keep_size": { + "type": "string" }, - "rate_limit_token_refresh": { - "type": "integer", - "nullable": true + "max_standby_archive_delay": { + "type": "string" }, - "rate_limit_verify": { - "type": "integer", - "nullable": true + "max_standby_streaming_delay": { + "type": "string" }, - "rate_limit_otp": { - "type": "integer", - "nullable": true + "max_wal_size": { + "type": "string" }, - "security_refresh_token_reuse_interval": { - "type": "integer", - "nullable": true + "max_wal_senders": { + "type": "integer" }, - "sessions_inactivity_timeout": { + "max_worker_processes": { "type": "integer", - "nullable": true + "minimum": 0, + "maximum": 262143 }, - "sessions_timebox": { - "type": "integer", - "nullable": true + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] }, - "sms_max_frequency": { - "type": "integer", - "nullable": true + "shared_buffers": { + "type": "string" }, - "sms_otp_exp": { - "type": "integer", - "nullable": true + "statement_timeout": { + "type": "string" }, - "sms_otp_length": { - "type": "integer" + "track_commit_timestamp": { + "type": "boolean" }, - "smtp_max_frequency": { - "type": "integer", - "nullable": true + "wal_keep_size": { + "type": "string" }, - "disable_signup": { - "type": "boolean", - "nullable": true + "wal_sender_timeout": { + "type": "string" }, - "external_anonymous_users_enabled": { - "type": "boolean", - "nullable": true + "work_mem": { + "type": "string" + } + } + } + } + } + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to retrieve project's Postgres config" + } + }, + "tags": ["Database"], + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "operationId": "v1-update-postgres-config", + "summary": "Updates project's Postgres config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "effective_cache_size": { + "type": "string" + }, + "logical_decoding_work_mem": { + "type": "string" + }, + "maintenance_work_mem": { + "type": "string" + }, + "track_activity_query_size": { + "type": "string" + }, + "max_connections": { + "type": "integer", + "minimum": 1, + "maximum": 262143 + }, + "max_locks_per_transaction": { + "type": "integer", + "minimum": 10, + "maximum": 2147483640 + }, + "max_parallel_maintenance_workers": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_parallel_workers": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_parallel_workers_per_gather": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_replication_slots": { + "type": "integer" + }, + "max_slot_wal_keep_size": { + "type": "string" + }, + "max_standby_archive_delay": { + "type": "string" + }, + "max_standby_streaming_delay": { + "type": "string" + }, + "max_wal_size": { + "type": "string" + }, + "max_wal_senders": { + "type": "integer" + }, + "max_worker_processes": { + "type": "integer", + "minimum": 0, + "maximum": 262143 + }, + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] + }, + "shared_buffers": { + "type": "string" + }, + "statement_timeout": { + "type": "string" + }, + "track_commit_timestamp": { + "type": "boolean" + }, + "wal_keep_size": { + "type": "string" + }, + "wal_sender_timeout": { + "type": "string" + }, + "work_mem": { + "type": "string" + }, + "restart_database": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "effective_cache_size": { + "type": "string" }, - "external_apple_additional_client_ids": { - "type": "string", - "nullable": true + "logical_decoding_work_mem": { + "type": "string" }, - "external_apple_client_id": { - "type": "string", - "nullable": true + "maintenance_work_mem": { + "type": "string" }, - "external_apple_enabled": { - "type": "boolean", - "nullable": true + "track_activity_query_size": { + "type": "string" }, - "external_apple_secret": { - "type": "string", - "nullable": true + "max_connections": { + "type": "integer", + "minimum": 1, + "maximum": 262143 }, - "external_azure_client_id": { - "type": "string", - "nullable": true + "max_locks_per_transaction": { + "type": "integer", + "minimum": 10, + "maximum": 2147483640 }, - "external_azure_enabled": { - "type": "boolean", - "nullable": true + "max_parallel_maintenance_workers": { + "type": "integer", + "minimum": 0, + "maximum": 1024 }, - "external_azure_secret": { - "type": "string", - "nullable": true + "max_parallel_workers": { + "type": "integer", + "minimum": 0, + "maximum": 1024 }, - "external_azure_url": { - "type": "string", - "nullable": true + "max_parallel_workers_per_gather": { + "type": "integer", + "minimum": 0, + "maximum": 1024 }, - "external_bitbucket_client_id": { - "type": "string", - "nullable": true + "max_replication_slots": { + "type": "integer" }, - "external_bitbucket_enabled": { - "type": "boolean", - "nullable": true + "max_slot_wal_keep_size": { + "type": "string" }, - "external_bitbucket_secret": { - "type": "string", - "nullable": true + "max_standby_archive_delay": { + "type": "string" }, - "external_discord_client_id": { - "type": "string", - "nullable": true + "max_standby_streaming_delay": { + "type": "string" }, - "external_discord_enabled": { - "type": "boolean", - "nullable": true + "max_wal_size": { + "type": "string" }, - "external_discord_secret": { - "type": "string", - "nullable": true + "max_wal_senders": { + "type": "integer" }, - "external_email_enabled": { - "type": "boolean", - "nullable": true - }, - "external_facebook_client_id": { - "type": "string", - "nullable": true - }, - "external_facebook_enabled": { - "type": "boolean", - "nullable": true - }, - "external_facebook_secret": { - "type": "string", - "nullable": true - }, - "external_figma_client_id": { - "type": "string", - "nullable": true - }, - "external_figma_enabled": { - "type": "boolean", - "nullable": true - }, - "external_figma_secret": { - "type": "string", - "nullable": true - }, - "external_github_client_id": { - "type": "string", - "nullable": true - }, - "external_github_enabled": { - "type": "boolean", - "nullable": true - }, - "external_github_secret": { - "type": "string", - "nullable": true - }, - "external_gitlab_client_id": { - "type": "string", - "nullable": true - }, - "external_gitlab_enabled": { - "type": "boolean", - "nullable": true - }, - "external_gitlab_secret": { - "type": "string", - "nullable": true + "max_worker_processes": { + "type": "integer", + "minimum": 0, + "maximum": 262143 }, - "external_gitlab_url": { + "session_replication_role": { "type": "string", - "nullable": true + "enum": ["origin", "replica", "local"] }, - "external_google_additional_client_ids": { - "type": "string", - "nullable": true + "shared_buffers": { + "type": "string" }, - "external_google_client_id": { - "type": "string", - "nullable": true + "statement_timeout": { + "type": "string" }, - "external_google_enabled": { - "type": "boolean", - "nullable": true + "track_commit_timestamp": { + "type": "boolean" }, - "external_google_secret": { - "type": "string", - "nullable": true + "wal_keep_size": { + "type": "string" }, - "external_google_skip_nonce_check": { - "type": "boolean", - "nullable": true + "wal_sender_timeout": { + "type": "string" }, - "external_kakao_client_id": { - "type": "string", - "nullable": true + "work_mem": { + "type": "string" + } + } + } + } + } + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to update project's Postgres config" + } + }, + "tags": ["Database"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/config/database/pgbouncer": { + "get": { + "operationId": "v1-get-project-pgbouncer-config", + "summary": "Get project's pgbouncer config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "default_pool_size": { + "type": "integer" }, - "external_kakao_enabled": { - "type": "boolean", - "nullable": true + "ignore_startup_parameters": { + "type": "string" }, - "external_kakao_secret": { - "type": "string", - "nullable": true + "max_client_conn": { + "type": "integer" }, - "external_keycloak_client_id": { + "pool_mode": { "type": "string", - "nullable": true - }, - "external_keycloak_enabled": { - "type": "boolean", - "nullable": true + "enum": ["transaction", "session", "statement"] }, - "external_keycloak_secret": { - "type": "string", - "nullable": true + "connection_string": { + "type": "string" }, - "external_keycloak_url": { - "type": "string", - "nullable": true + "server_idle_timeout": { + "type": "integer" }, - "external_linkedin_oidc_client_id": { - "type": "string", - "nullable": true + "server_lifetime": { + "type": "integer" }, - "external_linkedin_oidc_enabled": { - "type": "boolean", - "nullable": true + "query_wait_timeout": { + "type": "integer" }, - "external_linkedin_oidc_secret": { - "type": "string", - "nullable": true + "reserve_pool_size": { + "type": "integer" + } + } + } + } + } + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to retrieve project's pgbouncer config" + } + }, + "tags": ["Database"] + } + }, + "/v1/projects/{ref}/config/database/pooler": { + "get": { + "operationId": "v1-get-pooler-config", + "summary": "Gets project's supavisor config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "database_type": { + "type": "string", + "enum": ["PRIMARY", "READ_REPLICA"] + }, + "is_using_scram_auth": { + "type": "boolean" + }, + "db_user": { + "type": "string" + }, + "db_host": { + "type": "string" + }, + "db_port": { + "type": "integer" + }, + "db_name": { + "type": "string" + }, + "connection_string": { + "type": "string" + }, + "connectionString": { + "type": "string", + "description": "Use connection_string instead" + }, + "default_pool_size": { + "type": "integer", + "nullable": true + }, + "max_client_conn": { + "type": "integer", + "nullable": true + }, + "pool_mode": { + "type": "string", + "enum": ["transaction", "session"] + } }, - "external_slack_oidc_client_id": { - "type": "string", - "nullable": true - }, - "external_slack_oidc_enabled": { - "type": "boolean", + "required": [ + "identifier", + "database_type", + "is_using_scram_auth", + "db_user", + "db_host", + "db_port", + "db_name", + "connection_string", + "connectionString", + "default_pool_size", + "max_client_conn", + "pool_mode" + ] + } + } + } + } + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to retrieve project's supavisor config" + } + }, + "tags": ["Database"], + "security": [ + { + "bearer": [] + } + ] + }, + "patch": { + "operationId": "v1-update-pooler-config", + "summary": "Updates project's supavisor config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "default_pool_size": { + "type": "integer", + "minimum": 0, + "maximum": 3000, + "nullable": true + }, + "pool_mode": { + "type": "string", + "enum": ["transaction", "session"], + "description": "Dedicated pooler mode for the project" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "default_pool_size": { + "type": "integer", "nullable": true }, - "external_slack_oidc_secret": { - "type": "string", + "pool_mode": { + "type": "string" + } + }, + "required": ["default_pool_size", "pool_mode"] + } + } + } + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to update project's supavisor config" + } + }, + "tags": ["Database"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/config/auth": { + "get": { + "operationId": "v1-get-auth-service-config", + "summary": "Gets project's auth config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "api_max_request_duration": { + "type": "integer", "nullable": true }, - "external_notion_client_id": { - "type": "string", + "db_max_pool_size": { + "type": "integer", "nullable": true }, - "external_notion_enabled": { + "disable_signup": { "type": "boolean", "nullable": true }, - "external_notion_secret": { - "type": "string", + "external_anonymous_users_enabled": { + "type": "boolean", "nullable": true }, - "external_phone_enabled": { - "type": "boolean", + "external_apple_additional_client_ids": { + "type": "string", "nullable": true }, - "external_slack_client_id": { + "external_apple_client_id": { "type": "string", "nullable": true }, - "external_slack_enabled": { + "external_apple_enabled": { "type": "boolean", "nullable": true }, - "external_slack_secret": { + "external_apple_secret": { "type": "string", "nullable": true }, - "external_spotify_client_id": { + "external_azure_client_id": { "type": "string", "nullable": true }, - "external_spotify_enabled": { + "external_azure_enabled": { "type": "boolean", "nullable": true }, - "external_spotify_secret": { - "type": "string", - "nullable": true - }, - "external_twitch_client_id": { + "external_azure_secret": { "type": "string", "nullable": true }, - "external_twitch_enabled": { - "type": "boolean", - "nullable": true - }, - "external_twitch_secret": { + "external_azure_url": { "type": "string", "nullable": true }, - "external_twitter_client_id": { + "external_bitbucket_client_id": { "type": "string", "nullable": true }, - "external_twitter_enabled": { + "external_bitbucket_enabled": { "type": "boolean", "nullable": true }, - "external_twitter_secret": { + "external_bitbucket_secret": { "type": "string", "nullable": true }, - "external_workos_client_id": { + "external_discord_client_id": { "type": "string", "nullable": true }, - "external_workos_enabled": { + "external_discord_enabled": { "type": "boolean", "nullable": true }, - "external_workos_secret": { - "type": "string", - "nullable": true - }, - "external_workos_url": { - "type": "string", - "nullable": true - }, - "external_zoom_client_id": { + "external_discord_secret": { "type": "string", "nullable": true }, - "external_zoom_enabled": { + "external_email_enabled": { "type": "boolean", "nullable": true }, - "external_zoom_secret": { + "external_facebook_client_id": { "type": "string", "nullable": true }, - "hook_custom_access_token_enabled": { + "external_facebook_enabled": { "type": "boolean", "nullable": true }, - "hook_custom_access_token_uri": { + "external_facebook_secret": { "type": "string", "nullable": true }, - "hook_custom_access_token_secrets": { + "external_figma_client_id": { "type": "string", "nullable": true }, - "hook_mfa_verification_attempt_enabled": { + "external_figma_enabled": { "type": "boolean", "nullable": true }, - "hook_mfa_verification_attempt_uri": { + "external_figma_secret": { "type": "string", "nullable": true }, - "hook_mfa_verification_attempt_secrets": { + "external_github_client_id": { "type": "string", "nullable": true }, - "hook_password_verification_attempt_enabled": { + "external_github_enabled": { "type": "boolean", "nullable": true }, - "hook_password_verification_attempt_uri": { + "external_github_secret": { "type": "string", "nullable": true }, - "hook_password_verification_attempt_secrets": { + "external_gitlab_client_id": { "type": "string", "nullable": true }, - "hook_send_sms_enabled": { + "external_gitlab_enabled": { "type": "boolean", "nullable": true }, - "hook_send_sms_uri": { + "external_gitlab_secret": { "type": "string", "nullable": true }, - "hook_send_sms_secrets": { + "external_gitlab_url": { "type": "string", "nullable": true }, - "hook_send_email_enabled": { - "type": "boolean", - "nullable": true - }, - "hook_send_email_uri": { + "external_google_additional_client_ids": { "type": "string", "nullable": true }, - "hook_send_email_secrets": { + "external_google_client_id": { "type": "string", "nullable": true }, - "mailer_allow_unverified_email_sign_ins": { + "external_google_enabled": { "type": "boolean", "nullable": true }, - "mailer_autoconfirm": { - "type": "boolean", + "external_google_secret": { + "type": "string", "nullable": true }, - "mailer_secure_email_change_enabled": { + "external_google_skip_nonce_check": { "type": "boolean", "nullable": true }, - "mailer_subjects_confirmation": { + "external_kakao_client_id": { "type": "string", "nullable": true }, - "mailer_subjects_email_change": { - "type": "string", + "external_kakao_enabled": { + "type": "boolean", "nullable": true }, - "mailer_subjects_invite": { + "external_kakao_secret": { "type": "string", "nullable": true }, - "mailer_subjects_magic_link": { + "external_keycloak_client_id": { "type": "string", "nullable": true }, - "mailer_subjects_reauthentication": { - "type": "string", + "external_keycloak_enabled": { + "type": "boolean", "nullable": true }, - "mailer_subjects_recovery": { + "external_keycloak_secret": { "type": "string", "nullable": true }, - "mailer_templates_confirmation_content": { + "external_keycloak_url": { "type": "string", "nullable": true }, - "mailer_templates_email_change_content": { + "external_linkedin_oidc_client_id": { "type": "string", "nullable": true }, - "mailer_templates_invite_content": { - "type": "string", + "external_linkedin_oidc_enabled": { + "type": "boolean", "nullable": true }, - "mailer_templates_magic_link_content": { + "external_linkedin_oidc_secret": { "type": "string", "nullable": true }, - "mailer_templates_reauthentication_content": { + "external_slack_oidc_client_id": { "type": "string", "nullable": true }, - "mailer_templates_recovery_content": { + "external_slack_oidc_enabled": { + "type": "boolean", + "nullable": true + }, + "external_slack_oidc_secret": { "type": "string", "nullable": true }, - "mfa_totp_enroll_enabled": { - "type": "boolean", + "external_notion_client_id": { + "type": "string", "nullable": true }, - "mfa_totp_verify_enabled": { + "external_notion_enabled": { "type": "boolean", "nullable": true }, - "mfa_phone_enroll_enabled": { - "type": "boolean", + "external_notion_secret": { + "type": "string", "nullable": true }, - "mfa_phone_verify_enabled": { + "external_phone_enabled": { "type": "boolean", "nullable": true }, - "mfa_web_authn_enroll_enabled": { - "type": "boolean", + "external_slack_client_id": { + "type": "string", "nullable": true }, - "mfa_web_authn_verify_enabled": { + "external_slack_enabled": { "type": "boolean", "nullable": true }, - "mfa_phone_template": { + "external_slack_secret": { "type": "string", "nullable": true }, - "password_hibp_enabled": { + "external_spotify_client_id": { + "type": "string", + "nullable": true + }, + "external_spotify_enabled": { "type": "boolean", "nullable": true }, - "password_required_characters": { + "external_spotify_secret": { "type": "string", "nullable": true }, - "refresh_token_rotation_enabled": { - "type": "boolean", + "external_twitch_client_id": { + "type": "string", "nullable": true }, - "saml_enabled": { + "external_twitch_enabled": { "type": "boolean", "nullable": true }, - "saml_external_url": { + "external_twitch_secret": { "type": "string", "nullable": true }, - "saml_allow_encrypted_assertions": { + "external_twitter_client_id": { + "type": "string", + "nullable": true + }, + "external_twitter_enabled": { "type": "boolean", "nullable": true }, - "security_captcha_enabled": { + "external_twitter_secret": { + "type": "string", + "nullable": true + }, + "external_workos_client_id": { + "type": "string", + "nullable": true + }, + "external_workos_enabled": { "type": "boolean", "nullable": true }, - "security_captcha_provider": { + "external_workos_secret": { "type": "string", "nullable": true }, - "security_captcha_secret": { + "external_workos_url": { "type": "string", "nullable": true }, - "security_manual_linking_enabled": { + "external_web3_solana_enabled": { "type": "boolean", "nullable": true }, - "security_update_password_require_reauthentication": { + "external_web3_ethereum_enabled": { "type": "boolean", "nullable": true }, - "sessions_single_per_user": { + "external_zoom_client_id": { + "type": "string", + "nullable": true + }, + "external_zoom_enabled": { "type": "boolean", "nullable": true }, - "sessions_tags": { + "external_zoom_secret": { "type": "string", "nullable": true }, - "site_url": { + "hook_custom_access_token_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_custom_access_token_uri": { "type": "string", "nullable": true }, - "sms_autoconfirm": { + "hook_custom_access_token_secrets": { + "type": "string", + "nullable": true + }, + "hook_mfa_verification_attempt_enabled": { "type": "boolean", "nullable": true }, - "sms_messagebird_access_key": { + "hook_mfa_verification_attempt_uri": { "type": "string", "nullable": true }, - "sms_messagebird_originator": { + "hook_mfa_verification_attempt_secrets": { "type": "string", "nullable": true }, - "sms_provider": { + "hook_password_verification_attempt_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_password_verification_attempt_uri": { "type": "string", "nullable": true }, - "sms_template": { + "hook_password_verification_attempt_secrets": { "type": "string", "nullable": true }, - "sms_test_otp": { + "hook_send_sms_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_send_sms_uri": { "type": "string", "nullable": true }, - "sms_test_otp_valid_until": { + "hook_send_sms_secrets": { "type": "string", "nullable": true }, - "sms_textlocal_api_key": { + "hook_send_email_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_send_email_uri": { "type": "string", "nullable": true }, - "sms_textlocal_sender": { + "hook_send_email_secrets": { "type": "string", "nullable": true }, - "sms_twilio_account_sid": { + "hook_before_user_created_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_before_user_created_uri": { "type": "string", "nullable": true }, - "sms_twilio_auth_token": { + "hook_before_user_created_secrets": { "type": "string", "nullable": true }, - "sms_twilio_content_sid": { + "jwt_exp": { + "type": "integer", + "nullable": true + }, + "mailer_allow_unverified_email_sign_ins": { + "type": "boolean", + "nullable": true + }, + "mailer_autoconfirm": { + "type": "boolean", + "nullable": true + }, + "mailer_otp_exp": { + "type": "integer" + }, + "mailer_otp_length": { + "type": "integer", + "nullable": true + }, + "mailer_secure_email_change_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_subjects_confirmation": { "type": "string", "nullable": true }, - "sms_twilio_message_service_sid": { + "mailer_subjects_email_change": { "type": "string", "nullable": true }, - "sms_twilio_verify_account_sid": { + "mailer_subjects_invite": { "type": "string", "nullable": true }, - "sms_twilio_verify_auth_token": { + "mailer_subjects_magic_link": { "type": "string", "nullable": true }, - "sms_twilio_verify_message_service_sid": { + "mailer_subjects_reauthentication": { "type": "string", "nullable": true }, - "sms_vonage_api_key": { + "mailer_subjects_recovery": { "type": "string", "nullable": true }, - "sms_vonage_api_secret": { + "mailer_templates_confirmation_content": { "type": "string", "nullable": true }, - "sms_vonage_from": { + "mailer_templates_email_change_content": { "type": "string", "nullable": true }, - "smtp_admin_email": { + "mailer_templates_invite_content": { "type": "string", "nullable": true }, - "smtp_host": { + "mailer_templates_magic_link_content": { "type": "string", "nullable": true }, - "smtp_pass": { + "mailer_templates_reauthentication_content": { "type": "string", "nullable": true }, - "smtp_port": { + "mailer_templates_recovery_content": { "type": "string", "nullable": true }, - "smtp_sender_name": { + "mfa_max_enrolled_factors": { + "type": "integer", + "nullable": true + }, + "mfa_totp_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_totp_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_phone_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_phone_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_web_authn_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_web_authn_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_phone_otp_length": { + "type": "integer" + }, + "mfa_phone_template": { "type": "string", "nullable": true }, - "smtp_user": { + "mfa_phone_max_frequency": { + "type": "integer", + "nullable": true + }, + "password_hibp_enabled": { + "type": "boolean", + "nullable": true + }, + "password_min_length": { + "type": "integer", + "nullable": true + }, + "password_required_characters": { "type": "string", + "enum": [ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", + "" + ], "nullable": true }, - "uri_allow_list": { + "rate_limit_anonymous_users": { + "type": "integer", + "nullable": true + }, + "rate_limit_email_sent": { + "type": "integer", + "nullable": true + }, + "rate_limit_sms_sent": { + "type": "integer", + "nullable": true + }, + "rate_limit_token_refresh": { + "type": "integer", + "nullable": true + }, + "rate_limit_verify": { + "type": "integer", + "nullable": true + }, + "rate_limit_otp": { + "type": "integer", + "nullable": true + }, + "rate_limit_web3": { + "type": "integer", + "nullable": true + }, + "refresh_token_rotation_enabled": { + "type": "boolean", + "nullable": true + }, + "saml_enabled": { + "type": "boolean", + "nullable": true + }, + "saml_external_url": { + "type": "string", + "nullable": true + }, + "saml_allow_encrypted_assertions": { + "type": "boolean", + "nullable": true + }, + "security_captcha_enabled": { + "type": "boolean", + "nullable": true + }, + "security_captcha_provider": { + "type": "string", + "enum": ["turnstile", "hcaptcha"], + "nullable": true + }, + "security_captcha_secret": { + "type": "string", + "nullable": true + }, + "security_manual_linking_enabled": { + "type": "boolean", + "nullable": true + }, + "security_refresh_token_reuse_interval": { + "type": "integer", + "nullable": true + }, + "security_update_password_require_reauthentication": { + "type": "boolean", + "nullable": true + }, + "sessions_inactivity_timeout": { + "type": "integer", + "nullable": true + }, + "sessions_single_per_user": { + "type": "boolean", + "nullable": true + }, + "sessions_tags": { + "type": "string", + "nullable": true + }, + "sessions_timebox": { + "type": "integer", + "nullable": true + }, + "site_url": { + "type": "string", + "nullable": true + }, + "sms_autoconfirm": { + "type": "boolean", + "nullable": true + }, + "sms_max_frequency": { + "type": "integer", + "nullable": true + }, + "sms_messagebird_access_key": { + "type": "string", + "nullable": true + }, + "sms_messagebird_originator": { + "type": "string", + "nullable": true + }, + "sms_otp_exp": { + "type": "integer", + "nullable": true + }, + "sms_otp_length": { + "type": "integer" + }, + "sms_provider": { + "type": "string", + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "nullable": true + }, + "sms_template": { + "type": "string", + "nullable": true + }, + "sms_test_otp": { + "type": "string", + "nullable": true + }, + "sms_test_otp_valid_until": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "sms_textlocal_api_key": { + "type": "string", + "nullable": true + }, + "sms_textlocal_sender": { + "type": "string", + "nullable": true + }, + "sms_twilio_account_sid": { + "type": "string", + "nullable": true + }, + "sms_twilio_auth_token": { + "type": "string", + "nullable": true + }, + "sms_twilio_content_sid": { + "type": "string", + "nullable": true + }, + "sms_twilio_message_service_sid": { + "type": "string", + "nullable": true + }, + "sms_twilio_verify_account_sid": { + "type": "string", + "nullable": true + }, + "sms_twilio_verify_auth_token": { + "type": "string", + "nullable": true + }, + "sms_twilio_verify_message_service_sid": { + "type": "string", + "nullable": true + }, + "sms_vonage_api_key": { + "type": "string", + "nullable": true + }, + "sms_vonage_api_secret": { + "type": "string", + "nullable": true + }, + "sms_vonage_from": { + "type": "string", + "nullable": true + }, + "smtp_admin_email": { + "type": "string", + "format": "email", + "nullable": true + }, + "smtp_host": { + "type": "string", + "nullable": true + }, + "smtp_max_frequency": { + "type": "integer", + "nullable": true + }, + "smtp_pass": { + "type": "string", + "nullable": true + }, + "smtp_port": { + "type": "string", + "nullable": true + }, + "smtp_sender_name": { + "type": "string", + "nullable": true + }, + "smtp_user": { + "type": "string", + "nullable": true + }, + "uri_allow_list": { "type": "string", "nullable": true } @@ -6182,26 +7662,6 @@ "required": [ "api_max_request_duration", "db_max_pool_size", - "jwt_exp", - "mailer_otp_exp", - "mailer_otp_length", - "mfa_max_enrolled_factors", - "mfa_phone_otp_length", - "mfa_phone_max_frequency", - "password_min_length", - "rate_limit_anonymous_users", - "rate_limit_email_sent", - "rate_limit_sms_sent", - "rate_limit_token_refresh", - "rate_limit_verify", - "rate_limit_otp", - "security_refresh_token_reuse_interval", - "sessions_inactivity_timeout", - "sessions_timebox", - "sms_max_frequency", - "sms_otp_exp", - "sms_otp_length", - "smtp_max_frequency", "disable_signup", "external_anonymous_users_enabled", "external_apple_additional_client_ids", @@ -6270,6 +7730,8 @@ "external_workos_enabled", "external_workos_secret", "external_workos_url", + "external_web3_solana_enabled", + "external_web3_ethereum_enabled", "external_zoom_client_id", "external_zoom_enabled", "external_zoom_secret", @@ -6288,8 +7750,14 @@ "hook_send_email_enabled", "hook_send_email_uri", "hook_send_email_secrets", + "hook_before_user_created_enabled", + "hook_before_user_created_uri", + "hook_before_user_created_secrets", + "jwt_exp", "mailer_allow_unverified_email_sign_ins", "mailer_autoconfirm", + "mailer_otp_exp", + "mailer_otp_length", "mailer_secure_email_change_enabled", "mailer_subjects_confirmation", "mailer_subjects_email_change", @@ -6303,15 +7771,26 @@ "mailer_templates_magic_link_content", "mailer_templates_reauthentication_content", "mailer_templates_recovery_content", + "mfa_max_enrolled_factors", "mfa_totp_enroll_enabled", "mfa_totp_verify_enabled", "mfa_phone_enroll_enabled", "mfa_phone_verify_enabled", "mfa_web_authn_enroll_enabled", "mfa_web_authn_verify_enabled", + "mfa_phone_otp_length", "mfa_phone_template", + "mfa_phone_max_frequency", "password_hibp_enabled", + "password_min_length", "password_required_characters", + "rate_limit_anonymous_users", + "rate_limit_email_sent", + "rate_limit_sms_sent", + "rate_limit_token_refresh", + "rate_limit_verify", + "rate_limit_otp", + "rate_limit_web3", "refresh_token_rotation_enabled", "saml_enabled", "saml_external_url", @@ -6320,13 +7799,19 @@ "security_captcha_provider", "security_captcha_secret", "security_manual_linking_enabled", + "security_refresh_token_reuse_interval", "security_update_password_require_reauthentication", + "sessions_inactivity_timeout", "sessions_single_per_user", "sessions_tags", + "sessions_timebox", "site_url", "sms_autoconfirm", + "sms_max_frequency", "sms_messagebird_access_key", "sms_messagebird_originator", + "sms_otp_exp", + "sms_otp_length", "sms_provider", "sms_template", "sms_test_otp", @@ -6345,6 +7830,7 @@ "sms_vonage_from", "smtp_admin_email", "smtp_host", + "smtp_max_frequency", "smtp_pass", "smtp_port", "smtp_sender_name", @@ -6381,6 +7867,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -6392,220 +7879,230 @@ "schema": { "type": "object", "properties": { + "site_url": { + "type": "string", + "pattern": "^[^,]+$", + "nullable": true + }, + "disable_signup": { + "type": "boolean", + "nullable": true + }, "jwt_exp": { "type": "integer", "minimum": 0, - "maximum": 604800 + "maximum": 604800, + "nullable": true }, - "smtp_max_frequency": { - "type": "integer", - "minimum": 0, - "maximum": 32767 + "smtp_admin_email": { + "type": "string", + "format": "email", + "nullable": true }, - "mfa_max_enrolled_factors": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647 + "smtp_host": { + "type": "string", + "nullable": true }, - "sessions_timebox": { - "type": "integer", - "minimum": 0 + "smtp_port": { + "type": "string", + "nullable": true }, - "sessions_inactivity_timeout": { - "type": "integer", - "minimum": 0 + "smtp_user": { + "type": "string", + "nullable": true }, - "rate_limit_anonymous_users": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647 + "smtp_pass": { + "type": "string", + "nullable": true }, - "rate_limit_email_sent": { + "smtp_max_frequency": { "type": "integer", - "minimum": 1, - "maximum": 2147483647 - }, - "rate_limit_sms_sent": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647 - }, - "rate_limit_verify": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647 - }, - "rate_limit_token_refresh": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647 - }, - "rate_limit_otp": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647 - }, - "password_min_length": { - "type": "integer", - "minimum": 6, - "maximum": 32767 - }, - "security_refresh_token_reuse_interval": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647 - }, - "mailer_otp_exp": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647 - }, - "mailer_otp_length": { - "type": "integer", - "minimum": 6, - "maximum": 10 - }, - "sms_max_frequency": { - "type": "integer", - "minimum": 0, - "maximum": 32767 - }, - "sms_otp_exp": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647 - }, - "sms_otp_length": { - "type": "integer", - "minimum": 0, - "maximum": 32767 - }, - "db_max_pool_size": { - "type": "integer" - }, - "api_max_request_duration": { - "type": "integer" - }, - "mfa_phone_max_frequency": { - "type": "integer", - "minimum": 0, - "maximum": 32767 - }, - "mfa_phone_otp_length": { - "type": "integer", - "minimum": 0, - "maximum": 32767 - }, - "site_url": { - "type": "string", - "pattern": "/^[^,]+$/" - }, - "disable_signup": { - "type": "boolean" - }, - "smtp_admin_email": { - "type": "string" - }, - "smtp_host": { - "type": "string" - }, - "smtp_port": { - "type": "string" - }, - "smtp_user": { - "type": "string" - }, - "smtp_pass": { - "type": "string" + "minimum": 0, + "maximum": 32767, + "nullable": true }, "smtp_sender_name": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_allow_unverified_email_sign_ins": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mailer_autoconfirm": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mailer_subjects_invite": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_subjects_confirmation": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_subjects_recovery": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_subjects_email_change": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_subjects_magic_link": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_subjects_reauthentication": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_invite_content": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_confirmation_content": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_recovery_content": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_email_change_content": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_magic_link_content": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_reauthentication_content": { - "type": "string" + "type": "string", + "nullable": true + }, + "mfa_max_enrolled_factors": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647, + "nullable": true }, "uri_allow_list": { - "type": "string" + "type": "string", + "nullable": true }, "external_anonymous_users_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_email_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_phone_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "saml_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "saml_external_url": { "type": "string", - "pattern": "/^[^,]+$/" + "pattern": "^[^,]+$", + "nullable": true }, "security_captcha_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "security_captcha_provider": { - "type": "string" + "type": "string", + "enum": ["turnstile", "hcaptcha"], + "nullable": true }, "security_captcha_secret": { - "type": "string" + "type": "string", + "nullable": true + }, + "sessions_timebox": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "sessions_inactivity_timeout": { + "type": "integer", + "minimum": 0, + "nullable": true }, "sessions_single_per_user": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "sessions_tags": { "type": "string", - "pattern": "/^\\s*([a-z0-9_-]+(\\s*,+\\s*)?)*\\s*$/i" + "pattern": "^\\s*([a-zA-Z0-9_-]+(\\s*,+\\s*)?)*\\s*$", + "nullable": true + }, + "rate_limit_anonymous_users": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_email_sent": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_sms_sent": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_verify": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_token_refresh": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_otp": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_web3": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true }, "mailer_secure_email_change_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "refresh_token_rotation_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "password_hibp_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true + }, + "password_min_length": { + "type": "integer", + "minimum": 6, + "maximum": 32767, + "nullable": true }, "password_required_characters": { "type": "string", @@ -6614,338 +8111,525 @@ "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", "" - ] + ], + "nullable": true }, "security_manual_linking_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "security_update_password_require_reauthentication": { - "type": "boolean" - }, - "sms_autoconfirm": { - "type": "boolean" + "type": "boolean", + "nullable": true }, - "sms_provider": { - "type": "string" + "security_refresh_token_reuse_interval": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647, + "nullable": true }, - "sms_messagebird_access_key": { - "type": "string" + "mailer_otp_exp": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647 }, - "sms_messagebird_originator": { - "type": "string" + "mailer_otp_length": { + "type": "integer", + "minimum": 6, + "maximum": 10, + "nullable": true }, - "sms_test_otp": { + "sms_autoconfirm": { + "type": "boolean", + "nullable": true + }, + "sms_max_frequency": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true + }, + "sms_otp_exp": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647, + "nullable": true + }, + "sms_otp_length": { + "type": "integer", + "minimum": 0, + "maximum": 32767 + }, + "sms_provider": { + "type": "string", + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "nullable": true + }, + "sms_messagebird_access_key": { + "type": "string", + "nullable": true + }, + "sms_messagebird_originator": { + "type": "string", + "nullable": true + }, + "sms_test_otp": { "type": "string", - "pattern": "/^([0-9]{1,15}=[0-9]+,?)*$/" + "pattern": "^([0-9]{1,15}=[0-9]+,?)*$", + "nullable": true }, "sms_test_otp_valid_until": { - "type": "string" + "type": "string", + "format": "date-time", + "nullable": true }, "sms_textlocal_api_key": { - "type": "string" + "type": "string", + "nullable": true }, "sms_textlocal_sender": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_account_sid": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_auth_token": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_content_sid": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_message_service_sid": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_verify_account_sid": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_verify_auth_token": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_verify_message_service_sid": { - "type": "string" + "type": "string", + "nullable": true }, "sms_vonage_api_key": { - "type": "string" + "type": "string", + "nullable": true }, "sms_vonage_api_secret": { - "type": "string" + "type": "string", + "nullable": true }, "sms_vonage_from": { - "type": "string" + "type": "string", + "nullable": true }, "sms_template": { - "type": "string" + "type": "string", + "nullable": true }, "hook_mfa_verification_attempt_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "hook_mfa_verification_attempt_uri": { - "type": "string" + "type": "string", + "nullable": true }, "hook_mfa_verification_attempt_secrets": { - "type": "string" + "type": "string", + "nullable": true }, "hook_password_verification_attempt_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "hook_password_verification_attempt_uri": { - "type": "string" + "type": "string", + "nullable": true }, "hook_password_verification_attempt_secrets": { - "type": "string" + "type": "string", + "nullable": true }, "hook_custom_access_token_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "hook_custom_access_token_uri": { - "type": "string" + "type": "string", + "nullable": true }, "hook_custom_access_token_secrets": { - "type": "string" + "type": "string", + "nullable": true }, "hook_send_sms_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "hook_send_sms_uri": { - "type": "string" + "type": "string", + "nullable": true }, "hook_send_sms_secrets": { - "type": "string" + "type": "string", + "nullable": true }, "hook_send_email_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "hook_send_email_uri": { - "type": "string" + "type": "string", + "nullable": true }, "hook_send_email_secrets": { - "type": "string" + "type": "string", + "nullable": true + }, + "hook_before_user_created_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_before_user_created_uri": { + "type": "string", + "nullable": true + }, + "hook_before_user_created_secrets": { + "type": "string", + "nullable": true }, "external_apple_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_apple_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_apple_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_apple_additional_client_ids": { - "type": "string" + "type": "string", + "nullable": true }, "external_azure_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_azure_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_azure_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_azure_url": { - "type": "string" + "type": "string", + "nullable": true }, "external_bitbucket_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_bitbucket_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_bitbucket_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_discord_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_discord_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_discord_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_facebook_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_facebook_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_facebook_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_figma_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_figma_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_figma_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_github_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_github_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_github_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_gitlab_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_gitlab_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_gitlab_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_gitlab_url": { - "type": "string" + "type": "string", + "nullable": true }, "external_google_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_google_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_google_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_google_additional_client_ids": { - "type": "string" + "type": "string", + "nullable": true }, "external_google_skip_nonce_check": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_kakao_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_kakao_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_kakao_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_keycloak_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_keycloak_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_keycloak_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_keycloak_url": { - "type": "string" + "type": "string", + "nullable": true }, "external_linkedin_oidc_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_linkedin_oidc_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_linkedin_oidc_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_slack_oidc_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_slack_oidc_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_slack_oidc_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_notion_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_notion_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_notion_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_slack_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_slack_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_slack_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_spotify_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_spotify_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_spotify_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_twitch_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_twitch_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_twitch_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_twitter_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_twitter_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_twitter_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_workos_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_workos_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_workos_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_workos_url": { - "type": "string" + "type": "string", + "nullable": true + }, + "external_web3_solana_enabled": { + "type": "boolean", + "nullable": true + }, + "external_web3_ethereum_enabled": { + "type": "boolean", + "nullable": true }, "external_zoom_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_zoom_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_zoom_secret": { - "type": "string" + "type": "string", + "nullable": true + }, + "db_max_pool_size": { + "type": "integer", + "nullable": true + }, + "api_max_request_duration": { + "type": "integer", + "nullable": true }, "mfa_totp_enroll_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mfa_totp_verify_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mfa_web_authn_enroll_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mfa_web_authn_verify_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mfa_phone_enroll_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mfa_phone_verify_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true + }, + "mfa_phone_max_frequency": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true + }, + "mfa_phone_otp_length": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true }, "mfa_phone_template": { - "type": "string" + "type": "string", + "nullable": true } } } @@ -6968,83 +8652,6 @@ "type": "integer", "nullable": true }, - "jwt_exp": { - "type": "integer", - "nullable": true - }, - "mailer_otp_exp": { - "type": "integer" - }, - "mailer_otp_length": { - "type": "integer", - "nullable": true - }, - "mfa_max_enrolled_factors": { - "type": "integer", - "nullable": true - }, - "mfa_phone_otp_length": { - "type": "integer" - }, - "mfa_phone_max_frequency": { - "type": "integer", - "nullable": true - }, - "password_min_length": { - "type": "integer", - "nullable": true - }, - "rate_limit_anonymous_users": { - "type": "integer", - "nullable": true - }, - "rate_limit_email_sent": { - "type": "integer", - "nullable": true - }, - "rate_limit_sms_sent": { - "type": "integer", - "nullable": true - }, - "rate_limit_token_refresh": { - "type": "integer", - "nullable": true - }, - "rate_limit_verify": { - "type": "integer", - "nullable": true - }, - "rate_limit_otp": { - "type": "integer", - "nullable": true - }, - "security_refresh_token_reuse_interval": { - "type": "integer", - "nullable": true - }, - "sessions_inactivity_timeout": { - "type": "integer", - "nullable": true - }, - "sessions_timebox": { - "type": "integer", - "nullable": true - }, - "sms_max_frequency": { - "type": "integer", - "nullable": true - }, - "sms_otp_exp": { - "type": "integer", - "nullable": true - }, - "sms_otp_length": { - "type": "integer" - }, - "smtp_max_frequency": { - "type": "integer", - "nullable": true - }, "disable_signup": { "type": "boolean", "nullable": true @@ -7317,6 +8924,14 @@ "type": "string", "nullable": true }, + "external_web3_solana_enabled": { + "type": "boolean", + "nullable": true + }, + "external_web3_ethereum_enabled": { + "type": "boolean", + "nullable": true + }, "external_zoom_client_id": { "type": "string", "nullable": true @@ -7389,6 +9004,22 @@ "type": "string", "nullable": true }, + "hook_before_user_created_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_before_user_created_uri": { + "type": "string", + "nullable": true + }, + "hook_before_user_created_secrets": { + "type": "string", + "nullable": true + }, + "jwt_exp": { + "type": "integer", + "nullable": true + }, "mailer_allow_unverified_email_sign_ins": { "type": "boolean", "nullable": true @@ -7397,6 +9028,13 @@ "type": "boolean", "nullable": true }, + "mailer_otp_exp": { + "type": "integer" + }, + "mailer_otp_length": { + "type": "integer", + "nullable": true + }, "mailer_secure_email_change_enabled": { "type": "boolean", "nullable": true @@ -7449,6 +9087,10 @@ "type": "string", "nullable": true }, + "mfa_max_enrolled_factors": { + "type": "integer", + "nullable": true + }, "mfa_totp_enroll_enabled": { "type": "boolean", "nullable": true @@ -7473,40 +9115,86 @@ "type": "boolean", "nullable": true }, + "mfa_phone_otp_length": { + "type": "integer" + }, "mfa_phone_template": { "type": "string", "nullable": true }, + "mfa_phone_max_frequency": { + "type": "integer", + "nullable": true + }, "password_hibp_enabled": { "type": "boolean", "nullable": true }, + "password_min_length": { + "type": "integer", + "nullable": true + }, "password_required_characters": { "type": "string", + "enum": [ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", + "" + ], "nullable": true }, - "refresh_token_rotation_enabled": { - "type": "boolean", + "rate_limit_anonymous_users": { + "type": "integer", "nullable": true }, - "saml_enabled": { - "type": "boolean", + "rate_limit_email_sent": { + "type": "integer", "nullable": true }, - "saml_external_url": { - "type": "string", + "rate_limit_sms_sent": { + "type": "integer", "nullable": true }, - "saml_allow_encrypted_assertions": { - "type": "boolean", + "rate_limit_token_refresh": { + "type": "integer", "nullable": true }, - "security_captcha_enabled": { + "rate_limit_verify": { + "type": "integer", + "nullable": true + }, + "rate_limit_otp": { + "type": "integer", + "nullable": true + }, + "rate_limit_web3": { + "type": "integer", + "nullable": true + }, + "refresh_token_rotation_enabled": { + "type": "boolean", + "nullable": true + }, + "saml_enabled": { + "type": "boolean", + "nullable": true + }, + "saml_external_url": { + "type": "string", + "nullable": true + }, + "saml_allow_encrypted_assertions": { + "type": "boolean", + "nullable": true + }, + "security_captcha_enabled": { "type": "boolean", "nullable": true }, "security_captcha_provider": { "type": "string", + "enum": ["turnstile", "hcaptcha"], "nullable": true }, "security_captcha_secret": { @@ -7517,10 +9205,18 @@ "type": "boolean", "nullable": true }, + "security_refresh_token_reuse_interval": { + "type": "integer", + "nullable": true + }, "security_update_password_require_reauthentication": { "type": "boolean", "nullable": true }, + "sessions_inactivity_timeout": { + "type": "integer", + "nullable": true + }, "sessions_single_per_user": { "type": "boolean", "nullable": true @@ -7529,6 +9225,10 @@ "type": "string", "nullable": true }, + "sessions_timebox": { + "type": "integer", + "nullable": true + }, "site_url": { "type": "string", "nullable": true @@ -7537,6 +9237,10 @@ "type": "boolean", "nullable": true }, + "sms_max_frequency": { + "type": "integer", + "nullable": true + }, "sms_messagebird_access_key": { "type": "string", "nullable": true @@ -7545,8 +9249,16 @@ "type": "string", "nullable": true }, + "sms_otp_exp": { + "type": "integer", + "nullable": true + }, + "sms_otp_length": { + "type": "integer" + }, "sms_provider": { "type": "string", + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], "nullable": true }, "sms_template": { @@ -7559,6 +9271,7 @@ }, "sms_test_otp_valid_until": { "type": "string", + "format": "date-time", "nullable": true }, "sms_textlocal_api_key": { @@ -7611,12 +9324,17 @@ }, "smtp_admin_email": { "type": "string", + "format": "email", "nullable": true }, "smtp_host": { "type": "string", "nullable": true }, + "smtp_max_frequency": { + "type": "integer", + "nullable": true + }, "smtp_pass": { "type": "string", "nullable": true @@ -7641,26 +9359,6 @@ "required": [ "api_max_request_duration", "db_max_pool_size", - "jwt_exp", - "mailer_otp_exp", - "mailer_otp_length", - "mfa_max_enrolled_factors", - "mfa_phone_otp_length", - "mfa_phone_max_frequency", - "password_min_length", - "rate_limit_anonymous_users", - "rate_limit_email_sent", - "rate_limit_sms_sent", - "rate_limit_token_refresh", - "rate_limit_verify", - "rate_limit_otp", - "security_refresh_token_reuse_interval", - "sessions_inactivity_timeout", - "sessions_timebox", - "sms_max_frequency", - "sms_otp_exp", - "sms_otp_length", - "smtp_max_frequency", "disable_signup", "external_anonymous_users_enabled", "external_apple_additional_client_ids", @@ -7729,6 +9427,8 @@ "external_workos_enabled", "external_workos_secret", "external_workos_url", + "external_web3_solana_enabled", + "external_web3_ethereum_enabled", "external_zoom_client_id", "external_zoom_enabled", "external_zoom_secret", @@ -7747,8 +9447,14 @@ "hook_send_email_enabled", "hook_send_email_uri", "hook_send_email_secrets", + "hook_before_user_created_enabled", + "hook_before_user_created_uri", + "hook_before_user_created_secrets", + "jwt_exp", "mailer_allow_unverified_email_sign_ins", "mailer_autoconfirm", + "mailer_otp_exp", + "mailer_otp_length", "mailer_secure_email_change_enabled", "mailer_subjects_confirmation", "mailer_subjects_email_change", @@ -7762,15 +9468,26 @@ "mailer_templates_magic_link_content", "mailer_templates_reauthentication_content", "mailer_templates_recovery_content", + "mfa_max_enrolled_factors", "mfa_totp_enroll_enabled", "mfa_totp_verify_enabled", "mfa_phone_enroll_enabled", "mfa_phone_verify_enabled", "mfa_web_authn_enroll_enabled", "mfa_web_authn_verify_enabled", + "mfa_phone_otp_length", "mfa_phone_template", + "mfa_phone_max_frequency", "password_hibp_enabled", + "password_min_length", "password_required_characters", + "rate_limit_anonymous_users", + "rate_limit_email_sent", + "rate_limit_sms_sent", + "rate_limit_token_refresh", + "rate_limit_verify", + "rate_limit_otp", + "rate_limit_web3", "refresh_token_rotation_enabled", "saml_enabled", "saml_external_url", @@ -7779,13 +9496,19 @@ "security_captcha_provider", "security_captcha_secret", "security_manual_linking_enabled", + "security_refresh_token_reuse_interval", "security_update_password_require_reauthentication", + "sessions_inactivity_timeout", "sessions_single_per_user", "sessions_tags", + "sessions_timebox", "site_url", "sms_autoconfirm", + "sms_max_frequency", "sms_messagebird_access_key", "sms_messagebird_originator", + "sms_otp_exp", + "sms_otp_length", "sms_provider", "sms_template", "sms_test_otp", @@ -7804,6 +9527,7 @@ "sms_vonage_from", "smtp_admin_email", "smtp_host", + "smtp_max_frequency", "smtp_pass", "smtp_port", "smtp_sender_name", @@ -7816,12 +9540,1435 @@ }, "403": { "description": "" - }, - "500": { - "description": "Failed to update project's auth config" + }, + "500": { + "description": "Failed to update project's auth config" + } + }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/config/auth/third-party-auth": { + "post": { + "operationId": "v1-create-project-tpa-integration", + "summary": "Creates a new third-party auth integration", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "oidc_issuer_url": { + "type": "string" + }, + "jwks_url": { + "type": "string" + }, + "custom_jwks": {} + } + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "nullable": true + }, + "resolved_jwks": { + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + }, + "get": { + "operationId": "v1-list-project-tpa-integrations", + "summary": "Lists all third-party auth integrations", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "nullable": true + }, + "resolved_jwks": { + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] + } + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}": { + "delete": { + "operationId": "v1-delete-project-tpa-integration", + "summary": "Removes a third-party auth integration", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "tpa_id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "nullable": true + }, + "resolved_jwks": { + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + }, + "get": { + "operationId": "v1-get-project-tpa-integration", + "summary": "Get a third-party integration", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "tpa_id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "nullable": true + }, + "resolved_jwks": { + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/pause": { + "post": { + "operationId": "v1-pause-a-project", + "summary": "Pauses the given project", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "403": { + "description": "" + } + }, + "tags": ["Projects"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/restore": { + "get": { + "operationId": "v1-list-available-restore-versions", + "summary": "Lists available restore versions for the given project", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "available_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + }, + "postgres_engine": { + "type": "string", + "enum": ["13", "14", "15", "17", "17-oriole"] + } + }, + "required": ["version", "release_channel", "postgres_engine"] + } + } + }, + "required": ["available_versions"] + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Projects"], + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "operationId": "v1-restore-a-project", + "summary": "Restores the given project", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "403": { + "description": "" + } + }, + "tags": ["Projects"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/restore/cancel": { + "post": { + "operationId": "v1-cancel-a-project-restoration", + "summary": "Cancels the given project restoration", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "403": { + "description": "" + } + }, + "tags": ["Projects"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/billing/addons": { + "get": { + "operationId": "v1-list-project-addons", + "summary": "Lists project addons", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "selected_addons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain" + ] + }, + "variant": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { + "type": "string", + "enum": ["cd_default"] + }, + { + "type": "string", + "enum": ["pitr_7", "pitr_14", "pitr_28"] + }, + { + "type": "string", + "enum": ["ipv4_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_phone_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_web_authn_default"] + }, + { + "type": "string", + "enum": ["log_drain_default"] + } + ] + }, + "name": { + "type": "string" + }, + "price": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["fixed", "usage"] + }, + "interval": { + "type": "string", + "enum": ["monthly", "hourly"] + }, + "amount": { + "type": "number" + } + }, + "required": ["description", "type", "interval", "amount"] + }, + "meta": { + "description": "Any JSON-serializable value" + } + }, + "required": ["id", "name", "price"] + } + }, + "required": ["type", "variant"] + } + }, + "available_addons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain" + ] + }, + "name": { + "type": "string" + }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { + "type": "string", + "enum": ["cd_default"] + }, + { + "type": "string", + "enum": ["pitr_7", "pitr_14", "pitr_28"] + }, + { + "type": "string", + "enum": ["ipv4_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_phone_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_web_authn_default"] + }, + { + "type": "string", + "enum": ["log_drain_default"] + } + ] + }, + "name": { + "type": "string" + }, + "price": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["fixed", "usage"] + }, + "interval": { + "type": "string", + "enum": ["monthly", "hourly"] + }, + "amount": { + "type": "number" + } + }, + "required": ["description", "type", "interval", "amount"] + }, + "meta": { + "description": "Any JSON-serializable value" + } + }, + "required": ["id", "name", "price"] + } + } + }, + "required": ["type", "name", "variants"] + } + } + }, + "required": ["selected_addons", "available_addons"] + } + } + } + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to list project addons" + } + }, + "tags": ["Billing"], + "security": [ + { + "bearer": [] + } + ] + }, + "patch": { + "operationId": "v1-apply-project-addon", + "summary": "Applies project addon", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "addon_variant": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { + "type": "string", + "enum": ["cd_default"] + }, + { + "type": "string", + "enum": ["pitr_7", "pitr_14", "pitr_28"] + }, + { + "type": "string", + "enum": ["ipv4_default"] + } + ] + }, + "addon_type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain" + ] + } + }, + "required": ["addon_variant", "addon_type"] + } + } + } + }, + "responses": { + "200": { + "description": "" + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to apply project addon" + } + }, + "tags": ["Billing"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/billing/addons/{addon_variant}": { + "delete": { + "operationId": "v1-remove-project-addon", + "summary": "Removes project addon", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "addon_variant", + "required": true, + "in": "path", + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { + "type": "string", + "enum": ["cd_default"] + }, + { + "type": "string", + "enum": ["pitr_7", "pitr_14", "pitr_28"] + }, + { + "type": "string", + "enum": ["ipv4_default"] + } + ], + "schema": {} + } + ], + "responses": { + "200": { + "description": "" + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to remove project addon" + } + }, + "tags": ["Billing"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/claim-token": { + "get": { + "operationId": "v1-get-project-claim-token", + "x-internal": true, + "summary": "Gets project claim token", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token_alias": { + "type": "string" + }, + "expires_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "created_by": { + "type": "string", + "format": "uuid" + } + }, + "required": ["token_alias", "expires_at", "created_at", "created_by"] + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Projects"], + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "operationId": "v1-create-project-claim-token", + "x-internal": true, + "summary": "Creates project claim token", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "token_alias": { + "type": "string" + }, + "expires_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "created_by": { + "type": "string", + "format": "uuid" + } + }, + "required": ["token", "token_alias", "expires_at", "created_at", "created_by"] + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Projects"], + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "operationId": "v1-delete-project-claim-token", + "x-internal": true, + "summary": "Revokes project claim token", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "" + }, + "403": { + "description": "" + } + }, + "tags": ["Projects"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/advisors/performance": { + "get": { + "operationId": "v1-get-performance-advisors", + "summary": "Gets project performance advisors.", + "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", + "deprecated": true, + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "lints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "unindexed_foreign_keys", + "auth_users_exposed", + "auth_rls_initplan", + "no_primary_key", + "unused_index", + "multiple_permissive_policies", + "policy_exists_rls_disabled", + "rls_enabled_no_policy", + "duplicate_index", + "security_definer_view", + "function_search_path_mutable", + "rls_disabled_in_public", + "extension_in_public", + "rls_references_user_metadata", + "materialized_view_in_api", + "foreign_table_in_api", + "unsupported_reg_types", + "auth_otp_long_expiry", + "auth_otp_short_length", + "ssl_not_enforced", + "network_restrictions_not_set", + "password_requirements_min_length", + "pitr_not_enabled", + "auth_leaked_password_protection", + "auth_insufficient_mfa_options", + "auth_password_policy_missing", + "leaked_service_key", + "no_backup_admin" + ] + }, + "title": { + "type": "string" + }, + "level": { + "type": "string", + "enum": ["ERROR", "WARN", "INFO"] + }, + "facing": { + "type": "string", + "enum": ["EXTERNAL"] + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "enum": ["PERFORMANCE", "SECURITY"] + } + }, + "description": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "remediation": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": { + "schema": { + "type": "string" + }, + "name": { + "type": "string" + }, + "entity": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "table", + "view", + "auth", + "function", + "extension", + "compliance" + ] + }, + "fkey_name": { + "type": "string" + }, + "fkey_columns": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "cache_key": { + "type": "string" + } + }, + "required": [ + "name", + "title", + "level", + "facing", + "categories", + "description", + "detail", + "remediation", + "cache_key" + ] + } + } + }, + "required": ["lints"] + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Advisors"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/advisors/security": { + "get": { + "operationId": "v1-get-security-advisors", + "summary": "Gets project security advisors.", + "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", + "deprecated": true, + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "lint_type", + "required": false, + "in": "query", + "schema": { + "enum": ["sql"], + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "lints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "unindexed_foreign_keys", + "auth_users_exposed", + "auth_rls_initplan", + "no_primary_key", + "unused_index", + "multiple_permissive_policies", + "policy_exists_rls_disabled", + "rls_enabled_no_policy", + "duplicate_index", + "security_definer_view", + "function_search_path_mutable", + "rls_disabled_in_public", + "extension_in_public", + "rls_references_user_metadata", + "materialized_view_in_api", + "foreign_table_in_api", + "unsupported_reg_types", + "auth_otp_long_expiry", + "auth_otp_short_length", + "ssl_not_enforced", + "network_restrictions_not_set", + "password_requirements_min_length", + "pitr_not_enabled", + "auth_leaked_password_protection", + "auth_insufficient_mfa_options", + "auth_password_policy_missing", + "leaked_service_key", + "no_backup_admin" + ] + }, + "title": { + "type": "string" + }, + "level": { + "type": "string", + "enum": ["ERROR", "WARN", "INFO"] + }, + "facing": { + "type": "string", + "enum": ["EXTERNAL"] + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "enum": ["PERFORMANCE", "SECURITY"] + } + }, + "description": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "remediation": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": { + "schema": { + "type": "string" + }, + "name": { + "type": "string" + }, + "entity": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "table", + "view", + "auth", + "function", + "extension", + "compliance" + ] + }, + "fkey_name": { + "type": "string" + }, + "fkey_columns": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "cache_key": { + "type": "string" + } + }, + "required": [ + "name", + "title", + "level", + "facing", + "categories", + "description", + "detail", + "remediation", + "cache_key" + ] + } + } + }, + "required": ["lints"] + } + } + } + }, + "403": { + "description": "" } }, - "tags": ["Auth"], + "tags": ["Advisors"], "security": [ { "bearer": [] @@ -7829,10 +10976,11 @@ ] } }, - "/v1/projects/{ref}/config/auth/third-party-auth": { - "post": { - "operationId": "createTPAForProject", - "summary": "Creates a new third-party auth integration", + "/v1/projects/{ref}/analytics/endpoints/logs.all": { + "get": { + "operationId": "v1-get-project-logs", + "summary": "Gets project's logs", + "description": "Executes a SQL query on the project's logs.\n\nEither the 'iso_timestamp_start' and 'iso_timestamp_end' parameters must be provided.\nIf both are not provided, only the last 1 minute of logs will be queried.\nThe timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown.\n", "parameters": [ { "name": "ref", @@ -7842,73 +10990,102 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "oidc_issuer_url": { - "type": "string" - }, - "jwks_url": { - "type": "string" - }, - "custom_jwks": { - "type": "object" - } - } - } + }, + { + "name": "sql", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "iso_timestamp_start", + "required": false, + "in": "query", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "iso_timestamp_end", + "required": false, + "in": "query", + "schema": { + "format": "date-time", + "type": "string" } } - }, + ], "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "type": "object", - "nullable": true - }, - "resolved_jwks": { - "type": "object", - "nullable": true - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" + "result": { + "type": "array", + "items": {} }, - "resolved_at": { - "type": "string", - "nullable": true + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "location": { + "type": "string" + }, + "locationType": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "domain", + "location", + "locationType", + "message", + "reason" + ] + } + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": ["code", "errors", "message", "status"] + } + ] } - }, - "required": ["id", "type", "inserted_at", "updated_at"] + } } } } @@ -7917,16 +11094,18 @@ "description": "" } }, - "tags": ["Auth"], + "tags": ["Analytics"], "security": [ { "bearer": [] } ] - }, + } + }, + "/v1/projects/{ref}/analytics/endpoints/usage.api-counts": { "get": { - "operationId": "listTPAForProject", - "summary": "[Alpha] Lists all third-party auth integrations", + "operationId": "v1-get-project-usage-api-count", + "summary": "Gets project's usage api counts", "parameters": [ { "name": "ref", @@ -7936,6 +11115,16 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "interval", + "required": false, + "in": "query", + "schema": { + "enum": ["15min", "30min", "1hr", "3hr", "1day", "3day", "7day"], "type": "string" } } @@ -7946,44 +11135,91 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "type": "object", - "nullable": true - }, - "resolved_jwks": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { "type": "object", - "nullable": true - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "resolved_at": { - "type": "string", - "nullable": true + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "total_auth_requests": { + "type": "number" + }, + "total_realtime_requests": { + "type": "number" + }, + "total_rest_requests": { + "type": "number" + }, + "total_storage_requests": { + "type": "number" + } + }, + "required": [ + "timestamp", + "total_auth_requests", + "total_realtime_requests", + "total_rest_requests", + "total_storage_requests" + ] } }, - "required": ["id", "type", "inserted_at", "updated_at"] + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "location": { + "type": "string" + }, + "locationType": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "domain", + "location", + "locationType", + "message", + "reason" + ] + } + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": ["code", "errors", "message", "status"] + } + ] + } } } } @@ -7991,9 +11227,12 @@ }, "403": { "description": "" + }, + "500": { + "description": "Failed to get project's usage api counts" } }, - "tags": ["Auth"], + "tags": ["Analytics"], "security": [ { "bearer": [] @@ -8001,10 +11240,10 @@ ] } }, - "/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}": { - "delete": { - "operationId": "deleteTPAForProject", - "summary": "[Alpha] Removes a third-party auth integration", + "/v1/projects/{ref}/analytics/endpoints/usage.api-requests-count": { + "get": { + "operationId": "v1-get-project-usage-request-count", + "summary": "Gets project's usage api requests count", "parameters": [ { "name": "ref", @@ -8014,14 +11253,7 @@ "schema": { "minLength": 20, "maxLength": 20, - "type": "string" - } - }, - { - "name": "tpa_id", - "required": true, - "in": "path", - "schema": { + "pattern": "^[a-z]+$", "type": "string" } } @@ -8034,58 +11266,95 @@ "schema": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "type": "object", - "nullable": true - }, - "resolved_jwks": { - "type": "object", - "nullable": true - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "count": { + "type": "number" + } + }, + "required": ["count"] + } }, - "resolved_at": { - "type": "string", - "nullable": true + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "location": { + "type": "string" + }, + "locationType": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "domain", + "location", + "locationType", + "message", + "reason" + ] + } + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": ["code", "errors", "message", "status"] + } + ] } - }, - "required": ["id", "type", "inserted_at", "updated_at"] + } } } } }, "403": { "description": "" + }, + "500": { + "description": "Failed to get project's usage api requests count" } }, - "tags": ["Auth"], + "tags": ["Analytics"], "security": [ { "bearer": [] } ] - }, + } + }, + "/v1/projects/{ref}/database/migrations": { "get": { - "operationId": "getTPAForProject", - "summary": "[Alpha] Get a third-party integration", + "operationId": "v1-list-migration-history", + "summary": "[Beta] List applied migration versions", + "description": "Only available to selected partner OAuth apps", "parameters": [ { "name": "ref", @@ -8095,14 +11364,7 @@ "schema": { "minLength": 20, "maxLength": 20, - "type": "string" - } - }, - { - "name": "tpa_id", - "required": true, - "in": "path", - "schema": { + "pattern": "^[a-z]+$", "type": "string" } } @@ -8113,62 +11375,42 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "type": "object", - "nullable": true - }, - "resolved_jwks": { - "type": "object", - "nullable": true - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string" + } }, - "resolved_at": { - "type": "string", - "nullable": true - } - }, - "required": ["id", "type", "inserted_at", "updated_at"] + "required": ["version"] + } } } } }, "403": { "description": "" + }, + "500": { + "description": "Failed to list database migrations" } }, - "tags": ["Auth"], + "tags": ["Database"], "security": [ { "bearer": [] } ] - } - }, - "/v1/projects/{ref}/pause": { + }, "post": { - "operationId": "v1-pause-a-project", - "summary": "Pauses the given project", + "operationId": "v1-apply-a-migration", + "summary": "[Beta] Apply a database migration", + "description": "Only available to selected partner OAuth apps", "parameters": [ { "name": "ref", @@ -8178,94 +11420,138 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "Idempotency-Key", + "required": false, + "in": "header", + "description": "A unique key to ensure the same migration is tracked only once.", + "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string" + } + }, + "required": ["query"] + } + } + } + }, "responses": { "200": { "description": "" }, "403": { "description": "" + }, + "500": { + "description": "Failed to apply database migration" } }, - "tags": ["Projects"], + "tags": ["Database"], "security": [ { "bearer": [] } ] - } - }, - "/v1/projects/{ref}/restore": { - "get": { - "operationId": "v1-list-available-restore-versions", - "summary": "Lists available restore versions for the given project", + }, + "put": { + "operationId": "v1-upsert-a-migration", + "summary": "[Beta] Upsert a database migration without applying", + "description": "Only available to selected partner OAuth apps", "parameters": [ { "name": "ref", "required": true, "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "Idempotency-Key", + "required": false, + "in": "header", + "description": "A unique key to ensure the same migration is tracked only once.", "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "available_versions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "version": { - "type": "string" - }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "postgres_engine": { - "type": "string", - "enum": ["13", "14", "15", "17", "17-oriole"] - } - }, - "required": ["version", "release_channel", "postgres_engine"] - } - } - }, - "required": ["available_versions"] - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string" + } + }, + "required": ["query"] } } + } + }, + "responses": { + "200": { + "description": "" }, "403": { "description": "" + }, + "500": { + "description": "Failed to upsert database migration" } }, - "tags": ["Projects"], + "tags": ["Database"], "security": [ { "bearer": [] } ] - }, + } + }, + "/v1/projects/{ref}/database/query": { "post": { - "operationId": "v1-restore-a-project", - "summary": "Restores the given project", + "operationId": "v1-run-a-query", + "summary": "[Beta] Run sql query", "parameters": [ { "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8276,21 +11562,32 @@ "application/json": { "schema": { "type": "object", - "properties": {}, - "hideDefinitions": ["release_channel", "postgres_engine"] + "properties": { + "query": { + "type": "string", + "minLength": 1 + }, + "read_only": { + "type": "boolean" + } + }, + "required": ["query"] } } } }, "responses": { - "200": { + "201": { "description": "" }, "403": { "description": "" + }, + "500": { + "description": "Failed to run sql query" } }, - "tags": ["Projects"], + "tags": ["Database"], "security": [ { "bearer": [] @@ -8298,29 +11595,36 @@ ] } }, - "/v1/projects/{ref}/restore/cancel": { + "/v1/projects/{ref}/database/webhooks/enable": { "post": { - "operationId": "v1-cancel-a-project-restoration", - "summary": "Cancels the given project restoration", + "operationId": "v1-enable-database-webhook", + "summary": "[Beta] Enables Database Webhooks on the project", "parameters": [ { "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { - "200": { + "201": { "description": "" }, "403": { "description": "" + }, + "500": { + "description": "Failed to enable Database Webhooks on the project" } }, - "tags": ["Projects"], + "tags": ["Database"], "security": [ { "bearer": [] @@ -8328,40 +11632,22 @@ ] } }, - "/v1/projects/{ref}/analytics/endpoints/logs.all": { + "/v1/projects/{ref}/database/context": { "get": { - "operationId": "getLogs", - "summary": "Gets project's logs", + "operationId": "v1-get-database-metadata", + "summary": "Gets database metadata for the given project.", + "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", + "deprecated": true, "parameters": [ - { - "name": "iso_timestamp_end", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "iso_timestamp_start", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "sql", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, { "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8374,55 +11660,34 @@ "schema": { "type": "object", "properties": { - "error": { - "oneOf": [ - { - "properties": { - "code": { - "type": "number" - }, - "errors": { - "type": "array", - "items": { - "properties": { - "domain": { - "type": "string" - }, - "location": { - "type": "string" - }, - "locationType": { - "type": "string" - }, - "message": { - "type": "string" - }, - "reason": { - "type": "string" - } + "databases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "schemas": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" } - } - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" + }, + "required": ["name"], + "additionalProperties": true } } }, - { - "type": "string" - } - ] - }, - "result": { - "type": "array", - "items": { - "type": "object" + "required": ["name", "schemas"], + "additionalProperties": true } } - } + }, + "required": ["databases"] } } } @@ -8431,7 +11696,7 @@ "description": "" } }, - "tags": ["Analytics"], + "tags": ["Database"], "security": [ { "bearer": [] @@ -8439,10 +11704,11 @@ ] } }, - "/v1/projects/{ref}/database/query": { - "post": { - "operationId": "v1-run-a-query", - "summary": "[Beta] Run sql query", + "/v1/projects/{ref}/database/jit": { + "get": { + "operationId": "v1-get-jit-access", + "summary": "Get user-id to role mappings for JIT access", + "description": "Mappings of roles a user can assume in the project database", "parameters": [ { "name": "ref", @@ -8452,33 +11718,41 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "string" - } - }, - "required": ["query"] - } - } - } - }, "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "string" + } + }, + "required": ["role"] + } + } + }, + "required": ["user_id", "user_roles"] } } } @@ -8487,7 +11761,7 @@ "description": "" }, "500": { - "description": "Failed to run sql query" + "description": "Failed to list database jit access" } }, "tags": ["Database"], @@ -8496,12 +11770,11 @@ "bearer": [] } ] - } - }, - "/v1/projects/{ref}/database/webhooks/enable": { - "post": { - "operationId": "v1-enable-database-webhook", - "summary": "[Beta] Enables Database Webhooks on the project", + }, + "put": { + "operationId": "v1-update-jit-access", + "summary": "Updates a user mapping for JIT access", + "description": "Modifies the roles that can be assumed and for how long", "parameters": [ { "name": "ref", @@ -8511,19 +11784,84 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "minLength": 1 + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "string" + } + }, + "required": ["role"] + } + } + }, + "required": ["user_id", "roles"] + } + } + } + }, "responses": { - "201": { - "description": "" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "string" + } + }, + "required": ["role"] + } + } + }, + "required": ["user_id", "user_roles"] + } + } + } }, "403": { "description": "" }, "500": { - "description": "Failed to enable Database Webhooks on the project" + "description": "Failed to upsert database migration" } }, "tags": ["Database"], @@ -8534,18 +11872,21 @@ ] } }, - "/v1/projects/{ref}/database/context": { + "/v1/projects/{ref}/database/jit/list": { "get": { - "operationId": "getDatabaseMetadata", - "summary": "Gets database metadata for the given project.", - "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", - "deprecated": true, + "operationId": "v1-list-jit-access", + "summary": "List all user-id to role mappings for JIT access", + "description": "Mappings of roles a user can assume in the project database", "parameters": [ { "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8558,40 +11899,93 @@ "schema": { "type": "object", "properties": { - "databases": { + "items": { "type": "array", "items": { "type": "object", "properties": { - "name": { - "type": "string" + "user_id": { + "type": "string", + "format": "uuid" }, - "schemas": { + "user_roles": { "type": "array", "items": { "type": "object", "properties": { - "name": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { "type": "string" } }, - "required": ["name"], - "additionalProperties": true + "required": ["role"] } } }, - "required": ["name", "schemas"], - "additionalProperties": true + "required": ["user_id", "user_roles"] } } }, - "required": ["databases"] + "required": ["items"] } } } }, "403": { "description": "" + }, + "500": { + "description": "Failed to list database jit access" + } + }, + "tags": ["Database"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/database/jit/{user_id}": { + "delete": { + "operationId": "v1-delete-jit-access", + "summary": "Delete JIT access by user-id", + "description": "Remove JIT mappings of a user, revoking all JIT database access", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "user_id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to remove JIT access" } }, "tags": ["Database"], @@ -8616,6 +12010,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8630,17 +12025,6 @@ "items": { "type": "object", "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, "id": { "type": "string" }, @@ -8651,8 +12035,19 @@ "type": "string" }, "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -8665,16 +12060,19 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, "required": [ - "version", - "created_at", - "updated_at", "id", "slug", "name", - "status" + "status", + "version", + "created_at", + "updated_at" ] } } @@ -8700,6 +12098,38 @@ "summary": "Create a function", "description": "This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.", "deprecated": true, + "requestBody": { + "required": true, + "content": { + "application/vnd.denoland.eszip": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/json": { + "schema": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]+$" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "verify_jwt": { + "type": "boolean" + } + }, + "required": ["slug", "name", "body"] + } + } + } + }, "parameters": [ { "name": "ref", @@ -8709,6 +12139,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -8717,7 +12148,7 @@ "required": false, "in": "query", "schema": { - "pattern": "/^[A-Za-z0-9_-]+$/", + "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } }, @@ -8733,6 +12164,7 @@ "name": "verify_jwt", "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "type": "boolean" } @@ -8741,6 +12173,7 @@ "name": "import_map", "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "type": "boolean" } @@ -8760,55 +12193,16 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "pattern": "/^[A-Za-z0-9_-]+$/" - }, - "name": { - "type": "string" - }, - "body": { - "type": "string" - }, - "verify_jwt": { - "type": "boolean" - } - }, - "required": ["slug", "name", "body"] - } - }, - "application/vnd.denoland.eszip": { - "schema": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "pattern": "/^[A-Za-z0-9_-]+$/" - }, - "name": { - "type": "string" - }, - "body": { - "type": "string" - }, - "verify_jwt": { - "type": "boolean" - } - }, - "required": ["slug", "name", "body"] - } + }, + { + "name": "ezbr_sha256", + "required": false, + "in": "query", + "schema": { + "type": "string" } } - }, + ], "responses": { "201": { "description": "", @@ -8817,17 +12211,6 @@ "schema": { "type": "object", "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, "id": { "type": "string" }, @@ -8838,8 +12221,19 @@ "type": "string" }, "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -8852,16 +12246,19 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, "required": [ - "version", - "created_at", - "updated_at", "id", "slug", "name", - "status" + "status", + "version", + "created_at", + "updated_at" ] } } @@ -8894,6 +12291,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8907,25 +12305,26 @@ "items": { "type": "object", "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, "id": { "type": "string" }, "slug": { - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]+$" }, "name": { "type": "string" }, "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -8938,9 +12337,12 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, - "required": ["version", "id", "slug", "name", "status"] + "required": ["id", "slug", "name", "status", "version"] } } } @@ -8949,27 +12351,16 @@ "responses": { "200": { "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "functions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "functions": { + "type": "array", + "items": { + "type": "object", + "properties": { "id": { "type": "string" }, @@ -8980,8 +12371,19 @@ "type": "string" }, "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -8994,16 +12396,19 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, "required": [ - "version", - "created_at", - "updated_at", "id", "slug", "name", - "status" + "status", + "version", + "created_at", + "updated_at" ] } } @@ -9042,6 +12447,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -9050,7 +12456,7 @@ "required": false, "in": "query", "schema": { - "pattern": "/^[A-Za-z0-9_-]+$/", + "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } }, @@ -9058,6 +12464,7 @@ "name": "bundleOnly", "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "type": "boolean" } @@ -9102,7 +12509,7 @@ "required": ["entrypoint_path"] } }, - "required": ["file", "metadata"] + "required": ["metadata"] } } } @@ -9115,17 +12522,6 @@ "schema": { "type": "object", "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, "id": { "type": "string" }, @@ -9136,8 +12532,19 @@ "type": "string" }, "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -9150,9 +12557,12 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, - "required": ["version", "id", "slug", "name", "status"] + "required": ["id", "slug", "name", "status", "version"] } } } @@ -9186,6 +12596,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -9195,7 +12606,7 @@ "in": "path", "description": "Function slug", "schema": { - "pattern": "/^[A-Za-z0-9_-]+$/", + "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } } @@ -9208,17 +12619,6 @@ "schema": { "type": "object", "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, "id": { "type": "string" }, @@ -9229,8 +12629,19 @@ "type": "string" }, "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -9243,16 +12654,19 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, "required": [ - "version", - "created_at", - "updated_at", "id", "slug", "name", - "status" + "status", + "version", + "created_at", + "updated_at" ] } } @@ -9276,6 +12690,33 @@ "operationId": "v1-update-a-function", "summary": "Update a function", "description": "Updates a function with the specified slug and project.", + "requestBody": { + "required": true, + "content": { + "application/vnd.denoland.eszip": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "verify_jwt": { + "type": "boolean" + } + } + } + } + } + }, "parameters": [ { "name": "ref", @@ -9285,6 +12726,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -9294,7 +12736,7 @@ "in": "path", "description": "Function slug", "schema": { - "pattern": "/^[A-Za-z0-9_-]+$/", + "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } }, @@ -9303,7 +12745,7 @@ "required": false, "in": "query", "schema": { - "pattern": "/^[A-Za-z0-9_-]+$/", + "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } }, @@ -9319,6 +12761,7 @@ "name": "verify_jwt", "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "type": "boolean" } @@ -9327,6 +12770,7 @@ "name": "import_map", "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "type": "boolean" } @@ -9346,45 +12790,16 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "body": { - "type": "string" - }, - "verify_jwt": { - "type": "boolean" - } - } - } - }, - "application/vnd.denoland.eszip": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "body": { - "type": "string" - }, - "verify_jwt": { - "type": "boolean" - } - } - } + }, + { + "name": "ezbr_sha256", + "required": false, + "in": "query", + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "", @@ -9393,17 +12808,6 @@ "schema": { "type": "object", "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, "id": { "type": "string" }, @@ -9414,8 +12818,19 @@ "type": "string" }, "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -9428,16 +12843,19 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, "required": [ - "version", - "created_at", - "updated_at", "id", "slug", "name", - "status" + "status", + "version", + "created_at", + "updated_at" ] } } @@ -9470,6 +12888,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -9479,7 +12898,7 @@ "in": "path", "description": "Function slug", "schema": { - "pattern": "/^[A-Za-z0-9_-]+$/", + "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } } @@ -9517,6 +12936,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -9526,14 +12946,22 @@ "in": "path", "description": "Function slug", "schema": { - "pattern": "/^[A-Za-z0-9_-]+$/", + "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } } ], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } }, "403": { "description": "" @@ -9563,6 +12991,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -9630,6 +13059,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -9666,10 +13096,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -9682,15 +13122,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -9740,10 +13171,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -9756,15 +13197,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -9836,6 +13268,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -9879,10 +13312,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -9893,16 +13336,7 @@ { "type": "boolean" } - ] - }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } + ] }, "array": { "type": "boolean" @@ -9981,6 +13415,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -9989,6 +13424,7 @@ "required": true, "in": "path", "schema": { + "format": "uuid", "type": "string" } } @@ -10027,10 +13463,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -10043,15 +13489,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -10123,6 +13560,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -10131,6 +13569,7 @@ "required": true, "in": "path", "schema": { + "format": "uuid", "type": "string" } } @@ -10162,10 +13601,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -10178,15 +13627,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -10235,10 +13675,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -10251,15 +13701,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -10331,6 +13772,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -10339,6 +13781,7 @@ "required": true, "in": "path", "schema": { + "format": "uuid", "type": "string" } } @@ -10377,10 +13820,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -10393,15 +13846,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -10438,34 +13882,253 @@ "created_at": { "type": "string" }, - "updated_at": { - "type": "string" + "updated_at": { + "type": "string" + } + }, + "required": ["id"] + } + } + } + }, + "403": { + "description": "" + }, + "404": { + "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" + } + }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/database/backups": { + "get": { + "operationId": "v1-list-all-backups", + "summary": "Lists all backups", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "walg_enabled": { + "type": "boolean" + }, + "pitr_enabled": { + "type": "boolean" + }, + "backups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "is_physical_backup": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "COMPLETED", + "FAILED", + "PENDING", + "REMOVED", + "ARCHIVED", + "CANCELLED" + ] + }, + "inserted_at": { + "type": "string" + } + }, + "required": ["is_physical_backup", "status", "inserted_at"] + } + }, + "physical_backup_data": { + "type": "object", + "properties": { + "earliest_physical_backup_date_unix": { + "type": "integer" + }, + "latest_physical_backup_date_unix": { + "type": "integer" + } + } + } + }, + "required": [ + "region", + "walg_enabled", + "pitr_enabled", + "backups", + "physical_backup_data" + ] + } + } + } + }, + "403": { + "description": "" + }, + "500": { + "description": "Failed to get backups" + } + }, + "tags": ["Database"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/database/backups/restore-pitr": { + "post": { + "operationId": "v1-restore-pitr-backup", + "summary": "Restores a PITR backup for a database", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "recovery_time_target_unix": { + "type": "integer", + "minimum": 0, + "format": "int64" + } + }, + "required": ["recovery_time_target_unix"] + } + } + } + }, + "responses": { + "201": { + "description": "" + }, + "403": { + "description": "" + } + }, + "tags": ["Database"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/database/backups/restore-point": { + "post": { + "operationId": "v1-create-restore-point", + "x-internal": true, + "summary": "Initiates a creation of a restore point for a database", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 20 + } + }, + "required": ["name"] + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["AVAILABLE", "PENDING", "REMOVED"] } }, - "required": ["id"] + "required": ["name", "status"] } } } }, "403": { "description": "" - }, - "404": { - "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" } }, - "tags": ["Auth"], + "tags": ["Database"], "security": [ { "bearer": [] } ] - } - }, - "/v1/projects/{ref}/database/backups": { + }, "get": { - "operationId": "v1-list-all-backups", - "summary": "Lists all backups", + "operationId": "v1-get-restore-point", + "x-internal": true, + "summary": "Get restore points for project", "parameters": [ { "name": "ref", @@ -10474,6 +14137,16 @@ "description": "Project ref", "schema": { "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" + } + }, + { + "name": "name", + "required": false, + "in": "query", + "schema": { "maxLength": 20, "type": "string" } @@ -10487,68 +14160,24 @@ "schema": { "type": "object", "properties": { - "region": { + "name": { "type": "string" }, - "walg_enabled": { - "type": "boolean" - }, - "pitr_enabled": { - "type": "boolean" - }, - "backups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "COMPLETED", - "FAILED", - "PENDING", - "REMOVED", - "ARCHIVED", - "CANCELLED" - ] - }, - "is_physical_backup": { - "type": "boolean" - }, - "inserted_at": { - "type": "string" - } - }, - "required": ["status", "is_physical_backup", "inserted_at"] - } - }, - "physical_backup_data": { - "type": "object", - "properties": { - "earliest_physical_backup_date_unix": { - "type": "integer", - "format": "int64" - }, - "latest_physical_backup_date_unix": { - "type": "integer", - "format": "int64" - } - } + "status": { + "type": "string", + "enum": ["AVAILABLE", "PENDING", "REMOVED"] } }, - "required": [ - "region", - "walg_enabled", - "pitr_enabled", - "backups", - "physical_backup_data" - ] + "required": ["name", "status"] } } } }, + "403": { + "description": "" + }, "500": { - "description": "Failed to get backups" + "description": "Failed to get requested restore points" } }, "tags": ["Database"], @@ -10559,10 +14188,11 @@ ] } }, - "/v1/projects/{ref}/database/backups/restore-pitr": { + "/v1/projects/{ref}/database/backups/undo": { "post": { - "operationId": "v1-restore-pitr-backup", - "summary": "Restores a PITR backup for a database", + "operationId": "v1-undo", + "x-internal": true, + "summary": "Initiates an undo to a given restore point", "parameters": [ { "name": "ref", @@ -10572,6 +14202,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -10583,13 +14214,12 @@ "schema": { "type": "object", "properties": { - "recovery_time_target_unix": { - "type": "integer", - "minimum": 0, - "format": "int64" + "name": { + "type": "string", + "maxLength": 20 } }, - "required": ["recovery_time_target_unix"] + "required": ["name"] } } } @@ -10597,6 +14227,9 @@ "responses": { "201": { "description": "" + }, + "403": { + "description": "" } }, "tags": ["Database"], @@ -10616,7 +14249,9 @@ "name": "slug", "required": true, "in": "path", + "description": "Organization slug", "schema": { + "pattern": "^[\\w-]+$", "type": "string" } } @@ -10652,6 +14287,9 @@ } } } + }, + "403": { + "description": "" } }, "tags": ["Organizations"], @@ -10671,7 +14309,9 @@ "name": "slug", "required": true, "in": "path", + "description": "Organization slug", "schema": { + "pattern": "^[\\w-]+$", "type": "string" } } @@ -10684,6 +14324,12 @@ "schema": { "type": "object", "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, "plan": { "type": "string", "enum": ["free", "pro", "team", "enterprise"] @@ -10692,7 +14338,11 @@ "type": "array", "items": { "type": "string", - "enum": ["AI_SQL_GENERATOR_OPT_IN"] + "enum": [ + "AI_SQL_GENERATOR_OPT_IN", + "AI_DATA_GENERATOR_OPT_IN", + "AI_LOG_GENERATOR_OPT_IN" + ] } }, "allowed_release_channels": { @@ -10701,18 +14351,223 @@ "type": "string", "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] } + } + }, + "required": ["id", "name", "opt_in_tags", "allowed_release_channels"] + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Organizations"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/organizations/{slug}/project-claim/{token}": { + "get": { + "operationId": "v1-get-organization-project-claim", + "x-internal": true, + "summary": "Gets project details for the specified organization and claim token", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "type": "string" + } + }, + { + "name": "token", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "project": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["ref", "name"] }, - "id": { + "preview": { + "type": "object", + "properties": { + "valid": { + "type": "boolean" + }, + "warnings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + }, + "info": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + }, + "members_exceeding_free_project_limit": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "limit": { + "type": "number" + } + }, + "required": ["name", "limit"] + } + }, + "target_organization_eligible": { + "type": "boolean", + "nullable": true + }, + "target_organization_has_free_project_slots": { + "type": "boolean", + "nullable": true + }, + "source_subscription_plan": { + "type": "string", + "enum": ["free", "pro", "team", "enterprise"] + }, + "target_subscription_plan": { + "type": "string", + "enum": ["free", "pro", "team", "enterprise"], + "nullable": true + } + }, + "required": [ + "valid", + "warnings", + "errors", + "info", + "members_exceeding_free_project_limit", + "target_organization_eligible", + "target_organization_has_free_project_slots", + "source_subscription_plan", + "target_subscription_plan" + ] + }, + "expires_at": { "type": "string" }, - "name": { + "created_at": { "type": "string" + }, + "created_by": { + "type": "string", + "format": "uuid" } }, - "required": ["opt_in_tags", "allowed_release_channels", "id", "name"] + "required": ["project", "preview", "expires_at", "created_at", "created_by"] } } } + }, + "403": { + "description": "" + } + }, + "tags": ["Organizations"], + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "operationId": "v1-claim-project-for-organization", + "x-internal": true, + "summary": "Claims project for the specified organization", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "type": "string" + } + }, + { + "name": "token", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "" + }, + "403": { + "description": "" } }, "tags": ["Organizations"], @@ -10736,6 +14591,18 @@ "BranchDetailResponse": { "type": "object", "properties": { + "ref": { + "type": "string" + }, + "postgres_version": { + "type": "string" + }, + "postgres_engine": { + "type": "string" + }, + "release_channel": { + "type": "string" + }, "status": { "type": "string", "enum": [ @@ -10756,24 +14623,14 @@ "RESIZING" ] }, - "db_port": { - "type": "integer" - }, - "ref": { - "type": "string" - }, - "postgres_version": { - "type": "string" - }, - "postgres_engine": { - "type": "string" - }, - "release_channel": { - "type": "string" - }, "db_host": { "type": "string" }, + "db_port": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, "db_user": { "type": "string" }, @@ -10785,29 +14642,29 @@ } }, "required": [ - "status", - "db_port", "ref", "postgres_version", "postgres_engine", "release_channel", - "db_host" + "status", + "db_host", + "db_port" ] }, "UpdateBranchBody": { "type": "object", "properties": { - "reset_on_push": { - "type": "boolean", - "deprecated": true, - "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead." - }, "branch_name": { "type": "string" }, "git_branch": { "type": "string" }, + "reset_on_push": { + "type": "boolean", + "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead.", + "deprecated": true + }, "persistent": { "type": "boolean" }, @@ -10821,34 +14678,18 @@ "FUNCTIONS_DEPLOYED", "FUNCTIONS_FAILED" ] + }, + "request_review": { + "type": "boolean" } } }, "BranchResponse": { "type": "object", "properties": { - "pr_number": { - "type": "integer", - "format": "int32" - }, - "latest_check_run_id": { - "type": "number", - "deprecated": true, - "description": "This field is deprecated and will not be populated." - }, - "status": { - "type": "string", - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ] - }, "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "name": { "type": "string" @@ -10865,24 +14706,50 @@ "git_branch": { "type": "string" }, + "pr_number": { + "type": "integer", + "format": "int32" + }, + "latest_check_run_id": { + "type": "number", + "description": "This field is deprecated and will not be populated.", + "deprecated": true + }, "persistent": { "type": "boolean" }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ] + }, "created_at": { - "type": "string" + "type": "string", + "format": "date-time" }, "updated_at": { - "type": "string" + "type": "string", + "format": "date-time" + }, + "review_requested_at": { + "type": "string", + "format": "date-time" } }, "required": [ - "status", "id", "name", "project_ref", "parent_project_ref", "is_default", "persistent", + "status", "created_at", "updated_at" ] @@ -10891,44 +14758,32 @@ "type": "object", "properties": { "message": { - "type": "string" + "type": "string", + "enum": ["ok"] } }, "required": ["message"] }, - "BranchUpdateResponse": { + "BranchActionBody": { "type": "object", "properties": { - "workflow_run_id": { - "type": "string" - }, - "message": { + "migration_version": { "type": "string" } - }, - "required": ["workflow_run_id", "message"] + } }, - "V1DatabaseResponse": { + "BranchUpdateResponse": { "type": "object", "properties": { - "host": { - "type": "string", - "description": "Database host" - }, - "version": { - "type": "string", - "description": "Database version" - }, - "postgres_engine": { - "type": "string", - "description": "Database engine" + "workflow_run_id": { + "type": "string" }, - "release_channel": { + "message": { "type": "string", - "description": "Release channel" + "enum": ["ok"] } }, - "required": ["host", "version", "postgres_engine", "release_channel"] + "required": ["workflow_run_id", "message"] }, "V1ProjectWithDatabaseResponse": { "type": "object", @@ -11000,7 +14855,7 @@ }, "required": ["id", "organization_id", "name", "region", "created_at", "status", "database"] }, - "V1CreateProjectBodyDto": { + "V1CreateProjectBody": { "type": "object", "properties": { "db_pass": { @@ -11009,6 +14864,7 @@ }, "name": { "type": "string", + "maxLength": 256, "description": "Name of your project" }, "organization_id": { @@ -11053,6 +14909,8 @@ "desired_instance_size": { "type": "string", "enum": [ + "pico", + "nano", "micro", "small", "medium", @@ -11062,7 +14920,15 @@ "4xlarge", "8xlarge", "12xlarge", - "16xlarge" + "16xlarge", + "24xlarge", + "24xlarge_optimized_memory", + "24xlarge_optimized_cpu", + "24xlarge_high_memory", + "48xlarge", + "48xlarge_optimized_memory", + "48xlarge_optimized_cpu", + "48xlarge_high_memory" ] }, "template_url": { @@ -11136,7 +15002,7 @@ }, "required": ["id", "name"] }, - "CreateOrganizationV1Dto": { + "CreateOrganizationV1": { "type": "object", "properties": { "name": { @@ -11150,11 +15016,12 @@ "type": "object", "properties": { "grant_type": { - "enum": ["authorization_code", "refresh_token"], - "type": "string" + "type": "string", + "enum": ["authorization_code", "refresh_token"] }, "client_id": { - "type": "string" + "type": "string", + "format": "uuid" }, "client_secret": { "type": "string" @@ -11170,31 +15037,36 @@ }, "refresh_token": { "type": "string" + }, + "resource": { + "type": "string", + "enum": ["https://api.supabase.io/mcp"], + "description": "Resource indicator for MCP (Model Context Protocol) clients" } }, - "required": ["grant_type", "client_id", "client_secret"] + "additionalProperties": false }, "OAuthTokenResponse": { "type": "object", "properties": { - "expires_in": { - "type": "integer", - "format": "int64" - }, - "token_type": { - "type": "string", - "enum": ["Bearer"] - }, "access_token": { "type": "string" }, "refresh_token": { "type": "string" + }, + "expires_in": { + "type": "integer" + }, + "token_type": { + "type": "string", + "enum": ["Bearer"] } }, - "required": ["expires_in", "token_type", "access_token", "refresh_token"] + "required": ["access_token", "refresh_token", "expires_in", "token_type"], + "additionalProperties": false }, - "OAuthRevokeTokenBodyDto": { + "OAuthRevokeTokenBody": { "type": "object", "properties": { "client_id": { @@ -11208,114 +15080,8 @@ "type": "string" } }, - "required": ["client_id", "client_secret", "refresh_token"], - "additionalProperties": false - }, - "SnippetProject": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "name"] - }, - "SnippetUser": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "username": { - "type": "string" - } - }, - "required": ["id", "username"] - }, - "SnippetMeta": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["sql"] - }, - "visibility": { - "type": "string", - "enum": ["user", "project", "org", "public"] - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "project": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "name"] - }, - "owner": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "username": { - "type": "string" - } - }, - "required": ["id", "username"] - }, - "updated_by": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "username": { - "type": "string" - } - }, - "required": ["id", "username"] - } - }, - "required": [ - "id", - "inserted_at", - "updated_at", - "type", - "visibility", - "name", - "description", - "project", - "owner", - "updated_by" - ] + "required": ["client_id", "client_secret", "refresh_token"], + "additionalProperties": false }, "SnippetList": { "type": "object", @@ -11353,8 +15119,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "name": { "type": "string" @@ -11366,8 +15131,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -11379,8 +15143,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -11409,21 +15172,6 @@ }, "required": ["data"] }, - "SnippetContent": { - "type": "object", - "properties": { - "favorite": { - "type": "boolean" - }, - "schema_version": { - "type": "string" - }, - "sql": { - "type": "string" - } - }, - "required": ["favorite", "schema_version", "sql"] - }, "SnippetResponse": { "type": "object", "properties": { @@ -11441,8 +15189,8 @@ "enum": ["sql"] }, "visibility": { - "enum": ["user", "project", "org", "public"], - "type": "string" + "type": "string", + "enum": ["user", "project", "org", "public"] }, "name": { "type": "string" @@ -11455,8 +15203,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "name": { "type": "string" @@ -11468,8 +15215,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -11481,8 +15227,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -11520,37 +15265,29 @@ "content" ] }, - "ApiKeySecretJWTTemplate": { - "type": "object", - "properties": { - "role": { - "type": "string" - } - }, - "required": ["role"] - }, "ApiKeyResponse": { "type": "object", "properties": { - "type": { - "nullable": true, - "type": "string", - "enum": ["publishable", "secret", "legacy"] - }, - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", "nullable": true }, + "type": { + "type": "string", + "enum": ["legacy", "publishable", "secret"], + "nullable": true + }, "prefix": { "type": "string", "nullable": true }, + "name": { + "type": "string" + }, "description": { "type": "string", "nullable": true @@ -11560,416 +15297,155 @@ "nullable": true }, "secret_jwt_template": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - } - }, - "required": ["role"] - } - ] + "type": "object", + "additionalProperties": {}, + "nullable": true }, "inserted_at": { "type": "string", + "format": "date-time", "nullable": true }, "updated_at": { "type": "string", + "format": "date-time", "nullable": true } }, - "required": ["name", "api_key"] - }, - "CreateApiKeyBody": { - "type": "object", - "properties": { - "type": { - "enum": ["publishable", "secret"], - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "secret_jwt_template": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - } - }, - "required": ["role"] - } - ] - } - }, - "required": ["type"] - }, - "UpdateApiKeyBody": { - "type": "object", - "properties": { - "description": { - "type": "string", - "nullable": true - }, - "secret_jwt_template": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - } - }, - "required": ["role"] - } - ] - } - } - }, - "DesiredInstanceSize": { - "type": "string", - "enum": [ - "micro", - "small", - "medium", - "large", - "xlarge", - "2xlarge", - "4xlarge", - "8xlarge", - "12xlarge", - "16xlarge" - ] - }, - "ReleaseChannel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "PostgresEngine": { - "type": "string", - "description": "Postgres engine version. If not provided, the latest version will be used.", - "enum": ["15", "17-oriole"] + "required": ["name"] }, - "CreateBranchBody": { + "LegacyApiKeysResponse": { "type": "object", "properties": { - "desired_instance_size": { - "type": "string", - "enum": [ - "micro", - "small", - "medium", - "large", - "xlarge", - "2xlarge", - "4xlarge", - "8xlarge", - "12xlarge", - "16xlarge" - ] - }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "postgres_engine": { - "type": "string", - "description": "Postgres engine version. If not provided, the latest version will be used.", - "enum": ["15", "17-oriole"] - }, - "branch_name": { - "type": "string" - }, - "git_branch": { - "type": "string" - }, - "persistent": { + "enabled": { "type": "boolean" - }, - "region": { - "type": "string" - } - }, - "required": ["branch_name"] - }, - "ValidationRecord": { - "type": "object", - "properties": { - "txt_name": { - "type": "string" - }, - "txt_value": { - "type": "string" - } - }, - "required": ["txt_name", "txt_value"] - }, - "ValidationError": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "required": ["message"] - }, - "SslValidation": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "validation_records": { - "type": "array", - "items": { - "type": "object", - "properties": { - "txt_name": { - "type": "string" - }, - "txt_value": { - "type": "string" - } - }, - "required": ["txt_name", "txt_value"] - } - }, - "validation_errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "required": ["message"] - } - } - }, - "required": ["status", "validation_records"] - }, - "OwnershipVerification": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" } - }, - "required": ["type", "name", "value"] - }, - "CustomHostnameDetails": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "ssl": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "validation_records": { - "type": "array", - "items": { - "type": "object", - "properties": { - "txt_name": { - "type": "string" - }, - "txt_value": { - "type": "string" - } - }, - "required": ["txt_name", "txt_value"] - } - }, - "validation_errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "required": ["message"] - } - } - }, - "required": ["status", "validation_records"] - }, - "ownership_verification": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["type", "name", "value"] + }, + "required": ["enabled"] + }, + "CreateApiKeyBody": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["publishable", "secret"] }, - "custom_origin_server": { - "type": "string" + "name": { + "type": "string", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z_][a-z0-9_]+$" }, - "verification_errors": { - "type": "array", - "items": { - "type": "string" - } + "description": { + "type": "string", + "nullable": true }, - "status": { - "type": "string" + "secret_jwt_template": { + "type": "object", + "additionalProperties": {}, + "nullable": true } }, - "required": [ - "id", - "hostname", - "ssl", - "ownership_verification", - "custom_origin_server", - "status" - ] + "required": ["type", "name"] + }, + "UpdateApiKeyBody": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z_][a-z0-9_]+$" + }, + "description": { + "type": "string", + "nullable": true + }, + "secret_jwt_template": { + "type": "object", + "additionalProperties": {}, + "nullable": true + } + } }, - "CfResponse": { + "CreateBranchBody": { "type": "object", "properties": { - "success": { + "branch_name": { + "type": "string", + "minLength": 1 + }, + "git_branch": { + "type": "string" + }, + "is_default": { "type": "boolean" }, - "errors": { - "type": "array", - "items": { - "type": "object" - } + "persistent": { + "type": "boolean" }, - "messages": { - "type": "array", - "items": { - "type": "object" - } + "region": { + "type": "string" }, - "result": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "ssl": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "validation_records": { - "type": "array", - "items": { - "type": "object", - "properties": { - "txt_name": { - "type": "string" - }, - "txt_value": { - "type": "string" - } - }, - "required": ["txt_name", "txt_value"] - } - }, - "validation_errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "required": ["message"] - } - } - }, - "required": ["status", "validation_records"] - }, - "ownership_verification": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["type", "name", "value"] - }, - "custom_origin_server": { - "type": "string" - }, - "verification_errors": { - "type": "array", - "items": { - "type": "string" - } - }, - "status": { - "type": "string" - } - }, - "required": [ - "id", - "hostname", - "ssl", - "ownership_verification", - "custom_origin_server", - "status" + "desired_instance_size": { + "type": "string", + "enum": [ + "pico", + "nano", + "micro", + "small", + "medium", + "large", + "xlarge", + "2xlarge", + "4xlarge", + "8xlarge", + "12xlarge", + "16xlarge", + "24xlarge", + "24xlarge_optimized_memory", + "24xlarge_optimized_cpu", + "24xlarge_high_memory", + "48xlarge", + "48xlarge_optimized_memory", + "48xlarge_optimized_cpu", + "48xlarge_high_memory" ] + }, + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"], + "description": "Release channel. If not provided, GA will be used." + }, + "postgres_engine": { + "type": "string", + "enum": ["15", "17", "17-oriole"], + "description": "Postgres engine version. If not provided, the latest version will be used." + }, + "secrets": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "with_data": { + "type": "boolean" } }, - "required": ["success", "errors", "messages", "result"] + "required": ["branch_name"] }, "UpdateCustomHostnameResponse": { "type": "object", "properties": { "status": { + "type": "string", "enum": [ "1_not_started", "2_initiated", "3_challenge_verified", "4_origin_setup_completed", "5_services_reconfigured" - ], - "type": "string" + ] }, "custom_hostname": { "type": "string" @@ -11983,13 +15459,13 @@ "errors": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "messages": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "result": { @@ -12101,41 +15577,51 @@ }, "required": ["banned_ipv4_addresses"] }, - "RemoveNetworkBanRequest": { + "NetworkBanResponseEnriched": { "type": "object", "properties": { - "ipv4_addresses": { + "banned_ipv4_addresses": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "banned_address": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": ["banned_address", "identifier", "type"] } } }, - "required": ["ipv4_addresses"] + "required": ["banned_ipv4_addresses"] }, - "NetworkRestrictionsRequest": { + "RemoveNetworkBanRequest": { "type": "object", "properties": { - "dbAllowedCidrs": { + "ipv4_addresses": { "type": "array", "items": { "type": "string" } }, - "dbAllowedCidrsV6": { - "type": "array", - "items": { - "type": "string" - } + "identifier": { + "type": "string" } - } + }, + "required": ["ipv4_addresses"] }, "NetworkRestrictionsResponse": { "type": "object", "properties": { "entitlement": { - "enum": ["disallowed", "allowed"], - "type": "string" + "type": "string", + "enum": ["disallowed", "allowed"] }, "config": { "type": "object", @@ -12152,7 +15638,8 @@ "type": "string" } } - } + }, + "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." }, "old_config": { "type": "object", @@ -12169,15 +15656,33 @@ "type": "string" } } - } + }, + "description": "Populated when a new config has been received, but not registered as successfully applied to a project." }, "status": { - "enum": ["stored", "applied"], - "type": "string" + "type": "string", + "enum": ["stored", "applied"] } }, "required": ["entitlement", "config", "status"] }, + "NetworkRestrictionsRequest": { + "type": "object", + "properties": { + "dbAllowedCidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "dbAllowedCidrsV6": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "PgsodiumConfigResponse": { "type": "object", "properties": { @@ -12199,29 +15704,35 @@ "PostgrestConfigWithJWTSecretResponse": { "type": "object", "properties": { + "db_schema": { + "type": "string" + }, "max_rows": { "type": "integer" }, + "db_extra_search_path": { + "type": "string" + }, "db_pool": { "type": "integer", "nullable": true, "description": "If `null`, the value is automatically configured based on compute size." }, - "db_schema": { - "type": "string" - }, - "db_extra_search_path": { - "type": "string" - }, "jwt_secret": { "type": "string" } }, - "required": ["max_rows", "db_pool", "db_schema", "db_extra_search_path"] + "required": ["db_schema", "max_rows", "db_extra_search_path", "db_pool"] }, - "UpdatePostgrestConfigBody": { + "V1UpdatePostgrestConfigBody": { "type": "object", "properties": { + "db_extra_search_path": { + "type": "string" + }, + "db_schema": { + "type": "string" + }, "max_rows": { "type": "integer", "minimum": 0, @@ -12231,41 +15742,34 @@ "type": "integer", "minimum": 0, "maximum": 1000 - }, - "db_extra_search_path": { - "type": "string" - }, - "db_schema": { - "type": "string" } } }, "V1PostgrestConfigResponse": { "type": "object", "properties": { + "db_schema": { + "type": "string" + }, "max_rows": { "type": "integer" }, + "db_extra_search_path": { + "type": "string" + }, "db_pool": { "type": "integer", "nullable": true, "description": "If `null`, the value is automatically configured based on compute size." - }, - "db_schema": { - "type": "string" - }, - "db_extra_search_path": { - "type": "string" } }, - "required": ["max_rows", "db_pool", "db_schema", "db_extra_search_path"] + "required": ["db_schema", "max_rows", "db_extra_search_path", "db_pool"] }, "V1ProjectRefResponse": { "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "integer" }, "ref": { "type": "string" @@ -12276,43 +15780,40 @@ }, "required": ["id", "ref", "name"] }, - "SecretResponse": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - "CreateSecretBody": { + "SecretResponse": { "type": "object", "properties": { "name": { - "type": "string", - "maxLength": 256, - "pattern": "/^(?!SUPABASE_).*/", - "description": "Secret name must not start with the SUPABASE_ prefix.", - "example": "string" + "type": "string" }, "value": { - "type": "string", - "maxLength": 24576 + "type": "string" + }, + "updated_at": { + "type": "string" } }, "required": ["name", "value"] }, - "SslEnforcements": { - "type": "object", - "properties": { - "database": { - "type": "boolean" - } - }, - "required": ["database"] + "CreateSecretBody": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "pattern": "^(?!SUPABASE_).*", + "description": "Secret name must not start with the SUPABASE_ prefix.", + "example": "string" + }, + "value": { + "type": "string", + "maxLength": 24576 + } + }, + "required": ["name", "value"] + } }, "SslEnforcementResponse": { "type": "object", @@ -12360,8 +15861,8 @@ "type": "object", "properties": { "status": { - "enum": ["not-used", "custom-domain-used", "active"], - "type": "string" + "type": "string", + "enum": ["not-used", "custom-domain-used", "active"] }, "custom_domain": { "type": "string" @@ -12399,15 +15900,15 @@ "UpgradeDatabaseBody": { "type": "object", "properties": { + "target_version": { + "type": "string" + }, "release_channel": { "type": "string", "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "target_version": { - "type": "string" } }, - "required": ["release_channel", "target_version"] + "required": ["target_version"] }, "ProjectUpgradeInitiateResponse": { "type": "object", @@ -12418,40 +15919,19 @@ }, "required": ["tracking_id"] }, - "ProjectVersion": { - "type": "object", - "properties": { - "postgres_version": { - "type": "string", - "description": "Postgres engine version. If not provided, the latest version will be used.", - "enum": ["15", "17-oriole"] - }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "app_version": { - "type": "string" - } - }, - "required": ["postgres_version", "release_channel", "app_version"] - }, "ProjectUpgradeEligibilityResponse": { "type": "object", "properties": { - "current_app_version_release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "duration_estimate_hours": { - "type": "integer" - }, "eligible": { "type": "boolean" }, "current_app_version": { "type": "string" }, + "current_app_version_release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + }, "latest_app_version": { "type": "string" }, @@ -12462,8 +15942,7 @@ "properties": { "postgres_version": { "type": "string", - "description": "Postgres engine version. If not provided, the latest version will be used.", - "enum": ["15", "17-oriole"] + "enum": ["13", "14", "15", "17", "17-oriole"] }, "release_channel": { "type": "string", @@ -12476,19 +15955,28 @@ "required": ["postgres_version", "release_channel", "app_version"] } }, - "potential_breaking_changes": { + "duration_estimate_hours": { + "type": "number" + }, + "legacy_auth_custom_roles": { "type": "array", "items": { "type": "string" } }, - "legacy_auth_custom_roles": { + "objects_to_be_dropped": { + "type": "array", + "items": { + "type": "string" + } + }, + "unsupported_extensions": { "type": "array", "items": { "type": "string" } }, - "extension_dependent_objects": { + "user_defined_objects_in_internal_schemas": { "type": "array", "items": { "type": "string" @@ -12496,122 +15984,69 @@ } }, "required": [ - "current_app_version_release_channel", - "duration_estimate_hours", "eligible", "current_app_version", + "current_app_version_release_channel", "latest_app_version", "target_upgrade_versions", - "potential_breaking_changes", + "duration_estimate_hours", "legacy_auth_custom_roles", - "extension_dependent_objects" + "objects_to_be_dropped", + "unsupported_extensions", + "user_defined_objects_in_internal_schemas" ] }, - "DatabaseUpgradeStatus": { - "type": "object", - "properties": { - "target_version": { - "type": "integer" - }, - "status": { - "enum": [0, 1, 2], - "type": "integer" - }, - "initiated_at": { - "type": "string" - }, - "latest_status_at": { - "type": "string" - }, - "error": { - "type": "string", - "enum": [ - "1_upgraded_instance_launch_failed", - "2_volume_detachchment_from_upgraded_instance_failed", - "3_volume_attachment_to_original_instance_failed", - "4_data_upgrade_initiation_failed", - "5_data_upgrade_completion_failed", - "6_volume_detachchment_from_original_instance_failed", - "7_volume_attachment_to_upgraded_instance_failed", - "8_upgrade_completion_failed", - "9_post_physical_backup_failed" - ] - }, - "progress": { - "type": "string", - "enum": [ - "0_requested", - "1_started", - "2_launched_upgraded_instance", - "3_detached_volume_from_upgraded_instance", - "4_attached_volume_to_original_instance", - "5_initiated_data_upgrade", - "6_completed_data_upgrade", - "7_detached_volume_from_original_instance", - "8_attached_volume_to_upgraded_instance", - "9_completed_upgrade", - "10_completed_post_physical_backup" - ] - } - }, - "required": ["target_version", "status", "initiated_at", "latest_status_at"] - }, "DatabaseUpgradeStatusResponse": { "type": "object", "properties": { "databaseUpgradeStatus": { - "nullable": true, - "allOf": [ - { - "type": "object", - "properties": { - "target_version": { - "type": "integer" - }, - "status": { - "enum": [0, 1, 2], - "type": "integer" - }, - "initiated_at": { - "type": "string" - }, - "latest_status_at": { - "type": "string" - }, - "error": { - "type": "string", - "enum": [ - "1_upgraded_instance_launch_failed", - "2_volume_detachchment_from_upgraded_instance_failed", - "3_volume_attachment_to_original_instance_failed", - "4_data_upgrade_initiation_failed", - "5_data_upgrade_completion_failed", - "6_volume_detachchment_from_original_instance_failed", - "7_volume_attachment_to_upgraded_instance_failed", - "8_upgrade_completion_failed", - "9_post_physical_backup_failed" - ] - }, - "progress": { - "type": "string", - "enum": [ - "0_requested", - "1_started", - "2_launched_upgraded_instance", - "3_detached_volume_from_upgraded_instance", - "4_attached_volume_to_original_instance", - "5_initiated_data_upgrade", - "6_completed_data_upgrade", - "7_detached_volume_from_original_instance", - "8_attached_volume_to_upgraded_instance", - "9_completed_upgrade", - "10_completed_post_physical_backup" - ] - } - }, - "required": ["target_version", "status", "initiated_at", "latest_status_at"] + "type": "object", + "properties": { + "initiated_at": { + "type": "string" + }, + "latest_status_at": { + "type": "string" + }, + "target_version": { + "type": "number" + }, + "error": { + "type": "string", + "enum": [ + "1_upgraded_instance_launch_failed", + "2_volume_detachchment_from_upgraded_instance_failed", + "3_volume_attachment_to_original_instance_failed", + "4_data_upgrade_initiation_failed", + "5_data_upgrade_completion_failed", + "6_volume_detachchment_from_original_instance_failed", + "7_volume_attachment_to_upgraded_instance_failed", + "8_upgrade_completion_failed", + "9_post_physical_backup_failed" + ] + }, + "progress": { + "type": "string", + "enum": [ + "0_requested", + "1_started", + "2_launched_upgraded_instance", + "3_detached_volume_from_upgraded_instance", + "4_attached_volume_to_original_instance", + "5_initiated_data_upgrade", + "6_completed_data_upgrade", + "7_detached_volume_from_original_instance", + "8_attached_volume_to_upgraded_instance", + "9_completed_upgrade", + "10_completed_post_physical_backup" + ] + }, + "status": { + "type": "number" } - ] + }, + "required": ["initiated_at", "latest_status_at", "target_version", "status"], + "nullable": true } }, "required": ["databaseUpgradeStatus"] @@ -12671,28 +16106,29 @@ }, "required": ["database_identifier"] }, - "AuthHealthResponse": { + "V1ServiceHealthResponse": { "type": "object", "properties": { "name": { "type": "string", - "enum": ["GoTrue"] - } - }, - "required": ["name"] - }, - "RealtimeHealthResponse": { - "type": "object", - "properties": { - "connected_cluster": { - "type": "integer" - } - }, - "required": ["connected_cluster"] - }, - "V1ServiceHealthResponse": { - "type": "object", - "properties": { + "enum": [ + "auth", + "db", + "db_postgres_user", + "pooler", + "realtime", + "rest", + "storage", + "pg_bouncer" + ] + }, + "healthy": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"] + }, "info": { "oneOf": [ { @@ -12701,79 +16137,237 @@ "name": { "type": "string", "enum": ["GoTrue"] + }, + "version": { + "type": "string" + }, + "description": { + "type": "string" } }, - "required": ["name"] + "required": ["name", "version", "description"] }, { "type": "object", "properties": { + "healthy": { + "type": "boolean" + }, + "db_connected": { + "type": "boolean" + }, "connected_cluster": { "type": "integer" } }, - "required": ["connected_cluster"] + "required": ["healthy", "db_connected", "connected_cluster"] } ] }, - "name": { - "enum": ["auth", "db", "pooler", "realtime", "rest", "storage"], + "error": { "type": "string" + } + }, + "required": ["name", "healthy", "status"] + }, + "SigningKeyResponse": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" }, - "healthy": { - "type": "boolean" + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, "status": { - "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"], - "type": "string" + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] }, - "error": { - "type": "string" + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" } }, - "required": ["name", "healthy", "status"] + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false }, - "StorageFeatureImageTransformation": { + "CreateSigningKeyBody": { "type": "object", "properties": { - "enabled": { - "type": "boolean" + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "standby"] + }, + "private_jwk": { + "discriminator": { + "propertyName": "kty" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "kty": { + "type": "string", + "enum": ["RSA"] + }, + "n": { + "type": "string" + }, + "e": { + "type": "string", + "enum": ["AQAB"] + }, + "d": { + "type": "string" + }, + "p": { + "type": "string" + }, + "q": { + "type": "string" + }, + "dp": { + "type": "string" + }, + "dq": { + "type": "string" + }, + "qi": { + "type": "string" + } + }, + "required": ["kty", "n", "e", "d", "p", "q", "dp", "dq", "qi"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kty": { + "type": "string", + "enum": ["EC"] + }, + "crv": { + "type": "string", + "enum": ["P-256"] + }, + "x": { + "type": "string" + }, + "y": { + "type": "string" + }, + "d": { + "type": "string" + } + }, + "required": ["kty", "crv", "x", "y", "d"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kty": { + "type": "string", + "enum": ["OKP"] + }, + "crv": { + "type": "string", + "enum": ["Ed25519"] + }, + "x": { + "type": "string" + }, + "d": { + "type": "string" + } + }, + "required": ["kty", "crv", "x", "d"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kty": { + "type": "string", + "enum": ["oct"] + }, + "k": { + "type": "string", + "minLength": 16 + } + }, + "required": ["kty", "k"], + "additionalProperties": false + } + ] } }, - "required": ["enabled"] + "required": ["algorithm"], + "additionalProperties": false }, - "StorageFeatureS3Protocol": { + "SigningKeysResponse": { "type": "object", "properties": { - "enabled": { - "type": "boolean" + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false + } } }, - "required": ["enabled"] + "required": ["keys"], + "additionalProperties": false }, - "StorageFeatures": { + "UpdateSigningKeyBody": { "type": "object", "properties": { - "imageTransformation": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "s3Protocol": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] } }, - "required": ["imageTransformation", "s3Protocol"] + "required": ["status"], + "additionalProperties": false }, "StorageConfigResponse": { "type": "object", @@ -12802,12 +16396,43 @@ } }, "required": ["enabled"] + }, + "icebergCatalog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } }, "required": ["imageTransformation", "s3Protocol"] + }, + "capabilities": { + "type": "object", + "properties": { + "list_v2": { + "type": "boolean" + }, + "iceberg_catalog": { + "type": "boolean" + } + }, + "required": ["list_v2", "iceberg_catalog"] + }, + "external": { + "type": "object", + "properties": { + "upstreamTarget": { + "type": "string", + "enum": ["main", "canary"] + } + }, + "required": ["upstreamTarget"] } }, - "required": ["fileSizeLimit", "features"] + "required": ["fileSizeLimit", "features", "capabilities", "external"] }, "UpdateStorageConfigBody": { "type": "object", @@ -12815,7 +16440,7 @@ "fileSizeLimit": { "type": "integer", "minimum": 0, - "maximum": 53687091200, + "maximum": 536870912000, "format": "int64" }, "features": { @@ -12838,11 +16463,31 @@ } }, "required": ["enabled"] + }, + "icebergCatalog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } }, "required": ["imageTransformation", "s3Protocol"] + }, + "external": { + "type": "object", + "properties": { + "upstreamTarget": { + "type": "string", + "enum": ["main", "canary"] + } + }, + "required": ["upstreamTarget"] } - } + }, + "additionalProperties": false }, "PostgresConfigResponse": { "type": "object", @@ -12907,6 +16552,10 @@ "minimum": 0, "maximum": 262143 }, + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] + }, "shared_buffers": { "type": "string" }, @@ -12924,10 +16573,6 @@ }, "work_mem": { "type": "string" - }, - "session_replication_role": { - "enum": ["origin", "replica", "local"], - "type": "string" } } }, @@ -12994,6 +16639,10 @@ "minimum": 0, "maximum": 262143 }, + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] + }, "shared_buffers": { "type": "string" }, @@ -13014,55 +16663,52 @@ }, "restart_database": { "type": "boolean" - }, - "session_replication_role": { - "enum": ["origin", "replica", "local"], - "type": "string" } } }, "V1PgbouncerConfigResponse": { "type": "object", "properties": { - "pool_mode": { - "type": "string", - "enum": ["transaction", "session", "statement"] - }, "default_pool_size": { - "type": "number" + "type": "integer" }, "ignore_startup_parameters": { "type": "string" }, "max_client_conn": { - "type": "number" + "type": "integer" + }, + "pool_mode": { + "type": "string", + "enum": ["transaction", "session", "statement"] }, "connection_string": { "type": "string" + }, + "server_idle_timeout": { + "type": "integer" + }, + "server_lifetime": { + "type": "integer" + }, + "query_wait_timeout": { + "type": "integer" + }, + "reserve_pool_size": { + "type": "integer" } } }, "SupavisorConfigResponse": { "type": "object", "properties": { + "identifier": { + "type": "string" + }, "database_type": { "type": "string", "enum": ["PRIMARY", "READ_REPLICA"] }, - "db_port": { - "type": "integer" - }, - "default_pool_size": { - "type": "integer", - "nullable": true - }, - "max_client_conn": { - "type": "integer", - "nullable": true - }, - "identifier": { - "type": "string" - }, "is_using_scram_auth": { "type": "boolean" }, @@ -13072,28 +16718,44 @@ "db_host": { "type": "string" }, + "db_port": { + "type": "integer" + }, "db_name": { "type": "string" }, - "connectionString": { + "connection_string": { "type": "string" }, + "connectionString": { + "type": "string", + "description": "Use connection_string instead" + }, + "default_pool_size": { + "type": "integer", + "nullable": true + }, + "max_client_conn": { + "type": "integer", + "nullable": true + }, "pool_mode": { - "enum": ["transaction", "session"], - "type": "string" + "type": "string", + "enum": ["transaction", "session"] } }, "required": [ - "database_type", - "db_port", - "default_pool_size", - "max_client_conn", "identifier", + "database_type", "is_using_scram_auth", "db_user", "db_host", + "db_port", "db_name", + "connection_string", "connectionString", + "default_pool_size", + "max_client_conn", "pool_mode" ] }, @@ -13102,15 +16764,14 @@ "properties": { "default_pool_size": { "type": "integer", - "nullable": true, "minimum": 0, - "maximum": 1000 + "maximum": 3000, + "nullable": true }, "pool_mode": { - "enum": ["transaction", "session"], "type": "string", - "deprecated": true, - "description": "This field is deprecated and is ignored in this request" + "enum": ["transaction", "session"], + "description": "Dedicated pooler mode for the project" } } }, @@ -13122,7 +16783,6 @@ "nullable": true }, "pool_mode": { - "enum": ["transaction", "session"], "type": "string" } }, @@ -13139,83 +16799,6 @@ "type": "integer", "nullable": true }, - "jwt_exp": { - "type": "integer", - "nullable": true - }, - "mailer_otp_exp": { - "type": "integer" - }, - "mailer_otp_length": { - "type": "integer", - "nullable": true - }, - "mfa_max_enrolled_factors": { - "type": "integer", - "nullable": true - }, - "mfa_phone_otp_length": { - "type": "integer" - }, - "mfa_phone_max_frequency": { - "type": "integer", - "nullable": true - }, - "password_min_length": { - "type": "integer", - "nullable": true - }, - "rate_limit_anonymous_users": { - "type": "integer", - "nullable": true - }, - "rate_limit_email_sent": { - "type": "integer", - "nullable": true - }, - "rate_limit_sms_sent": { - "type": "integer", - "nullable": true - }, - "rate_limit_token_refresh": { - "type": "integer", - "nullable": true - }, - "rate_limit_verify": { - "type": "integer", - "nullable": true - }, - "rate_limit_otp": { - "type": "integer", - "nullable": true - }, - "security_refresh_token_reuse_interval": { - "type": "integer", - "nullable": true - }, - "sessions_inactivity_timeout": { - "type": "integer", - "nullable": true - }, - "sessions_timebox": { - "type": "integer", - "nullable": true - }, - "sms_max_frequency": { - "type": "integer", - "nullable": true - }, - "sms_otp_exp": { - "type": "integer", - "nullable": true - }, - "sms_otp_length": { - "type": "integer" - }, - "smtp_max_frequency": { - "type": "integer", - "nullable": true - }, "disable_signup": { "type": "boolean", "nullable": true @@ -13488,6 +17071,14 @@ "type": "string", "nullable": true }, + "external_web3_solana_enabled": { + "type": "boolean", + "nullable": true + }, + "external_web3_ethereum_enabled": { + "type": "boolean", + "nullable": true + }, "external_zoom_client_id": { "type": "string", "nullable": true @@ -13560,6 +17151,22 @@ "type": "string", "nullable": true }, + "hook_before_user_created_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_before_user_created_uri": { + "type": "string", + "nullable": true + }, + "hook_before_user_created_secrets": { + "type": "string", + "nullable": true + }, + "jwt_exp": { + "type": "integer", + "nullable": true + }, "mailer_allow_unverified_email_sign_ins": { "type": "boolean", "nullable": true @@ -13568,6 +17175,13 @@ "type": "boolean", "nullable": true }, + "mailer_otp_exp": { + "type": "integer" + }, + "mailer_otp_length": { + "type": "integer", + "nullable": true + }, "mailer_secure_email_change_enabled": { "type": "boolean", "nullable": true @@ -13620,6 +17234,10 @@ "type": "string", "nullable": true }, + "mfa_max_enrolled_factors": { + "type": "integer", + "nullable": true + }, "mfa_totp_enroll_enabled": { "type": "boolean", "nullable": true @@ -13644,16 +17262,61 @@ "type": "boolean", "nullable": true }, + "mfa_phone_otp_length": { + "type": "integer" + }, "mfa_phone_template": { "type": "string", "nullable": true }, + "mfa_phone_max_frequency": { + "type": "integer", + "nullable": true + }, "password_hibp_enabled": { "type": "boolean", "nullable": true }, + "password_min_length": { + "type": "integer", + "nullable": true + }, "password_required_characters": { "type": "string", + "enum": [ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", + "" + ], + "nullable": true + }, + "rate_limit_anonymous_users": { + "type": "integer", + "nullable": true + }, + "rate_limit_email_sent": { + "type": "integer", + "nullable": true + }, + "rate_limit_sms_sent": { + "type": "integer", + "nullable": true + }, + "rate_limit_token_refresh": { + "type": "integer", + "nullable": true + }, + "rate_limit_verify": { + "type": "integer", + "nullable": true + }, + "rate_limit_otp": { + "type": "integer", + "nullable": true + }, + "rate_limit_web3": { + "type": "integer", "nullable": true }, "refresh_token_rotation_enabled": { @@ -13678,6 +17341,7 @@ }, "security_captcha_provider": { "type": "string", + "enum": ["turnstile", "hcaptcha"], "nullable": true }, "security_captcha_secret": { @@ -13688,10 +17352,18 @@ "type": "boolean", "nullable": true }, + "security_refresh_token_reuse_interval": { + "type": "integer", + "nullable": true + }, "security_update_password_require_reauthentication": { "type": "boolean", "nullable": true }, + "sessions_inactivity_timeout": { + "type": "integer", + "nullable": true + }, "sessions_single_per_user": { "type": "boolean", "nullable": true @@ -13700,6 +17372,10 @@ "type": "string", "nullable": true }, + "sessions_timebox": { + "type": "integer", + "nullable": true + }, "site_url": { "type": "string", "nullable": true @@ -13708,6 +17384,10 @@ "type": "boolean", "nullable": true }, + "sms_max_frequency": { + "type": "integer", + "nullable": true + }, "sms_messagebird_access_key": { "type": "string", "nullable": true @@ -13716,8 +17396,16 @@ "type": "string", "nullable": true }, + "sms_otp_exp": { + "type": "integer", + "nullable": true + }, + "sms_otp_length": { + "type": "integer" + }, "sms_provider": { "type": "string", + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], "nullable": true }, "sms_template": { @@ -13730,6 +17418,7 @@ }, "sms_test_otp_valid_until": { "type": "string", + "format": "date-time", "nullable": true }, "sms_textlocal_api_key": { @@ -13782,12 +17471,17 @@ }, "smtp_admin_email": { "type": "string", + "format": "email", "nullable": true }, "smtp_host": { "type": "string", "nullable": true }, + "smtp_max_frequency": { + "type": "integer", + "nullable": true + }, "smtp_pass": { "type": "string", "nullable": true @@ -13812,26 +17506,6 @@ "required": [ "api_max_request_duration", "db_max_pool_size", - "jwt_exp", - "mailer_otp_exp", - "mailer_otp_length", - "mfa_max_enrolled_factors", - "mfa_phone_otp_length", - "mfa_phone_max_frequency", - "password_min_length", - "rate_limit_anonymous_users", - "rate_limit_email_sent", - "rate_limit_sms_sent", - "rate_limit_token_refresh", - "rate_limit_verify", - "rate_limit_otp", - "security_refresh_token_reuse_interval", - "sessions_inactivity_timeout", - "sessions_timebox", - "sms_max_frequency", - "sms_otp_exp", - "sms_otp_length", - "smtp_max_frequency", "disable_signup", "external_anonymous_users_enabled", "external_apple_additional_client_ids", @@ -13900,6 +17574,8 @@ "external_workos_enabled", "external_workos_secret", "external_workos_url", + "external_web3_solana_enabled", + "external_web3_ethereum_enabled", "external_zoom_client_id", "external_zoom_enabled", "external_zoom_secret", @@ -13918,8 +17594,14 @@ "hook_send_email_enabled", "hook_send_email_uri", "hook_send_email_secrets", + "hook_before_user_created_enabled", + "hook_before_user_created_uri", + "hook_before_user_created_secrets", + "jwt_exp", "mailer_allow_unverified_email_sign_ins", "mailer_autoconfirm", + "mailer_otp_exp", + "mailer_otp_length", "mailer_secure_email_change_enabled", "mailer_subjects_confirmation", "mailer_subjects_email_change", @@ -13933,15 +17615,26 @@ "mailer_templates_magic_link_content", "mailer_templates_reauthentication_content", "mailer_templates_recovery_content", + "mfa_max_enrolled_factors", "mfa_totp_enroll_enabled", "mfa_totp_verify_enabled", "mfa_phone_enroll_enabled", "mfa_phone_verify_enabled", "mfa_web_authn_enroll_enabled", "mfa_web_authn_verify_enabled", + "mfa_phone_otp_length", "mfa_phone_template", + "mfa_phone_max_frequency", "password_hibp_enabled", + "password_min_length", "password_required_characters", + "rate_limit_anonymous_users", + "rate_limit_email_sent", + "rate_limit_sms_sent", + "rate_limit_token_refresh", + "rate_limit_verify", + "rate_limit_otp", + "rate_limit_web3", "refresh_token_rotation_enabled", "saml_enabled", "saml_external_url", @@ -13950,13 +17643,19 @@ "security_captcha_provider", "security_captcha_secret", "security_manual_linking_enabled", + "security_refresh_token_reuse_interval", "security_update_password_require_reauthentication", + "sessions_inactivity_timeout", "sessions_single_per_user", "sessions_tags", + "sessions_timebox", "site_url", "sms_autoconfirm", + "sms_max_frequency", "sms_messagebird_access_key", "sms_messagebird_originator", + "sms_otp_exp", + "sms_otp_length", "sms_provider", "sms_template", "sms_test_otp", @@ -13969,236 +17668,247 @@ "sms_twilio_message_service_sid", "sms_twilio_verify_account_sid", "sms_twilio_verify_auth_token", - "sms_twilio_verify_message_service_sid", - "sms_vonage_api_key", - "sms_vonage_api_secret", - "sms_vonage_from", - "smtp_admin_email", - "smtp_host", - "smtp_pass", - "smtp_port", - "smtp_sender_name", - "smtp_user", - "uri_allow_list" - ] - }, - "UpdateAuthConfigBody": { - "type": "object", - "properties": { - "jwt_exp": { - "type": "integer", - "minimum": 0, - "maximum": 604800 - }, - "smtp_max_frequency": { - "type": "integer", - "minimum": 0, - "maximum": 32767 - }, - "mfa_max_enrolled_factors": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647 - }, - "sessions_timebox": { - "type": "integer", - "minimum": 0 - }, - "sessions_inactivity_timeout": { - "type": "integer", - "minimum": 0 - }, - "rate_limit_anonymous_users": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647 - }, - "rate_limit_email_sent": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647 - }, - "rate_limit_sms_sent": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647 - }, - "rate_limit_verify": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647 - }, - "rate_limit_token_refresh": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647 - }, - "rate_limit_otp": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647 - }, - "password_min_length": { - "type": "integer", - "minimum": 6, - "maximum": 32767 - }, - "security_refresh_token_reuse_interval": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647 - }, - "mailer_otp_exp": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647 - }, - "mailer_otp_length": { - "type": "integer", - "minimum": 6, - "maximum": 10 - }, - "sms_max_frequency": { - "type": "integer", - "minimum": 0, - "maximum": 32767 - }, - "sms_otp_exp": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647 - }, - "sms_otp_length": { - "type": "integer", - "minimum": 0, - "maximum": 32767 - }, - "db_max_pool_size": { - "type": "integer" - }, - "api_max_request_duration": { - "type": "integer" - }, - "mfa_phone_max_frequency": { - "type": "integer", - "minimum": 0, - "maximum": 32767 - }, - "mfa_phone_otp_length": { - "type": "integer", - "minimum": 0, - "maximum": 32767 - }, + "sms_twilio_verify_message_service_sid", + "sms_vonage_api_key", + "sms_vonage_api_secret", + "sms_vonage_from", + "smtp_admin_email", + "smtp_host", + "smtp_max_frequency", + "smtp_pass", + "smtp_port", + "smtp_sender_name", + "smtp_user", + "uri_allow_list" + ] + }, + "UpdateAuthConfigBody": { + "type": "object", + "properties": { "site_url": { "type": "string", - "pattern": "/^[^,]+$/" + "pattern": "^[^,]+$", + "nullable": true }, "disable_signup": { - "type": "boolean" + "type": "boolean", + "nullable": true + }, + "jwt_exp": { + "type": "integer", + "minimum": 0, + "maximum": 604800, + "nullable": true }, "smtp_admin_email": { - "type": "string" + "type": "string", + "format": "email", + "nullable": true }, "smtp_host": { - "type": "string" + "type": "string", + "nullable": true }, "smtp_port": { - "type": "string" + "type": "string", + "nullable": true }, "smtp_user": { - "type": "string" + "type": "string", + "nullable": true }, "smtp_pass": { - "type": "string" + "type": "string", + "nullable": true + }, + "smtp_max_frequency": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true }, "smtp_sender_name": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_allow_unverified_email_sign_ins": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mailer_autoconfirm": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mailer_subjects_invite": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_subjects_confirmation": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_subjects_recovery": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_subjects_email_change": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_subjects_magic_link": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_subjects_reauthentication": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_invite_content": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_confirmation_content": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_recovery_content": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_email_change_content": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_magic_link_content": { - "type": "string" + "type": "string", + "nullable": true }, "mailer_templates_reauthentication_content": { - "type": "string" + "type": "string", + "nullable": true + }, + "mfa_max_enrolled_factors": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647, + "nullable": true }, "uri_allow_list": { - "type": "string" + "type": "string", + "nullable": true }, "external_anonymous_users_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_email_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_phone_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "saml_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "saml_external_url": { "type": "string", - "pattern": "/^[^,]+$/" + "pattern": "^[^,]+$", + "nullable": true }, "security_captcha_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "security_captcha_provider": { - "type": "string" + "type": "string", + "enum": ["turnstile", "hcaptcha"], + "nullable": true }, "security_captcha_secret": { - "type": "string" + "type": "string", + "nullable": true + }, + "sessions_timebox": { + "type": "integer", + "minimum": 0, + "nullable": true + }, + "sessions_inactivity_timeout": { + "type": "integer", + "minimum": 0, + "nullable": true }, "sessions_single_per_user": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "sessions_tags": { "type": "string", - "pattern": "/^\\s*([a-z0-9_-]+(\\s*,+\\s*)?)*\\s*$/i" + "pattern": "^\\s*([a-zA-Z0-9_-]+(\\s*,+\\s*)?)*\\s*$", + "nullable": true + }, + "rate_limit_anonymous_users": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_email_sent": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_sms_sent": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_verify": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_token_refresh": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_otp": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_web3": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true }, "mailer_secure_email_change_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "refresh_token_rotation_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "password_hibp_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true + }, + "password_min_length": { + "type": "integer", + "minimum": 6, + "maximum": 32767, + "nullable": true }, "password_required_characters": { "type": "string", @@ -14207,447 +17917,1195 @@ "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", "" - ] + ], + "nullable": true }, "security_manual_linking_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "security_update_password_require_reauthentication": { - "type": "boolean" + "type": "boolean", + "nullable": true + }, + "security_refresh_token_reuse_interval": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647, + "nullable": true + }, + "mailer_otp_exp": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647 + }, + "mailer_otp_length": { + "type": "integer", + "minimum": 6, + "maximum": 10, + "nullable": true }, "sms_autoconfirm": { - "type": "boolean" + "type": "boolean", + "nullable": true + }, + "sms_max_frequency": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true + }, + "sms_otp_exp": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647, + "nullable": true + }, + "sms_otp_length": { + "type": "integer", + "minimum": 0, + "maximum": 32767 }, "sms_provider": { - "type": "string" + "type": "string", + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "nullable": true }, "sms_messagebird_access_key": { - "type": "string" + "type": "string", + "nullable": true }, "sms_messagebird_originator": { - "type": "string" + "type": "string", + "nullable": true }, "sms_test_otp": { "type": "string", - "pattern": "/^([0-9]{1,15}=[0-9]+,?)*$/" + "pattern": "^([0-9]{1,15}=[0-9]+,?)*$", + "nullable": true }, "sms_test_otp_valid_until": { - "type": "string" + "type": "string", + "format": "date-time", + "nullable": true }, "sms_textlocal_api_key": { - "type": "string" + "type": "string", + "nullable": true }, "sms_textlocal_sender": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_account_sid": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_auth_token": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_content_sid": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_message_service_sid": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_verify_account_sid": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_verify_auth_token": { - "type": "string" + "type": "string", + "nullable": true }, "sms_twilio_verify_message_service_sid": { - "type": "string" + "type": "string", + "nullable": true }, "sms_vonage_api_key": { - "type": "string" + "type": "string", + "nullable": true }, "sms_vonage_api_secret": { - "type": "string" + "type": "string", + "nullable": true }, "sms_vonage_from": { - "type": "string" + "type": "string", + "nullable": true }, "sms_template": { - "type": "string" + "type": "string", + "nullable": true }, "hook_mfa_verification_attempt_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "hook_mfa_verification_attempt_uri": { - "type": "string" + "type": "string", + "nullable": true }, "hook_mfa_verification_attempt_secrets": { - "type": "string" + "type": "string", + "nullable": true }, "hook_password_verification_attempt_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "hook_password_verification_attempt_uri": { - "type": "string" + "type": "string", + "nullable": true }, "hook_password_verification_attempt_secrets": { - "type": "string" + "type": "string", + "nullable": true }, "hook_custom_access_token_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "hook_custom_access_token_uri": { - "type": "string" + "type": "string", + "nullable": true }, "hook_custom_access_token_secrets": { - "type": "string" + "type": "string", + "nullable": true }, "hook_send_sms_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "hook_send_sms_uri": { - "type": "string" + "type": "string", + "nullable": true }, "hook_send_sms_secrets": { - "type": "string" + "type": "string", + "nullable": true }, "hook_send_email_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "hook_send_email_uri": { - "type": "string" + "type": "string", + "nullable": true }, "hook_send_email_secrets": { - "type": "string" + "type": "string", + "nullable": true + }, + "hook_before_user_created_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_before_user_created_uri": { + "type": "string", + "nullable": true + }, + "hook_before_user_created_secrets": { + "type": "string", + "nullable": true }, "external_apple_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_apple_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_apple_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_apple_additional_client_ids": { - "type": "string" + "type": "string", + "nullable": true }, "external_azure_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_azure_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_azure_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_azure_url": { - "type": "string" + "type": "string", + "nullable": true }, "external_bitbucket_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_bitbucket_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_bitbucket_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_discord_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_discord_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_discord_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_facebook_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_facebook_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_facebook_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_figma_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_figma_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_figma_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_github_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_github_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_github_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_gitlab_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_gitlab_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_gitlab_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_gitlab_url": { - "type": "string" + "type": "string", + "nullable": true }, "external_google_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_google_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_google_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_google_additional_client_ids": { - "type": "string" + "type": "string", + "nullable": true }, "external_google_skip_nonce_check": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_kakao_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_kakao_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_kakao_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_keycloak_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_keycloak_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_keycloak_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_keycloak_url": { - "type": "string" + "type": "string", + "nullable": true }, "external_linkedin_oidc_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_linkedin_oidc_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_linkedin_oidc_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_slack_oidc_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_slack_oidc_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_slack_oidc_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_notion_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_notion_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_notion_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_slack_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_slack_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_slack_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_spotify_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_spotify_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_spotify_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_twitch_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_twitch_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_twitch_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_twitter_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_twitter_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_twitter_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_workos_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_workos_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_workos_secret": { - "type": "string" + "type": "string", + "nullable": true }, "external_workos_url": { - "type": "string" + "type": "string", + "nullable": true + }, + "external_web3_solana_enabled": { + "type": "boolean", + "nullable": true + }, + "external_web3_ethereum_enabled": { + "type": "boolean", + "nullable": true }, "external_zoom_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "external_zoom_client_id": { - "type": "string" + "type": "string", + "nullable": true }, "external_zoom_secret": { - "type": "string" + "type": "string", + "nullable": true + }, + "db_max_pool_size": { + "type": "integer", + "nullable": true + }, + "api_max_request_duration": { + "type": "integer", + "nullable": true }, "mfa_totp_enroll_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mfa_totp_verify_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mfa_web_authn_enroll_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mfa_web_authn_verify_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mfa_phone_enroll_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true }, "mfa_phone_verify_enabled": { - "type": "boolean" + "type": "boolean", + "nullable": true + }, + "mfa_phone_max_frequency": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true + }, + "mfa_phone_otp_length": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true }, "mfa_phone_template": { + "type": "string", + "nullable": true + } + } + }, + "CreateThirdPartyAuthBody": { + "type": "object", + "properties": { + "oidc_issuer_url": { + "type": "string" + }, + "jwks_url": { + "type": "string" + }, + "custom_jwks": {} + } + }, + "ThirdPartyAuth": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "nullable": true + }, + "resolved_jwks": { + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] + }, + "GetProjectAvailableRestoreVersionsResponse": { + "type": "object", + "properties": { + "available_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + }, + "postgres_engine": { + "type": "string", + "enum": ["13", "14", "15", "17", "17-oriole"] + } + }, + "required": ["version", "release_channel", "postgres_engine"] + } + } + }, + "required": ["available_versions"] + }, + "ListProjectAddonsResponse": { + "type": "object", + "properties": { + "selected_addons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain" + ] + }, + "variant": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { + "type": "string", + "enum": ["cd_default"] + }, + { + "type": "string", + "enum": ["pitr_7", "pitr_14", "pitr_28"] + }, + { + "type": "string", + "enum": ["ipv4_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_phone_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_web_authn_default"] + }, + { + "type": "string", + "enum": ["log_drain_default"] + } + ] + }, + "name": { + "type": "string" + }, + "price": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["fixed", "usage"] + }, + "interval": { + "type": "string", + "enum": ["monthly", "hourly"] + }, + "amount": { + "type": "number" + } + }, + "required": ["description", "type", "interval", "amount"] + }, + "meta": { + "description": "Any JSON-serializable value" + } + }, + "required": ["id", "name", "price"] + } + }, + "required": ["type", "variant"] + } + }, + "available_addons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain" + ] + }, + "name": { + "type": "string" + }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { + "type": "string", + "enum": ["cd_default"] + }, + { + "type": "string", + "enum": ["pitr_7", "pitr_14", "pitr_28"] + }, + { + "type": "string", + "enum": ["ipv4_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_phone_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_web_authn_default"] + }, + { + "type": "string", + "enum": ["log_drain_default"] + } + ] + }, + "name": { + "type": "string" + }, + "price": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["fixed", "usage"] + }, + "interval": { + "type": "string", + "enum": ["monthly", "hourly"] + }, + "amount": { + "type": "number" + } + }, + "required": ["description", "type", "interval", "amount"] + }, + "meta": { + "description": "Any JSON-serializable value" + } + }, + "required": ["id", "name", "price"] + } + } + }, + "required": ["type", "name", "variants"] + } } - } + }, + "required": ["selected_addons", "available_addons"] }, - "CreateThirdPartyAuthBody": { + "ApplyProjectAddonBody": { "type": "object", "properties": { - "oidc_issuer_url": { - "type": "string" - }, - "jwks_url": { - "type": "string" + "addon_variant": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { + "type": "string", + "enum": ["cd_default"] + }, + { + "type": "string", + "enum": ["pitr_7", "pitr_14", "pitr_28"] + }, + { + "type": "string", + "enum": ["ipv4_default"] + } + ] }, - "custom_jwks": { - "type": "object" + "addon_type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain" + ] } - } + }, + "required": ["addon_variant", "addon_type"] }, - "ThirdPartyAuth": { + "ProjectClaimTokenResponse": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "type": { + "token_alias": { "type": "string" }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "type": "object", - "nullable": true - }, - "resolved_jwks": { - "type": "object", - "nullable": true - }, - "inserted_at": { + "expires_at": { "type": "string" }, - "updated_at": { + "created_at": { "type": "string" }, - "resolved_at": { + "created_by": { "type": "string", - "nullable": true + "format": "uuid" } }, - "required": ["id", "type", "inserted_at", "updated_at"] + "required": ["token_alias", "expires_at", "created_at", "created_by"] }, - "ProjectAvailableRestoreVersion": { + "CreateProjectClaimTokenResponse": { "type": "object", "properties": { - "version": { + "token": { "type": "string" }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + "token_alias": { + "type": "string" }, - "postgres_engine": { + "expires_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "created_by": { "type": "string", - "enum": ["13", "14", "15", "17", "17-oriole"] + "format": "uuid" } }, - "required": ["version", "release_channel", "postgres_engine"] + "required": ["token", "token_alias", "expires_at", "created_at", "created_by"] }, - "GetProjectAvailableRestoreVersionsResponse": { + "V1ProjectAdvisorsResponse": { "type": "object", "properties": { - "available_versions": { + "lints": { "type": "array", "items": { "type": "object", "properties": { - "version": { + "name": { + "type": "string", + "enum": [ + "unindexed_foreign_keys", + "auth_users_exposed", + "auth_rls_initplan", + "no_primary_key", + "unused_index", + "multiple_permissive_policies", + "policy_exists_rls_disabled", + "rls_enabled_no_policy", + "duplicate_index", + "security_definer_view", + "function_search_path_mutable", + "rls_disabled_in_public", + "extension_in_public", + "rls_references_user_metadata", + "materialized_view_in_api", + "foreign_table_in_api", + "unsupported_reg_types", + "auth_otp_long_expiry", + "auth_otp_short_length", + "ssl_not_enforced", + "network_restrictions_not_set", + "password_requirements_min_length", + "pitr_not_enabled", + "auth_leaked_password_protection", + "auth_insufficient_mfa_options", + "auth_password_policy_missing", + "leaked_service_key", + "no_backup_admin" + ] + }, + "title": { "type": "string" }, - "release_channel": { + "level": { "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + "enum": ["ERROR", "WARN", "INFO"] }, - "postgres_engine": { + "facing": { "type": "string", - "enum": ["13", "14", "15", "17", "17-oriole"] + "enum": ["EXTERNAL"] + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "enum": ["PERFORMANCE", "SECURITY"] + } + }, + "description": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "remediation": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": { + "schema": { + "type": "string" + }, + "name": { + "type": "string" + }, + "entity": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["table", "view", "auth", "function", "extension", "compliance"] + }, + "fkey_name": { + "type": "string" + }, + "fkey_columns": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "cache_key": { + "type": "string" } }, - "required": ["version", "release_channel", "postgres_engine"] + "required": [ + "name", + "title", + "level", + "facing", + "categories", + "description", + "detail", + "remediation", + "cache_key" + ] } } }, - "required": ["available_versions"] + "required": ["lints"] }, - "RestoreProjectBodyDto": { + "AnalyticsResponse": { "type": "object", - "properties": {}, - "hideDefinitions": ["release_channel", "postgres_engine"] + "properties": { + "result": { + "type": "array", + "items": {} + }, + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "location": { + "type": "string" + }, + "locationType": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": ["domain", "location", "locationType", "message", "reason"] + } + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": ["code", "errors", "message", "status"] + } + ] + } + } + }, + "V1GetUsageApiCountResponse": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "total_auth_requests": { + "type": "number" + }, + "total_realtime_requests": { + "type": "number" + }, + "total_rest_requests": { + "type": "number" + }, + "total_storage_requests": { + "type": "number" + } + }, + "required": [ + "timestamp", + "total_auth_requests", + "total_realtime_requests", + "total_rest_requests", + "total_storage_requests" + ] + } + }, + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "location": { + "type": "string" + }, + "locationType": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": ["domain", "location", "locationType", "message", "reason"] + } + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": ["code", "errors", "message", "status"] + } + ] + } + } }, - "V1AnalyticsResponse": { + "V1GetUsageApiRequestsCountResponse": { "type": "object", "properties": { + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "count": { + "type": "number" + } + }, + "required": ["count"] + } + }, "error": { "oneOf": [ { + "type": "string" + }, + { + "type": "object", "properties": { "code": { "type": "number" @@ -14655,6 +19113,7 @@ "errors": { "type": "array", "items": { + "type": "object", "properties": { "domain": { "type": "string" @@ -14671,7 +19130,8 @@ "reason": { "type": "string" } - } + }, + "required": ["domain", "location", "locationType", "message", "reason"] } }, "message": { @@ -14680,31 +19140,69 @@ "status": { "type": "string" } - } - }, - { - "type": "string" + }, + "required": ["code", "errors", "message", "status"] } ] - }, - "result": { - "type": "array", - "items": { - "type": "object" - } } } }, - "V1RunQueryBody": { + "V1ListMigrationsResponse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string" + } + }, + "required": ["version"] + } + }, + "V1CreateMigrationBody": { + "type": "object", + "properties": { + "query": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string" + } + }, + "required": ["query"] + }, + "V1UpsertMigrationBody": { "type": "object", "properties": { "query": { + "type": "string", + "minLength": 1 + }, + "name": { "type": "string" } }, "required": ["query"] }, - "GetProjectDbMetadataResponseDto": { + "V1RunQueryBody": { + "type": "object", + "properties": { + "query": { + "type": "string", + "minLength": 1 + }, + "read_only": { + "type": "boolean" + } + }, + "required": ["query"] + }, + "GetProjectDbMetadataResponse": { "type": "object", "properties": { "databases": { @@ -14736,20 +19234,97 @@ }, "required": ["databases"] }, - "FunctionResponse": { + "JitAccessResponse": { "type": "object", "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" + "user_id": { + "type": "string", + "format": "uuid" }, - "updated_at": { - "type": "integer", - "format": "int64" + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "string" + } + }, + "required": ["role"] + } + } + }, + "required": ["user_id", "user_roles"] + }, + "JitListAccessResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "string" + } + }, + "required": ["role"] + } + } + }, + "required": ["user_id", "user_roles"] + } + } + }, + "required": ["items"] + }, + "UpdateJitAccessBody": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "minLength": 1 }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "string" + } + }, + "required": ["role"] + } + } + }, + "required": ["user_id", "roles"] + }, + "FunctionResponse": { + "type": "object", + "properties": { "id": { "type": "string" }, @@ -14760,8 +19335,19 @@ "type": "string" }, "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -14774,16 +19360,19 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, - "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] + "required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] }, "V1CreateFunctionBody": { "type": "object", "properties": { "slug": { "type": "string", - "pattern": "/^[A-Za-z0-9_-]+$/" + "pattern": "^[A-Za-z0-9_-]+$" }, "name": { "type": "string" @@ -14798,42 +19387,49 @@ "required": ["slug", "name", "body"] }, "BulkUpdateFunctionBody": { - "type": "object", - "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "id": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "slug": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]+$" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + }, + "ezbr_sha256": { + "type": "string" + } }, - "import_map_path": { - "type": "string" - } - }, - "required": ["version", "id", "slug", "name", "status"] + "required": ["id", "slug", "name", "status", "version"] + } }, "BulkUpdateFunctionResponse": { "type": "object", @@ -14843,17 +19439,6 @@ "items": { "type": "object", "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, "id": { "type": "string" }, @@ -14864,8 +19449,19 @@ "type": "string" }, "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -14878,38 +19474,17 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, - "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] + "required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] } } }, "required": ["functions"] }, - "FunctionDeployMetadata": { - "type": "object", - "properties": { - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - }, - "static_patterns": { - "type": "array", - "items": { - "type": "string" - } - }, - "verify_jwt": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "required": ["entrypoint_path"] - }, "FunctionDeployBody": { "type": "object", "properties": { @@ -14945,22 +19520,11 @@ "required": ["entrypoint_path"] } }, - "required": ["file", "metadata"] + "required": ["metadata"] }, "DeployFunctionResponse": { "type": "object", "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, "id": { "type": "string" }, @@ -14971,8 +19535,19 @@ "type": "string" }, "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -14985,24 +19560,16 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, - "required": ["version", "id", "slug", "name", "status"] + "required": ["id", "slug", "name", "status", "version"] }, "FunctionSlugResponse": { "type": "object", "properties": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, "id": { "type": "string" }, @@ -15013,8 +19580,19 @@ "type": "string" }, "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -15027,9 +19605,16 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, - "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] + "required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] + }, + "StreamableFile": { + "type": "object", + "properties": {} }, "V1UpdateFunctionBody": { "type": "object", @@ -15069,81 +19654,6 @@ }, "required": ["id", "name", "owner", "created_at", "updated_at", "public"] }, - "AttributeValue": { - "type": "object", - "properties": { - "default": { - "oneOf": [ - { - "type": "object" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "array": { - "type": "boolean" - } - } - }, - "AttributeMapping": { - "type": "object", - "properties": { - "keys": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "default": { - "oneOf": [ - { - "type": "object" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "array": { - "type": "boolean" - } - } - } - } - }, - "required": ["keys"] - }, "CreateProviderBody": { "type": "object", "properties": { @@ -15172,22 +19682,6 @@ "additionalProperties": { "type": "object", "properties": { - "default": { - "oneOf": [ - { - "type": "object" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, "name": { "type": "string" }, @@ -15197,45 +19691,11 @@ "type": "string" } }, - "array": { - "type": "boolean" - } - } - } - } - }, - "required": ["keys"] - } - }, - "required": ["type"] - }, - "SamlDescriptor": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "entity_id": { - "type": "string" - }, - "metadata_url": { - "type": "string" - }, - "metadata_xml": { - "type": "string" - }, - "attribute_mapping": { - "type": "object", - "properties": { - "keys": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -15248,15 +19708,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -15267,25 +19718,7 @@ "required": ["keys"] } }, - "required": ["id", "entity_id"] - }, - "Domain": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] + "required": ["type"] }, "CreateProviderResponse": { "type": "object", @@ -15316,106 +19749,20 @@ "additionalProperties": { "type": "object", "properties": { - "default": { - "oneOf": [ - { - "type": "object" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, "name": { "type": "string" }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "array": { - "type": "boolean" - } - } - } - } - }, - "required": ["keys"] - } - }, - "required": ["id", "entity_id"] - }, - "domains": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] - } - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] - }, - "Provider": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "saml": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "entity_id": { - "type": "string" - }, - "metadata_url": { - "type": "string" - }, - "metadata_xml": { - "type": "string" - }, - "attribute_mapping": { - "type": "object", - "properties": { - "keys": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -15428,15 +19775,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -15513,10 +19851,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -15529,15 +19877,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -15613,10 +19952,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -15629,15 +19978,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -15703,10 +20043,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -15719,15 +20069,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -15768,10 +20109,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -15784,15 +20135,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -15864,10 +20206,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -15880,15 +20232,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -15931,35 +20274,6 @@ }, "required": ["id"] }, - "V1Backup": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["COMPLETED", "FAILED", "PENDING", "REMOVED", "ARCHIVED", "CANCELLED"] - }, - "is_physical_backup": { - "type": "boolean" - }, - "inserted_at": { - "type": "string" - } - }, - "required": ["status", "is_physical_backup", "inserted_at"] - }, - "V1PhysicalBackup": { - "type": "object", - "properties": { - "earliest_physical_backup_date_unix": { - "type": "integer", - "format": "int64" - }, - "latest_physical_backup_date_unix": { - "type": "integer", - "format": "int64" - } - } - }, "V1BackupsResponse": { "type": "object", "properties": { @@ -15977,30 +20291,28 @@ "items": { "type": "object", "properties": { + "is_physical_backup": { + "type": "boolean" + }, "status": { "type": "string", "enum": ["COMPLETED", "FAILED", "PENDING", "REMOVED", "ARCHIVED", "CANCELLED"] }, - "is_physical_backup": { - "type": "boolean" - }, "inserted_at": { "type": "string" } }, - "required": ["status", "is_physical_backup", "inserted_at"] + "required": ["is_physical_backup", "status", "inserted_at"] } }, "physical_backup_data": { "type": "object", "properties": { "earliest_physical_backup_date_unix": { - "type": "integer", - "format": "int64" + "type": "integer" }, "latest_physical_backup_date_unix": { - "type": "integer", - "format": "int64" + "type": "integer" } } } @@ -16018,6 +20330,39 @@ }, "required": ["recovery_time_target_unix"] }, + "V1RestorePointPostBody": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 20 + } + }, + "required": ["name"] + }, + "V1RestorePointResponse": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["AVAILABLE", "PENDING", "REMOVED"] + } + }, + "required": ["name", "status"] + }, + "V1UndoBody": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 20 + } + }, + "required": ["name"] + }, "V1OrganizationMemberResponse": { "type": "object", "properties": { @@ -16039,13 +20384,15 @@ }, "required": ["user_id", "user_name", "role_name", "mfa_enabled"] }, - "BillingPlanId": { - "type": "string", - "enum": ["free", "pro", "team", "enterprise"] - }, "V1OrganizationSlugResponse": { "type": "object", "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, "plan": { "type": "string", "enum": ["free", "pro", "team", "enterprise"] @@ -16054,7 +20401,11 @@ "type": "array", "items": { "type": "string", - "enum": ["AI_SQL_GENERATOR_OPT_IN"] + "enum": [ + "AI_SQL_GENERATOR_OPT_IN", + "AI_DATA_GENERATOR_OPT_IN", + "AI_LOG_GENERATOR_OPT_IN" + ] } }, "allowed_release_channels": { @@ -16063,15 +20414,133 @@ "type": "string", "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] } + } + }, + "required": ["id", "name", "opt_in_tags", "allowed_release_channels"] + }, + "OrganizationProjectClaimResponse": { + "type": "object", + "properties": { + "project": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["ref", "name"] }, - "id": { + "preview": { + "type": "object", + "properties": { + "valid": { + "type": "boolean" + }, + "warnings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + }, + "info": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + }, + "members_exceeding_free_project_limit": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "limit": { + "type": "number" + } + }, + "required": ["name", "limit"] + } + }, + "target_organization_eligible": { + "type": "boolean", + "nullable": true + }, + "target_organization_has_free_project_slots": { + "type": "boolean", + "nullable": true + }, + "source_subscription_plan": { + "type": "string", + "enum": ["free", "pro", "team", "enterprise"] + }, + "target_subscription_plan": { + "type": "string", + "enum": ["free", "pro", "team", "enterprise"], + "nullable": true + } + }, + "required": [ + "valid", + "warnings", + "errors", + "info", + "members_exceeding_free_project_limit", + "target_organization_eligible", + "target_organization_has_free_project_slots", + "source_subscription_plan", + "target_subscription_plan" + ] + }, + "expires_at": { "type": "string" }, - "name": { + "created_at": { "type": "string" + }, + "created_by": { + "type": "string", + "format": "uuid" } }, - "required": ["opt_in_tags", "allowed_release_channels", "id", "name"] + "required": ["project", "preview", "expires_at", "created_at", "created_by"] } } }