mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
Add package kms-json (#22908)
This commit is contained in:
22
types/kms-json/index.d.ts
vendored
Normal file
22
types/kms-json/index.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// Type definitions for kms-json 1.1
|
||||
// Project: https://github.com/AlexanderMS/kms-json
|
||||
// Definitions by: Yoichi Imai <https://github.com/sunnyone>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
declare namespace KmsJson {
|
||||
interface KmsJsonOptions {
|
||||
awsKmsSettings?: object;
|
||||
keyId: string;
|
||||
encoding?: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare class KmsJson {
|
||||
constructor(options: KmsJson.KmsJsonOptions);
|
||||
encrypt(inputJson: object): string;
|
||||
decrypt(cipherText: string): object;
|
||||
}
|
||||
|
||||
export = KmsJson;
|
||||
10
types/kms-json/kms-json-tests.ts
Normal file
10
types/kms-json/kms-json-tests.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import KmsJson = require('kms-json');
|
||||
|
||||
const kmsJson = new KmsJson({
|
||||
awsKmsSettings: { },
|
||||
keyId: "foo",
|
||||
encoding: "base64"
|
||||
});
|
||||
|
||||
kmsJson.encrypt({ abc: 123 });
|
||||
kmsJson.decrypt("bar");
|
||||
23
types/kms-json/tsconfig.json
Normal file
23
types/kms-json/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"kms-json-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/kms-json/tslint.json
Normal file
1
types/kms-json/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user