Catalog Service Models - rettersoft/rbs-docs GitHub Wiki

FilterValue {
    label?: string
    value?: string
    minValue?: number
    maxValue?: number
    filtered?: boolean
    count?: number // Aggregation count
}
Filter {
    filterId: string
    filterType: string
    fieldName: string
    label?: string
    visibility?: boolean
    filterValues?: Array<FilterValue>
    order?: number
    totalCount?: number
    prefix?: string
    postfix?: string
}
List {
    id?: string
    fieldName?: string
    fieldValue?: string
    size?: number
    products?: Array<Product>
}
TextSearchField {
    fieldName: string
    boost: number
}
Category {
    categoryId: string
    filters: Array<string>
}
SearchFilterValue {
    filterId: string
    filterValues: Array<string>
}
SearchRequest {
    categoryId?: string
    searchTerm?: string
    filters?: Array<SearchFilterValue>
    searchConfiguration: ProjectSearchConfiguration
    from?: number = 0
    size?: number = 20
    locale?: string = 'en_US'
    inStock?: boolean = false
    sortAttribute?: string = 'priceTag.discountedPrice' // 'attributes.name'
    sortOrder?: string = 'asc' // 'asc' | 'desc'
    zoneId?: string = 'default'
    segment?: string = 'default',
    matchTerms?: Term[] = [],
    priceRange?: PriceRange
}
ProductImageUrl {
    small: string
    medium: string
    large: string
}
ProductImage {
    isDefault: boolean
    url?: ProductImageUrl
    key?: string
    bucket?: string
    domain?: string
}
Product {
    id?: string
    inStock?: boolean
    images?: Array<ProductImage>
    attributes?: Array<ProductAttribute>
    categoryTree?: Array<CategoryTreeCategory>
    price?: Price
    merchant?: Merchant
    otherMerchants?: Array<OtherMerchant>
    categoryLayout?: CategoryLayout
}
CategoryLayout {
    layoutName?: string
    categories: Array<string>
    widgets: Array<CategoryLayoutWidget>
}
CategoryLayoutWidget {
    widgetName: string
    fieldNames: Array<string>
    attributes?: Array<ProductAttribute>
}
OtherMerchant {
    merchant: Merchant
    price: Price
}
ProductAttribute {
    fieldName: string
    fieldNameLabel: string
    value: string
    valueLabel: string
    attType: string
    values?: Array<string>
}
SearchResponse extends SearchRequest {
    products?: Array<Product>
    aggregations?: Array<Filter>
}
Query {
    preflightSearchQuery: any
    searchQuery: any
    aggsQuery: any
}
Merchant {
    id: string
    name?: string
    legalName?: string
    taxNo?: string
}
MerchantProductStock {
    productId: string
    merchant: Merchant
    stocks: Array<ProductVariantStock>
}
SingleMerchantProductStock {
    productId: string
    merchant: Merchant
    qty: number
}
ProductVariantStock {
    variantName: string
    stockQty: number
}
StockOperationResult {
    success: boolean
    message: string
}
ProductDBStockRecord {
    part: string
    sort: string
    data: MerchantProductStock
}
PriceValue {
    value: number
    valueText: string
}
Price {
    merchantId?: string
    currency: string
    original: PriceValue
    discounted: PriceValue
}
PriceRange {
    min: number
    max: number 
}
CategoryTree {
    categories: Array<CategoryTreeCategory>
}
CategoryTreeCategory {
    id?: string
    name?: any
    parent?: any
    children?: Array<CategoryTreeCategory>
}
ServiceResponse<T> {
    success: Boolean = false
    message?: string = ''
    data?: T
}
BulkUpdateItem {
    projectId: string
    messageType: string
    stockItem?: BulkUpdateStockItem
    priceItem?: BulkUpdatePriceItem
}
BulkUpdateStockItem {
    merchantId: string
    productId: string
    stocks: Array<ProductVariantStock>
}
BulkUpdatePriceItem {
    merchantId: string
    productId: string
    price: number
    discountedPrice: number
    currency: string
}
Stock {
    productId: string,
    merchantId: string,
    variant: string,
    qty: number
}
ProjectSearchConfiguration {
    projectId?: string
    lastUpdate?: number
    rootCategoryId: string // "B2B"
    currency: string // USD
    filters: Array<Filter> // []
    searchProjectionFields: Array<string> // []
    textSearchFields: Array<TextSearchField> // []
    textSearchPrefixLength?: number,
    textSearchFuzziness?: string,
    locales: Array<string> // ["en_US"]
    loc_keys: any // {}
    lists?: Array<List> // []
    defaultMerchantId?: string
    defaultMerchantPriceFieldName?: string
    defaultMerchantDiscountedPriceFieldName?: string
    layouts?: Array<CategoryLayout>
    updateToken?: string
    badgeImages?: Array<BadgeImage>
}
export interface BadgeImage {
    keyword: string
    image: CatalogItemImage
}
export interface CatalogItemImage {

    contentType: string
    contentEncoding: string
    alias: string
    resizeConfigs: ResizeConfigItem[]
}
export interface ResizeConfigItem {
    url?: string
    guid: string
    width: number
    height: number
    quality: number
}
⚠️ **GitHub.com Fallback** ⚠️