diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..98518dd --- /dev/null +++ b/index.d.ts @@ -0,0 +1,19 @@ +export = Credstash; + +declare class Credstash { + list(options: Credstash.IOptions, callback: Credstash.Callback): void; + list(callback: Credstash.Callback): void; + + get(value: string, options: Credstash.IOptions, callback: Credstash.Callback): void; + get(value: string, callback: Credstash.Callback): void; +} + +declare namespace Credstash { + type Callback = (err: Error | null, response: T) => void; + + interface IOptions { + limit?: number, + region?: string, + table?: string + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e601063..bdc3274 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@pizza-hut/credstash", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 613a9aa..6238838 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pizza-hut/credstash", - "version": "1.3.0", + "version": "1.3.1", "description": "Module for reading credstash secrets", "main": "index.js", "scripts": {