2016-07-24 17:39:20 +00:00
|
|
|
/// <reference types="q" />
|
2016-10-23 22:35:00 +00:00
|
|
|
import * as q from 'q';
|
|
|
|
import { Stringmap, Objectmap } from 'lik';
|
|
|
|
import { Certificate } from './cert.classes.certificate';
|
|
|
|
import { Letsencrypt, TLeEnv } from './cert.classes.letsencrypt';
|
2016-07-24 17:39:20 +00:00
|
|
|
export interface ICertConstructorOptions {
|
|
|
|
cfEmail: string;
|
|
|
|
cfKey: string;
|
2016-10-23 22:35:00 +00:00
|
|
|
sslDirPath?: string;
|
2016-07-24 17:39:20 +00:00
|
|
|
gitOriginRepo?: string;
|
2016-10-23 22:35:00 +00:00
|
|
|
leEnv?: TLeEnv;
|
2016-07-24 17:39:20 +00:00
|
|
|
}
|
|
|
|
export declare class Cert {
|
2016-10-23 22:35:00 +00:00
|
|
|
domainStringRequestMap: Stringmap;
|
|
|
|
certificateMap: Objectmap<Certificate>;
|
|
|
|
letsencrypt: Letsencrypt;
|
|
|
|
private _challengeHandler;
|
|
|
|
private _certRepo;
|
2016-07-24 17:39:20 +00:00
|
|
|
/**
|
|
|
|
* Constructor for Cert object
|
|
|
|
*/
|
|
|
|
constructor(optionsArg: ICertConstructorOptions);
|
2017-01-01 04:18:50 +00:00
|
|
|
/**
|
|
|
|
* setup the Cert instanceof
|
|
|
|
* @executes ASYNC
|
|
|
|
* @return Promise
|
|
|
|
*/
|
|
|
|
setup(): q.Promise<{}>;
|
2016-07-24 17:39:20 +00:00
|
|
|
/**
|
2016-10-23 22:35:00 +00:00
|
|
|
* adds a Certificate for a given domain
|
2016-07-24 17:39:20 +00:00
|
|
|
*/
|
2016-10-23 22:35:00 +00:00
|
|
|
addCertificate(domainNameArg: string, optionsArg?: {
|
|
|
|
force: boolean;
|
|
|
|
}): q.Promise<{}>;
|
2016-07-24 17:39:20 +00:00
|
|
|
/**
|
2016-10-23 22:35:00 +00:00
|
|
|
* cleans up old certificates
|
2016-07-24 17:39:20 +00:00
|
|
|
*/
|
2016-10-23 22:35:00 +00:00
|
|
|
cleanOldCertificates(): void;
|
2016-07-24 17:39:20 +00:00
|
|
|
/**
|
2016-10-23 22:35:00 +00:00
|
|
|
* executes the current batch of jobs
|
2016-07-24 17:39:20 +00:00
|
|
|
*/
|
2016-10-23 22:35:00 +00:00
|
|
|
deploy(): void;
|
2016-07-24 17:39:20 +00:00
|
|
|
}
|