ui.ts 1.2 KB

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