Skip to content

Instantly share code, notes, and snippets.

@masahirompp
Last active January 30, 2018 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masahirompp/5bedaeec319544a3b41f2c3bb3000353 to your computer and use it in GitHub Desktop.
Save masahirompp/5bedaeec319544a3b41f2c3bb3000353 to your computer and use it in GitHub Desktop.
declare module 'aws-api-gateway-client' {
import { AxiosResponse } from 'axios'
interface AwsApiGatewayClientConfig {
accessKey?: string
secretKey?: string
sessionToken?: string
region?: string
apiKey?: string
invokeUrl: string
service?: string
defaultContentType?: string
defaultAcceptType?: string
systemClockOffset?: number
}
interface AwsApiGatewayClient {
invokeApi: <T>(
params: Object,
pathTemplate: string,
method: string,
additionalParams?: {
headers?: { Authorization?: string } | { [key: string]: string }
queryParams?: any
},
body?: any
) => Promise<AxiosResponse<T>>
}
export const newClient: (config: AwsApiGatewayClientConfig) => AwsApiGatewayClient
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment