Spaces:
Sleeping
Sleeping
Download modules/amazon.js from publicstring/sellersnode: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/spaces/publicstring/sellersnode/resolve/main/modules/amazon.js
- Command line
-
hf download hf://spaces/publicstring/sellersnode/modules/amazon.js
-
curl -L -o amazon.js https://huggingface.co/spaces/publicstring/sellersnode/resolve/main/modules/amazon.js
1.16 kB
| /** | |
| * AMAZON ELECTRONICS VENDOR | |
| * Demonstrates intelligent item parsing and margin constraints. | |
| */ | |
| module.exports = { | |
| agent_id: 'amazon.anp', | |
| display_name: 'Amazon B2B Electronics', | |
| categories: ['electronics', 'hardware', 'retail'], | |
| capabilities: ['price_flex', 'bundle_shipping'], | |
| getItemConstraints: (item_intent) => { | |
| const intent = (item_intent || '').toLowerCase(); | |
| if (intent.includes('iphone 15')) { | |
| return { | |
| id: 'Apple iPhone 15 Pro (256GB)', | |
| list_price: 1099.00, | |
| floor_price: 980.00 // Tight margin on Apple products | |
| }; | |
| } | |
| if (intent.includes('macbook') || intent.includes('mac')) { | |
| return { | |
| id: 'Apple MacBook Pro M3 (14-inch)', | |
| list_price: 1599.00, | |
| floor_price: 1350.00 // Higher margin, more room to negotiate | |
| }; | |
| } | |
| // Default item if specific product isn't matched | |
| return { | |
| id: item_intent || 'Amazon Basics Electronics Kit', | |
| list_price: 50.00, | |
| floor_price: 35.00 | |
| }; | |
| } | |
| }; |