diff --git a/apps/docs/spec/api_v1_openapi.json b/apps/docs/spec/api_v1_openapi.json index 5ecb7b3a1a1d8..0872d2b5f1542 100644 --- a/apps/docs/spec/api_v1_openapi.json +++ b/apps/docs/spec/api_v1_openapi.json @@ -1651,6 +1651,128 @@ "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", + "parameters": [ + { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CreateSigningKeyBody" } + } + } + }, + "responses": { + "201": { + "description": "[Alpha] Create a new signing key for the project in standby status", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CreateSigningKeyBody" } + } + } + }, + "403": { "description": "" } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + }, + "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": { "$ref": "#/components/schemas/SigningKeysResponse" } + } + } + }, + "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", + "parameters": [ + { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, + { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/SigningKeyResponse" } + } + } + } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + }, + "delete": { + "operationId": "deleteSigningKey", + "summary": "[Alpha] Remove a signing key from a project, where the status is previously_used", + "parameters": [ + { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, + { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/SigningKeyResponse" } + } + } + }, + "403": { "description": "" } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + }, + "patch": { + "operationId": "patchSigningKey", + "summary": "[Alpha] 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" } } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UpdateSigningKeyBody" } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/SigningKeyResponse" } + } + } + }, + "403": { "description": "" } + }, + "tags": ["Auth"], + "security": [{ "bearer": [] }] + } + }, "/v1/projects/{ref}/config/storage": { "get": { "operationId": "v1-get-storage-config", @@ -2061,6 +2183,95 @@ "security": [{ "bearer": [] }] } }, + "/v1/projects/{ref}/restore": { + "get": { + "operationId": "v1-list-available-restore-versions", + "summary": "Lists available restore versions for the given project", + "parameters": [ + { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetProjectAvailableRestoreVersionsResponse" + } + } + } + }, + "403": { "description": "" } + }, + "tags": ["Projects"], + "security": [{ "bearer": [] }] + }, + "post": { + "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" } + } + } + }, + "responses": { "200": { "description": "" }, "403": { "description": "" } }, + "tags": ["Projects"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/restore/cancel": { + "post": { + "operationId": "v1-cancel-a-project-restoration", + "summary": "Cancels the given project restoration", + "parameters": [ + { "name": "ref", "required": true, "in": "path", "schema": { "type": "string" } } + ], + "responses": { "200": { "description": "" }, "403": { "description": "" } }, + "tags": ["Projects"], + "security": [{ "bearer": [] }] + } + }, + "/v1/projects/{ref}/analytics/endpoints/logs.all": { + "get": { + "operationId": "getLogs", + "summary": "Gets project's logs", + "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" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V1AnalyticsResponse" } + } + } + }, + "403": { "description": "" } + }, + "tags": ["Analytics"], + "security": [{ "bearer": [] }] + } + }, "/v1/projects/{ref}/database/query": { "post": { "operationId": "v1-run-a-query", @@ -2114,11 +2325,67 @@ "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", "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GetProjectDbMetadataResponseDto" } + } + } + }, + "403": { "description": "" } + }, + "tags": ["Database"], + "security": [{ "bearer": [] }] + } + }, "/v1/projects/{ref}/functions": { + "get": { + "operationId": "v1-list-all-functions", + "summary": "List all functions", + "description": "Returns all functions you've previously added to the specified project.", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { "minLength": 20, "maxLength": 20, "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/FunctionResponse" } + } + } + } + }, + "403": { "description": "" }, + "500": { "description": "Failed to retrieve project's functions" } + }, + "tags": ["Edge Functions"], + "security": [{ "bearer": [] }] + }, "post": { "operationId": "v1-create-a-function", "summary": "Create a function", - "description": "Creates a function and adds it to the specified project.", + "description": "This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.", + "deprecated": true, "parameters": [ { "name": "ref", @@ -2157,12 +2424,6 @@ "required": false, "in": "query", "schema": { "type": "string" } - }, - { - "name": "compute_multiplier", - "required": false, - "in": "query", - "schema": { "minimum": 1, "maximum": 4, "type": "number" } } ], "requestBody": { @@ -2189,10 +2450,10 @@ "tags": ["Edge Functions"], "security": [{ "bearer": [] }] }, - "get": { - "operationId": "v1-list-all-functions", - "summary": "List all functions", - "description": "Returns all functions you've previously added to the specified project.", + "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", @@ -2202,20 +2463,78 @@ "schema": { "minLength": 20, "maxLength": 20, "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/BulkUpdateFunctionBody" } + } + } + } + }, "responses": { "200": { "description": "", "content": { "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/FunctionResponse" } - } + "schema": { "$ref": "#/components/schemas/BulkUpdateFunctionResponse" } } } }, "403": { "description": "" }, - "500": { "description": "Failed to retrieve project's functions" } + "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, "type": "string" } + }, + { + "name": "slug", + "required": false, + "in": "query", + "schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" } + }, + { + "name": "bundleOnly", + "required": false, + "in": "query", + "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": [] }] @@ -2306,12 +2625,6 @@ "required": false, "in": "query", "schema": { "type": "string" } - }, - { - "name": "compute_multiplier", - "required": false, - "in": "query", - "schema": { "minimum": 1, "maximum": 4, "type": "number" } } ], "requestBody": { @@ -2711,43 +3024,43 @@ "BranchDetailResponse": { "type": "object", "properties": { - "db_port": { "type": "integer" }, - "ref": { "type": "string" }, - "postgres_version": { "type": "string" }, - "postgres_engine": { "type": "string" }, - "release_channel": { "type": "string" }, "status": { + "type": "string", "enum": [ + "INACTIVE", "ACTIVE_HEALTHY", "ACTIVE_UNHEALTHY", "COMING_UP", + "UNKNOWN", "GOING_DOWN", - "INACTIVE", "INIT_FAILED", "REMOVED", - "RESTARTING", - "UNKNOWN", + "RESTORING", "UPGRADING", "PAUSING", - "RESTORING", "RESTORE_FAILED", + "RESTARTING", "PAUSE_FAILED", "RESIZING" - ], - "type": "string" + ] }, + "db_port": { "type": "integer" }, + "ref": { "type": "string" }, + "postgres_version": { "type": "string" }, + "postgres_engine": { "type": "string" }, + "release_channel": { "type": "string" }, "db_host": { "type": "string" }, "db_user": { "type": "string" }, "db_pass": { "type": "string" }, "jwt_secret": { "type": "string" } }, "required": [ + "status", "db_port", "ref", "postgres_version", "postgres_engine", "release_channel", - "status", "db_host" ] }, @@ -2763,6 +3076,7 @@ "git_branch": { "type": "string" }, "persistent": { "type": "boolean" }, "status": { + "type": "string", "enum": [ "CREATING_PROJECT", "RUNNING_MIGRATIONS", @@ -2770,8 +3084,7 @@ "MIGRATIONS_FAILED", "FUNCTIONS_DEPLOYED", "FUNCTIONS_FAILED" - ], - "type": "string" + ] } } }, @@ -2784,14 +3097,8 @@ "deprecated": true, "description": "This field is deprecated and will not be populated." }, - "id": { "type": "string" }, - "name": { "type": "string" }, - "project_ref": { "type": "string" }, - "parent_project_ref": { "type": "string" }, - "is_default": { "type": "boolean" }, - "git_branch": { "type": "string" }, - "persistent": { "type": "boolean" }, "status": { + "type": "string", "enum": [ "CREATING_PROJECT", "RUNNING_MIGRATIONS", @@ -2799,20 +3106,26 @@ "MIGRATIONS_FAILED", "FUNCTIONS_DEPLOYED", "FUNCTIONS_FAILED" - ], - "type": "string" + ] }, + "id": { "type": "string" }, + "name": { "type": "string" }, + "project_ref": { "type": "string" }, + "parent_project_ref": { "type": "string" }, + "is_default": { "type": "boolean" }, + "git_branch": { "type": "string" }, + "persistent": { "type": "boolean" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ + "status", "id", "name", "project_ref", "parent_project_ref", "is_default", "persistent", - "status", "created_at", "updated_at" ] @@ -2853,29 +3166,29 @@ "description": "Creation timestamp", "example": "2023-03-29T16:32:59Z" }, - "database": { "$ref": "#/components/schemas/V1DatabaseResponse" }, "status": { + "type": "string", "enum": [ + "INACTIVE", "ACTIVE_HEALTHY", "ACTIVE_UNHEALTHY", "COMING_UP", + "UNKNOWN", "GOING_DOWN", - "INACTIVE", "INIT_FAILED", "REMOVED", - "RESTARTING", - "UNKNOWN", + "RESTORING", "UPGRADING", "PAUSING", - "RESTORING", "RESTORE_FAILED", + "RESTARTING", "PAUSE_FAILED", "RESIZING" - ], - "type": "string" - } + ] + }, + "database": { "$ref": "#/components/schemas/V1DatabaseResponse" } }, - "required": ["id", "organization_id", "name", "region", "created_at", "database", "status"] + "required": ["id", "organization_id", "name", "region", "created_at", "status", "database"] }, "V1CreateProjectBodyDto": { "type": "object", @@ -2938,20 +3251,11 @@ "format": "uri", "description": "Template URL used to create the project from the CLI.", "example": "https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone" - }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"], - "description": "Release channel. If not provided, GA will be used." - }, - "postgres_engine": { - "type": "string", - "enum": ["15", "17-oriole"], - "description": "Postgres engine version. If not provided, the latest version will be used." } }, "required": ["db_pass", "name", "organization_id", "region"], - "additionalProperties": false + "additionalProperties": false, + "hideDefinitions": ["release_channel", "postgres_engine"] }, "V1ProjectResponse": { "type": "object", @@ -2970,24 +3274,24 @@ "example": "2023-03-29T16:32:59Z" }, "status": { + "type": "string", "enum": [ + "INACTIVE", "ACTIVE_HEALTHY", "ACTIVE_UNHEALTHY", "COMING_UP", + "UNKNOWN", "GOING_DOWN", - "INACTIVE", "INIT_FAILED", "REMOVED", - "RESTARTING", - "UNKNOWN", + "RESTORING", "UPGRADING", "PAUSING", - "RESTORING", "RESTORE_FAILED", + "RESTARTING", "PAUSE_FAILED", "RESIZING" - ], - "type": "string" + ] } }, "required": ["id", "organization_id", "name", "region", "created_at", "status"] @@ -3061,7 +3365,7 @@ "type": { "type": "string", "enum": ["sql"] }, "visibility": { "type": "string", "enum": ["user", "project", "org", "public"] }, "name": { "type": "string" }, - "description": { "type": "string" }, + "description": { "type": "string", "nullable": true }, "project": { "$ref": "#/components/schemas/SnippetProject" }, "owner": { "$ref": "#/components/schemas/SnippetUser" }, "updated_by": { "$ref": "#/components/schemas/SnippetUser" } @@ -3073,6 +3377,7 @@ "type", "visibility", "name", + "description", "project", "owner", "updated_by" @@ -3104,7 +3409,7 @@ "type": { "type": "string", "enum": ["sql"] }, "visibility": { "enum": ["user", "project", "org", "public"], "type": "string" }, "name": { "type": "string" }, - "description": { "type": "string" }, + "description": { "type": "string", "nullable": true }, "project": { "$ref": "#/components/schemas/SnippetProject" }, "owner": { "$ref": "#/components/schemas/SnippetUser" }, "updated_by": { "$ref": "#/components/schemas/SnippetUser" }, @@ -3117,6 +3422,7 @@ "type", "visibility", "name", + "description", "project", "owner", "updated_by", @@ -3385,7 +3691,11 @@ }, "SecretResponse": { "type": "object", - "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, + "properties": { + "name": { "type": "string" }, + "value": { "type": "string" }, + "updated_at": { "type": "string" } + }, "required": ["name", "value"] }, "CreateSecretBody": { @@ -3622,19 +3932,87 @@ }, "required": ["name", "healthy", "status"] }, + "CreateSigningKeyBody": { + "type": "object", + "properties": { + "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, + "status": { "type": "string", "enum": ["in_use", "standby"] } + }, + "required": ["algorithm"], + "additionalProperties": false + }, + "SigningKeysResponse": { + "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 + }, + "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": { "$ref": "#/components/schemas/StorageFeatureImageTransformation" - } + }, + "s3Protocol": { "$ref": "#/components/schemas/StorageFeatureS3Protocol" } }, - "required": ["imageTransformation"] + "required": ["imageTransformation", "s3Protocol"] }, "StorageConfigResponse": { "type": "object", @@ -3662,6 +4040,7 @@ "effective_cache_size": { "type": "string" }, "logical_decoding_work_mem": { "type": "string" }, "maintenance_work_mem": { "type": "string" }, + "track_activity_query_size": { "type": "string" }, "max_connections": { "type": "integer", "minimum": 1, "maximum": 262143 }, "max_locks_per_transaction": { "type": "integer", "minimum": 10, "maximum": 2147483640 }, "max_parallel_maintenance_workers": { "type": "integer", "minimum": 0, "maximum": 1024 }, @@ -3689,6 +4068,7 @@ "effective_cache_size": { "type": "string" }, "logical_decoding_work_mem": { "type": "string" }, "maintenance_work_mem": { "type": "string" }, + "track_activity_query_size": { "type": "string" }, "max_connections": { "type": "integer", "minimum": 1, "maximum": 262143 }, "max_locks_per_transaction": { "type": "integer", "minimum": 10, "maximum": 2147483640 }, "max_parallel_maintenance_workers": { "type": "integer", "minimum": 0, "maximum": 1024 }, @@ -3724,11 +4104,11 @@ "SupavisorConfigResponse": { "type": "object", "properties": { + "database_type": { "type": "string", "enum": ["PRIMARY", "READ_REPLICA"] }, "db_port": { "type": "integer" }, "default_pool_size": { "type": "integer", "nullable": true }, "max_client_conn": { "type": "integer", "nullable": true }, "identifier": { "type": "string" }, - "database_type": { "enum": ["PRIMARY", "READ_REPLICA"], "type": "string" }, "is_using_scram_auth": { "type": "boolean" }, "db_user": { "type": "string" }, "db_host": { "type": "string" }, @@ -3737,11 +4117,11 @@ "pool_mode": { "enum": ["transaction", "session"], "type": "string" } }, "required": [ + "database_type", "db_port", "default_pool_size", "max_client_conn", "identifier", - "database_type", "is_using_scram_auth", "db_user", "db_host", @@ -4337,39 +4717,182 @@ }, "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" } + } + }, + "required": ["available_versions"] + }, + "RestoreProjectBodyDto": { + "type": "object", + "properties": {}, + "hideDefinitions": ["release_channel", "postgres_engine"] + }, + "V1AnalyticsResponse": { + "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" } + ] + }, + "result": { "type": "array", "items": { "type": "object" } } + } + }, "V1RunQueryBody": { "type": "object", "properties": { "query": { "type": "string" } }, "required": ["query"] }, + "GetProjectDbMetadataResponseDto": { + "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"] + }, + "FunctionResponse": { + "type": "object", + "properties": { + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, + "updated_at": { "type": "integer", "format": "int64" }, + "id": { "type": "string" }, + "slug": { "type": "string" }, + "name": { "type": "string" }, + "status": { "enum": ["ACTIVE", "REMOVED", "THROTTLED"], "type": "string" }, + "verify_jwt": { "type": "boolean" }, + "import_map": { "type": "boolean" }, + "entrypoint_path": { "type": "string" }, + "import_map_path": { "type": "string" } + }, + "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] + }, "V1CreateFunctionBody": { "type": "object", "properties": { "slug": { "type": "string", "pattern": "/^[A-Za-z0-9_-]+$/" }, "name": { "type": "string" }, "body": { "type": "string" }, - "verify_jwt": { "type": "boolean" }, - "compute_multiplier": { "type": "number", "minimum": 1, "maximum": 4 } + "verify_jwt": { "type": "boolean" } }, "required": ["slug", "name", "body"] }, - "FunctionResponse": { + "BulkUpdateFunctionBody": { "type": "object", "properties": { "version": { "type": "integer" }, "created_at": { "type": "integer", "format": "int64" }, - "updated_at": { "type": "integer", "format": "int64" }, "id": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "enum": ["ACTIVE", "REMOVED", "THROTTLED"], "type": "string" }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, + "entrypoint_path": { "type": "string" }, + "import_map_path": { "type": "string" } + }, + "required": ["version", "id", "slug", "name", "status"] + }, + "BulkUpdateFunctionResponse": { + "type": "object", + "properties": { + "functions": { + "type": "array", + "items": { "$ref": "#/components/schemas/FunctionResponse" } + } + }, + "required": ["functions"] + }, + "FunctionDeployMetadata": { + "type": "object", + "properties": { "entrypoint_path": { "type": "string" }, "import_map_path": { "type": "string" }, - "compute_multiplier": { "type": "number" } + "static_patterns": { "type": "array", "items": { "type": "string" } }, + "verify_jwt": { "type": "boolean" }, + "name": { "type": "string" } }, - "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] + "required": ["entrypoint_path"] + }, + "FunctionDeployBody": { + "type": "object", + "properties": { + "file": { "type": "array", "items": { "type": "string", "format": "binary" } }, + "metadata": { "$ref": "#/components/schemas/FunctionDeployMetadata" } + }, + "required": ["file", "metadata"] + }, + "DeployFunctionResponse": { + "type": "object", + "properties": { + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, + "updated_at": { "type": "integer", "format": "int64" }, + "id": { "type": "string" }, + "slug": { "type": "string" }, + "name": { "type": "string" }, + "status": { "enum": ["ACTIVE", "REMOVED", "THROTTLED"], "type": "string" }, + "verify_jwt": { "type": "boolean" }, + "import_map": { "type": "boolean" }, + "entrypoint_path": { "type": "string" }, + "import_map_path": { "type": "string" } + }, + "required": ["version", "id", "slug", "name", "status"] }, "FunctionSlugResponse": { "type": "object", @@ -4384,8 +4907,7 @@ "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, - "import_map_path": { "type": "string" }, - "compute_multiplier": { "type": "number" } + "import_map_path": { "type": "string" } }, "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] }, @@ -4394,8 +4916,7 @@ "properties": { "name": { "type": "string" }, "body": { "type": "string" }, - "verify_jwt": { "type": "boolean" }, - "compute_multiplier": { "type": "number", "minimum": 1, "maximum": 4 } + "verify_jwt": { "type": "boolean" } } }, "V1StorageBucketResponse": { diff --git a/apps/docs/spec/common-api-sections.json b/apps/docs/spec/common-api-sections.json index 821e282f141b1..49207e11edf3d 100644 --- a/apps/docs/spec/common-api-sections.json +++ b/apps/docs/spec/common-api-sections.json @@ -225,6 +225,12 @@ "type": "category", "title": "Edge Functions", "items": [ + { + "id": "v1-bulk-update-functions", + "title": "Bulk update functions", + "slug": "v1-bulk-update-functions", + "type": "operation" + }, { "id": "v1-create-a-function", "title": "Create a function", @@ -237,6 +243,12 @@ "slug": "v1-delete-a-function", "type": "operation" }, + { + "id": "v1-deploy-a-function", + "title": "Deploy a function", + "slug": "v1-deploy-a-function", + "type": "operation" + }, { "id": "v1-get-a-function", "title": "Get a function", @@ -375,6 +387,12 @@ "type": "category", "title": "Projects", "items": [ + { + "id": "v1-cancel-a-project-restoration", + "title": "Cancel a project restoration", + "slug": "v1-cancel-a-project-restoration", + "type": "operation" + }, { "id": "v1-create-a-project", "title": "Create a project", @@ -435,12 +453,24 @@ "slug": "v1-list-all-projects", "type": "operation" }, + { + "id": "v1-list-available-restore-versions", + "title": "List available restore versions", + "slug": "v1-list-available-restore-versions", + "type": "operation" + }, { "id": "v1-pause-a-project", "title": "Pause a project", "slug": "v1-pause-a-project", "type": "operation" }, + { + "id": "v1-restore-a-project", + "title": "Restore a project", + "slug": "v1-restore-a-project", + "type": "operation" + }, { "id": "v1-update-network-restrictions", "title": "Update network restrictions", diff --git a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json index 50b2c52dae666..3123dd4a05969 100644 --- a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json +++ b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json @@ -78,39 +78,39 @@ "schema": { "type": "object", "properties": { - "db_port": { - "type": "integer" - }, - "ref": { - "type": "string" - }, - "postgres_version": { - "type": "string" - }, - "postgres_engine": { - "type": "string" - }, - "release_channel": { - "type": "string" - }, "status": { + "type": "string", "enum": [ + "INACTIVE", "ACTIVE_HEALTHY", "ACTIVE_UNHEALTHY", "COMING_UP", + "UNKNOWN", "GOING_DOWN", - "INACTIVE", "INIT_FAILED", "REMOVED", - "RESTARTING", - "UNKNOWN", + "RESTORING", "UPGRADING", "PAUSING", - "RESTORING", "RESTORE_FAILED", + "RESTARTING", "PAUSE_FAILED", "RESIZING" - ], + ] + }, + "db_port": { + "type": "integer" + }, + "ref": { + "type": "string" + }, + "postgres_version": { + "type": "string" + }, + "postgres_engine": { + "type": "string" + }, + "release_channel": { "type": "string" }, "db_host": { @@ -127,12 +127,12 @@ } }, "required": [ + "status", "db_port", "ref", "postgres_version", "postgres_engine", "release_channel", - "status", "db_host" ] } @@ -187,6 +187,7 @@ "type": "boolean" }, "status": { + "type": "string", "enum": [ "CREATING_PROJECT", "RUNNING_MIGRATIONS", @@ -194,8 +195,7 @@ "MIGRATIONS_FAILED", "FUNCTIONS_DEPLOYED", "FUNCTIONS_FAILED" - ], - "type": "string" + ] } } } @@ -219,6 +219,17 @@ "deprecated": true, "description": "This field is deprecated and will not be populated." }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ] + }, "id": { "type": "string" }, @@ -240,17 +251,6 @@ "persistent": { "type": "boolean" }, - "status": { - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ], - "type": "string" - }, "created_at": { "type": "string" }, @@ -259,13 +259,13 @@ } }, "required": [ + "status", "id", "name", "project_ref", "parent_project_ref", "is_default", "persistent", - "status", "created_at", "updated_at" ] @@ -462,6 +462,26 @@ "description": "Creation timestamp", "example": "2023-03-29T16:32:59Z" }, + "status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + }, "database": { "type": "object", "properties": { @@ -483,26 +503,6 @@ } }, "required": ["host", "version", "postgres_engine", "release_channel"] - }, - "status": { - "enum": [ - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "GOING_DOWN", - "INACTIVE", - "INIT_FAILED", - "REMOVED", - "RESTARTING", - "UNKNOWN", - "UPGRADING", - "PAUSING", - "RESTORING", - "RESTORE_FAILED", - "PAUSE_FAILED", - "RESIZING" - ], - "type": "string" } }, "required": [ @@ -511,8 +511,8 @@ "name", "region", "created_at", - "database", - "status" + "status", + "database" ] } } @@ -605,20 +605,11 @@ "format": "uri", "description": "Template URL used to create the project from the CLI.", "example": "https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone" - }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"], - "description": "Release channel. If not provided, GA will be used." - }, - "postgres_engine": { - "type": "string", - "enum": ["15", "17-oriole"], - "description": "Postgres engine version. If not provided, the latest version will be used." } }, "required": ["db_pass", "name", "organization_id", "region"], - "additionalProperties": false + "additionalProperties": false, + "hideDefinitions": ["release_channel", "postgres_engine"] } } } @@ -654,24 +645,24 @@ "example": "2023-03-29T16:32:59Z" }, "status": { + "type": "string", "enum": [ + "INACTIVE", "ACTIVE_HEALTHY", "ACTIVE_UNHEALTHY", "COMING_UP", + "UNKNOWN", "GOING_DOWN", - "INACTIVE", "INIT_FAILED", "REMOVED", - "RESTARTING", - "UNKNOWN", + "RESTORING", "UPGRADING", "PAUSING", - "RESTORING", "RESTORE_FAILED", + "RESTARTING", "PAUSE_FAILED", "RESIZING" - ], - "type": "string" + ] } }, "required": ["id", "organization_id", "name", "region", "created_at", "status"] @@ -1069,7 +1060,8 @@ "type": "string" }, "description": { - "type": "string" + "type": "string", + "nullable": true }, "project": { "type": "object", @@ -1118,6 +1110,7 @@ "type", "visibility", "name", + "description", "project", "owner", "updated_by" @@ -1189,7 +1182,8 @@ "type": "string" }, "description": { - "type": "string" + "type": "string", + "nullable": true }, "project": { "type": "object", @@ -1253,6 +1247,7 @@ "type", "visibility", "name", + "description", "project", "owner", "updated_by", @@ -1885,6 +1880,17 @@ "deprecated": true, "description": "This field is deprecated and will not be populated." }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ] + }, "id": { "type": "string" }, @@ -1906,17 +1912,6 @@ "persistent": { "type": "boolean" }, - "status": { - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ], - "type": "string" - }, "created_at": { "type": "string" }, @@ -1925,13 +1920,13 @@ } }, "required": [ + "status", "id", "name", "project_ref", "parent_project_ref", "is_default", "persistent", - "status", "created_at", "updated_at" ] @@ -2034,6 +2029,17 @@ "deprecated": true, "description": "This field is deprecated and will not be populated." }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ] + }, "id": { "type": "string" }, @@ -2055,17 +2061,6 @@ "persistent": { "type": "boolean" }, - "status": { - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ], - "type": "string" - }, "created_at": { "type": "string" }, @@ -2074,13 +2069,13 @@ } }, "required": [ + "status", "id", "name", "project_ref", "parent_project_ref", "is_default", "persistent", - "status", "created_at", "updated_at" ] @@ -3445,6 +3440,26 @@ "description": "Creation timestamp", "example": "2023-03-29T16:32:59Z" }, + "status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + }, "database": { "type": "object", "properties": { @@ -3466,26 +3481,6 @@ } }, "required": ["host", "version", "postgres_engine", "release_channel"] - }, - "status": { - "enum": [ - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "GOING_DOWN", - "INACTIVE", - "INIT_FAILED", - "REMOVED", - "RESTARTING", - "UNKNOWN", - "UPGRADING", - "PAUSING", - "RESTORING", - "RESTORE_FAILED", - "PAUSE_FAILED", - "RESIZING" - ], - "type": "string" } }, "required": [ @@ -3494,8 +3489,8 @@ "name", "region", "created_at", - "database", - "status" + "status", + "database" ] } } @@ -3597,6 +3592,9 @@ }, "value": { "type": "string" + }, + "updated_at": { + "type": "string" } }, "required": ["name", "value"] @@ -4761,26 +4759,396 @@ ] } }, - "/v1/projects/{ref}/config/storage": { - "get": { - "operationId": "v1-get-storage-config", - "summary": "Gets project's storage config", + "/v1/projects/{ref}/config/auth/signing-keys": { + "post": { + "operationId": "createSigningKeyForProject", + "summary": "[Alpha] Create a new signing key for the project in standby status", "parameters": [ { "name": "ref", "required": true, "in": "path", - "description": "Project ref", "schema": { - "minLength": 20, - "maxLength": 20, "type": "string" } } ], + "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": { - "200": { - "description": "", + "201": { + "description": "[Alpha] Create a new signing key for the project in standby status", + "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 + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + }, + "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", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "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 + } + } + } + } + }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "operationId": "deleteSigningKey", + "summary": "[Alpha] Remove a signing key from a project, where the status is previously_used", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "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": [] + } + ] + }, + "patch": { + "operationId": "patchSigningKey", + "summary": "[Alpha] 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" + } + } + ], + "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, + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { @@ -4801,9 +5169,18 @@ } }, "required": ["enabled"] + }, + "s3Protocol": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } }, - "required": ["imageTransformation"] + "required": ["imageTransformation", "s3Protocol"] } }, "required": ["fileSizeLimit", "features"] @@ -4865,9 +5242,18 @@ } }, "required": ["enabled"] + }, + "s3Protocol": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } }, - "required": ["imageTransformation"] + "required": ["imageTransformation", "s3Protocol"] } } } @@ -4927,6 +5313,9 @@ "maintenance_work_mem": { "type": "string" }, + "track_activity_query_size": { + "type": "string" + }, "max_connections": { "type": "integer", "minimum": 1, @@ -5045,6 +5434,9 @@ "maintenance_work_mem": { "type": "string" }, + "track_activity_query_size": { + "type": "string" + }, "max_connections": { "type": "integer", "minimum": 1, @@ -5140,6 +5532,9 @@ "maintenance_work_mem": { "type": "string" }, + "track_activity_query_size": { + "type": "string" + }, "max_connections": { "type": "integer", "minimum": 1, @@ -5310,6 +5705,10 @@ "items": { "type": "object", "properties": { + "database_type": { + "type": "string", + "enum": ["PRIMARY", "READ_REPLICA"] + }, "db_port": { "type": "integer" }, @@ -5321,11 +5720,7 @@ "type": "integer", "nullable": true }, - "identifier": { - "type": "string" - }, - "database_type": { - "enum": ["PRIMARY", "READ_REPLICA"], + "identifier": { "type": "string" }, "is_using_scram_auth": { @@ -5349,11 +5744,11 @@ } }, "required": [ + "database_type", "db_port", "default_pool_size", "max_client_conn", "identifier", - "database_type", "is_using_scram_auth", "db_user", "db_host", @@ -7794,9 +8189,264 @@ }, "403": { "description": "" - }, - "500": { - "description": "Failed to update project's auth config" + }, + "500": { + "description": "Failed to update project's auth config" + } + }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/config/auth/third-party-auth": { + "post": { + "operationId": "createTPAForProject", + "summary": "Creates a new third-party auth integration", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "oidc_issuer_url": { + "type": "string" + }, + "jwks_url": { + "type": "string" + }, + "custom_jwks": { + "type": "object" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "type": "object", + "nullable": true + }, + "resolved_jwks": { + "type": "object", + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + }, + "get": { + "operationId": "listTPAForProject", + "summary": "[Alpha] Lists all third-party auth integrations", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "type": "object", + "nullable": true + }, + "resolved_jwks": { + "type": "object", + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] + } + } + } + } + }, + "403": { + "description": "" + } + }, + "tags": ["Auth"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}": { + "delete": { + "operationId": "deleteTPAForProject", + "summary": "[Alpha] Removes a third-party auth integration", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "type": "string" + } + }, + { + "name": "tpa_id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "type": "object", + "nullable": true + }, + "resolved_jwks": { + "type": "object", + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] + } + } + } + }, + "403": { + "description": "" } }, "tags": ["Auth"], @@ -7805,12 +8455,10 @@ "bearer": [] } ] - } - }, - "/v1/projects/{ref}/config/auth/third-party-auth": { - "post": { - "operationId": "createTPAForProject", - "summary": "Creates a new third-party auth integration", + }, + "get": { + "operationId": "getTPAForProject", + "summary": "[Alpha] Get a third-party integration", "parameters": [ { "name": "ref", @@ -7822,31 +8470,18 @@ "maxLength": 20, "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "oidc_issuer_url": { - "type": "string" - }, - "jwks_url": { - "type": "string" - }, - "custom_jwks": { - "type": "object" - } - } - } + }, + { + "name": "tpa_id", + "required": true, + "in": "path", + "schema": { + "type": "string" } } - }, + ], "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { @@ -7901,10 +8536,12 @@ "bearer": [] } ] - }, - "get": { - "operationId": "listTPAForProject", - "summary": "[Alpha] Lists all third-party auth integrations", + } + }, + "/v1/projects/{ref}/pause": { + "post": { + "operationId": "v1-pause-a-project", + "summary": "Pauses the given project", "parameters": [ { "name": "ref", @@ -7918,51 +8555,66 @@ } } ], + "responses": { + "200": { + "description": "" + }, + "403": { + "description": "" + } + }, + "tags": ["Projects"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/restore": { + "get": { + "operationId": "v1-list-available-restore-versions", + "summary": "Lists available restore versions for the given project", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "type": "object", - "nullable": true - }, - "resolved_jwks": { + "type": "object", + "properties": { + "available_versions": { + "type": "array", + "items": { "type": "object", - "nullable": true - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "resolved_at": { - "type": "string", - "nullable": true + "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": ["id", "type", "inserted_at", "updated_at"] - } + } + }, + "required": ["available_versions"] } } } @@ -7971,32 +8623,61 @@ "description": "" } }, - "tags": ["Auth"], + "tags": ["Projects"], "security": [ { "bearer": [] } ] - } - }, - "/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}": { - "delete": { - "operationId": "deleteTPAForProject", - "summary": "[Alpha] Removes a third-party auth integration", + }, + "post": { + "operationId": "v1-restore-a-project", + "summary": "Restores the given project", "parameters": [ { "name": "ref", "required": true, "in": "path", - "description": "Project ref", "schema": { - "minLength": 20, - "maxLength": 20, "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "hideDefinitions": ["release_channel", "postgres_engine"] + } + } + } + }, + "responses": { + "200": { + "description": "" }, + "403": { + "description": "" + } + }, + "tags": ["Projects"], + "security": [ { - "name": "tpa_id", + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/restore/cancel": { + "post": { + "operationId": "v1-cancel-a-project-restoration", + "summary": "Cancels the given project restoration", + "parameters": [ + { + "name": "ref", "required": true, "in": "path", "schema": { @@ -8006,46 +8687,115 @@ ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "type": "object", - "nullable": true - }, - "resolved_jwks": { - "type": "object", - "nullable": true - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" + "description": "" + }, + "403": { + "description": "" + } + }, + "tags": ["Projects"], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v1/projects/{ref}/analytics/endpoints/logs.all": { + "get": { + "operationId": "getLogs", + "summary": "Gets project's logs", + "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" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "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" + } + ] }, - "resolved_at": { - "type": "string", - "nullable": true + "result": { + "type": "array", + "items": { + "type": "object" + } } - }, - "required": ["id", "type", "inserted_at", "updated_at"] + } } } } @@ -8054,16 +8804,18 @@ "description": "" } }, - "tags": ["Auth"], + "tags": ["Analytics"], "security": [ { "bearer": [] } ] - }, - "get": { - "operationId": "getTPAForProject", - "summary": "[Alpha] Get a third-party integration", + } + }, + "/v1/projects/{ref}/database/query": { + "post": { + "operationId": "v1-run-a-query", + "summary": "[Beta] Run sql query", "parameters": [ { "name": "ref", @@ -8075,67 +8827,43 @@ "maxLength": 20, "type": "string" } - }, - { - "name": "tpa_id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "type": "string" + } + }, + "required": ["query"] + } + } + } + }, "responses": { - "200": { + "201": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "type": "object", - "nullable": true - }, - "resolved_jwks": { - "type": "object", - "nullable": true - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "resolved_at": { - "type": "string", - "nullable": true - } - }, - "required": ["id", "type", "inserted_at", "updated_at"] + "type": "object" } } } }, "403": { "description": "" + }, + "500": { + "description": "Failed to run sql query" } }, - "tags": ["Auth"], + "tags": ["Database"], "security": [ { "bearer": [] @@ -8143,10 +8871,10 @@ ] } }, - "/v1/projects/{ref}/pause": { + "/v1/projects/{ref}/database/webhooks/enable": { "post": { - "operationId": "v1-pause-a-project", - "summary": "Pauses the given project", + "operationId": "v1-enable-database-webhook", + "summary": "[Beta] Enables Database Webhooks on the project", "parameters": [ { "name": "ref", @@ -8161,14 +8889,17 @@ } ], "responses": { - "200": { + "201": { "description": "" }, "403": { "description": "" + }, + "500": { + "description": "Failed to enable Database Webhooks on the project" } }, - "tags": ["Projects"], + "tags": ["Database"], "security": [ { "bearer": [] @@ -8176,55 +8907,64 @@ ] } }, - "/v1/projects/{ref}/database/query": { - "post": { - "operationId": "v1-run-a-query", - "summary": "[Beta] Run sql query", + "/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", - "description": "Project ref", "schema": { - "minLength": 20, - "maxLength": 20, "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "string" - } - }, - "required": ["query"] - } - } - } - }, "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "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 run sql query" } }, "tags": ["Database"], @@ -8235,10 +8975,11 @@ ] } }, - "/v1/projects/{ref}/database/webhooks/enable": { - "post": { - "operationId": "v1-enable-database-webhook", - "summary": "[Beta] Enables Database Webhooks on the project", + "/v1/projects/{ref}/functions": { + "get": { + "operationId": "v1-list-all-functions", + "summary": "List all functions", + "description": "Returns all functions you've previously added to the specified project.", "parameters": [ { "name": "ref", @@ -8250,32 +8991,88 @@ "maxLength": 20, "type": "string" } - } - ], - "responses": { - "201": { - "description": "" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "enum": ["ACTIVE", "REMOVED", "THROTTLED"], + "type": "string" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + } + }, + "required": [ + "version", + "created_at", + "updated_at", + "id", + "slug", + "name", + "status" + ] + } + } + } + } }, "403": { "description": "" }, "500": { - "description": "Failed to enable Database Webhooks on the project" + "description": "Failed to retrieve project's functions" } }, - "tags": ["Database"], + "tags": ["Edge Functions"], "security": [ { "bearer": [] } ] - } - }, - "/v1/projects/{ref}/functions": { + }, "post": { "operationId": "v1-create-a-function", "summary": "Create a function", - "description": "Creates a function and adds it to the specified project.", + "description": "This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.", + "deprecated": true, "parameters": [ { "name": "ref", @@ -8336,16 +9133,6 @@ "schema": { "type": "string" } - }, - { - "name": "compute_multiplier", - "required": false, - "in": "query", - "schema": { - "minimum": 1, - "maximum": 4, - "type": "number" - } } ], "requestBody": { @@ -8367,11 +9154,6 @@ }, "verify_jwt": { "type": "boolean" - }, - "compute_multiplier": { - "type": "number", - "minimum": 1, - "maximum": 4 } }, "required": ["slug", "name", "body"] @@ -8393,11 +9175,6 @@ }, "verify_jwt": { "type": "boolean" - }, - "compute_multiplier": { - "type": "number", - "minimum": 1, - "maximum": 4 } }, "required": ["slug", "name", "body"] @@ -8448,9 +9225,6 @@ }, "import_map_path": { "type": "string" - }, - "compute_multiplier": { - "type": "number" } }, "required": [ @@ -8480,10 +9254,10 @@ } ] }, - "get": { - "operationId": "v1-list-all-functions", - "summary": "List all functions", - "description": "Returns all functions you've previously added to the specified project.", + "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", @@ -8497,66 +9271,261 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "enum": ["ACTIVE", "REMOVED", "THROTTLED"], + "type": "string" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + } + }, + "required": ["version", "id", "slug", "name", "status"] + } + } + } + } + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { + "type": "object", + "properties": { + "functions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "enum": ["ACTIVE", "REMOVED", "THROTTLED"], + "type": "string" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + } + }, + "required": [ + "version", + "created_at", + "updated_at", + "id", + "slug", + "name", + "status" + ] + } + } + }, + "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, + "type": "string" + } + }, + { + "name": "slug", + "required": false, + "in": "query", + "schema": { + "pattern": "/^[A-Za-z0-9_-]+$/", + "type": "string" + } + }, + { + "name": "bundleOnly", + "required": false, + "in": "query", + "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": { - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, - "id": { - "type": "string" - }, - "slug": { + "entrypoint_path": { "type": "string" }, - "name": { + "import_map_path": { "type": "string" }, - "status": { - "enum": ["ACTIVE", "REMOVED", "THROTTLED"], - "type": "string" + "static_patterns": { + "type": "array", + "items": { + "type": "string" + } }, "verify_jwt": { "type": "boolean" }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { + "name": { "type": "string" - }, - "compute_multiplier": { - "type": "number" } }, - "required": [ - "version", - "created_at", - "updated_at", - "id", - "slug", - "name", - "status" - ] - } + "required": ["entrypoint_path"] + } + }, + "required": ["file", "metadata"] + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "enum": ["ACTIVE", "REMOVED", "THROTTLED"], + "type": "string" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + } + }, + "required": ["version", "id", "slug", "name", "status"] } } } @@ -8565,7 +9534,7 @@ "description": "" }, "500": { - "description": "Failed to retrieve project's functions" + "description": "Failed to deploy function" } }, "tags": ["Edge Functions"], @@ -8647,9 +9616,6 @@ }, "import_map_path": { "type": "string" - }, - "compute_multiplier": { - "type": "number" } }, "required": [ @@ -8753,16 +9719,6 @@ "schema": { "type": "string" } - }, - { - "name": "compute_multiplier", - "required": false, - "in": "query", - "schema": { - "minimum": 1, - "maximum": 4, - "type": "number" - } } ], "requestBody": { @@ -8780,11 +9736,6 @@ }, "verify_jwt": { "type": "boolean" - }, - "compute_multiplier": { - "type": "number", - "minimum": 1, - "maximum": 4 } } } @@ -8801,11 +9752,6 @@ }, "verify_jwt": { "type": "boolean" - }, - "compute_multiplier": { - "type": "number", - "minimum": 1, - "maximum": 4 } } } @@ -8855,9 +9801,6 @@ }, "import_map_path": { "type": "string" - }, - "compute_multiplier": { - "type": "number" } }, "required": [ @@ -10166,39 +11109,39 @@ "BranchDetailResponse": { "type": "object", "properties": { - "db_port": { - "type": "integer" - }, - "ref": { - "type": "string" - }, - "postgres_version": { - "type": "string" - }, - "postgres_engine": { - "type": "string" - }, - "release_channel": { - "type": "string" - }, "status": { + "type": "string", "enum": [ + "INACTIVE", "ACTIVE_HEALTHY", "ACTIVE_UNHEALTHY", "COMING_UP", + "UNKNOWN", "GOING_DOWN", - "INACTIVE", "INIT_FAILED", "REMOVED", - "RESTARTING", - "UNKNOWN", + "RESTORING", "UPGRADING", "PAUSING", - "RESTORING", "RESTORE_FAILED", + "RESTARTING", "PAUSE_FAILED", "RESIZING" - ], + ] + }, + "db_port": { + "type": "integer" + }, + "ref": { + "type": "string" + }, + "postgres_version": { + "type": "string" + }, + "postgres_engine": { + "type": "string" + }, + "release_channel": { "type": "string" }, "db_host": { @@ -10215,12 +11158,12 @@ } }, "required": [ + "status", "db_port", "ref", "postgres_version", "postgres_engine", "release_channel", - "status", "db_host" ] }, @@ -10242,6 +11185,7 @@ "type": "boolean" }, "status": { + "type": "string", "enum": [ "CREATING_PROJECT", "RUNNING_MIGRATIONS", @@ -10249,8 +11193,7 @@ "MIGRATIONS_FAILED", "FUNCTIONS_DEPLOYED", "FUNCTIONS_FAILED" - ], - "type": "string" + ] } } }, @@ -10266,6 +11209,17 @@ "deprecated": true, "description": "This field is deprecated and will not be populated." }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ] + }, "id": { "type": "string" }, @@ -10287,17 +11241,6 @@ "persistent": { "type": "boolean" }, - "status": { - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ], - "type": "string" - }, "created_at": { "type": "string" }, @@ -10306,13 +11249,13 @@ } }, "required": [ + "status", "id", "name", "project_ref", "parent_project_ref", "is_default", "persistent", - "status", "created_at", "updated_at" ] @@ -10385,6 +11328,26 @@ "description": "Creation timestamp", "example": "2023-03-29T16:32:59Z" }, + "status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + }, "database": { "type": "object", "properties": { @@ -10406,29 +11369,9 @@ } }, "required": ["host", "version", "postgres_engine", "release_channel"] - }, - "status": { - "enum": [ - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "GOING_DOWN", - "INACTIVE", - "INIT_FAILED", - "REMOVED", - "RESTARTING", - "UNKNOWN", - "UPGRADING", - "PAUSING", - "RESTORING", - "RESTORE_FAILED", - "PAUSE_FAILED", - "RESIZING" - ], - "type": "string" } }, - "required": ["id", "organization_id", "name", "region", "created_at", "database", "status"] + "required": ["id", "organization_id", "name", "region", "created_at", "status", "database"] }, "V1CreateProjectBodyDto": { "type": "object", @@ -10500,20 +11443,11 @@ "format": "uri", "description": "Template URL used to create the project from the CLI.", "example": "https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone" - }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"], - "description": "Release channel. If not provided, GA will be used." - }, - "postgres_engine": { - "type": "string", - "enum": ["15", "17-oriole"], - "description": "Postgres engine version. If not provided, the latest version will be used." } }, "required": ["db_pass", "name", "organization_id", "region"], - "additionalProperties": false + "additionalProperties": false, + "hideDefinitions": ["release_channel", "postgres_engine"] }, "V1ProjectResponse": { "type": "object", @@ -10541,24 +11475,24 @@ "example": "2023-03-29T16:32:59Z" }, "status": { + "type": "string", "enum": [ + "INACTIVE", "ACTIVE_HEALTHY", "ACTIVE_UNHEALTHY", "COMING_UP", + "UNKNOWN", "GOING_DOWN", - "INACTIVE", "INIT_FAILED", "REMOVED", - "RESTARTING", - "UNKNOWN", + "RESTORING", "UPGRADING", "PAUSING", - "RESTORING", "RESTORE_FAILED", + "RESTARTING", "PAUSE_FAILED", "RESIZING" - ], - "type": "string" + ] } }, "required": ["id", "organization_id", "name", "region", "created_at", "status"] @@ -10700,7 +11634,8 @@ "type": "string" }, "description": { - "type": "string" + "type": "string", + "nullable": true }, "project": { "type": "object", @@ -10749,6 +11684,7 @@ "type", "visibility", "name", + "description", "project", "owner", "updated_by" @@ -10783,7 +11719,8 @@ "type": "string" }, "description": { - "type": "string" + "type": "string", + "nullable": true }, "project": { "type": "object", @@ -10832,6 +11769,7 @@ "type", "visibility", "name", + "description", "project", "owner", "updated_by" @@ -10883,7 +11821,8 @@ "type": "string" }, "description": { - "type": "string" + "type": "string", + "nullable": true }, "project": { "type": "object", @@ -10947,6 +11886,7 @@ "type", "visibility", "name", + "description", "project", "owner", "updated_by", @@ -11717,6 +12657,9 @@ }, "value": { "type": "string" + }, + "updated_at": { + "type": "string" } }, "required": ["name", "value"] @@ -12153,18 +13096,114 @@ "enum": ["auth", "db", "pooler", "realtime", "rest", "storage"], "type": "string" }, - "healthy": { - "type": "boolean" + "healthy": { + "type": "boolean" + }, + "status": { + "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"], + "type": "string" + }, + "error": { + "type": "string" + } + }, + "required": ["name", "healthy", "status"] + }, + "CreateSigningKeyBody": { + "type": "object", + "properties": { + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "standby"] + } + }, + "required": ["algorithm"], + "additionalProperties": false + }, + "SigningKeysResponse": { + "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 + }, + "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": { - "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"], - "type": "string" - }, - "error": { - "type": "string" + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] } }, - "required": ["name", "healthy", "status"] + "required": ["status"], + "additionalProperties": false }, "StorageFeatureImageTransformation": { "type": "object", @@ -12175,6 +13214,15 @@ }, "required": ["enabled"] }, + "StorageFeatureS3Protocol": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, "StorageFeatures": { "type": "object", "properties": { @@ -12186,9 +13234,18 @@ } }, "required": ["enabled"] + }, + "s3Protocol": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } }, - "required": ["imageTransformation"] + "required": ["imageTransformation", "s3Protocol"] }, "StorageConfigResponse": { "type": "object", @@ -12208,9 +13265,18 @@ } }, "required": ["enabled"] + }, + "s3Protocol": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } }, - "required": ["imageTransformation"] + "required": ["imageTransformation", "s3Protocol"] } }, "required": ["fileSizeLimit", "features"] @@ -12235,9 +13301,18 @@ } }, "required": ["enabled"] + }, + "s3Protocol": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } }, - "required": ["imageTransformation"] + "required": ["imageTransformation", "s3Protocol"] } } }, @@ -12253,6 +13328,9 @@ "maintenance_work_mem": { "type": "string" }, + "track_activity_query_size": { + "type": "string" + }, "max_connections": { "type": "integer", "minimum": 1, @@ -12337,6 +13415,9 @@ "maintenance_work_mem": { "type": "string" }, + "track_activity_query_size": { + "type": "string" + }, "max_connections": { "type": "integer", "minimum": 1, @@ -12436,6 +13517,10 @@ "SupavisorConfigResponse": { "type": "object", "properties": { + "database_type": { + "type": "string", + "enum": ["PRIMARY", "READ_REPLICA"] + }, "db_port": { "type": "integer" }, @@ -12450,10 +13535,6 @@ "identifier": { "type": "string" }, - "database_type": { - "enum": ["PRIMARY", "READ_REPLICA"], - "type": "string" - }, "is_using_scram_auth": { "type": "boolean" }, @@ -12475,11 +13556,11 @@ } }, "required": [ + "database_type", "db_port", "default_pool_size", "max_client_conn", "identifier", - "database_type", "is_using_scram_auth", "db_user", "db_host", @@ -13865,160 +14946,480 @@ "external_spotify_enabled": { "type": "boolean" }, - "external_spotify_client_id": { + "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" + } + } + }, + "CreateThirdPartyAuthBody": { + "type": "object", + "properties": { + "oidc_issuer_url": { + "type": "string" + }, + "jwks_url": { + "type": "string" + }, + "custom_jwks": { + "type": "object" + } + } + }, + "ThirdPartyAuth": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "type": "object", + "nullable": true + }, + "resolved_jwks": { + "type": "object", + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "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": { + "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"] + }, + "V1AnalyticsResponse": { + "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" + } + ] + }, + "result": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "V1RunQueryBody": { + "type": "object", + "properties": { + "query": { "type": "string" + } + }, + "required": ["query"] + }, + "GetProjectDbMetadataResponseDto": { + "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"] + }, + "FunctionResponse": { + "type": "object", + "properties": { + "version": { + "type": "integer" }, - "external_spotify_secret": { - "type": "string" + "created_at": { + "type": "integer", + "format": "int64" }, - "external_twitch_enabled": { - "type": "boolean" + "updated_at": { + "type": "integer", + "format": "int64" }, - "external_twitch_client_id": { + "id": { "type": "string" }, - "external_twitch_secret": { + "slug": { "type": "string" }, - "external_twitter_enabled": { - "type": "boolean" - }, - "external_twitter_client_id": { + "name": { "type": "string" }, - "external_twitter_secret": { + "status": { + "enum": ["ACTIVE", "REMOVED", "THROTTLED"], "type": "string" }, - "external_workos_enabled": { + "verify_jwt": { "type": "boolean" }, - "external_workos_client_id": { - "type": "string" - }, - "external_workos_secret": { - "type": "string" - }, - "external_workos_url": { - "type": "string" - }, - "external_zoom_enabled": { + "import_map": { "type": "boolean" }, - "external_zoom_client_id": { - "type": "string" - }, - "external_zoom_secret": { + "entrypoint_path": { "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": { + "import_map_path": { "type": "string" } - } + }, + "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] }, - "CreateThirdPartyAuthBody": { + "V1CreateFunctionBody": { "type": "object", "properties": { - "oidc_issuer_url": { + "slug": { + "type": "string", + "pattern": "/^[A-Za-z0-9_-]+$/" + }, + "name": { "type": "string" }, - "jwks_url": { + "body": { "type": "string" }, - "custom_jwks": { - "type": "object" + "verify_jwt": { + "type": "boolean" } - } + }, + "required": ["slug", "name", "body"] }, - "ThirdPartyAuth": { + "BulkUpdateFunctionBody": { "type": "object", "properties": { + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, "id": { "type": "string" }, - "type": { + "slug": { "type": "string" }, - "oidc_issuer_url": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "jwks_url": { - "type": "string", - "nullable": true + "status": { + "enum": ["ACTIVE", "REMOVED", "THROTTLED"], + "type": "string" }, - "custom_jwks": { - "type": "object", - "nullable": true + "verify_jwt": { + "type": "boolean" }, - "resolved_jwks": { - "type": "object", - "nullable": true + "import_map": { + "type": "boolean" }, - "inserted_at": { + "entrypoint_path": { "type": "string" }, - "updated_at": { + "import_map_path": { "type": "string" - }, - "resolved_at": { - "type": "string", - "nullable": true } }, - "required": ["id", "type", "inserted_at", "updated_at"] + "required": ["version", "id", "slug", "name", "status"] }, - "V1RunQueryBody": { + "BulkUpdateFunctionResponse": { "type": "object", "properties": { - "query": { - "type": "string" + "functions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "enum": ["ACTIVE", "REMOVED", "THROTTLED"], + "type": "string" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + } + }, + "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] + } } }, - "required": ["query"] + "required": ["functions"] }, - "V1CreateFunctionBody": { + "FunctionDeployMetadata": { "type": "object", "properties": { - "slug": { - "type": "string", - "pattern": "/^[A-Za-z0-9_-]+$/" - }, - "name": { + "entrypoint_path": { "type": "string" }, - "body": { + "import_map_path": { "type": "string" }, + "static_patterns": { + "type": "array", + "items": { + "type": "string" + } + }, "verify_jwt": { "type": "boolean" }, - "compute_multiplier": { - "type": "number", - "minimum": 1, - "maximum": 4 + "name": { + "type": "string" } }, - "required": ["slug", "name", "body"] + "required": ["entrypoint_path"] }, - "FunctionResponse": { + "FunctionDeployBody": { + "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": ["file", "metadata"] + }, + "DeployFunctionResponse": { "type": "object", "properties": { "version": { @@ -14056,12 +15457,9 @@ }, "import_map_path": { "type": "string" - }, - "compute_multiplier": { - "type": "number" } }, - "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] + "required": ["version", "id", "slug", "name", "status"] }, "FunctionSlugResponse": { "type": "object", @@ -14101,9 +15499,6 @@ }, "import_map_path": { "type": "string" - }, - "compute_multiplier": { - "type": "number" } }, "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"] @@ -14119,11 +15514,6 @@ }, "verify_jwt": { "type": "boolean" - }, - "compute_multiplier": { - "type": "number", - "minimum": 1, - "maximum": 4 } } },