diff --git a/.github/workflows/docs-mgmt-api-update.yml b/.github/workflows/docs-mgmt-api-update.yml index 7272f722f363e..0b8d542d59ade 100644 --- a/.github/workflows/docs-mgmt-api-update.yml +++ b/.github/workflows/docs-mgmt-api-update.yml @@ -8,7 +8,7 @@ on: permissions: pull-requests: write - contents: read + contents: write jobs: update-docs: diff --git a/apps/docs/spec/api_v1_openapi.json b/apps/docs/spec/api_v1_openapi.json index 370f302ea3d30..81dd92764b40b 100644 --- a/apps/docs/spec/api_v1_openapi.json +++ b/apps/docs/spec/api_v1_openapi.json @@ -7,7 +7,13 @@ "summary": "Get database branch config", "description": "Fetches configurations of the specified database branch", "parameters": [ - { "name": "branch_id", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "branch_id", + "required": true, + "in": "path", + "description": "Branch ID", + "schema": { "format": "uuid", "type": "string" } + } ], "responses": { "200": { @@ -28,7 +34,13 @@ "summary": "Update database branch config", "description": "Updates the configuration of the specified database branch", "parameters": [ - { "name": "branch_id", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "branch_id", + "required": true, + "in": "path", + "description": "Branch ID", + "schema": { "format": "uuid", "type": "string" } + } ], "requestBody": { "required": true, @@ -53,7 +65,13 @@ "summary": "Delete a database branch", "description": "Deletes the specified database branch", "parameters": [ - { "name": "branch_id", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "branch_id", + "required": true, + "in": "path", + "description": "Branch ID", + "schema": { "format": "uuid", "type": "string" } + } ], "responses": { "200": { @@ -76,8 +94,20 @@ "summary": "Pushes a database branch", "description": "Pushes the specified database branch", "parameters": [ - { "name": "branch_id", "required": true, "in": "path", "schema": { "type": "string" } } + { + "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": "", @@ -99,8 +129,20 @@ "summary": "Merges a database branch", "description": "Merges the specified database branch", "parameters": [ - { "name": "branch_id", "required": true, "in": "path", "schema": { "type": "string" } } + { + "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": "", @@ -122,8 +164,20 @@ "summary": "Resets a database branch", "description": "Resets the specified database branch", "parameters": [ - { "name": "branch_id", "required": true, "in": "path", "schema": { "type": "string" } } + { + "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": "", @@ -139,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", @@ -168,9 +253,7 @@ "requestBody": { "required": true, "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/V1CreateProjectBodyDto" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/V1CreateProjectBody" } } } }, "responses": { @@ -216,7 +299,7 @@ "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/CreateOrganizationV1Dto" } + "schema": { "$ref": "#/components/schemas/CreateOrganizationV1" } } } }, @@ -241,33 +324,52 @@ "summary": "[Beta] Authorize user through oauth", "parameters": [ { - "name": "code_challenge_method", - "required": false, + "name": "client_id", + "required": true, "in": "query", - "schema": { "enum": ["plain", "sha256", "S256"], "type": "string" } + "schema": { "format": "uuid", "type": "string" } }, { - "name": "code_challenge", - "required": false, + "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": "scope", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "state", "required": false, "in": "query", "schema": { "type": "string" } }, { - "name": "response_type", - "required": true, + "name": "response_mode", + "required": false, "in": "query", "schema": { "type": "string" } }, { - "name": "redirect_uri", - "required": true, + "name": "code_challenge", + "required": false, "in": "query", "schema": { "type": "string" } }, - { "name": "client_id", "required": true, "in": "query", "schema": { "type": "string" } } + { + "name": "code_challenge_method", + "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" } + } ], - "responses": { "303": { "description": "" } }, + "responses": { "204": { "description": "" } }, "tags": ["OAuth"], "security": [{ "oauth2": ["read"] }] } @@ -308,7 +410,7 @@ "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/OAuthRevokeTokenBodyDto" } + "schema": { "$ref": "#/components/schemas/OAuthRevokeTokenBody" } } } }, @@ -317,11 +419,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", @@ -340,12 +506,6 @@ "required": false, "in": "query", "schema": { "enum": ["asc", "desc"], "type": "string" } - }, - { - "name": "project_ref", - "required": false, - "in": "query", - "schema": { "type": "string" } } ], "responses": { @@ -391,8 +551,20 @@ "operationId": "v1-get-project-api-keys", "summary": "Get project api keys", "parameters": [ - { "name": "reveal", "required": false, "in": "query", "schema": { "type": "boolean" } }, - { "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" } + }, + { + "name": "reveal", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + } ], "responses": { "200": { @@ -412,11 +584,23 @@ "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": "reveal", "required": false, "in": "query", "schema": { "type": "boolean" } }, - { "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" } + }, + { + "name": "reveal", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { "type": "boolean" } + } ], "requestBody": { "required": true, @@ -437,26 +621,26 @@ "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": "reveal", "required": false, "in": "query", "schema": { "type": "boolean" } }, - { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/UpdateApiKeyBody" } } + { + "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/ApiKeyResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/LegacyApiKeysResponse" } + } } }, "403": { "description": "" } @@ -464,34 +648,72 @@ "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": "reveal", "required": false, "in": "query", "schema": { "type": "boolean" } }, - { "name": "id", "required": true, "in": "path", "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" } + }, + { + "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": "reveal", "required": false, "in": "query", "schema": { "type": "boolean" } }, - { "name": "id", "required": true, "in": "path", "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" } + }, + { + "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": { "$ref": "#/components/schemas/UpdateApiKeyBody" } } + } + }, "responses": { "200": { "description": "", @@ -503,18 +725,106 @@ }, "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", "schema": { "type": "string" } } - ], - "responses": { - "200": { + { + "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" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyResponse" } } + } + }, + "403": { "description": "" } + }, + "tags": ["Secrets"], + "security": [{ "bearer": [] }] + }, + "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, "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": { @@ -536,7 +846,13 @@ "summary": "Create a database branch", "description": "Creates a database branch from the specified project.", "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" } + } ], "requestBody": { "required": true, @@ -562,7 +878,13 @@ "summary": "Disables preview branching", "description": "Disables preview branching for the specified project", "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": "" }, @@ -573,6 +895,35 @@ "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", @@ -583,7 +934,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": { @@ -610,7 +961,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": { @@ -632,7 +983,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": { @@ -669,7 +1020,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": { @@ -698,7 +1049,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": { @@ -722,7 +1073,13 @@ "operationId": "v1-list-all-network-bans", "summary": "[Beta] Gets project's network bans", "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": { "201": { @@ -740,12 +1097,47 @@ "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", "summary": "[Beta] Remove network bans.", "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" } + } ], "requestBody": { "required": true, @@ -769,7 +1161,13 @@ "operationId": "v1-get-network-restrictions", "summary": "[Beta] Gets project's network restrictions", "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": { @@ -792,7 +1190,13 @@ "operationId": "v1-update-network-restrictions", "summary": "[Beta] Updates project's network restrictions", "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" } + } ], "requestBody": { "required": true, @@ -823,7 +1227,13 @@ "operationId": "v1-get-pgsodium-config", "summary": "[Beta] Gets project's pgsodium config", "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": { @@ -844,7 +1254,13 @@ "operationId": "v1-update-pgsodium-config", "summary": "[Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.", "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" } + } ], "requestBody": { "required": true, @@ -880,7 +1296,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -907,7 +1323,7 @@ "required": true, "in": "path", "description": "Project ref", - "schema": { "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "requestBody": { @@ -944,7 +1360,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": { @@ -971,7 +1387,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": { @@ -995,7 +1411,13 @@ "summary": "List all secrets", "description": "Returns all secrets you've previously added to the specified project.", "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": { @@ -1020,17 +1442,18 @@ "summary": "Bulk create secrets", "description": "Creates multiple secrets and adds them to the specified project.", "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" } + } ], "requestBody": { "required": true, "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/CreateSecretBody" } - } - } + "application/json": { "schema": { "$ref": "#/components/schemas/CreateSecretBody" } } } }, "responses": { @@ -1046,7 +1469,13 @@ "summary": "Bulk delete secrets", "description": "Deletes all secrets with the given names from the specified project", "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" } + } ], "requestBody": { "required": true, @@ -1055,10 +1484,7 @@ } }, "responses": { - "200": { - "description": "", - "content": { "application/json": { "schema": { "type": "object" } } } - }, + "200": { "description": "" }, "403": { "description": "" }, "500": { "description": "Failed to delete secrets with given names" } }, @@ -1071,7 +1497,13 @@ "operationId": "v1-get-ssl-enforcement-config", "summary": "[Beta] Get project's SSL enforcement configuration.", "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": { @@ -1092,7 +1524,13 @@ "operationId": "v1-update-ssl-enforcement-config", "summary": "[Beta] Update project's SSL enforcement configuration.", "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" } + } ], "requestBody": { "required": true, @@ -1130,7 +1568,13 @@ "in": "query", "schema": { "default": "public", "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": { @@ -1153,7 +1597,13 @@ "operationId": "v1-get-vanity-subdomain-config", "summary": "[Beta] Gets current vanity subdomain config", "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": { @@ -1174,7 +1624,13 @@ "operationId": "v1-deactivate-vanity-subdomain-config", "summary": "[Beta] Deletes a project's vanity subdomain configuration", "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": "" }, @@ -1190,7 +1646,13 @@ "operationId": "v1-check-vanity-subdomain-availability", "summary": "[Beta] Checks vanity subdomain availability", "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" } + } ], "requestBody": { "required": true, @@ -1219,7 +1681,13 @@ "operationId": "v1-activate-vanity-subdomain-config", "summary": "[Beta] Activates a vanity subdomain for a project.", "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" } + } ], "requestBody": { "required": true, @@ -1248,7 +1716,13 @@ "operationId": "v1-upgrade-postgres-version", "summary": "[Beta] Upgrades the project's Postgres version", "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" } + } ], "requestBody": { "required": true, @@ -1277,11 +1751,17 @@ "operationId": "v1-get-postgres-upgrade-eligibility", "summary": "[Beta] Returns the project's eligibility for upgrades", "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": { "$ref": "#/components/schemas/ProjectUpgradeEligibilityResponse" } @@ -1300,13 +1780,19 @@ "operationId": "v1-get-postgres-upgrade-status", "summary": "[Beta] Gets the latest status of the project's upgrade", "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + }, { "name": "tracking_id", "required": false, "in": "query", "schema": { "type": "string" } - }, - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + } ], "responses": { "200": { @@ -1334,7 +1820,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": { @@ -1363,7 +1849,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": { @@ -1380,7 +1866,13 @@ "operationId": "v1-setup-a-read-replica", "summary": "[Beta] Set up a read replica", "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" } + } ], "requestBody": { "required": true, @@ -1404,7 +1896,13 @@ "operationId": "v1-remove-a-read-replica", "summary": "[Beta] Remove a read replica", "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" } + } ], "requestBody": { "required": true, @@ -1433,13 +1931,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", @@ -1452,6 +1944,12 @@ "enum": ["auth", "db", "pooler", "realtime", "rest", "storage"] } } + }, + { + "name": "timeout_ms", + "required": false, + "in": "query", + "schema": { "minimum": 0, "maximum": 10000, "type": "integer" } } ], "responses": { @@ -1473,12 +1971,72 @@ "security": [{ "bearer": [] }] } }, + "/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, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/SigningKeyResponse" } + } + } + }, + "403": { "description": "" } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + }, + "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", + "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/SigningKeyResponse" } + } + } + }, + "403": { "description": "" } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + } + }, "/v1/projects/{ref}/config/auth/signing-keys": { "post": { - "operationId": "createSigningKeyForProject", - "summary": "[Alpha] Create a new signing key for the project in standby status", + "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", "schema": { "type": "string" } } + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } ], "requestBody": { "required": true, @@ -1490,10 +2048,10 @@ }, "responses": { "201": { - "description": "[Alpha] Create a new signing key for the project in standby status", + "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/CreateSigningKeyBody" } + "schema": { "$ref": "#/components/schemas/SigningKeyResponse" } } } }, @@ -1503,10 +2061,16 @@ "security": [{ "bearer": [] }] }, "get": { - "operationId": "listSigningKeysForProject", - "summary": "[Alpha] List all signing keys for the project", + "operationId": "v1-get-project-signing-keys", + "summary": "List all signing keys for the project", "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": { @@ -1525,11 +2089,22 @@ }, "/v1/projects/{ref}/config/auth/signing-keys/{id}": { "get": { - "operationId": "getSigningKeyForProject", - "summary": "[Alpha] Get information about a signing key", + "operationId": "v1-get-project-signing-key", + "summary": "Get information about a signing key", "parameters": [ - { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + { + "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": { @@ -1546,11 +2121,22 @@ "security": [{ "bearer": [] }] }, "delete": { - "operationId": "deleteSigningKey", - "summary": "[Alpha] Remove a signing key from a project, where the status is previously_used", + "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": { "type": "string" } }, - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + { + "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": { @@ -1567,11 +2153,22 @@ "security": [{ "bearer": [] }] }, "patch": { - "operationId": "patchSigningKey", - "summary": "[Alpha] Update a signing key, mainly its status", + "operationId": "v1-update-project-signing-key", + "summary": "Update a signing key, mainly its status", "parameters": [ - { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + { + "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, @@ -1606,7 +2203,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": { @@ -1633,7 +2230,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": { @@ -1663,7 +2260,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": { @@ -1690,7 +2287,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": { @@ -1727,7 +2324,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": { @@ -1747,7 +2344,7 @@ }, "/v1/projects/{ref}/config/database/pooler": { "get": { - "operationId": "getSupavisorConfig", + "operationId": "v1-get-pooler-config", "summary": "Gets project's supavisor config", "parameters": [ { @@ -1755,7 +2352,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": { @@ -1776,7 +2373,7 @@ "security": [{ "bearer": [] }] }, "patch": { - "operationId": "updateSupavisorConfig", + "operationId": "v1-update-pooler-config", "summary": "Updates project's supavisor config", "parameters": [ { @@ -1784,7 +2381,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": { @@ -1821,7 +2418,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": { @@ -1848,7 +2445,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": { @@ -1877,7 +2474,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": [ { @@ -1885,7 +2482,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": { @@ -1909,7 +2506,7 @@ "security": [{ "bearer": [] }] }, "get": { - "operationId": "listTPAForProject", + "operationId": "v1-list-project-tpa-integrations", "summary": "Lists all third-party auth integrations", "parameters": [ { @@ -1917,7 +2514,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": { @@ -1940,7 +2537,7 @@ }, "/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}": { "delete": { - "operationId": "deleteTPAForProject", + "operationId": "v1-delete-project-tpa-integration", "summary": "Removes a third-party auth integration", "parameters": [ { @@ -1948,9 +2545,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" } }, - { "name": "tpa_id", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "tpa_id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + } ], "responses": { "200": { @@ -1965,7 +2567,7 @@ "security": [{ "bearer": [] }] }, "get": { - "operationId": "getTPAForProject", + "operationId": "v1-get-project-tpa-integration", "summary": "Get a third-party integration", "parameters": [ { @@ -1973,9 +2575,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" } }, - { "name": "tpa_id", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "tpa_id", + "required": true, + "in": "path", + "schema": { "format": "uuid", "type": "string" } + } ], "responses": { "200": { @@ -2000,7 +2607,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": "" } }, @@ -2013,7 +2620,13 @@ "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" } } + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } ], "responses": { "200": { @@ -2035,16 +2648,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": [] }] @@ -2055,7 +2666,13 @@ "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"], @@ -2067,33 +2684,46 @@ "operationId": "v1-list-project-addons", "summary": "Lists project addons", "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/ListProjectAddonsResponseDto" } + "schema": { "$ref": "#/components/schemas/ListProjectAddonsResponse" } } } }, "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", "schema": { "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/ApplyProjectAddonBodyDto" } + "schema": { "$ref": "#/components/schemas/ApplyProjectAddonBody" } } } }, @@ -2102,6 +2732,7 @@ "403": { "description": "" }, "500": { "description": "Failed to apply project addon" } }, + "tags": ["Billing"], "security": [{ "bearer": [] }] } }, @@ -2111,557 +2742,491 @@ "summary": "Removes project addon", "parameters": [ { - "name": "addon_variant", + "name": "ref", "required": true, "in": "path", - "schema": { - "enum": [ - "ci_micro", - "ci_small", - "ci_medium", - "ci_large", - "ci_xlarge", - "ci_2xlarge", - "ci_4xlarge", - "ci_8xlarge", - "ci_12xlarge", - "ci_16xlarge", - "cd_default", - "pitr_7", - "pitr_14", - "pitr_28", - "ipv4_default" - ], - "type": "string" - } + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, - { "name": "ref", "required": true, "in": "path", "schema": { "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}/analytics/endpoints/logs.all": { + "/v1/projects/{ref}/claim-token": { "get": { - "operationId": "getLogs", - "summary": "Gets project's logs", + "operationId": "v1-get-project-claim-token", + "x-internal": true, + "summary": "Gets project claim token", "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/ProjectClaimTokenResponse" } } } }, "403": { "description": "" } }, - "tags": ["Analytics"], + "tags": ["Projects"], "security": [{ "bearer": [] }] - } - }, - "/v1/projects/{ref}/database/migrations": { - "get": { - "operationId": "v1-list-migrations", - "summary": "[Beta] List applied migration versions", - "description": "Only available to selected partner OAuth apps", + }, + "post": { + "operationId": "v1-create-project-claim-token", + "x-internal": true, + "summary": "Creates 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/V1ListMigrationsResponse" } + "schema": { "$ref": "#/components/schemas/CreateProjectClaimTokenResponse" } } } }, - "403": { "description": "" }, - "500": { "description": "Failed to list database migrations" } + "403": { "description": "" } }, - "tags": ["Database"], + "tags": ["Projects"], "security": [{ "bearer": [] }] }, - "post": { - "operationId": "v1-apply-a-migration", - "summary": "[Beta] Apply a database migration", - "description": "Only available to selected partner OAuth apps", - "parameters": [ - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } - ], - "responses": { - "200": { - "description": "", - "content": { "application/json": { "schema": { "type": "object" } } } - }, - "403": { "description": "" }, - "500": { "description": "Failed to apply database migration" } - }, - "tags": ["Database"], - "security": [{ "bearer": [] }] - } - }, - "/v1/projects/{ref}/database/query": { - "post": { - "operationId": "v1-run-a-query", - "summary": "[Beta] Run sql query", - "parameters": [ - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/V1RunQueryBody" } } - } - }, - "responses": { - "201": { - "description": "", - "content": { "application/json": { "schema": { "type": "object" } } } - }, - "403": { "description": "" }, - "500": { "description": "Failed to run sql query" } - }, - "tags": ["Database"], - "security": [{ "bearer": [] }] - } - }, - "/v1/projects/{ref}/database/webhooks/enable": { - "post": { - "operationId": "v1-enable-database-webhook", - "summary": "[Beta] Enables Database Webhooks on the project", + "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" } + "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"], + "responses": { "204": { "description": "" }, "403": { "description": "" } }, + "tags": ["Projects"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/database/context": { + "/v1/projects/{ref}/advisors/performance": { "get": { - "operationId": "getDatabaseMetadata", - "summary": "Gets database metadata for the given project.", + "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", "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/V1ProjectAdvisorsResponse" } } } }, "403": { "description": "" } }, - "tags": ["Database"], + "tags": ["Advisors"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/functions": { + "/v1/projects/{ref}/advisors/security": { "get": { - "operationId": "v1-list-all-functions", - "summary": "List all functions", - "description": "Returns all functions you've previously added to the specified project.", + "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", "schema": { "type": "string" } } + { + "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": "array", - "items": { "$ref": "#/components/schemas/FunctionResponse" } - } + "schema": { "$ref": "#/components/schemas/V1ProjectAdvisorsResponse" } } } }, - "403": { "description": "" }, - "500": { "description": "Failed to retrieve project's functions" } + "403": { "description": "" } }, - "tags": ["Edge Functions"], + "tags": ["Advisors"], "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, + } + }, + "/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": "import_map_path", - "required": false, - "in": "query", - "schema": { "type": "string" } - }, - { - "name": "entrypoint_path", - "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" } }, + { "name": "sql", "required": false, "in": "query", "schema": { "type": "string" } }, { - "name": "import_map", + "name": "iso_timestamp_start", "required": false, "in": "query", - "schema": { "type": "boolean" } + "schema": { "format": "date-time", "type": "string" } }, { - "name": "verify_jwt", + "name": "iso_timestamp_end", "required": false, "in": "query", - "schema": { "type": "boolean" } - }, - { "name": "name", "required": false, "in": "query", "schema": { "type": "string" } }, - { "name": "slug", "required": false, "in": "query", "schema": { "type": "string" } }, - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/V1CreateFunctionBody" } - }, - "application/vnd.denoland.eszip": { - "schema": { "$ref": "#/components/schemas/V1CreateFunctionBody" } - } + "schema": { "format": "date-time", "type": "string" } } - }, + ], "responses": { - "201": { + "200": { "description": "", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/FunctionResponse" } } + "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsResponse" } } } }, - "403": { "description": "" }, - "500": { "description": "Failed to create project's function" } + "403": { "description": "" } }, - "tags": ["Edge Functions"], + "tags": ["Analytics"], "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}/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", "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/BulkUpdateFunctionBody" } - } + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "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" } } - }, + ], "responses": { "200": { "description": "", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BulkUpdateFunctionResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsResponse" } } } }, "403": { "description": "" }, - "500": { "description": "Failed to update functions" } + "500": { "description": "Failed to get project's usage api counts" } }, - "tags": ["Edge Functions"], + "tags": ["Analytics"], "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}/analytics/endpoints/usage.api-requests-count": { + "get": { + "operationId": "v1-get-project-usage-request-count", + "summary": "Gets project's usage api requests count", "parameters": [ { - "name": "bundleOnly", - "required": false, - "in": "query", - "schema": { "type": "boolean" } - }, - { "name": "slug", "required": false, "in": "query", "schema": { "type": "string" } }, - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { "$ref": "#/components/schemas/FunctionDeployBody" } - } + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } - }, + ], "responses": { - "201": { + "200": { "description": "", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/DeployFunctionResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsResponse" } } } }, - "403": { "description": "" }, - "500": { "description": "Failed to deploy function" } + "500": { "description": "Failed to get project's usage api requests count" } }, - "tags": ["Edge Functions"], + "tags": ["Analytics"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/functions/{function_slug}": { + "/v1/projects/{ref}/database/migrations": { "get": { - "operationId": "v1-get-a-function", - "summary": "Retrieve a function", - "description": "Retrieves a function with 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": "function_slug", + "name": "ref", "required": true, "in": "path", - "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } - }, - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } ], "responses": { "200": { "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/FunctionSlugResponse" } + "schema": { "$ref": "#/components/schemas/V1ListMigrationsResponse" } } } }, "403": { "description": "" }, - "500": { "description": "Failed to retrieve function with given slug" } + "500": { "description": "Failed to list database migrations" } }, - "tags": ["Edge Functions"], + "tags": ["Database"], "security": [{ "bearer": [] }] }, - "patch": { - "operationId": "v1-update-a-function", - "summary": "Update a function", - "description": "Updates a function with the specified slug and project.", + "post": { + "operationId": "v1-apply-a-migration", + "summary": "[Beta] Apply a database migration", + "description": "Only available to selected partner OAuth apps", "parameters": [ { - "name": "import_map_path", - "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" } }, { - "name": "entrypoint_path", + "name": "Idempotency-Key", "required": false, - "in": "query", + "in": "header", + "description": "A unique key to ensure the same migration is tracked only once.", "schema": { "type": "string" } - }, - { - "name": "import_map", - "required": false, - "in": "query", - "schema": { "type": "boolean" } - }, - { - "name": "verify_jwt", - "required": false, - "in": "query", - "schema": { "type": "boolean" } - }, - { "name": "name", "required": false, "in": "query", "schema": { "type": "string" } }, - { - "name": "function_slug", - "required": true, - "in": "path", - "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } - }, - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/V1UpdateFunctionBody" } - }, - "application/vnd.denoland.eszip": { - "schema": { "$ref": "#/components/schemas/V1UpdateFunctionBody" } + "schema": { "$ref": "#/components/schemas/V1CreateMigrationBody" } } } }, "responses": { - "200": { - "description": "", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/FunctionResponse" } } - } - }, + "200": { "description": "" }, "403": { "description": "" }, - "500": { "description": "Failed to update function with given slug" } + "500": { "description": "Failed to apply database migration" } }, - "tags": ["Edge Functions"], + "tags": ["Database"], "security": [{ "bearer": [] }] }, - "delete": { - "operationId": "v1-delete-a-function", - "summary": "Delete a function", - "description": "Deletes a function with the specified slug from the specified 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": "function_slug", + "name": "ref", "required": true, "in": "path", - "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, - { "name": "ref", "required": true, "in": "path", "schema": { "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/V1UpsertMigrationBody" } + } + } + }, "responses": { "200": { "description": "" }, "403": { "description": "" }, - "500": { "description": "Failed to delete function with given slug" } + "500": { "description": "Failed to upsert database migration" } }, - "tags": ["Edge Functions"], + "tags": ["Database"], "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.", + "/v1/projects/{ref}/database/query": { + "post": { + "operationId": "v1-run-a-query", + "summary": "[Beta] Run sql query", "parameters": [ { - "name": "function_slug", + "name": "ref", "required": true, "in": "path", - "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } - }, - { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } + } ], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/V1RunQueryBody" } } + } + }, "responses": { - "200": { "description": "" }, + "201": { "description": "" }, "403": { "description": "" }, - "500": { "description": "Failed to retrieve function body with given slug" } + "500": { "description": "Failed to run sql query" } }, - "tags": ["Edge Functions"], + "tags": ["Database"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/storage/buckets": { - "get": { - "operationId": "v1-list-all-buckets", - "summary": "Lists all buckets", + "/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, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/V1StorageBucketResponse" } - } - } - } - }, + "201": { "description": "" }, "403": { "description": "" }, - "500": { "description": "Failed to get list of buckets" } + "500": { "description": "Failed to enable Database Webhooks on the project" } }, - "tags": ["Storage"], + "tags": ["Database"], "security": [{ "bearer": [] }] } }, - "/v1/projects/{ref}/config/auth/sso/providers": { - "post": { - "operationId": "v1-create-a-sso-provider", - "summary": "Creates a new SSO provider", + "/v1/projects/{ref}/database/context": { + "get": { + "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" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/CreateProviderBody" } } - } - }, "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/CreateProviderResponse" } + "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}/functions": { "get": { - "operationId": "v1-list-all-sso-provider", - "summary": "Lists all SSO providers", + "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, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { @@ -2669,65 +3234,115 @@ "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/ListProvidersResponse" } + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/FunctionResponse" } + } } } }, "403": { "description": "" }, - "404": { "description": "SAML 2.0 support is not enabled for this project" } + "500": { "description": "Failed to retrieve project's functions" } }, - "tags": ["Auth"], + "tags": ["Edge Functions"], "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", + }, + "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, "type": "string" } + "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": "provider_id", "required": true, "in": "path", "schema": { "type": "string" } } + { + "name": "ezbr_sha256", + "required": false, + "in": "query", + "schema": { "type": "string" } + } ], "responses": { - "200": { + "201": { "description": "", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/GetProviderResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/FunctionResponse" } } } }, "403": { "description": "" }, - "404": { - "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" - } + "500": { "description": "Failed to create project's function" } }, - "tags": ["Auth"], + "tags": ["Edge Functions"], "security": [{ "bearer": [] }] }, "put": { - "operationId": "v1-update-a-sso-provider", - "summary": "Updates a SSO provider by its UUID", + "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, "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/BulkUpdateFunctionBody" } + } } }, "responses": { @@ -2735,44 +3350,453 @@ "description": "", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/UpdateProviderResponse" } + "schema": { "$ref": "#/components/schemas/BulkUpdateFunctionResponse" } } } }, "403": { "description": "" }, - "404": { - "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" - } + "500": { "description": "Failed to update functions" } }, - "tags": ["Auth"], + "tags": ["Edge Functions"], "security": [{ "bearer": [] }] - }, - "delete": { - "operationId": "v1-delete-a-sso-provider", - "summary": "Removes a SSO provider by its UUID", + } + }, + "/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, "type": "string" } + "schema": { "minLength": 20, "maxLength": 20, "pattern": "^[a-z]+$", "type": "string" } }, - { "name": "provider_id", "required": true, "in": "path", "schema": { "type": "string" } } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/DeleteProviderResponse" } - } - } + { + "name": "slug", + "required": false, + "in": "query", + "schema": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } }, - "403": { "description": "" }, - "404": { - "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" - } + { + "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": [] }] @@ -2788,7 +3812,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": { @@ -2810,7 +3834,13 @@ "operationId": "v1-restore-pitr-backup", "summary": "Restores a PITR backup for a database", "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" } + } ], "requestBody": { "required": true, @@ -2823,12 +3853,113 @@ "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" } + } + } + } + }, + "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, "pattern": "^[a-z]+$", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/V1UndoBody" } } + } + }, + "responses": { "201": { "description": "" }, "403": { "description": "" } }, + "tags": ["Database"], + "security": [{ "bearer": [] }] + } + }, "/v1/organizations/{slug}/members": { "get": { "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": { @@ -2853,7 +3984,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,6 +4006,54 @@ "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": [] }] + } } }, "info": { @@ -2878,7 +4063,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" }, @@ -2922,7 +4110,7 @@ ] }, "db_host": { "type": "string" }, - "db_port": { "type": "number" }, + "db_port": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, "db_user": { "type": "string" }, "db_pass": { "type": "string" }, "jwt_secret": { "type": "string" } @@ -2958,13 +4146,14 @@ "FUNCTIONS_DEPLOYED", "FUNCTIONS_FAILED" ] - } + }, + "request_review": { "type": "boolean" } } }, "BranchResponse": { "type": "object", "properties": { - "id": { "type": "string" }, + "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "project_ref": { "type": "string" }, "parent_project_ref": { "type": "string" }, @@ -2988,8 +4177,9 @@ "FUNCTIONS_FAILED" ] }, - "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": [ "id", @@ -3008,6 +4198,10 @@ "properties": { "message": { "type": "string", "enum": ["ok"] } }, "required": ["message"] }, + "BranchActionBody": { + "type": "object", + "properties": { "migration_version": { "type": "string" } } + }, "BranchUpdateResponse": { "type": "object", "properties": { @@ -3016,16 +4210,6 @@ }, "required": ["workflow_run_id", "message"] }, - "V1DatabaseResponse": { - "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"] - }, "V1ProjectWithDatabaseResponse": { "type": "object", "properties": { @@ -3062,15 +4246,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", @@ -3110,6 +4303,8 @@ "desired_instance_size": { "type": "string", "enum": [ + "pico", + "nano", "micro", "small", "medium", @@ -3119,7 +4314,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": { @@ -3177,7 +4380,7 @@ "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": ["id", "name"] }, - "CreateOrganizationV1Dto": { + "CreateOrganizationV1": { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], @@ -3207,7 +4410,7 @@ "required": ["access_token", "refresh_token", "expires_in", "token_type"], "additionalProperties": false }, - "OAuthRevokeTokenBodyDto": { + "OAuthRevokeTokenBody": { "type": "object", "properties": { "client_id": { "type": "string", "format": "uuid" }, @@ -3217,66 +4420,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": { @@ -3284,13 +4476,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", @@ -3309,15 +4521,15 @@ "ApiKeyResponse": { "type": "object", "properties": { - "name": { "type": "string" }, - "api_key": { "type": "string" }, + "api_key": { "type": "string", "nullable": true }, "id": { "type": "string", "nullable": true }, "type": { "type": "string", - "enum": ["publishable", "secret", "legacy"], + "enum": ["legacy", "publishable", "secret"], "nullable": true }, "prefix": { "type": "string", "nullable": true }, + "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "hash": { "type": "string", "nullable": true }, "secret_jwt_template": { @@ -3329,12 +4541,23 @@ "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": { "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": { "type": "object", @@ -3343,11 +4566,17 @@ "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": { "type": "object", @@ -3362,6 +4591,7 @@ "properties": { "branch_name": { "type": "string", "minLength": 1 }, "git_branch": { "type": "string" }, + "is_default": { "type": "boolean" }, "persistent": { "type": "boolean" }, "region": { "type": "string" }, "desired_instance_size": { @@ -3378,7 +4608,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" ] }, "release_channel": { @@ -3388,92 +4626,96 @@ }, "postgres_engine": { "type": "string", - "enum": ["15", "17-oriole"], + "enum": ["15", "17", "17-oriole"], "description": "Postgres engine version. If not provided, the latest version will be used." }, - "secrets": { "type": "object", "additionalProperties": { "type": "string" } } + "secrets": { "type": "object", "additionalProperties": { "type": "string" } }, + "with_data": { "type": "boolean" } }, "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" } - }, - "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" } - }, - "required": ["success", "errors", "messages", "result"] - }, "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"] }, @@ -3489,9 +4731,30 @@ }, "required": ["banned_ipv4_addresses"] }, + "NetworkBanResponseEnriched": { + "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"] + }, "RemoveNetworkBanRequest": { "type": "object", - "properties": { "ipv4_addresses": { "type": "array", "items": { "type": "string" } } }, + "properties": { + "ipv4_addresses": { "type": "array", "items": { "type": "string" } }, + "identifier": { "type": "string" } + }, "required": ["ipv4_addresses"] }, "NetworkRestrictionsResponse": { @@ -3576,7 +4839,7 @@ "V1ProjectRefResponse": { "type": "object", "properties": { - "id": { "type": "integer", "format": "int64" }, + "id": { "type": "integer" }, "ref": { "type": "string" }, "name": { "type": "string" } }, @@ -3592,18 +4855,21 @@ "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" + "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 } }, - "value": { "type": "string", "maxLength": 24576 } - }, - "required": ["name", "value"] + "required": ["name", "value"] + } }, "SslEnforcementResponse": { "type": "object", @@ -3687,7 +4953,7 @@ "items": { "type": "object", "properties": { - "postgres_version": { "type": "string", "enum": ["15", "17-oriole"] }, + "postgres_version": { "type": "string", "enum": ["15", "17", "17-oriole"] }, "release_channel": { "type": "string", "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] @@ -3697,10 +4963,14 @@ "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": [ "eligible", @@ -3708,10 +4978,11 @@ "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" ] }, "DatabaseUpgradeStatusResponse": { @@ -3806,40 +5077,115 @@ "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", "pooler", "realtime", "rest", "storage"] + }, + "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"] }, + "SigningKeyResponse": { + "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 + }, "CreateSigningKeyBody": { "type": "object", "properties": { "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, - "status": { "type": "string", "enum": ["in_use", "standby"] } + "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 @@ -3854,36 +5200,20 @@ "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 - }, - "SigningKeyResponse": { - "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" } + "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": ["id", "algorithm", "status", "created_at", "updated_at"], + "required": ["keys"], "additionalProperties": false }, "UpdateSigningKeyBody": { @@ -3897,31 +5227,31 @@ "required": ["status"], "additionalProperties": false }, - "StorageFeatureImageTransformation": { - "type": "object", - "properties": { "enabled": { "type": "boolean" } }, - "required": ["enabled"] - }, - "StorageFeatureS3Protocol": { - "type": "object", - "properties": { "enabled": { "type": "boolean" } }, - "required": ["enabled"] - }, - "StorageFeatures": { - "type": "object", - "properties": { - "imageTransformation": { - "$ref": "#/components/schemas/StorageFeatureImageTransformation" - }, - "s3Protocol": { "$ref": "#/components/schemas/StorageFeatureS3Protocol" } - }, - "required": ["imageTransformation", "s3Protocol"] - }, "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"] + } }, "required": ["fileSizeLimit", "features"] }, @@ -3931,10 +5261,30 @@ "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"] + } } }, "PostgresConfigResponse": { @@ -3956,13 +5306,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": { @@ -3984,59 +5334,59 @@ "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" }, - "connectionString": { - "type": "string", - "deprecated": true, - "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" }, "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" } + "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", - "connectionString", - "default_pool_size", - "max_client_conn", - "pool_mode", "identifier", + "database_type", "is_using_scram_auth", "db_user", "db_host", + "db_port", "db_name", - "connection_string" + "connection_string", + "connectionString", + "default_pool_size", + "max_client_conn", + "pool_mode" ] }, "UpdateSupavisorConfigBody": { @@ -4044,15 +5394,14 @@ "properties": { "default_pool_size": { "type": "integer", - "nullable": true, "minimum": 0, - "maximum": 1000 + "maximum": 3000, + "nullable": true }, "pool_mode": { - "enum": ["transaction", "session"], "type": "string", - "description": "Dedicated pooler mode for the project", - "deprecated": true + "enum": ["transaction", "session"], + "description": "Dedicated pooler mode for the project" } } }, @@ -4069,26 +5418,6 @@ "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 }, "disable_signup": { "type": "boolean", "nullable": true }, "external_anonymous_users_enabled": { "type": "boolean", "nullable": true }, "external_apple_additional_client_ids": { "type": "string", "nullable": true }, @@ -4157,6 +5486,7 @@ "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_zoom_client_id": { "type": "string", "nullable": true }, "external_zoom_enabled": { "type": "boolean", "nullable": true }, "external_zoom_secret": { "type": "string", "nullable": true }, @@ -4175,8 +5505,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 }, @@ -4190,37 +5526,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 }, @@ -4233,8 +5603,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 }, @@ -4244,26 +5615,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", @@ -4332,6 +5683,7 @@ "external_workos_enabled", "external_workos_secret", "external_workos_url", + "external_web3_solana_enabled", "external_zoom_client_id", "external_zoom_enabled", "external_zoom_secret", @@ -4350,8 +5702,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", @@ -4365,15 +5723,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", @@ -4382,13 +5751,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", @@ -4407,6 +5782,7 @@ "sms_vonage_from", "smtp_admin_email", "smtp_host", + "smtp_max_frequency", "smtp_pass", "smtp_port", "smtp_sender_name", @@ -4417,190 +5793,283 @@ "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 + "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 }, - "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": { + "sms_provider": { "type": "string", - "pattern": "/^\\s*([a-z0-9_-]+(\\s*,+\\s*)?)*\\s*$/i" + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "nullable": true }, - "mailer_secure_email_change_enabled": { "type": "boolean" }, - "refresh_token_rotation_enabled": { "type": "boolean" }, - "password_hibp_enabled": { "type": "boolean" }, - "password_required_characters": { + "sms_messagebird_access_key": { "type": "string", "nullable": true }, + "sms_messagebird_originator": { "type": "string", "nullable": true }, + "sms_test_otp": { "type": "string", - "enum": [ - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", - "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", - "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "" - ] + "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_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 + }, + "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": { @@ -4608,52 +6077,49 @@ "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": { - "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"] - }, "GetProjectAvailableRestoreVersionsResponse": { "type": "object", "properties": { "available_versions": { "type": "array", - "items": { "$ref": "#/components/schemas/ProjectAvailableRestoreVersion" } + "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"] }, - "RestoreProjectBodyDto": { - "type": "object", - "properties": {}, - "hideDefinitions": ["release_channel", "postgres_engine"] - }, - "ListProjectAddonsResponseDto": { + "ListProjectAddonsResponse": { "type": "object", "properties": { "selected_addons": { @@ -4690,7 +6156,15 @@ "ci_4xlarge", "ci_8xlarge", "ci_12xlarge", - "ci_16xlarge" + "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"] }, @@ -4712,17 +6186,7 @@ }, "required": ["description", "type", "interval", "amount"] }, - "meta": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { "type": "number" }, - { "type": "boolean" }, - { "type": "string" }, - { "type": "array", "items": { "type": "string" } } - ] - } - } + "meta": { "description": "Any JSON-serializable value" } }, "required": ["id", "name", "price"] } @@ -4767,7 +6231,15 @@ "ci_4xlarge", "ci_8xlarge", "ci_12xlarge", - "ci_16xlarge" + "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"] }, @@ -4789,17 +6261,7 @@ }, "required": ["description", "type", "interval", "amount"] }, - "meta": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { "type": "number" }, - { "type": "boolean" }, - { "type": "string" }, - { "type": "array", "items": { "type": "string" } } - ] - } - } + "meta": { "description": "Any JSON-serializable value" } }, "required": ["id", "name", "price"] } @@ -4811,7 +6273,7 @@ }, "required": ["selected_addons", "available_addons"] }, - "ApplyProjectAddonBodyDto": { + "ApplyProjectAddonBody": { "type": "object", "properties": { "addon_variant": { @@ -4828,7 +6290,15 @@ "ci_4xlarge", "ci_8xlarge", "ci_12xlarge", - "ci_16xlarge" + "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"] }, @@ -4851,34 +6321,142 @@ }, "required": ["addon_variant", "addon_type"] }, - "V1AnalyticsResponse": { + "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"] + }, + "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" } - } - }, - { "type": "string" } + }, + "required": ["code", "errors", "message", "status"] + } ] - }, - "result": { "type": "array", "items": { "type": "object" } } + } } }, "V1ListMigrationsResponse": { @@ -4892,12 +6470,31 @@ "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", "minLength": 1 } }, + "properties": { + "query": { "type": "string", "minLength": 1 }, + "read_only": { "type": "boolean" } + }, "required": ["query"] }, - "GetProjectDbMetadataResponseDto": { + "GetProjectDbMetadataResponse": { "type": "object", "properties": { "databases": { @@ -4931,12 +6528,13 @@ "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { "type": "integer" }, - "created_at": { "type": "integer" }, - "updated_at": { "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": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] }, @@ -4951,20 +6549,24 @@ "required": ["slug", "name", "body"] }, "BulkUpdateFunctionBody": { - "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" }, - "verify_jwt": { "type": "boolean" }, - "import_map": { "type": "boolean" }, - "entrypoint_path": { "type": "string" }, - "import_map_path": { "type": "string" } - }, - "required": ["id", "slug", "name", "status", "version"] + "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", @@ -4979,12 +6581,13 @@ "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { "type": "integer" }, - "created_at": { "type": "integer" }, - "updated_at": { "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": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] } @@ -5018,12 +6621,13 @@ "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { "type": "integer" }, - "created_at": { "type": "integer" }, - "updated_at": { "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": ["id", "slug", "name", "status", "version"] }, @@ -5035,15 +6639,17 @@ "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { "type": "integer" }, - "created_at": { "type": "integer" }, - "updated_at": { "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": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] }, + "StreamableFile": { "type": "object", "properties": {} }, "V1UpdateFunctionBody": { "type": "object", "properties": { @@ -5062,33 +6668,7 @@ "updated_at": { "type": "string" }, "public": { "type": "boolean" } }, - "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"] + "required": ["id", "name", "owner", "created_at", "updated_at", "public"] }, "CreateProviderBody": { "type": "object", @@ -5101,48 +6681,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" } }, @@ -5151,7 +6769,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"] }, @@ -5159,8 +6836,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" } }, @@ -5172,15 +6895,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" } }, @@ -5190,40 +6983,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"] }, @@ -5234,6 +7074,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": { @@ -5245,27 +7103,106 @@ }, "required": ["user_id", "user_name", "role_name", "mfa_enabled"] }, - "BillingPlanId": { "type": "string", "enum": ["free", "pro", "team", "enterprise"] }, - "ReleaseChannel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, "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 c2549bc3b09fb..733b6ffb8149b 100644 --- a/apps/docs/spec/common-api-sections.json +++ b/apps/docs/spec/common-api-sections.json @@ -6,6 +6,48 @@ "type": "markdown", "items": [] }, + { + "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", @@ -16,12 +58,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", @@ -34,12 +100,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", @@ -51,6 +153,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" } ] }, @@ -64,6 +196,12 @@ "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-disable-readonly-mode-temporarily", "title": "Disable readonly mode temporarily", @@ -88,6 +226,18 @@ "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-pooler-config", + "title": "Get pooler config", + "slug": "v1-get-pooler-config", + "type": "operation" + }, { "id": "v1-get-postgres-config", "title": "Get postgres config", @@ -106,6 +256,12 @@ "slug": "v1-get-readonly-mode-status", "type": "operation" }, + { + "id": "v1-get-restore-point", + "title": "Get restore point", + "slug": "v1-get-restore-point", + "type": "operation" + }, { "id": "v1-get-ssl-enforcement-config", "title": "Get ssl enforcement config", @@ -125,9 +281,9 @@ "type": "operation" }, { - "id": "v1-list-migrations", - "title": "List migrations", - "slug": "v1-list-migrations", + "id": "v1-list-migration-history", + "title": "List migration history", + "slug": "v1-list-migration-history", "type": "operation" }, { @@ -154,6 +310,18 @@ "slug": "v1-setup-a-read-replica", "type": "operation" }, + { + "id": "v1-undo", + "title": "Undo", + "slug": "v1-undo", + "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", @@ -165,6 +333,12 @@ "title": "Update ssl enforcement config", "slug": "v1-update-ssl-enforcement-config", "type": "operation" + }, + { + "id": "v1-upsert-a-migration", + "title": "Upsert a migration", + "slug": "v1-upsert-a-migration", + "type": "operation" } ] }, @@ -292,12 +466,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", @@ -352,6 +538,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", @@ -364,6 +556,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", @@ -376,6 +574,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", @@ -406,6 +610,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", @@ -418,6 +628,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", @@ -442,6 +658,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", @@ -454,6 +676,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", @@ -526,18 +754,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", @@ -549,6 +801,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/transforms/api_v1_openapi_deparsed.json b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json index 9815cec79d55d..3231de6000462 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" @@ -64,7 +76,9 @@ "name": "branch_id", "required": true, "in": "path", + "description": "Branch ID", "schema": { + "format": "uuid", "type": "string" } } @@ -113,7 +127,9 @@ "type": "string" }, "db_port": { - "type": "number" + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true }, "db_user": { "type": "string" @@ -158,7 +174,9 @@ "name": "branch_id", "required": true, "in": "path", + "description": "Branch ID", "schema": { + "format": "uuid", "type": "string" } } @@ -194,6 +212,9 @@ "FUNCTIONS_DEPLOYED", "FUNCTIONS_FAILED" ] + }, + "request_review": { + "type": "boolean" } } } @@ -209,7 +230,8 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "name": { "type": "string" @@ -250,10 +272,16 @@ ] }, "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": [ @@ -291,7 +319,9 @@ "name": "branch_id", "required": true, "in": "path", + "description": "Branch ID", "schema": { + "format": "uuid", "type": "string" } } @@ -336,11 +366,28 @@ "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": "", @@ -384,11 +431,28 @@ "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": "", @@ -432,11 +496,28 @@ "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": "", @@ -470,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", @@ -590,6 +719,7 @@ }, "name": { "type": "string", + "maxLength": 256, "description": "Name of your project" }, "organization_id": { @@ -634,6 +764,8 @@ "desired_instance_size": { "type": "string", "enum": [ + "pico", + "nano", "micro", "small", "medium", @@ -643,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": { @@ -824,16 +964,33 @@ "summary": "[Beta] Authorize user through oauth", "parameters": [ { - "name": "code_challenge_method", - "required": false, + "name": "client_id", + "required": true, "in": "query", "schema": { - "enum": ["plain", "sha256", "S256"], + "format": "uuid", "type": "string" } }, { - "name": "code_challenge", + "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": "scope", "required": false, "in": "query", "schema": { @@ -849,32 +1006,43 @@ } }, { - "name": "response_type", - "required": true, + "name": "response_mode", + "required": false, "in": "query", "schema": { "type": "string" } }, { - "name": "redirect_uri", - "required": true, + "name": "code_challenge", + "required": false, "in": "query", "schema": { "type": "string" } }, { - "name": "client_id", - "required": true, + "name": "code_challenge_method", + "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" } } ], "responses": { - "303": { + "204": { "description": "" } }, @@ -1006,11 +1174,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, @@ -1046,14 +1318,6 @@ "enum": ["asc", "desc"], "type": "string" } - }, - { - "name": "project_ref", - "required": false, - "in": "query", - "schema": { - "type": "string" - } } ], "responses": { @@ -1097,8 +1361,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "name": { "type": "string" @@ -1110,8 +1373,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -1123,8 +1385,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -1205,8 +1466,8 @@ "enum": ["sql"] }, "visibility": { - "enum": ["user", "project", "org", "public"], - "type": "string" + "type": "string", + "enum": ["user", "project", "org", "public"] }, "name": { "type": "string" @@ -1219,8 +1480,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "name": { "type": "string" @@ -1232,8 +1492,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -1245,8 +1504,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -1304,21 +1562,26 @@ "operationId": "v1-get-project-api-keys", "summary": "Get project api keys", "parameters": [ - { - "name": "reveal", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, { "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "reveal", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -1331,11 +1594,9 @@ "items": { "type": "object", "properties": { - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", @@ -1343,13 +1604,16 @@ }, "type": { "type": "string", - "enum": ["publishable", "secret", "legacy"], + "enum": ["legacy", "publishable", "secret"], "nullable": true }, "prefix": { "type": "string", "nullable": true }, + "name": { + "type": "string" + }, "description": { "type": "string", "nullable": true @@ -1380,7 +1644,7 @@ "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] } } } @@ -1398,24 +1662,29 @@ ] }, "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": "reveal", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, { "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } + }, + { + "name": "reveal", + "required": false, + "in": "query", + "description": "Boolean string, true or false", + "schema": { + "type": "boolean" + } } ], "requestBody": { @@ -1429,6 +1698,12 @@ "type": "string", "enum": ["publishable", "secret"] }, + "name": { + "type": "string", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z_][a-z0-9_]+$" + }, "description": { "type": "string", "nullable": true @@ -1445,7 +1720,7 @@ "nullable": true } }, - "required": ["type"] + "required": ["type", "name"] } } } @@ -1458,11 +1733,9 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", @@ -1470,13 +1743,16 @@ }, "type": { "type": "string", - "enum": ["publishable", "secret", "legacy"], + "enum": ["legacy", "publishable", "secret"], "nullable": true }, "prefix": { "type": "string", "nullable": true }, + "name": { + "type": "string" + }, "description": { "type": "string", "nullable": true @@ -1507,7 +1783,7 @@ "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] } } } @@ -1524,34 +1800,141 @@ ] } }, - "/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": "reveal", - "required": false, + "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": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Secrets"], + "security": [ + { + "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": "enabled", + "required": true, "in": "query", + "description": "Boolean string, true or false", "schema": { "type": "boolean" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + } + } + } }, + "403": { + "description": "" + } + }, + "tags": ["Secrets"], + "security": [ { - "name": "id", + "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": "ref", + "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": { @@ -1561,6 +1944,12 @@ "schema": { "type": "object", "properties": { + "name": { + "type": "string", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z_][a-z0-9_]+$" + }, "description": { "type": "string", "nullable": true @@ -1589,11 +1978,9 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", @@ -1601,13 +1988,16 @@ }, "type": { "type": "string", - "enum": ["publishable", "secret", "legacy"], + "enum": ["legacy", "publishable", "secret"], "nullable": true }, "prefix": { "type": "string", "nullable": true }, + "name": { + "type": "string" + }, "description": { "type": "string", "nullable": true @@ -1638,7 +2028,7 @@ "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] } } } @@ -1655,15 +2045,19 @@ ] }, "get": { - "operationId": "getApiKey", - "summary": "[Alpha] Get API key", + "operationId": "v1-get-project-api-key", + "summary": "Get API key", "parameters": [ { - "name": "reveal", - "required": false, - "in": "query", + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", "schema": { - "type": "boolean" + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" } }, { @@ -1671,15 +2065,17 @@ "required": true, "in": "path", "schema": { + "format": "uuid", "type": "string" } }, { - "name": "ref", - "required": true, - "in": "path", + "name": "reveal", + "required": false, + "in": "query", + "description": "Boolean string, true or false", "schema": { - "type": "string" + "type": "boolean" } } ], @@ -1691,11 +2087,9 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", @@ -1703,13 +2097,16 @@ }, "type": { "type": "string", - "enum": ["publishable", "secret", "legacy"], + "enum": ["legacy", "publishable", "secret"], "nullable": true }, "prefix": { "type": "string", "nullable": true }, + "name": { + "type": "string" + }, "description": { "type": "string", "nullable": true @@ -1740,7 +2137,7 @@ "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] } } } @@ -1757,15 +2154,19 @@ ] }, "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": "reveal", - "required": false, - "in": "query", + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", "schema": { - "type": "boolean" + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" } }, { @@ -1773,13 +2174,32 @@ "required": true, "in": "path", "schema": { + "format": "uuid", "type": "string" } }, { - "name": "ref", - "required": true, - "in": "path", + "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" } @@ -1793,11 +2213,9 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", @@ -1805,15 +2223,18 @@ }, "type": { "type": "string", - "enum": ["publishable", "secret", "legacy"], + "enum": ["legacy", "publishable", "secret"], "nullable": true }, "prefix": { "type": "string", "nullable": true }, - "description": { - "type": "string", + "name": { + "type": "string" + }, + "description": { + "type": "string", "nullable": true }, "hash": { @@ -1842,7 +2263,7 @@ "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] } } } @@ -1869,7 +2290,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -1885,7 +2310,8 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "name": { "type": "string" @@ -1926,10 +2352,16 @@ ] }, "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": [ @@ -1971,7 +2403,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -1990,6 +2426,9 @@ "git_branch": { "type": "string" }, + "is_default": { + "type": "boolean" + }, "persistent": { "type": "boolean" }, @@ -2010,7 +2449,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" ] }, "release_channel": { @@ -2020,7 +2467,7 @@ }, "postgres_engine": { "type": "string", - "enum": ["15", "17-oriole"], + "enum": ["15", "17", "17-oriole"], "description": "Postgres engine version. If not provided, the latest version will be used." }, "secrets": { @@ -2028,6 +2475,9 @@ "additionalProperties": { "type": "string" } + }, + "with_data": { + "type": "boolean" } }, "required": ["branch_name"] @@ -2044,7 +2494,8 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "name": { "type": "string" @@ -2085,10 +2536,16 @@ ] }, "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": [ @@ -2129,7 +2586,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2153,6 +2614,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", @@ -2166,6 +2747,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2179,14 +2761,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" @@ -2200,13 +2782,13 @@ "errors": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "messages": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "result": { @@ -2326,6 +2908,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2362,6 +2945,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2391,14 +2975,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" @@ -2412,13 +2996,13 @@ "errors": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "messages": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "result": { @@ -2540,6 +3124,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2553,14 +3138,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" @@ -2574,13 +3159,13 @@ "errors": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "messages": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "result": { @@ -2702,6 +3287,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2715,14 +3301,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" @@ -2736,13 +3322,13 @@ "errors": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "messages": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "result": { @@ -2860,7 +3446,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2900,6 +3490,71 @@ ] } }, + "/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": { + "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", @@ -2909,7 +3564,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -2926,6 +3585,9 @@ "items": { "type": "string" } + }, + "identifier": { + "type": "string" } }, "required": ["ipv4_addresses"] @@ -2961,7 +3623,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3048,7 +3714,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3159,7 +3829,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3203,7 +3877,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3267,6 +3945,9 @@ "in": "path", "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3326,6 +4007,9 @@ "in": "path", "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3414,6 +4098,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3530,6 +4215,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3543,8 +4229,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "integer" }, "ref": { "type": "string" @@ -3580,7 +4265,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3634,8 +4323,12 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { - "type": "string" + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "type": "string" } } ], @@ -3693,7 +4386,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3713,14 +4410,7 @@ }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } + "description": "" }, "403": { "description": "" @@ -3746,7 +4436,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3799,7 +4493,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3886,7 +4584,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3932,7 +4634,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -3980,7 +4686,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4013,7 +4723,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4075,7 +4789,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4137,7 +4855,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4203,7 +4925,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4236,7 +4962,7 @@ "properties": { "postgres_version": { "type": "string", - "enum": ["15", "17-oriole"] + "enum": ["15", "17", "17-oriole"] }, "release_channel": { "type": "string", @@ -4249,22 +4975,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" } }, - "duration_estimate_hours": { - "type": "number" + "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" @@ -4277,10 +5009,11 @@ "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" ] } } @@ -4307,17 +5040,21 @@ "summary": "[Beta] Gets the latest status of the project's upgrade", "parameters": [ { - "name": "tracking_id", - "required": false, - "in": "query", + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, { - "name": "ref", - "required": true, - "in": "path", + "name": "tracking_id", + "required": false, + "in": "query", "schema": { "type": "string" } @@ -4414,6 +5151,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4469,6 +5207,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4501,7 +5240,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4572,7 +5315,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -4625,19 +5372,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, @@ -4649,6 +5387,16 @@ "enum": ["auth", "db", "pooler", "realtime", "rest", "storage"] } } + }, + { + "name": "timeout_ms", + "required": false, + "in": "query", + "schema": { + "minimum": 0, + "maximum": 10000, + "type": "integer" + } } ], "responses": { @@ -4661,6 +5409,17 @@ "items": { "type": "object", "properties": { + "name": { + "type": "string", + "enum": ["auth", "db", "pooler", "realtime", "rest", "storage"] + }, + "healthy": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"] + }, "info": { "oneOf": [ { @@ -4669,32 +5428,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" } @@ -4720,60 +5480,57 @@ ] } }, - "/v1/projects/{ref}/config/auth/signing-keys": { + "/v1/projects/{ref}/config/auth/signing-keys/legacy": { "post": { - "operationId": "createSigningKeyForProject", - "summary": "[Alpha] Create a new signing key for the project in standby status", + "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, + "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"] - } - }, - "required": ["algorithm"], - "additionalProperties": false - } - } - } - }, "responses": { "201": { - "description": "[Alpha] Create a new signing key for the project in standby status", + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { + "id": { + "type": "string", + "format": "uuid" + }, "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, "status": { "type": "string", - "enum": ["in_use", "standby"] + "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": ["algorithm"], + "required": ["id", "algorithm", "status", "created_at", "updated_at"], "additionalProperties": false } } @@ -4791,96 +5548,18 @@ ] }, "get": { - "operationId": "listSigningKeysForProject", - "summary": "[Alpha] List all signing keys for the project", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "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 - } - } - }, - "required": ["keys"], - "additionalProperties": false - } - } - } - }, - "403": { - "description": "" - } - }, - "tags": ["Auth"], - "security": [ - { - "bearer": [] - } - ] - } - }, - "/v1/projects/{ref}/config/auth/signing-keys/{id}": { - "get": { - "operationId": "getSigningKeyForProject", - "summary": "[Alpha] Get information about a signing key", + "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": "id", - "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" } } @@ -4933,30 +5612,153 @@ "bearer": [] } ] - }, - "delete": { - "operationId": "deleteSigningKey", - "summary": "[Alpha] Remove a signing key from a project, where the status is previously_used", + } + }, + "/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": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "ref", + "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": { + "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": { @@ -5004,15 +5806,94 @@ } ] }, - "patch": { - "operationId": "patchSigningKey", - "summary": "[Alpha] Update a signing key, mainly its status", + "get": { + "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, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], + "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 + } + } + }, + "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" } }, @@ -5020,29 +5901,15 @@ "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": { - "status": { - "type": "string", - "enum": ["in_use", "previously_used", "revoked", "standby"] - } - }, - "required": ["status"], - "additionalProperties": false - } - } - } - }, "responses": { "200": { "description": "", @@ -5091,13 +5958,20 @@ "bearer": [] } ] - } - }, - "/v1/projects/{ref}/config/storage": { - "get": { - "operationId": "v1-get-storage-config", - "summary": "Gets project's storage 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, @@ -5106,6 +5980,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -5118,43 +5993,213 @@ "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"] - } - }, - "required": ["fileSizeLimit", "features"] - } - } - } - }, - "403": { - "description": "" - }, + "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 + } + } + } + }, + "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": { + "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": "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 + } + } + } + }, + "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": { + "type": "object", + "properties": { + "fileSizeLimit": { + "type": "integer", + "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"] + } + }, + "required": ["fileSizeLimit", "features"] + } + } + } + }, + "403": { + "description": "" + }, "500": { "description": "Failed to retrieve project's storage config" } @@ -5178,6 +6223,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -5192,7 +6238,7 @@ "fileSizeLimit": { "type": "integer", "minimum": 0, - "maximum": 53687091200, + "maximum": 536870912000, "format": "int64" }, "features": { @@ -5215,6 +6261,15 @@ } }, "required": ["enabled"] + }, + "icebergCatalog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } }, "required": ["imageTransformation", "s3Protocol"] @@ -5256,6 +6311,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -5328,6 +6384,10 @@ "minimum": 0, "maximum": 262143 }, + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] + }, "shared_buffers": { "type": "string" }, @@ -5345,10 +6405,6 @@ }, "work_mem": { "type": "string" - }, - "session_replication_role": { - "enum": ["origin", "replica", "local"], - "type": "string" } } } @@ -5381,6 +6437,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -5452,6 +6509,10 @@ "minimum": 0, "maximum": 262143 }, + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] + }, "shared_buffers": { "type": "string" }, @@ -5472,10 +6533,6 @@ }, "restart_database": { "type": "boolean" - }, - "session_replication_role": { - "enum": ["origin", "replica", "local"], - "type": "string" } } } @@ -5550,6 +6607,10 @@ "minimum": 0, "maximum": 262143 }, + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] + }, "shared_buffers": { "type": "string" }, @@ -5567,10 +6628,6 @@ }, "work_mem": { "type": "string" - }, - "session_replication_role": { - "enum": ["origin", "replica", "local"], - "type": "string" } } } @@ -5605,6 +6662,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -5617,21 +6675,33 @@ "schema": { "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" } } } @@ -5650,7 +6720,7 @@ }, "/v1/projects/{ref}/config/database/pooler": { "get": { - "operationId": "getSupavisorConfig", + "operationId": "v1-get-pooler-config", "summary": "Gets project's supavisor config", "parameters": [ { @@ -5661,6 +6731,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -5675,16 +6746,33 @@ "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", - "deprecated": true, "description": "Use connection_string instead" }, "default_pool_size": { @@ -5696,41 +6784,23 @@ "nullable": true }, "pool_mode": { - "enum": ["transaction", "session"], - "type": "string" - }, - "identifier": { - "type": "string" - }, - "is_using_scram_auth": { - "type": "boolean" - }, - "db_user": { - "type": "string" - }, - "db_host": { - "type": "string" - }, - "db_name": { - "type": "string" - }, - "connection_string": { - "type": "string" + "type": "string", + "enum": ["transaction", "session"] } }, "required": [ - "database_type", - "db_port", - "connectionString", - "default_pool_size", - "max_client_conn", - "pool_mode", "identifier", + "database_type", "is_using_scram_auth", "db_user", "db_host", + "db_port", "db_name", - "connection_string" + "connection_string", + "connectionString", + "default_pool_size", + "max_client_conn", + "pool_mode" ] } } @@ -5749,7 +6819,7 @@ ] }, "patch": { - "operationId": "updateSupavisorConfig", + "operationId": "v1-update-pooler-config", "summary": "Updates project's supavisor config", "parameters": [ { @@ -5760,6 +6830,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -5773,15 +6844,14 @@ "properties": { "default_pool_size": { "type": "integer", - "nullable": true, "minimum": 0, - "maximum": 1000 + "maximum": 3000, + "nullable": true }, "pool_mode": { - "enum": ["transaction", "session"], "type": "string", - "description": "Dedicated pooler mode for the project", - "deprecated": true + "enum": ["transaction", "session"], + "description": "Dedicated pooler mode for the project" } } } @@ -5837,6 +6907,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -5857,83 +6928,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 @@ -6206,6 +7200,10 @@ "type": "string", "nullable": true }, + "external_web3_solana_enabled": { + "type": "boolean", + "nullable": true + }, "external_zoom_client_id": { "type": "string", "nullable": true @@ -6278,6 +7276,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 @@ -6286,6 +7300,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 @@ -6338,6 +7359,10 @@ "type": "string", "nullable": true }, + "mfa_max_enrolled_factors": { + "type": "integer", + "nullable": true + }, "mfa_totp_enroll_enabled": { "type": "boolean", "nullable": true @@ -6362,16 +7387,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": { @@ -6396,6 +7466,7 @@ }, "security_captcha_provider": { "type": "string", + "enum": ["turnstile", "hcaptcha"], "nullable": true }, "security_captcha_secret": { @@ -6406,10 +7477,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 @@ -6418,6 +7497,10 @@ "type": "string", "nullable": true }, + "sessions_timebox": { + "type": "integer", + "nullable": true + }, "site_url": { "type": "string", "nullable": true @@ -6426,6 +7509,10 @@ "type": "boolean", "nullable": true }, + "sms_max_frequency": { + "type": "integer", + "nullable": true + }, "sms_messagebird_access_key": { "type": "string", "nullable": true @@ -6434,8 +7521,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": { @@ -6448,6 +7543,7 @@ }, "sms_test_otp_valid_until": { "type": "string", + "format": "date-time", "nullable": true }, "sms_textlocal_api_key": { @@ -6500,12 +7596,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 @@ -6530,26 +7631,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", @@ -6618,6 +7699,7 @@ "external_workos_enabled", "external_workos_secret", "external_workos_url", + "external_web3_solana_enabled", "external_zoom_client_id", "external_zoom_enabled", "external_zoom_secret", @@ -6636,8 +7718,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", @@ -6651,15 +7739,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", @@ -6668,13 +7767,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", @@ -6693,6 +7798,7 @@ "sms_vonage_from", "smtp_admin_email", "smtp_host", + "smtp_max_frequency", "smtp_pass", "smtp_port", "smtp_sender_name", @@ -6729,6 +7835,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -6740,68 +7847,254 @@ "schema": { "type": "object", "properties": { - "jwt_exp": { - "type": "integer", - "minimum": 0, - "maximum": 604800 + "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 + "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 + "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 + "minimum": 0, + "nullable": true }, "sessions_inactivity_timeout": { "type": "integer", - "minimum": 0 + "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 + "maximum": 2147483647, + "nullable": true }, "rate_limit_email_sent": { "type": "integer", "minimum": 1, - "maximum": 2147483647 + "maximum": 2147483647, + "nullable": true }, "rate_limit_sms_sent": { "type": "integer", "minimum": 1, - "maximum": 2147483647 + "maximum": 2147483647, + "nullable": true }, "rate_limit_verify": { "type": "integer", "minimum": 1, - "maximum": 2147483647 + "maximum": 2147483647, + "nullable": true }, "rate_limit_token_refresh": { "type": "integer", "minimum": 1, - "maximum": 2147483647 + "maximum": 2147483647, + "nullable": true }, "rate_limit_otp": { "type": "integer", "minimum": 1, - "maximum": 2147483647 + "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 + "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 + "maximum": 2147483647, + "nullable": true }, "mailer_otp_exp": { "type": "integer", @@ -6811,489 +8104,496 @@ "mailer_otp_length": { "type": "integer", "minimum": 6, - "maximum": 10 + "maximum": 10, + "nullable": true + }, + "sms_autoconfirm": { + "type": "boolean", + "nullable": true }, "sms_max_frequency": { "type": "integer", "minimum": 0, - "maximum": 32767 + "maximum": 32767, + "nullable": true }, "sms_otp_exp": { "type": "integer", "minimum": 0, - "maximum": 2147483647 + "maximum": 2147483647, + "nullable": true }, "sms_otp_length": { "type": "integer", "minimum": 0, "maximum": 32767 }, - "db_max_pool_size": { - "type": "integer" + "sms_provider": { + "type": "string", + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "nullable": true }, - "api_max_request_duration": { - "type": "integer" + "sms_messagebird_access_key": { + "type": "string", + "nullable": true }, - "mfa_phone_max_frequency": { - "type": "integer", - "minimum": 0, - "maximum": 32767 + "sms_messagebird_originator": { + "type": "string", + "nullable": true }, - "mfa_phone_otp_length": { - "type": "integer", - "minimum": 0, - "maximum": 32767 + "sms_test_otp": { + "type": "string", + "pattern": "^([0-9]{1,15}=[0-9]+,?)*$", + "nullable": true }, - "site_url": { + "sms_test_otp_valid_until": { "type": "string", - "pattern": "/^[^,]+$/" + "format": "date-time", + "nullable": true }, - "disable_signup": { - "type": "boolean" + "sms_textlocal_api_key": { + "type": "string", + "nullable": true }, - "smtp_admin_email": { - "type": "string" + "sms_textlocal_sender": { + "type": "string", + "nullable": true }, - "smtp_host": { - "type": "string" + "sms_twilio_account_sid": { + "type": "string", + "nullable": true }, - "smtp_port": { - "type": "string" + "sms_twilio_auth_token": { + "type": "string", + "nullable": true }, - "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" - }, - "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:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "" - ] - }, - "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_content_sid": { + "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_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 } } } @@ -7316,129 +8616,52 @@ "type": "integer", "nullable": true }, - "jwt_exp": { - "type": "integer", + "disable_signup": { + "type": "boolean", "nullable": true }, - "mailer_otp_exp": { - "type": "integer" - }, - "mailer_otp_length": { - "type": "integer", + "external_anonymous_users_enabled": { + "type": "boolean", "nullable": true }, - "mfa_max_enrolled_factors": { - "type": "integer", + "external_apple_additional_client_ids": { + "type": "string", "nullable": true }, - "mfa_phone_otp_length": { - "type": "integer" + "external_apple_client_id": { + "type": "string", + "nullable": true }, - "mfa_phone_max_frequency": { - "type": "integer", + "external_apple_enabled": { + "type": "boolean", "nullable": true }, - "password_min_length": { - "type": "integer", + "external_apple_secret": { + "type": "string", "nullable": true }, - "rate_limit_anonymous_users": { - "type": "integer", + "external_azure_client_id": { + "type": "string", "nullable": true }, - "rate_limit_email_sent": { - "type": "integer", + "external_azure_enabled": { + "type": "boolean", "nullable": true }, - "rate_limit_sms_sent": { - "type": "integer", + "external_azure_secret": { + "type": "string", "nullable": true }, - "rate_limit_token_refresh": { - "type": "integer", + "external_azure_url": { + "type": "string", "nullable": true }, - "rate_limit_verify": { - "type": "integer", + "external_bitbucket_client_id": { + "type": "string", "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 - }, - "external_anonymous_users_enabled": { - "type": "boolean", - "nullable": true - }, - "external_apple_additional_client_ids": { - "type": "string", - "nullable": true - }, - "external_apple_client_id": { - "type": "string", - "nullable": true - }, - "external_apple_enabled": { - "type": "boolean", - "nullable": true - }, - "external_apple_secret": { - "type": "string", - "nullable": true - }, - "external_azure_client_id": { - "type": "string", - "nullable": true - }, - "external_azure_enabled": { - "type": "boolean", - "nullable": true - }, - "external_azure_secret": { - "type": "string", - "nullable": true - }, - "external_azure_url": { - "type": "string", - "nullable": true - }, - "external_bitbucket_client_id": { - "type": "string", - "nullable": true - }, - "external_bitbucket_enabled": { - "type": "boolean", + "external_bitbucket_enabled": { + "type": "boolean", "nullable": true }, "external_bitbucket_secret": { @@ -7665,6 +8888,10 @@ "type": "string", "nullable": true }, + "external_web3_solana_enabled": { + "type": "boolean", + "nullable": true + }, "external_zoom_client_id": { "type": "string", "nullable": true @@ -7737,6 +8964,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 @@ -7745,6 +8988,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 @@ -7797,6 +9047,10 @@ "type": "string", "nullable": true }, + "mfa_max_enrolled_factors": { + "type": "integer", + "nullable": true + }, "mfa_totp_enroll_enabled": { "type": "boolean", "nullable": true @@ -7821,16 +9075,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": { @@ -7855,6 +9154,7 @@ }, "security_captcha_provider": { "type": "string", + "enum": ["turnstile", "hcaptcha"], "nullable": true }, "security_captcha_secret": { @@ -7865,10 +9165,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 @@ -7877,6 +9185,10 @@ "type": "string", "nullable": true }, + "sessions_timebox": { + "type": "integer", + "nullable": true + }, "site_url": { "type": "string", "nullable": true @@ -7885,6 +9197,10 @@ "type": "boolean", "nullable": true }, + "sms_max_frequency": { + "type": "integer", + "nullable": true + }, "sms_messagebird_access_key": { "type": "string", "nullable": true @@ -7893,8 +9209,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": { @@ -7907,6 +9231,7 @@ }, "sms_test_otp_valid_until": { "type": "string", + "format": "date-time", "nullable": true }, "sms_textlocal_api_key": { @@ -7959,12 +9284,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 @@ -7989,26 +9319,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", @@ -8077,6 +9387,7 @@ "external_workos_enabled", "external_workos_secret", "external_workos_url", + "external_web3_solana_enabled", "external_zoom_client_id", "external_zoom_enabled", "external_zoom_secret", @@ -8095,8 +9406,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", @@ -8110,15 +9427,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", @@ -8127,13 +9455,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", @@ -8152,6 +9486,7 @@ "sms_vonage_from", "smtp_admin_email", "smtp_host", + "smtp_max_frequency", "smtp_pass", "smtp_port", "smtp_sender_name", @@ -8179,7 +9514,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": [ { @@ -8190,6 +9525,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8207,9 +9543,7 @@ "jwks_url": { "type": "string" }, - "custom_jwks": { - "type": "object" - } + "custom_jwks": {} } } } @@ -8224,7 +9558,8 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "type": { "type": "string" @@ -8238,11 +9573,9 @@ "nullable": true }, "custom_jwks": { - "type": "object", "nullable": true }, "resolved_jwks": { - "type": "object", "nullable": true }, "inserted_at": { @@ -8273,7 +9606,7 @@ ] }, "get": { - "operationId": "listTPAForProject", + "operationId": "v1-list-project-tpa-integrations", "summary": "Lists all third-party auth integrations", "parameters": [ { @@ -8284,6 +9617,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8299,7 +9633,8 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "type": { "type": "string" @@ -8313,11 +9648,9 @@ "nullable": true }, "custom_jwks": { - "type": "object", "nullable": true }, "resolved_jwks": { - "type": "object", "nullable": true }, "inserted_at": { @@ -8351,7 +9684,7 @@ }, "/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}": { "delete": { - "operationId": "deleteTPAForProject", + "operationId": "v1-delete-project-tpa-integration", "summary": "Removes a third-party auth integration", "parameters": [ { @@ -8362,6 +9695,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -8370,6 +9704,7 @@ "required": true, "in": "path", "schema": { + "format": "uuid", "type": "string" } } @@ -8383,7 +9718,8 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "type": { "type": "string" @@ -8397,11 +9733,9 @@ "nullable": true }, "custom_jwks": { - "type": "object", "nullable": true }, "resolved_jwks": { - "type": "object", "nullable": true }, "inserted_at": { @@ -8432,7 +9766,7 @@ ] }, "get": { - "operationId": "getTPAForProject", + "operationId": "v1-get-project-tpa-integration", "summary": "Get a third-party integration", "parameters": [ { @@ -8443,6 +9777,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -8451,6 +9786,7 @@ "required": true, "in": "path", "schema": { + "format": "uuid", "type": "string" } } @@ -8464,7 +9800,8 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "type": { "type": "string" @@ -8478,11 +9815,9 @@ "nullable": true }, "custom_jwks": { - "type": "object", "nullable": true }, "resolved_jwks": { - "type": "object", "nullable": true }, "inserted_at": { @@ -8526,6 +9861,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8555,7 +9891,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8613,23 +9953,15 @@ "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": {}, - "hideDefinitions": ["release_channel", "postgres_engine"] - } - } - } - }, "responses": { "200": { "description": "" @@ -8655,7 +9987,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8685,7 +10021,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8732,7 +10072,15 @@ "ci_4xlarge", "ci_8xlarge", "ci_12xlarge", - "ci_16xlarge" + "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" ] }, { @@ -8785,26 +10133,7 @@ "required": ["description", "type", "interval", "amount"] }, "meta": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - } + "description": "Any JSON-serializable value" } }, "required": ["id", "name", "price"] @@ -8852,7 +10181,15 @@ "ci_4xlarge", "ci_8xlarge", "ci_12xlarge", - "ci_16xlarge" + "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" ] }, { @@ -8905,26 +10242,7 @@ "required": ["description", "type", "interval", "amount"] }, "meta": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - } + "description": "Any JSON-serializable value" } }, "required": ["id", "name", "price"] @@ -8947,6 +10265,7 @@ "description": "Failed to list project addons" } }, + "tags": ["Billing"], "security": [ { "bearer": [] @@ -8961,7 +10280,11 @@ "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -8987,7 +10310,15 @@ "ci_4xlarge", "ci_8xlarge", "ci_12xlarge", - "ci_16xlarge" + "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" ] }, { @@ -9033,6 +10364,7 @@ "description": "Failed to apply project addon" } }, + "tags": ["Billing"], "security": [ { "bearer": [] @@ -9046,37 +10378,59 @@ "summary": "Removes project addon", "parameters": [ { - "name": "addon_variant", + "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { - "enum": [ - "ci_micro", - "ci_small", - "ci_medium", - "ci_large", - "ci_xlarge", - "ci_2xlarge", - "ci_4xlarge", - "ci_8xlarge", - "ci_12xlarge", - "ci_16xlarge", - "cd_default", - "pitr_7", - "pitr_14", - "pitr_28", - "ipv4_default" - ], + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, { - "name": "ref", + "name": "addon_variant", "required": true, "in": "path", - "schema": { - "type": "string" - } + "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": { @@ -9090,6 +10444,7 @@ "description": "Failed to remove project addon" } }, + "tags": ["Billing"], "security": [ { "bearer": [] @@ -9097,40 +10452,21 @@ ] } }, - "/v1/projects/{ref}/analytics/endpoints/logs.all": { + "/v1/projects/{ref}/claim-token": { "get": { - "operationId": "getLogs", - "summary": "Gets project's logs", + "operationId": "v1-get-project-claim-token", + "x-internal": true, + "summary": "Gets project claim token", "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" } } @@ -9143,55 +10479,21 @@ "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" - } - } - } - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - } - }, - { - "type": "string" - } - ] + "token_alias": { + "type": "string" }, - "result": { - "type": "array", - "items": { - "type": "object" - } + "expires_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "created_by": { + "type": "string", + "format": "uuid" } - } + }, + "required": ["token_alias", "expires_at", "created_at", "created_by"] } } } @@ -9200,25 +10502,27 @@ "description": "" } }, - "tags": ["Analytics"], + "tags": ["Projects"], "security": [ { "bearer": [] } ] - } - }, - "/v1/projects/{ref}/database/migrations": { - "get": { - "operationId": "v1-list-migrations", - "summary": "[Beta] List applied migration versions", - "description": "Only available to selected partner OAuth apps", + }, + "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" } } @@ -9229,71 +10533,68 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "version": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string" - } + "type": "object", + "properties": { + "token": { + "type": "string" }, - "required": ["version"] - } + "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": "" - }, - "500": { - "description": "Failed to list database migrations" } }, - "tags": ["Database"], + "tags": ["Projects"], "security": [ { "bearer": [] } ] }, - "post": { - "operationId": "v1-apply-a-migration", - "summary": "[Beta] Apply a database migration", - "description": "Only available to selected partner OAuth apps", + "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": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "" }, "403": { "description": "" - }, - "500": { - "description": "Failed to apply database migration" } }, - "tags": ["Database"], + "tags": ["Projects"], "security": [ { "bearer": [] @@ -9301,56 +10602,161 @@ ] } }, - "/v1/projects/{ref}/database/query": { - "post": { - "operationId": "v1-run-a-query", - "summary": "[Beta] Run sql query", + "/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" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "string", - "minLength": 1 - } - }, - "required": ["query"] - } - } - } - }, "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object" - } + "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": "" - }, - "500": { - "description": "Failed to run sql query" } }, - "tags": ["Database"], + "tags": ["Advisors"], "security": [ { "bearer": [] @@ -9358,10 +10764,12 @@ ] } }, - "/v1/projects/{ref}/database/webhooks/enable": { - "post": { - "operationId": "v1-enable-database-webhook", - "summary": "[Beta] Enables Database Webhooks on the project", + "/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", @@ -9371,41 +10779,16 @@ "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": "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, - "parameters": [ { - "name": "ref", - "required": true, - "in": "path", + "name": "lint_type", + "required": false, + "in": "query", "schema": { + "enum": ["sql"], "type": "string" } } @@ -9418,34 +10801,124 @@ "schema": { "type": "object", "properties": { - "databases": { + "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" }, - "schemas": { + "level": { + "type": "string", + "enum": ["ERROR", "WARN", "INFO"] + }, + "facing": { + "type": "string", + "enum": ["EXTERNAL"] + }, + "categories": { "type": "array", "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - } + "type": "string", + "enum": ["PERFORMANCE", "SECURITY"] + } + }, + "description": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "remediation": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": { + "schema": { + "type": "string" }, - "required": ["name"], - "additionalProperties": true + "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", "schemas"], - "additionalProperties": true + "required": [ + "name", + "title", + "level", + "facing", + "categories", + "description", + "detail", + "remediation", + "cache_key" + ] } } }, - "required": ["databases"] + "required": ["lints"] } } } @@ -9454,7 +10927,7 @@ "description": "" } }, - "tags": ["Database"], + "tags": ["Advisors"], "security": [ { "bearer": [] @@ -9462,102 +10935,26 @@ ] } }, - "/v1/projects/{ref}/functions": { + "/v1/projects/{ref}/analytics/endpoints/logs.all": { "get": { - "operationId": "v1-list-all-functions", - "summary": "List all functions", - "description": "Returns all functions you've previously added to the specified 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, + "pattern": "^[a-z]+$", "type": "string" } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "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" - }, - "updated_at": { - "type": "integer" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - } - }, - "required": [ - "id", - "slug", - "name", - "status", - "version", - "created_at", - "updated_at" - ] - } - } - } - } - }, - "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, - "parameters": [ { - "name": "import_map_path", + "name": "sql", "required": false, "in": "query", "schema": { @@ -9565,153 +10962,197 @@ } }, { - "name": "entrypoint_path", + "name": "iso_timestamp_start", "required": false, "in": "query", "schema": { + "format": "date-time", "type": "string" } }, { - "name": "import_map", + "name": "iso_timestamp_end", "required": false, "in": "query", "schema": { - "type": "boolean" + "format": "date-time", + "type": "string" } - }, - { - "name": "verify_jwt", - "required": false, - "in": "query", - "schema": { - "type": "boolean" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "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"] + } + ] + } + } + } + } } }, + "403": { + "description": "" + } + }, + "tags": ["Analytics"], + "security": [ { - "name": "name", - "required": false, - "in": "query", + "bearer": [] + } + ] + } + }, + "/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, + "pattern": "^[a-z]+$", "type": "string" } }, { - "name": "slug", + "name": "interval", "required": false, "in": "query", "schema": { - "type": "string" - } - }, - { - "name": "ref", - "required": true, - "in": "path", - "schema": { + "enum": ["15min", "30min", "1hr", "3hr", "1day", "3day", "7day"], "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"] - } - } - } - }, "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { "schema": { "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" - }, - "updated_at": { - "type": "integer" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" + "result": { + "type": "array", + "items": {} }, - "import_map_path": { - "type": "string" + "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", - "slug", - "name", - "status", - "version", - "created_at", - "updated_at" - ] + } } } } @@ -9720,139 +11161,155 @@ "description": "" }, "500": { - "description": "Failed to create project's function" + "description": "Failed to get project's usage api counts" } }, - "tags": ["Edge Functions"], + "tags": ["Analytics"], "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}/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, + "pattern": "^[a-z]+$", "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "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" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" + "result": { + "type": "array", + "items": {} }, - "import_map_path": { - "type": "string" + "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", "slug", "name", "status", "version"] + } } } } + }, + "500": { + "description": "Failed to get project's usage api requests count" } }, + "tags": ["Analytics"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/database/migrations": { + "get": { + "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, + "pattern": "^[a-z]+$", + "type": "string" + } + } + ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "functions": { - "type": "array", - "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" - }, - "updated_at": { - "type": "integer" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - } - }, - "required": [ - "id", - "slug", - "name", - "status", - "version", - "created_at", - "updated_at" - ] + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string" } - } - }, - "required": ["functions"] + }, + "required": ["version"] + } } } } @@ -9861,43 +11318,38 @@ "description": "" }, "500": { - "description": "Failed to update functions" + "description": "Failed to list database migrations" } }, - "tags": ["Edge Functions"], + "tags": ["Database"], "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.", + "operationId": "v1-apply-a-migration", + "summary": "[Beta] Apply a database migration", + "description": "Only available to selected partner OAuth apps", "parameters": [ { - "name": "bundleOnly", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "slug", - "required": false, - "in": "query", + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, { - "name": "ref", - "required": true, - "in": "path", + "name": "Idempotency-Key", + "required": false, + "in": "header", + "description": "A unique key to ensure the same migration is tracked only once.", "schema": { "type": "string" } @@ -9906,263 +11358,121 @@ "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { "type": "object", "properties": { - "file": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - } + "query": { + "type": "string", + "minLength": 1 }, - "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"] + "name": { + "type": "string" } }, - "required": ["metadata"] + "required": ["query"] } } } }, "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "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" - }, - "updated_at": { - "type": "integer" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - } - }, - "required": ["id", "slug", "name", "status", "version"] - } - } - } + "200": { + "description": "" }, "403": { "description": "" }, "500": { - "description": "Failed to deploy function" + "description": "Failed to apply database migration" } }, - "tags": ["Edge Functions"], + "tags": ["Database"], "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.", + }, + "put": { + "operationId": "v1-upsert-a-migration", + "summary": "[Beta] Upsert a database migration without applying", + "description": "Only available to selected partner OAuth apps", "parameters": [ { - "name": "function_slug", + "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { - "pattern": "^[A-Za-z0-9_-]+$", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, { - "name": "ref", - "required": true, - "in": "path", + "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": { - "id": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["ACTIVE", "REMOVED", "THROTTLED"] - }, - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer" - }, - "updated_at": { - "type": "integer" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "type": "string", + "minLength": 1 }, - "required": [ - "id", - "slug", - "name", - "status", - "version", - "created_at", - "updated_at" - ] - } + "name": { + "type": "string" + } + }, + "required": ["query"] } } + } + }, + "responses": { + "200": { + "description": "" }, "403": { "description": "" }, "500": { - "description": "Failed to retrieve function with given slug" + "description": "Failed to upsert database migration" } }, - "tags": ["Edge Functions"], + "tags": ["Database"], "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}/database/query": { + "post": { + "operationId": "v1-run-a-query", + "summary": "[Beta] Run sql query", "parameters": [ - { - "name": "import_map_path", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "entrypoint_path", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "import_map", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "verify_jwt", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "name", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "function_slug", - "required": true, - "in": "path", - "schema": { - "pattern": "^[A-Za-z0-9_-]+$", - "type": "string" - } - }, { "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -10174,141 +11484,68 @@ "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" + "query": { + "type": "string", + "minLength": 1 }, - "verify_jwt": { + "read_only": { "type": "boolean" } - } + }, + "required": ["query"] } } } }, "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "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" - }, - "updated_at": { - "type": "integer" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - } - }, - "required": [ - "id", - "slug", - "name", - "status", - "version", - "created_at", - "updated_at" - ] - } - } - } + "201": { + "description": "" }, "403": { "description": "" }, "500": { - "description": "Failed to update function with given slug" + "description": "Failed to run sql query" } }, - "tags": ["Edge Functions"], + "tags": ["Database"], "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}/database/webhooks/enable": { + "post": { + "operationId": "v1-enable-database-webhook", + "summary": "[Beta] Enables Database Webhooks on the project", "parameters": [ - { - "name": "function_slug", - "required": true, - "in": "path", - "schema": { - "pattern": "^[A-Za-z0-9_-]+$", - "type": "string" - } - }, { "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 delete function with given slug" + "description": "Failed to enable Database Webhooks on the project" } }, - "tags": ["Edge Functions"], + "tags": ["Database"], "security": [ { "bearer": [] @@ -10316,42 +11553,71 @@ ] } }, - "/v1/projects/{ref}/functions/{function_slug}/body": { + "/v1/projects/{ref}/database/context": { "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-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": "function_slug", - "required": true, - "in": "path", - "schema": { - "pattern": "^[A-Za-z0-9_-]+$", - "type": "string" - } - }, { "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } ], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "databases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "schemas": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": ["name"], + "additionalProperties": true + } + } + }, + "required": ["name", "schemas"], + "additionalProperties": true + } + } + }, + "required": ["databases"] + } + } + } }, "403": { "description": "" - }, - "500": { - "description": "Failed to retrieve function body with given slug" } }, - "tags": ["Edge Functions"], + "tags": ["Database"], "security": [ { "bearer": [] @@ -10359,10 +11625,11 @@ ] } }, - "/v1/projects/{ref}/storage/buckets": { + "/v1/projects/{ref}/functions": { "get": { - "operationId": "v1-list-all-buckets", - "summary": "Lists all buckets", + "operationId": "v1-list-all-functions", + "summary": "List all functions", + "description": "Returns all functions you've previously added to the specified project.", "parameters": [ { "name": "ref", @@ -10372,6 +11639,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } } @@ -10389,23 +11657,52 @@ "id": { "type": "string" }, - "name": { + "slug": { "type": "string" }, - "owner": { + "name": { "type": "string" }, + "status": { + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, "created_at": { - "type": "string" + "type": "integer", + "format": "int64" }, "updated_at": { - "type": "string" + "type": "integer", + "format": "int64" }, - "public": { + "verify_jwt": { + "type": "boolean" + }, + "import_map": { "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, - "required": ["id", "name", "owner", "created_at", "updated_at", "public"] + "required": [ + "id", + "slug", + "name", + "status", + "version", + "created_at", + "updated_at" + ] } } } @@ -10415,93 +11712,1047 @@ "description": "" }, "500": { - "description": "Failed to get list of buckets" + "description": "Failed to retrieve project's functions" } }, - "tags": ["Storage"], + "tags": ["Edge Functions"], "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, - "type": "string" - } - } - ], + "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": { "type": "object", "properties": { - "type": { + "slug": { "type": "string", - "enum": ["saml"], - "description": "What type of provider will be created" + "pattern": "^[A-Za-z0-9_-]+$" }, - "metadata_xml": { + "name": { "type": "string" }, - "metadata_url": { + "body": { "type": "string" }, - "domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "attribute_mapping": { - "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" + "verify_jwt": { + "type": "boolean" + } + }, + "required": ["slug", "name", "body"] + } + } + } + }, + "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": { + "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" + ] + } + } + } + }, + "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": { + "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"] + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "functions": { + "type": "array", + "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"] + } + } + } + }, + "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": { + "type": "object", + "properties": { + "file": { + "type": "array", + "items": { + "type": "string", + "format": "binary" + } + }, + "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": ["metadata"] + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "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"] + } + } + } + }, + "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": { + "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" + ] + } + } + } + }, + "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": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "verify_jwt": { + "type": "boolean" + } + } + } + } + } + }, + "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": { + "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" + ] + } + } + } + }, + "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": { + "type": "object", + "properties": {} + } + } + } + }, + "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": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "public": { + "type": "boolean" + } + }, + "required": ["id", "name", "owner", "created_at", "updated_at", "public"] + } + } + } + } + }, + "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": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["saml"], + "description": "What type of provider will be created" + }, + "metadata_xml": { + "type": "string" + }, + "metadata_url": { + "type": "string" + }, + "domains": { + "type": "array", + "items": { + "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" } } } @@ -10516,7 +12767,299 @@ } }, "responses": { - "201": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "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"] + } + } + } + }, + "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": { + "type": "object", + "properties": { + "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"] + } + } + } + }, + "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": { @@ -10549,10 +13092,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -10565,15 +13118,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -10623,7 +13167,7 @@ "description": "" }, "404": { - "description": "SAML 2.0 support is not enabled for this project" + "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" } }, "tags": ["Auth"], @@ -10633,9 +13177,9 @@ } ] }, - "get": { - "operationId": "v1-list-all-sso-provider", - "summary": "Lists all SSO providers", + "put": { + "operationId": "v1-update-a-sso-provider", + "summary": "Updates a SSO provider by its UUID", "parameters": [ { "name": "ref", @@ -10645,10 +13189,87 @@ "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": { + "type": "object", + "properties": { + "metadata_xml": { + "type": "string" + }, + "metadata_url": { + "type": "string" + }, + "domains": { + "type": "array", + "items": { + "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"] + } + } + } + } + } + }, "responses": { "200": { "description": "", @@ -10657,95 +13278,81 @@ "schema": { "type": "object", "properties": { - "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": { + "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": { - "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"] - } - }, - "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" + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "oneOf": [ + { + "type": "object", + "properties": {} + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "array": { + "type": "boolean" + } } - }, - "required": ["id"] + } } }, + "required": ["keys"] + } + }, + "required": ["id", "entity_id"] + }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "domain": { + "type": "string" + }, "created_at": { "type": "string" }, @@ -10755,9 +13362,15 @@ }, "required": ["id"] } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" } }, - "required": ["items"] + "required": ["id"] } } } @@ -10766,7 +13379,7 @@ "description": "" }, "404": { - "description": "SAML 2.0 support is not enabled for this project" + "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" } }, "tags": ["Auth"], @@ -10775,12 +13388,10 @@ "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", + }, + "delete": { + "operationId": "v1-delete-a-sso-provider", + "summary": "Removes a SSO provider by its UUID", "parameters": [ { "name": "ref", @@ -10790,6 +13401,7 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, @@ -10798,6 +13410,7 @@ "required": true, "in": "path", "schema": { + "format": "uuid", "type": "string" } } @@ -10836,10 +13449,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -10852,15 +13475,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -10919,10 +13533,12 @@ "bearer": [] } ] - }, - "put": { - "operationId": "v1-update-a-sso-provider", - "summary": "Updates a SSO provider by its UUID", + } + }, + "/v1/projects/{ref}/database/backups": { + "get": { + "operationId": "v1-list-all-backups", + "summary": "Lists all backups", "parameters": [ { "name": "ref", @@ -10932,14 +13548,106 @@ "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": [ { - "name": "provider_id", + "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" } } @@ -10951,186 +13659,102 @@ "schema": { "type": "object", "properties": { - "metadata_xml": { - "type": "string" - }, - "metadata_url": { - "type": "string" - }, - "domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "attribute_mapping": { - "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"] + "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": { - "200": { + "201": { "description": "", "content": { "application/json": { "schema": { "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": { - "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": { + "name": { "type": "string" }, - "updated_at": { - "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": [] } ] }, - "delete": { - "operationId": "v1-delete-a-sso-provider", - "summary": "Removes a SSO provider by its UUID", + "get": { + "operationId": "v1-get-restore-point", + "x-internal": true, + "summary": "Get restore points for project", "parameters": [ { "name": "ref", @@ -11140,14 +13764,16 @@ "schema": { "minLength": 20, "maxLength": 20, + "pattern": "^[a-z]+$", "type": "string" } }, { - "name": "provider_id", - "required": true, - "in": "path", + "name": "name", + "required": false, + "in": "query", "schema": { + "maxLength": 20, "type": "string" } } @@ -11160,110 +13786,139 @@ "schema": { "type": "object", "properties": { - "id": { + "name": { "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": { - "default": { - "oneOf": [ - { - "type": "object" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "array": { - "type": "boolean" - } - } - } - } - }, - "required": ["keys"] - } + "status": { + "type": "string", + "enum": ["AVAILABLE", "PENDING", "REMOVED"] + } + }, + "required": ["name", "status"] + } + } + } + }, + "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, + "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": "" + }, + "403": { + "description": "" + } + }, + "tags": ["Database"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/organizations/{slug}/members": { + "get": { + "operationId": "v1-list-organization-members", + "summary": "List members of an organization", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string" }, - "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"] + "user_name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "role_name": { + "type": "string" + }, + "mfa_enabled": { + "type": "boolean" } }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] + "required": ["user_id", "user_name", "role_name", "mfa_enabled"] + } } } } }, "403": { "description": "" - }, - "404": { - "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist" } }, - "tags": ["Auth"], + "tags": ["Organizations"], "security": [ { "bearer": [] @@ -11271,19 +13926,18 @@ ] } }, - "/v1/projects/{ref}/database/backups": { + "/v1/organizations/{slug}": { "get": { - "operationId": "v1-list-all-backups", - "summary": "Lists all backups", + "operationId": "v1-get-an-organization", + "summary": "Gets information about the organization", "parameters": [ { - "name": "ref", + "name": "slug", "required": true, "in": "path", - "description": "Project ref", + "description": "Organization slug", "schema": { - "minLength": 20, - "maxLength": 20, + "pattern": "^[\\w-]+$", "type": "string" } } @@ -11296,74 +13950,45 @@ "schema": { "type": "object", "properties": { - "region": { + "id": { "type": "string" }, - "walg_enabled": { - "type": "boolean" + "name": { + "type": "string" }, - "pitr_enabled": { - "type": "boolean" + "plan": { + "type": "string", + "enum": ["free", "pro", "team", "enterprise"] }, - "backups": { + "opt_in_tags": { "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"] + "type": "string", + "enum": [ + "AI_SQL_GENERATOR_OPT_IN", + "AI_DATA_GENERATOR_OPT_IN", + "AI_LOG_GENERATOR_OPT_IN" + ] } }, - "physical_backup_data": { - "type": "object", - "properties": { - "earliest_physical_backup_date_unix": { - "type": "integer", - "format": "int64" - }, - "latest_physical_backup_date_unix": { - "type": "integer", - "format": "int64" - } + "allowed_release_channels": { + "type": "array", + "items": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] } } }, - "required": [ - "region", - "walg_enabled", - "pitr_enabled", - "backups", - "physical_backup_data" - ] + "required": ["id", "name", "opt_in_tags", "allowed_release_channels"] } } } }, "403": { "description": "" - }, - "500": { - "description": "Failed to get backups" } }, - "tags": ["Database"], + "tags": ["Organizations"], "security": [ { "bearer": [] @@ -11371,13 +13996,24 @@ ] } }, - "/v1/projects/{ref}/database/backups/restore-pitr": { - "post": { - "operationId": "v1-restore-pitr-backup", - "summary": "Restores a PITR backup for a database", + "/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": "ref", + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "type": "string" + } + }, + { + "name": "token", "required": true, "in": "path", "schema": { @@ -11385,105 +14021,166 @@ } } ], - "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": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "project": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["ref", "name"] + }, + "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": ["project", "preview", "expires_at", "created_at", "created_by"] + } } } - } - }, - "responses": { - "201": { - "description": "" }, "403": { "description": "" } }, - "tags": ["Database"], + "tags": ["Organizations"], "security": [ { "bearer": [] } ] - } - }, - "/v1/organizations/{slug}/members": { - "get": { - "operationId": "v1-list-organization-members", - "summary": "List members of an organization", + }, + "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" } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "user_id": { - "type": "string" - }, - "user_name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "role_name": { - "type": "string" - }, - "mfa_enabled": { - "type": "boolean" - } - }, - "required": ["user_id", "user_name", "role_name", "mfa_enabled"] - } - } - } - } }, - "403": { - "description": "" - } - }, - "tags": ["Organizations"], - "security": [ { - "bearer": [] - } - ] - } - }, - "/v1/organizations/{slug}": { - "get": { - "operationId": "v1-get-an-organization", - "summary": "Gets information about the organization", - "parameters": [ - { - "name": "slug", + "name": "token", "required": true, "in": "path", "schema": { @@ -11492,42 +14189,8 @@ } ], "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "plan": { - "type": "string", - "enum": ["free", "pro", "team", "enterprise"] - }, - "opt_in_tags": { - "type": "array", - "items": { - "type": "string", - "enum": ["AI_SQL_GENERATOR_OPT_IN"] - } - }, - "allowed_release_channels": { - "type": "array", - "items": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["opt_in_tags", "allowed_release_channels", "id", "name"] - } - } - } + "204": { + "description": "" }, "403": { "description": "" @@ -11590,7 +14253,9 @@ "type": "string" }, "db_port": { - "type": "number" + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true }, "db_user": { "type": "string" @@ -11639,6 +14304,9 @@ "FUNCTIONS_DEPLOYED", "FUNCTIONS_FAILED" ] + }, + "request_review": { + "type": "boolean" } } }, @@ -11646,7 +14314,8 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "name": { "type": "string" @@ -11687,10 +14356,16 @@ ] }, "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": [ @@ -11715,6 +14390,14 @@ }, "required": ["message"] }, + "BranchActionBody": { + "type": "object", + "properties": { + "migration_version": { + "type": "string" + } + } + }, "BranchUpdateResponse": { "type": "object", "properties": { @@ -11728,28 +14411,6 @@ }, "required": ["workflow_run_id", "message"] }, - "V1DatabaseResponse": { - "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"] - }, "V1ProjectWithDatabaseResponse": { "type": "object", "properties": { @@ -11820,7 +14481,7 @@ }, "required": ["id", "organization_id", "name", "region", "created_at", "status", "database"] }, - "V1CreateProjectBodyDto": { + "V1CreateProjectBody": { "type": "object", "properties": { "db_pass": { @@ -11829,6 +14490,7 @@ }, "name": { "type": "string", + "maxLength": 256, "description": "Name of your project" }, "organization_id": { @@ -11873,6 +14535,8 @@ "desired_instance_size": { "type": "string", "enum": [ + "pico", + "nano", "micro", "small", "medium", @@ -11882,7 +14546,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": { @@ -11956,7 +14628,7 @@ }, "required": ["id", "name"] }, - "CreateOrganizationV1Dto": { + "CreateOrganizationV1": { "type": "object", "properties": { "name": { @@ -12015,7 +14687,7 @@ "required": ["access_token", "refresh_token", "expires_in", "token_type"], "additionalProperties": false }, - "OAuthRevokeTokenBodyDto": { + "OAuthRevokeTokenBody": { "type": "object", "properties": { "client_id": { @@ -12032,112 +14704,6 @@ "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" - ] - }, "SnippetList": { "type": "object", "properties": { @@ -12174,8 +14740,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "name": { "type": "string" @@ -12187,8 +14752,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -12199,9 +14763,8 @@ "updated_by": { "type": "object", "properties": { - "id": { - "type": "integer", - "format": "int64" + "id": { + "type": "number" }, "username": { "type": "string" @@ -12230,21 +14793,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": { @@ -12262,8 +14810,8 @@ "enum": ["sql"] }, "visibility": { - "enum": ["user", "project", "org", "public"], - "type": "string" + "type": "string", + "enum": ["user", "project", "org", "public"] }, "name": { "type": "string" @@ -12276,8 +14824,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "name": { "type": "string" @@ -12289,8 +14836,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -12302,8 +14848,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "number" }, "username": { "type": "string" @@ -12344,11 +14889,9 @@ "ApiKeyResponse": { "type": "object", "properties": { - "name": { - "type": "string" - }, "api_key": { - "type": "string" + "type": "string", + "nullable": true }, "id": { "type": "string", @@ -12356,13 +14899,16 @@ }, "type": { "type": "string", - "enum": ["publishable", "secret", "legacy"], + "enum": ["legacy", "publishable", "secret"], "nullable": true }, "prefix": { "type": "string", "nullable": true }, + "name": { + "type": "string" + }, "description": { "type": "string", "nullable": true @@ -12393,7 +14939,16 @@ "nullable": true } }, - "required": ["name", "api_key"] + "required": ["name"] + }, + "LegacyApiKeysResponse": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] }, "CreateApiKeyBody": { "type": "object", @@ -12402,6 +14957,12 @@ "type": "string", "enum": ["publishable", "secret"] }, + "name": { + "type": "string", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z_][a-z0-9_]+$" + }, "description": { "type": "string", "nullable": true @@ -12418,11 +14979,17 @@ "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 @@ -12450,6 +15017,9 @@ "git_branch": { "type": "string" }, + "is_default": { + "type": "boolean" + }, "persistent": { "type": "boolean" }, @@ -12470,7 +15040,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" ] }, "release_channel": { @@ -12480,7 +15058,7 @@ }, "postgres_engine": { "type": "string", - "enum": ["15", "17-oriole"], + "enum": ["15", "17", "17-oriole"], "description": "Postgres engine version. If not provided, the latest version will be used." }, "secrets": { @@ -12488,279 +15066,25 @@ "additionalProperties": { "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"] - }, - "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": { + "with_data": { "type": "boolean" - }, - "errors": { - "type": "array", - "items": { - "type": "object" - } - }, - "messages": { - "type": "array", - "items": { - "type": "object" - } - }, - "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": ["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" @@ -12774,13 +15098,13 @@ "errors": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "messages": { "type": "array", "items": { - "type": "object" + "description": "Any JSON-serializable value" } }, "result": { @@ -12880,13 +15204,37 @@ }, "required": ["custom_hostname"] }, - "NetworkBanResponse": { + "NetworkBanResponse": { + "type": "object", + "properties": { + "banned_ipv4_addresses": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["banned_ipv4_addresses"] + }, + "NetworkBanResponseEnriched": { "type": "object", "properties": { "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"] } } }, @@ -12900,6 +15248,9 @@ "items": { "type": "string" } + }, + "identifier": { + "type": "string" } }, "required": ["ipv4_addresses"] @@ -13057,8 +15408,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int64" + "type": "integer" }, "ref": { "type": "string" @@ -13085,21 +15435,24 @@ "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" + "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 + } }, - "value": { - "type": "string", - "maxLength": 24576 - } - }, - "required": ["name", "value"] + "required": ["name", "value"] + } }, "SslEnforcementResponse": { "type": "object", @@ -13228,7 +15581,7 @@ "properties": { "postgres_version": { "type": "string", - "enum": ["15", "17-oriole"] + "enum": ["15", "17", "17-oriole"] }, "release_channel": { "type": "string", @@ -13241,22 +15594,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" } }, - "duration_estimate_hours": { - "type": "number" + "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" @@ -13269,10 +15628,11 @@ "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" ] }, "DatabaseUpgradeStatusResponse": { @@ -13385,28 +15745,20 @@ }, "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", "pooler", "realtime", "rest", "storage"] + }, + "healthy": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"] + }, "info": { "oneOf": [ { @@ -13415,37 +15767,68 @@ "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 }, "CreateSigningKeyBody": { "type": "object", @@ -13457,6 +15840,109 @@ "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"], @@ -13499,91 +15985,19 @@ } } }, - "required": ["keys"], - "additionalProperties": false - }, - "SigningKeyResponse": { - "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 - }, - "UpdateSigningKeyBody": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["in_use", "previously_used", "revoked", "standby"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "StorageFeatureImageTransformation": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "StorageFeatureS3Protocol": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "StorageFeatures": { - "type": "object", - "properties": { - "imageTransformation": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "s3Protocol": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] + "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", @@ -13612,6 +16026,15 @@ } }, "required": ["enabled"] + }, + "icebergCatalog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } }, "required": ["imageTransformation", "s3Protocol"] @@ -13625,7 +16048,7 @@ "fileSizeLimit": { "type": "integer", "minimum": 0, - "maximum": 53687091200, + "maximum": 536870912000, "format": "int64" }, "features": { @@ -13648,6 +16071,15 @@ } }, "required": ["enabled"] + }, + "icebergCatalog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } }, "required": ["imageTransformation", "s3Protocol"] @@ -13717,6 +16149,10 @@ "minimum": 0, "maximum": 262143 }, + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] + }, "shared_buffers": { "type": "string" }, @@ -13734,10 +16170,6 @@ }, "work_mem": { "type": "string" - }, - "session_replication_role": { - "enum": ["origin", "replica", "local"], - "type": "string" } } }, @@ -13804,6 +16236,10 @@ "minimum": 0, "maximum": 262143 }, + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] + }, "shared_buffers": { "type": "string" }, @@ -13824,47 +16260,72 @@ }, "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"] }, + "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", - "deprecated": true, "description": "Use connection_string instead" }, "default_pool_size": { @@ -13876,41 +16337,23 @@ "nullable": true }, "pool_mode": { - "enum": ["transaction", "session"], - "type": "string" - }, - "identifier": { - "type": "string" - }, - "is_using_scram_auth": { - "type": "boolean" - }, - "db_user": { - "type": "string" - }, - "db_host": { - "type": "string" - }, - "db_name": { - "type": "string" - }, - "connection_string": { - "type": "string" + "type": "string", + "enum": ["transaction", "session"] } }, "required": [ - "database_type", - "db_port", - "connectionString", - "default_pool_size", - "max_client_conn", - "pool_mode", "identifier", + "database_type", "is_using_scram_auth", "db_user", "db_host", + "db_port", "db_name", - "connection_string" + "connection_string", + "connectionString", + "default_pool_size", + "max_client_conn", + "pool_mode" ] }, "UpdateSupavisorConfigBody": { @@ -13918,15 +16361,14 @@ "properties": { "default_pool_size": { "type": "integer", - "nullable": true, "minimum": 0, - "maximum": 1000 + "maximum": 3000, + "nullable": true }, "pool_mode": { - "enum": ["transaction", "session"], "type": "string", - "description": "Dedicated pooler mode for the project", - "deprecated": true + "enum": ["transaction", "session"], + "description": "Dedicated pooler mode for the project" } } }, @@ -13954,83 +16396,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 @@ -14303,6 +16668,10 @@ "type": "string", "nullable": true }, + "external_web3_solana_enabled": { + "type": "boolean", + "nullable": true + }, "external_zoom_client_id": { "type": "string", "nullable": true @@ -14375,6 +16744,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 @@ -14383,6 +16768,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 @@ -14435,6 +16827,10 @@ "type": "string", "nullable": true }, + "mfa_max_enrolled_factors": { + "type": "integer", + "nullable": true + }, "mfa_totp_enroll_enabled": { "type": "boolean", "nullable": true @@ -14443,32 +16839,77 @@ "type": "boolean", "nullable": true }, - "mfa_phone_enroll_enabled": { - "type": "boolean", + "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_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 }, - "mfa_phone_verify_enabled": { - "type": "boolean", + "rate_limit_email_sent": { + "type": "integer", "nullable": true }, - "mfa_web_authn_enroll_enabled": { - "type": "boolean", + "rate_limit_sms_sent": { + "type": "integer", "nullable": true }, - "mfa_web_authn_verify_enabled": { - "type": "boolean", + "rate_limit_token_refresh": { + "type": "integer", "nullable": true }, - "mfa_phone_template": { - "type": "string", + "rate_limit_verify": { + "type": "integer", "nullable": true }, - "password_hibp_enabled": { - "type": "boolean", + "rate_limit_otp": { + "type": "integer", "nullable": true }, - "password_required_characters": { - "type": "string", + "rate_limit_web3": { + "type": "integer", "nullable": true }, "refresh_token_rotation_enabled": { @@ -14493,6 +16934,7 @@ }, "security_captcha_provider": { "type": "string", + "enum": ["turnstile", "hcaptcha"], "nullable": true }, "security_captcha_secret": { @@ -14503,10 +16945,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 @@ -14515,6 +16965,10 @@ "type": "string", "nullable": true }, + "sessions_timebox": { + "type": "integer", + "nullable": true + }, "site_url": { "type": "string", "nullable": true @@ -14523,6 +16977,10 @@ "type": "boolean", "nullable": true }, + "sms_max_frequency": { + "type": "integer", + "nullable": true + }, "sms_messagebird_access_key": { "type": "string", "nullable": true @@ -14531,8 +16989,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": { @@ -14545,6 +17011,7 @@ }, "sms_test_otp_valid_until": { "type": "string", + "format": "date-time", "nullable": true }, "sms_textlocal_api_key": { @@ -14597,12 +17064,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 @@ -14627,26 +17099,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", @@ -14715,6 +17167,7 @@ "external_workos_enabled", "external_workos_secret", "external_workos_url", + "external_web3_solana_enabled", "external_zoom_client_id", "external_zoom_enabled", "external_zoom_secret", @@ -14733,8 +17186,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", @@ -14748,15 +17207,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", @@ -14765,13 +17235,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", @@ -14790,6 +17266,7 @@ "sms_vonage_from", "smtp_admin_email", "smtp_host", + "smtp_max_frequency", "smtp_pass", "smtp_port", "smtp_sender_name", @@ -14800,220 +17277,230 @@ "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 - }, "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", @@ -15022,338 +17509,521 @@ "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", + "nullable": true + }, + "hook_send_email_secrets": { + "type": "string", + "nullable": true + }, + "hook_before_user_created_enabled": { + "type": "boolean", + "nullable": true }, - "hook_send_email_uri": { - "type": "string" + "hook_before_user_created_uri": { + "type": "string", + "nullable": true }, - "hook_send_email_secrets": { - "type": "string" + "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_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 } } }, @@ -15366,16 +18036,15 @@ "jwks_url": { "type": "string" }, - "custom_jwks": { - "type": "object" - } + "custom_jwks": {} } }, "ThirdPartyAuth": { "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "format": "uuid" }, "type": { "type": "string" @@ -15389,11 +18058,9 @@ "nullable": true }, "custom_jwks": { - "type": "object", "nullable": true }, "resolved_jwks": { - "type": "object", "nullable": true }, "inserted_at": { @@ -15409,23 +18076,6 @@ }, "required": ["id", "type", "inserted_at", "updated_at"] }, - "ProjectAvailableRestoreVersion": { - "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"] - }, "GetProjectAvailableRestoreVersionsResponse": { "type": "object", "properties": { @@ -15452,12 +18102,7 @@ }, "required": ["available_versions"] }, - "RestoreProjectBodyDto": { - "type": "object", - "properties": {}, - "hideDefinitions": ["release_channel", "postgres_engine"] - }, - "ListProjectAddonsResponseDto": { + "ListProjectAddonsResponse": { "type": "object", "properties": { "selected_addons": { @@ -15494,7 +18139,15 @@ "ci_4xlarge", "ci_8xlarge", "ci_12xlarge", - "ci_16xlarge" + "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" ] }, { @@ -15547,26 +18200,7 @@ "required": ["description", "type", "interval", "amount"] }, "meta": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - } + "description": "Any JSON-serializable value" } }, "required": ["id", "name", "price"] @@ -15614,7 +18248,15 @@ "ci_4xlarge", "ci_8xlarge", "ci_12xlarge", - "ci_16xlarge" + "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" ] }, { @@ -15667,26 +18309,7 @@ "required": ["description", "type", "interval", "amount"] }, "meta": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - } + "description": "Any JSON-serializable value" } }, "required": ["id", "name", "price"] @@ -15699,7 +18322,7 @@ }, "required": ["selected_addons", "available_addons"] }, - "ApplyProjectAddonBodyDto": { + "ApplyProjectAddonBody": { "type": "object", "properties": { "addon_variant": { @@ -15716,7 +18339,15 @@ "ci_4xlarge", "ci_8xlarge", "ci_12xlarge", - "ci_16xlarge" + "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" ] }, { @@ -15748,12 +18379,176 @@ }, "required": ["addon_variant", "addon_type"] }, - "V1AnalyticsResponse": { + "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"] + }, + "AnalyticsResponse": { "type": "object", "properties": { + "result": { + "type": "array", + "items": {} + }, "error": { "oneOf": [ { + "type": "string" + }, + { + "type": "object", "properties": { "code": { "type": "number" @@ -15761,6 +18556,7 @@ "errors": { "type": "array", "items": { + "type": "object", "properties": { "domain": { "type": "string" @@ -15777,7 +18573,8 @@ "reason": { "type": "string" } - } + }, + "required": ["domain", "location", "locationType", "message", "reason"] } }, "message": { @@ -15786,18 +18583,10 @@ "status": { "type": "string" } - } - }, - { - "type": "string" + }, + "required": ["code", "errors", "message", "status"] } ] - }, - "result": { - "type": "array", - "items": { - "type": "object" - } } } }, @@ -15817,17 +18606,46 @@ "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", "minLength": 1 + }, + "read_only": { + "type": "boolean" } }, "required": ["query"] }, - "GetProjectDbMetadataResponseDto": { + "GetProjectDbMetadataResponse": { "type": "object", "properties": { "databases": { @@ -15879,10 +18697,12 @@ "type": "integer" }, "created_at": { - "type": "integer" + "type": "integer", + "format": "int64" }, "updated_at": { - "type": "integer" + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -15895,6 +18715,9 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, "required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] @@ -15919,42 +18742,49 @@ "required": ["slug", "name", "body"] }, "BulkUpdateFunctionBody": { - "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" - }, - "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": ["id", "slug", "name", "status", "version"] + "required": ["id", "slug", "name", "status", "version"] + } }, "BulkUpdateFunctionResponse": { "type": "object", @@ -15981,10 +18811,12 @@ "type": "integer" }, "created_at": { - "type": "integer" + "type": "integer", + "format": "int64" }, "updated_at": { - "type": "integer" + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -15997,6 +18829,9 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, "required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] @@ -16062,10 +18897,12 @@ "type": "integer" }, "created_at": { - "type": "integer" + "type": "integer", + "format": "int64" }, "updated_at": { - "type": "integer" + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -16078,6 +18915,9 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, "required": ["id", "slug", "name", "status", "version"] @@ -16102,10 +18942,12 @@ "type": "integer" }, "created_at": { - "type": "integer" + "type": "integer", + "format": "int64" }, "updated_at": { - "type": "integer" + "type": "integer", + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -16118,10 +18960,17 @@ }, "import_map_path": { "type": "string" + }, + "ezbr_sha256": { + "type": "string" } }, "required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"] }, + "StreamableFile": { + "type": "object", + "properties": {} + }, "V1UpdateFunctionBody": { "type": "object", "properties": { @@ -16160,81 +19009,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": { @@ -16263,22 +19037,6 @@ "additionalProperties": { "type": "object", "properties": { - "default": { - "oneOf": [ - { - "type": "object" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, "name": { "type": "string" }, @@ -16288,45 +19046,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" @@ -16339,15 +19063,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -16358,25 +19073,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", @@ -16407,106 +19104,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": { + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -16519,15 +19130,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -16604,10 +19206,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -16620,15 +19232,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -16704,10 +19307,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -16720,15 +19333,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -16794,10 +19398,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -16810,15 +19424,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -16859,10 +19464,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -16875,15 +19490,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -16955,10 +19561,20 @@ "additionalProperties": { "type": "object", "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, "default": { "oneOf": [ { - "type": "object" + "type": "object", + "properties": {} }, { "type": "number" @@ -16971,15 +19587,6 @@ } ] }, - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, "array": { "type": "boolean" } @@ -17022,35 +19629,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": { @@ -17068,30 +19646,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" } } } @@ -17109,6 +19685,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": { @@ -17130,17 +19739,15 @@ }, "required": ["user_id", "user_name", "role_name", "mfa_enabled"] }, - "BillingPlanId": { - "type": "string", - "enum": ["free", "pro", "team", "enterprise"] - }, - "ReleaseChannel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, "V1OrganizationSlugResponse": { "type": "object", "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, "plan": { "type": "string", "enum": ["free", "pro", "team", "enterprise"] @@ -17149,7 +19756,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": { @@ -17158,15 +19769,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"] } } } diff --git a/apps/studio/components/interfaces/Integrations/Integration/MarkdownContent.tsx b/apps/studio/components/interfaces/Integrations/Integration/MarkdownContent.tsx index cd5e5ec7af69d..24b4bec4d400a 100644 --- a/apps/studio/components/interfaces/Integrations/Integration/MarkdownContent.tsx +++ b/apps/studio/components/interfaces/Integrations/Integration/MarkdownContent.tsx @@ -42,7 +42,7 @@ export const MarkdownContent = ({ integrationId }: { integrationId: string }) => /> )} {supportExpanding && ( -
+
@@ -325,20 +359,11 @@ export const CreateIcebergWrapperSheet = ({ type="primary" form={FORM_ID} htmlType="submit" - disabled={isCreating} - loading={isCreating} + loading={isLoading} > Create wrapper - setCreateSchemaSheetOpen(false)} - onSuccess={(schema) => { - setFieldValue('target_schema', schema) - setCreateSchemaSheetOpen(false) - }} - /> ) }} diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx index d737aa6733bd4..73b2ce54d26c7 100644 --- a/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx +++ b/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx @@ -4,19 +4,18 @@ import { Edit, Trash } from 'lucide-react' import { useState } from 'react' import { toast } from 'sonner' -import SchemaEditor from 'components/interfaces/TableGridEditor/SidePanelEditor/SchemaEditor' import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext' import { FormSection, FormSectionContent, FormSectionLabel } from 'components/ui/Forms/FormSection' -import SchemaSelector from 'components/ui/SchemaSelector' import { useDatabaseExtensionsQuery } from 'data/database-extensions/database-extensions-query' +import { useSchemaCreateMutation } from 'data/database/schema-create-mutation' import { invalidateSchemasQuery, useSchemasQuery } from 'data/database/schemas-query' import { useFDWCreateMutation } from 'data/fdw/fdw-create-mutation' import { useSendEventMutation } from 'data/telemetry/send-event-mutation' +import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization' import { Button, Form, Input, - Label_Shadcn_, RadioGroupStacked, RadioGroupStackedItem, Separator, @@ -30,7 +29,6 @@ import InputField from './InputField' import { WrapperMeta } from './Wrappers.types' import { makeValidateRequired } from './Wrappers.utils' import WrapperTableEditor from './WrapperTableEditor' -import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization' export interface CreateWrapperSheetProps { isClosing: boolean @@ -48,6 +46,7 @@ export const CreateWrapperSheet = ({ onClose, }: CreateWrapperSheetProps) => { const queryClient = useQueryClient() + const { project } = useProjectContext() const org = useSelectedOrganization() const { mutate: sendEvent } = useSendEventMutation() @@ -73,7 +72,7 @@ export const CreateWrapperSheet = ({ const [formErrors, setFormErrors] = useState<{ [k: string]: string }>({}) - const { mutate: createFDW, isLoading: isCreating } = useFDWCreateMutation({ + const { mutateAsync: createFDW, isLoading: isCreatingWrapper } = useFDWCreateMutation({ onSuccess: () => { toast.success(`Successfully created ${wrapperMeta?.label} foreign data wrapper`) setNewTables([]) @@ -85,8 +84,10 @@ export const CreateWrapperSheet = ({ }, }) - // prefetch schemas to make sure the schema selector is populated - useSchemasQuery({ projectRef: project?.ref, connectionString: project?.connectionString }) + const { data: schemas } = useSchemasQuery({ + projectRef: project?.ref!, + connectionString: project?.connectionString, + }) const initialValues = { wrapper_name: '', @@ -98,6 +99,8 @@ export const CreateWrapperSheet = ({ ), } + const { mutateAsync: createSchema, isLoading: isCreatingSchema } = useSchemaCreateMutation() + const onUpdateTable = (values: any) => { setNewTables((prev) => { // if the new values have tableIndex, we are editing an existing table @@ -121,37 +124,70 @@ export const CreateWrapperSheet = ({ if (values.wrapper_name.length === 0) { errors.wrapper_name = 'Please provide a name for your wrapper' } - if (selectedMode === 'tables' && newTables.length === 0) { - errors.tables = 'Please add at least one table' + + if (selectedMode === 'tables') { + if (newTables.length === 0) { + errors.tables = 'Please provide at least one table' + } } - if (selectedMode === 'schema' && values.source_schema.length === 0) { - errors.source_schema = 'Please provide a source schema' + if (selectedMode === 'schema') { + if (values.source_schema.length === 0) { + errors.source_schema = 'Please provide a source schema' + } + if (values.target_schema.length === 0) { + errors.target_schema = 'Please provide an unique target schema' + } + const foundSchema = schemas?.find((s) => s.name === values.target_schema) + if (foundSchema) { + errors.target_schema = 'This schema already exists. Please specify a unique schema name.' + } } - if (!isEmpty(errors)) return setFormErrors(errors) - createFDW({ - projectRef: project?.ref, - connectionString: project?.connectionString, - wrapperMeta, - formState: { ...values, server_name: `${values.wrapper_name}_server` }, - mode: selectedMode, - tables: newTables, - sourceSchema: values.source_schema, - targetSchema: values.target_schema, - }) + setFormErrors(errors) + if (!isEmpty(errors)) { + return + } - sendEvent({ - action: 'foreign_data_wrapper_created', - properties: { - wrapperType: wrapperMeta.label, - }, - groups: { - project: project?.ref ?? 'Unknown', - organization: org?.slug ?? 'Unknown', - }, - }) + try { + await createSchema({ + projectRef: project?.ref, + connectionString: project?.connectionString, + name: values.target_schema, + }) + + await createFDW({ + projectRef: project?.ref, + connectionString: project?.connectionString, + wrapperMeta, + formState: { + ...values, + server_name: `${values.wrapper_name}_server`, + supabase_target_schema: selectedMode === 'schema' ? values.target_schema : undefined, + }, + mode: selectedMode, + tables: newTables, + sourceSchema: values.source_schema, + targetSchema: values.target_schema, + }) + + sendEvent({ + action: 'foreign_data_wrapper_created', + properties: { + wrapperType: wrapperMeta.label, + }, + groups: { + project: project?.ref ?? 'Unknown', + organization: org?.slug ?? 'Unknown', + }, + }) + } catch (error) { + console.error(error) + // The error will be handled by the mutation onError callback (toast.error) + } } + const isLoading = isCreatingWrapper || isCreatingSchema + return ( <>
@@ -161,7 +197,7 @@ export const CreateWrapperSheet = ({ onSubmit={onSubmit} className="flex-grow flex flex-col h-full" > - {({ handleReset, values, initialValues, setFieldValue }: any) => { + {({ values, initialValues, setFieldValue }: any) => { const hasChanges = JSON.stringify(values) !== JSON.stringify(initialValues) const onClosePanel = () => { @@ -236,7 +272,7 @@ export const CreateWrapperSheet = ({

- Define tables where the wrapper data will be shown. + Create foreign tables to query data from {wrapperMeta.label}.

@@ -261,7 +297,8 @@ export const CreateWrapperSheet = ({

- Specify schema in which the wrapper will create tables. + Create all foreign tables from {wrapperMeta.label} in a specified + schema.

@@ -366,38 +403,44 @@ export const CreateWrapperSheet = ({

Foreign Schema

- All wrapper tables will be created in the specified target schema. + You can query your data from the foreign tables in the specified schema + after the wrapper is created.

} > - {wrapperMeta.sourceSchemaOption && ( -
- -

- {wrapperMeta.sourceSchemaOption.description} -

-
- )} + {wrapperMeta.sourceSchemaOption && + !wrapperMeta.sourceSchemaOption?.readOnly && ( + // Hide the field if the source schema is read-only +
+ +

+ {wrapperMeta.sourceSchemaOption.description} +

+
+ )}
- - Target Schema - - setFieldValue('target_schema', schema)} - onSelectCreateSchema={() => setCreateSchemaSheetOpen(true)} +

- Be careful not to use an API exposed schema. + A new schema will be created. For security purposes, the wrapper tables + from the foreign schema cannot be created within an existing schema

@@ -411,7 +454,7 @@ export const CreateWrapperSheet = ({ type="default" htmlType="button" onClick={onClosePanel} - disabled={isCreating} + disabled={isLoading} > Cancel @@ -420,20 +463,11 @@ export const CreateWrapperSheet = ({ type="primary" form={FORM_ID} htmlType="submit" - disabled={isCreating} - loading={isCreating} + loading={isLoading} > Create wrapper - setCreateSchemaSheetOpen(false)} - onSuccess={(schema) => { - setFieldValue('target_schema', schema) - setCreateSchemaSheetOpen(false) - }} - /> ) }} diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/WrapperRow.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/WrapperRow.tsx index fb9763e670174..e7c9c155fbe0e 100644 --- a/apps/studio/components/interfaces/Integrations/Wrappers/WrapperRow.tsx +++ b/apps/studio/components/interfaces/Integrations/Wrappers/WrapperRow.tsx @@ -107,37 +107,39 @@ const WrapperRow = ({ wrapper }: WrapperRowProps) => {
))} - - } - className="px-1.5" - onClick={() => setEditWrapperShown(true)} - tooltip={{ - content: { - side: 'bottom', - text: !canManageWrappers - ? 'You need additional permissions to edit wrappers' - : 'Edit wrapper', - }, - }} - /> - } - className="px-1.5" - onClick={() => setDeleteWrapperShown(true)} - tooltip={{ - content: { - side: 'bottom', - text: !canManageWrappers - ? 'You need additional permissions to delete wrappers' - : 'Delete wrapper', - }, - }} - /> + +
+ } + className="px-1.5" + onClick={() => setEditWrapperShown(true)} + tooltip={{ + content: { + side: 'bottom', + text: !canManageWrappers + ? 'You need additional permissions to edit wrappers' + : 'Edit wrapper', + }, + }} + /> + } + className="px-1.5" + onClick={() => setDeleteWrapperShown(true)} + tooltip={{ + content: { + side: 'bottom', + text: !canManageWrappers + ? 'You need additional permissions to delete wrappers' + : 'Delete wrapper', + }, + }} + /> +
setIsClosingEditWrapper(true)}> diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts b/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts index 4055a4423c333..dad85cda513ac 100644 --- a/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts +++ b/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts @@ -1,6 +1,6 @@ import { BASE_PATH } from 'lib/constants' import { CreateIcebergWrapperSheet } from './CreateIcebergWrapperSheet' -import type { WrapperMeta } from './Wrappers.types' +import type { ServerOption, WrapperMeta } from './Wrappers.types' export const WRAPPER_HANDLERS = { STRIPE: 'stripe_fdw_handler', @@ -27,6 +27,16 @@ export const WRAPPER_HANDLERS = { ORB: 'wasm_fdw_handler', } +const SUPABASE_TARGET_SCHEMA_OPTION: ServerOption = { + name: 'supabase_target_schema', + label: 'Target Schema', + required: false, + encrypted: false, + secureEntry: false, + readOnly: true, + hidden: true, +} + export const WRAPPERS: WrapperMeta[] = [ { name: 'stripe_wrapper', @@ -55,6 +65,7 @@ export const WRAPPERS: WrapperMeta[] = [ encrypted: false, secureEntry: false, }, + SUPABASE_TARGET_SCHEMA_OPTION, ], }, tables: [ @@ -1775,6 +1786,7 @@ export const WRAPPERS: WrapperMeta[] = [ encrypted: false, secureEntry: false, }, + SUPABASE_TARGET_SCHEMA_OPTION, ], }, canTargetSchema: true, @@ -2224,12 +2236,13 @@ export const WRAPPERS: WrapperMeta[] = [ encrypted: false, secureEntry: false, }, + SUPABASE_TARGET_SCHEMA_OPTION, ], }, canTargetSchema: true, sourceSchemaOption: { name: 'source_schema', - label: 'Source Schema', + label: 'Namespace', description: 'It should match the namespace of the Iceberg catalog.', required: true, encrypted: false, diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.utils.ts b/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.utils.ts index 63786de027c37..cddc265b16594 100644 --- a/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.utils.ts +++ b/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.utils.ts @@ -12,7 +12,7 @@ export const makeValidateRequired = (options: { name: string; required: boolean ) const requiredArrayOptions = Array.from(requiredArrayOptionsSet) - return (values: any) => { + return (values: Record) => { const errors = Object.fromEntries( Object.entries(values) .flatMap(([key, value]) => diff --git a/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/DecryptedReadOnlyInput.tsx b/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/DecryptedReadOnlyInput.tsx index e22c8a8e6940c..fff4f06387f46 100644 --- a/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/DecryptedReadOnlyInput.tsx +++ b/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/DecryptedReadOnlyInput.tsx @@ -1,8 +1,10 @@ +import { ExternalLink, Eye, EyeOff, Loader } from 'lucide-react' +import { useState } from 'react' + +import { useParams } from 'common' import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext' import { useVaultSecretDecryptedValueQuery } from 'data/vault/vault-secret-decrypted-value-query' -import { Eye, EyeOff, Loader } from 'lucide-react' -import { useState } from 'react' -import { Button, Input } from 'ui' +import { Button, Input, Tooltip, TooltipContent, TooltipTrigger } from 'ui' export const DecryptedReadOnlyInput = ({ value, @@ -15,10 +17,11 @@ export const DecryptedReadOnlyInput = ({ descriptionText: string label: string }) => { - const [showHidden, setShowHidden] = useState(false) + const { ref } = useParams() const { project } = useProjectContext() + const [showHidden, setShowHidden] = useState(false) - const { isLoading: isDecryptedValueLoading, data: decryptedValue } = + const { data: decryptedValue, isLoading: isDecryptedValueLoading } = useVaultSecretDecryptedValueQuery( { projectRef: project?.ref, @@ -29,22 +32,40 @@ export const DecryptedReadOnlyInput = ({ ) const isLoading = isDecryptedValueLoading && showHidden + const renderedValue = secureEntry + ? isLoading + ? 'Fetching value from Vault...' + : showHidden + ? decryptedValue + : value + : value return ( + {label} + + + + + + + View parameter in Vault + +
} + value={renderedValue} type={secureEntry ? (isLoading ? 'text' : showHidden ? 'text' : 'password') : 'text'} descriptionText={descriptionText} layout="horizontal" diff --git a/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/NamespaceRow.tsx b/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/NamespaceRow.tsx index 80d75a33da411..1c716007a56d1 100644 --- a/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/NamespaceRow.tsx +++ b/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/NamespaceRow.tsx @@ -1,6 +1,7 @@ import { RefreshCw, SquareArrowOutUpRight } from 'lucide-react' import { useMemo, useState } from 'react' +import type { WrapperMeta } from 'components/interfaces/Integrations/Wrappers/Wrappers.types' import { FormattedWrapperTable } from 'components/interfaces/Integrations/Wrappers/Wrappers.utils' import { ImportForeignSchemaDialog } from 'components/interfaces/Storage/ImportForeignSchemaDialog' import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext' @@ -9,34 +10,32 @@ import { useFDWImportForeignSchemaMutation } from 'data/fdw/fdw-import-foreign-s import { FDW } from 'data/fdw/fdws-query' import { useIcebergNamespaceTablesQuery } from 'data/storage/iceberg-namespace-tables-query' import { BASE_PATH } from 'lib/constants' -import { Badge, Button, TableCell, TableRow } from 'ui' +import { Button, cn, TableCell, TableRow } from 'ui' type NamespaceRowProps = { bucketName: string namespace: string schema: string - excludedSchemas: string[] tables: (FormattedWrapperTable & { id: number })[] token: string wrapperInstance: FDW wrapperValues: Record + wrapperMeta: WrapperMeta } export const NamespaceRow = ({ bucketName, namespace, schema, - excludedSchemas, tables, token, wrapperInstance, wrapperValues, + wrapperMeta, }: NamespaceRowProps) => { const { project } = useProjectContext() const [importForeignSchemaShown, setImportForeignSchemaShown] = useState(false) - const targetSchema = tables[0]?.schema_name ?? '' - const { data: tablesData, isLoading: isLoadingNamespaceTables } = useIcebergNamespaceTablesQuery( { catalogUri: wrapperValues.catalog_uri, @@ -56,7 +55,7 @@ export const NamespaceRow = ({ connectionString: project?.connectionString, serverName: wrapperInstance.server_name, sourceSchema: namespace, - targetSchema: targetSchema, + targetSchema: schema, }) } @@ -76,11 +75,11 @@ export const NamespaceRow = ({ return ( - - {namespace} + {namespace} + + {schema ?? 'No schema'} - {schema && {schema}} - + {tablesData ? `${tables.length}/${tablesData.length} connected tables` : ``} @@ -96,15 +95,15 @@ export const NamespaceRow = ({ Sync {schema ? ( - - - + ) : ( - Table Editor + Open in Table Editor )}
@@ -122,8 +121,7 @@ export const NamespaceRow = ({ setImportForeignSchemaShown(false)} /> diff --git a/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/index.tsx b/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/index.tsx index 49aead6e1f072..25945e40d7790 100644 --- a/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/index.tsx +++ b/apps/studio/components/interfaces/Storage/AnalyticBucketDetails/index.tsx @@ -127,7 +127,6 @@ export const AnalyticBucketDetails = ({ bucket }: { bucket: Bucket }) => { } }) }, [wrapperTables, namespacesData]) - const excludedSchemas = uniq(namespaces.map((n) => n.schema)) const wrappersExtension = extensionsData?.find((ext) => ext.name === 'wrappers') @@ -196,10 +195,10 @@ export const AnalyticBucketDetails = ({ bucket }: { bucket: Bucket }) => { - Namespace - Schema - Tables - Actions + Namespace + Schema + Tables + @@ -209,11 +208,11 @@ export const AnalyticBucketDetails = ({ bucket }: { bucket: Bucket }) => { bucketName={bucket.name} namespace={namespace} schema={schema} - excludedSchemas={excludedSchemas} tables={tables as any} token={token!} wrapperInstance={wrapperInstance} wrapperValues={wrapperValues} + wrapperMeta={wrapperMeta} /> ))} diff --git a/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx b/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx index 1523c488ee8c7..759110124622e 100644 --- a/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx +++ b/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx @@ -11,10 +11,7 @@ import z from 'zod' import { useParams } from 'common' import { useIcebergWrapperExtension } from 'components/interfaces/Storage/AnalyticBucketDetails/useIcebergWrapper' import { StorageSizeUnits } from 'components/interfaces/Storage/StorageSettings/StorageSettings.constants' -import { - convertFromBytes, - convertToBytes, -} from 'components/interfaces/Storage/StorageSettings/StorageSettings.utils' +import { InlineLink } from 'components/ui/InlineLink' import { useProjectStorageConfigQuery } from 'data/config/project-storage-config-query' import { useBucketCreateMutation } from 'data/storage/bucket-create-mutation' import { useIcebergWrapperCreateMutation } from 'data/storage/iceberg-wrapper-create-mutation' @@ -42,6 +39,7 @@ import { } from 'ui' import { Admonition } from 'ui-patterns/admonition' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' +import { convertFromBytes, convertToBytes } from './StorageSettings/StorageSettings.utils' export interface CreateBucketModalProps { visible: boolean @@ -80,7 +78,10 @@ const CreateBucketModal = ({ visible, onClose }: CreateBucketModalProps) => { const { mutate: sendEvent } = useSendEventMutation() const router = useRouter() - const { mutateAsync: createBucket, isLoading: isCreating } = useBucketCreateMutation() + const { mutateAsync: createBucket, isLoading: isCreating } = useBucketCreateMutation({ + // [Joshen] Silencing the error here as it's being handled in onSubmit + onError: () => {}, + }) const { mutateAsync: createIcebergWrapper, isLoading: isCreatingIcebergWrapper } = useIcebergWrapperCreateMutation() @@ -150,9 +151,8 @@ const CreateBucketModal = ({ visible, onClose }: CreateBucketModalProps) => { toast.success(`Successfully created bucket ${values.name}`) router.push(`/project/${ref}/storage/buckets/${values.name}`) onClose() - } catch (error) { - console.error(error) - toast.error('Failed to create bucket') + } catch (error: any) { + toast.error(`Failed to create bucket: ${error.message}`) } } @@ -235,20 +235,16 @@ const CreateBucketModal = ({ visible, onClose }: CreateBucketModalProps) => {

- {icebergCatalogEnabled ? null : ( + {!icebergCatalogEnabled && (
- - This feature is currently in alpha and not yet enabled for your - project. Sign up{' '} - + + This is currently in alpha and not enabled for your project. Sign + up{' '} + here - + + .
)} diff --git a/apps/studio/components/interfaces/Storage/ImportForeignSchemaDialog.tsx b/apps/studio/components/interfaces/Storage/ImportForeignSchemaDialog.tsx index a173dbcfa52de..c54d1e3bd45d6 100644 --- a/apps/studio/components/interfaces/Storage/ImportForeignSchemaDialog.tsx +++ b/apps/studio/components/interfaces/Storage/ImportForeignSchemaDialog.tsx @@ -1,5 +1,5 @@ import { zodResolver } from '@hookform/resolvers/zod' -import { snakeCase } from 'lodash' +import { snakeCase, uniq } from 'lodash' import { useEffect, useState } from 'react' import { SubmitHandler, useForm } from 'react-hook-form' import { toast } from 'sonner' @@ -7,41 +7,30 @@ import z from 'zod' import { useParams } from 'common' import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext' -import SchemaSelector from 'components/ui/SchemaSelector' +import { useSchemaCreateMutation } from 'data/database/schema-create-mutation' +import { useSchemasQuery } from 'data/database/schemas-query' import { useFDWImportForeignSchemaMutation } from 'data/fdw/fdw-import-foreign-schema-mutation' -import { - Button, - Form_Shadcn_, - FormControl_Shadcn_, - FormField_Shadcn_, - Input_Shadcn_, - Modal, -} from 'ui' +import { useFDWUpdateMutation } from 'data/fdw/fdw-update-mutation' +import { getFDWs } from 'data/fdw/fdws-query' +import { Button, Form_Shadcn_, FormField_Shadcn_, Input_Shadcn_, Modal } from 'ui' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' +import type { WrapperMeta } from '../Integrations/Wrappers/Wrappers.types' +import { formatWrapperTables } from '../Integrations/Wrappers/Wrappers.utils' import SchemaEditor from '../TableGridEditor/SidePanelEditor/SchemaEditor' +import { getDecryptedParameters } from './ImportForeignSchemaDialog.utils' export interface ImportForeignSchemaDialogProps { bucketName: string namespace: string - excludedSchemas: string[] - wrapperValues: Record + wrapperMeta: WrapperMeta visible: boolean onClose: () => void } -const FormSchema = z.object({ - bucketName: z.string().trim(), - sourceNamespace: z.string().trim(), - targetSchema: z.string().trim(), -}) - -export type ImportForeignSchemaForm = z.infer - export const ImportForeignSchemaDialog = ({ bucketName, namespace, - excludedSchemas, - wrapperValues, + wrapperMeta, visible, onClose, }: ImportForeignSchemaDialogProps) => { @@ -50,14 +39,34 @@ export const ImportForeignSchemaDialog = ({ const [loading, setLoading] = useState(false) const [createSchemaSheetOpen, setCreateSchemaSheetOpen] = useState(false) - const { mutateAsync: importForeignSchema } = useFDWImportForeignSchemaMutation({ + const { mutateAsync: importForeignSchema } = useFDWImportForeignSchemaMutation({}) + const { mutateAsync: updateFDW } = useFDWUpdateMutation({ onSuccess: () => { toast.success(`Successfully connected ${bucketName} to the database.`) onClose() }, }) - const form = useForm({ + const { data: schemas } = useSchemasQuery({ projectRef: project?.ref! }) + + const FormSchema = z.object({ + bucketName: z.string().trim(), + sourceNamespace: z.string().trim(), + targetSchema: z + .string() + .trim() + .min(1, 'Schema name is required') + .refine( + (val) => { + return !schemas?.find((s) => s.name === val) + }, + { + message: 'This schema already exists. Please specify a unique schema name.', + } + ), + }) + + const form = useForm>({ resolver: zodResolver(FormSchema), defaultValues: { bucketName, @@ -66,18 +75,67 @@ export const ImportForeignSchemaDialog = ({ }, }) - const onSubmit: SubmitHandler = async (values) => { + const { mutateAsync: createSchema } = useSchemaCreateMutation() + + const onSubmit: SubmitHandler> = async (values) => { + const serverName = `${snakeCase(values.bucketName)}_fdw_server` + if (!ref) return console.error('Project ref is required') setLoading(true) try { + await createSchema({ + projectRef: ref, + connectionString: project?.connectionString, + name: values.targetSchema, + }) + await importForeignSchema({ projectRef: ref, connectionString: project?.connectionString, - serverName: `${snakeCase(values.bucketName)}_fdw_server`, + serverName: serverName, sourceSchema: values.sourceNamespace, targetSchema: values.targetSchema, }) + + const FDWs = await getFDWs({ projectRef: ref, connectionString: project?.connectionString }) + const wrapper = FDWs.find((fdw) => fdw.server_name === serverName) + if (!wrapper) { + throw new Error(`Foreign data wrapper with server name ${serverName} not found`) + } + + const serverOptions = await getDecryptedParameters({ + ref: project?.ref, + connectionString: project?.connectionString ?? undefined, + serverName, + }) + + const formValues: Record = { + wrapper_name: wrapper.name, + server_name: wrapper.server_name, + ...serverOptions, + } + + const targetSchemas = (formValues['supabase_target_schema'] || '') + .split(',') + .map((s) => s.trim()) + + const wrapperTables = formatWrapperTables(wrapper, wrapperMeta) + + await updateFDW({ + projectRef: project?.ref, + connectionString: project?.connectionString, + wrapper: wrapper, + wrapperMeta: wrapperMeta, + formState: { + ...formValues, + server_name: serverName, + supabase_target_schema: uniq([...targetSchemas, values.targetSchema]) + .filter(Boolean) + .join(','), + }, + tables: wrapperTables, + }) } catch (error: any) { // error will be handled by the mutation onError callback } finally { @@ -110,35 +168,16 @@ export const ImportForeignSchemaDialog = ({
- ( - - - - - - )} - /> - ( - field.onChange(schema)} - onSelectCreateSchema={() => setCreateSchemaSheetOpen(true)} - /> + )} /> diff --git a/apps/studio/components/interfaces/Storage/ImportForeignSchemaDialog.utils.ts b/apps/studio/components/interfaces/Storage/ImportForeignSchemaDialog.utils.ts new file mode 100644 index 0000000000000..923e41ae733dc --- /dev/null +++ b/apps/studio/components/interfaces/Storage/ImportForeignSchemaDialog.utils.ts @@ -0,0 +1,51 @@ +import { getFDWs } from 'data/fdw/fdws-query' +import { getDecryptedValues } from 'data/vault/vault-secret-decrypted-value-query' +import { INTEGRATIONS } from '../Integrations/Landing/Integrations.constants' +import { WrapperMeta } from '../Integrations/Wrappers/Wrappers.types' +import { convertKVStringArrayToJson } from '../Integrations/Wrappers/Wrappers.utils' + +export const getDecryptedParameters = async ({ + ref, + connectionString, + serverName, +}: { + ref?: string + connectionString?: string + serverName: string +}) => { + const integration = INTEGRATIONS.find((i) => i.id === 'iceberg_wrapper' && i.type === 'wrapper') + const wrapperMeta = (integration?.type === 'wrapper' && integration.meta) as WrapperMeta + const wrapperServerOptions = wrapperMeta.server.options + + const FDWs = await getFDWs({ projectRef: ref, connectionString: connectionString }) + const wrapper = FDWs.find((fdw) => fdw.server_name === serverName) + const serverOptions = convertKVStringArrayToJson(wrapper?.server_options ?? []) + + const paramsToBeDecrypted = Object.fromEntries( + new Map( + Object.entries(serverOptions).filter(([key, value]) => { + return wrapperServerOptions.find((option) => option.name === key)?.encrypted + }) + ) + ) + + const decryptedValues = await getDecryptedValues({ + projectRef: ref, + connectionString: connectionString, + ids: Object.values(paramsToBeDecrypted), + }) + + const paramsWithDecryptedValues = Object.fromEntries( + new Map( + Object.entries(paramsToBeDecrypted).map(([name, id]) => { + const decryptedValue = decryptedValues[id] + return [name, decryptedValue] + }) + ) + ) + + return { + ...serverOptions, + ...paramsWithDecryptedValues, + } +} diff --git a/apps/studio/data/storage/iceberg-namespace-create-mutation.ts b/apps/studio/data/storage/iceberg-namespace-create-mutation.ts index 58f93dd4bd4ab..a2f68b752db46 100644 --- a/apps/studio/data/storage/iceberg-namespace-create-mutation.ts +++ b/apps/studio/data/storage/iceberg-namespace-create-mutation.ts @@ -18,10 +18,20 @@ async function createIcebergNamespace({ token, namespace, }: CreateIcebergNamespaceVariables) { - const headers = await constructHeaders({ - 'Content-Type': 'application/json', - Authorization: `Bearer ${token}`, - }) + let headers = new Headers() + // handle both secret key and service role key + if (token.startsWith('sb_secret_')) { + headers = await constructHeaders({ + 'Content-Type': 'application/json', + apikey: `${token}`, + }) + headers.delete('Authorization') + } else { + headers = await constructHeaders({ + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }) + } const url = `${catalogUri}/v1/${warehouse}/namespaces`.replaceAll(/(? { const { project } = useProjectContext() - const { data: apiKeys } = useAPIKeysQuery({ projectRef: project?.ref }) - const { serviceKey } = getKeys(apiKeys) + const { data: apiKeys } = useAPIKeysQuery({ projectRef: project?.ref, reveal: true }) + const { secretKey, serviceKey } = getKeys(apiKeys) const { data: settings } = useProjectSettingsV2Query({ projectRef: project?.ref }) const protocol = settings?.app_config?.protocol ?? 'https' const endpoint = settings?.app_config?.endpoint - const serviceApiKey = serviceKey?.api_key ?? 'SUPABASE_CLIENT_SERVICE_KEY' + const apiKey = secretKey?.api_key ?? serviceKey?.api_key ?? 'SUPABASE_CLIENT_API_KEY' const wrapperMeta = WRAPPERS.find((wrapper) => wrapper.name === 'iceberg_wrapper') - const isProjectActive = useIsProjectActive() - const canCreateCredentials = useCheckPermissions(PermissionAction.STORAGE_ADMIN_WRITE, '*') const { data: config } = useProjectStorageConfigQuery({ projectRef: project?.ref }) - const isS3ConnectionEnabled = config?.features.s3Protocol.enabled - const disableCreation = !isProjectActive || !canCreateCredentials || !isS3ConnectionEnabled const { mutateAsync: createS3AccessKey, isLoading: isCreatingS3AccessKey } = useS3AccessKeyCreateMutation() @@ -61,7 +54,7 @@ export const useIcebergWrapperCreateMutation = () => { server_name: `${wrapperName}_server`, vault_aws_access_key_id: createS3KeyData?.access_key, vault_aws_secret_access_key: createS3KeyData?.secret_key, - vault_token: serviceApiKey, + vault_token: apiKey, warehouse: bucketName, 's3.endpoint': getConnectionURL(project?.ref ?? '', protocol, endpoint), catalog_uri: getCatalogURI(project?.ref ?? '', protocol, endpoint), diff --git a/apps/studio/data/vault/vault-secret-decrypted-value-query.ts b/apps/studio/data/vault/vault-secret-decrypted-value-query.ts index 7b1235c206def..f64d00145cf78 100644 --- a/apps/studio/data/vault/vault-secret-decrypted-value-query.ts +++ b/apps/studio/data/vault/vault-secret-decrypted-value-query.ts @@ -3,7 +3,7 @@ import { UseQueryOptions, useQuery } from '@tanstack/react-query' import { executeSql } from '../sql/execute-sql-query' import { vaultSecretsKeys } from './keys' -export const vaultSecretDecryptedValueQuery = (id: string) => { +const vaultSecretDecryptedValueQuery = (id: string) => { const sql = new Query() .from('decrypted_secrets', 'vault') .select('decrypted_secret') @@ -13,6 +13,16 @@ export const vaultSecretDecryptedValueQuery = (id: string) => { return sql } +const vaultSecretDecryptedValuesQuery = (ids: string[]) => { + const sql = new Query() + .from('decrypted_secrets', 'vault') + .select('id,decrypted_secret') + .filter('id', 'in', ids) + .toSql() + + return sql +} + export type VaultSecretsDecryptedValueVariables = { projectRef?: string connectionString?: string | null @@ -58,3 +68,25 @@ export const useVaultSecretDecryptedValueQuery = ( ...options, } ) + +// [Joshen] Considering to consolidate fetching single and multiple decrypted values by just passing in a string array +// This is currently used in ImportForeignSchemaDialog, but reckon EditWrapperSheet can use this too to replace the useEffect on L153 +// which fetches all the decrypted secrets +export const getDecryptedValues = async ( + { + projectRef, + connectionString, + ids, + }: { + projectRef?: string + connectionString?: string | null + ids: string[] + }, + signal?: AbortSignal +) => { + const sql = vaultSecretDecryptedValuesQuery(ids) + const { result } = await executeSql({ projectRef, connectionString, sql }, signal) + return result.reduce((a: any, b: any) => { + return { ...a, [b.id]: b.decrypted_secret } + }, {}) +} diff --git a/apps/studio/package.json b/apps/studio/package.json index c2545b712f2e3..8ee4acc6c772f 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -65,7 +65,6 @@ "@tanstack/react-query-devtools": "4.35.7", "@tanstack/react-table": "^8.21.3", "@uidotdev/usehooks": "^2.4.1", - "@vercel/flags": "^2.6.0", "@vercel/functions": "^2.1.0", "@vitejs/plugin-react": "^4.3.4", "@zip.js/zip.js": "^2.7.29", diff --git a/apps/ui-library/app/(app)/docs/[[...slug]]/page.tsx b/apps/ui-library/app/(app)/docs/[[...slug]]/page.tsx index 73d81df5cbf6b..9bc362e67a4d9 100644 --- a/apps/ui-library/app/(app)/docs/[[...slug]]/page.tsx +++ b/apps/ui-library/app/(app)/docs/[[...slug]]/page.tsx @@ -1,8 +1,8 @@ +import { metadata as mainMetadata } from '@/app/layout' import { FrameworkSelector } from '@/components/framework-selector' import { Mdx } from '@/components/mdx-components' import { SourcePanel } from '@/components/source-panel' import { DashboardTableOfContents } from '@/components/toc' -import { siteConfig } from '@/config/site' import { getTableOfContents } from '@/lib/toc' import { absoluteUrl, cn } from '@/lib/utils' import '@/styles/code-block-variables.css' @@ -12,7 +12,7 @@ import { ChevronRight } from 'lucide-react' import type { Metadata } from 'next' import { notFound } from 'next/navigation' import Balancer from 'react-wrap-balancer' -import { ScrollArea, Separator } from 'ui' +import { ScrollArea } from 'ui' interface DocPageProps { params: Promise<{ @@ -39,31 +39,19 @@ export async function generateMetadata(props: DocPageProps): Promise { return {} } - return { + const metadata: Metadata = { + ...mainMetadata, title: doc.title, description: doc.description, openGraph: { + ...mainMetadata.openGraph, title: doc.title, description: doc.description, type: 'article', url: absoluteUrl(doc.slug), - images: [ - { - url: siteConfig.ogImage, - width: 1200, - height: 630, - alt: siteConfig.name, - }, - ], - }, - twitter: { - card: 'summary_large_image', - title: doc.title, - description: doc.description, - images: [siteConfig.ogImage], - creator: '@shadcn', }, } + return metadata } export async function generateStaticParams(): Promise<{ slug: string[] }[]> { diff --git a/apps/ui-library/components/site-footer.tsx b/apps/ui-library/components/site-footer.tsx index a51481a3e378f..739de9f1abcda 100644 --- a/apps/ui-library/components/site-footer.tsx +++ b/apps/ui-library/components/site-footer.tsx @@ -1,5 +1,3 @@ -import { siteConfig } from '@/config/site' - export function SiteFooter() { return (