Compare commits

..

8 Commits

Author SHA1 Message Date
9699e4bf76 0.0.11 2017-01-22 19:37:04 +01:00
0692d16dd7 now reacting to rate limiting 2017-01-22 19:37:00 +01:00
c76643d700 0.0.10 2016-07-31 23:55:25 +02:00
de088ba550 update dependencies 2016-07-31 23:54:13 +02:00
1ecf660368 0.0.9 2016-06-22 13:30:02 +02:00
a04ce339f2 0.0.8 2016-06-22 13:29:58 +02:00
feed201dc1 0.0.7 2016-06-22 13:01:38 +02:00
cb73164c8f updated dependencies 2016-06-22 13:01:28 +02:00
16 changed files with 370 additions and 198 deletions

1
.gitignore vendored
View File

@ -1,6 +1,5 @@
coverage/ coverage/
docs/ docs/
ts/typings/
node_modules/ node_modules/
.nogit/ .nogit/

View File

@ -1,4 +1,5 @@
import "typings-global"; import "typings-global";
import * as interfaces from './cflare.interfaces';
export declare class CflareAccount { export declare class CflareAccount {
private authEmail; private authEmail;
private authKey; private authKey;
@ -8,12 +9,12 @@ export declare class CflareAccount {
email: string; email: string;
key: string; key: string;
}): void; }): void;
getZoneId(domainName: string): any; getZoneId(domainName: string): Promise<{}>;
getRecord(domainNameArg: string, typeArg: string): any; getRecord(domainNameArg: string, typeArg: string): Promise<interfaces.ICflareRecord>;
createRecord(domainNameArg: string, typeArg: string, contentArg: string): any; createRecord(domainNameArg: string, typeArg: string, contentArg: string): Promise<{}>;
removeRecord(domainNameArg: string, typeArg: string): any; removeRecord(domainNameArg: string, typeArg: string): Promise<{}>;
updateRecord(domainNameArg: string, typeArg: string, valueArg: any): any; updateRecord(domainNameArg: string, typeArg: string, valueArg: any): Promise<{}>;
listRecords(domainNameArg: string): any; listRecords(domainNameArg: string): Promise<interfaces.ICflareRecord[]>;
listZones(domainName?: string): any; listZones(domainName?: string): Promise<interfaces.ICflareZone[]>;
request(methodArg: string, routeArg: string, dataArg?: {}): any; request(methodArg: string, routeArg: string, dataArg?: {}): Promise<{}>;
} }

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,3 @@
"use strict"; "use strict";
require("typings-global"); require("typings-global");
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2ZsYXJlLmNsYXNzZXMuaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2NmbGFyZS5jbGFzc2VzLmhlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF3QiJ9
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNmbGFyZS5jbGFzc2VzLmhlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQSIsImZpbGUiOiJjZmxhcmUuY2xhc3Nlcy5oZWxwZXJzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFwidHlwaW5ncy1nbG9iYWxcIjtcbmltcG9ydCBwbHVnaW5zID0gcmVxdWlyZShcIi4vY2ZsYXJlLnBsdWdpbnNcIik7Il19

56
dist/cflare.interfaces.d.ts vendored Normal file
View File

@ -0,0 +1,56 @@
export interface ICflareZone {
"id": string;
"name": string;
"development_mode": number;
"original_name_servers": string[];
"original_registrar": string;
"original_dnshost": string;
"created_on": string;
"modified_on": string;
"name_servers": string[];
"owner": {
"id": string;
"email": string;
"owner_type": string;
};
"permissions": string[];
"plan": {
"id": string;
"name": string;
"price": number;
"currency": string;
"frequency": string;
"legacy_id": string;
"is_subscribed": boolean;
"can_subscribe": boolean;
};
"plan_pending": {
"id": string;
"name": string;
"price": number;
"currency": string;
"frequency": string;
"legacy_id": string;
"is_subscribed": string;
"can_subscribe": string;
};
"status": string;
"paused": boolean;
"type": string;
"checked_on": string;
}
export interface ICflareRecord {
"id": string;
"type": string;
"name": string;
"content": string;
"proxiable": boolean;
"proxied": boolean;
"ttl": number;
"locked": boolean;
"zone_id": string;
"zone_name": string;
"created_on": string;
"modified_on": string;
"data": any;
}

