@marktmentor/api 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +29 -2
- package/dist/BaseClient.d.ts +54 -0
- package/dist/BaseClient.js +43 -0
- package/dist/Client.d.ts +41 -0
- package/dist/Client.js +60 -0
- package/dist/api/errors/BadRequestError.d.ts +5 -0
- package/dist/api/errors/BadRequestError.js +17 -0
- package/dist/api/errors/ConflictError.d.ts +5 -0
- package/dist/api/errors/ConflictError.js +17 -0
- package/dist/api/errors/ForbiddenError.d.ts +5 -0
- package/dist/api/errors/ForbiddenError.js +17 -0
- package/dist/api/errors/NotFoundError.d.ts +7 -0
- package/dist/api/errors/NotFoundError.js +17 -0
- package/dist/api/errors/PaymentRequiredError.d.ts +7 -0
- package/dist/api/errors/PaymentRequiredError.js +17 -0
- package/dist/api/errors/ServiceUnavailableError.d.ts +5 -0
- package/dist/api/errors/ServiceUnavailableError.js +17 -0
- package/dist/api/errors/TooManyRequestsError.d.ts +5 -0
- package/dist/api/errors/TooManyRequestsError.js +17 -0
- package/dist/api/errors/UnauthorizedError.d.ts +5 -0
- package/dist/api/errors/UnauthorizedError.js +17 -0
- package/dist/api/errors/index.d.ts +8 -0
- package/dist/api/errors/index.js +8 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +3 -0
- package/dist/api/resources/index.d.ts +13 -0
- package/dist/api/resources/index.js +13 -0
- package/dist/api/resources/niches/client/Client.d.ts +188 -0
- package/dist/api/resources/niches/client/Client.js +655 -0
- package/dist/api/resources/niches/client/index.d.ts +1 -0
- package/dist/api/resources/niches/client/index.js +1 -0
- package/dist/api/resources/niches/client/requests/GetNichesRequest.d.ts +17 -0
- package/dist/api/resources/niches/client/requests/GetNichesRequest.js +2 -0
- package/dist/api/resources/niches/client/requests/ListNichesRequest.d.ts +34 -0
- package/dist/api/resources/niches/client/requests/ListNichesRequest.js +2 -0
- package/dist/api/resources/niches/client/requests/ProductDistributionsNichesRequest.d.ts +13 -0
- package/dist/api/resources/niches/client/requests/ProductDistributionsNichesRequest.js +2 -0
- package/dist/api/resources/niches/client/requests/ProductsNichesRequest.d.ts +48 -0
- package/dist/api/resources/niches/client/requests/ProductsNichesRequest.js +2 -0
- package/dist/api/resources/niches/client/requests/ReviewHistoryNichesRequest.d.ts +23 -0
- package/dist/api/resources/niches/client/requests/ReviewHistoryNichesRequest.js +2 -0
- package/dist/api/resources/niches/client/requests/ReviewSummaryNichesRequest.d.ts +5 -0
- package/dist/api/resources/niches/client/requests/ReviewSummaryNichesRequest.js +2 -0
- package/dist/api/resources/niches/client/requests/ReviewsNichesRequest.d.ts +33 -0
- package/dist/api/resources/niches/client/requests/ReviewsNichesRequest.js +2 -0
- package/dist/api/resources/niches/client/requests/index.d.ts +7 -0
- package/dist/api/resources/niches/client/requests/index.js +1 -0
- package/dist/api/resources/niches/exports.d.ts +2 -0
- package/dist/api/resources/niches/exports.js +3 -0
- package/dist/api/resources/niches/index.d.ts +2 -0
- package/dist/api/resources/niches/index.js +2 -0
- package/dist/api/resources/niches/types/GetNichesRequestMarket.d.ts +6 -0
- package/dist/api/resources/niches/types/GetNichesRequestMarket.js +6 -0
- package/dist/api/resources/niches/types/GetNichesRequestPeriod.d.ts +6 -0
- package/dist/api/resources/niches/types/GetNichesRequestPeriod.js +6 -0
- package/dist/api/resources/niches/types/ListNichesRequestMarket.d.ts +6 -0
- package/dist/api/resources/niches/types/ListNichesRequestMarket.js +6 -0
- package/dist/api/resources/niches/types/ListNichesRequestPeriod.d.ts +6 -0
- package/dist/api/resources/niches/types/ListNichesRequestPeriod.js +6 -0
- package/dist/api/resources/niches/types/ListNichesRequestSort.d.ts +9 -0
- package/dist/api/resources/niches/types/ListNichesRequestSort.js +9 -0
- package/dist/api/resources/niches/types/ProductDistributionsNichesRequestPeriod.d.ts +6 -0
- package/dist/api/resources/niches/types/ProductDistributionsNichesRequestPeriod.js +6 -0
- package/dist/api/resources/niches/types/ProductsNichesRequestMarket.d.ts +6 -0
- package/dist/api/resources/niches/types/ProductsNichesRequestMarket.js +6 -0
- package/dist/api/resources/niches/types/ProductsNichesRequestPeriod.d.ts +6 -0
- package/dist/api/resources/niches/types/ProductsNichesRequestPeriod.js +6 -0
- package/dist/api/resources/niches/types/ProductsNichesRequestSort.d.ts +9 -0
- package/dist/api/resources/niches/types/ProductsNichesRequestSort.js +9 -0
- package/dist/api/resources/niches/types/ReviewHistoryNichesRequestInterval.d.ts +5 -0
- package/dist/api/resources/niches/types/ReviewHistoryNichesRequestInterval.js +5 -0
- package/dist/api/resources/niches/types/ReviewHistoryNichesRequestMarket.d.ts +4 -0
- package/dist/api/resources/niches/types/ReviewHistoryNichesRequestMarket.js +4 -0
- package/dist/api/resources/niches/types/ReviewHistoryNichesRequestPeriod.d.ts +7 -0
- package/dist/api/resources/niches/types/ReviewHistoryNichesRequestPeriod.js +7 -0
- package/dist/api/resources/niches/types/ReviewsNichesRequestMarket.d.ts +4 -0
- package/dist/api/resources/niches/types/ReviewsNichesRequestMarket.js +4 -0
- package/dist/api/resources/niches/types/ReviewsNichesRequestPeriod.d.ts +7 -0
- package/dist/api/resources/niches/types/ReviewsNichesRequestPeriod.js +7 -0
- package/dist/api/resources/niches/types/ReviewsNichesRequestSort.d.ts +7 -0
- package/dist/api/resources/niches/types/ReviewsNichesRequestSort.js +7 -0
- package/dist/api/resources/niches/types/index.d.ts +15 -0
- package/dist/api/resources/niches/types/index.js +15 -0
- package/dist/api/resources/organization/client/Client.d.ts +32 -0
- package/dist/api/resources/organization/client/Client.js +73 -0
- package/dist/api/resources/organization/client/index.d.ts +1 -0
- package/dist/api/resources/organization/client/index.js +1 -0
- package/dist/api/resources/organization/exports.d.ts +2 -0
- package/dist/api/resources/organization/exports.js +3 -0
- package/dist/api/resources/organization/index.d.ts +1 -0
- package/dist/api/resources/organization/index.js +1 -0
- package/dist/api/resources/products/client/Client.d.ts +269 -0
- package/dist/api/resources/products/client/Client.js +927 -0
- package/dist/api/resources/products/client/index.d.ts +1 -0
- package/dist/api/resources/products/client/index.js +1 -0
- package/dist/api/resources/products/client/requests/CategoryRankingsProductsRequest.d.ts +23 -0
- package/dist/api/resources/products/client/requests/CategoryRankingsProductsRequest.js +2 -0
- package/dist/api/resources/products/client/requests/GetProductsRequest.d.ts +15 -0
- package/dist/api/resources/products/client/requests/GetProductsRequest.js +2 -0
- package/dist/api/resources/products/client/requests/KeywordRankingsProductsRequest.d.ts +27 -0
- package/dist/api/resources/products/client/requests/KeywordRankingsProductsRequest.js +2 -0
- package/dist/api/resources/products/client/requests/KeywordsProductsRequest.d.ts +19 -0
- package/dist/api/resources/products/client/requests/KeywordsProductsRequest.js +2 -0
- package/dist/api/resources/products/client/requests/ListProductsRequest.d.ts +50 -0
- package/dist/api/resources/products/client/requests/ListProductsRequest.js +2 -0
- package/dist/api/resources/products/client/requests/ReviewSummaryProductsRequest.d.ts +8 -0
- package/dist/api/resources/products/client/requests/ReviewSummaryProductsRequest.js +2 -0
- package/dist/api/resources/products/client/requests/ReviewsProductsRequest.d.ts +35 -0
- package/dist/api/resources/products/client/requests/ReviewsProductsRequest.js +2 -0
- package/dist/api/resources/products/client/requests/SalesHistoryProductsRequest.d.ts +23 -0
- package/dist/api/resources/products/client/requests/SalesHistoryProductsRequest.js +2 -0
- package/dist/api/resources/products/client/requests/SellersProductsRequest.d.ts +16 -0
- package/dist/api/resources/products/client/requests/SellersProductsRequest.js +2 -0
- package/dist/api/resources/products/client/requests/VisibilityHistoryProductsRequest.d.ts +23 -0
- package/dist/api/resources/products/client/requests/VisibilityHistoryProductsRequest.js +2 -0
- package/dist/api/resources/products/client/requests/index.d.ts +10 -0
- package/dist/api/resources/products/client/requests/index.js +1 -0
- package/dist/api/resources/products/exports.d.ts +2 -0
- package/dist/api/resources/products/exports.js +3 -0
- package/dist/api/resources/products/index.d.ts +2 -0
- package/dist/api/resources/products/index.js +2 -0
- package/dist/api/resources/products/types/CategoryRankingsProductsRequestInterval.d.ts +5 -0
- package/dist/api/resources/products/types/CategoryRankingsProductsRequestInterval.js +5 -0
- package/dist/api/resources/products/types/CategoryRankingsProductsRequestMarket.d.ts +6 -0
- package/dist/api/resources/products/types/CategoryRankingsProductsRequestMarket.js +6 -0
- package/dist/api/resources/products/types/CategoryRankingsProductsRequestPeriod.d.ts +7 -0
- package/dist/api/resources/products/types/CategoryRankingsProductsRequestPeriod.js +7 -0
- package/dist/api/resources/products/types/GetProductsRequestMarket.d.ts +6 -0
- package/dist/api/resources/products/types/GetProductsRequestMarket.js +6 -0
- package/dist/api/resources/products/types/GetProductsRequestPeriod.d.ts +6 -0
- package/dist/api/resources/products/types/GetProductsRequestPeriod.js +6 -0
- package/dist/api/resources/products/types/KeywordRankingsProductsRequestInterval.d.ts +5 -0
- package/dist/api/resources/products/types/KeywordRankingsProductsRequestInterval.js +5 -0
- package/dist/api/resources/products/types/KeywordRankingsProductsRequestMarket.d.ts +6 -0
- package/dist/api/resources/products/types/KeywordRankingsProductsRequestMarket.js +6 -0
- package/dist/api/resources/products/types/KeywordRankingsProductsRequestPeriod.d.ts +7 -0
- package/dist/api/resources/products/types/KeywordRankingsProductsRequestPeriod.js +7 -0
- package/dist/api/resources/products/types/KeywordsProductsRequestMarket.d.ts +6 -0
- package/dist/api/resources/products/types/KeywordsProductsRequestMarket.js +6 -0
- package/dist/api/resources/products/types/KeywordsProductsRequestPeriod.d.ts +6 -0
- package/dist/api/resources/products/types/KeywordsProductsRequestPeriod.js +6 -0
- package/dist/api/resources/products/types/ListProductsRequestMarket.d.ts +6 -0
- package/dist/api/resources/products/types/ListProductsRequestMarket.js +6 -0
- package/dist/api/resources/products/types/ListProductsRequestPeriod.d.ts +6 -0
- package/dist/api/resources/products/types/ListProductsRequestPeriod.js +6 -0
- package/dist/api/resources/products/types/ListProductsRequestSort.d.ts +9 -0
- package/dist/api/resources/products/types/ListProductsRequestSort.js +9 -0
- package/dist/api/resources/products/types/ReviewsProductsRequestMarket.d.ts +4 -0
- package/dist/api/resources/products/types/ReviewsProductsRequestMarket.js +4 -0
- package/dist/api/resources/products/types/ReviewsProductsRequestPeriod.d.ts +7 -0
- package/dist/api/resources/products/types/ReviewsProductsRequestPeriod.js +7 -0
- package/dist/api/resources/products/types/ReviewsProductsRequestSort.d.ts +7 -0
- package/dist/api/resources/products/types/ReviewsProductsRequestSort.js +7 -0
- package/dist/api/resources/products/types/SalesHistoryProductsRequestInterval.d.ts +5 -0
- package/dist/api/resources/products/types/SalesHistoryProductsRequestInterval.js +5 -0
- package/dist/api/resources/products/types/SalesHistoryProductsRequestMarket.d.ts +6 -0
- package/dist/api/resources/products/types/SalesHistoryProductsRequestMarket.js +6 -0
- package/dist/api/resources/products/types/SalesHistoryProductsRequestPeriod.d.ts +7 -0
- package/dist/api/resources/products/types/SalesHistoryProductsRequestPeriod.js +7 -0
- package/dist/api/resources/products/types/SellersProductsRequestMarket.d.ts +6 -0
- package/dist/api/resources/products/types/SellersProductsRequestMarket.js +6 -0
- package/dist/api/resources/products/types/SellersProductsRequestPeriod.d.ts +7 -0
- package/dist/api/resources/products/types/SellersProductsRequestPeriod.js +7 -0
- package/dist/api/resources/products/types/VisibilityHistoryProductsRequestInterval.d.ts +5 -0
- package/dist/api/resources/products/types/VisibilityHistoryProductsRequestInterval.js +5 -0
- package/dist/api/resources/products/types/VisibilityHistoryProductsRequestMarket.d.ts +6 -0
- package/dist/api/resources/products/types/VisibilityHistoryProductsRequestMarket.js +6 -0
- package/dist/api/resources/products/types/VisibilityHistoryProductsRequestPeriod.d.ts +7 -0
- package/dist/api/resources/products/types/VisibilityHistoryProductsRequestPeriod.js +7 -0
- package/dist/api/resources/products/types/index.d.ts +24 -0
- package/dist/api/resources/products/types/index.js +24 -0
- package/dist/api/resources/reference/client/Client.d.ts +84 -0
- package/dist/api/resources/reference/client/Client.js +254 -0
- package/dist/api/resources/reference/client/index.d.ts +1 -0
- package/dist/api/resources/reference/client/index.js +1 -0
- package/dist/api/resources/reference/client/requests/BrandsReferenceRequest.d.ts +12 -0
- package/dist/api/resources/reference/client/requests/BrandsReferenceRequest.js +2 -0
- package/dist/api/resources/reference/client/requests/CategoriesReferenceRequest.d.ts +18 -0
- package/dist/api/resources/reference/client/requests/CategoriesReferenceRequest.js +2 -0
- package/dist/api/resources/reference/client/requests/CategoryReferenceRequest.d.ts +5 -0
- package/dist/api/resources/reference/client/requests/CategoryReferenceRequest.js +2 -0
- package/dist/api/resources/reference/client/requests/index.d.ts +3 -0
- package/dist/api/resources/reference/client/requests/index.js +1 -0
- package/dist/api/resources/reference/exports.d.ts +2 -0
- package/dist/api/resources/reference/exports.js +3 -0
- package/dist/api/resources/reference/index.d.ts +1 -0
- package/dist/api/resources/reference/index.js +1 -0
- package/dist/api/resources/store/client/Client.d.ts +82 -0
- package/dist/api/resources/store/client/Client.js +291 -0
- package/dist/api/resources/store/client/index.d.ts +1 -0
- package/dist/api/resources/store/client/index.js +1 -0
- package/dist/api/resources/store/client/requests/InventoryStoreRequest.d.ts +23 -0
- package/dist/api/resources/store/client/requests/InventoryStoreRequest.js +2 -0
- package/dist/api/resources/store/client/requests/OverviewStoreRequest.d.ts +13 -0
- package/dist/api/resources/store/client/requests/OverviewStoreRequest.js +2 -0
- package/dist/api/resources/store/client/requests/ProductsStoreRequest.d.ts +49 -0
- package/dist/api/resources/store/client/requests/ProductsStoreRequest.js +2 -0
- package/dist/api/resources/store/client/requests/index.d.ts +3 -0
- package/dist/api/resources/store/client/requests/index.js +1 -0
- package/dist/api/resources/store/exports.d.ts +2 -0
- package/dist/api/resources/store/exports.js +3 -0
- package/dist/api/resources/store/index.d.ts +2 -0
- package/dist/api/resources/store/index.js +2 -0
- package/dist/api/resources/store/types/InventoryStoreRequestStockState.d.ts +6 -0
- package/dist/api/resources/store/types/InventoryStoreRequestStockState.js +6 -0
- package/dist/api/resources/store/types/OverviewStoreRequestCountry.d.ts +6 -0
- package/dist/api/resources/store/types/OverviewStoreRequestCountry.js +6 -0
- package/dist/api/resources/store/types/ProductsStoreRequestCountry.d.ts +5 -0
- package/dist/api/resources/store/types/ProductsStoreRequestCountry.js +5 -0
- package/dist/api/resources/store/types/ProductsStoreRequestSort.d.ts +11 -0
- package/dist/api/resources/store/types/ProductsStoreRequestSort.js +11 -0
- package/dist/api/resources/store/types/index.d.ts +4 -0
- package/dist/api/resources/store/types/index.js +4 -0
- package/dist/api/resources/usage/client/Client.d.ts +32 -0
- package/dist/api/resources/usage/client/Client.js +73 -0
- package/dist/api/resources/usage/client/index.d.ts +1 -0
- package/dist/api/resources/usage/client/index.js +1 -0
- package/dist/api/resources/usage/exports.d.ts +2 -0
- package/dist/api/resources/usage/exports.js +3 -0
- package/dist/api/resources/usage/index.d.ts +1 -0
- package/dist/api/resources/usage/index.js +1 -0
- package/dist/api/types/AllowanceError.d.ts +26 -0
- package/dist/api/types/AllowanceError.js +16 -0
- package/dist/api/types/Brand.d.ts +4 -0
- package/dist/api/types/Brand.js +2 -0
- package/dist/api/types/BrandListResponse.d.ts +6 -0
- package/dist/api/types/BrandListResponse.js +2 -0
- package/dist/api/types/BundleUsage.d.ts +15 -0
- package/dist/api/types/BundleUsage.js +2 -0
- package/dist/api/types/Category.d.ts +14 -0
- package/dist/api/types/Category.js +2 -0
- package/dist/api/types/CategoryItem.d.ts +4 -0
- package/dist/api/types/CategoryItem.js +2 -0
- package/dist/api/types/CategoryListResponse.d.ts +5 -0
- package/dist/api/types/CategoryListResponse.js +2 -0
- package/dist/api/types/CategoryPathItem.d.ts +4 -0
- package/dist/api/types/CategoryPathItem.js +2 -0
- package/dist/api/types/CategoryRanking.d.ts +5 -0
- package/dist/api/types/CategoryRanking.js +2 -0
- package/dist/api/types/CategoryRankingsResponse.d.ts +7 -0
- package/dist/api/types/CategoryRankingsResponse.js +2 -0
- package/dist/api/types/CategoryResponse.d.ts +4 -0
- package/dist/api/types/CategoryResponse.js +2 -0
- package/dist/api/types/CommissionBracket.d.ts +8 -0
- package/dist/api/types/CommissionBracket.js +2 -0
- package/dist/api/types/CurrentPeriod.d.ts +8 -0
- package/dist/api/types/CurrentPeriod.js +2 -0
- package/dist/api/types/Dimensions.d.ts +8 -0
- package/dist/api/types/Dimensions.js +2 -0
- package/dist/api/types/DistributionBucket.d.ts +5 -0
- package/dist/api/types/DistributionBucket.js +2 -0
- package/dist/api/types/DistributionData.d.ts +7 -0
- package/dist/api/types/DistributionData.js +2 -0
- package/dist/api/types/FreeTierUsage.d.ts +12 -0
- package/dist/api/types/FreeTierUsage.js +2 -0
- package/dist/api/types/KeywordItem.d.ts +6 -0
- package/dist/api/types/KeywordItem.js +2 -0
- package/dist/api/types/KeywordMarkets.d.ts +5 -0
- package/dist/api/types/KeywordMarkets.js +2 -0
- package/dist/api/types/KeywordMetrics.d.ts +4 -0
- package/dist/api/types/KeywordMetrics.js +2 -0
- package/dist/api/types/KeywordRanking.d.ts +7 -0
- package/dist/api/types/KeywordRanking.js +2 -0
- package/dist/api/types/KeywordRankingsResponse.d.ts +7 -0
- package/dist/api/types/KeywordRankingsResponse.js +2 -0
- package/dist/api/types/KeywordResponse.d.ts +7 -0
- package/dist/api/types/KeywordResponse.js +2 -0
- package/dist/api/types/ListingChanges.d.ts +5 -0
- package/dist/api/types/ListingChanges.js +2 -0
- package/dist/api/types/NicheDetail.d.ts +12 -0
- package/dist/api/types/NicheDetail.js +2 -0
- package/dist/api/types/NicheDetailResponse.d.ts +6 -0
- package/dist/api/types/NicheDetailResponse.js +2 -0
- package/dist/api/types/NicheDistributionsResponse.d.ts +5 -0
- package/dist/api/types/NicheDistributionsResponse.js +2 -0
- package/dist/api/types/NicheHistoryData.d.ts +4 -0
- package/dist/api/types/NicheHistoryData.js +2 -0
- package/dist/api/types/NicheHistoryResponse.d.ts +7 -0
- package/dist/api/types/NicheHistoryResponse.js +2 -0
- package/dist/api/types/NicheItem.d.ts +11 -0
- package/dist/api/types/NicheItem.js +2 -0
- package/dist/api/types/NicheListResponse.d.ts +7 -0
- package/dist/api/types/NicheListResponse.js +2 -0
- package/dist/api/types/NicheMarkets.d.ts +5 -0
- package/dist/api/types/NicheMarkets.js +2 -0
- package/dist/api/types/NicheMetrics.d.ts +5 -0
- package/dist/api/types/NicheMetrics.js +2 -0
- package/dist/api/types/NichePeriod.d.ts +5 -0
- package/dist/api/types/NichePeriod.js +2 -0
- package/dist/api/types/OauthScope.d.ts +9 -0
- package/dist/api/types/OauthScope.js +9 -0
- package/dist/api/types/Organization.d.ts +4 -0
- package/dist/api/types/Organization.js +2 -0
- package/dist/api/types/Pagination.d.ts +6 -0
- package/dist/api/types/Pagination.js +2 -0
- package/dist/api/types/Period.d.ts +5 -0
- package/dist/api/types/Period.js +2 -0
- package/dist/api/types/PeriodRatings.d.ts +7 -0
- package/dist/api/types/PeriodRatings.js +2 -0
- package/dist/api/types/PeriodReviews.d.ts +9 -0
- package/dist/api/types/PeriodReviews.js +2 -0
- package/dist/api/types/ProductDetail.d.ts +29 -0
- package/dist/api/types/ProductDetail.js +2 -0
- package/dist/api/types/ProductDetailResponse.d.ts +24 -0
- package/dist/api/types/ProductDetailResponse.js +14 -0
- package/dist/api/types/ProductDistributions.d.ts +6 -0
- package/dist/api/types/ProductDistributions.js +2 -0
- package/dist/api/types/ProductItem.d.ts +27 -0
- package/dist/api/types/ProductItem.js +2 -0
- package/dist/api/types/ProductListResponse.d.ts +25 -0
- package/dist/api/types/ProductListResponse.js +14 -0
- package/dist/api/types/ProductMarketMetrics.d.ts +11 -0
- package/dist/api/types/ProductMarketMetrics.js +2 -0
- package/dist/api/types/ProductMarkets.d.ts +5 -0
- package/dist/api/types/ProductMarkets.js +2 -0
- package/dist/api/types/PublicApiError.d.ts +4 -0
- package/dist/api/types/PublicApiError.js +2 -0
- package/dist/api/types/RankMarkets.d.ts +4 -0
- package/dist/api/types/RankMarkets.js +2 -0
- package/dist/api/types/RankPoint.d.ts +5 -0
- package/dist/api/types/RankPoint.js +2 -0
- package/dist/api/types/RatingCount.d.ts +5 -0
- package/dist/api/types/RatingCount.js +2 -0
- package/dist/api/types/ResearchError.d.ts +6 -0
- package/dist/api/types/ResearchError.js +2 -0
- package/dist/api/types/ReviewHistoryPoint.d.ts +6 -0
- package/dist/api/types/ReviewHistoryPoint.js +2 -0
- package/dist/api/types/ReviewItem.d.ts +12 -0
- package/dist/api/types/ReviewItem.js +2 -0
- package/dist/api/types/ReviewListResponse.d.ts +7 -0
- package/dist/api/types/ReviewListResponse.js +2 -0
- package/dist/api/types/ReviewSummary.d.ts +10 -0
- package/dist/api/types/ReviewSummary.js +2 -0
- package/dist/api/types/ReviewSummaryResponse.d.ts +5 -0
- package/dist/api/types/ReviewSummaryResponse.js +2 -0
- package/dist/api/types/ReviewTopic.d.ts +4 -0
- package/dist/api/types/ReviewTopic.js +2 -0
- package/dist/api/types/SalesHistoryMarkets.d.ts +5 -0
- package/dist/api/types/SalesHistoryMarkets.js +2 -0
- package/dist/api/types/SalesHistoryMetrics.d.ts +5 -0
- package/dist/api/types/SalesHistoryMetrics.js +2 -0
- package/dist/api/types/SalesHistoryPoint.d.ts +5 -0
- package/dist/api/types/SalesHistoryPoint.js +2 -0
- package/dist/api/types/SalesHistoryResponse.d.ts +7 -0
- package/dist/api/types/SalesHistoryResponse.js +2 -0
- package/dist/api/types/SellerItem.d.ts +8 -0
- package/dist/api/types/SellerItem.js +2 -0
- package/dist/api/types/SellerMarkets.d.ts +5 -0
- package/dist/api/types/SellerMarkets.js +2 -0
- package/dist/api/types/SellerMetrics.d.ts +7 -0
- package/dist/api/types/SellerMetrics.js +2 -0
- package/dist/api/types/SellerResponse.d.ts +9 -0
- package/dist/api/types/SellerResponse.js +2 -0
- package/dist/api/types/SellerSummaryMarkets.d.ts +5 -0
- package/dist/api/types/SellerSummaryMarkets.js +2 -0
- package/dist/api/types/SellerSummaryMetrics.d.ts +6 -0
- package/dist/api/types/SellerSummaryMetrics.js +2 -0
- package/dist/api/types/StoreChange.d.ts +9 -0
- package/dist/api/types/StoreChange.js +2 -0
- package/dist/api/types/StoreError.d.ts +5 -0
- package/dist/api/types/StoreError.js +2 -0
- package/dist/api/types/StoreFilters.d.ts +3 -0
- package/dist/api/types/StoreFilters.js +2 -0
- package/dist/api/types/StoreInventoryCounts.d.ts +7 -0
- package/dist/api/types/StoreInventoryCounts.js +2 -0
- package/dist/api/types/StoreInventoryFilters.d.ts +4 -0
- package/dist/api/types/StoreInventoryFilters.js +2 -0
- package/dist/api/types/StoreInventoryPagination.d.ts +7 -0
- package/dist/api/types/StoreInventoryPagination.js +2 -0
- package/dist/api/types/StoreInventoryResponse.d.ts +28 -0
- package/dist/api/types/StoreInventoryResponse.js +14 -0
- package/dist/api/types/StoreInventoryRow.d.ts +35 -0
- package/dist/api/types/StoreInventoryRow.js +18 -0
- package/dist/api/types/StoreKpi.d.ts +12 -0
- package/dist/api/types/StoreKpi.js +2 -0
- package/dist/api/types/StoreOverviewResponse.d.ts +13 -0
- package/dist/api/types/StoreOverviewResponse.js +2 -0
- package/dist/api/types/StorePerformanceProductPerformanceItem.d.ts +48 -0
- package/dist/api/types/StorePerformanceProductPerformanceItem.js +2 -0
- package/dist/api/types/StorePerformanceReturnCostsBreakdown.d.ts +10 -0
- package/dist/api/types/StorePerformanceReturnCostsBreakdown.js +2 -0
- package/dist/api/types/StorePerformanceSalesCostsBreakdown.d.ts +10 -0
- package/dist/api/types/StorePerformanceSalesCostsBreakdown.js +2 -0
- package/dist/api/types/StorePreviousKpi.d.ts +9 -0
- package/dist/api/types/StorePreviousKpi.js +2 -0
- package/dist/api/types/StoreProductsFilters.d.ts +5 -0
- package/dist/api/types/StoreProductsFilters.js +2 -0
- package/dist/api/types/StoreProductsPagination.d.ts +9 -0
- package/dist/api/types/StoreProductsPagination.js +2 -0
- package/dist/api/types/StoreProductsResponse.d.ts +11 -0
- package/dist/api/types/StoreProductsResponse.js +2 -0
- package/dist/api/types/UnauthorizedErrorBody.d.ts +3 -0
- package/dist/api/types/UnauthorizedErrorBody.js +2 -0
- package/dist/api/types/Usage.d.ts +51 -0
- package/dist/api/types/Usage.js +28 -0
- package/dist/api/types/UsageOrganization.d.ts +4 -0
- package/dist/api/types/UsageOrganization.js +2 -0
- package/dist/api/types/VisibilityHistoryResponse.d.ts +7 -0
- package/dist/api/types/VisibilityHistoryResponse.js +2 -0
- package/dist/api/types/VisibilityMarkets.d.ts +5 -0
- package/dist/api/types/VisibilityMarkets.js +2 -0
- package/dist/api/types/VisibilityMetrics.d.ts +4 -0
- package/dist/api/types/VisibilityMetrics.js +2 -0
- package/dist/api/types/VisibilityPoint.d.ts +5 -0
- package/dist/api/types/VisibilityPoint.js +2 -0
- package/dist/api/types/index.d.ts +92 -0
- package/dist/api/types/index.js +92 -0
- package/dist/auth/BearerAuthProvider.d.ts +20 -0
- package/dist/auth/BearerAuthProvider.js +32 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/core/auth/AuthProvider.d.ts +8 -0
- package/dist/core/auth/AuthProvider.js +6 -0
- package/dist/core/auth/AuthRequest.d.ts +9 -0
- package/dist/core/auth/AuthRequest.js +1 -0
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +29 -0
- package/dist/core/auth/BearerToken.d.ts +7 -0
- package/dist/core/auth/BearerToken.js +13 -0
- package/dist/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/core/auth/NoOpAuthProvider.js +5 -0
- package/dist/core/auth/index.d.ts +5 -0
- package/dist/core/auth/index.js +4 -0
- package/dist/core/base64.d.ts +2 -0
- package/dist/core/base64.js +22 -0
- package/dist/core/exports.d.ts +2 -0
- package/dist/core/exports.js +2 -0
- package/dist/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/core/fetcher/APIResponse.js +1 -0
- package/dist/core/fetcher/BinaryResponse.d.ts +19 -0
- package/dist/core/fetcher/BinaryResponse.js +14 -0
- package/dist/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/core/fetcher/EndpointMetadata.js +1 -0
- package/dist/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/core/fetcher/EndpointSupplier.js +10 -0
- package/dist/core/fetcher/Fetcher.d.ts +56 -0
- package/dist/core/fetcher/Fetcher.js +254 -0
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +83 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +90 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +40 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +10 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +5 -0
- package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getErrorResponseBody.js +43 -0
- package/dist/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/core/fetcher/getFetchFn.js +3 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +8 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +13 -0
- package/dist/core/fetcher/getResponseBody.d.ts +17 -0
- package/dist/core/fetcher/getResponseBody.js +70 -0
- package/dist/core/fetcher/index.d.ts +13 -0
- package/dist/core/fetcher/index.js +7 -0
- package/dist/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/core/fetcher/makePassthroughRequest.js +157 -0
- package/dist/core/fetcher/makeRequest.d.ts +11 -0
- package/dist/core/fetcher/makeRequest.js +85 -0
- package/dist/core/fetcher/redactUrl.d.ts +2 -0
- package/dist/core/fetcher/redactUrl.js +84 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +77 -0
- package/dist/core/fetcher/signals.d.ts +6 -0
- package/dist/core/fetcher/signals.js +28 -0
- package/dist/core/headers.d.ts +2 -0
- package/dist/core/headers.js +27 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/index.js +8 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +19 -0
- package/dist/core/logging/exports.d.ts +18 -0
- package/dist/core/logging/exports.js +9 -0
- package/dist/core/logging/index.d.ts +1 -0
- package/dist/core/logging/index.js +1 -0
- package/dist/core/logging/logger.d.ts +126 -0
- package/dist/core/logging/logger.js +140 -0
- package/dist/core/pagination/Page.d.ts +33 -0
- package/dist/core/pagination/Page.js +55 -0
- package/dist/core/pagination/exports.d.ts +1 -0
- package/dist/core/pagination/exports.js +1 -0
- package/dist/core/pagination/index.d.ts +1 -0
- package/dist/core/pagination/index.js +1 -0
- package/dist/core/requestBody.d.ts +12 -0
- package/dist/core/requestBody.js +23 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +1 -0
- package/dist/core/runtime/runtime.d.ts +28 -0
- package/dist/core/runtime/runtime.js +171 -0
- package/dist/core/url/QueryStringBuilder.d.ts +47 -0
- package/dist/core/url/QueryStringBuilder.js +78 -0
- package/dist/core/url/encodePathParam.d.ts +3 -0
- package/dist/core/url/encodePathParam.js +24 -0
- package/dist/core/url/index.d.ts +4 -0
- package/dist/core/url/index.js +4 -0
- package/dist/core/url/join.d.ts +1 -0
- package/dist/core/url/join.js +65 -0
- package/dist/core/url/qs.d.ts +7 -0
- package/dist/core/url/qs.js +76 -0
- package/dist/core/utils/index.d.ts +1 -0
- package/dist/core/utils/index.js +1 -0
- package/dist/core/utils/setObjectProperty.d.ts +12 -0
- package/dist/core/utils/setObjectProperty.js +45 -0
- package/dist/environments.d.ts +4 -0
- package/dist/environments.js +4 -0
- package/dist/errors/MarktMentorError.d.ts +15 -0
- package/dist/errors/MarktMentorError.js +52 -0
- package/dist/errors/MarktMentorTimeoutError.d.ts +6 -0
- package/dist/errors/MarktMentorTimeoutError.js +15 -0
- package/dist/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/errors/handleNonStatusCodeError.js +32 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +2 -0
- package/dist/exports.d.ts +1 -0
- package/dist/exports.js +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5 -0
- package/package.json +33 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const SalesHistoryProductsRequestPeriod: {
|
|
2
|
+
readonly ThreeM: "3M";
|
|
3
|
+
readonly SixM: "6M";
|
|
4
|
+
readonly OneY: "1Y";
|
|
5
|
+
readonly TwoY: "2Y";
|
|
6
|
+
};
|
|
7
|
+
export type SalesHistoryProductsRequestPeriod = (typeof SalesHistoryProductsRequestPeriod)[keyof typeof SalesHistoryProductsRequestPeriod];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const SellersProductsRequestPeriod: {
|
|
2
|
+
readonly NinetyD: "90d";
|
|
3
|
+
readonly OneHundredEightyD: "180d";
|
|
4
|
+
readonly ThreeHundredSixtyFiveD: "365d";
|
|
5
|
+
readonly SevenHundredThirtyD: "730d";
|
|
6
|
+
};
|
|
7
|
+
export type SellersProductsRequestPeriod = (typeof SellersProductsRequestPeriod)[keyof typeof SellersProductsRequestPeriod];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const VisibilityHistoryProductsRequestInterval: {
|
|
2
|
+
readonly Week: "week";
|
|
3
|
+
readonly Month: "month";
|
|
4
|
+
};
|
|
5
|
+
export type VisibilityHistoryProductsRequestInterval = (typeof VisibilityHistoryProductsRequestInterval)[keyof typeof VisibilityHistoryProductsRequestInterval];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const VisibilityHistoryProductsRequestMarket: {
|
|
2
|
+
readonly Nl: "NL";
|
|
3
|
+
readonly Be: "BE";
|
|
4
|
+
readonly All: "ALL";
|
|
5
|
+
};
|
|
6
|
+
export type VisibilityHistoryProductsRequestMarket = (typeof VisibilityHistoryProductsRequestMarket)[keyof typeof VisibilityHistoryProductsRequestMarket];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const VisibilityHistoryProductsRequestPeriod: {
|
|
2
|
+
readonly ThreeM: "3M";
|
|
3
|
+
readonly SixM: "6M";
|
|
4
|
+
readonly OneY: "1Y";
|
|
5
|
+
readonly TwoY: "2Y";
|
|
6
|
+
};
|
|
7
|
+
export type VisibilityHistoryProductsRequestPeriod = (typeof VisibilityHistoryProductsRequestPeriod)[keyof typeof VisibilityHistoryProductsRequestPeriod];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from "./CategoryRankingsProductsRequestInterval.js";
|
|
2
|
+
export * from "./CategoryRankingsProductsRequestMarket.js";
|
|
3
|
+
export * from "./CategoryRankingsProductsRequestPeriod.js";
|
|
4
|
+
export * from "./GetProductsRequestMarket.js";
|
|
5
|
+
export * from "./GetProductsRequestPeriod.js";
|
|
6
|
+
export * from "./KeywordRankingsProductsRequestInterval.js";
|
|
7
|
+
export * from "./KeywordRankingsProductsRequestMarket.js";
|
|
8
|
+
export * from "./KeywordRankingsProductsRequestPeriod.js";
|
|
9
|
+
export * from "./KeywordsProductsRequestMarket.js";
|
|
10
|
+
export * from "./KeywordsProductsRequestPeriod.js";
|
|
11
|
+
export * from "./ListProductsRequestMarket.js";
|
|
12
|
+
export * from "./ListProductsRequestPeriod.js";
|
|
13
|
+
export * from "./ListProductsRequestSort.js";
|
|
14
|
+
export * from "./ReviewsProductsRequestMarket.js";
|
|
15
|
+
export * from "./ReviewsProductsRequestPeriod.js";
|
|
16
|
+
export * from "./ReviewsProductsRequestSort.js";
|
|
17
|
+
export * from "./SalesHistoryProductsRequestInterval.js";
|
|
18
|
+
export * from "./SalesHistoryProductsRequestMarket.js";
|
|
19
|
+
export * from "./SalesHistoryProductsRequestPeriod.js";
|
|
20
|
+
export * from "./SellersProductsRequestMarket.js";
|
|
21
|
+
export * from "./SellersProductsRequestPeriod.js";
|
|
22
|
+
export * from "./VisibilityHistoryProductsRequestInterval.js";
|
|
23
|
+
export * from "./VisibilityHistoryProductsRequestMarket.js";
|
|
24
|
+
export * from "./VisibilityHistoryProductsRequestPeriod.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from "./CategoryRankingsProductsRequestInterval.js";
|
|
2
|
+
export * from "./CategoryRankingsProductsRequestMarket.js";
|
|
3
|
+
export * from "./CategoryRankingsProductsRequestPeriod.js";
|
|
4
|
+
export * from "./GetProductsRequestMarket.js";
|
|
5
|
+
export * from "./GetProductsRequestPeriod.js";
|
|
6
|
+
export * from "./KeywordRankingsProductsRequestInterval.js";
|
|
7
|
+
export * from "./KeywordRankingsProductsRequestMarket.js";
|
|
8
|
+
export * from "./KeywordRankingsProductsRequestPeriod.js";
|
|
9
|
+
export * from "./KeywordsProductsRequestMarket.js";
|
|
10
|
+
export * from "./KeywordsProductsRequestPeriod.js";
|
|
11
|
+
export * from "./ListProductsRequestMarket.js";
|
|
12
|
+
export * from "./ListProductsRequestPeriod.js";
|
|
13
|
+
export * from "./ListProductsRequestSort.js";
|
|
14
|
+
export * from "./ReviewsProductsRequestMarket.js";
|
|
15
|
+
export * from "./ReviewsProductsRequestPeriod.js";
|
|
16
|
+
export * from "./ReviewsProductsRequestSort.js";
|
|
17
|
+
export * from "./SalesHistoryProductsRequestInterval.js";
|
|
18
|
+
export * from "./SalesHistoryProductsRequestMarket.js";
|
|
19
|
+
export * from "./SalesHistoryProductsRequestPeriod.js";
|
|
20
|
+
export * from "./SellersProductsRequestMarket.js";
|
|
21
|
+
export * from "./SellersProductsRequestPeriod.js";
|
|
22
|
+
export * from "./VisibilityHistoryProductsRequestInterval.js";
|
|
23
|
+
export * from "./VisibilityHistoryProductsRequestMarket.js";
|
|
24
|
+
export * from "./VisibilityHistoryProductsRequestPeriod.js";
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as MarktMentor from "../../../index.js";
|
|
5
|
+
export declare namespace ReferenceClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Look up the values that the filters need: bol categories and brand names. These calls are free: they do not consume research requests. They work with every API key or OAuth connection. Limit: 120 requests per minute per organization.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ReferenceClient {
|
|
14
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ReferenceClient.Options>;
|
|
15
|
+
constructor(options: ReferenceClient.Options);
|
|
16
|
+
/**
|
|
17
|
+
* The bol category tree. Use it to find the `categoryId` for the product, niche and store filters. Send `level=1` for the top of the tree, `parentId` for the categories below one category, or `search` to find a category by name. Without a filter you get all categories, in the order of the tree.
|
|
18
|
+
*
|
|
19
|
+
* This request is free: it does not count as a research request.
|
|
20
|
+
*
|
|
21
|
+
* @param {MarktMentor.CategoriesReferenceRequest} request
|
|
22
|
+
* @param {ReferenceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
23
|
+
*
|
|
24
|
+
* @throws {@link MarktMentor.BadRequestError}
|
|
25
|
+
* @throws {@link MarktMentor.UnauthorizedError}
|
|
26
|
+
* @throws {@link MarktMentor.ForbiddenError}
|
|
27
|
+
* @throws {@link MarktMentor.TooManyRequestsError}
|
|
28
|
+
* @throws {@link MarktMentor.ServiceUnavailableError}
|
|
29
|
+
* @throws {@link errors.MarktMentorError}
|
|
30
|
+
* @throws {@link errors.MarktMentorTimeoutError}
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* await client.reference.categories({
|
|
34
|
+
* search: "drinkfles"
|
|
35
|
+
* })
|
|
36
|
+
*/
|
|
37
|
+
categories(request?: MarktMentor.CategoriesReferenceRequest, requestOptions?: ReferenceClient.RequestOptions): Promise<core.Page<MarktMentor.Category, MarktMentor.CategoryListResponse>>;
|
|
38
|
+
/**
|
|
39
|
+
* One category with its level, its parent and its path. Use it to show the name and the path of a `categoryId` that you already have.
|
|
40
|
+
*
|
|
41
|
+
* This request is free: it does not count as a research request.
|
|
42
|
+
*
|
|
43
|
+
* @param {number} categoryId - Category identifier, returned as categoryId.
|
|
44
|
+
* @param {MarktMentor.CategoryReferenceRequest} request
|
|
45
|
+
* @param {ReferenceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
|
+
*
|
|
47
|
+
* @throws {@link MarktMentor.BadRequestError}
|
|
48
|
+
* @throws {@link MarktMentor.UnauthorizedError}
|
|
49
|
+
* @throws {@link MarktMentor.ForbiddenError}
|
|
50
|
+
* @throws {@link MarktMentor.NotFoundError}
|
|
51
|
+
* @throws {@link MarktMentor.TooManyRequestsError}
|
|
52
|
+
* @throws {@link MarktMentor.ServiceUnavailableError}
|
|
53
|
+
* @throws {@link errors.MarktMentorError}
|
|
54
|
+
* @throws {@link errors.MarktMentorTimeoutError}
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await client.reference.category(1)
|
|
58
|
+
*/
|
|
59
|
+
category(categoryId: number, request?: MarktMentor.CategoryReferenceRequest, requestOptions?: ReferenceClient.RequestOptions): core.HttpResponsePromise<MarktMentor.CategoryResponse>;
|
|
60
|
+
private __category;
|
|
61
|
+
/**
|
|
62
|
+
* Brand names that hold your search text, the brand with the most products first. The `brand` filter of a product search needs the exact name: copy it from this response.
|
|
63
|
+
*
|
|
64
|
+
* This request is free: it does not count as a research request.
|
|
65
|
+
*
|
|
66
|
+
* @param {MarktMentor.BrandsReferenceRequest} request
|
|
67
|
+
* @param {ReferenceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link MarktMentor.BadRequestError}
|
|
70
|
+
* @throws {@link MarktMentor.UnauthorizedError}
|
|
71
|
+
* @throws {@link MarktMentor.ForbiddenError}
|
|
72
|
+
* @throws {@link MarktMentor.TooManyRequestsError}
|
|
73
|
+
* @throws {@link MarktMentor.ServiceUnavailableError}
|
|
74
|
+
* @throws {@link errors.MarktMentorError}
|
|
75
|
+
* @throws {@link errors.MarktMentorTimeoutError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.reference.brands({
|
|
79
|
+
* search: "philips"
|
|
80
|
+
* })
|
|
81
|
+
*/
|
|
82
|
+
brands(request: MarktMentor.BrandsReferenceRequest, requestOptions?: ReferenceClient.RequestOptions): core.HttpResponsePromise<MarktMentor.BrandListResponse>;
|
|
83
|
+
private __brands;
|
|
84
|
+
}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import { mergeHeaders } from "../../../../core/headers.js";
|
|
4
|
+
import * as core from "../../../../core/index.js";
|
|
5
|
+
import * as environments from "../../../../environments.js";
|
|
6
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
|
|
7
|
+
import * as errors from "../../../../errors/index.js";
|
|
8
|
+
import * as MarktMentor from "../../../index.js";
|
|
9
|
+
/**
|
|
10
|
+
* Look up the values that the filters need: bol categories and brand names. These calls are free: they do not consume research requests. They work with every API key or OAuth connection. Limit: 120 requests per minute per organization.
|
|
11
|
+
*/
|
|
12
|
+
export class ReferenceClient {
|
|
13
|
+
_options;
|
|
14
|
+
constructor(options) {
|
|
15
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The bol category tree. Use it to find the `categoryId` for the product, niche and store filters. Send `level=1` for the top of the tree, `parentId` for the categories below one category, or `search` to find a category by name. Without a filter you get all categories, in the order of the tree.
|
|
19
|
+
*
|
|
20
|
+
* This request is free: it does not count as a research request.
|
|
21
|
+
*
|
|
22
|
+
* @param {MarktMentor.CategoriesReferenceRequest} request
|
|
23
|
+
* @param {ReferenceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
|
+
*
|
|
25
|
+
* @throws {@link MarktMentor.BadRequestError}
|
|
26
|
+
* @throws {@link MarktMentor.UnauthorizedError}
|
|
27
|
+
* @throws {@link MarktMentor.ForbiddenError}
|
|
28
|
+
* @throws {@link MarktMentor.TooManyRequestsError}
|
|
29
|
+
* @throws {@link MarktMentor.ServiceUnavailableError}
|
|
30
|
+
* @throws {@link errors.MarktMentorError}
|
|
31
|
+
* @throws {@link errors.MarktMentorTimeoutError}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* await client.reference.categories({
|
|
35
|
+
* search: "drinkfles"
|
|
36
|
+
* })
|
|
37
|
+
*/
|
|
38
|
+
async categories(request = {}, requestOptions) {
|
|
39
|
+
const list = core.HttpResponsePromise.interceptFunction(async (request) => {
|
|
40
|
+
const { level, page, pageSize, parentId, search } = request;
|
|
41
|
+
const _queryParams = {
|
|
42
|
+
level,
|
|
43
|
+
page,
|
|
44
|
+
pageSize,
|
|
45
|
+
parentId,
|
|
46
|
+
search,
|
|
47
|
+
};
|
|
48
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
49
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
50
|
+
const _response = await core.fetcher({
|
|
51
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
52
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
53
|
+
environments.MarktMentorEnvironment.Production, "api/public/v1/reference/categories/"),
|
|
54
|
+
method: "GET",
|
|
55
|
+
headers: _headers,
|
|
56
|
+
queryString: core.url
|
|
57
|
+
.queryBuilder()
|
|
58
|
+
.addMany(_queryParams)
|
|
59
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
60
|
+
.build(),
|
|
61
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
62
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
63
|
+
abortSignal: requestOptions?.abortSignal,
|
|
64
|
+
fetchFn: this._options?.fetch,
|
|
65
|
+
logging: this._options.logging,
|
|
66
|
+
});
|
|
67
|
+
if (_response.ok) {
|
|
68
|
+
return {
|
|
69
|
+
data: _response.body,
|
|
70
|
+
rawResponse: _response.rawResponse,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
if (_response.error.reason === "status-code") {
|
|
74
|
+
switch (_response.error.statusCode) {
|
|
75
|
+
case 400:
|
|
76
|
+
throw new MarktMentor.BadRequestError(_response.error.body, _response.rawResponse);
|
|
77
|
+
case 401:
|
|
78
|
+
throw new MarktMentor.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
79
|
+
case 403:
|
|
80
|
+
throw new MarktMentor.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
81
|
+
case 429:
|
|
82
|
+
throw new MarktMentor.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
83
|
+
case 503:
|
|
84
|
+
throw new MarktMentor.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
85
|
+
default:
|
|
86
|
+
throw new errors.MarktMentorError({
|
|
87
|
+
statusCode: _response.error.statusCode,
|
|
88
|
+
body: _response.error.body,
|
|
89
|
+
rawResponse: _response.rawResponse,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/public/v1/reference/categories/");
|
|
94
|
+
});
|
|
95
|
+
let _offset = request?.page != null ? request?.page : 1;
|
|
96
|
+
const dataWithRawResponse = await list(request).withRawResponse();
|
|
97
|
+
return new core.Page({
|
|
98
|
+
response: dataWithRawResponse.data,
|
|
99
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
100
|
+
hasNextPage: (response) => response?.pagination.hasNext ?? (response?.data ?? []).length > 0,
|
|
101
|
+
getItems: (response) => response?.data ?? [],
|
|
102
|
+
loadPage: (_response) => {
|
|
103
|
+
const _nextOffset = _offset + 1;
|
|
104
|
+
return core.HttpResponsePromise.fromPromise(list(core.setObjectProperty(request, "page", _nextOffset))
|
|
105
|
+
.withRawResponse()
|
|
106
|
+
.then((_pageResponse) => {
|
|
107
|
+
_offset = _nextOffset;
|
|
108
|
+
return _pageResponse;
|
|
109
|
+
}));
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* One category with its level, its parent and its path. Use it to show the name and the path of a `categoryId` that you already have.
|
|
115
|
+
*
|
|
116
|
+
* This request is free: it does not count as a research request.
|
|
117
|
+
*
|
|
118
|
+
* @param {number} categoryId - Category identifier, returned as categoryId.
|
|
119
|
+
* @param {MarktMentor.CategoryReferenceRequest} request
|
|
120
|
+
* @param {ReferenceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
|
+
*
|
|
122
|
+
* @throws {@link MarktMentor.BadRequestError}
|
|
123
|
+
* @throws {@link MarktMentor.UnauthorizedError}
|
|
124
|
+
* @throws {@link MarktMentor.ForbiddenError}
|
|
125
|
+
* @throws {@link MarktMentor.NotFoundError}
|
|
126
|
+
* @throws {@link MarktMentor.TooManyRequestsError}
|
|
127
|
+
* @throws {@link MarktMentor.ServiceUnavailableError}
|
|
128
|
+
* @throws {@link errors.MarktMentorError}
|
|
129
|
+
* @throws {@link errors.MarktMentorTimeoutError}
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* await client.reference.category(1)
|
|
133
|
+
*/
|
|
134
|
+
category(categoryId, request = {}, requestOptions) {
|
|
135
|
+
return core.HttpResponsePromise.fromPromise(this.__category(categoryId, request, requestOptions));
|
|
136
|
+
}
|
|
137
|
+
async __category(categoryId, _request = {}, requestOptions) {
|
|
138
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
139
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
140
|
+
const _response = await core.fetcher({
|
|
141
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
142
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
143
|
+
environments.MarktMentorEnvironment.Production, `api/public/v1/reference/categories/${core.url.encodePathParam(categoryId, errors.MarktMentorError)}/`),
|
|
144
|
+
method: "GET",
|
|
145
|
+
headers: _headers,
|
|
146
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
147
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
148
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
149
|
+
abortSignal: requestOptions?.abortSignal,
|
|
150
|
+
fetchFn: this._options?.fetch,
|
|
151
|
+
logging: this._options.logging,
|
|
152
|
+
});
|
|
153
|
+
if (_response.ok) {
|
|
154
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
155
|
+
}
|
|
156
|
+
if (_response.error.reason === "status-code") {
|
|
157
|
+
switch (_response.error.statusCode) {
|
|
158
|
+
case 400:
|
|
159
|
+
throw new MarktMentor.BadRequestError(_response.error.body, _response.rawResponse);
|
|
160
|
+
case 401:
|
|
161
|
+
throw new MarktMentor.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
162
|
+
case 403:
|
|
163
|
+
throw new MarktMentor.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
164
|
+
case 404:
|
|
165
|
+
throw new MarktMentor.NotFoundError(_response.error.body, _response.rawResponse);
|
|
166
|
+
case 429:
|
|
167
|
+
throw new MarktMentor.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
168
|
+
case 503:
|
|
169
|
+
throw new MarktMentor.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
170
|
+
default:
|
|
171
|
+
throw new errors.MarktMentorError({
|
|
172
|
+
statusCode: _response.error.statusCode,
|
|
173
|
+
body: _response.error.body,
|
|
174
|
+
rawResponse: _response.rawResponse,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/public/v1/reference/categories/{categoryId}/");
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Brand names that hold your search text, the brand with the most products first. The `brand` filter of a product search needs the exact name: copy it from this response.
|
|
182
|
+
*
|
|
183
|
+
* This request is free: it does not count as a research request.
|
|
184
|
+
*
|
|
185
|
+
* @param {MarktMentor.BrandsReferenceRequest} request
|
|
186
|
+
* @param {ReferenceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
187
|
+
*
|
|
188
|
+
* @throws {@link MarktMentor.BadRequestError}
|
|
189
|
+
* @throws {@link MarktMentor.UnauthorizedError}
|
|
190
|
+
* @throws {@link MarktMentor.ForbiddenError}
|
|
191
|
+
* @throws {@link MarktMentor.TooManyRequestsError}
|
|
192
|
+
* @throws {@link MarktMentor.ServiceUnavailableError}
|
|
193
|
+
* @throws {@link errors.MarktMentorError}
|
|
194
|
+
* @throws {@link errors.MarktMentorTimeoutError}
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* await client.reference.brands({
|
|
198
|
+
* search: "philips"
|
|
199
|
+
* })
|
|
200
|
+
*/
|
|
201
|
+
brands(request, requestOptions) {
|
|
202
|
+
return core.HttpResponsePromise.fromPromise(this.__brands(request, requestOptions));
|
|
203
|
+
}
|
|
204
|
+
async __brands(request, requestOptions) {
|
|
205
|
+
const { limit, search } = request;
|
|
206
|
+
const _queryParams = {
|
|
207
|
+
limit,
|
|
208
|
+
search,
|
|
209
|
+
};
|
|
210
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
211
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
212
|
+
const _response = await core.fetcher({
|
|
213
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
214
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
215
|
+
environments.MarktMentorEnvironment.Production, "api/public/v1/reference/brands/"),
|
|
216
|
+
method: "GET",
|
|
217
|
+
headers: _headers,
|
|
218
|
+
queryString: core.url
|
|
219
|
+
.queryBuilder()
|
|
220
|
+
.addMany(_queryParams)
|
|
221
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
222
|
+
.build(),
|
|
223
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
224
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
225
|
+
abortSignal: requestOptions?.abortSignal,
|
|
226
|
+
fetchFn: this._options?.fetch,
|
|
227
|
+
logging: this._options.logging,
|
|
228
|
+
});
|
|
229
|
+
if (_response.ok) {
|
|
230
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
231
|
+
}
|
|
232
|
+
if (_response.error.reason === "status-code") {
|
|
233
|
+
switch (_response.error.statusCode) {
|
|
234
|
+
case 400:
|
|
235
|
+
throw new MarktMentor.BadRequestError(_response.error.body, _response.rawResponse);
|
|
236
|
+
case 401:
|
|
237
|
+
throw new MarktMentor.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
238
|
+
case 403:
|
|
239
|
+
throw new MarktMentor.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
240
|
+
case 429:
|
|
241
|
+
throw new MarktMentor.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
242
|
+
case 503:
|
|
243
|
+
throw new MarktMentor.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
244
|
+
default:
|
|
245
|
+
throw new errors.MarktMentorError({
|
|
246
|
+
statusCode: _response.error.statusCode,
|
|
247
|
+
body: _response.error.body,
|
|
248
|
+
rawResponse: _response.rawResponse,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/public/v1/reference/brands/");
|
|
253
|
+
}
|
|
254
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* search: "philips"
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface BrandsReferenceRequest {
|
|
8
|
+
/** Maximum number of brands (maximum 100). */
|
|
9
|
+
limit?: number;
|
|
10
|
+
/** Text in the brand name, at least 2 characters. Upper and lower case are the same. */
|
|
11
|
+
search: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* search: "drinkfles"
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface CategoriesReferenceRequest {
|
|
8
|
+
/** Only categories of this level. Level 1 is the top of the tree. */
|
|
9
|
+
level?: number;
|
|
10
|
+
/** Page number, starting at 1. */
|
|
11
|
+
page?: number;
|
|
12
|
+
/** Results per page (maximum 200). */
|
|
13
|
+
pageSize?: number;
|
|
14
|
+
/** Only the categories directly below this category. */
|
|
15
|
+
parentId?: number;
|
|
16
|
+
/** Text in the category name. Every word must be in the name. Upper and lower case are the same. */
|
|
17
|
+
search?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|