import { MessageItem, MessageItemList } from '../base.models'; import { RawVariantDocument } from './raw-shared.models'; export interface RawFacetValue { Count: number; Label: string; Level?: number; Value: string; RangeEnd: string; RangeMax: string; RangeMin: string; RangeStart: string; Selected?: boolean; Children?: Array; } export interface RawFacetRangeValue { AssetFullUrl: string; IsNumeric: boolean; LBound: string; Label: string; UBound: string; Value: string; } export interface RawFeaturedItem extends RawMerchandisingItem { FeaturedItems?: Array; Items?: Array; } export interface RawFeaturedItems { Items: Array; } export interface RawFacetSwatchValue { Value: string; Color?: string; AssetName?: string; AssetUrl?: string; IsDefault: boolean; } export interface RawFacet { AlwaysVisible: boolean; CurrencySymbol: string; DataType: string; DisplayType: string; ExpandSelection: boolean; FacetId: number; FacetType: string; Field: string; FieldType: string; IsCollapsedDefault?: boolean; IsCollapsible?: boolean; IsCurrency: boolean; IsNumeric: boolean; IsSearch: boolean; IsVisible: boolean; Name: string; ParamName?: string; Ranges?: Array; ScrollHeight?: number; ScrollThreshold?: number; SearchThreshold?: number; ShowFacetCount?: boolean; ShowItemsCount?: boolean; Tooltip?: string; TruncateThreshold?: number; Values?: Array; SwatchData?: Array; } export interface RawMerchandisingItem { AltTag?: string; BannerId: number; CampaignId: number; ContentType: string; ForwardUrl?: string; Height?: number; ImageUrl?: string; IsMobile: boolean; IsTablet: boolean; IsTrackingEnabled?: boolean; MobileHeight?: number; MobileWidth?: number; Output?: any; TabletHeight?: number; TabletWidth?: number; Target: string; Title: string; Trigger?: { BannerGroupId: number; Name: string; Rule: any; }; WidgetType?: string; Width?: number; Zone: string; } export interface RawMerchandising { Items: Array; } export interface RawPageContent { ZoneName: string; Items: Array; } export interface RawSearchSelectionItem { Label: string; Value: string; } export interface RawSearchSelection { Label: string; Items: Array; } export interface RawSearchSelections { [field: string]: RawSearchSelection; } export interface RawSearchPagination { CurrentPage: number; IsShowFirstLink: boolean; IsShowLastLink: boolean; MaxPerPage: number; NofPages: number; NofResults: number; NumberOfPageLinks: number; Items: Array<{ Label: string; PageSize: number; Selected: boolean; Default: boolean; }>; } export interface RawSearchSorting { Value?: string; Items: Array<{ Label: string; Value: string; IsDefault: boolean; Selected: boolean; }>; } export interface RawSearchRedirect { Location: string; Target?: string; } export type RawSearchResultsItemDocument = Record> & RawVariantDocument; export interface RawSearchResultsItem { DocId: string; Document: RawSearchResultsItemDocument; IsPin: boolean; IsVisible: boolean; Score: number; } export interface RawSearchResponse { AdjustedKeyword?: string; Breadcrumb?: string; CustomHtml?: string; DidYouMean?: Array; Facets?: Array; FeaturedItems?: RawFeaturedItems; HeaderTitle?: string; Keyword?: string; Merchandising?: RawMerchandising; MetaDescription?: string; MetaKeywords?: string; MetaRobots?: string; PageContent?: Array; PageHeading?: string; PageLayoutId?: number; PageLayoutHtml?: string; Pagination?: RawSearchPagination; Redirect?: RawSearchRedirect; RelCanonical?: string; Results?: Array; Selections?: RawSearchSelections; Sorting?: RawSearchSorting; Success: boolean; TrackingId: string; } export interface RawSearchRequest { ClientData?: { UserAgent?: string; VisitorId?: string; VisitId?: string; }; ClientGuid?: string; CustomURL?: string; RequestType?: string; IgnoreSpellcheck?: boolean; IndexName?: string; IsInPreview?: boolean; Keyword?: string; kValue?: number; FacetSelections?: Record | undefined>; MaxPerPage?: number; PageNo?: number; SearchWithin?: string; SortBy?: string; Variants?: { CountFacetHitOnChild?: boolean; MaxPerPage?: number; PageNo?: number; SortBy?: string; SortCode?: string; }; } /** * @category Search */ export interface RawConversationalSearchRequest { api_key: string; messages: MessageItemList; model?: 'gpt-3.5-turbo-16k'; max_length?: number; message?: string; show_openai_error?: boolean; best_of?: number; frequency_penalty?: number; presence_penalty?: number; stop?: Array; temperature?: number; top_p?: number; } /** * @category Search */ export interface RawConversationalSearchResponse { success: true; response: { id: true; object: string; created: number; model: string; choices: [ { text: string; index: number; message: MessageItem; logprobs: null; finish_reason: string; } ]; usage: { prompt_tokens: number; completion_tokens: number; total_tokens: number; }; request: any; error: any; successful_match: boolean; }; reference_id: string; }