feat: Integrate Amazon SP-API for product sellability and pricing
- Added `amazon-sp-api` dependency to package.json. - Enhanced configuration to include SP-API credentials and settings. - Implemented SP-API client initialization and error handling in sp-api.ts. - Developed functions to fetch product sellability and pricing data. - Updated main processing logic in index.ts to incorporate sellability checks before fetching pricing. - Modified LLM analysis to account for sellability status and reasons. - Created a new sp-test.ts script for testing SP-API connectivity and sellability. - Updated types.ts to define SellabilityInfo and extend SpApiData. - Enhanced result reporting in writer.ts to include sellability information.
This commit is contained in:
@@ -42,7 +42,13 @@ export interface KeepaData {
|
||||
categoryTree: string[];
|
||||
}
|
||||
|
||||
export interface SpApiData {
|
||||
export type SellabilityInfo = {
|
||||
canSell: boolean | null;
|
||||
sellabilityStatus: "available" | "restricted" | "not_available" | "unknown";
|
||||
sellabilityReason?: string;
|
||||
};
|
||||
|
||||
export interface SpApiData extends SellabilityInfo {
|
||||
fbaFee: number;
|
||||
fbmFee: number;
|
||||
referralFeePercent: number;
|
||||
|
||||
Reference in New Issue
Block a user