UNPKG

2.52 kBTypeScriptView Raw
1/* eslint-disable */
2/**
3 * This file was automatically generated by json-schema-to-typescript.
4 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5 * and run json-schema-to-typescript to regenerate this file.
6 */
7
8/**
9 * Depict ID of the listing.
10 */
11export type ListingId = string;
12/**
13 * ID of the listing in the merchant PIM, CMS or similar.
14 */
15export type ExternalId = string | null;
16export type CollectionType =
17 | "long_tail_collection"
18 | "campaign"
19 | "category"
20 | "smart_pick"
21 | "style"
22 | "brand"
23 | "look";
24/**
25 * Show or hide this listing in navigation breadcrumbs.
26 */
27export type ShowInBreadcrumbs = boolean;
28/**
29 * Show or hide this listing in quicklinks.
30 */
31export type ShowInQuicklinks = boolean;
32/**
33 * List of image URLs for the listing.
34 */
35export type ImageUrls = string[];
36export type Title = string;
37export type Slug = string | null;
38export type Type = "listing";
39export type SuggestionsResultId = string;
40/**
41 * Ordered list of ancestors of the suggested listing, useful for navigation breadcrumbs. The first element is the root listing.
42 */
43export type Ancestors = ProductListing[];
44
45export interface SearchSuggestionsResponseV3 {
46 suggestions_request_id: string;
47 /**
48 * List of suggestions for search queries and product listings that should be shown to the user while they are typing.
49 */
50 suggestions: (QuerySuggestion | ListingSuggestion)[];
51}
52export interface QuerySuggestion {
53 type?: "query";
54 suggestions_result_id: string;
55 /**
56 * The suggested search query.
57 */
58 query: string;
59}
60export interface ListingSuggestion {
61 listing_id: ListingId;
62 external_id?: ExternalId;
63 listing_type: CollectionType;
64 show_in_breadcrumbs: ShowInBreadcrumbs;
65 show_in_quicklinks: ShowInQuicklinks;
66 image_urls: ImageUrls;
67 title: Title;
68 slug?: Slug;
69 type?: Type;
70 suggestions_result_id: SuggestionsResultId;
71 ancestors: Ancestors;
72}
73/**
74 * Represents a product listing, e.g. a category or a collection.
75 */
76export interface ProductListing {
77 /**
78 * Depict ID of the listing.
79 */
80 listing_id: string;
81 /**
82 * ID of the listing in the merchant PIM, CMS or similar.
83 */
84 external_id?: string;
85 listing_type: CollectionType;
86 /**
87 * Show or hide this listing in navigation breadcrumbs.
88 */
89 show_in_breadcrumbs: boolean;
90 /**
91 * Show or hide this listing in quicklinks.
92 */
93 show_in_quicklinks: boolean;
94 /**
95 * List of image URLs for the listing.
96 */
97 image_urls: string[];
98 title: string;
99 slug?: string;
100}