/**
 * Selling Partner API for Catalog Items
 * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
 *
 * The version of the OpenAPI document: v0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */ import { Configuration } from './configuration' ; import globalAxios , { AxiosPromise , AxiosInstance } from 'axios' ; import { DUMMY_BASE_URL , assertParamExists , setApiKeyToObject , setBasicAuthToObject , setBearerAuthToObject , setOAuthToObject , setSearchParams , serializeDataIfNeeded , toPathString , createRequestFunction } from './common' ; import { BASE_PATH , COLLECTION_FORMATS , RequestArgs , BaseAPI , RequiredError } from './base' ; export interface export interface ASINIdentifier { type { string } memberof MarketplaceId : string ; type { string } memberof ASIN : string ; } export interface export interface AttributeSetListType { type { Array < string > } memberof Actor ? : Array < string > ; type { Array < string > } memberof Artist ? : Array < string > ; type { string } memberof AspectRatio ? : string ; type { string } memberof AudienceRating ? : string ; type { Array < string > } memberof Author ? : Array < string > ; type { string } memberof BackFinding ? : string ; type { string } memberof BandMaterialType ? : string ; type { string } memberof Binding ? : string ; type { string } memberof BlurayRegion ? : string ; type { string } memberof Brand ? : string ; type { string } memberof CeroAgeRating ? : string ; type { string } memberof ChainType ? : string ; type { string } memberof ClaspType ? : string ; type { string } memberof Color ? : string ; type { string } memberof CpuManufacturer ? : string ; type { DecimalWithUnits } memberof CpuSpeed ? : DecimalWithUnits ; type { string } memberof CpuType ? : string ; type { Array < CreatorType > } memberof Creator ? : Array < CreatorType > ; type { string } memberof Department ? : string ; type { Array < string > } memberof Director ? : Array < string > ; type { DecimalWithUnits } memberof DisplaySize ? : DecimalWithUnits ; type { string } memberof Edition ? : string ; type { string } memberof EpisodeSequence ? : string ; type { string } memberof EsrbAgeRating ? : string ; type { Array < string > } memberof Feature ? : Array < string > ; type { string } memberof Flavor ? : string ; type { Array < string > } memberof Format ? : Array < string > ; type { Array < string > } memberof GemType ? : Array < string > ; type { string } memberof Genre ? : string ; type { string } memberof GolfClubFlex ? : string ; type { DecimalWithUnits } memberof GolfClubLoft ? : DecimalWithUnits ; type { string } memberof HandOrientation ? : string ; type { string } memberof HardDiskInterface ? : string ; type { DecimalWithUnits } memberof HardDiskSize ? : DecimalWithUnits ; type { string } memberof HardwarePlatform ? : string ; type { string } memberof HazardousMaterialType ? : string ; type { DimensionType } memberof ItemDimensions ? : DimensionType ; type { boolean } memberof IsAdultProduct ? : boolean ; type { boolean } memberof IsAutographed ? : boolean ; type { boolean } memberof IsEligibleForTradeIn ? : boolean ; type { boolean } memberof IsMemorabilia ? : boolean ; type { string } memberof IssuesPerYear ? : string ; type { string } memberof ItemPartNumber ? : string ; type { string } memberof Label ? : string ; type { Array < LanguageType > } memberof Languages ? : Array < LanguageType > ; type { string } memberof LegalDisclaimer ? : string ; type { Price } memberof ListPrice ? : Price ; type { string } memberof Manufacturer ? : string ; type { DecimalWithUnits } memberof ManufacturerMaximumAge ? : DecimalWithUnits ; type { DecimalWithUnits } memberof ManufacturerMinimumAge ? : DecimalWithUnits ; type { string } memberof ManufacturerPartsWarrantyDescription ? : string ; type { Array < string > } memberof MaterialType ? : Array < string > ; type { DecimalWithUnits } memberof MaximumResolution ? : DecimalWithUnits ; type { Array < string > } memberof MediaType ? : Array < string > ; type { string } memberof MetalStamp ? : string ; type { string } memberof MetalType ? : string ; type { string } memberof Model ? : string ; type { number } memberof NumberOfDiscs ? : number ; type { number } memberof NumberOfIssues ? : number ; type { number } memberof NumberOfItems ? : number ; type { number } memberof NumberOfPages ? : number ; type { number } memberof NumberOfTracks ? : number ; type { Array < string > } memberof OperatingSystem ? : Array < string > ; type { DecimalWithUnits } memberof OpticalZoom ? : DecimalWithUnits ; type { DimensionType } memberof PackageDimensions ? : DimensionType ; type { number } memberof PackageQuantity ? : number ; type { string } memberof PartNumber ? : string ; type { string } memberof PegiRating ? : string ; type { Array < string > } memberof Platform ? : Array < string > ; type { number } memberof ProcessorCount ? : number ; type { string } memberof ProductGroup ? : string ; type { string } memberof ProductTypeName ? : string ; type { string } memberof ProductTypeSubcategory ? : string ; type { string } memberof PublicationDate ? : string ; type { string } memberof Publisher ? : string ; type { string } memberof RegionCode ? : string ; type { string } memberof ReleaseDate ? : string ; type { string } memberof RingSize ? : string ; type { DecimalWithUnits } memberof RunningTime ? : DecimalWithUnits ; type { string } memberof ShaftMaterial ? : string ; type { string } memberof Scent ? : string ; type { string } memberof SeasonSequence ? : string ; type { string } memberof SeikodoProductCode ? : string ; type { string } memberof Size ? : string ; type { string } memberof SizePerPearl ? : string ; type { Image } memberof SmallImage ? : Image ; type { string } memberof Studio ? : string ; type { DecimalWithUnits } memberof SubscriptionLength ? : DecimalWithUnits ; type { DecimalWithUnits } memberof SystemMemorySize ? : DecimalWithUnits ; type { string } memberof SystemMemoryType ? : string ; type { string } memberof TheatricalReleaseDate ? : string ; type { string } memberof Title ? : string ; type { DecimalWithUnits } memberof TotalDiamondWeight ? : DecimalWithUnits ; type { DecimalWithUnits } memberof TotalGemWeight ? : DecimalWithUnits ; type { string } memberof Warranty ? : string ; type { Price } memberof WeeeTaxValue ? : Price ; } export interface export interface Categories { type { string } memberof ProductCategoryId ? : string ; type { string } memberof ProductCategoryName ? : string ; type { object } memberof parent ? : object ; } export interface export interface CreatorType { type { string } memberof value ? : string ; type { string } memberof Role ? : string ; } export interface export interface DecimalWithUnits { type { number } memberof value ? : number ; type { string } memberof Units ? : string ; } export interface export interface DimensionType { type { DecimalWithUnits } memberof Height ? : DecimalWithUnits ; type { DecimalWithUnits } memberof Length ? : DecimalWithUnits ; type { DecimalWithUnits } memberof Width ? : DecimalWithUnits ; type { DecimalWithUnits } memberof Weight ? : DecimalWithUnits ; } export interface export interface GetCatalogItemResponse { type { Item } memberof payload ? : Item ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface IdentifierType { type { ASINIdentifier } memberof MarketplaceASIN ? : ASINIdentifier ; type { SellerSKUIdentifier } memberof SKUIdentifier ? : SellerSKUIdentifier ; } export interface export interface Image { type { string } memberof URL ? : string ; type { DecimalWithUnits } memberof Height ? : DecimalWithUnits ; type { DecimalWithUnits } memberof Width ? : DecimalWithUnits ; } export interface export interface Item { type { IdentifierType } memberof Identifiers : IdentifierType ; type { Array < AttributeSetListType > } memberof AttributeSets ? : Array < AttributeSetListType > ; type { Array < RelationshipType > } memberof Relationships ? : Array < RelationshipType > ; type { Array < SalesRankType > } memberof SalesRankings ? : Array < SalesRankType > ; } export interface export interface LanguageType { type { string } memberof Name ? : string ; type { string } memberof Type ? : string ; type { string } memberof AudioFormat ? : string ; } export interface export interface ListCatalogCategoriesResponse { type { Array < Categories > } memberof payload ? : Array < Categories > ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface ListCatalogItemsResponse { type { ListMatchingItemsResponse } memberof payload ? : ListMatchingItemsResponse ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface ListMatchingItemsResponse { type { Array < Item > } memberof Items ? : Array < Item > ; } export interface export interface ModelError { type { string } memberof code : string ; type { string } memberof message : string ; type { string } memberof details ? : string ; } export interface export interface Price { type { number } memberof Amount ? : number ; type { string } memberof CurrencyCode ? : string ; } export interface export interface RelationshipType { type { IdentifierType } memberof Identifiers ? : IdentifierType ; type { string } memberof Color ? : string ; type { string } memberof Edition ? : string ; type { string } memberof Flavor ? : string ; type { Array < string > } memberof GemType ? : Array < string > ; type { string } memberof GolfClubFlex ? : string ; type { string } memberof HandOrientation ? : string ; type { string } memberof HardwarePlatform ? : string ; type { Array < string > } memberof MaterialType ? : Array < string > ; type { string } memberof MetalType ? : string ; type { string } memberof Model ? : string ; type { Array < string > } memberof OperatingSystem ? : Array < string > ; type { string } memberof ProductTypeSubcategory ? : string ; type { string } memberof RingSize ? : string ; type { string } memberof ShaftMaterial ? : string ; type { string } memberof Scent ? : string ; type { string } memberof Size ? : string ; type { string } memberof SizePerPearl ? : string ; type { DecimalWithUnits } memberof GolfClubLoft ? : DecimalWithUnits ; type { DecimalWithUnits } memberof TotalDiamondWeight ? : DecimalWithUnits ; type { DecimalWithUnits } memberof TotalGemWeight ? : DecimalWithUnits ; type { number } memberof PackageQuantity ? : number ; type { DimensionType } memberof ItemDimensions ? : DimensionType ; } export interface export interface SalesRankType { type { string } memberof ProductCategoryId : string ; type { number } memberof Rank : number ; } export interface export interface SellerSKUIdentifier { type { string } memberof MarketplaceId : string ; type { string } memberof SellerId : string ; type { string } memberof SellerSKU : string ; } export export const CatalogApiAxiosParamCreator = function ( configuration ? ) { return { param { string } marketplaceId param { string } asin param { * } options throws getCatalogItem : async ( marketplaceId , asin , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getCatalogItem' , 'marketplaceId' , marketplaceId ) ; assertParamExists ( 'getCatalogItem' , 'asin' , asin ) ; const localVarPath = `/catalog/v0/items/{asin}` . replace ( `{${ "asin" }}` , encodeURIComponent ( String ( asin ) ) ) ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; if ( marketplaceId !== undefined ) { localVarQueryParameter [ 'MarketplaceId' ] = marketplaceId ; } setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { string } marketplaceId param { string } aSIN param { string } sellerSKU param { * } options throws listCatalogCategories : async ( marketplaceId , aSIN ? , sellerSKU ? , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'listCatalogCategories' , 'marketplaceId' , marketplaceId ) ; const localVarPath = `/catalog/v0/categories` ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; if ( marketplaceId !== undefined ) { localVarQueryParameter [ 'MarketplaceId' ] = marketplaceId ; } if ( aSIN !== undefined ) { localVarQueryParameter [ 'ASIN' ] = aSIN ; } if ( sellerSKU !== undefined ) { localVarQueryParameter [ 'SellerSKU' ] = sellerSKU ; } setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { string } marketplaceId param { string } query param { string } queryContextId param { string } sellerSKU param { string } uPC param { string } eAN param { string } iSBN param { string } jAN param { * } options throws listCatalogItems : async ( marketplaceId , query ? , queryContextId ? , sellerSKU ? , uPC ? , eAN ? , iSBN ? , jAN ? , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'listCatalogItems' , 'marketplaceId' , marketplaceId ) ; const localVarPath = `/catalog/v0/items` ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; if ( marketplaceId !== undefined ) { localVarQueryParameter [ 'MarketplaceId' ] = marketplaceId ; } if ( query !== undefined ) { localVarQueryParameter [ 'Query' ] = query ; } if ( queryContextId !== undefined ) { localVarQueryParameter [ 'QueryContextId' ] = queryContextId ; } if ( sellerSKU !== undefined ) { localVarQueryParameter [ 'SellerSKU' ] = sellerSKU ; } if ( uPC !== undefined ) { localVarQueryParameter [ 'UPC' ] = uPC ; } if ( eAN !== undefined ) { localVarQueryParameter [ 'EAN' ] = eAN ; } if ( iSBN !== undefined ) { localVarQueryParameter [ 'ISBN' ] = iSBN ; } if ( jAN !== undefined ) { localVarQueryParameter [ 'JAN' ] = jAN ; } setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , } ; } ; export export const CatalogApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = CatalogApiAxiosParamCreator ( configuration ) ; return { param { string } marketplaceId param { string } asin param { * } options throws async getCatalogItem ( marketplaceId , asin , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getCatalogItem ( marketplaceId , asin , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } marketplaceId param { string } aSIN param { string } sellerSKU param { * } options throws async listCatalogCategories ( marketplaceId , aSIN ? , sellerSKU ? , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . listCatalogCategories ( marketplaceId , aSIN , sellerSKU , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } marketplaceId param { string } query param { string } queryContextId param { string } sellerSKU param { string } uPC param { string } eAN param { string } iSBN param { string } jAN param { * } options throws async listCatalogItems ( marketplaceId , query ? , queryContextId ? , sellerSKU ? , uPC ? , eAN ? , iSBN ? , jAN ? , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . listCatalogItems ( marketplaceId , query , queryContextId , sellerSKU , uPC , eAN , iSBN , jAN , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const CatalogApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = CatalogApiFp ( configuration ) ; return { param { string } marketplaceId param { string } asin param { * } options throws getCatalogItem ( marketplaceId , asin , options ? ) { return localVarFp . getCatalogItem ( marketplaceId , asin , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } marketplaceId param { string } aSIN param { string } sellerSKU param { * } options throws listCatalogCategories ( marketplaceId , aSIN ? , sellerSKU ? , options ? ) { return localVarFp . listCatalogCategories ( marketplaceId , aSIN , sellerSKU , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } marketplaceId param { string } query param { string } queryContextId param { string } sellerSKU param { string } uPC param { string } eAN param { string } iSBN param { string } jAN param { * } options throws listCatalogItems ( marketplaceId , query ? , queryContextId ? , sellerSKU ? , uPC ? , eAN ? , iSBN ? , jAN ? , options ? ) { return localVarFp . listCatalogItems ( marketplaceId , query , queryContextId , sellerSKU , uPC , eAN , iSBN , jAN , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface CatalogApiGetCatalogItemRequest { type { string } memberof readonly marketplaceId : string ; type { string } memberof readonly asin : string ; } export interface export interface CatalogApiListCatalogCategoriesRequest { type { string } memberof readonly marketplaceId : string ; type { string } memberof readonly aSIN ? : string ; type { string } memberof readonly sellerSKU ? : string ; } export interface export interface CatalogApiListCatalogItemsRequest { type { string } memberof readonly marketplaceId : string ; type { string } memberof readonly query ? : string ; type { string } memberof readonly queryContextId ? : string ; type { string } memberof readonly sellerSKU ? : string ; type { string } memberof readonly uPC ? : string ; type { string } memberof readonly eAN ? : string ; type { string } memberof readonly iSBN ? : string ; type { string } memberof readonly jAN ? : string ; } export class extends BaseAPI export class CatalogApi extends BaseAPI { param { CatalogApiGetCatalogItemRequest } requestParameters param { * } options throws memberof public getCatalogItem ( requestParameters , options ? ) { return CatalogApiFp ( this . configuration ) . getCatalogItem ( requestParameters . marketplaceId , requestParameters . asin , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { CatalogApiListCatalogCategoriesRequest } requestParameters param { * } options throws memberof public listCatalogCategories ( requestParameters , options ? ) { return CatalogApiFp ( this . configuration ) . listCatalogCategories ( requestParameters . marketplaceId , requestParameters . aSIN , requestParameters . sellerSKU , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { CatalogApiListCatalogItemsRequest } requestParameters param { * } options throws memberof public listCatalogItems ( requestParameters , options ? ) { return CatalogApiFp ( this . configuration ) . listCatalogItems ( requestParameters . marketplaceId , requestParameters . query , requestParameters . queryContextId , requestParameters . sellerSKU , requestParameters . uPC , requestParameters . eAN , requestParameters . iSBN , requestParameters . jAN , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }