/
ListingResult.d.ts
69 lines (64 loc) · 1.86 KB
/
ListingResult.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// import { Sort } from "../search/SearchCriteria";
// import {
// Aggregations,
// AggregationFilterEntityOption,
// AggregationProductListingEntities,
// } from "../search/Aggregations";
// import { CustomFields } from "../models/common/CustomField";
import type { Schemas } from "#shopware";
/**
* @public
*/
export type ListingFilterCode =
| "manufacturer"
| "properties"
| "price"
| "rating"
| "search"
| "shipping-free"
| string;
export type ListingFilterDisplayType = "text" | "media";
/**
* @deprecated use Schemas['ProductListingResult']['currentFilters'] from "#shopware" import instead
*/
export type ListingFilter = Schemas["ProductListingResult"]["currentFilters"];
// export type ListingFilter = {
// id: string;
// label: string;
// name: string;
// code: ListingFilterCode;
// type?: "range" | "max";
// options?: AggregationFilterEntityOption[];
// entities?: AggregationProductListingEntities[];
// min?: number; // TODO: prepare proper listing filters based on code
// max?: number;
// value?: string;
// displayType?: ListingFilterDisplayType;
// customFields?: CustomFields;
// };
/**
* @deprecated use Schemas['ProductListingResult'] from "#shopware" import instead
*/
export type ListingResult = Schemas["ProductListingResult"];
// {
// /**
// * apiAlias - determines the entity name that can be used within "includes" functionality (added in store-api)
// */
// apiAlias: string;
// total: number;
// elements: T[];
// sorting: string;
// page: number;
// limit: number;
// sortings: Sort[];
// availableSortings: Sort[];
// aggregations: Aggregations;
// currentFilters: {
// manufacturer: string[];
// properties: string[];
// price: { min: null | number; max: null | number };
// rating: number;
// search: string | null;
// "shipping-free": boolean | null;
// };
// };