Skip to content

Commit cd07396

Browse files
committed
Updated API from documentation release
1 parent 5c92f15 commit cd07396

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#%RAML 1.0 DataType
2+
(package): ProductSearch
3+
displayName: ProductSearchFacetResultStats
4+
type: ProductSearchFacetResult
5+
(beta): true
6+
description: |
7+
Result of a [stats facet](/../api/projects/product-search#stats-facets).
8+
The data type of `min` `max`, `mean`, and `sum` matches the data type of the `field` in the [facet expression](ctp:api:type:ProductSearchFacetStatsExpression).
9+
properties:
10+
min:
11+
type: any
12+
description: |
13+
The minimum value of the field, scoped to the faceted results.
14+
max:
15+
type: any
16+
description: The maximum value of the field, scoped to the faceted results.
17+
mean?:
18+
type: any
19+
description: |
20+
The average value of the field calculated as `sum` / `count`.
21+
22+
Only returned for number fields.
23+
sum?:
24+
type: any
25+
description: |
26+
The sum of values of the field that match the [facet expression](ctp:api:type:ProductSearchFacetStatsExpression).
27+
28+
Only returned for number fields.
29+
count:
30+
type: number
31+
format: long
32+
description: |
33+
The total number of values counted that match the facet expression.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#%RAML 1.0 DataType
2+
(package): ProductSearch
3+
type: ProductSearchFacetExpression
4+
(beta): true
5+
displayName: ProductSearchFacetStatsExpression
6+
properties:
7+
stats:
8+
type: ProductSearchFacetStatsValue
9+
description: Definition of the stats facet.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#%RAML 1.0 DataType
2+
(package): ProductSearch
3+
type: object
4+
(beta): true
5+
displayName: ProductSearchFacetStatsValue
6+
properties:
7+
name:
8+
type: string
9+
description: Name of the stats facet to appear in the [ProductSearchFacetResultStats](ctp:api:type:ProductSearchFacetResultStats).
10+
scope?:
11+
type: ProductSearchFacetScopeEnum
12+
default: query
13+
description: Whether the facet must consider only the Products resulting from the search (`query`) or all the Products (`all`).
14+
filter?:
15+
type: SearchQuery
16+
description: Additional filtering expression to apply to the search result before calculating the facet.
17+
field:
18+
type: string
19+
description: |
20+
The [searchable Product field](/api/projects/product-search#searchable-product-fields) to facet on.
21+
fieldType?:
22+
type: SearchFieldType
23+
description: If the `field` is not standard, this must be the Attribute type.

api-specs/api/types/types.raml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,10 @@ ProductSearchFacetResult: !include product-search/facets/ProductSearchFacetResul
19091909
ProductSearchFacetResultBucket: !include product-search/facets/ProductSearchFacetResultBucket.raml
19101910
ProductSearchFacetResultBucketEntry: !include product-search/facets/ProductSearchFacetResultBucketEntry.raml
19111911
ProductSearchFacetResultCount: !include product-search/facets/ProductSearchFacetResultCount.raml
1912+
ProductSearchFacetResultStats: !include product-search/facets/ProductSearchFacetResultStats.raml
19121913
ProductSearchFacetScopeEnum: !include product-search/facets/ProductSearchFacetScopeEnum.raml
1914+
ProductSearchFacetStatsExpression: !include product-search/facets/ProductSearchFacetStatsExpression.raml
1915+
ProductSearchFacetStatsValue: !include product-search/facets/ProductSearchFacetStatsValue.raml
19131916
AssignedProductReference: !include product-selection/AssignedProductReference.raml
19141917
AssignedProductSelection: !include product-selection/AssignedProductSelection.raml
19151918
AssignedProductSelectionPagedQueryResponse: !include product-selection/AssignedProductSelectionPagedQueryResponse.raml

0 commit comments

Comments
 (0)