From 6a6cc1352d0d825ee1bdf530c6d33854a86a0a99 Mon Sep 17 00:00:00 2001 From: jgoux <1443499+jgoux@users.noreply.github.com> Date: Sat, 31 Oct 2026 05:18:14 +0000 Subject: [PATCH] chore(api): sync Management API OpenAPI spec --- packages/api/src/generated/contracts.ts | 334 ++++- packages/api/src/generated/effect-client.ts | 48 + packages/api/src/generated/openapi.json | 1278 ++++++++++++++----- packages/api/src/generated/permissions.ts | 16 +- 4 files changed, 1316 insertions(+), 360 deletions(-) diff --git a/packages/api/src/generated/contracts.ts b/packages/api/src/generated/contracts.ts index 6a546ee8b9..a976666df9 100644 --- a/packages/api/src/generated/contracts.ts +++ b/packages/api/src/generated/contracts.ts @@ -4358,6 +4358,9 @@ export const V1GetPerformanceAdvisorsOutput = Schema.Struct({ "log_auth_error_rate_high", "log_storage_error_rate_high", "log_edge_function_error_rate_high", + "realtime_authorization_timeouts", + "realtime_postgres_changes_spike", + "realtime_concurrent_users_near_limit", "project_not_active", "advisor_check_unavailable", ]), @@ -4906,6 +4909,38 @@ export const V1GetPostgrestServiceConfigOutput = Schema.Struct({ ), Schema.Null, ]), + db_pool_max_lifetime: Schema.Union([ + Schema.Number.annotate({ + description: "If `null`, the value is automatically configured to 1800.", + }) + .check(Schema.isInt().annotate({ expected: "an integer" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }), + ) + .check( + Schema.isLessThanOrEqualTo(3600).annotate({ + expected: "a value less than or equal to 3600", + }), + ), + Schema.Null, + ]), + db_pool_max_idletime: Schema.Union([ + Schema.Number.annotate({ + description: "If `null`, the value is automatically configured to 30.", + }) + .check(Schema.isInt().annotate({ expected: "an integer" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }), + ) + .check( + Schema.isLessThanOrEqualTo(60).annotate({ expected: "a value less than or equal to 60" }), + ), + Schema.Null, + ]), jwt_secret: Schema.optionalKey(Schema.String), }); export const V1GetProfileInput = Schema.Record(Schema.String, Schema.Never); @@ -5823,6 +5858,9 @@ export const V1GetSecurityAdvisorsOutput = Schema.Struct({ "log_auth_error_rate_high", "log_storage_error_rate_high", "log_edge_function_error_rate_high", + "realtime_authorization_timeouts", + "realtime_postgres_changes_spike", + "realtime_concurrent_users_near_limit", "project_not_active", "advisor_check_unavailable", ]), @@ -7678,7 +7716,11 @@ export const V1UpdateAFunctionInput = Schema.Struct({ entrypoint_path: Schema.optionalKey(Schema.String), import_map_path: Schema.optionalKey(Schema.String), ezbr_sha256: Schema.optionalKey(Schema.String), - body: BinaryInput, + body: Schema.String.annotate({ + description: + "Raw Brotli-compressed ESZIP binary file.\n\n**Validation requirements** - The file must start with the four magic bytes `EZBR` (hex: `45 5A 42 52`).\n- The `ezbr_sha256` query parameter must contain the SHA-256 hash of the uploaded ESZIP payload.\n\n**Example**\n```javascript\nimport { readFile } from 'node:fs/promises';\nimport { brotliCompress } from 'node:zlib';\nimport { promisify } from 'node:util';\nimport { createHash } from 'node:crypto';\n\nconst compress = promisify(brotliCompress);\nconst marker = Buffer.from('EZBR', 'ascii');\n\nconst file = await readFile('./function.eszip');\nconst compressed = await compress(file);\n\nconst payload = Buffer.concat([marker, compressed]);\n\nconst ezbr_sha256 = createHash('sha256')\n .update(payload)\n .digest('hex');\n\nconsole.log(ezbr_sha256);\n```\n\n", + format: "binary", + }), }); export const V1UpdateAFunctionOutput = Schema.Struct({ id: Schema.String, @@ -10147,6 +10189,30 @@ export const V1UpdatePostgrestServiceConfigInput = Schema.Struct({ Schema.isLessThanOrEqualTo(60).annotate({ expected: "a value less than or equal to 60" }), ), ), + db_pool_max_lifetime: Schema.optionalKey( + Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }), + ) + .check( + Schema.isLessThanOrEqualTo(3600).annotate({ + expected: "a value less than or equal to 3600", + }), + ), + ), + db_pool_max_idletime: Schema.optionalKey( + Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }), + ) + .check( + Schema.isLessThanOrEqualTo(60).annotate({ expected: "a value less than or equal to 60" }), + ), + ), }); export const V1UpdatePostgrestServiceConfigOutput = Schema.Struct({ db_schema: Schema.String, @@ -10196,6 +10262,38 @@ export const V1UpdatePostgrestServiceConfigOutput = Schema.Struct({ ), Schema.Null, ]), + db_pool_max_lifetime: Schema.Union([ + Schema.Number.annotate({ + description: "If `null`, the value is automatically configured to 1800.", + }) + .check(Schema.isInt().annotate({ expected: "an integer" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }), + ) + .check( + Schema.isLessThanOrEqualTo(3600).annotate({ + expected: "a value less than or equal to 3600", + }), + ), + Schema.Null, + ]), + db_pool_max_idletime: Schema.Union([ + Schema.Number.annotate({ + description: "If `null`, the value is automatically configured to 30.", + }) + .check(Schema.isInt().annotate({ expected: "an integer" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }), + ) + .check( + Schema.isLessThanOrEqualTo(60).annotate({ expected: "a value less than or equal to 60" }), + ), + Schema.Null, + ]), }); export const V1UpdateProjectApiKeyInput = Schema.Struct({ ref: Schema.String.check( @@ -10713,12 +10811,12 @@ export const V2AssignOrganizationMemberRoleInput = Schema.Struct({ user_id: Schema.String.annotate({ format: "uuid" }).check( Schema.isPattern( new RegExp( - "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$", "u", ), ).annotate({ expected: - "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$", }), ), data: Schema.Struct({ @@ -11596,6 +11694,7 @@ export const V2CreateOrganizationInvitationsOutput = Schema.Struct({ "unauthorized", "validation_failed", "agentic_credential_not_found", + "backup_unsupported", "branch_admin_required", "compute_build_context_too_large", "compute_build_in_progress", @@ -12115,6 +12214,30 @@ export const V2DeployAComputeInstanceOutput = Schema.Struct({ }), }), }); +export const V2DownloadProjectBackupInput = 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]+$", + }), + ), + data: Schema.Struct({ + type: Schema.Literal("project_backup_file_url").annotate({ description: "Resource type." }), + id: Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })), + }), +}); +export const V2DownloadProjectBackupOutput = Schema.Struct({ + data: Schema.Struct({ + type: Schema.Literal("project_backup_file_url").annotate({ description: "Resource type." }), + id: Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })), + attributes: Schema.Struct({ file_url: Schema.String }), + }), +}); export const V2GetAComputeInstanceInput = Schema.Struct({ ref: Schema.String.check( Schema.isMinCodePoints(20).annotate({ expected: "a string with at least 20 code points" }), @@ -12802,6 +12925,32 @@ export const V2GetProjectConfigOutput = Schema.Struct({ expected: "a value less than or equal to 9007199254740991", }), ), + db_pool_max_lifetime: Schema.Number.check( + Schema.isInt().annotate({ expected: "an integer" }), + ) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }), + ) + .check( + Schema.isLessThanOrEqualTo(3600).annotate({ + expected: "a value less than or equal to 3600", + }), + ), + db_pool_max_idletime: Schema.Number.check( + Schema.isInt().annotate({ expected: "an integer" }), + ) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }), + ) + .check( + Schema.isLessThanOrEqualTo(60).annotate({ + expected: "a value less than or equal to 60", + }), + ), db_pool: Schema.Union([ Schema.Number.annotate({ description: @@ -13519,6 +13668,68 @@ export const V2ListOrganizationGithubConnectionsOutput = Schema.Struct({ ), }), }); +export const V2ListOrganizationMaintenanceWindowsInput = Schema.Struct({ + slug: Schema.String.check( + Schema.isPattern(new RegExp("^[\\w-]+$", "u")).annotate({ + expected: "a string matching the RegExp ^[\\w-]+$", + }), + ), +}); +export const V2ListOrganizationMaintenanceWindowsOutput = Schema.Struct({ + data: Schema.Array( + Schema.Struct({ + type: Schema.Literal("maintenance_window").annotate({ description: "Resource type." }), + id: Schema.String.annotate({ description: "AWS region." }), + attributes: Schema.Struct({ + window: Schema.Struct({ + day: Schema.Union([ + Schema.Literals(["mon", "tue", "wed", "thu", "fri", "sat", "sun"]).annotate({ + description: "UTC day the window starts.", + }), + OpenString, + ]), + start_utc: Schema.String.annotate({ description: "UTC start time." }), + duration_minutes: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })) + .check( + Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ + expected: "a value greater than or equal to -9007199254740991", + }), + ) + .check( + Schema.isLessThanOrEqualTo(9007199254740991).annotate({ + expected: "a value less than or equal to 9007199254740991", + }), + ), + }), + current_window: Schema.Union([ + Schema.Struct({ + start_at: Schema.String.annotate({ + description: "Start of the occurrence, inclusive.", + format: "date-time", + }), + end_at: Schema.String.annotate({ + description: "End of the occurrence, exclusive.", + format: "date-time", + }), + }).annotate({ description: "The open occurrence, or null when the window is closed." }), + Schema.Null, + ]), + next_windows: Schema.Array( + Schema.Struct({ + start_at: Schema.String.annotate({ + description: "Start of the occurrence, inclusive.", + format: "date-time", + }), + end_at: Schema.String.annotate({ + description: "End of the occurrence, exclusive.", + format: "date-time", + }), + }), + ).annotate({ description: "The next five occurrences that start after now, in order." }), + }), + }), + ), +}); export const V2ListOrganizationMembersInput = Schema.Struct({ slug: Schema.String.check( Schema.isPattern(new RegExp("^[\\w-]+$", "u")).annotate({ @@ -14077,6 +14288,7 @@ export const V2OrganizationsSlugWebhooksDeliveriesIdGetOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -14086,6 +14298,7 @@ export const V2OrganizationsSlugWebhooksDeliveriesIdGetOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", ]).annotate({ description: "Webhook event type." }), OpenString, ]), @@ -14219,6 +14432,7 @@ export const V2OrganizationsSlugWebhooksEndpointsDeleteOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -14228,6 +14442,7 @@ export const V2OrganizationsSlugWebhooksEndpointsDeleteOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -14354,6 +14569,7 @@ export const V2OrganizationsSlugWebhooksEndpointsGetOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -14363,6 +14579,7 @@ export const V2OrganizationsSlugWebhooksEndpointsGetOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -14503,6 +14720,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdDeleteOutput = Schema.Struct( "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -14512,6 +14730,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdDeleteOutput = Schema.Struct( "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -14702,6 +14921,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdDeliveriesGetOutput = Schema. "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -14711,6 +14931,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdDeliveriesGetOutput = Schema. "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", ]).annotate({ description: "Webhook event type." }), OpenString, ]), @@ -14849,6 +15070,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdGetOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -14858,6 +15080,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdGetOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -14953,6 +15176,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdPatchInput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -14962,6 +15186,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdPatchInput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), }), @@ -15062,6 +15287,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdPatchOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -15071,6 +15297,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdPatchOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -15141,6 +15368,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdTestPostInput = Schema.Struct "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -15150,6 +15378,7 @@ export const V2OrganizationsSlugWebhooksEndpointsIdTestPostInput = Schema.Struct "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", ]).annotate({ description: "Webhook event type." }), }), }), @@ -15205,6 +15434,7 @@ export const V2OrganizationsSlugWebhooksEndpointsPostInput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -15214,6 +15444,7 @@ export const V2OrganizationsSlugWebhooksEndpointsPostInput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), }), @@ -15305,6 +15536,7 @@ export const V2OrganizationsSlugWebhooksEndpointsPostOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -15314,6 +15546,7 @@ export const V2OrganizationsSlugWebhooksEndpointsPostOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -15504,6 +15737,7 @@ export const V2ProjectsRefWebhooksDeliveriesIdGetOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -15513,6 +15747,7 @@ export const V2ProjectsRefWebhooksDeliveriesIdGetOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", ]).annotate({ description: "Webhook event type." }), OpenString, ]), @@ -15658,6 +15893,7 @@ export const V2ProjectsRefWebhooksEndpointsDeleteOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -15667,6 +15903,7 @@ export const V2ProjectsRefWebhooksEndpointsDeleteOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -15799,6 +16036,7 @@ export const V2ProjectsRefWebhooksEndpointsGetOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -15808,6 +16046,7 @@ export const V2ProjectsRefWebhooksEndpointsGetOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -15954,6 +16193,7 @@ export const V2ProjectsRefWebhooksEndpointsIdDeleteOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -15963,6 +16203,7 @@ export const V2ProjectsRefWebhooksEndpointsIdDeleteOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -16159,6 +16400,7 @@ export const V2ProjectsRefWebhooksEndpointsIdDeliveriesGetOutput = Schema.Struct "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -16168,6 +16410,7 @@ export const V2ProjectsRefWebhooksEndpointsIdDeliveriesGetOutput = Schema.Struct "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", ]).annotate({ description: "Webhook event type." }), OpenString, ]), @@ -16312,6 +16555,7 @@ export const V2ProjectsRefWebhooksEndpointsIdGetOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -16321,6 +16565,7 @@ export const V2ProjectsRefWebhooksEndpointsIdGetOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -16422,6 +16667,7 @@ export const V2ProjectsRefWebhooksEndpointsIdPatchInput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -16431,6 +16677,7 @@ export const V2ProjectsRefWebhooksEndpointsIdPatchInput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), }), @@ -16531,6 +16778,7 @@ export const V2ProjectsRefWebhooksEndpointsIdPatchOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -16540,6 +16788,7 @@ export const V2ProjectsRefWebhooksEndpointsIdPatchOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -16616,6 +16865,7 @@ export const V2ProjectsRefWebhooksEndpointsIdTestPostInput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -16625,6 +16875,7 @@ export const V2ProjectsRefWebhooksEndpointsIdTestPostInput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", ]).annotate({ description: "Webhook event type." }), }), }), @@ -16686,6 +16937,7 @@ export const V2ProjectsRefWebhooksEndpointsPostInput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -16695,6 +16947,7 @@ export const V2ProjectsRefWebhooksEndpointsPostInput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), }), @@ -16786,6 +17039,7 @@ export const V2ProjectsRefWebhooksEndpointsPostOutput = Schema.Struct({ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -16795,6 +17049,7 @@ export const V2ProjectsRefWebhooksEndpointsPostOutput = Schema.Struct({ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*", ]).annotate({ description: "Webhook event type." }), OpenString, @@ -16832,6 +17087,24 @@ export const V2ProjectsRefWebhooksEndpointsPostOutput = Schema.Struct({ }), }), }); +export const V2RemoveOrganizationMembersInput = Schema.Struct({ + slug: Schema.String.check( + Schema.isPattern(new RegExp("^[\\w-]+$", "u")).annotate({ + expected: "a string matching the RegExp ^[\\w-]+$", + }), + ), + user_id: Schema.String.annotate({ format: "uuid" }).check( + Schema.isPattern( + new RegExp( + "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$", + "u", + ), + ).annotate({ + expected: + "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$", + }), + ), +}); export const V2RunProjectAdvisorsInput = Schema.Struct({ ref: Schema.String.check( Schema.isMinCodePoints(20).annotate({ expected: "a string with at least 20 code points" }), @@ -16891,6 +17164,9 @@ export const V2RunProjectAdvisorsInput = Schema.Struct({ "log_auth_error_rate_high", "log_storage_error_rate_high", "log_edge_function_error_rate_high", + "realtime_authorization_timeouts", + "realtime_postgres_changes_spike", + "realtime_concurrent_users_near_limit", ]), }), ) @@ -16898,7 +17174,7 @@ export const V2RunProjectAdvisorsInput = Schema.Struct({ Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }), ) .check( - Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" }), + Schema.isMaxLength(15).annotate({ expected: "a value with a length of at most 15" }), ), }), }), @@ -16953,6 +17229,9 @@ export const V2RunProjectAdvisorsOutput = Schema.Struct({ "log_auth_error_rate_high", "log_storage_error_rate_high", "log_edge_function_error_rate_high", + "realtime_authorization_timeouts", + "realtime_postgres_changes_spike", + "realtime_concurrent_users_near_limit", "project_not_active", "advisor_check_unavailable", ]), @@ -17682,6 +17961,7 @@ export const V2DeleteLogDrainOutput = Schema.Void; export const V2DeleteNotebookOutput = Schema.Void; export const V2DeletePrivateLinkAssociationOutput = Schema.Void; export const V2DeletePrivateLinkAssociationForDatabaseOutput = Schema.Void; +export const V2RemoveOrganizationMembersOutput = Schema.Void; export const V2TransferAProjectOutput = Schema.Void; export const openApiOperationIdMap = { @@ -17869,6 +18149,7 @@ export const openApiOperationIdMap = { "v2-delete-private-link-association": "v2DeletePrivateLinkAssociation", "v2-delete-private-link-association-for-database": "v2DeletePrivateLinkAssociationForDatabase", "v2-deploy-a-compute-instance": "v2DeployAComputeInstance", + "v2-download-project-backup": "v2DownloadProjectBackup", "v2-get-a-compute-instance": "v2GetAComputeInstance", "v2-get-notebook": "v2GetNotebook", "v2-get-project-config": "v2GetProjectConfig", @@ -17876,6 +18157,7 @@ export const openApiOperationIdMap = { "v2-list-log-drains": "v2ListLogDrains", "v2-list-notebooks": "v2ListNotebooks", "v2-list-organization-github-connections": "v2ListOrganizationGithubConnections", + "v2-list-organization-maintenance-windows": "v2ListOrganizationMaintenanceWindows", "v2-list-organization-members": "v2ListOrganizationMembers", "v2-list-organization-projects": "v2ListOrganizationProjects", "v2-list-organization-roles": "v2ListOrganizationRoles", @@ -17907,6 +18189,7 @@ export const openApiOperationIdMap = { "v2-projects-ref-webhooks-endpoints-id-patch": "v2ProjectsRefWebhooksEndpointsIdPatch", "v2-projects-ref-webhooks-endpoints-id-test-post": "v2ProjectsRefWebhooksEndpointsIdTestPost", "v2-projects-ref-webhooks-endpoints-post": "v2ProjectsRefWebhooksEndpointsPost", + "v2-remove-organization-members": "v2RemoveOrganizationMembers", "v2-run-project-advisors": "v2RunProjectAdvisors", "v2-transfer-a-project": "v2TransferAProject", "v2-update-log-drain": "v2UpdateLogDrain", @@ -20500,6 +20783,8 @@ export const operationDefinitions = { "max_rows", "db_pool", "db_pool_acquisition_timeout", + "db_pool_max_lifetime", + "db_pool_max_idletime", ], }, response: { kind: "json" }, @@ -20852,6 +21137,19 @@ export const operationDefinitions = { inputSchema: V2DeployAComputeInstanceInput, outputSchema: V2DeployAComputeInstanceOutput, }, + v2DownloadProjectBackup: { + id: "v2DownloadProjectBackup", + description: "Download project backup", + method: "POST", + path: "/v2/projects/{ref}/backups/download", + pathParams: ["ref"], + queryParams: [], + headerParams: [], + requestBody: { kind: "json", contentType: "application/json", fields: ["data"] }, + response: { kind: "json" }, + inputSchema: V2DownloadProjectBackupInput, + outputSchema: V2DownloadProjectBackupOutput, + }, v2GetAComputeInstance: { id: "v2GetAComputeInstance", description: @@ -20948,6 +21246,20 @@ export const operationDefinitions = { inputSchema: V2ListOrganizationGithubConnectionsInput, outputSchema: V2ListOrganizationGithubConnectionsOutput, }, + v2ListOrganizationMaintenanceWindows: { + id: "v2ListOrganizationMaintenanceWindows", + description: + "Returns the weekly maintenance window for each region, with the open occurrence and the next five.", + method: "GET", + path: "/v2/organizations/{slug}/maintenance/windows", + pathParams: ["slug"], + queryParams: [], + headerParams: [], + requestBody: { kind: "none" }, + response: { kind: "json" }, + inputSchema: V2ListOrganizationMaintenanceWindowsInput, + outputSchema: V2ListOrganizationMaintenanceWindowsOutput, + }, v2ListOrganizationMembers: { id: "v2ListOrganizationMembers", description: @@ -21286,6 +21598,20 @@ export const operationDefinitions = { inputSchema: V2ProjectsRefWebhooksEndpointsPostInput, outputSchema: V2ProjectsRefWebhooksEndpointsPostOutput, }, + v2RemoveOrganizationMembers: { + id: "v2RemoveOrganizationMembers", + description: + "Removes one or more organization members including their roles and project-scoped permissions.", + method: "DELETE", + path: "/v2/organizations/{slug}/members/{user_id}", + pathParams: ["slug", "user_id"], + queryParams: [], + headerParams: [], + requestBody: { kind: "none" }, + response: { kind: "void" }, + inputSchema: V2RemoveOrganizationMembersInput, + outputSchema: V2RemoveOrganizationMembersOutput, + }, v2RunProjectAdvisors: { id: "v2RunProjectAdvisors", description: "Runs the project advisors with the given names", diff --git a/packages/api/src/generated/effect-client.ts b/packages/api/src/generated/effect-client.ts index d1f8bd2150..59c9ea29aa 100644 --- a/packages/api/src/generated/effect-client.ts +++ b/packages/api/src/generated/effect-client.ts @@ -2948,6 +2948,22 @@ export const versionedEffectOperations = { options, ); }), + downloadProjectBackup: ( + input: typeof operationDefinitions.v2DownloadProjectBackup.inputSchema.Type, + options?: SupabaseApiRequestOptions, + ): Effect.Effect< + typeof operationDefinitions.v2DownloadProjectBackup.outputSchema.Type, + SupabaseApiError, + SupabaseApiClient + > => + Effect.gen(function* () { + const client = yield* SupabaseApiClient; + return yield* client.execute<"v2DownloadProjectBackup">( + operationDefinitions.v2DownloadProjectBackup, + input, + options, + ); + }), getAComputeInstance: ( input: typeof operationDefinitions.v2GetAComputeInstance.inputSchema.Type, options?: SupabaseApiRequestOptions, @@ -3060,6 +3076,22 @@ export const versionedEffectOperations = { options, ); }), + listOrganizationMaintenanceWindows: ( + input: typeof operationDefinitions.v2ListOrganizationMaintenanceWindows.inputSchema.Type, + options?: SupabaseApiRequestOptions, + ): Effect.Effect< + typeof operationDefinitions.v2ListOrganizationMaintenanceWindows.outputSchema.Type, + SupabaseApiError, + SupabaseApiClient + > => + Effect.gen(function* () { + const client = yield* SupabaseApiClient; + return yield* client.execute<"v2ListOrganizationMaintenanceWindows">( + operationDefinitions.v2ListOrganizationMaintenanceWindows, + input, + options, + ); + }), listOrganizationMembers: ( input: typeof operationDefinitions.v2ListOrganizationMembers.inputSchema.Type, options?: SupabaseApiRequestOptions, @@ -3460,6 +3492,22 @@ export const versionedEffectOperations = { options, ); }), + removeOrganizationMembers: ( + input: typeof operationDefinitions.v2RemoveOrganizationMembers.inputSchema.Type, + options?: SupabaseApiRequestOptions, + ): Effect.Effect< + typeof operationDefinitions.v2RemoveOrganizationMembers.outputSchema.Type, + SupabaseApiError, + SupabaseApiClient + > => + Effect.gen(function* () { + const client = yield* SupabaseApiClient; + return yield* client.execute<"v2RemoveOrganizationMembers">( + operationDefinitions.v2RemoveOrganizationMembers, + input, + options, + ); + }), runProjectAdvisors: ( input: typeof operationDefinitions.v2RunProjectAdvisors.inputSchema.Type, options?: SupabaseApiRequestOptions, diff --git a/packages/api/src/generated/openapi.json b/packages/api/src/generated/openapi.json index 9f80f6f044..42344c6444 100644 --- a/packages/api/src/generated/openapi.json +++ b/packages/api/src/generated/openapi.json @@ -2164,6 +2164,9 @@ "403": { "description": "Forbidden action" }, + "404": { + "description": "API key not found for project" + }, "429": { "description": "Rate limit exceeded" } @@ -2240,6 +2243,9 @@ "403": { "description": "Forbidden action" }, + "404": { + "description": "API key not found for project" + }, "429": { "description": "Rate limit exceeded" } @@ -2338,6 +2344,9 @@ "403": { "description": "Forbidden action" }, + "404": { + "description": "API key not found for project" + }, "429": { "description": "Rate limit exceeded" } @@ -9248,13 +9257,12 @@ "content": { "application/vnd.denoland.eszip": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/V1UpdateFunctionBodyEszip" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/V1UpdateFunctionBody" + "$ref": "#/components/schemas/V1UpdateFunctionBodyJson" } } } @@ -12045,6 +12053,114 @@ "x-fga-permissions": [["advisors_read"]] } }, + "/v2/projects/{ref}/backups/download": { + "post": { + "operationId": "v2-download-project-backup", + "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/DownloadBackupBody" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DownloadBackupResponse_Output" + } + } + } + }, + "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 download project backup", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Download project backup", + "tags": ["Projects"], + "x-badges": [ + { + "name": "OAuth scope: database:write", + "position": "after" + } + ], + "x-endpoint-owners": ["infra", "control-plane"], + "x-fga-permissions": [["backups_write"]], + "x-oauth-scope": "database:write" + } + }, "/v2/projects/{ref}/branches": { "post": { "description": "Creates a database branch from the specified project. Compute and disk size can be set here so the branch is provisioned at the requested size, instead of being resized after creation.", @@ -13816,10 +13932,10 @@ "x-scalar-stability": "experimental" } }, - "/v2/organizations/{slug}/members": { + "/v2/organizations/{slug}/roles": { "get": { - "description": "Returns a cursor-paginated list of organization members including their roles and project-scoped permissions.", - "operationId": "v2-list-organization-members", + "description": "Returns a list of org-level roles for the organization.", + "operationId": "v2-list-organization-roles", "parameters": [ { "name": "slug", @@ -13831,51 +13947,6 @@ "example": "tsrqponmlkjihgfedcba", "type": "string" } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "properties": { - "size": { - "type": "integer", - "minimum": 1, - "maximum": 100 - }, - "after": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "before": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - } - }, - "type": "object" - }, - "style": "deepObject" - }, - { - "name": "filter", - "required": false, - "in": "query", - "schema": { - "properties": { - "username": { - "type": "string" - }, - "primary_email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - } - }, - "type": "object" - }, - "style": "deepObject" } ], "responses": { @@ -13884,7 +13955,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V2ListMembersResponse_Output" + "$ref": "#/components/schemas/V2ListRolesResponse_Output" } } } @@ -13925,7 +13996,7 @@ "bearer": [] } ], - "summary": "List members of an organization", + "summary": "List roles of an organization", "tags": ["Organizations"], "x-badges": [ { @@ -13938,10 +14009,10 @@ "x-oauth-scope": "organizations:read" } }, - "/v2/organizations/{slug}/members/{user_id}/roles": { - "patch": { - "description": "Assigns an org-wide role when projects is omitted, or creates a project-scoped assignment when projects is provided. Uses an org-level role template id from GET /v2/organizations/{slug}/roles. Stale role assignments are automatically cleaned up: if a role no longer has any projects, it is deleted; overlapping project assignments in other roles are automatically removed to avoid duplication.", - "operationId": "v2-assign-organization-member-role", + "/v2/organizations/{slug}/members/invitations": { + "post": { + "description": "Creates member invitations for an organization. Each invitation can have different role and project scope settings.", + "operationId": "v2-create-organization-invitations", "parameters": [ { "name": "slug", @@ -13953,14 +14024,104 @@ "example": "tsrqponmlkjihgfedcba", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V2CreateInvitationsRequest" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V2CreateInvitationsResponse_Output" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } }, + "402": { + "description": "This feature requires the Team, or Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } + }, + "403": { + "description": "Forbidden action", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } + }, + "429": { + "description": "Rate limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } + } + }, + "security": [ { - "name": "user_id", + "bearer": [] + } + ], + "summary": "Creates organization invitations", + "tags": ["Organizations Members Invitations"], + "x-allowed-plans": ["Team", "Enterprise"], + "x-badges": [ + { + "name": "OAuth scope: organizations:write", + "position": "after" + }, + { + "name": "Only available on Team, Enterprise", + "position": "before" + } + ], + "x-endpoint-owners": ["control-plane"], + "x-fga-permissions": [["members_write"]], + "x-oauth-scope": "organizations:write" + }, + "delete": { + "description": "Bulk delete member invitations for an organization by email address.", + "operationId": "v2-delete-organization-invitations", + "parameters": [ + { + "name": "slug", "required": true, "in": "path", + "description": "Organization slug", "schema": { - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", "type": "string" } } @@ -13970,7 +14131,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V2AssignOrganizationMemberRoleRequest" + "$ref": "#/components/schemas/V2DeleteInvitationsRequest" } } } @@ -13981,7 +14142,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationMemberRoleResponse_Output" + "$ref": "#/components/schemas/V2DeleteInvitationsResponse_Output" } } } @@ -14025,16 +14186,6 @@ } } } - }, - "500": { - "description": "Failed to assign organization member role", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseBody" - } - } - } } }, "security": [ @@ -14042,23 +14193,28 @@ "bearer": [] } ], - "summary": "Assign or change an organization member role", - "tags": ["Organizations"], + "summary": "Deletes organization invitations by email", + "tags": ["Organizations Members Invitations"], "x-allowed-plans": ["Team", "Enterprise"], "x-badges": [ + { + "name": "OAuth scope: organizations:write", + "position": "after" + }, { "name": "Only available on Team, Enterprise", "position": "before" } ], "x-endpoint-owners": ["control-plane"], - "x-fga-permissions": [["organization_admin_write"]] + "x-fga-permissions": [["members_write"]], + "x-oauth-scope": "organizations:write" } }, - "/v2/organizations/{slug}/roles": { + "/v2/organizations/{slug}/members": { "get": { - "description": "Returns a list of org-level roles for the organization.", - "operationId": "v2-list-organization-roles", + "description": "Returns a cursor-paginated list of organization members including their roles and project-scoped permissions.", + "operationId": "v2-list-organization-members", "parameters": [ { "name": "slug", @@ -14070,6 +14226,51 @@ "example": "tsrqponmlkjihgfedcba", "type": "string" } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "properties": { + "size": { + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "after": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "before": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + } + }, + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "filter", + "required": false, + "in": "query", + "schema": { + "properties": { + "username": { + "type": "string" + }, + "primary_email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, + "type": "object" + }, + "style": "deepObject" } ], "responses": { @@ -14078,7 +14279,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V2ListRolesResponse_Output" + "$ref": "#/components/schemas/V2ListMembersResponse_Output" } } } @@ -14119,7 +14320,7 @@ "bearer": [] } ], - "summary": "List roles of an organization", + "summary": "List members of an organization", "tags": ["Organizations"], "x-badges": [ { @@ -14132,10 +14333,10 @@ "x-oauth-scope": "organizations:read" } }, - "/v2/organizations/{slug}/members/invitations": { - "post": { - "description": "Creates member invitations for an organization. Each invitation can have different role and project scope settings.", - "operationId": "v2-create-organization-invitations", + "/v2/organizations/{slug}/members/{user_id}/roles": { + "patch": { + "description": "Assigns an org-wide role when projects is omitted, or creates a project-scoped assignment when projects is provided. Uses an org-level role template id from GET /v2/organizations/{slug}/roles. Stale role assignments are automatically cleaned up: if a role no longer has any projects, it is deleted; overlapping project assignments in other roles are automatically removed to avoid duplication.", + "operationId": "v2-assign-organization-member-role", "parameters": [ { "name": "slug", @@ -14147,6 +14348,16 @@ "example": "tsrqponmlkjihgfedcba", "type": "string" } + }, + { + "name": "user_id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$", + "type": "string" + } } ], "requestBody": { @@ -14154,18 +14365,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V2CreateInvitationsRequest" + "$ref": "#/components/schemas/V2AssignOrganizationMemberRoleRequest" } } } }, "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V2CreateInvitationsResponse_Output" + "$ref": "#/components/schemas/OrganizationMemberRoleResponse_Output" } } } @@ -14209,6 +14420,16 @@ } } } + }, + "500": { + "description": "Failed to assign organization member role", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } } }, "security": [ @@ -14216,8 +14437,8 @@ "bearer": [] } ], - "summary": "Creates organization invitations", - "tags": ["Organizations Members Invitations"], + "summary": "Assign or change an organization member role", + "tags": ["Organizations"], "x-allowed-plans": ["Team", "Enterprise"], "x-badges": [ { @@ -14230,12 +14451,14 @@ } ], "x-endpoint-owners": ["control-plane"], - "x-fga-permissions": [["members_write"]], + "x-fga-permissions": [["organization_admin_write"]], "x-oauth-scope": "organizations:write" - }, + } + }, + "/v2/organizations/{slug}/members/{user_id}": { "delete": { - "description": "Bulk delete member invitations for an organization by email address.", - "operationId": "v2-delete-organization-invitations", + "description": "Removes one or more organization members including their roles and project-scoped permissions.", + "operationId": "v2-remove-organization-members", "parameters": [ { "name": "slug", @@ -14247,31 +14470,34 @@ "example": "tsrqponmlkjihgfedcba", "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2DeleteInvitationsRequest" - } + }, + { + "name": "user_id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$", + "type": "string" } } - }, + ], "responses": { - "200": { - "description": "", + "204": { + "description": "" + }, + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V2DeleteInvitationsResponse_Output" + "$ref": "#/components/schemas/ErrorResponseBody" } } } }, - "401": { - "description": "Unauthorized", + "403": { + "description": "Forbidden action", "content": { "application/json": { "schema": { @@ -14280,8 +14506,8 @@ } } }, - "402": { - "description": "This feature requires the Team, or Enterprise organization plan.", + "404": { + "description": "Organization member not found", "content": { "application/json": { "schema": { @@ -14290,8 +14516,8 @@ } } }, - "403": { - "description": "Forbidden action", + "429": { + "description": "Rate limit exceeded", "content": { "application/json": { "schema": { @@ -14300,8 +14526,8 @@ } } }, - "429": { - "description": "Rate limit exceeded", + "500": { + "description": "Failed to remove organization member", "content": { "application/json": { "schema": { @@ -14316,21 +14542,16 @@ "bearer": [] } ], - "summary": "Deletes organization invitations by email", - "tags": ["Organizations Members Invitations"], - "x-allowed-plans": ["Team", "Enterprise"], + "summary": "Removes organization members", + "tags": ["Organizations"], "x-badges": [ { "name": "OAuth scope: organizations:write", "position": "after" - }, - { - "name": "Only available on Team, Enterprise", - "position": "before" } ], "x-endpoint-owners": ["control-plane"], - "x-fga-permissions": [["members_write"]], + "x-fga-permissions": [["organization_admin_write"]], "x-oauth-scope": "organizations:write" } }, @@ -14584,6 +14805,94 @@ "x-oauth-scope": "projects:read" } }, + "/v2/organizations/{slug}/maintenance/windows": { + "get": { + "description": "Returns the weekly maintenance window for each region, with the open occurrence and the next five.", + "operationId": "v2-list-organization-maintenance-windows", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V2ListMaintenanceWindowsResponse_Output" + } + } + } + }, + "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": "Organization not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } + }, + "429": { + "description": "Rate limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseBody" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "List maintenance windows of an organization", + "tags": ["Organizations"], + "x-badges": [ + { + "name": "OAuth scope: organizations:read", + "position": "after" + } + ], + "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["organization_admin_read"]], + "x-internal": true, + "x-oauth-scope": "organizations:read" + } + }, "/v2/projects/{ref}/webhooks/endpoints": { "get": { "operationId": "v2-projects-ref-webhooks-endpoints-get", @@ -14698,6 +15007,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -14707,6 +15017,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -15473,6 +15784,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -15482,6 +15794,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -16162,6 +16475,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -16171,6 +16485,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -16311,6 +16626,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -16320,6 +16636,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -17045,6 +17362,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -17054,6 +17372,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -17871,6 +18190,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -17880,6 +18200,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -18654,6 +18975,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -18663,6 +18985,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -18811,6 +19134,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -18820,6 +19144,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -19724,6 +20049,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -19732,7 +20058,8 @@ "v1.organization.member.role.removed", "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded" + "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked" ], "description": "Webhook event type." }, @@ -21429,6 +21756,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -21437,7 +21765,8 @@ "v1.organization.member.role.removed", "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded" + "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked" ], "description": "Webhook event type." } @@ -21610,6 +21939,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -21618,7 +21948,8 @@ "v1.organization.member.role.removed", "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded" + "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked" ], "description": "Webhook event type." }, @@ -23164,6 +23495,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -23173,6 +23505,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -23937,6 +24270,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -23946,6 +24280,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -24626,6 +24961,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -24635,6 +24971,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -24773,6 +25110,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -24782,6 +25120,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -25505,6 +25844,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -25514,6 +25854,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -26329,6 +26670,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -26338,6 +26680,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -27112,6 +27455,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -27121,6 +27465,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -27267,6 +27612,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -27276,6 +27622,7 @@ "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." @@ -28178,6 +28525,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -28186,7 +28534,8 @@ "v1.organization.member.role.removed", "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded" + "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked" ], "description": "Webhook event type." }, @@ -29881,6 +30230,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -29889,7 +30239,8 @@ "v1.organization.member.role.removed", "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded" + "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked" ], "description": "Webhook event type." } @@ -30060,6 +30411,7 @@ "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", + "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", @@ -30068,7 +30420,8 @@ "v1.organization.member.role.removed", "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded" + "v1.organization.billing.plan.downgraded", + "v1.organization.secrets.leaked" ], "description": "Webhook event type." }, @@ -33472,6 +33825,20 @@ "description": "If `null`, the value is automatically configured to 10.", "nullable": true }, + "db_pool_max_lifetime": { + "type": "integer", + "minimum": 0, + "maximum": 3600, + "description": "If `null`, the value is automatically configured to 1800.", + "nullable": true + }, + "db_pool_max_idletime": { + "type": "integer", + "minimum": 0, + "maximum": 60, + "description": "If `null`, the value is automatically configured to 30.", + "nullable": true + }, "jwt_secret": { "type": "string" } @@ -33481,7 +33848,9 @@ "max_rows", "db_extra_search_path", "db_pool", - "db_pool_acquisition_timeout" + "db_pool_acquisition_timeout", + "db_pool_max_lifetime", + "db_pool_max_idletime" ] }, "V1UpdatePostgrestConfigBody": { @@ -33507,6 +33876,16 @@ "type": "integer", "minimum": 0, "maximum": 60 + }, + "db_pool_max_lifetime": { + "type": "integer", + "minimum": 0, + "maximum": 3600 + }, + "db_pool_max_idletime": { + "type": "integer", + "minimum": 0, + "maximum": 60 } }, "example": { @@ -33542,6 +33921,20 @@ "maximum": 9007199254740991, "description": "If `null`, the value is automatically configured to 10.", "nullable": true + }, + "db_pool_max_lifetime": { + "type": "integer", + "minimum": 0, + "maximum": 3600, + "description": "If `null`, the value is automatically configured to 1800.", + "nullable": true + }, + "db_pool_max_idletime": { + "type": "integer", + "minimum": 0, + "maximum": 60, + "description": "If `null`, the value is automatically configured to 30.", + "nullable": true } }, "required": [ @@ -33549,7 +33942,9 @@ "max_rows", "db_extra_search_path", "db_pool", - "db_pool_acquisition_timeout" + "db_pool_acquisition_timeout", + "db_pool_max_lifetime", + "db_pool_max_idletime" ] }, "V1ProjectRefResponse_Output": { @@ -37322,6 +37717,9 @@ "log_auth_error_rate_high", "log_storage_error_rate_high", "log_edge_function_error_rate_high", + "realtime_authorization_timeouts", + "realtime_postgres_changes_spike", + "realtime_concurrent_users_near_limit", "project_not_active", "advisor_check_unavailable" ] @@ -38756,7 +39154,7 @@ "type": "object", "properties": {} }, - "V1UpdateFunctionBody": { + "V1UpdateFunctionBodyJson": { "type": "object", "properties": { "name": { @@ -38775,6 +39173,13 @@ "verify_jwt": true } }, + "V1UpdateFunctionBodyEszip": { + "type": "string", + "format": "binary", + "contentEncoding": "binary", + "description": "Raw Brotli-compressed ESZIP binary file.\n\n**Validation requirements** - The file must start with the four magic bytes `EZBR` (hex: `45 5A 42 52`).\n- The `ezbr_sha256` query parameter must contain the SHA-256 hash of the uploaded ESZIP payload.\n\n**Example**\n```javascript\nimport { readFile } from 'node:fs/promises';\nimport { brotliCompress } from 'node:zlib';\nimport { promisify } from 'node:util';\nimport { createHash } from 'node:crypto';\n\nconst compress = promisify(brotliCompress);\nconst marker = Buffer.from('EZBR', 'ascii');\n\nconst file = await readFile('./function.eszip');\nconst compressed = await compress(file);\n\nconst payload = Buffer.concat([marker, compressed]);\n\nconst ezbr_sha256 = createHash('sha256')\n .update(payload)\n .digest('hex');\n\nconsole.log(ezbr_sha256);\n```\n\n", + "examples": ["Binary Brotli-compressed ESZIP file"] + }, "V1StorageBucketResponse_Output": { "type": "object", "properties": { @@ -41443,6 +41848,7 @@ "unauthorized", "validation_failed", "agentic_credential_not_found", + "backup_unsupported", "branch_admin_required", "compute_build_context_too_large", "compute_build_in_progress", @@ -42295,7 +42701,7 @@ "properties": { "lints": { "minItems": 1, - "maxItems": 10, + "maxItems": 15, "type": "array", "items": { "type": "object", @@ -42342,7 +42748,10 @@ "log_data_api_error_rate_high", "log_auth_error_rate_high", "log_storage_error_rate_high", - "log_edge_function_error_rate_high" + "log_edge_function_error_rate_high", + "realtime_authorization_timeouts", + "realtime_postgres_changes_spike", + "realtime_concurrent_users_near_limit" ] } }, @@ -42423,6 +42832,9 @@ "log_auth_error_rate_high", "log_storage_error_rate_high", "log_edge_function_error_rate_high", + "realtime_authorization_timeouts", + "realtime_postgres_changes_spike", + "realtime_concurrent_users_near_limit", "project_not_active", "advisor_check_unavailable" ] @@ -42524,6 +42936,55 @@ }, "required": ["data"] }, + "DownloadBackupBody": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["project_backup_file_url"] + }, + "id": { + "type": "number" + } + }, + "required": ["type", "id"] + } + }, + "required": ["data"] + }, + "DownloadBackupResponse_Output": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["project_backup_file_url"] + }, + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "file_url": { + "type": "string" + } + }, + "required": ["file_url"] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + }, "V2CreateBranchRequest": { "type": "object", "properties": { @@ -43013,6 +43474,16 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "db_pool_max_lifetime": { + "type": "integer", + "minimum": 0, + "maximum": 3600 + }, + "db_pool_max_idletime": { + "type": "integer", + "minimum": 0, + "maximum": 60 + }, "db_pool": { "type": "integer", "minimum": -9007199254740991, @@ -43026,6 +43497,8 @@ "db_extra_search_path", "max_rows", "db_pool_acquisition_timeout", + "db_pool_max_lifetime", + "db_pool_max_idletime", "db_pool" ] }, @@ -44786,227 +45259,6 @@ }, "required": ["data"] }, - "V2ListMembersResponse_Output": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["organization_member"] - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$" - }, - "attributes": { - "type": "object", - "properties": { - "username": { - "type": "string", - "description": "Member's username", - "nullable": true - }, - "primary_email": { - "type": "string", - "description": "Member's primary email", - "nullable": true - }, - "mfa_enabled": { - "type": "boolean", - "description": "Whether Multi-Factor Authentication is enabled for this member" - }, - "is_sso_user": { - "type": "boolean", - "description": "Whether this member is a Single Sign-On user" - }, - "avatar_url": { - "type": "string", - "description": "Member's avatar URL", - "nullable": true - }, - "roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Role name. For project-scoped roles this is the base role name.", - "example": "developer" - }, - "scope": { - "type": "string", - "enum": ["organization", "project"], - "description": "Whether this role applies org-wide or is scoped to specific projects for the user." - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["ref", "name"] - }, - "description": "Project refs this role is scoped to. Empty array for org-level roles." - } - }, - "required": ["name", "scope", "projects"] - }, - "description": "Roles assigned to this member. Includes both org-level and project-scoped roles." - } - }, - "required": [ - "username", - "primary_email", - "mfa_enabled", - "is_sso_user", - "avatar_url", - "roles" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "type": "string", - "description": "URL path to the first page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10", - "nullable": true - }, - "prev": { - "type": "string", - "description": "URL path to the previous page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", - "nullable": true - }, - "next": { - "type": "string", - "description": "URL path to the next page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", - "nullable": true - }, - "last": { - "type": "string", - "description": "URL path to the last page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", - "nullable": true - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - }, - "V2AssignOrganizationMemberRoleRequest": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["organization_member_role"] - }, - "attributes": { - "type": "object", - "properties": { - "role": { - "type": "string", - "enum": ["owner", "administrator", "developer", "read-only", "no-access"], - "description": "Role name to assign. Must be one of: owner, administrator, developer, read-only. Must be on a Team or Enterprise plan to use the read-only role.", - "example": "developer" - }, - "projects": { - "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role.", - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string", - "description": "Project ref", - "example": "abcjuqabhgwjjutfvtpa" - } - }, - "required": ["ref"] - } - } - }, - "required": ["role"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - }, - "OrganizationMemberRoleResponse_Output": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["organization_member_role"] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Role name. For project-scoped assignments this is the base role name.", - "example": "developer" - }, - "scope": { - "type": "string", - "enum": ["organization", "project"], - "description": "Whether this role applies org-wide or is scoped to specific projects for the user." - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["ref", "name"] - }, - "description": "Project refs this role is scoped to. Empty array for org-level roles." - } - }, - "required": ["name", "scope", "projects"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - }, "V2ListRolesResponse_Output": { "type": "object", "properties": { @@ -45126,6 +45378,7 @@ "unauthorized", "validation_failed", "agentic_credential_not_found", + "backup_unsupported", "branch_admin_required", "compute_build_context_too_large", "compute_build_in_progress", @@ -45358,6 +45611,227 @@ }, "required": ["data"] }, + "V2ListMembersResponse_Output": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["organization_member"] + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$" + }, + "attributes": { + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "Member's username", + "nullable": true + }, + "primary_email": { + "type": "string", + "description": "Member's primary email", + "nullable": true + }, + "mfa_enabled": { + "type": "boolean", + "description": "Whether Multi-Factor Authentication is enabled for this member" + }, + "is_sso_user": { + "type": "boolean", + "description": "Whether this member is a Single Sign-On user" + }, + "avatar_url": { + "type": "string", + "description": "Member's avatar URL", + "nullable": true + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Role name. For project-scoped roles this is the base role name.", + "example": "developer" + }, + "scope": { + "type": "string", + "enum": ["organization", "project"], + "description": "Whether this role applies org-wide or is scoped to specific projects for the user." + }, + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["ref", "name"] + }, + "description": "Project refs this role is scoped to. Empty array for org-level roles." + } + }, + "required": ["name", "scope", "projects"] + }, + "description": "Roles assigned to this member. Includes both org-level and project-scoped roles." + } + }, + "required": [ + "username", + "primary_email", + "mfa_enabled", + "is_sso_user", + "avatar_url", + "roles" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "type": "string", + "description": "URL path to the first page if available.", + "example": "/v2/organizations/my-org/members?page[size]=10", + "nullable": true + }, + "prev": { + "type": "string", + "description": "URL path to the previous page.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", + "nullable": true + }, + "next": { + "type": "string", + "description": "URL path to the next page.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", + "nullable": true + }, + "last": { + "type": "string", + "description": "URL path to the last page if available.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", + "nullable": true + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + }, + "V2AssignOrganizationMemberRoleRequest": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["organization_member_role"] + }, + "attributes": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": ["owner", "administrator", "developer", "read-only", "no-access"], + "description": "Role name to assign. Must be one of: owner, administrator, developer, read-only. Must be on a Team or Enterprise plan to use the read-only role.", + "example": "developer" + }, + "projects": { + "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role.", + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string", + "description": "Project ref", + "example": "abcjuqabhgwjjutfvtpa" + } + }, + "required": ["ref"] + } + } + }, + "required": ["role"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + }, + "OrganizationMemberRoleResponse_Output": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["organization_member_role"] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Role name. For project-scoped assignments this is the base role name.", + "example": "developer" + }, + "scope": { + "type": "string", + "enum": ["organization", "project"], + "description": "Whether this role applies org-wide or is scoped to specific projects for the user." + }, + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["ref", "name"] + }, + "description": "Project refs this role is scoped to. Empty array for org-level roles." + } + }, + "required": ["name", "scope", "projects"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + }, "V2ListProjectsResponse_Output": { "type": "object", "properties": { @@ -45697,6 +46171,101 @@ }, "required": ["data", "links"] }, + "V2ListMaintenanceWindowsResponse_Output": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["maintenance_window"] + }, + "id": { + "type": "string", + "description": "AWS region.", + "example": "us-east-1" + }, + "attributes": { + "type": "object", + "properties": { + "window": { + "type": "object", + "properties": { + "day": { + "type": "string", + "enum": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], + "description": "UTC day the window starts." + }, + "start_utc": { + "type": "string", + "description": "UTC start time.", + "example": "06:00" + }, + "duration_minutes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "example": 120 + } + }, + "required": ["day", "start_utc", "duration_minutes"] + }, + "current_window": { + "type": "object", + "properties": { + "start_at": { + "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": "Start of the occurrence, inclusive." + }, + "end_at": { + "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": "End of the occurrence, exclusive." + } + }, + "required": ["start_at", "end_at"], + "description": "The open occurrence, or null when the window is closed.", + "nullable": true + }, + "next_windows": { + "type": "array", + "items": { + "type": "object", + "properties": { + "start_at": { + "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": "Start of the occurrence, inclusive." + }, + "end_at": { + "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": "End of the occurrence, exclusive." + } + }, + "required": ["start_at", "end_at"] + }, + "description": "The next five occurrences that start after now, in order." + } + }, + "required": ["window", "current_window", "next_windows"] + } + }, + "required": ["type", "id", "attributes"] + } + } + }, + "required": ["data"] + }, "APIErrorObject": { "type": "object", "properties": { @@ -45717,6 +46286,7 @@ "unauthorized", "validation_failed", "agentic_credential_not_found", + "backup_unsupported", "branch_admin_required", "compute_build_context_too_large", "compute_build_in_progress", diff --git a/packages/api/src/generated/permissions.ts b/packages/api/src/generated/permissions.ts index 42196b9d25..51180dad11 100644 --- a/packages/api/src/generated/permissions.ts +++ b/packages/api/src/generated/permissions.ts @@ -344,6 +344,7 @@ export const operationPermissions: Readonly oauthScope: "analytics_config:write", }, "v2-run-project-advisors": { fga: [["advisors_read"]] }, + "v2-download-project-backup": { fga: [["backups_write"]], oauthScope: "database:write" }, "v2-create-a-branch": { fga: [["branching_development_create"], ["branching_production_create"]], oauthScope: "environment:write", @@ -381,8 +382,6 @@ export const operationPermissions: Readonly oauthScope: "edge_functions:write", }, "v2-deploy-a-compute-instance": { fga: [["workers_write"]], oauthScope: "edge_functions:write" }, - "v2-list-organization-members": { fga: [["members_read"]], oauthScope: "organizations:read" }, - "v2-assign-organization-member-role": { fga: [["organization_admin_write"]] }, "v2-list-organization-roles": { fga: [["members_read"]], oauthScope: "organizations:read" }, "v2-create-organization-invitations": { fga: [["members_write"]], @@ -392,6 +391,15 @@ export const operationPermissions: Readonly fga: [["members_write"]], oauthScope: "organizations:write", }, + "v2-list-organization-members": { fga: [["members_read"]], oauthScope: "organizations:read" }, + "v2-assign-organization-member-role": { + fga: [["organization_admin_write"]], + oauthScope: "organizations:write", + }, + "v2-remove-organization-members": { + fga: [["organization_admin_write"]], + oauthScope: "organizations:write", + }, "v2-list-organization-projects": { fga: [["organization_projects_read"]], oauthScope: "projects:read", @@ -400,6 +408,10 @@ export const operationPermissions: Readonly fga: [["organization_projects_read"]], oauthScope: "projects:read", }, + "v2-list-organization-maintenance-windows": { + fga: [["organization_admin_read"]], + oauthScope: "organizations:read", + }, "v2-projects-ref-webhooks-endpoints-get": { fga: [] }, "v2-projects-ref-webhooks-endpoints-post": { fga: [] }, "v2-projects-ref-webhooks-endpoints-delete": { fga: [] },