Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

make build work for preview url

ErikKaumk4ec6edd472b8
diff --git a/apps/docs/src/app/api/cli/page.tsx b/apps/docs/src/app/(main)/api/cli/page.tsx
similarity index 100%
rename from apps/docs/src/app/api/cli/page.tsx
rename to apps/docs/src/app/(main)/api/cli/page.tsx
diff --git a/apps/docs/src/app/(main)/api/layout.tsx b/apps/docs/src/app/(main)/api/layout.tsx
new file mode 100644
index 000000000..a14e64fcd
--- /dev/null
+++ b/apps/docs/src/app/(main)/api/layout.tsx
@@ -0,0 +1,16 @@
+export const metadata = {
+ title: 'Next.js',
+ description: 'Generated by Next.js',
+}
+
+export default function RootLayout({
+ children,
+}: {
+ children: React.ReactNode
+}) {
+ return (
+ <html lang="en">
+ <body>{children}</body>
+ </html>
+ )
+}
diff --git a/apps/docs/src/app/api/status/pro/route.ts b/apps/docs/src/app/(main)/api/status/pro/route.ts
similarity index 100%
rename from apps/docs/src/app/api/status/pro/route.ts
rename to apps/docs/src/app/(main)/api/status/pro/route.ts
diff --git a/apps/docs/src/app/api/status/route.ts b/apps/docs/src/app/(main)/api/status/route.ts
similarity index 100%
rename from apps/docs/src/app/api/status/route.ts
rename to apps/docs/src/app/(main)/api/status/route.ts
diff --git a/apps/docs/src/app/(main)/dashboard/page.tsx b/apps/docs/src/app/(main)/dashboard/page.tsx
index e141ac37b..8375c3b8b 100644
--- a/apps/docs/src/app/(main)/dashboard/page.tsx
+++ b/apps/docs/src/app/(main)/dashboard/page.tsx
@@ -15,30 +15,41 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu'
+import { useUser } from '@/utils/useUser'
+import { User } from '@supabase/supabase-js'
const menuLabels = ['General', 'Billing', 'Sandboxes', 'Team', 'Templates'] as const
type MenuLabel = typeof menuLabels[number]
export default function Dashboard() {
- const [selectedItem, setSelectedItem] = useState<MenuLabel>('General')
-
- return (
- <div className="flex min-h-screen flex-row pt-32 px-32">
- <Sidebar selectedItem={selectedItem} setSelectedItem={setSelectedItem} />
- <div className="flex-1 pl-10">
- <h2 className='text-2xl mb-2 font-bold'>{selectedItem}</h2>
- <div className='border border-white/5 w-full h-[1px] mb-10'/>
- <MainContent selectedItem={selectedItem} />
+ const { user, isLoading, error } = useUser()
+ const [selectedItem, setSelectedItem] = useState<MenuLabel>('Billing')
+
+ if (error) {
+ return <div>Error: {error.message}</div>
+ }
+ if (isLoading) {
+ return <div>Loading...</div>
+ }
+ if (user) {
+ return (
+ <div className="flex min-h-screen flex-row pt-32 px-32">
+ <Sidebar selectedItem={selectedItem} setSelectedItem={setSelectedItem} user={user} />
+ <div className="flex-1 pl-10">
+ <h2 className='text-2xl mb-2 font-bold'>{selectedItem}</h2>
+ <div className='border border-white/5 w-full h-[1px] mb-10'/>
+ <MainContent selectedItem={selectedItem} user={user} />
+ </div>
</div>
- </div>
- )
+ )
+ }
}
-const Sidebar = ({ selectedItem, setSelectedItem }) => (
+const Sidebar = ({ selectedItem, setSelectedItem, user }) => (
<div className="h-full w-48 space-y-2">
- <AccountSelectItem />
+ <AccountSelectItem user={user} />
<MenuItem
icon={Settings}
@@ -83,25 +94,33 @@ const MenuItem = ({ icon: Icon, label , selected, onClick }: { icon: LucideIcon;
</div>
)
-const AccountSelectItem = () => {
+const AccountSelectItem = ({ user }) => {
+
+ const teams = user?.teams.map((team: any) => ({
+ id: team.id,
+ name: team.name,
+ default: team.is_default,
+ }))
+
+ const defaultTeam = teams?.find((teams: any) => teams.default)
+
return(
<DropdownMenu>
<DropdownMenuTrigger
className='dropdown-trigger group outline-none flex w-full items-center justify-between rounded-lg p-2 mb-6 hover:bg-zinc-800 hover:cursor-pointer'
>
<div className='flex items-start flex-col'>
- <h3 className='font-bold'>Default Team</h3>
- <p className='text-sm'>Team account</p>
+ <h3 className='font-bold'>{defaultTeam.name}</h3>
+ {/* <p className='text-sm'>Team account</p> */}
</div>
<ChevronRight className='transform transition-transform duration-300 group-hover:rotate-90' />
-
-
</DropdownMenuTrigger>
<DropdownMenuContent className='flex flex-col w-48 bg-zinc-900 border border-white/30'>
- <DropdownMenuItem>Personal Account</DropdownMenuItem>
- <DropdownMenuSeparator/>
- <DropdownMenuItem>Default Team</DropdownMenuItem>
- <DropdownMenuItem>Other Team</DropdownMenuItem>
+ {teams?.map((team: any) => (
+ <DropdownMenuItem key={team.id}>
+ {team.name}
+ </DropdownMenuItem>
+ ))}
<DropdownMenuSeparator />
<DropdownMenuItem className='flex items-center space-x-1'>
<PlusCircle width={15} height={15} />
@@ -112,14 +131,14 @@ const AccountSelectItem = () => {
)
}
-const MainContent = ({ selectedItem }: { selectedItem: MenuLabel }) => {
+const MainContent = ({ selectedItem, user }: { selectedItem: MenuLabel, user: User }) => {
switch (selectedItem) {
case 'General':
- return <GeneralContent />
+ return <GeneralContent user={user} />
case 'Billing':
return <BillingContent />
case 'Sandboxes':
- return <SandboxesContent />
+ return <SandboxesContent user={user} />
case 'Team':
return <TeamContent />
case 'Templates':
diff --git a/apps/docs/src/components/Dashboard/Billing.tsx b/apps/docs/src/components/Dashboard/Billing.tsx
index 152950d3b..f7add0fce 100644
--- a/apps/docs/src/components/Dashboard/Billing.tsx
+++ b/apps/docs/src/components/Dashboard/Billing.tsx
@@ -1,12 +1,36 @@
import { ResponsiveBar } from '@nivo/bar'
+import { useEffect, useState } from 'react'
+import Link from 'next/link'
+import { useUser } from '@/utils/useUser'
+import { Button } from '../Button'
+import { useUsage } from '@/utils/useUsage'
+
+function formatCurrency(value: number) {
+ return value.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
+}
export const BillingContent = () => {
+ const { credits } = useUsage()
+
return (
<div className="flex flex-col w-full h-full">
+ {credits && (
+ <div className='flex flex-col space-y-2 pb-10'>
+ <h2 className='font-bold text-xl'>Credits left</h2>
+ <span className="text-sm">Credits automatically are used to bill your team</span>
+ <span className="text-sm font-mono text-green-300/80">${formatCurrency(credits)}</span>
+ </div>
+ )}
+
<div>
<h2 className='font-bold pb-10 text-xl'>Billing history</h2>
</div>
- <BarChart className="aspect-[6/3] w-2/3"/>
+ <BarChart className="aspect-[6/3] w-2/3 pb-10"/>
+
+ <div className='flex items-center space-x-4'>
+ <h2 className='font-bold text-xl'>Make changes to your billing</h2>
+ <ManageBilling />
+ </div>
</div>
)
}
@@ -66,3 +90,27 @@ function BarChart(props: any) {
}
+const ManageBilling = () => {
+ const { user } = useUser()
+ const [url, setURL] = useState('')
+
+ useEffect(function getBillingURL() {
+ if (!user) return
+ const u = `${process.env.NEXT_PUBLIC_STRIPE_BILLING_URL}?prefilled_email=${user.teams[0].email}`
+ setURL(u)
+ }, [user])
+
+ if (!user || !url) {
+ return null
+ }
+
+ return (
+ <Button variant='secondary' className='w-fit'>
+ <Link href={url} target="_blank" rel="noreferrer">
+ To billing portal
+ </Link>
+ </Button>
+ )
+}
+
+
diff --git a/apps/docs/src/components/Dashboard/General.tsx b/apps/docs/src/components/Dashboard/General.tsx
index 0b1f33b1f..4749adfaf 100644
--- a/apps/docs/src/components/Dashboard/General.tsx
+++ b/apps/docs/src/components/Dashboard/General.tsx
@@ -17,29 +17,23 @@ import {
AlertDialogTitle,
AlertDialogTrigger,
} from '@/components/ui/alert-dialog'
+import { User } from '@supabase/supabase-js'
+import { createPagesBrowserClient } from '@supabase/auth-helpers-nextjs'
-const fakeApiKeys = [
- {
- id: '1',
- key: '3728621b-10ca-4153-99f5-e8b7080117f7',
- createdAt: '2022-10-04T04:45:00.000Z',
- updatedAt: '2022-10-04T04:45:00.000Z',
- },
- {
- id: '2',
- key: '16eea788-3927-4501-b5c5-b3eeb170bc38',
- createdAt: '2022-10-04T04:45:00.000Z',
- updatedAt: '2022-10-04T04:45:00.000Z',
- },
-]
-
-export const GeneralContent = () => {
+
+export const GeneralContent = ({user}: {user: User}) => {
const { toast } = useToast()
const [isDialogOpen, setIsDialogOpen] = useState(false)
- const [apiKeys, setApiKeys] = useState(fakeApiKeys)
const [currentKeyId, setCurrentKeyId] = useState<string | null>(null)
const [hoveredKeyId, setHoveredKeyId] = useState<string | null>(null)
+ //@ts-ignore
+ const [apiKeys, setApiKeys] = useState<{ id: string, key: string, createdAt: string }[]>(user?.apiKeys.map((apiKey: any, index: any) => ({
+ id: String(index + 1),
+ key: apiKey.api_key,
+ createdAt: apiKey.created_at,
+ })) || [])
+
const closeDialog = () => setIsDialogOpen(false)
const openDialog = (id: string) => {
setCurrentKeyId(id)
@@ -51,8 +45,18 @@ export const GeneralContent = () => {
closeDialog()
}
- const addApiKey = () => {
-
+ const addApiKey = async() => {
+ const supabase = createPagesBrowserClient()
+ const res = await supabase
+ .from('team_api_keys')
+ .insert({
+ team_id: user.id,
+ api_key: uuidv4(),
+ created_at: new Date().toISOString(),
+ })
+
+ console.log(res)
+
toast({
title: 'API key created',
})
@@ -76,7 +80,7 @@ export const GeneralContent = () => {
const maskApiKey = (key: string) => {
const firstFour = key.slice(0, 4)
const lastTwo = key.slice(-2)
- const stars = '*'.repeat(key.length - 6) // Use '#' or another fixed-width character
+ const stars = '*'.repeat(key.length - 6) // use fixed-width character
return `${firstFour}${stars}${lastTwo}`
}
diff --git a/apps/docs/src/components/Dashboard/Team.tsx b/apps/docs/src/components/Dashboard/Team.tsx
index 39624d1ee..75349654a 100644
--- a/apps/docs/src/components/Dashboard/Team.tsx
+++ b/apps/docs/src/components/Dashboard/Team.tsx
@@ -36,6 +36,9 @@ export const TeamContent = () => {
const [currentKeyId, setCurrentUserId] = useState<string | null>(null)
const [team, setTeam] = useState(fakeTeam)
+ // TODO: this logs just to make build work, remove it later
+ console.log(currentKeyId)
+
const closeDialog = () => setIsDialogOpen(false)
const openDialog = (id: string) => {
setCurrentUserId(id)
diff --git a/apps/docs/src/components/ui/alert-dialog.tsx b/apps/docs/src/components/ui/alert-dialog.tsx
index 25e7b4744..c5b9ebc1c 100644
--- a/apps/docs/src/components/ui/alert-dialog.tsx
+++ b/apps/docs/src/components/ui/alert-dialog.tsx
@@ -1,10 +1,10 @@
-"use client"
+'use client'
-import * as React from "react"
-import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
+import * as React from 'react'
+import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'
-import { cn } from "@/lib/utils"
-import { buttonVariants } from "@/components/ui/button"
+import { cn } from '@/lib/utils'
+import { buttonVariants } from '@/components/ui/button'
const AlertDialog = AlertDialogPrimitive.Root
@@ -18,7 +18,7 @@ const AlertDialogOverlay = React.forwardRef<
>(({ className, ...props }, ref) => (
<AlertDialogPrimitive.Overlay
className={cn(
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
+ 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
className
)}
{...props}
@@ -36,7 +36,7 @@ const AlertDialogContent = React.forwardRef<
<AlertDialogPrimitive.Content
ref={ref}
className={cn(
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
+ 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
className
)}
{...props}
@@ -51,13 +51,13 @@ const AlertDialogHeader = ({
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
- "flex flex-col space-y-2 text-center sm:text-left",
+ 'flex flex-col space-y-2 text-center sm:text-left',
className
)}
{...props}
/>
)
-AlertDialogHeader.displayName = "AlertDialogHeader"
+AlertDialogHeader.displayName = 'AlertDialogHeader'
const AlertDialogFooter = ({
className,
@@ -65,13 +65,13 @@ const AlertDialogFooter = ({
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
+ 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
className
)}
{...props}
/>
)
-AlertDialogFooter.displayName = "AlertDialogFooter"
+AlertDialogFooter.displayName = 'AlertDialogFooter'
const AlertDialogTitle = React.forwardRef<
React.ElementRef<typeof AlertDialogPrimitive.Title>,
@@ -79,7 +79,7 @@ const AlertDialogTitle = React.forwardRef<
>(({ className, ...props }, ref) => (
<AlertDialogPrimitive.Title
ref={ref}
- className={cn("text-lg font-semibold", className)}
+ className={cn('text-lg font-semibold', className)}
{...props}
/>
))
@@ -91,7 +91,7 @@ const AlertDialogDescription = React.forwardRef<
>(({ className, ...props }, ref) => (
<AlertDialogPrimitive.Description
ref={ref}
- className={cn("text-sm text-muted-foreground", className)}
+ className={cn('text-sm text-muted-foreground', className)}
{...props}
/>
))
@@ -117,8 +117,8 @@ const AlertDialogCancel = React.forwardRef<
<AlertDialogPrimitive.Cancel
ref={ref}
className={cn(
- buttonVariants({ variant: "outline" }),
- "mt-2 sm:mt-0",
+ buttonVariants({ variant: 'outline' }),
+ 'mt-2 sm:mt-0',
className
)}
{...props}
diff --git a/apps/docs/src/components/ui/button.tsx b/apps/docs/src/components/ui/button.tsx
index 0ba427735..ee0b112f8 100644
--- a/apps/docs/src/components/ui/button.tsx
+++ b/apps/docs/src/components/ui/button.tsx
@@ -1,34 +1,34 @@
-import * as React from "react"
-import { Slot } from "@radix-ui/react-slot"
-import { cva, type VariantProps } from "class-variance-authority"
+import * as React from 'react'
+import { Slot } from '@radix-ui/react-slot'
+import { cva, type VariantProps } from 'class-variance-authority'
-import { cn } from "@/lib/utils"
+import { cn } from '@/lib/utils'
const buttonVariants = cva(
- "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
+ 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
{
variants: {
variant: {
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
+ default: 'bg-primary text-primary-foreground hover:bg-primary/90',
destructive:
- "bg-destructive text-destructive-foreground hover:bg-destructive/90",
+ 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
outline:
- "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
+ 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
secondary:
- "bg-secondary text-secondary-foreground hover:bg-secondary/80",
- ghost: "hover:bg-accent hover:text-accent-foreground",
- link: "text-primary underline-offset-4 hover:underline",
+ 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
+ link: 'text-primary underline-offset-4 hover:underline',
},
size: {
- default: "h-10 px-4 py-2",
- sm: "h-9 rounded-md px-3",
- lg: "h-11 rounded-md px-8",
- icon: "h-10 w-10",
+ default: 'h-10 px-4 py-2',
+ sm: 'h-9 rounded-md px-3',
+ lg: 'h-11 rounded-md px-8',
+ icon: 'h-10 w-10',
},
},
defaultVariants: {
- variant: "default",
- size: "default",
+ variant: 'default',
+ size: 'default',
},
}
)
@@ -41,7 +41,7 @@ export interface ButtonProps
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
- const Comp = asChild ? Slot : "button"
+ const Comp = asChild ? Slot : 'button'
return (
<Comp
className={cn(buttonVariants({ variant, size, className }))}
@@ -51,6 +51,6 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
)
}
)
-Button.displayName = "Button"
+Button.displayName = 'Button'
export { Button, buttonVariants }
diff --git a/apps/docs/src/components/ui/card.tsx b/apps/docs/src/components/ui/card.tsx
index afa13ecfa..4902b398b 100644
--- a/apps/docs/src/components/ui/card.tsx
+++ b/apps/docs/src/components/ui/card.tsx
@@ -1,6 +1,6 @@
-import * as React from "react"
+import * as React from 'react'
-import { cn } from "@/lib/utils"
+import { cn } from '@/lib/utils'
const Card = React.forwardRef<
HTMLDivElement,
@@ -9,13 +9,13 @@ const Card = React.forwardRef<
<div
ref={ref}
className={cn(
- "rounded-lg border bg-card text-card-foreground shadow-sm",
+ 'rounded-lg border bg-card text-card-foreground shadow-sm',
className
)}
{...props}
/>
))
-Card.displayName = "Card"
+Card.displayName = 'Card'
const CardHeader = React.forwardRef<
HTMLDivElement,
@@ -23,11 +23,11 @@ const CardHeader = React.forwardRef<
>(({ className, ...props }, ref) => (
<div
ref={ref}
- className={cn("flex flex-col space-y-1.5 p-6", className)}
+ className={cn('flex flex-col space-y-1.5 p-6', className)}
{...props}
/>
))
-CardHeader.displayName = "CardHeader"
+CardHeader.displayName = 'CardHeader'
const CardTitle = React.forwardRef<
HTMLParagraphElement,
@@ -36,13 +36,13 @@ const CardTitle = React.forwardRef<
<h3
ref={ref}
className={cn(
- "text-2xl font-semibold leading-none tracking-tight",
+ 'text-2xl font-semibold leading-none tracking-tight',
className
)}
{...props}
/>
))
-CardTitle.displayName = "CardTitle"
+CardTitle.displayName = 'CardTitle'
const CardDescription = React.forwardRef<
HTMLParagraphElement,
@@ -50,19 +50,19 @@ const CardDescription = React.forwardRef<
>(({ className, ...props }, ref) => (
<p
ref={ref}
- className={cn("text-sm text-muted-foreground", className)}
+ className={cn('text-sm text-muted-foreground', className)}
{...props}
/>
))
-CardDescription.displayName = "CardDescription"
+CardDescription.displayName = 'CardDescription'
const CardContent = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
- <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
+ <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />
))
-CardContent.displayName = "CardContent"
+CardContent.displayName = 'CardContent'
const CardFooter = React.forwardRef<
HTMLDivElement,
@@ -70,10 +70,10 @@ const CardFooter = React.forwardRef<
>(({ className, ...props }, ref) => (
<div
ref={ref}
- className={cn("flex items-center p-6 pt-0", className)}
+ className={cn('flex items-center p-6 pt-0', className)}
{...props}
/>
))
-CardFooter.displayName = "CardFooter"
+CardFooter.displayName = 'CardFooter'
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
diff --git a/apps/docs/src/components/ui/dropdown-menu.tsx b/apps/docs/src/components/ui/dropdown-menu.tsx
index 34d0f110c..57503b712 100644
--- a/apps/docs/src/components/ui/dropdown-menu.tsx
+++ b/apps/docs/src/components/ui/dropdown-menu.tsx
@@ -83,7 +83,7 @@ const DropdownMenuItem = React.forwardRef<
<DropdownMenuPrimitive.Item
ref={ref}
className={cn(
- 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-orange-500/30 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-orange-500/30 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 hover:cursor-pointer',
inset && 'pl-8',
className
)}
diff --git a/apps/docs/src/components/ui/table.tsx b/apps/docs/src/components/ui/table.tsx
index 7f3502f8b..4d8464218 100644
--- a/apps/docs/src/components/ui/table.tsx
+++ b/apps/docs/src/components/ui/table.tsx
@@ -1,6 +1,6 @@
-import * as React from "react"
+import * as React from 'react'
-import { cn } from "@/lib/utils"
+import { cn } from '@/lib/utils'
const Table = React.forwardRef<
HTMLTableElement,
@@ -9,20 +9,20 @@ const Table = React.forwardRef<
<div className="relative w-full overflow-auto">
<table
ref={ref}
- className={cn("w-full caption-bottom text-sm", className)}
+ className={cn('w-full caption-bottom text-sm', className)}
{...props}
/>
</div>
))
-Table.displayName = "Table"
+Table.displayName = 'Table'
const TableHeader = React.forwardRef<
HTMLTableSectionElement,
React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
- <thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
+ <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />
))
-TableHeader.displayName = "TableHeader"
+TableHeader.displayName = 'TableHeader'
const TableBody = React.forwardRef<
HTMLTableSectionElement,
@@ -30,11 +30,11 @@ const TableBody = React.forwardRef<
>(({ className, ...props }, ref) => (
<tbody
ref={ref}
- className={cn("[&_tr:last-child]:border-0", className)}
+ className={cn('[&_tr:last-child]:border-0', className)}
{...props}
/>
))
-TableBody.displayName = "TableBody"
+TableBody.displayName = 'TableBody'
const TableFooter = React.forwardRef<
HTMLTableSectionElement,
@@ -43,13 +43,13 @@ const TableFooter = React.forwardRef<
<tfoot
ref={ref}
className={cn(
- "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
+ 'border-t bg-muted/50 font-medium [&>tr]:last:border-b-0',
className
)}
{...props}
/>
))
-TableFooter.displayName = "TableFooter"
+TableFooter.displayName = 'TableFooter'
const TableRow = React.forwardRef<
HTMLTableRowElement,
@@ -58,13 +58,13 @@ const TableRow = React.forwardRef<
<tr
ref={ref}
className={cn(
- "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
+ 'border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',
className
)}
{...props}
/>
))
-TableRow.displayName = "TableRow"
+TableRow.displayName = 'TableRow'
const TableHead = React.forwardRef<
HTMLTableCellElement,
@@ -73,13 +73,13 @@ const TableHead = React.forwardRef<
<th
ref={ref}
className={cn(
- "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
+ 'h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0',
className
)}
{...props}
/>
))
-TableHead.displayName = "TableHead"
+TableHead.displayName = 'TableHead'
const TableCell = React.forwardRef<
HTMLTableCellElement,
@@ -87,11 +87,11 @@ const TableCell = React.forwardRef<
>(({ className, ...props }, ref) => (
<td
ref={ref}
- className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
+ className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)}
{...props}
/>
))
-TableCell.displayName = "TableCell"
+TableCell.displayName = 'TableCell'
const TableCaption = React.forwardRef<
HTMLTableCaptionElement,
@@ -99,11 +99,11 @@ const TableCaption = React.forwardRef<
>(({ className, ...props }, ref) => (
<caption
ref={ref}
- className={cn("mt-4 text-sm text-muted-foreground", className)}
+ className={cn('mt-4 text-sm text-muted-foreground', className)}
{...props}
/>
))
-TableCaption.displayName = "TableCaption"
+TableCaption.displayName = 'TableCaption'
export {
Table,
diff --git a/apps/docs/src/components/ui/toaster.tsx b/apps/docs/src/components/ui/toaster.tsx
index e2233852a..c8d9878a8 100644
--- a/apps/docs/src/components/ui/toaster.tsx
+++ b/apps/docs/src/components/ui/toaster.tsx
@@ -1,4 +1,4 @@
-"use client"
+'use client'
import {
Toast,
@@ -7,8 +7,8 @@ import {
ToastProvider,
ToastTitle,
ToastViewport,
-} from "@/components/ui/toast"
-import { useToast } from "@/components/ui/use-toast"
+} from '@/components/ui/toast'
+import { useToast } from '@/components/ui/use-toast'
export function Toaster() {
const { toasts } = useToast()
diff --git a/apps/docs/src/components/ui/use-toast.ts b/apps/docs/src/components/ui/use-toast.ts
index 02e111d81..b4130ef30 100644
--- a/apps/docs/src/components/ui/use-toast.ts
+++ b/apps/docs/src/components/ui/use-toast.ts
@@ -1,12 +1,12 @@
-"use client"
+'use client'
// Inspired by react-hot-toast library
-import * as React from "react"
+import * as React from 'react'
import type {
ToastActionElement,
ToastProps,
-} from "@/components/ui/toast"
+} from '@/components/ui/toast'
const TOAST_LIMIT = 1
const TOAST_REMOVE_DELAY = 1000000
@@ -19,10 +19,10 @@ type ToasterToast = ToastProps & {
}
const actionTypes = {
- ADD_TOAST: "ADD_TOAST",
- UPDATE_TOAST: "UPDATE_TOAST",
- DISMISS_TOAST: "DISMISS_TOAST",
- REMOVE_TOAST: "REMOVE_TOAST",
+ ADD_TOAST: 'ADD_TOAST',
+ UPDATE_TOAST: 'UPDATE_TOAST',
+ DISMISS_TOAST: 'DISMISS_TOAST',
+ REMOVE_TOAST: 'REMOVE_TOAST',
} as const
let count = 0
@@ -36,20 +36,20 @@ type ActionType = typeof actionTypes
type Action =
| {
- type: ActionType["ADD_TOAST"]
+ type: ActionType['ADD_TOAST']
toast: ToasterToast
}
| {
- type: ActionType["UPDATE_TOAST"]
+ type: ActionType['UPDATE_TOAST']
toast: Partial<ToasterToast>
}
| {
- type: ActionType["DISMISS_TOAST"]
- toastId?: ToasterToast["id"]
+ type: ActionType['DISMISS_TOAST']
+ toastId?: ToasterToast['id']
}
| {
- type: ActionType["REMOVE_TOAST"]
- toastId?: ToasterToast["id"]
+ type: ActionType['REMOVE_TOAST']
+ toastId?: ToasterToast['id']
}
interface State {
@@ -66,7 +66,7 @@ const addToRemoveQueue = (toastId: string) => {
const timeout = setTimeout(() => {
toastTimeouts.delete(toastId)
dispatch({
- type: "REMOVE_TOAST",
+ type: 'REMOVE_TOAST',
toastId: toastId,
})
}, TOAST_REMOVE_DELAY)
@@ -76,13 +76,13 @@ const addToRemoveQueue = (toastId: string) => {
export const reducer = (state: State, action: Action): State => {
switch (action.type) {
- case "ADD_TOAST":
+ case 'ADD_TOAST':
return {
...state,
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
}
- case "UPDATE_TOAST":
+ case 'UPDATE_TOAST':
return {
...state,
toasts: state.toasts.map((t) =>
@@ -90,7 +90,7 @@ export const reducer = (state: State, action: Action): State => {
),
}
- case "DISMISS_TOAST": {
+ case 'DISMISS_TOAST': {
const { toastId } = action
// ! Side effects ! - This could be extracted into a dismissToast() action,
@@ -115,7 +115,7 @@ export const reducer = (state: State, action: Action): State => {
),
}
}
- case "REMOVE_TOAST":
+ case 'REMOVE_TOAST':
if (action.toastId === undefined) {
return {
...state,
@@ -140,20 +140,20 @@ function dispatch(action: Action) {
})
}
-type Toast = Omit<ToasterToast, "id">
+type Toast = Omit<ToasterToast, 'id'>
function toast({ ...props }: Toast) {
const id = genId()
const update = (props: ToasterToast) =>
dispatch({
- type: "UPDATE_TOAST",
+ type: 'UPDATE_TOAST',
toast: { ...props, id },
})
- const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id })
+ const dismiss = () => dispatch({ type: 'DISMISS_TOAST', toastId: id })
dispatch({
- type: "ADD_TOAST",
+ type: 'ADD_TOAST',
toast: {
...props,
id,
@@ -187,7 +187,7 @@ function useToast() {
return {
...state,
toast,
- dismiss: (toastId?: string) => dispatch({ type: "DISMISS_TOAST", toastId }),
+ dismiss: (toastId?: string) => dispatch({ type: 'DISMISS_TOAST', toastId }),
}
}
diff --git a/apps/docs/src/utils/useUser.tsx b/apps/docs/src/utils/useUser.tsx
index e845474de..1e61ed570 100644
--- a/apps/docs/src/utils/useUser.tsx
+++ b/apps/docs/src/utils/useUser.tsx
@@ -101,12 +101,21 @@ export const CustomUserContextProvider = (props) => {
if (!session) return
if (!session.user.id) return
- // @ts-ignore
- const { data: userTeams, teamsError } = await supabase
+
+ const { data: userTeams } = await supabase
.from('users_teams')
- .select('teams (id, name, is_default, tier, email, team_billing (credit_card_added))')
- .eq('user_id', session?.user.id) // Due to RLS, we could also safely just fetch all, but let's be explicit for sure
+ .select('teams (id, name, is_default, tier, email)')
+ .eq('user_id', session?.user.id)
+ // console.log('info', info)
+
+ // @ts-ignore
+ // const { data: userTeams, teamsError } = await supabase
+ // .from('users_teams')
+ // .select('teams (id, name, is_default, tier, email, team_billing (credit_card_added))')
+ // .eq('user_id', session?.user.id) // Due to RLS, we could also safely just fetch all, but let's be explicit for sure
+
+ const teamsError = null
if (teamsError) Sentry.captureException(teamsError)
// TODO: Adjust when user can be part of multiple teams
// @ts-ignore
diff --git a/supabase/migrations/1680452567_name.sql b/supabase/migrations/1680452567_name.sql
deleted file mode 100644
index 24f54f34f..000000000
--- a/supabase/migrations/1680452567_name.sql
+++ /dev/null
@@ -1,945 +0,0 @@
---
--- PostgreSQL database dump
---
-
--- Dumped from database version 15.1
--- Dumped by pg_dump version 15.1 (Debian 15.1-1.pgdg110+1)
-
-SET statement_timeout = 0;
-SET lock_timeout = 0;
-SET idle_in_transaction_session_timeout = 0;
-SET client_encoding = 'UTF8';
-SET standard_conforming_strings = on;
-SELECT pg_catalog.set_config('search_path', '', false);
-SET check_function_bodies = false;
-SET xmloption = content;
-SET client_min_messages = warning;
-SET row_security = off;
-
---
--- Name: pgsodium; Type: EXTENSION; Schema: -; Owner: -
---
-
-CREATE EXTENSION IF NOT EXISTS "pgsodium" WITH SCHEMA "pgsodium";
-
-
---
--- Name: pg_graphql; Type: EXTENSION; Schema: -; Owner: -
---
-
-CREATE EXTENSION IF NOT EXISTS "pg_graphql" WITH SCHEMA "graphql";
-
-
---
--- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: -
---
-
-CREATE EXTENSION IF NOT EXISTS "pg_stat_statements" WITH SCHEMA "extensions";
-
-
---
--- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: -
---
-
-CREATE EXTENSION IF NOT EXISTS "pgcrypto" WITH SCHEMA "extensions";
-
-
---
--- Name: pgjwt; Type: EXTENSION; Schema: -; Owner: -
---
-
-CREATE EXTENSION IF NOT EXISTS "pgjwt" WITH SCHEMA "extensions";
-
-
---
--- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: -
---
-
-CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA "extensions";
-
-
---
--- Name: deployment_state; Type: TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE "public"."deployment_state" AS ENUM (
- 'generating',
- 'deploying',
- 'finished',
- 'error'
-);
-
-
-ALTER TYPE "public"."deployment_state" OWNER TO "postgres";
-
-SET default_tablespace = '';
-
-SET default_table_access_method = "heap";
-
---
--- Name: deployments; Type: TABLE; Schema: public; Owner: postgres
---
-
-CREATE TABLE "public"."deployments" (
- "id" "uuid" DEFAULT "extensions"."uuid_generate_v4"() NOT NULL,
- "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
- "logs" "jsonb"[],
- "project_id" "text" NOT NULL,
- "route_id" "text",
- "state" "public"."deployment_state",
- "url" "text",
- "logs_raw" "text" DEFAULT ''::"text",
- "config" "jsonb",
- "enabled" boolean DEFAULT false NOT NULL
-);
-
-ALTER TABLE ONLY "public"."deployments" REPLICA IDENTITY FULL;
-
-
-ALTER TABLE "public"."deployments" OWNER TO "postgres";
-
---
--- Name: projects; Type: TABLE; Schema: public; Owner: postgres
---
-
-CREATE TABLE "public"."projects" (
- "id" "text" DEFAULT ''::"text" NOT NULL,
- "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
- "data" "jsonb",
- "team_id" "uuid" NOT NULL,
- "name" "text" DEFAULT ''::"text" NOT NULL,
- "development_logs" "jsonb"[]
-);
-
-
-ALTER TABLE "public"."projects" OWNER TO "postgres";
-
---
--- Name: teams; Type: TABLE; Schema: public; Owner: postgres
---
-
-CREATE TABLE "public"."teams" (
- "id" "uuid" DEFAULT "extensions"."uuid_generate_v4"() NOT NULL,
- "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
- "is_default" boolean,
- "name" "text" DEFAULT ''::"text" NOT NULL
-);
-
-
-ALTER TABLE "public"."teams" OWNER TO "postgres";
-
---
--- Name: users_teams; Type: TABLE; Schema: public; Owner: postgres
---
-
-CREATE TABLE "public"."users_teams" (
- "user_id" "uuid" NOT NULL,
- "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
- "team_id" "uuid" NOT NULL
-);
-
-
-ALTER TABLE "public"."users_teams" OWNER TO "postgres";
-
---
--- Name: projects ai_api_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY "public"."projects"
- ADD CONSTRAINT "ai_api_pkey" PRIMARY KEY ("id");
-
-
---
--- Name: deployments deployments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY "public"."deployments"
- ADD CONSTRAINT "deployments_pkey" PRIMARY KEY ("id");
-
-
---
--- Name: teams teams_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY "public"."teams"
- ADD CONSTRAINT "teams_pkey" PRIMARY KEY ("id");
-
-
---
--- Name: users_teams users_teams_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY "public"."users_teams"
- ADD CONSTRAINT "users_teams_pkey" PRIMARY KEY ("user_id", "team_id");
-
-
---
--- Name: deployments deployments_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY "public"."deployments"
- ADD CONSTRAINT "deployments_project_id_fkey" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id");
-
-
---
--- Name: projects projects_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY "public"."projects"
- ADD CONSTRAINT "projects_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "public"."teams"("id");
-
-
---
--- Name: users_teams users_teams_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY "public"."users_teams"
- ADD CONSTRAINT "users_teams_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "public"."teams"("id");
-
-
---
--- Name: users_teams users_teams_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY "public"."users_teams"
- ADD CONSTRAINT "users_teams_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "auth"."users"("id");
-
-
---
--- Name: teams; Type: ROW SECURITY; Schema: public; Owner: postgres
---
-
-ALTER TABLE "public"."teams" ENABLE ROW LEVEL SECURITY;
-
---
--- Name: users_teams; Type: ROW SECURITY; Schema: public; Owner: postgres
---
-
-ALTER TABLE "public"."users_teams" ENABLE ROW LEVEL SECURITY;
-
---
--- Name: SCHEMA "public"; Type: ACL; Schema: -; Owner: pg_database_owner
---
-
-GRANT USAGE ON SCHEMA "public" TO "postgres";
-GRANT USAGE ON SCHEMA "public" TO "anon";
-GRANT USAGE ON SCHEMA "public" TO "authenticated";
-GRANT USAGE ON SCHEMA "public" TO "service_role";
-
-
---
--- Name: FUNCTION "algorithm_sign"("signables" "text", "secret" "text", "algorithm" "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."algorithm_sign"("signables" "text", "secret" "text", "algorithm" "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."algorithm_sign"("signables" "text", "secret" "text", "algorithm" "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."algorithm_sign"("signables" "text", "secret" "text", "algorithm" "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "armor"("bytea"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."armor"("bytea") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."armor"("bytea") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."armor"("bytea") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "armor"("bytea", "text"[], "text"[]); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."armor"("bytea", "text"[], "text"[]) FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."armor"("bytea", "text"[], "text"[]) TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."armor"("bytea", "text"[], "text"[]) TO "dashboard_user";
-
-
---
--- Name: FUNCTION "crypt"("text", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."crypt"("text", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."crypt"("text", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."crypt"("text", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "dearmor"("text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."dearmor"("text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."dearmor"("text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."dearmor"("text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "decrypt"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."decrypt"("bytea", "bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."decrypt"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."decrypt"("bytea", "bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "decrypt_iv"("bytea", "bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."decrypt_iv"("bytea", "bytea", "bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."decrypt_iv"("bytea", "bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."decrypt_iv"("bytea", "bytea", "bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "digest"("bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."digest"("bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."digest"("bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."digest"("bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "digest"("text", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."digest"("text", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."digest"("text", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."digest"("text", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "encrypt"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."encrypt"("bytea", "bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."encrypt"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."encrypt"("bytea", "bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "encrypt_iv"("bytea", "bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."encrypt_iv"("bytea", "bytea", "bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."encrypt_iv"("bytea", "bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."encrypt_iv"("bytea", "bytea", "bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "gen_random_bytes"(integer); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."gen_random_bytes"(integer) FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."gen_random_bytes"(integer) TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."gen_random_bytes"(integer) TO "dashboard_user";
-
-
---
--- Name: FUNCTION "gen_random_uuid"(); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."gen_random_uuid"() FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."gen_random_uuid"() TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."gen_random_uuid"() TO "dashboard_user";
-
-
---
--- Name: FUNCTION "gen_salt"("text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."gen_salt"("text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."gen_salt"("text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."gen_salt"("text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "gen_salt"("text", integer); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."gen_salt"("text", integer) FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."gen_salt"("text", integer) TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."gen_salt"("text", integer) TO "dashboard_user";
-
-
---
--- Name: FUNCTION "hmac"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."hmac"("bytea", "bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."hmac"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."hmac"("bytea", "bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "hmac"("text", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."hmac"("text", "text", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."hmac"("text", "text", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."hmac"("text", "text", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pg_stat_statements"("showtext" boolean, OUT "userid" "oid", OUT "dbid" "oid", OUT "toplevel" boolean, OUT "queryid" bigint, OUT "query" "text", OUT "plans" bigint, OUT "total_plan_time" double precision, OUT "min_plan_time" double precision, OUT "max_plan_time" double precision, OUT "mean_plan_time" double precision, OUT "stddev_plan_time" double precision, OUT "calls" bigint, OUT "total_exec_time" double precision, OUT "min_exec_time" double precision, OUT "max_exec_time" double precision, OUT "mean_exec_time" double precision, OUT "stddev_exec_time" double precision, OUT "rows" bigint, OUT "shared_blks_hit" bigint, OUT "shared_blks_read" bigint, OUT "shared_blks_dirtied" bigint, OUT "shared_blks_written" bigint, OUT "local_blks_hit" bigint, OUT "local_blks_read" bigint, OUT "local_blks_dirtied" bigint, OUT "local_blks_written" bigint, OUT "temp_blks_read" bigint, OUT "temp_blks_written" bigint, OUT "blk_read_time" double precision, OUT "blk_write_time" double precision, OUT "temp_blk_read_time" double precision, OUT "temp_blk_write_time" double precision, OUT "wal_records" bigint, OUT "wal_fpi" bigint, OUT "wal_bytes" numeric, OUT "jit_functions" bigint, OUT "jit_generation_time" double precision, OUT "jit_inlining_count" bigint, OUT "jit_inlining_time" double precision, OUT "jit_optimization_count" bigint, OUT "jit_optimization_time" double precision, OUT "jit_emission_count" bigint, OUT "jit_emission_time" double precision); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pg_stat_statements"("showtext" boolean, OUT "userid" "oid", OUT "dbid" "oid", OUT "toplevel" boolean, OUT "queryid" bigint, OUT "query" "text", OUT "plans" bigint, OUT "total_plan_time" double precision, OUT "min_plan_time" double precision, OUT "max_plan_time" double precision, OUT "mean_plan_time" double precision, OUT "stddev_plan_time" double precision, OUT "calls" bigint, OUT "total_exec_time" double precision, OUT "min_exec_time" double precision, OUT "max_exec_time" double precision, OUT "mean_exec_time" double precision, OUT "stddev_exec_time" double precision, OUT "rows" bigint, OUT "shared_blks_hit" bigint, OUT "shared_blks_read" bigint, OUT "shared_blks_dirtied" bigint, OUT "shared_blks_written" bigint, OUT "local_blks_hit" bigint, OUT "local_blks_read" bigint, OUT "local_blks_dirtied" bigint, OUT "local_blks_written" bigint, OUT "temp_blks_read" bigint, OUT "temp_blks_written" bigint, OUT "blk_read_time" double precision, OUT "blk_write_time" double precision, OUT "temp_blk_read_time" double precision, OUT "temp_blk_write_time" double precision, OUT "wal_records" bigint, OUT "wal_fpi" bigint, OUT "wal_bytes" numeric, OUT "jit_functions" bigint, OUT "jit_generation_time" double precision, OUT "jit_inlining_count" bigint, OUT "jit_inlining_time" double precision, OUT "jit_optimization_count" bigint, OUT "jit_optimization_time" double precision, OUT "jit_emission_count" bigint, OUT "jit_emission_time" double precision) FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements"("showtext" boolean, OUT "userid" "oid", OUT "dbid" "oid", OUT "toplevel" boolean, OUT "queryid" bigint, OUT "query" "text", OUT "plans" bigint, OUT "total_plan_time" double precision, OUT "min_plan_time" double precision, OUT "max_plan_time" double precision, OUT "mean_plan_time" double precision, OUT "stddev_plan_time" double precision, OUT "calls" bigint, OUT "total_exec_time" double precision, OUT "min_exec_time" double precision, OUT "max_exec_time" double precision, OUT "mean_exec_time" double precision, OUT "stddev_exec_time" double precision, OUT "rows" bigint, OUT "shared_blks_hit" bigint, OUT "shared_blks_read" bigint, OUT "shared_blks_dirtied" bigint, OUT "shared_blks_written" bigint, OUT "local_blks_hit" bigint, OUT "local_blks_read" bigint, OUT "local_blks_dirtied" bigint, OUT "local_blks_written" bigint, OUT "temp_blks_read" bigint, OUT "temp_blks_written" bigint, OUT "blk_read_time" double precision, OUT "blk_write_time" double precision, OUT "temp_blk_read_time" double precision, OUT "temp_blk_write_time" double precision, OUT "wal_records" bigint, OUT "wal_fpi" bigint, OUT "wal_bytes" numeric, OUT "jit_functions" bigint, OUT "jit_generation_time" double precision, OUT "jit_inlining_count" bigint, OUT "jit_inlining_time" double precision, OUT "jit_optimization_count" bigint, OUT "jit_optimization_time" double precision, OUT "jit_emission_count" bigint, OUT "jit_emission_time" double precision) TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements"("showtext" boolean, OUT "userid" "oid", OUT "dbid" "oid", OUT "toplevel" boolean, OUT "queryid" bigint, OUT "query" "text", OUT "plans" bigint, OUT "total_plan_time" double precision, OUT "min_plan_time" double precision, OUT "max_plan_time" double precision, OUT "mean_plan_time" double precision, OUT "stddev_plan_time" double precision, OUT "calls" bigint, OUT "total_exec_time" double precision, OUT "min_exec_time" double precision, OUT "max_exec_time" double precision, OUT "mean_exec_time" double precision, OUT "stddev_exec_time" double precision, OUT "rows" bigint, OUT "shared_blks_hit" bigint, OUT "shared_blks_read" bigint, OUT "shared_blks_dirtied" bigint, OUT "shared_blks_written" bigint, OUT "local_blks_hit" bigint, OUT "local_blks_read" bigint, OUT "local_blks_dirtied" bigint, OUT "local_blks_written" bigint, OUT "temp_blks_read" bigint, OUT "temp_blks_written" bigint, OUT "blk_read_time" double precision, OUT "blk_write_time" double precision, OUT "temp_blk_read_time" double precision, OUT "temp_blk_write_time" double precision, OUT "wal_records" bigint, OUT "wal_fpi" bigint, OUT "wal_bytes" numeric, OUT "jit_functions" bigint, OUT "jit_generation_time" double precision, OUT "jit_inlining_count" bigint, OUT "jit_inlining_time" double precision, OUT "jit_optimization_count" bigint, OUT "jit_optimization_time" double precision, OUT "jit_emission_count" bigint, OUT "jit_emission_time" double precision) TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pg_stat_statements_info"(OUT "dealloc" bigint, OUT "stats_reset" timestamp with time zone); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pg_stat_statements_info"(OUT "dealloc" bigint, OUT "stats_reset" timestamp with time zone) FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements_info"(OUT "dealloc" bigint, OUT "stats_reset" timestamp with time zone) TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements_info"(OUT "dealloc" bigint, OUT "stats_reset" timestamp with time zone) TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pg_stat_statements_reset"("userid" "oid", "dbid" "oid", "queryid" bigint); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pg_stat_statements_reset"("userid" "oid", "dbid" "oid", "queryid" bigint) FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements_reset"("userid" "oid", "dbid" "oid", "queryid" bigint) TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements_reset"("userid" "oid", "dbid" "oid", "queryid" bigint) TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_armor_headers"("text", OUT "key" "text", OUT "value" "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_armor_headers"("text", OUT "key" "text", OUT "value" "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_armor_headers"("text", OUT "key" "text", OUT "value" "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_armor_headers"("text", OUT "key" "text", OUT "value" "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_key_id"("bytea"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_key_id"("bytea") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_key_id"("bytea") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_key_id"("bytea") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_pub_decrypt"("bytea", "bytea"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_pub_decrypt"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_pub_decrypt"("bytea", "bytea", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_pub_decrypt_bytea"("bytea", "bytea"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_pub_decrypt_bytea"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_pub_decrypt_bytea"("bytea", "bytea", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_pub_encrypt"("text", "bytea"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_pub_encrypt"("text", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_pub_encrypt_bytea"("bytea", "bytea"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_pub_encrypt_bytea"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_sym_decrypt"("bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_sym_decrypt"("bytea", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_sym_decrypt_bytea"("bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_sym_decrypt_bytea"("bytea", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_sym_encrypt"("text", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_sym_encrypt"("text", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_sym_encrypt_bytea"("bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "pgp_sym_encrypt_bytea"("bytea", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text", "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text", "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text", "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "sign"("payload" "json", "secret" "text", "algorithm" "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."sign"("payload" "json", "secret" "text", "algorithm" "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."sign"("payload" "json", "secret" "text", "algorithm" "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."sign"("payload" "json", "secret" "text", "algorithm" "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "try_cast_double"("inp" "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."try_cast_double"("inp" "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."try_cast_double"("inp" "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."try_cast_double"("inp" "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "url_decode"("data" "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."url_decode"("data" "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."url_decode"("data" "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."url_decode"("data" "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "url_encode"("data" "bytea"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."url_encode"("data" "bytea") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."url_encode"("data" "bytea") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."url_encode"("data" "bytea") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "uuid_generate_v1"(); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."uuid_generate_v1"() FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v1"() TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v1"() TO "dashboard_user";
-
-
---
--- Name: FUNCTION "uuid_generate_v1mc"(); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."uuid_generate_v1mc"() FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v1mc"() TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v1mc"() TO "dashboard_user";
-
-
---
--- Name: FUNCTION "uuid_generate_v3"("namespace" "uuid", "name" "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."uuid_generate_v3"("namespace" "uuid", "name" "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v3"("namespace" "uuid", "name" "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v3"("namespace" "uuid", "name" "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "uuid_generate_v4"(); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."uuid_generate_v4"() FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v4"() TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v4"() TO "dashboard_user";
-
-
---
--- Name: FUNCTION "uuid_generate_v5"("namespace" "uuid", "name" "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."uuid_generate_v5"("namespace" "uuid", "name" "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v5"("namespace" "uuid", "name" "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v5"("namespace" "uuid", "name" "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "uuid_nil"(); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."uuid_nil"() FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."uuid_nil"() TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."uuid_nil"() TO "dashboard_user";
-
-
---
--- Name: FUNCTION "uuid_ns_dns"(); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."uuid_ns_dns"() FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."uuid_ns_dns"() TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."uuid_ns_dns"() TO "dashboard_user";
-
-
---
--- Name: FUNCTION "uuid_ns_oid"(); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."uuid_ns_oid"() FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."uuid_ns_oid"() TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."uuid_ns_oid"() TO "dashboard_user";
-
-
---
--- Name: FUNCTION "uuid_ns_url"(); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."uuid_ns_url"() FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."uuid_ns_url"() TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."uuid_ns_url"() TO "dashboard_user";
-
-
---
--- Name: FUNCTION "uuid_ns_x500"(); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."uuid_ns_x500"() FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."uuid_ns_x500"() TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."uuid_ns_x500"() TO "dashboard_user";
-
-
---
--- Name: FUNCTION "verify"("token" "text", "secret" "text", "algorithm" "text"); Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON FUNCTION "extensions"."verify"("token" "text", "secret" "text", "algorithm" "text") FROM "postgres";
--- GRANT ALL ON FUNCTION "extensions"."verify"("token" "text", "secret" "text", "algorithm" "text") TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON FUNCTION "extensions"."verify"("token" "text", "secret" "text", "algorithm" "text") TO "dashboard_user";
-
-
---
--- Name: FUNCTION "comment_directive"("comment_" "text"); Type: ACL; Schema: graphql; Owner: supabase_admin
---
-
--- GRANT ALL ON FUNCTION "graphql"."comment_directive"("comment_" "text") TO "postgres";
--- GRANT ALL ON FUNCTION "graphql"."comment_directive"("comment_" "text") TO "anon";
--- GRANT ALL ON FUNCTION "graphql"."comment_directive"("comment_" "text") TO "authenticated";
--- GRANT ALL ON FUNCTION "graphql"."comment_directive"("comment_" "text") TO "service_role";
-
-
---
--- Name: FUNCTION "exception"("message" "text"); Type: ACL; Schema: graphql; Owner: supabase_admin
---
-
--- GRANT ALL ON FUNCTION "graphql"."exception"("message" "text") TO "postgres";
--- GRANT ALL ON FUNCTION "graphql"."exception"("message" "text") TO "anon";
--- GRANT ALL ON FUNCTION "graphql"."exception"("message" "text") TO "authenticated";
--- GRANT ALL ON FUNCTION "graphql"."exception"("message" "text") TO "service_role";
-
-
---
--- Name: FUNCTION "get_schema_version"(); Type: ACL; Schema: graphql; Owner: supabase_admin
---
-
--- GRANT ALL ON FUNCTION "graphql"."get_schema_version"() TO "postgres";
--- GRANT ALL ON FUNCTION "graphql"."get_schema_version"() TO "anon";
--- GRANT ALL ON FUNCTION "graphql"."get_schema_version"() TO "authenticated";
--- GRANT ALL ON FUNCTION "graphql"."get_schema_version"() TO "service_role";
-
-
---
--- Name: FUNCTION "increment_schema_version"(); Type: ACL; Schema: graphql; Owner: supabase_admin
---
-
--- GRANT ALL ON FUNCTION "graphql"."increment_schema_version"() TO "postgres";
--- GRANT ALL ON FUNCTION "graphql"."increment_schema_version"() TO "anon";
--- GRANT ALL ON FUNCTION "graphql"."increment_schema_version"() TO "authenticated";
--- GRANT ALL ON FUNCTION "graphql"."increment_schema_version"() TO "service_role";
-
-
---
--- Name: FUNCTION "graphql"("operationName" "text", "query" "text", "variables" "jsonb", "extensions" "jsonb"); Type: ACL; Schema: graphql_public; Owner: supabase_admin
---
-
--- GRANT ALL ON FUNCTION "graphql_public"."graphql"("operationName" "text", "query" "text", "variables" "jsonb", "extensions" "jsonb") TO "postgres";
--- GRANT ALL ON FUNCTION "graphql_public"."graphql"("operationName" "text", "query" "text", "variables" "jsonb", "extensions" "jsonb") TO "anon";
--- GRANT ALL ON FUNCTION "graphql_public"."graphql"("operationName" "text", "query" "text", "variables" "jsonb", "extensions" "jsonb") TO "authenticated";
--- GRANT ALL ON FUNCTION "graphql_public"."graphql"("operationName" "text", "query" "text", "variables" "jsonb", "extensions" "jsonb") TO "service_role";
-
-
---
--- Name: FUNCTION "crypto_aead_det_decrypt"("message" "bytea", "additional" "bytea", "key_uuid" "uuid", "nonce" "bytea"); Type: ACL; Schema: pgsodium; Owner: pgsodium_keymaker
---
-
--- GRANT ALL ON FUNCTION "pgsodium"."crypto_aead_det_decrypt"("message" "bytea", "additional" "bytea", "key_uuid" "uuid", "nonce" "bytea") TO "service_role";
-
-
---
--- Name: FUNCTION "crypto_aead_det_encrypt"("message" "bytea", "additional" "bytea", "key_uuid" "uuid", "nonce" "bytea"); Type: ACL; Schema: pgsodium; Owner: pgsodium_keymaker
---
-
--- GRANT ALL ON FUNCTION "pgsodium"."crypto_aead_det_encrypt"("message" "bytea", "additional" "bytea", "key_uuid" "uuid", "nonce" "bytea") TO "service_role";
-
-
---
--- Name: FUNCTION "crypto_aead_det_keygen"(); Type: ACL; Schema: pgsodium; Owner: supabase_admin
---
-
--- GRANT ALL ON FUNCTION "pgsodium"."crypto_aead_det_keygen"() TO "service_role";
-
-
---
--- Name: TABLE "pg_stat_statements"; Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON TABLE "extensions"."pg_stat_statements" FROM "postgres";
--- GRANT ALL ON TABLE "extensions"."pg_stat_statements" TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON TABLE "extensions"."pg_stat_statements" TO "dashboard_user";
-
-
---
--- Name: TABLE "pg_stat_statements_info"; Type: ACL; Schema: extensions; Owner: postgres
---
-
--- REVOKE ALL ON TABLE "extensions"."pg_stat_statements_info" FROM "postgres";
--- GRANT ALL ON TABLE "extensions"."pg_stat_statements_info" TO "postgres" WITH GRANT OPTION;
--- GRANT ALL ON TABLE "extensions"."pg_stat_statements_info" TO "dashboard_user";
-
-
---
--- Name: SEQUENCE "seq_schema_version"; Type: ACL; Schema: graphql; Owner: supabase_admin
---
-
--- GRANT ALL ON SEQUENCE "graphql"."seq_schema_version" TO "postgres";
--- GRANT ALL ON SEQUENCE "graphql"."seq_schema_version" TO "anon";
--- GRANT ALL ON SEQUENCE "graphql"."seq_schema_version" TO "authenticated";
--- GRANT ALL ON SEQUENCE "graphql"."seq_schema_version" TO "service_role";
-
-
---
--- Name: TABLE "decrypted_key"; Type: ACL; Schema: pgsodium; Owner: supabase_admin
---
-
--- GRANT ALL ON TABLE "pgsodium"."decrypted_key" TO "pgsodium_keyholder";
-
-
---
--- Name: TABLE "masking_rule"; Type: ACL; Schema: pgsodium; Owner: supabase_admin
---
-
--- GRANT ALL ON TABLE "pgsodium"."masking_rule" TO "pgsodium_keyholder";
-
-
---
--- Name: TABLE "mask_columns"; Type: ACL; Schema: pgsodium; Owner: supabase_admin
---
-
--- GRANT ALL ON TABLE "pgsodium"."mask_columns" TO "pgsodium_keyholder";
-
-
---
--- Name: TABLE "deployments"; Type: ACL; Schema: public; Owner: postgres
---
-
-GRANT ALL ON TABLE "public"."deployments" TO "anon";
-GRANT ALL ON TABLE "public"."deployments" TO "authenticated";
-GRANT ALL ON TABLE "public"."deployments" TO "service_role";
-
-
---
--- Name: TABLE "projects"; Type: ACL; Schema: public; Owner: postgres
---
-
-GRANT ALL ON TABLE "public"."projects" TO "anon";
-GRANT ALL ON TABLE "public"."projects" TO "authenticated";
-GRANT ALL ON TABLE "public"."projects" TO "service_role";
-
-
---
--- Name: TABLE "teams"; Type: ACL; Schema: public; Owner: postgres
---
-
-GRANT ALL ON TABLE "public"."teams" TO "anon";
-GRANT ALL ON TABLE "public"."teams" TO "authenticated";
-GRANT ALL ON TABLE "public"."teams" TO "service_role";
-
-
---
--- Name: TABLE "users_teams"; Type: ACL; Schema: public; Owner: postgres
---
-
-GRANT ALL ON TABLE "public"."users_teams" TO "anon";
-GRANT ALL ON TABLE "public"."users_teams" TO "authenticated";
-GRANT ALL ON TABLE "public"."users_teams" TO "service_role";
-
-
---
--- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: public; Owner: postgres
---
-
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "postgres";
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "anon";
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "authenticated";
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "service_role";
-
-
---
--- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: public; Owner: supabase_admin
---
-
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "postgres";
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "anon";
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "authenticated";
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "service_role";
-
-
---
--- Name: DEFAULT PRIVILEGES FOR FUNCTIONS; Type: DEFAULT ACL; Schema: public; Owner: postgres
---
-
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "postgres";
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "anon";
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "authenticated";
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "service_role";
-
-
---
--- Name: DEFAULT PRIVILEGES FOR FUNCTIONS; Type: DEFAULT ACL; Schema: public; Owner: supabase_admin
---
-
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "postgres";
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "anon";
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "authenticated";
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "service_role";
-
-
---
--- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: public; Owner: postgres
---
-
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "postgres";
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "anon";
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "authenticated";
-ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "service_role";
-
-
---
--- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: public; Owner: supabase_admin
---
-
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON TABLES TO "postgres";
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON TABLES TO "anon";
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON TABLES TO "authenticated";
--- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON TABLES TO "service_role";
-
-
---
--- PostgreSQL database dump complete
---
-
-RESET ALL;
diff --git a/supabase/seed.sql b/supabase/seed.sql
deleted file mode 100644
index 81d49c4d6..000000000
--- a/supabase/seed.sql
+++ /dev/null
@@ -1,20 +0,0 @@
---
--- Add default user and project
---
-
-INSERT INTO auth.users (instance_id, id, aud, role, email, encrypted_password, email_confirmed_at, invited_at, confirmation_token, confirmation_sent_at, recovery_token, recovery_sent_at, email_change_token_new, email_change, email_change_sent_at, last_sign_in_at, raw_app_meta_data, raw_user_meta_data, is_super_admin, created_at, updated_at, phone, phone_confirmed_at, phone_change, phone_change_token, phone_change_sent_at, email_change_token_current, email_change_confirm_status, banned_until, reauthentication_token, reauthentication_sent_at)
-VALUES
- ('00000000-0000-0000-0000-000000000000', '5899f99d-a449-4bfa-8769-19c097aaf1f5', 'authenticated', 'authenticated', '[email protected]', '$2a$10$yLZXHGHl7mgJ.Ax3cBhQ6uJ77CBuqTkt3EnF2hj26KAgMuBPUWekS', '2022-10-04 03:41:27.39308+00', NULL, '', NULL, '', NULL, '', '', NULL, NULL, '{"provider": "email", "providers": ["email"]}', '{}', NULL, '2022-10-04 03:41:27.391146+00', '2022-10-04 03:41:27.39308+00', NULL, NULL, '', '', NULL, '', 0, NULL, '', NULL);
-
-INSERT INTO auth.identities (id,user_id,identity_data,provider,last_sign_in_at,created_at,updated_at)
-VALUES
- ('5899f99d-a449-4bfa-8769-19c097aaf1f5', '5899f99d-a449-4bfa-8769-19c097aaf1f5'::uuid, '{"sub": "5899f99d-a449-4bfa-8769-19c097aaf1f5"}', 'email', '2022-10-04 04:45:00.000+00', '2022-10-04 03:41:27.391146+00', '2022-10-04 03:41:27.39308+00');
-
-INSERT INTO "public"."teams" (id, created_at, name, is_default)
- VALUES ('21d2e330-95fa-4b78-b677-47d0713de3da', NOW(), '[email protected]', true);
-
-INSERT INTO "public"."users_teams" (user_id, created_at, team_id)
-VALUES ('5899f99d-a449-4bfa-8769-19c097aaf1f5', NOW(), '21d2e330-95fa-4b78-b677-47d0713de3da');
-
--- INSERT INTO "public"."projects" (id, created_at, data, team_id, name)
--- VALUES ('default_project', NOW(), '{}', '21d2e330-95fa-4b78-b677-47d0713de3da', 'Default Project');