+ Supabase deployment metadata unavailable.
+
+ )
+ }
+
+ const { project } = metadata
const projectUrl = `${process.env.NEXT_PUBLIC_SUPABASE_PLATFORM_URL}/dashboard/project/${project.id}`
const databaseUrl = getDatabaseUrl({ project })
diff --git a/apps/web/data/databases/database-create-mutation.ts b/apps/web/data/databases/database-create-mutation.ts
index de2a78e9..6577614c 100644
--- a/apps/web/data/databases/database-create-mutation.ts
+++ b/apps/web/data/databases/database-create-mutation.ts
@@ -23,9 +23,9 @@ export const useDatabaseCreateMutation = ({
}
return await dbManager.createDatabase(id, { isHidden })
},
- async onSuccess(data, variables, context) {
+ async onSuccess(data, variables, context, mutation) {
await Promise.all([queryClient.invalidateQueries({ queryKey: getDatabasesQueryKey() })])
- return onSuccess?.(data, variables, context)
+ return onSuccess?.(data, variables, context as any, mutation as any)
},
...options,
})
diff --git a/apps/web/data/databases/database-delete-mutation.ts b/apps/web/data/databases/database-delete-mutation.ts
index 444bc25c..0e64fa19 100644
--- a/apps/web/data/databases/database-delete-mutation.ts
+++ b/apps/web/data/databases/database-delete-mutation.ts
@@ -22,12 +22,12 @@ export const useDatabaseDeleteMutation = ({
}
return await dbManager.deleteDatabase(id)
},
- async onSuccess(data, variables, context) {
+ async onSuccess(data, variables, context, mutation) {
await Promise.all([queryClient.invalidateQueries({ queryKey: getDatabasesQueryKey() })])
await Promise.all([
queryClient.invalidateQueries({ queryKey: getDatabaseQueryKey(variables.id) }),
])
- return onSuccess?.(data, variables, context)
+ return onSuccess?.(data, variables, context as any, mutation as any)
},
...options,
})
diff --git a/apps/web/data/databases/database-update-mutation.ts b/apps/web/data/databases/database-update-mutation.ts
index 7fa967a6..4c89f40b 100644
--- a/apps/web/data/databases/database-update-mutation.ts
+++ b/apps/web/data/databases/database-update-mutation.ts
@@ -25,12 +25,12 @@ export const useDatabaseUpdateMutation = ({
}
return await dbManager.updateDatabase(id, { name, isHidden })
},
- async onSuccess(data, variables, context) {
+ async onSuccess(data, variables, context, mutation) {
await Promise.all([queryClient.invalidateQueries({ queryKey: getDatabasesQueryKey() })])
await Promise.all([
queryClient.invalidateQueries({ queryKey: getDatabaseQueryKey(variables.id) }),
])
- return onSuccess?.(data, variables, context)
+ return onSuccess?.(data, variables, context as any, mutation as any)
},
...options,
})
diff --git a/apps/web/data/deploy-waitlist/deploy-waitlist-create-mutation.ts b/apps/web/data/deploy-waitlist/deploy-waitlist-create-mutation.ts
index 827d95af..4fc39c53 100644
--- a/apps/web/data/deploy-waitlist/deploy-waitlist-create-mutation.ts
+++ b/apps/web/data/deploy-waitlist/deploy-waitlist-create-mutation.ts
@@ -13,17 +13,20 @@ export const useDeployWaitlistCreateMutation = ({
mutationFn: async () => {
const supabase = createClient()
- const { error } = await supabase.from('deploy_waitlist').insert({})
+ // Provide a minimal row shape to satisfy generic; an empty object is valid due to defaults
+ const { error } = await (supabase as any)
+ .from('deploy_waitlist')
+ .insert({} as { user_id?: string })
if (error) {
throw error
}
},
- async onSuccess(data, variables, context) {
+ async onSuccess(data, variables, context, mutation) {
await Promise.all([
queryClient.invalidateQueries({ queryKey: getIsOnDeployWaitlistQueryKey() }),
])
- return onSuccess?.(data, variables, context)
+ return onSuccess?.(data, variables, context as any, mutation as any)
},
...options,
})
diff --git a/apps/web/data/deployed-databases/deployed-databases-query.ts b/apps/web/data/deployed-databases/deployed-databases-query.ts
index ee5f635f..5b554c1d 100644
--- a/apps/web/data/deployed-databases/deployed-databases-query.ts
+++ b/apps/web/data/deployed-databases/deployed-databases-query.ts
@@ -1,9 +1,16 @@
import { UseQueryOptions, useQuery } from '@tanstack/react-query'
import { createClient } from '~/utils/supabase/client'
+import type { Tables } from '~/utils/supabase/db-types'
-export type DeployedDatabase = Awaited