-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Electroid/master
Add a Typescript declaration file
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
export interface AwsClientInit { | ||
accessKeyId?: string; | ||
secretAccessKey?: string; | ||
sessionToken?: string | null; | ||
service?: string | null; | ||
region?: string | null; | ||
cache?: Map<string,string> | null; | ||
retries?: number | null; | ||
initRetryMs?: number | null; | ||
} | ||
|
||
export interface AwsSignerInit extends AwsClientInit { | ||
url?: string | URL; | ||
method?: string ; | ||
headers?: HeadersInit | null; | ||
body?: BodyInit | null; | ||
datetime?: string | null; | ||
signQuery?: boolean | null; | ||
appendSessionToken?: boolean | null; | ||
allHeaders?: boolean | null; | ||
singleEncode?: boolean | null; | ||
} | ||
|
||
export interface AwsRequestInfo { | ||
method: string; | ||
url: URL; | ||
headers: Headers; | ||
body: BodyInit; | ||
} | ||
|
||
export interface AwsRequestInit extends RequestInit { | ||
aws?: AwsSignerInit | null; | ||
} | ||
|
||
export class AwsSigner { | ||
constructor(init: AwsSignerInit); | ||
public sign(): Promise<AwsRequestInfo>; | ||
} | ||
|
||
export class AwsClient { | ||
constructor(init: AwsClientInit); | ||
public sign(input: RequestInfo, init?: AwsRequestInit): Promise<Request>; | ||
public fetch(input: RequestInfo, init?: AwsRequestInit): Promise<Response>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters