The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: SupaResponse type errors
Greg Richardson465b83e8e415
diff --git a/studio/components/interfaces/Database/Functions/CreateFunction.tsx b/studio/components/interfaces/Database/Functions/CreateFunction.tsxindex d2d77ae52e1..cc087fe23ca 100644--- a/studio/components/interfaces/Database/Functions/CreateFunction.tsx+++ b/studio/components/interfaces/Database/Functions/CreateFunction.tsx@@ -12,6 +12,7 @@ import { POSTGRES_DATA_TYPES } from 'components/interfaces/TableGridEditor/SidePimport ConfirmationModal from 'components/ui/ConfirmationModal'import { isResponseOk } from 'lib/common/fetch'import { SupaResponse } from 'types'+import { Function } from 'components/interfaces/Functions/Functions.types'// [Refactor] Remove local state, just use the Form component@@ -320,7 +321,7 @@ const CreateFunction: FC<CreateFunctionProps> = ({ func, visible, setVisible })_localState.setLoading(true)const body = _localState.formState.requestBody- const response: SupaResponse<any> = body.id+ const response: SupaResponse<Function> = body.id? await (_localState!.meta as any).functions.update(body.id, body): await (_localState!.meta as any).functions.create(body)diff --git a/studio/components/interfaces/Organization/NewOrg/NewOrgForm.tsx b/studio/components/interfaces/Organization/NewOrg/NewOrgForm.tsxindex addc153125e..09568fe8846 100644--- a/studio/components/interfaces/Organization/NewOrg/NewOrgForm.tsx+++ b/studio/components/interfaces/Organization/NewOrg/NewOrgForm.tsx@@ -23,6 +23,7 @@ import { API_URL, BASE_PATH, PRICING_TIER_LABELS_ORG } from 'lib/constants'import { getURL } from 'lib/helpers'import Link from 'next/link'import { SpendCapModal } from 'components/interfaces/BillingV2'+import { Organization } from 'types'const ORG_KIND_TYPES = {PERSONAL: 'Personal',@@ -92,7 +93,7 @@ const NewOrgForm = ({ onPaymentMethodReset }: NewOrgFormProps) => {async function createOrg(paymentMethodId?: string) {const dbTier = dbPricingTierKey === 'PRO' && !isSpendCapEnabled ? 'PAYG' : dbPricingTierKey- const response = await post(+ const response = await post<Organization>(`${API_URL}/organizations`,{name: orgName,