bhushankummar / amazon-mws

Amazon MWS NodeJS Wrapper
MIT License
197 stars 78 forks source link

TypeScript type definitions are not complete #24

Closed grmiatov closed 6 years ago

grmiatov commented 6 years ago

Only the Reports API is included. Any plan to enrich it? Thank you

grmiatov commented 6 years ago

Actually I have just extended the existing definitions with following code and it works as expected

declare module 'amazon-mws' {

    // Enriched type definitions for amazon-mws

    class AmazonMWSCall {

        search(params: any): Promise<any>;

    }

    class AmazonMWS {

        constructor()

        constructor(key: string, token: string);

        setApiKey(key: string, secret: string): void;

        sellers: AmazonMWSCall;

        orders: AmazonMWSCall;

        finances: AmazonMWSCall;

        reports: AmazonMWSCall;
    }

    namespace AmazonMWS {

    }
    export = AmazonMWS;
}
bhushankummar commented 6 years ago

@miatidis Yes, It is in our plan and thanks to you for code snippets.

bhushankummar commented 6 years ago

https://github.com/bhushankumarl/amazon-mws/releases/tag/v0.0.17 @miatidis Released with further type support.