ui.ts45 lines · main
1import type { PGColumn } from '@supabase/pg-meta'
2
3import { ProjectLogStatsVariables } from '@/data/analytics/project-log-stats-query'
4
5export interface Notification {
6 category: 'info' | 'error' | 'success' | 'loading'
7 message: string // Readable message for users to understand
8 description?: string
9 id?: string
10 error?: any // Optional: Any other errors that needs to be logged out in the console
11 progress?: number // Optional: For loading messages to show a progress bar (Out of 100)
12 duration?: number // Optional: How long to show the message for (ms)
13 metadata?: NotificationMetadata
14}
15
16interface NotificationMetadata {
17 [key: string]: any
18}
19
20export interface ChartIntervals {
21 key: Exclude<ProjectLogStatsVariables['interval'], undefined>
22 label: string
23 startValue: number
24 startUnit: 'minute' | 'hour' | 'day'
25 format?: 'MMM D, h:mm:ssa' | 'MMM D, h:mma' | 'MMM D, ha' | 'MMM D'
26}
27
28export interface VaultSecret {
29 id: string
30 name: string
31 description: string
32 secret: string
33 decryptedSecret?: string
34 created_at: string
35 updated_at: string
36}
37
38export interface SchemaView {
39 id: number
40 name: string
41 schema: string
42 is_updatable: boolean
43 comment?: string
44 columns: PGColumn[]
45}