2
dist/cflare.interfaces.js vendored Normal file
View File

@ -0,0 +1,2 @@
"use strict";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2ZsYXJlLmludGVyZmFjZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9jZmxhcmUuaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=

View File

@ -1,5 +1,6 @@
import "typings-global"; import "typings-global";
export declare let beautylog: any; export declare let beautylog: any;
export declare let q: any; export import q = require("smartq");
export declare let request: any; export declare let request: any;
export import smartstring = require("smartstring"); export import smartstring = require("smartstring");
export import smartdelay = require('smartdelay');

View File

@ -1,8 +1,8 @@
"use strict"; "use strict";
require("typings-global"); require("typings-global");
exports.beautylog = require("beautylog"); exports.beautylog = require("beautylog");
exports.q = require("q"); exports.q = require("smartq");
exports.request = require("request"); exports.request = require("request");
exports.smartstring = require("smartstring"); exports.smartstring = require("smartstring");
exports.smartdelay = require("smartdelay");
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNmbGFyZS5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDYixpQkFBUyxHQUFHLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQztBQUNqQyxTQUFDLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ2pCLGVBQU8sR0FBRyxPQUFPLENBQUMsU0FBUyxDQUFDLENBQUM7QUFDMUIsbUJBQVcsV0FBVyxhQUFhLENBQUMsQ0FBQyIsImZpbGUiOiJjZmxhcmUucGx1Z2lucy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBcInR5cGluZ3MtZ2xvYmFsXCI7XG5leHBvcnQgbGV0IGJlYXV0eWxvZyA9IHJlcXVpcmUoXCJiZWF1dHlsb2dcIik7XG5leHBvcnQgbGV0IHEgPSByZXF1aXJlKFwicVwiKTtcbmV4cG9ydCBsZXQgcmVxdWVzdCA9IHJlcXVpcmUoXCJyZXF1ZXN0XCIpO1xuZXhwb3J0IGltcG9ydCBzbWFydHN0cmluZyA9IHJlcXVpcmUoXCJzbWFydHN0cmluZ1wiKTsiXX0= //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2ZsYXJlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9jZmxhcmUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXdCO0FBQ2IsUUFBQSxTQUFTLEdBQUcsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0FBQzVDLDhCQUFvQztBQUN6QixRQUFBLE9BQU8sR0FBRyxPQUFPLENBQUMsU0FBUyxDQUFDLENBQUM7QUFDeEMsNkNBQW1EO0FBQ25ELDJDQUFpRCJ9

3
dist/index.js vendored
View File

@ -2,5 +2,4 @@
require("typings-global"); require("typings-global");
var cflare_classes_cflareaccount_1 = require("./cflare.classes.cflareaccount"); var cflare_classes_cflareaccount_1 = require("./cflare.classes.cflareaccount");
exports.CflareAccount = cflare_classes_cflareaccount_1.CflareAccount; exports.CflareAccount = cflare_classes_cflareaccount_1.CflareAccount;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXdCO0FBQ3hCLCtFQUE2RDtBQUFyRCx1REFBQSxhQUFhLENBQUEifQ==
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDeEIsNkNBQTRCLGdDQUFnQyxDQUFDO0FBQXJELHFFQUFxRCIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBcInR5cGluZ3MtZ2xvYmFsXCI7XG5leHBvcnQge0NmbGFyZUFjY291bnR9IGZyb20gXCIuL2NmbGFyZS5jbGFzc2VzLmNmbGFyZWFjY291bnRcIjsiXX0=

View File

