@ericblade/mws-simple
Version:
Modern, full featured nodejs Amazon MWS API in ~150 lines of code
35 lines (34 loc) • 1.11 kB
TypeScript
/// <reference types="node" />
import { IncomingHttpHeaders } from 'http';
export interface ConstructorParams {
appId?: string;
appVersionId?: string;
host?: string;
port?: number;
accessKeyId?: string;
secretAccessKey?: string;
merchantId?: string;
authToken?: string;
}
export interface DebugOptions {
rawFile?: string;
parsedFile?: string;
}
declare class MWSSimple {
readonly accessKeyId: string;
readonly appId: string;
readonly appVersionId: string;
readonly merchantId: string;
readonly authToken: string;
readonly host: string;
readonly port: number;
readonly secretAccessKey: string;
constructor({ appId, appVersionId, host, port, accessKeyId, secretAccessKey, merchantId, authToken, }?: ConstructorParams);
request(requestData: any, // TODO: this should NOT be any.
callback?: (err: Error | null, results: {
result?: any;
headers: IncomingHttpHeaders;
}) => void, debugOptions?: DebugOptions): Promise<any> | void;
}
export { MWSSimple };
export default MWSSimple;