mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore: Update API types (#48981)
Update the API types by running `api:codegen`. Some of the changes are fixed in code, some of the type changes had to be reverted (JIT Access, SSO features). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Billing** * Updated subscription messaging to reflect AWS Marketplace billing. * Removed outdated partner-billing downgrade notices. * **Bug Fixes** * Improved request handling for API keys, custom domains, SQL snippets, branches, and storage operations. * Improved legacy signing-key compatibility. * Refined temporary database access availability messaging. * **Updates** * Removed Fly as an available cloud provider for region selection. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
1 parent
2f8181b8bb
commit
b5477a89a3
21 files changed
+3001
-1210
No files matched your search
-6
@@ -170,12 +170,6 @@ export const DowngradeModal = ({
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{subscription?.billing_via_partner === true && subscription.billing_partner === 'fly' && (
|
||||
<p className="mt-4 text-sm">
|
||||
Your organization will be downgraded at the end of your current billing cycle.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button variant={'default'} onClick={onClose}>
|
||||
|
||||
-8
@@ -378,14 +378,6 @@ export const SubscriptionPlanUpdateDialog = ({
|
||||
<>You will be charged by them directly.</>
|
||||
)}
|
||||
</p>
|
||||
{billingViaPartner &&
|
||||
billingPartner === 'fly' &&
|
||||
subscriptionPreview?.plan_change_type === 'downgrade' && (
|
||||
<p className="text-sm">
|
||||
Your organization will be downgraded at the end of your current billing
|
||||
cycle.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
+2
@@ -121,6 +121,7 @@ describe('getJitMemberOptions', () => {
|
||||
const organizationMembers: OrganizationMembersData = [
|
||||
{
|
||||
gotrue_id: 'de305d54-75b4-431b-adb2-eb6b9e546014',
|
||||
avatar_url: null,
|
||||
primary_email: 'active@example.com',
|
||||
username: 'Active User',
|
||||
is_sso_user: false,
|
||||
@@ -130,6 +131,7 @@ describe('getJitMemberOptions', () => {
|
||||
},
|
||||
{
|
||||
gotrue_id: '',
|
||||
avatar_url: null,
|
||||
invited_id: 123,
|
||||
invited_at: '2026-03-01T00:00:00.000Z',
|
||||
primary_email: 'expired-invite@example.com',
|
||||
|
||||
+10
-13
@@ -318,19 +318,15 @@ export const JitDbAccessConfiguration = () => {
|
||||
const unavailableTitle =
|
||||
unavailableReason === 'postgres_upgrade_required'
|
||||
? 'Postgres upgrade required'
|
||||
: unavailableReason === 'manual_migration_required'
|
||||
? 'Migration required'
|
||||
: unavailableReason === 'ssl_enforcement_required'
|
||||
? 'SSL enforcement required'
|
||||
: 'Temporary access unavailable'
|
||||
: unavailableReason === 'ssl_enforcement_required'
|
||||
? 'SSL enforcement required'
|
||||
: 'Temporary access unavailable'
|
||||
const unavailableDescription =
|
||||
unavailableReason === 'postgres_upgrade_required'
|
||||
? 'must be upgraded to Postgres 17 or later before temporary access can be enabled.'
|
||||
: unavailableReason === 'manual_migration_required'
|
||||
? 'must be migrated before temporary access can be enabled. Contact support to migrate this project.'
|
||||
: unavailableReason === 'ssl_enforcement_required'
|
||||
? 'must have SSL enforcement enabled before temporary access can be enabled.'
|
||||
: 'This feature is currently unavailable for this project. Contact support if you need help enabling it.'
|
||||
: unavailableReason === 'ssl_enforcement_required'
|
||||
? 'must have SSL enforcement enabled before temporary access can be enabled.'
|
||||
: 'This feature is currently unavailable for this project. Contact support if you need help enabling it.'
|
||||
|
||||
useEffect(() => {
|
||||
if (!isLoadingConfiguration && jitDbAccessConfiguration) {
|
||||
@@ -386,12 +382,13 @@ export const JitDbAccessConfiguration = () => {
|
||||
layout="responsive"
|
||||
title={unavailableTitle}
|
||||
description={
|
||||
unavailableReason === 'temporarily_unavailable' ? (
|
||||
unavailableDescription
|
||||
) : (
|
||||
unavailableReason === 'postgres_upgrade_required' ||
|
||||
unavailableReason === 'ssl_enforcement_required' ? (
|
||||
<>
|
||||
{projectReference} {unavailableDescription}
|
||||
</>
|
||||
) : (
|
||||
unavailableDescription
|
||||
)
|
||||
}
|
||||
actions={
|
||||
|
||||
@@ -18,7 +18,7 @@ export async function createAPIKey(payload: APIKeyCreateVariables) {
|
||||
params: {
|
||||
path: { ref: payload.projectRef },
|
||||
query: {
|
||||
reveal: false,
|
||||
reveal: 'false',
|
||||
},
|
||||
},
|
||||
body: {
|
||||
@@ -29,7 +29,7 @@ export async function createAPIKey(payload: APIKeyCreateVariables) {
|
||||
role: 'service_role',
|
||||
},
|
||||
}
|
||||
: name),
|
||||
: {}),
|
||||
|
||||
type: payload.type,
|
||||
name: payload.name,
|
||||
|
||||
@@ -16,7 +16,7 @@ export async function deleteAPIKey(payload: APIKeyDeleteVariables) {
|
||||
const { data, error } = await del('/v1/projects/{ref}/api-keys/{id}', {
|
||||
params: {
|
||||
path: { ref: payload.projectRef, id: payload.id },
|
||||
query: { reveal: false },
|
||||
query: { reveal: 'false' },
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ export async function getAPIKeysById(
|
||||
const { data, error } = await get('/v1/projects/{ref}/api-keys/{id}', {
|
||||
params: {
|
||||
path: { ref: projectRef, id },
|
||||
query: { reveal },
|
||||
query: { reveal: reveal ? 'true' : 'false' },
|
||||
},
|
||||
signal,
|
||||
})
|
||||
|
||||
@@ -55,7 +55,7 @@ async function getAPIKeys({ projectRef, reveal }: APIKeysVariables, signal?: Abo
|
||||
if (!projectRef) throw new Error('projectRef is required')
|
||||
|
||||
const { data, error } = await get(`/v1/projects/{ref}/api-keys`, {
|
||||
params: { path: { ref: projectRef }, query: { reveal } },
|
||||
params: { path: { ref: projectRef }, query: { reveal: reveal ? 'true' : 'false' } },
|
||||
signal,
|
||||
})
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ export async function toggleLegacyAPIKeys(payload: ToggleLegacyAPIKeysVariables)
|
||||
const { data, error } = await put('/v1/projects/{ref}/api-keys/legacy', {
|
||||
params: {
|
||||
path: { ref: payload.projectRef },
|
||||
query: { enabled: payload.enabled },
|
||||
query: { enabled: payload.enabled ? 'true' : 'false' },
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -24,10 +24,7 @@ export async function getBranchDiff({
|
||||
const { data: diffData, error } = await get('/v1/branches/{branch_id_or_ref}/diff', {
|
||||
params: {
|
||||
path: { branch_id_or_ref: branchRef },
|
||||
query:
|
||||
Object.keys(query).length > 0
|
||||
? (query as { included_schemas?: string; pgdelta?: boolean })
|
||||
: undefined,
|
||||
query: Object.keys(query).length > 0 ? query : undefined,
|
||||
},
|
||||
headers: {
|
||||
Accept: 'text/plain',
|
||||
|
||||
@@ -40,7 +40,7 @@ export async function getSqlSnippets(
|
||||
type,
|
||||
cursor,
|
||||
visibility,
|
||||
favorite,
|
||||
favorite: favorite?.toString(),
|
||||
name,
|
||||
limit: SNIPPET_PAGE_LIMIT.toString(),
|
||||
sort_by: sort,
|
||||
|
||||
@@ -18,7 +18,7 @@ export async function deleteCustomDomain({
|
||||
const { data, error } = await del(`/v1/projects/{ref}/custom-hostname`, {
|
||||
params: {
|
||||
path: { ref: projectRef },
|
||||
query: { remove_addon: removeAddon },
|
||||
query: { remove_addon: removeAddon ? 'true' : 'false' },
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ export type DesiredInstanceSizeForAvailableRegions =
|
||||
|
||||
export type OrganizationAvailableRegionsVariables = {
|
||||
slug?: string
|
||||
cloudProvider: 'AWS' | 'FLY' | 'AWS_K8S' | 'AWS_NIMBUS'
|
||||
cloudProvider: 'AWS' | 'AWS_K8S' | 'AWS_NIMBUS'
|
||||
desiredInstanceSize?: DesiredInstanceSizeForAvailableRegions
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ async function deleteIcebergNamespaceTable({
|
||||
{
|
||||
params: {
|
||||
path: { ref: projectRef, id: warehouse, namespace, table },
|
||||
query: { purge: true },
|
||||
query: { purge: 'true' },
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
@@ -30,6 +30,7 @@ describe('api/self-hosted/signing-keys', () => {
|
||||
expect(key).toEqual({
|
||||
id: '00000000-0000-0000-0000-000000000000',
|
||||
algorithm: 'HS256',
|
||||
public_jwk: '',
|
||||
status: 'in_use',
|
||||
created_at: '1970-01-01T00:00:00.000Z',
|
||||
updated_at: '1970-01-01T00:00:00.000Z',
|
||||
|
||||
@@ -24,6 +24,7 @@ export function getLegacySigningKey(): SigningKeyResponse {
|
||||
return {
|
||||
id: LEGACY_KEY_ID,
|
||||
algorithm: 'HS256',
|
||||
public_jwk: '',
|
||||
status: 'in_use',
|
||||
created_at: LEGACY_KEY_CREATED_AT,
|
||||
updated_at: LEGACY_KEY_CREATED_AT,
|
||||
|
||||
@@ -35,7 +35,7 @@ const handleGet = async (_req: NextApiRequest, res: NextApiResponse<ResponseData
|
||||
project_addons: [],
|
||||
payment_method_type: '',
|
||||
billing_via_partner: false,
|
||||
billing_partner: 'fly',
|
||||
billing_partner: 'aws_marketplace',
|
||||
scheduled_plan_change: null,
|
||||
customer_balance: 0,
|
||||
}
|
||||
|
||||
+1
@@ -67,6 +67,7 @@ const buildRole = (id: number, name: string): OrganizationRoleResponse['org_scop
|
||||
|
||||
const buildMember = (overrides: Partial<Member>): Member => ({
|
||||
gotrue_id: 'gotrue-test',
|
||||
avatar_url: null,
|
||||
is_sso_user: false,
|
||||
metadata: {},
|
||||
mfa_enabled: false,
|
||||
|
||||
+1
@@ -83,6 +83,7 @@ const buildPermission = (resource: string): AccessControlPermission => ({
|
||||
|
||||
const MEMBER: OrganizationMember = {
|
||||
gotrue_id: 'gotrue-member',
|
||||
avatar_url: null,
|
||||
is_sso_user: false,
|
||||
metadata: {},
|
||||
mfa_enabled: false,
|
||||
|
||||
Vendored
+635
-111
File diff suppressed because it is too large.
Load diff
+2338
-1057
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user