import * as plugins from '../plugins.js';
import * as data from '../data/index.js';

export interface IReq_ObtainCertificate extends plugins.typedrequestInterfaces.implementsTR<
  plugins.typedrequestInterfaces.ITypedRequest,
  IReq_ObtainCertificate
> {
  method: 'obtainCertificate';
  request: {
    identity: data.IIdentity;
    domain: string;
  };
  response: {
    certificate: data.ICertificate;
  };
}

export interface IReq_ListCertificates extends plugins.typedrequestInterfaces.implementsTR<
  plugins.typedrequestInterfaces.ITypedRequest,
  IReq_ListCertificates
> {
  method: 'listCertificates';
  request: {
    identity: data.IIdentity;
  };
  response: {
    certificates: data.ICertificate[];
  };
}

export interface IReq_GetCertificate extends plugins.typedrequestInterfaces.implementsTR<
  plugins.typedrequestInterfaces.ITypedRequest,
  IReq_GetCertificate
> {
  method: 'getCertificate';
  request: {
    identity: data.IIdentity;
    domain: string;
  };
  response: {
    certificate: data.ICertificate;
  };
}

export interface IReq_RenewCertificate extends plugins.typedrequestInterfaces.implementsTR<
  plugins.typedrequestInterfaces.ITypedRequest,
  IReq_RenewCertificate
> {
  method: 'renewCertificate';
  request: {
    identity: data.IIdentity;
    domain: string;
  };
  response: {
    certificate: data.ICertificate;
  };
}
