diff --git a/apps/cli/src/commands/sso/show/show.integration.test.ts b/apps/cli/src/commands/sso/show/show.integration.test.ts index f9c9d09f21..fe4931ed39 100644 --- a/apps/cli/src/commands/sso/show/show.integration.test.ts +++ b/apps/cli/src/commands/sso/show/show.integration.test.ts @@ -223,6 +223,7 @@ domains: id: ${VALID_PROVIDER_ID} saml: attributemapping: null + dedicatedscope: null entityid: https://example.com metadataurl: https://example.com metadataxml: diff --git a/apps/cli/src/commands/sso/sso.response-shape.ts b/apps/cli/src/commands/sso/sso.response-shape.ts index 919016627c..fe00795c52 100644 --- a/apps/cli/src/commands/sso/sso.response-shape.ts +++ b/apps/cli/src/commands/sso/sso.response-shape.ts @@ -51,6 +51,7 @@ export const SSO_PROVIDER_RESPONSE_SHAPE: OutputShape = shapeStruct([ ]), ), ], + ["dedicated_scope", shapePtr(shapeBool)], ["entity_id", shapeString], ["metadata_url", shapePtr(shapeString)], ["metadata_xml", shapePtr(shapeString)], diff --git a/packages/api/src/generated/contracts.ts b/packages/api/src/generated/contracts.ts index 8144975243..e28cc1500f 100644 --- a/packages/api/src/generated/contracts.ts +++ b/packages/api/src/generated/contracts.ts @@ -1463,9 +1463,26 @@ export const V1CreateASsoProviderInput = Schema.Struct({ "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", ]), ), + dedicated_scope: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "When `true`, the provider's SAML ACS URL and entity ID are scoped to its own provider ID instead of the ones shared by all SAML providers in the project. The same signing key is still used. This cannot be changed once the provider is created.", + }), + ), }); export const V1CreateASsoProviderOutput = Schema.Struct({ id: Schema.String, + domains: Schema.optionalKey( + Schema.Array( + Schema.Struct({ + domain: Schema.optionalKey(Schema.String), + created_at: Schema.optionalKey(Schema.String), + updated_at: Schema.optionalKey(Schema.String), + }), + ), + ), + created_at: Schema.optionalKey(Schema.String), + updated_at: Schema.optionalKey(Schema.String), saml: Schema.optionalKey( Schema.Struct({ entity_id: Schema.String, @@ -1497,19 +1514,9 @@ export const V1CreateASsoProviderOutput = Schema.Struct({ OpenString, ]), ), + dedicated_scope: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), }), ), - domains: Schema.optionalKey( - Schema.Array( - Schema.Struct({ - domain: Schema.optionalKey(Schema.String), - created_at: Schema.optionalKey(Schema.String), - updated_at: Schema.optionalKey(Schema.String), - }), - ), - ), - created_at: Schema.optionalKey(Schema.String), - updated_at: Schema.optionalKey(Schema.String), }); export const V1CreateAnOrganizationInput = Schema.Struct({ name: Schema.String.check( @@ -2044,6 +2051,17 @@ export const V1DeleteASsoProviderInput = Schema.Struct({ }); export const V1DeleteASsoProviderOutput = Schema.Struct({ id: Schema.String, + domains: Schema.optionalKey( + Schema.Array( + Schema.Struct({ + domain: Schema.optionalKey(Schema.String), + created_at: Schema.optionalKey(Schema.String), + updated_at: Schema.optionalKey(Schema.String), + }), + ), + ), + created_at: Schema.optionalKey(Schema.String), + updated_at: Schema.optionalKey(Schema.String), saml: Schema.optionalKey( Schema.Struct({ entity_id: Schema.String, @@ -2075,19 +2093,22 @@ export const V1DeleteASsoProviderOutput = Schema.Struct({ OpenString, ]), ), + dedicated_scope: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), }), ), - domains: Schema.optionalKey( - Schema.Array( - Schema.Struct({ - domain: Schema.optionalKey(Schema.String), - created_at: Schema.optionalKey(Schema.String), - updated_at: Schema.optionalKey(Schema.String), +}); +export const V1DeleteAllFunctionsInput = Schema.Struct({ + ref: Schema.String.check( + Schema.isMinCodePoints(20).annotate({ expected: "a string with at least 20 code points" }), + ) + .check( + Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" }), + ) + .check( + Schema.isPattern(new RegExp("^[a-z]+$", "u")).annotate({ + expected: "a string matching the RegExp ^[a-z]+$", }), ), - ), - created_at: Schema.optionalKey(Schema.String), - updated_at: Schema.optionalKey(Schema.String), }); export const V1DeleteInviteExternalJitAccessInput = Schema.Struct({ ref: Schema.String.check( @@ -2873,6 +2894,17 @@ export const V1GetASsoProviderInput = Schema.Struct({ }); export const V1GetASsoProviderOutput = Schema.Struct({ id: Schema.String, + domains: Schema.optionalKey( + Schema.Array( + Schema.Struct({ + domain: Schema.optionalKey(Schema.String), + created_at: Schema.optionalKey(Schema.String), + updated_at: Schema.optionalKey(Schema.String), + }), + ), + ), + created_at: Schema.optionalKey(Schema.String), + updated_at: Schema.optionalKey(Schema.String), saml: Schema.optionalKey( Schema.Struct({ entity_id: Schema.String, @@ -2904,19 +2936,9 @@ export const V1GetASsoProviderOutput = Schema.Struct({ OpenString, ]), ), + dedicated_scope: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), }), ), - domains: Schema.optionalKey( - Schema.Array( - Schema.Struct({ - domain: Schema.optionalKey(Schema.String), - created_at: Schema.optionalKey(Schema.String), - updated_at: Schema.optionalKey(Schema.String), - }), - ), - ), - created_at: Schema.optionalKey(Schema.String), - updated_at: Schema.optionalKey(Schema.String), }); export const V1GetActionRunInput = Schema.Struct({ ref: Schema.String.check( @@ -5336,6 +5358,7 @@ export const V1GetProjectLogsInput = Schema.Struct({ }), ), sql: Schema.optionalKey(Schema.String), + lql: Schema.optionalKey(Schema.String), iso_timestamp_start: Schema.optionalKey(Schema.String.annotate({ format: "date-time" })), iso_timestamp_end: Schema.optionalKey(Schema.String.annotate({ format: "date-time" })), }); @@ -6660,6 +6683,17 @@ export const V1ListAllSsoProviderOutput = Schema.Struct({ items: Schema.Array( Schema.Struct({ id: Schema.String, + domains: Schema.optionalKey( + Schema.Array( + Schema.Struct({ + domain: Schema.optionalKey(Schema.String), + created_at: Schema.optionalKey(Schema.String), + updated_at: Schema.optionalKey(Schema.String), + }), + ), + ), + created_at: Schema.optionalKey(Schema.String), + updated_at: Schema.optionalKey(Schema.String), saml: Schema.optionalKey( Schema.Struct({ entity_id: Schema.String, @@ -6691,19 +6725,9 @@ export const V1ListAllSsoProviderOutput = Schema.Struct({ OpenString, ]), ), + dedicated_scope: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), }), ), - domains: Schema.optionalKey( - Schema.Array( - Schema.Struct({ - domain: Schema.optionalKey(Schema.String), - created_at: Schema.optionalKey(Schema.String), - updated_at: Schema.optionalKey(Schema.String), - }), - ), - ), - created_at: Schema.optionalKey(Schema.String), - updated_at: Schema.optionalKey(Schema.String), }), ), }); @@ -7745,6 +7769,55 @@ export const V1PauseAProjectInput = Schema.Struct({ }), ), }); +export const V1PostProjectLogsInput = Schema.Struct({ + ref: Schema.String.check( + Schema.isMinCodePoints(20).annotate({ expected: "a string with at least 20 code points" }), + ) + .check( + Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" }), + ) + .check( + Schema.isPattern(new RegExp("^[a-z]+$", "u")).annotate({ + expected: "a string matching the RegExp ^[a-z]+$", + }), + ), + sql: Schema.optionalKey( + Schema.String.annotate({ + description: + "Custom SQL query to execute on the logs. See [querying logs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#querying-with-the-logs-explorer) for more details.", + }), + ), + lql: Schema.optionalKey( + Schema.String.annotate({ + description: + "Custom LQL query to execute on the logs. See [querying logs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#querying-with-the-logs-explorer) for more details.", + }), + ), + iso_timestamp_start: Schema.optionalKey(Schema.String.annotate({ format: "date-time" })), + iso_timestamp_end: Schema.optionalKey(Schema.String.annotate({ format: "date-time" })), +}); +export const V1PostProjectLogsOutput = Schema.Struct({ + result: Schema.optionalKey(Schema.Array(Schema.Json.annotate({ expected: "JSON value" }))), + error: Schema.optionalKey( + Schema.Union([ + Schema.String, + Schema.Struct({ + code: Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })), + errors: Schema.Array( + Schema.Struct({ + domain: Schema.String, + location: Schema.String, + locationType: Schema.String, + message: Schema.String, + reason: Schema.String, + }), + ), + message: Schema.String, + status: Schema.String, + }), + ]), + ), +}); export const V1PushABranchInput = Schema.Struct({ branch_id_or_ref: Schema.Union([ Schema.String.annotate({ description: "Project ref" }) @@ -8520,6 +8593,17 @@ export const V1UpdateASsoProviderInput = Schema.Struct({ }); export const V1UpdateASsoProviderOutput = Schema.Struct({ id: Schema.String, + domains: Schema.optionalKey( + Schema.Array( + Schema.Struct({ + domain: Schema.optionalKey(Schema.String), + created_at: Schema.optionalKey(Schema.String), + updated_at: Schema.optionalKey(Schema.String), + }), + ), + ), + created_at: Schema.optionalKey(Schema.String), + updated_at: Schema.optionalKey(Schema.String), saml: Schema.optionalKey( Schema.Struct({ entity_id: Schema.String, @@ -8553,17 +8637,6 @@ export const V1UpdateASsoProviderOutput = Schema.Struct({ ), }), ), - domains: Schema.optionalKey( - Schema.Array( - Schema.Struct({ - domain: Schema.optionalKey(Schema.String), - created_at: Schema.optionalKey(Schema.String), - updated_at: Schema.optionalKey(Schema.String), - }), - ), - ), - created_at: Schema.optionalKey(Schema.String), - updated_at: Schema.optionalKey(Schema.String), }); export const V1UpdateActionRunStatusInput = Schema.Struct({ ref: Schema.String.check( @@ -12961,6 +13034,19 @@ export const V2DeletePrivateLinkAssociationForDatabaseInput = Schema.Struct({ aws_account_id: Schema.String, database_identifier: Schema.String, }); +export const V2DeleteProjectFunctionInput = Schema.Struct({ + ref: Schema.String.check( + Schema.isMinCodePoints(20).annotate({ expected: "a string with at least 20 code points" }), + ) + .check( + Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" }), + ) + .check( + Schema.isPattern(new RegExp("^[a-z]+$", "u")).annotate({ + expected: "a string matching the RegExp ^[a-z]+$", + }), + ), +}); export const V2DeployAComputeInstanceInput = Schema.Struct({ ref: Schema.String.check( Schema.isMinCodePoints(20).annotate({ expected: "a string with at least 20 code points" }), @@ -19351,6 +19437,7 @@ export const V1CountActionRunsOutput = Schema.Void; export const V1DeactivateVanitySubdomainConfigOutput = Schema.Void; export const V1DeleteHostnameConfigOutput = Schema.Void; export const V1DeleteAFunctionOutput = Schema.Void; +export const V1DeleteAllFunctionsOutput = Schema.Void; export const V1DeleteInviteExternalJitAccessOutput = Schema.Void; export const V1DeleteJitAccessOutput = Schema.Void; export const V1DeleteNetworkBansOutput = Schema.Void; @@ -19384,6 +19471,7 @@ export const V2DeleteLogDrainOutput = Schema.Void; export const V2DeleteNotebookOutput = Schema.Void; export const V2DeletePrivateLinkAssociationOutput = Schema.Void; export const V2DeletePrivateLinkAssociationForDatabaseOutput = Schema.Void; +export const V2DeleteProjectFunctionOutput = Schema.Void; export const V2RemoveOrganizationMembersOutput = Schema.Void; export const V2TransferAProjectOutput = Schema.Void; @@ -19420,6 +19508,7 @@ export const openApiOperationIdMap = { "v1-delete-a-function": "v1DeleteAFunction", "v1-delete-a-project": "v1DeleteAProject", "v1-delete-a-sso-provider": "v1DeleteASsoProvider", + "v1-delete-all-functions": "v1DeleteAllFunctions", "v1-delete-invite-external-jit-access": "v1DeleteInviteExternalJitAccess", "v1-delete-jit-access": "v1DeleteJitAccess", "v1-delete-login-roles": "v1DeleteLoginRoles", @@ -19516,6 +19605,7 @@ export const openApiOperationIdMap = { "v1-patch-network-restrictions": "v1PatchNetworkRestrictions", "v1-patch-postgres-config": "v1PatchPostgresConfig", "v1-pause-a-project": "v1PauseAProject", + "v1-post-project-logs": "v1PostProjectLogs", "v1-push-a-branch": "v1PushABranch", "v1-read-only-query": "v1ReadOnlyQuery", "v1-remove-a-read-replica": "v1RemoveAReadReplica", @@ -19574,6 +19664,7 @@ export const openApiOperationIdMap = { "v2-delete-organization-invitations": "v2DeleteOrganizationInvitations", "v2-delete-private-link-association": "v2DeletePrivateLinkAssociation", "v2-delete-private-link-association-for-database": "v2DeletePrivateLinkAssociationForDatabase", + "v2-delete-project-function": "v2DeleteProjectFunction", "v2-deploy-a-compute-instance": "v2DeployAComputeInstance", "v2-disable-warehouse": "v2DisableWarehouse", "v2-download-project-backup": "v2DownloadProjectBackup", @@ -19943,6 +20034,7 @@ export const operationDefinitions = { "domains", "attribute_mapping", "name_id_format", + "dedicated_scope", ], }, response: { kind: "json" }, @@ -20148,6 +20240,19 @@ export const operationDefinitions = { inputSchema: V1DeleteASsoProviderInput, outputSchema: V1DeleteASsoProviderOutput, }, + v1DeleteAllFunctions: { + id: "v1DeleteAllFunctions", + description: "Deletes all Edge Functions from a project", + method: "DELETE", + path: "/v1/projects/{ref}/functions", + pathParams: ["ref"], + queryParams: [], + headerParams: [], + requestBody: { kind: "none" }, + response: { kind: "void" }, + inputSchema: V1DeleteAllFunctionsInput, + outputSchema: V1DeleteAllFunctionsOutput, + }, v1DeleteInviteExternalJitAccess: { id: "v1DeleteInviteExternalJitAccess", description: "Revokes and deletes the invitation", @@ -20876,11 +20981,11 @@ export const operationDefinitions = { v1GetProjectLogs: { id: "v1GetProjectLogs", description: - "Executes an SQL or LQL query on the project's unified logs stream.\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\nFilter by the `source` column to specify specific log sources, such as edge_logs, postgres_logs, etc.\n\nNote: SQL must be written in **ClickHouse SQL dialect**.", + "Executes an SQL or LQL query on the project's unified logs stream.\n\n Either the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.\n If both are not provided, only the last 1 minute of logs will be queried.\n The 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\n Filter by the `source` column to specify specific log sources, such as edge_logs, postgres_logs, etc.\n\n Note: SQL must be written in **ClickHouse SQL dialect**.", method: "GET", path: "/v1/projects/{ref}/analytics/endpoints/logs", pathParams: ["ref"], - queryParams: ["sql", "iso_timestamp_start", "iso_timestamp_end"], + queryParams: ["sql", "lql", "iso_timestamp_start", "iso_timestamp_end"], headerParams: [], requestBody: { kind: "none" }, response: { kind: "json" }, @@ -21487,6 +21592,24 @@ export const operationDefinitions = { inputSchema: V1PauseAProjectInput, outputSchema: V1PauseAProjectOutput, }, + v1PostProjectLogs: { + id: "v1PostProjectLogs", + description: + "Executes an SQL or LQL query on the project's unified logs stream.\n\n Either the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.\n If both are not provided, only the last 1 minute of logs will be queried.\n The 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\n Filter by the `source` column to specify specific log sources, such as edge_logs, postgres_logs, etc.\n\n Note: SQL must be written in **ClickHouse SQL dialect**.", + method: "POST", + path: "/v1/projects/{ref}/analytics/endpoints/logs", + pathParams: ["ref"], + queryParams: [], + headerParams: [], + requestBody: { + kind: "json", + contentType: "application/json", + fields: ["sql", "lql", "iso_timestamp_start", "iso_timestamp_end"], + }, + response: { kind: "json" }, + inputSchema: V1PostProjectLogsInput, + outputSchema: V1PostProjectLogsOutput, + }, v1PushABranch: { id: "v1PushABranch", description: "Pushes the specified database branch", @@ -22659,6 +22782,19 @@ export const operationDefinitions = { inputSchema: V2DeletePrivateLinkAssociationForDatabaseInput, outputSchema: V2DeletePrivateLinkAssociationForDatabaseOutput, }, + v2DeleteProjectFunction: { + id: "v2DeleteProjectFunction", + description: "Deletes all Edge Functions from a project", + method: "DELETE", + path: "/v2/projects/{ref}/functions", + pathParams: ["ref"], + queryParams: [], + headerParams: [], + requestBody: { kind: "none" }, + response: { kind: "void" }, + inputSchema: V2DeleteProjectFunctionInput, + outputSchema: V2DeleteProjectFunctionOutput, + }, v2DeployAComputeInstance: { id: "v2DeployAComputeInstance", description: diff --git a/packages/api/src/generated/effect-client.ts b/packages/api/src/generated/effect-client.ts index dc9c08a3c4..9b37dcc2d0 100644 --- a/packages/api/src/generated/effect-client.ts +++ b/packages/api/src/generated/effect-client.ts @@ -518,6 +518,22 @@ export const versionedEffectOperations = { options, ); }), + deleteAllFunctions: ( + input: typeof operationDefinitions.v1DeleteAllFunctions.inputSchema.Type, + options?: SupabaseApiRequestOptions, + ): Effect.Effect< + typeof operationDefinitions.v1DeleteAllFunctions.outputSchema.Type, + SupabaseApiError, + SupabaseApiClient + > => + Effect.gen(function* () { + const client = yield* SupabaseApiClient; + return yield* client.execute<"v1DeleteAllFunctions">( + operationDefinitions.v1DeleteAllFunctions, + input, + options, + ); + }), deleteInviteExternalJitAccess: ( input: typeof operationDefinitions.v1DeleteInviteExternalJitAccess.inputSchema.Type, options?: SupabaseApiRequestOptions, @@ -2054,6 +2070,22 @@ export const versionedEffectOperations = { options, ); }), + postProjectLogs: ( + input: typeof operationDefinitions.v1PostProjectLogs.inputSchema.Type, + options?: SupabaseApiRequestOptions, + ): Effect.Effect< + typeof operationDefinitions.v1PostProjectLogs.outputSchema.Type, + SupabaseApiError, + SupabaseApiClient + > => + Effect.gen(function* () { + const client = yield* SupabaseApiClient; + return yield* client.execute<"v1PostProjectLogs">( + operationDefinitions.v1PostProjectLogs, + input, + options, + ); + }), pushABranch: ( input: typeof operationDefinitions.v1PushABranch.inputSchema.Type, options?: SupabaseApiRequestOptions, @@ -2980,6 +3012,22 @@ export const versionedEffectOperations = { options, ); }), + deleteProjectFunction: ( + input: typeof operationDefinitions.v2DeleteProjectFunction.inputSchema.Type, + options?: SupabaseApiRequestOptions, + ): Effect.Effect< + typeof operationDefinitions.v2DeleteProjectFunction.outputSchema.Type, + SupabaseApiError, + SupabaseApiClient + > => + Effect.gen(function* () { + const client = yield* SupabaseApiClient; + return yield* client.execute<"v2DeleteProjectFunction">( + operationDefinitions.v2DeleteProjectFunction, + input, + options, + ); + }), deployAComputeInstance: ( input: typeof operationDefinitions.v2DeployAComputeInstance.inputSchema.Type, options?: SupabaseApiRequestOptions, diff --git a/packages/api/src/generated/openapi.json b/packages/api/src/generated/openapi.json index cebe86682b..a58036acef 100644 --- a/packages/api/src/generated/openapi.json +++ b/packages/api/src/generated/openapi.json @@ -7110,7 +7110,7 @@ "/v1/projects/{ref}/analytics/endpoints/logs": { "get": { "deprecated": false, - "description": "Executes an SQL or LQL query on the project's unified logs stream.\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\nFilter by the `source` column to specify specific log sources, such as edge_logs, postgres_logs, etc.\n\nNote: SQL must be written in **ClickHouse SQL dialect**.\n", + "description": "Executes an SQL or LQL query on the project's unified logs stream.\n\n Either the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.\n If both are not provided, only the last 1 minute of logs will be queried.\n The 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\n Filter by the `source` column to specify specific log sources, such as edge_logs, postgres_logs, etc.\n\n Note: SQL must be written in **ClickHouse SQL dialect**.\n", "operationId": "v1-get-project-logs", "parameters": [ { @@ -7136,6 +7136,16 @@ "type": "string" } }, + { + "name": "lql", + "required": false, + "in": "query", + "description": "Custom LQL query to execute on the logs. See [querying logs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#querying-with-the-logs-explorer) for more details.", + "schema": { + "example": "s:event_message", + "type": "string" + } + }, { "name": "iso_timestamp_start", "required": false, @@ -7199,6 +7209,76 @@ "x-endpoint-owners": ["observability"], "x-fga-permissions": [["analytics_logs_read"]], "x-oauth-scope": "analytics:read" + }, + "post": { + "deprecated": false, + "description": "Executes an SQL or LQL query on the project's unified logs stream.\n\n Either the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.\n If both are not provided, only the last 1 minute of logs will be queried.\n The 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\n Filter by the `source` column to specify specific log sources, such as edge_logs, postgres_logs, etc.\n\n Note: SQL must be written in **ClickHouse SQL dialect**.\n", + "operationId": "v1-post-project-logs", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1PostProjectLogsBody" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnalyticsResponse_Output" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "402": { + "description": "Usage exceeded. Enable additional usage to continue querying" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Gets all project's logs in a single log stream", + "tags": ["Analytics"], + "x-badges": [ + { + "name": "OAuth scope: analytics:read", + "position": "after" + } + ], + "x-endpoint-owners": ["observability"], + "x-fga-permissions": [["analytics_logs_read"]], + "x-oauth-scope": "analytics:read" } }, "/v1/projects/{ref}/analytics/endpoints/usage.api-counts": { @@ -9169,6 +9249,57 @@ "x-endpoint-owners": ["functions"], "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" + }, + "delete": { + "operationId": "v1-delete-all-functions", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to delete project's functions" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Deletes all Edge Functions from a project", + "tags": ["Edge Functions"], + "x-badges": [ + { + "name": "OAuth scope: edge_functions:write", + "position": "after" + } + ], + "x-endpoint-owners": ["support-tooling", "functions"], + "x-fga-permissions": [["edge_functions_write"]], + "x-oauth-scope": "edge_functions:write" } }, "/v1/projects/{ref}/functions/deploy": { @@ -10601,6 +10732,16 @@ "401": { "description": "Unauthorized" }, + "402": { + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBody" + } + } + } + }, "403": { "description": "Forbidden action" }, @@ -10618,10 +10759,15 @@ ], "summary": "Creates a new SSO provider", "tags": ["Auth"], + "x-allowed-plans": ["Pro", "Team", "Enterprise"], "x-badges": [ { "name": "OAuth scope: auth:write", "position": "after" + }, + { + "name": "Only available on Pro, Team, Enterprise", + "position": "before" } ], "x-endpoint-owners": ["auth"], @@ -10809,6 +10955,16 @@ "401": { "description": "Unauthorized" }, + "402": { + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBody" + } + } + } + }, "403": { "description": "Forbidden action" }, @@ -10826,10 +10982,15 @@ ], "summary": "Updates a SSO provider by its UUID", "tags": ["Auth"], + "x-allowed-plans": ["Pro", "Team", "Enterprise"], "x-badges": [ { "name": "OAuth scope: auth:write", "position": "after" + }, + { + "name": "Only available on Pro, Team, Enterprise", + "position": "before" } ], "x-endpoint-owners": ["auth"], @@ -13347,6 +13508,97 @@ "x-scalar-stability": "experimental" } }, + "/v2/projects/{ref}/functions": { + "delete": { + "operationId": "v2-delete-project-function", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } + }, + "403": { + "description": "Forbidden action", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } + }, + "404": { + "description": "Project not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } + }, + "429": { + "description": "Rate limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } + }, + "500": { + "description": "Failed to delete project functions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Deletes all Edge Functions from a project", + "tags": ["Projects"], + "x-badges": [ + { + "name": "OAuth scope: edge_functions:write", + "position": "after" + } + ], + "x-endpoint-owners": ["support-tooling", "functions"], + "x-fga-permissions": [["edge_functions_write"]], + "x-oauth-scope": "edge_functions:write" + } + }, "/v2/projects/{ref}/notebooks": { "get": { "description": "Returns a cursor-paginated list of the project notebooks. Notebook bodies are omitted — read a single notebook to get its cells.", @@ -38828,6 +39080,40 @@ } } }, + "V1PostProjectLogsBody": { + "type": "object", + "properties": { + "sql": { + "example": "select event_message from edge_logs limit 10", + "description": "Custom SQL query to execute on the logs. See [querying logs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#querying-with-the-logs-explorer) for more details.", + "type": "string" + }, + "lql": { + "example": "s:event_message", + "description": "Custom LQL query to execute on the logs. See [querying logs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#querying-with-the-logs-explorer) for more details.", + "type": "string" + }, + "iso_timestamp_start": { + "example": "2025-03-01T00:00:00Z", + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + "iso_timestamp_end": { + "example": "2025-03-01T23:59:59Z", + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + } + }, + "description": "Request body for searching project logs with POST body", + "example": { + "sql": "select event_message from edge_logs limit 10", + "iso_timestamp_start": "2025-03-01T00:00:00Z", + "iso_timestamp_end": "2025-03-01T23:59:59Z" + }, + "additionalProperties": false + }, "V1GetUsageApiCountResponse_Output": { "type": "object", "properties": { @@ -41327,6 +41613,10 @@ "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" ] + }, + "dedicated_scope": { + "description": "When `true`, the provider's SAML ACS URL and entity ID are scoped to its own provider ID instead of the ones shared by all SAML providers in the project. The same signing key is still used. This cannot be changed once the provider is created.", + "type": "boolean" } }, "required": ["type"], @@ -41355,6 +41645,29 @@ "id": { "type": "string" }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, "saml": { "type": "object", "properties": { @@ -41418,32 +41731,13 @@ "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" ] + }, + "dedicated_scope": { + "type": "boolean", + "nullable": true } }, "required": ["entity_id"] - }, - "domains": { - "type": "array", - "items": { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - } - } - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" } }, "required": ["id"] @@ -41459,6 +41753,29 @@ "id": { "type": "string" }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, "saml": { "type": "object", "properties": { @@ -41522,32 +41839,13 @@ "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" ] + }, + "dedicated_scope": { + "type": "boolean", + "nullable": true } }, "required": ["entity_id"] - }, - "domains": { - "type": "array", - "items": { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - } - } - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" } }, "required": ["id"] @@ -41562,6 +41860,29 @@ "id": { "type": "string" }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, "saml": { "type": "object", "properties": { @@ -41625,32 +41946,13 @@ "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" ] + }, + "dedicated_scope": { + "type": "boolean", + "nullable": true } }, "required": ["entity_id"] - }, - "domains": { - "type": "array", - "items": { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - } - } - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" } }, "required": ["id"] @@ -41734,6 +42036,29 @@ "id": { "type": "string" }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, "saml": { "type": "object", "properties": { @@ -41800,6 +42125,15 @@ } }, "required": ["entity_id"] + } + }, + "required": ["id"] + }, + "DeleteProviderResponse_Output": { + "type": "object", + "properties": { + "id": { + "type": "string" }, "domains": { "type": "array", @@ -41823,15 +42157,6 @@ }, "updated_at": { "type": "string" - } - }, - "required": ["id"] - }, - "DeleteProviderResponse_Output": { - "type": "object", - "properties": { - "id": { - "type": "string" }, "saml": { "type": "object", @@ -41896,32 +42221,13 @@ "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" ] + }, + "dedicated_scope": { + "type": "boolean", + "nullable": true } }, "required": ["entity_id"] - }, - "domains": { - "type": "array", - "items": { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - } - } - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" } }, "required": ["id"] diff --git a/packages/api/src/generated/permissions.ts b/packages/api/src/generated/permissions.ts index c623ac83fb..47c31cf7d7 100644 --- a/packages/api/src/generated/permissions.ts +++ b/packages/api/src/generated/permissions.ts @@ -245,6 +245,7 @@ export const operationPermissions: Readonly "v1-get-security-advisors": { fga: [["advisors_read"]], oauthScope: "database:read" }, "v1-get-project-logs-all": { fga: [["analytics_logs_read"]], oauthScope: "analytics:read" }, "v1-get-project-logs": { fga: [["analytics_logs_read"]], oauthScope: "analytics:read" }, + "v1-post-project-logs": { fga: [["analytics_logs_read"]], oauthScope: "analytics:read" }, "v1-get-project-usage-api-count": { fga: [["analytics_usage_read"]] }, "v1-get-project-usage-request-count": { fga: [["analytics_usage_read"]] }, "v1-get-project-function-combined-stats": { fga: [["analytics_usage_read"]] }, @@ -280,6 +281,10 @@ export const operationPermissions: Readonly fga: [["edge_functions_write"]], oauthScope: "edge_functions:write", }, + "v1-delete-all-functions": { + fga: [["edge_functions_write"]], + oauthScope: "edge_functions:write", + }, "v1-deploy-a-function": { fga: [["edge_functions_write"]], oauthScope: "edge_functions:write" }, "v1-get-a-function": { fga: [["edge_functions_read"]], oauthScope: "edge_functions:read" }, "v1-update-a-function": { fga: [["edge_functions_write"]], oauthScope: "edge_functions:write" }, @@ -379,6 +384,10 @@ export const operationPermissions: Readonly ], ], }, + "v2-delete-project-function": { + fga: [["edge_functions_write"]], + oauthScope: "edge_functions:write", + }, "v2-list-notebooks": { fga: [["project_notebooks_read"]], oauthScope: "database:read" }, "v2-create-notebook": { fga: [["project_notebooks_write"]], oauthScope: "database:write" }, "v2-get-notebook": { fga: [["project_notebooks_read"]], oauthScope: "database:read" },