Support.constants.ts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. import { SupportCategories } from '@supabase/shared-types/out/constants'
  2. import { isFeatureEnabled } from 'common'
  3. const billingEnabled = isFeatureEnabled('billing:all')
  4. export type ExtendedSupportCategories = SupportCategories | 'Plan_upgrade' | 'Others'
  5. export const CATEGORY_OPTIONS: {
  6. value: ExtendedSupportCategories
  7. label: string
  8. description: string
  9. query?: string
  10. }[] = [
  11. {
  12. value: SupportCategories.PROBLEM,
  13. label: 'APIs and client libraries',
  14. description: "Issues with your project's API and client libraries",
  15. query: undefined,
  16. },
  17. {
  18. value: SupportCategories.DASHBOARD_BUG,
  19. label: 'Dashboard bug',
  20. description: 'Issues with the Briven dashboard',
  21. query: undefined,
  22. },
  23. {
  24. value: SupportCategories.DATABASE_UNRESPONSIVE,
  25. label: 'Database unresponsive',
  26. description: 'Issues with connecting to your database',
  27. query: 'Unable to connect',
  28. },
  29. {
  30. value: SupportCategories.PERFORMANCE_ISSUES,
  31. label: 'Performance issues',
  32. description: 'Reporting of performance issues is only available on the Pro Plan',
  33. query: 'Performance',
  34. },
  35. {
  36. value: SupportCategories.ABUSE,
  37. label: 'Abuse report',
  38. description: 'Report abuse of a Briven project or Briven brand',
  39. query: undefined,
  40. },
  41. {
  42. value: SupportCategories.LOGIN_ISSUES,
  43. label: 'Issues with logging in',
  44. description: 'Issues with logging in and MFA',
  45. query: undefined,
  46. },
  47. ...(billingEnabled
  48. ? [
  49. {
  50. value: SupportCategories.SALES_ENQUIRY,
  51. label: 'Sales enquiry',
  52. description: 'Questions about pricing, paid plans and Enterprise plans',
  53. query: undefined,
  54. },
  55. {
  56. value: SupportCategories.BILLING,
  57. label: 'Billing',
  58. description: 'Issues with credit card charges | invoices | overcharging',
  59. query: undefined,
  60. },
  61. {
  62. value: SupportCategories.REFUND,
  63. label: 'Refund enquiry',
  64. description: 'Formal enquiry form for requesting refunds',
  65. query: undefined,
  66. },
  67. ]
  68. : [
  69. // [Joshen] Ideally shift this to shared-types, although not critical as API isn't validating the category
  70. {
  71. value: 'Plan_upgrade' as const,
  72. label: 'Plan upgrade',
  73. description: 'Enquire a plan upgrade for your organization',
  74. query: undefined,
  75. },
  76. ]),
  77. ]
  78. export const SEVERITY_OPTIONS = [
  79. {
  80. value: 'Low',
  81. label: 'Low',
  82. description: 'General guidance',
  83. },
  84. {
  85. value: 'Normal',
  86. label: 'Normal',
  87. description: 'System impaired',
  88. },
  89. {
  90. value: 'High',
  91. label: 'High',
  92. description: 'Production system impaired',
  93. },
  94. {
  95. value: 'Urgent',
  96. label: 'Urgent',
  97. description: 'Production system down',
  98. },
  99. ]
  100. export const SERVICE_OPTIONS = [
  101. {
  102. id: 1,
  103. name: 'Authentication',
  104. value: 'Authentication',
  105. disabled: false,
  106. },
  107. {
  108. id: 2,
  109. name: 'Dashboard',
  110. value: 'Dashboard',
  111. disabled: false,
  112. },
  113. {
  114. id: 3,
  115. name: 'Database',
  116. value: 'Database',
  117. disabled: false,
  118. },
  119. {
  120. id: 4,
  121. name: 'Edge Functions',
  122. value: 'Edge Functions',
  123. disabled: false,
  124. },
  125. {
  126. id: 5,
  127. name: 'Realtime',
  128. value: 'Realtime',
  129. disabled: false,
  130. },
  131. {
  132. id: 6,
  133. name: 'Storage',
  134. value: 'Storage',
  135. disabled: false,
  136. },
  137. {
  138. id: 7,
  139. name: 'Others',
  140. value: 'Others',
  141. disabled: false,
  142. },
  143. ]
  144. export const IPV4_MIGRATION_STRINGS = [
  145. 'ipv4',
  146. 'ipv6',
  147. 'supavisor',
  148. 'pgbouncer',
  149. '5432',
  150. 'ENETUNREACH',
  151. 'ECONNREFUSED',
  152. 'P1001',
  153. 'connect: no route to',
  154. 'network is unreac',
  155. 'could not translate host name',
  156. 'address family not supported by protocol',
  157. ]