mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-29 08:58:23 +08:00
Add aws4 type definitions
This commit is contained in:
24
aws4/aws4-tests.ts
Normal file
24
aws4/aws4-tests.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/// <reference path="./index.d.ts" />
|
||||
|
||||
import * as aws4 from ".";
|
||||
|
||||
let requestSigner = new aws4.RequestSigner({}, {});
|
||||
requestSigner.matchHost("");
|
||||
requestSigner.isSingleRegion();
|
||||
requestSigner.createHost();
|
||||
requestSigner.prepareRequest();
|
||||
requestSigner.sign();
|
||||
requestSigner.getDateTime();
|
||||
requestSigner.getDate();
|
||||
requestSigner.authHeader();
|
||||
requestSigner.signature();
|
||||
requestSigner.stringToSign();
|
||||
requestSigner.canonicalString();
|
||||
requestSigner.canonicalHeaders();
|
||||
requestSigner.signedHeaders();
|
||||
requestSigner.credentialString();
|
||||
requestSigner.defaultCredentials();
|
||||
requestSigner.parsePath();
|
||||
requestSigner.formatPath();
|
||||
|
||||
aws4.sign({}, {});
|
||||
33
aws4/index.d.ts
vendored
Normal file
33
aws4/index.d.ts
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
// Type definitions for aws4 1.5.0
|
||||
// Project: https://github.com/mhart/aws4
|
||||
// Definitions by: Andrew Crites <https://github.com/ajcrites>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export class RequestSigner {
|
||||
constructor(request?: any, credentials?: any);
|
||||
request: any;
|
||||
credentials: any;
|
||||
service: any;
|
||||
region: any;
|
||||
isCodeCommitGit: any;
|
||||
|
||||
matchHost(host?: string): string;
|
||||
isSingleRegion(): boolean;
|
||||
createHost(): string;
|
||||
prepareRequest(): void;
|
||||
sign(): any;
|
||||
getDateTime(): string;
|
||||
getDate(): string;
|
||||
authHeader(): string;
|
||||
signature(): string;
|
||||
stringToSign(): string;
|
||||
canonicalString(): string;
|
||||
canonicalHeaders(): string;
|
||||
signedHeaders(): string;
|
||||
credentialString(): string;
|
||||
defaultCredentials(): any;
|
||||
parsePath(): any;
|
||||
formatPath(): string;
|
||||
}
|
||||
|
||||
export function sign(options?: any, credentials?: any): RequestSigner;
|
||||
19
aws4/tsconfig.json
Normal file
19
aws4/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"aws4-tests.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user