Skip to content

Commit 2c7492e

Browse files
authored
Chore/patch codegen type issues from analytics buckets changes (supabase#39973)
* Patch TS issues from recent analytics buckets changes * Nit
1 parent bae7922 commit 2c7492e

File tree

7 files changed

+85
-807
lines changed

7 files changed

+85
-807
lines changed

apps/studio/components/interfaces/Storage/AnalyticsBuckets.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ import { CreateSpecializedBucketModal } from './CreateSpecializedBucketModal'
2727
import { DeleteBucketModal } from './DeleteBucketModal'
2828
import { EmptyBucketState } from './EmptyBucketState'
2929

30+
// [Joshen] Remove typecasts bucket: any once infra changes for analytics bucket is in
31+
3032
export const AnalyticsBuckets = () => {
3133
const router = useRouter()
3234
const { ref } = useParams()
@@ -39,14 +41,14 @@ export const AnalyticsBuckets = () => {
3941
projectRef: ref,
4042
})
4143

42-
const analyticsBuckets = buckets.filter((bucket) =>
44+
const analyticsBuckets = buckets.filter((bucket: any) =>
4345
filterString.length === 0 ? true : bucket.id.toLowerCase().includes(filterString.toLowerCase())
4446
)
4547

4648
return (
4749
<>
4850
{!isLoadingBuckets &&
49-
buckets.filter((bucket) => !('type' in bucket) || bucket.type === 'ANALYTICS').length ===
51+
buckets.filter((bucket: any) => !('type' in bucket) || bucket.type === 'ANALYTICS').length ===
5052
0 ? (
5153
<EmptyBucketState bucketType="analytics" />
5254
) : (
@@ -94,7 +96,7 @@ export const AnalyticsBuckets = () => {
9496
</TableCell>
9597
</TableRow>
9698
)}
97-
{analyticsBuckets.map((bucket) => (
99+
{analyticsBuckets.map((bucket: any) => (
98100
<TableRow key={bucket.id}>
99101
<TableCell>
100102
<p className="text-foreground">{bucket.id}</p>

apps/studio/components/interfaces/Storage/StorageExplorer/useSelectedBucket.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ export const useSelectedBucket = () => {
3333
page === 'files'
3434
? buckets.find((b) => b.id === bucketId)
3535
: page === 'analytics'
36-
? analyticsBuckets.find((b) => b.id === bucketId)
37-
: // [Joshen] Temp fallback to buckets for backwards compatibility old UI
36+
? analyticsBuckets.find((b: any) => b.id === bucketId)
37+
: // [Joshen] Remove typecasts bucket: any once infra changes for analytics bucket is in
38+
// [Joshen] Temp fallback to buckets for backwards compatibility old UI
3839
buckets.find((b) => b.id === bucketId)
3940

4041
return { bucket, isSuccess, isError, error }

apps/studio/data/notifications/notifications-v2-query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export type NotificationVariables = {
1818
}
1919
}
2020

21-
export type Notification = components['schemas']['NotificationResponseV2']
21+
export type Notification = components['schemas']['NotificationResponse']
2222

2323
/**
2424
* Notification Data - This is not typed from the API end as it's meant to be open-ended

apps/studio/data/storage/analytics-bucket-create-mutation.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @ts-nocheck
2+
// [Joshen] To remove after infra changes for analytics bucket is in
13
import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query'
24
import { toast } from 'sonner'
35

apps/studio/data/storage/analytics-bucket-delete-mutation.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @ts-nocheck
2+
// [Joshen] To remove after infra changes for analytics bucket is in
13
import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query'
24
import { toast } from 'sonner'
35

apps/studio/data/storage/analytics-buckets-query.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @ts-nocheck
2+
// [Joshen] To remove after infra changes for analytics bucket is in
13
import { useQuery, UseQueryOptions } from '@tanstack/react-query'
24

35
import { components } from 'api-types'

0 commit comments

Comments
 (0)