auto_cert.ts 871 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import http from '@/lib/http'
  2. export interface DNSProvider {
  3. name?: string
  4. code?: string
  5. provider?: string
  6. configuration: {
  7. credentials: Record<string, string>
  8. additional: Record<string, string>
  9. }
  10. links?: {
  11. api: string
  12. go_client: string
  13. }
  14. }
  15. export interface AutoCertOptions {
  16. name?: string
  17. domains: string[]
  18. code?: string
  19. dns_credential_id?: number | null
  20. challenge_method?: string
  21. configuration?: DNSProvider['configuration']
  22. key_type: string
  23. acme_user_id?: number
  24. provider?: string
  25. must_staple?: boolean
  26. lego_disable_cname_support?: boolean
  27. }
  28. const auto_cert = {
  29. get_dns_providers(): Promise<DNSProvider[]> {
  30. return http.get('/certificate/dns_providers')
  31. },
  32. get_dns_provider(code: string): Promise<DNSProvider> {
  33. return http.get(`/certificate/dns_provider/${code}`)
  34. },
  35. }
  36. export default auto_cert