ingenieux / aws-sdk-typescript Goto Github PK
View Code? Open in Web Editor NEWTypescript Bindings Generator for the AWS JavaScript SDK
License: Apache License 2.0
Typescript Bindings Generator for the AWS JavaScript SDK
License: Apache License 2.0
You must use it https://www.npmjs.com/package/@types/aws-sdk
Most functions in the AWS SDK return AWS.Request
s, but they are currently being typed as just returning void
. This would be good to fix at some point.
/Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/acm.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/apigateway.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/applicationautoscaling.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/autoscaling.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/budgets.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/cloudformation.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. Error:(8, 15) TS2415: Class 'CloudFormation' incorrectly extends base class 'Service'. Types of property 'waitFor' are incompatible. Type '{ (state: "stackExists", params: DescribeStacksInput, callback?: (err: AWSError, data: DescribeSt...' is not assignable to type '{ (state: string, params?: { [key: string]: any; }, callback?: (err: AWSError, data: any) => void...'. Type '{ (state: "stackExists", params: DescribeStacksInput, callback?: (err: AWSError, data: DescribeSt...' provides no match for the signature '(state: string, params?: { [key: string]: any; }, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>' Error:(217, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(221, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(225, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(229, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(233, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(237, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(241, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(245, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/cloudfront.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. Error:(8, 15) TS2415: Class 'CloudFront' incorrectly extends base class 'CloudFrontCustomizations'. Types of property 'waitFor' are incompatible. Type '{ (state: "distributionDeployed", params: GetDistributionRequest, callback?: (err: AWSError, data...' is not assignable to type '{ (state: string, params?: { [key: string]: any; }, callback?: (err: AWSError, data: any) => void...'. Type '{ (state: "distributionDeployed", params: GetDistributionRequest, callback?: (err: AWSError, data...' provides no match for the signature '(state: string, params?: { [key: string]: any; }, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>' Error:(233, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(237, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(241, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(245, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(249, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(253, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/cloudhsm.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/cloudsearch.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/cloudsearchdomain.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/cloudtrail.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/cloudwatch.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. Error:(8, 15) TS2415: Class 'CloudWatch' incorrectly extends base class 'Service'. Types of property 'waitFor' are incompatible. Type '{ (state: "alarmExists", params: DescribeAlarmsInput, callback?: (err: AWSError, data: DescribeAl...' is not assignable to type '{ (state: string, params?: { [key: string]: any; }, callback?: (err: AWSError, data: any) => void...'. Type '{ (state: "alarmExists", params: DescribeAlarmsInput, callback?: (err: AWSError, data: DescribeAl...' provides no match for the signature '(state: string, params?: { [key: string]: any; }, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>' Error:(105, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(109, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/cloudwatchevents.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/cloudwatchlogs.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/codecommit.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. /Users/bardiakhosravi/Projects/kodatex-api2/handlers/core/node_modules/aws-sdk/clients/codedeploy.d.ts Error:(1, 1) TS1084: Invalid 'reference' directive syntax. Error:(8, 15) TS2415: Class 'CodeDeploy' incorrectly extends base class 'Service'. Types of property 'waitFor' are incompatible. Type '{ (state: "deploymentSuccessful", params: GetDeploymentInput, callback?: (err: AWSError, data: Ge...' is not assignable to type '{ (state: string, params?: { [key: string]: any; }, callback?: (err: AWSError, data: any) => void...'. Type '{ (state: "deploymentSuccessful", params: GetDeploymentInput, callback?: (err: AWSError, data: Ge...' provides no match for the signature '(state: string, params?: { [key: string]: any; }, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>' Error:(297, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature. Error:(301, 3) TS2382: Specialized overload signature is not assignable to any non-specialized signature.
Right now there's 0.0.3, which is missing a few methods that are in this repo (I'm trying to use s3.listObjectsV2
).
I think (not knowing your CI setup) that you just need to run a npm publish
. Would you mind doing that so I could use the new hotness? 😄
As a beginner, i still have some questions. Some words in the readme would be nice, about:
I think that could help a lot of people.
Thank you
Jan
There is a Simple Email Service (SES) that is missing in from the type definitions.
Here is a link to its api
It'd be great if it was added.
npm @types
with typescript 2.0 is really useful and I want to use this on that.
Do you think to add this into DefinitelyTyped??
If not, is there any specific reason for that?
Please add example how to install the typings for this project:
typings i aws-sdk=github:ingenieux/aws-sdk-typescript#HEAD --save -G --verbose
Look at
59d1093#commitcomment-16823167
Hi all, I'm using the typings as follows:
{
"dependencies": {},
"ambientDependencies": {},
"globalDependencies": {
"aws-lambda": "registry:dt/aws-lambda#0.0.0+20160819092144",
"aws-sdk-typescript": "github:ingenieux/aws-sdk-typescript#HEAD",
"node": "registry:dt/node#6.0.0+20160831021119"
}
}
When compiling with tsc, I get this error:
typings/globals/aws-sdk-typescript/index.d.ts(2555,103): error TS1131: Property or signature expected.
typings/globals/aws-sdk-typescript/index.d.ts(2556,12): error TS1005: ';' expected.
This is because:
export interface Model {
/** The identifier for the model resource. **/
id?: String;
/** The name of the model. **/
name?: String;
/** The description of the model. **/
description?: String;
/** The schema for the model. For application/json models, this should be
JSON-schema draft v4 [http://json-schema.org/documentation.html] model. Do not
include "\&#42;/" characters in the description of any properties because such "\*/"
characters may be interpreted as the closing marker for comments in some
languages, such as Java or JavaScript, causing the installation of your API's
SDK generated by API Gateway to fail. **/
schema?: String;
/** The content-type for the model. **/
contentType?: String;
}
Can somebody please fix this ?
Referring to the AWS Documentation: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SAMLCredentials.html#constructor_details
I'm attempting to set AWS.config.credentials = new AWS.SAMLCredentials({ ... })
but doesn't seem like its been accounted for.
Just forking this project and then doing a npm i
gives the following errors:
[09:32:55] Using gulpfile ~\Documents\GitHub\_forks\aws-sdk-typescript\gulpfile.js
[09:32:55] Starting 'clean:generated'...
[09:32:55] Starting 'clean:build'...
[09:32:55] Finished 'clean:build' after 244 ms
[09:32:55] Finished 'clean:generated' after 313 ms
[09:32:55] Starting 'clean'...
[09:32:55] Finished 'clean' after 37 μs
[09:32:55] Starting 'compile:typescript'...
app\src\app.ts(1,1): error TS6053: File 'C:/Users/azureuser/Documents/GitHub/_forks/aws-sdk-typescript/typings/main.d.ts' not found.
app\src\app.ts(5,21): error TS2307: Cannot find module 'fs'.
app\src\app.ts(6,23): error TS2307: Cannot find module 'path'.
app\src\app.ts(7,23): error TS2307: Cannot find module 'glob'.
app\src\app.ts(9,15): error TS2304: Cannot find name 'require'.
app\src\app.ts(11,26): error TS2307: Cannot find module 'esprima'.
app\src\app.ts(13,18): error TS2304: Cannot find name 'require'.
app\src\app.ts(15,17): error TS2304: Cannot find name 'require'.
app\src\app.ts(17,29): error TS2307: Cannot find module 'handlebars'.
app\src\app.ts(20,1): error TS2304: Cannot find name 'require'.
app\src\app.ts(62,41): error TS2304: Cannot find name '__dirname'.
app\src\app.ts(98,41): error TS2304: Cannot find name '__dirname'.
app\src\app.ts(195,28): error TS2304: Cannot find name 'process'.
app\src\generator.ts(1,1): error TS6053: File 'C:/Users/azureuser/Documents/GitHub/_forks/aws-sdk-typescript/typings/main.d.ts' not found.
app\src\generator.ts(4,21): error TS2307: Cannot find module 'fs'.
app\src\generator.ts(5,29): error TS2307: Cannot find module 'handlebars'.
app\src\generator.ts(6,29): error TS2307: Cannot find module 'html-to-text'.
app\src\generator.ts(42,42): error TS2304: Cannot find name '__dirname'.
[09:33:00] TypeScript: 18 semantic errors
[09:33:00] TypeScript: emit succeeded (with errors)
I'm not sure how this project works (where you get the JSON from which you generate typings), but I noticed the aws-s3.d.ts
in the output
folder is missing definition for getSignedUrl
method.
Hello,
thanks for making this.i am trying to set region and lambda apiversions
so far i tried like this
import AWS = require('aws-sdk');
....
....
AWS.config.region = 'us-west-2';
AWS.config.apiVersions = {
lambda: '2015-03-31'
};
but i i got following error
Error: Missing region in config(…)
Thank you
CC @aldrinleal
I wanna use this DocumentClient to fetch and save document with DynamoDB. But looks like there are no definition for it.
DocumentClient
http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html
@aldrinleal this has been great work for supporting Typescript with the aws-sdk.
Now AWS has released an add-on javascript library for working with their new Cognito User Pools and the javascript sdk for this is completely separate from aws-sdk.
Would it be possible to support typing generation for this like the great typings you already do for aws-sdk?
Here is the GitHub repo:
https://github.com/aws/amazon-cognito-identity-js
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.