@ -1,6 +1,6 @@
{ {
"name": "cflare", "name": "cflare",
"version": "0.0.6", "version": "0.0.11",
"description": "cloudflare management for CoreOS", "description": "cloudflare management for CoreOS",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
@ -22,16 +22,17 @@
}, },
"homepage": "https://github.com/pushrocks/cflare#readme", "homepage": "https://github.com/pushrocks/cflare#readme",
"dependencies": { "dependencies": {
"beautylog": "^5.0.12", "beautylog": "^6.1.1",
"q": "^1.4.1", "request": "^2.79.0",
"request": "^2.72.0", "smartdelay": "^1.0.1",
"smartstring": "^2.0.9", "smartq": "^1.0.4",
"typings-global": "^1.0.3" "smartstring": "^2.0.22",
"typings-global": "^1.0.14"
}, },
"devDependencies": { "devDependencies": {
"npmts-g": "^5.2.6", "npmts-g": "^6.0.0",
"qenv": "^1.0.8", "qenv": "^1.1.3",
"should": "^9.0.2", "should": "^11.1.2",
"typings-test": "^1.0.1" "typings-test": "^1.0.3"
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -14,27 +14,25 @@ describe("cflare",function(){
describe(".CflareAccount",function(){ describe(".CflareAccount",function(){
describe(".listZones()",function(){ describe(".listZones()",function(){
it("should display an entire account",function(done){ it("should display an entire account",function(done){
this.timeout(10000); this.timeout(30000);
testCflareAccount.listZones() testCflareAccount.listZones()
.then((responseArg)=>{ .then((responseArg)=>{
console.log(responseArg);
done(); done();
}) })
}); });
}); });
describe(".getZoneId(domainName)",function(){ describe(".getZoneId(domainName)",function(){
it("should get an Cloudflare Id for a domain string",function(done){ it("should get an Cloudflare Id for a domain string",function(done){
this.timeout(10000) this.timeout(30000)
testCflareAccount.getZoneId("bleu.de") testCflareAccount.getZoneId("bleu.de")
.then((responseArg)=>{ .then((responseArg)=>{
console.log(responseArg);
done(); done();
}); });
}); });
}); });
describe(".listRecords(domainName)",function(){ describe(".listRecords(domainName)",function(){
it("should list all records for a specific Domain Name",function(done){ it("should list all records for a specific Domain Name",function(done){
this.timeout(10000); this.timeout(30000);
testCflareAccount.listRecords("bleu.de") testCflareAccount.listRecords("bleu.de")
.then((responseArg) => { .then((responseArg) => {
console.log(responseArg); console.log(responseArg);
@ -43,24 +41,24 @@ describe("cflare",function(){
}); });
}) })
describe(".createRecord",function(){ describe(".createRecord",function(){
this.timeout(10000);
it("should create a valid record for a level 2 domain",function(done){ it("should create a valid record for a level 2 domain",function(done){
this.timeout(30000);
testCflareAccount.createRecord("bleu.de","A","127.0.0.1") testCflareAccount.createRecord("bleu.de","A","127.0.0.1")
.then(function(responseArg){ .then(function(responseArg){
console.log(responseArg);
done(); done();
}); });
}); });
it("should create a valid record for a subdomain",function(done){ it("should create a valid record for a subdomain",function(done){
this.timeout(30000);
testCflareAccount.createRecord("subdomain.bleu.de","A","127.0.0.1") testCflareAccount.createRecord("subdomain.bleu.de","A","127.0.0.1")
.then(function(responseArg){ .then(function(responseArg){
console.log(responseArg);
done(); done();
}); });
}); });
}); });
describe(".getRecord",function(){ describe(".getRecord",function(){
it("should get a record from Cloudflare",function(done){ it("should get a record from Cloudflare",function(done){
this.timeout(30000);
testCflareAccount.getRecord("bleu.de","A") testCflareAccount.getRecord("bleu.de","A")
.then(function(responseArg){ .then(function(responseArg){
console.log(responseArg); console.log(responseArg);
@ -70,6 +68,7 @@ describe("cflare",function(){
}); });
describe(".removeRecord",function(){ describe(".removeRecord",function(){
it("should remove a record from Cloudflare",function(done){ it("should remove a record from Cloudflare",function(done){
this.timeout(30000);
testCflareAccount.removeRecord("bleu.de","A") testCflareAccount.removeRecord("bleu.de","A")
.then(function(responseArg){ .then(function(responseArg){
console.log(responseArg); console.log(responseArg);
@ -77,6 +76,7 @@ describe("cflare",function(){
}); });
}); });
it("should remove a subdomain record from Cloudflare",function(done){ it("should remove a subdomain record from Cloudflare",function(done){
this.timeout(30000);
testCflareAccount.removeRecord("subdomain.bleu.de","A") testCflareAccount.removeRecord("subdomain.bleu.de","A")
.then(function(responseArg){ .then(function(responseArg){
console.log(responseArg); console.log(responseArg);

View File

@ -1,73 +1,76 @@
import "typings-global"; import "typings-global";
import plugins = require("./cflare.plugins"); import plugins = require("./cflare.plugins");
import helpers = require("./cflare.classes.helpers"); import helpers = require("./cflare.classes.helpers");
import * as interfaces from './cflare.interfaces'
export class CflareAccount { export class CflareAccount {
private authEmail:string; private authEmail: string;
private authKey:string; private authKey: string;
private authCheck(){ private authCheck() {
return (this.authEmail && this.authKey); //check if auth is available return (this.authEmail && this.authKey); //check if auth is available
} }
constructor(){ constructor() {
}; };
auth(optionsArg:{email:string,key:string}){ auth(optionsArg: { email: string, key: string }) {
this.authEmail = optionsArg.email; this.authEmail = optionsArg.email;
this.authKey = optionsArg.key; this.authKey = optionsArg.key;
} }
getZoneId(domainName:string){ getZoneId(domainName: string) {
let done = plugins.q.defer(); let done = plugins.q.defer();
this.listZones(domainName) this.listZones(domainName)
.then((responseArg) => { .then(zoneArrayArg => {
let filteredResponse = responseArg.result.filter((zoneArg)=>{ let filteredResponse = zoneArrayArg.filter((zoneArg) => {
return zoneArg.name === domainName; return zoneArg.name === domainName;
}); });
if (filteredResponse.length >= 1){ if (filteredResponse.length >= 1) {
done.resolve(filteredResponse[0].id); done.resolve(filteredResponse[0].id);
} else { } else {
plugins.beautylog.error("the domain " + domainName.blue + " does not appear to be in this account!"); plugins.beautylog.error(`the domain ${domainName} does not appear to be in this account!`);
done.reject(undefined); done.reject(undefined);
} }
}); });
return done.promise; return done.promise;
} }
getRecord(domainNameArg:string,typeArg:string){ getRecord(domainNameArg: string, typeArg: string): Promise<interfaces.ICflareRecord> {
let done = plugins.q.defer(); let done = plugins.q.defer();
let result: interfaces.ICflareRecord
let domain = new plugins.smartstring.Domain(domainNameArg); let domain = new plugins.smartstring.Domain(domainNameArg);
this.listRecords(domain.zoneName) this.listRecords(domain.zoneName)
.then((responseArg) => { .then((recordArrayArg) => {
let filteredResponse = responseArg.result.filter((recordArg) => { let filteredResponse = recordArrayArg.filter((recordArg) => {
return (recordArg.type == typeArg && recordArg.name == domainNameArg); return (recordArg.type == typeArg && recordArg.name == domainNameArg);
}) })
done.resolve(filteredResponse[0]); done.resolve(filteredResponse[0]);
}) })
return done.promise; return done.promise;
}; };
createRecord(domainNameArg:string,typeArg:string,contentArg:string){ createRecord(domainNameArg: string, typeArg: string, contentArg: string) {
let done = plugins.q.defer(); let done = plugins.q.defer();
let domain = new plugins.smartstring.Domain(domainNameArg); let domain = new plugins.smartstring.Domain(domainNameArg);
this.getZoneId(domain.zoneName) this.getZoneId(domain.zoneName)
.then((domainIdArg)=>{ .then((domainIdArg) => {
let dataObject = { let dataObject = {
name: domain.fullName, name: domain.fullName,
type: typeArg, type: typeArg,
content: contentArg content: contentArg
}; };
this.request("POST","/zones/" + domainIdArg + "/dns_records",dataObject) this.request("POST", "/zones/" + domainIdArg + "/dns_records", dataObject)
.then(function(responseArg){ .then(function (responseArg) {
done.resolve(responseArg); done.resolve(responseArg);
}); });
}); });
return done.promise; return done.promise;
}; };
removeRecord(domainNameArg:string,typeArg:string){ removeRecord(domainNameArg: string, typeArg: string) {
let done = plugins.q.defer(); let done = plugins.q.defer();
let domain = new plugins.smartstring.Domain(domainNameArg); let domain = new plugins.smartstring.Domain(domainNameArg);
this.getRecord(domain.fullName,typeArg) this.getRecord(domain.fullName, typeArg)
.then((responseArg) => { .then((responseArg) => {
if(responseArg){ if (responseArg) {
let requestRoute:string = "/zones/" + responseArg.zone_id + "/dns_records/" + responseArg.id; let requestRoute: string = "/zones/" + responseArg.zone_id + "/dns_records/" + responseArg.id;
this.request("DELETE",requestRoute) this.request("DELETE", requestRoute)
.then((responseArg) => { .then((responseArg) => {
done.resolve(responseArg); done.resolve(responseArg);
}); });
@ -77,59 +80,88 @@ export class CflareAccount {
}); });
return done.promise; return done.promise;
}; };
updateRecord(domainNameArg:string,typeArg:string,valueArg){ updateRecord(domainNameArg: string, typeArg: string, valueArg) {
let done = plugins.q.defer(); let done = plugins.q.defer();
let domain = new plugins.smartstring.Domain(domainNameArg); let domain = new plugins.smartstring.Domain(domainNameArg);
return done.promise; return done.promise;
}; };
listRecords(domainNameArg:string){ listRecords(domainNameArg: string): Promise<interfaces.ICflareRecord[]> {
let done = plugins.q.defer(); let done = plugins.q.defer<interfaces.ICflareRecord[]>();
let result: interfaces.ICflareRecord[] = []
let domain = new plugins.smartstring.Domain(domainNameArg); let domain = new plugins.smartstring.Domain(domainNameArg);
this.getZoneId(domain.zoneName) this.getZoneId(domain.zoneName)
.then((domainIdArg)=>{ .then((domainIdArg) => {
this.request("GET","/zones/" + domainIdArg + "/dns_records?per_page=100") this.request("GET", "/zones/" + domainIdArg + "/dns_records?per_page=100")
.then(function(responseArg){ .then(function (responseArg: any) {
done.resolve(responseArg); result = responseArg.result
done.resolve(result);
}); });
}); });
return done.promise; return done.promise;
} }
listZones(domainName?:string){ // TODO: handle pagination listZones(domainName?: string): Promise<interfaces.ICflareZone[]> { // TODO: handle pagination
let done = plugins.q.defer(); let done = plugins.q.defer<interfaces.ICflareZone[]>();
let requestRoute = "/zones?per_page=50" let requestRoute = "/zones?per_page=50"
if(domainName) requestRoute = requestRoute + "&name=" + domainName; if (domainName) requestRoute = requestRoute + "&name=" + domainName;
let result = {}; let result = [];
this.request("GET",requestRoute) this.request("GET", requestRoute)
.then(function(responseArg){ .then((responseArg: any) => {
result = responseArg; result = responseArg.result;
done.resolve(result); done.resolve(result);
}); });
return done.promise; return done.promise;
}; };
request(methodArg:string,routeArg:string,dataArg = {}){ request(methodArg: string, routeArg: string, dataArg = {}) {
let done = plugins.q.defer(); let done = plugins.q.defer();
let jsonArg:string = JSON.stringify(dataArg); let jsonArg: string = JSON.stringify(dataArg);
let options = { let options = {
method:methodArg, method: methodArg,
url:"https://api.cloudflare.com/client/v4" + routeArg, url: "https://api.cloudflare.com/client/v4" + routeArg,
headers:{ headers: {
"Content-Type":"application/json", "Content-Type": "application/json",
"X-Auth-Email":this.authEmail, "X-Auth-Email": this.authEmail,
"X-Auth-Key":this.authKey "X-Auth-Key": this.authKey
}, },
body:jsonArg body: jsonArg
}; };
//console.log(options); //console.log(options);
plugins.request(options,function(err, res, body){ let retryCount = 0
if (!err && res.statusCode == 200) {
var responseObj = JSON.parse(body); let makeRequest = () => {
done.resolve(responseObj); plugins.request(options, function (err, res, body) {
} else { let responseObj
console.log(err); try {
console.log(res); responseObj = JSON.parse(body);
done.reject(err); } catch (err) {
}; console.log(res.statusCode)
}); retryRequest()
return
}
if (!err && res.statusCode === 200) {
done.resolve(responseObj);
} else if (!err && res.statusCode === 429) {
console.log('rate limited! Waiting for retry!')
retryRequest()
return
} else {
console.log(res.statusCode)
console.log(responseObj.messages);
console.log(responseObj.errors);
done.reject(err);
};
});
}
let retryRequest = async (delayTimeArg = 15000) => {
console.log(`retry started and waiting for ${delayTimeArg} ms`)
await plugins.smartdelay.delayFor(delayTimeArg)
if (retryCount < 3) {
retryCount++
makeRequest()
return
}
}
makeRequest()
return done.promise; return done.promise;
} }
}; };

59
ts/cflare.interfaces.ts Normal file
View File

@ -0,0 +1,59 @@
import * as plugins from './cflare.plugins'
export interface ICflareZone {
"id": string
"name": string
"development_mode": number
"original_name_servers": string[]
"original_registrar": string
"original_dnshost": string
"created_on": string
"modified_on": string
"name_servers": string[]
"owner": {
"id": string
"email": string
"owner_type": string
},
"permissions": string []
"plan": {
"id": string
"name": string
"price": number
"currency": string
"frequency": string
"legacy_id": string
"is_subscribed": boolean
"can_subscribe": boolean
},
"plan_pending": {
"id": string
"name": string
"price": number
"currency": string
"frequency": string
"legacy_id": string
"is_subscribed": string
"can_subscribe": string
},
"status": string
"paused": boolean
"type": string
"checked_on": string
}
export interface ICflareRecord {
"id": string
"type": string
"name": string
"content": string
"proxiable": boolean
"proxied": boolean
"ttl": number
"locked": boolean
"zone_id": string
"zone_name": string
"created_on": string
"modified_on": string
"data": any
}

View File

@ -1,5 +1,6 @@
import "typings-global"; import "typings-global";
export let beautylog = require("beautylog"); export let beautylog = require("beautylog");
export let q = require("q"); export import q = require("smartq");
export let request = require("request"); export let request = require("request");
export import smartstring = require("smartstring"); export import smartstring = require("smartstring");
export import smartdelay = require('smartdelay');

View File

@ -1,9 +0,0 @@
{
"version": false,
"dependencies": {},
"ambientDependencies": {
"colors": "registry:dt/colors#0.6.0-1+20160425153322",
"mocha": "registry:dt/mocha#2.2.5+20160317120654",
"node": "registry:dt/node#4.0.0+20160423143914"
}
}