type.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. export enum Plan {
  2. sandbox = 'sandbox',
  3. professional = 'professional',
  4. team = 'team',
  5. enterprise = 'enterprise',
  6. }
  7. export enum Priority {
  8. standard = 'standard',
  9. priority = 'priority',
  10. topPriority = 'top-priority',
  11. }
  12. export type PlanInfo = {
  13. level: number
  14. price: number
  15. modelProviders: string
  16. teamMembers: number
  17. buildApps: number
  18. vectorSpace: number
  19. documentsUploadQuota: number
  20. documentProcessingPriority: Priority
  21. logHistory: number
  22. customTools: string | number
  23. messageRequest: {
  24. en: string | number
  25. zh: string | number
  26. }
  27. annotatedResponse: number
  28. }
  29. export type UsagePlanInfo = Pick<PlanInfo, 'vectorSpace' | 'buildApps' | 'teamMembers' | 'annotatedResponse' | 'documentsUploadQuota'>
  30. export enum DocumentProcessingPriority {
  31. standard = 'standard',
  32. priority = 'priority',
  33. topPriority = 'top-priority',
  34. }
  35. export type CurrentPlanInfoBackend = {
  36. billing: {
  37. enabled: boolean
  38. subscription: {
  39. plan: Plan
  40. }
  41. }
  42. members: {
  43. size: number
  44. limit: number // total. 0 means unlimited
  45. }
  46. apps: {
  47. size: number
  48. limit: number // total. 0 means unlimited
  49. }
  50. vector_space: {
  51. size: number
  52. limit: number // total. 0 means unlimited
  53. }
  54. annotation_quota_limit: {
  55. size: number
  56. limit: number // total. 0 means unlimited
  57. }
  58. documents_upload_quota: {
  59. size: number
  60. limit: number // total. 0 means unlimited
  61. }
  62. docs_processing: DocumentProcessingPriority
  63. can_replace_logo: boolean
  64. model_load_balancing_enabled: boolean
  65. dataset_operator_enabled: boolean
  66. }
  67. export type SubscriptionItem = {
  68. plan: Plan
  69. url: string
  70. }
  71. export type SubscriptionUrlsBackend = {
  72. url: string
  73. }