dots

certificate

create-certificate

original documentation┬╣

original documentation┬▓

try {
  const input = {
    certificate_chain: '', // string;
    dns_names: ['pimentel.co'], // string[]
    leaf_certificate: '', // string
    name: '', // string
    private_key: '' // string
    type: '', // 'custom' | 'lets_encrypt';
  };
  const {data:{certificate}} = await dots.certificate.createCertificate(input);
  console.log(certificate);
} catch (error) {
  console.log(error);
}

delete-certificate

original documentation

try {
  const input = {id: 'my-certificate-id'};
  const {data:{certificate}} = await dots.certificate.deleteCertificate(input);
  console.log(certificate);
} catch (error) {
  console.log(error);
}

get-certificate

original documentation

try {
  const input = {id: 'my-certificate-id'};
  const {data:{certificate}} = await dots.certificate.getCertificate(input);
  console.log(certificate);
} catch (error) {
  console.log(error);
}

list-certificates

original documentation

try {
  const input = {per_page: 100};
  const {data:{certificates}} = await dots.certificate.listCertificates(input);
  console.log(certificates);
} catch (error) {
  console.log(error);
}