amazon-seller-mcp
Version:
Model Context Protocol (MCP) client for Amazon Selling Partner API
54 lines • 1.49 kB
JavaScript
/**
* Type definitions for authentication-related functionality
*/
/**
* Amazon Selling Partner API regions
*/
export var AmazonRegion;
(function (AmazonRegion) {
AmazonRegion["NA"] = "NA";
AmazonRegion["EU"] = "EU";
AmazonRegion["FE"] = "FE";
})(AmazonRegion || (AmazonRegion = {}));
/**
* Map of region codes to endpoint configurations
*/
export const REGION_ENDPOINTS = {
[AmazonRegion.NA]: {
endpoint: 'https://sellingpartnerapi-na.amazon.com',
region: 'us-east-1',
},
[AmazonRegion.EU]: {
endpoint: 'https://sellingpartnerapi-eu.amazon.com',
region: 'eu-west-1',
},
[AmazonRegion.FE]: {
endpoint: 'https://sellingpartnerapi-fe.amazon.com',
region: 'us-west-2',
},
};
/**
* Authentication error types
*/
export var AuthErrorType;
(function (AuthErrorType) {
AuthErrorType["INVALID_CREDENTIALS"] = "INVALID_CREDENTIALS";
AuthErrorType["TOKEN_REFRESH_FAILED"] = "TOKEN_REFRESH_FAILED";
AuthErrorType["REQUEST_SIGNING_FAILED"] = "REQUEST_SIGNING_FAILED";
AuthErrorType["NETWORK_ERROR"] = "NETWORK_ERROR";
AuthErrorType["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
})(AuthErrorType || (AuthErrorType = {}));
/**
* Authentication error
*/
export class AuthError extends Error {
type;
cause;
constructor(message, type, cause) {
super(message);
this.name = 'AuthError';
this.type = type;
this.cause = cause;
}
}
//# sourceMappingURL=auth.js.map