Skip to content

Commit cdac0f8

Browse files
committed
fix: database typings update
VIP role removed, Contributor role added
1 parent ac97010 commit cdac0f8

File tree

2 files changed

+30
-5
lines changed

2 files changed

+30
-5
lines changed

src/lib/components/RoleBadges.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
>
1111
Premium
1212
</span>
13-
{:else if role == "vip"}
13+
{:else if role == "contributor"}
1414
<span
15-
class="inline-block rounded-full bg-red-500 px-2.5 py-1 text-center align-baseline text-xs leading-none font-bold whitespace-nowrap text-white xl:px-7 xl:py-5"
15+
class="inline-block rounded-full bg-blue-500 px-2.5 py-1 text-center align-baseline text-xs leading-none font-bold whitespace-nowrap text-white xl:px-7 xl:py-5"
1616
>
17-
VIP
17+
Contributor
1818
</span>
1919
{:else if role == "tester"}
2020
<span

src/lib/types/supabase.ts

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,13 +382,20 @@ export type Database = {
382382
}
383383
Returns: boolean
384384
}
385+
min_role: {
386+
Args: {
387+
user_id: string
388+
target_role: Database["profiles"]["Enums"]["roles"]
389+
}
390+
Returns: boolean
391+
}
385392
uid: {
386393
Args: Record<PropertyKey, never>
387394
Returns: string
388395
}
389396
}
390397
Enums: {
391-
roles: "premium" | "vip" | "tester" | "scripter" | "moderator" | "administrator"
398+
roles: "premium" | "contributor" | "tester" | "scripter" | "moderator" | "administrator"
392399
}
393400
CompositeTypes: {
394401
[_ in never]: never
@@ -486,6 +493,21 @@ export type Database = {
486493
}
487494
]
488495
}
496+
plugins: {
497+
Row: {
498+
created_at: string
499+
version: string
500+
}
501+
Insert: {
502+
created_at?: string
503+
version: string
504+
}
505+
Update: {
506+
created_at?: string
507+
version?: string
508+
}
509+
Relationships: []
510+
}
489511
protected: {
490512
Row: {
491513
author: string
@@ -567,18 +589,21 @@ export type Database = {
567589
}
568590
versions: {
569591
Row: {
592+
files: string[]
570593
id: string
571594
revision: number
572595
simba: string
573596
wasplib: string
574597
}
575598
Insert: {
599+
files?: string[]
576600
id?: string
577601
revision: number
578602
simba?: string
579603
wasplib?: string
580604
}
581605
Update: {
606+
files?: string[]
582607
id?: string
583608
revision?: number
584609
simba?: string
@@ -1712,7 +1737,7 @@ export const Constants = {
17121737
},
17131738
profiles: {
17141739
Enums: {
1715-
roles: ["premium", "vip", "tester", "scripter", "moderator", "administrator"]
1740+
roles: ["premium", "contributor", "tester", "scripter", "moderator", "administrator"]
17161741
}
17171742
},
17181743
public: {

0 commit comments

Comments
 (0)