Home Reference Source

lib/endpoints/recommendations.js

  1. const generateEndpoints = require('./endpoints-utils');
  2.  
  3. const categoryName = 'Recommendations';
  4.  
  5. const apiVersion = '2013-04-01';
  6.  
  7. const endpointList = [
  8. 'GetLastUpdatedTimeForRecommendations',
  9. 'ListRecommendations',
  10. 'ListRecommendationsByNextToken',
  11. 'GetServiceStatus',
  12. ];
  13.  
  14. const newEndpointList = {
  15. ListRecommendations: {
  16. throttle: {
  17. maxInFlight: 8,
  18. restoreRate: 30,
  19. },
  20. params: {
  21. MarketplaceId: {
  22. type: 'xs:string',
  23. required: true,
  24. },
  25. RecommendationCategory: {
  26. type: 'xs:string',
  27. values: [
  28. 'Inventory',
  29. 'Selection',
  30. 'Pricing',
  31. 'Fulfillment',
  32. 'ListingQuality',
  33. 'GlobalSelling',
  34. 'Advertising',
  35. ],
  36. required: false,
  37. },
  38. CategoryQueryList: {
  39. list: 'CategoryQueryList.CategoryQuery',
  40. required: false,
  41. // TODO: This is going to require some pretty serious work to validate, it's
  42. // TODO: apparently expecting array of objects, sort of???
  43. // TODO: we may need to implement a "just accept the user string, no validation"
  44. // TODO: type to handle this if anyone needs it before validation can be upgraded
  45. },
  46. },
  47. // TODO: fill in returns here
  48. },
  49. };
  50.  
  51. module.exports = generateEndpoints(
  52. categoryName,
  53. apiVersion,
  54. endpointList,
  55. newEndpointList,
  56. );