I am working on a small ionic2/Angular2 app, I have generated JS SDK from my AWS APIGateway and trying to import in my project. I need to access the apigClient in my app which is .js file in SDK, how do we import that into .ts (type script) logic ?
var apigClientFactory = {};
apigClientFactory.newClient = function (config) {
var apigClient = { };
if(config === undefined) {
config = {
accessKey: '',
secretKey: '',
sessionToken: '',
region: '',
apiKey: undefined,
defaultContentType: 'application/json',
defaultAcceptType: 'application/json'
};
}
...
I need to create an instance of that apigClientFactory in my app to do the api calls.
Please kindly suggest or state any example references.
Thank you.