@wix/bex-utils 2.71.0 → 2.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/builders.impl.d.ts +115 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/builders.impl.js +1340 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/builders.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/http.impl.d.ts +29 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/http.impl.js +524 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/http.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/meta.impl.d.ts +20 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/meta.impl.js +119 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/meta.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/client/proto-generated.d.ts +18874 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/client/proto-generated.js +2 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/proto-generated.d.ts +9468 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/proto-generated.js +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/server/proto-generated.d.ts +18788 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/server/proto-generated.js +2 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/rpc.impl.d.ts +39 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/rpc.impl.js +113 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/rpc.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/types.impl.d.ts +1248 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/types.impl.js +371 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/types.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/builders.impl.d.ts +115 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/builders.impl.js +1209 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/builders.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/http.impl.d.ts +29 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/http.impl.js +516 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/http.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/meta.impl.d.ts +20 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/meta.impl.js +92 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/meta.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/rpc.impl.d.ts +39 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/rpc.impl.js +86 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/rpc.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/types.impl.d.ts +1248 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/types.impl.js +368 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/types.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/builders/package.json +7 -0
- package/@wix/ambassador-dealer-v1-serving-offer/http/package.json +7 -0
- package/@wix/ambassador-dealer-v1-serving-offer/meta/package.json +7 -0
- package/@wix/ambassador-dealer-v1-serving-offer/package.json +52 -0
- package/@wix/ambassador-dealer-v1-serving-offer/rpc/package.json +6 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiment_properties.proto +46 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiment_results.proto +39 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiment_support_kpis.proto +29 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiments_properties_thin.proto +31 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/wixab_service.proto +81 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/action_payload.proto +33 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/annotations.proto +451 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/api_errors.proto +142 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/callback.proto +163 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/context.proto +19 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/entity.proto +127 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/errors.proto +127 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/idempotency.proto +25 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/permissions.proto +46 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/sla.proto +24 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/subscription.proto +32 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/validations.proto +142 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/address.proto +148 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/bulk.proto +53 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/data/dataextensions/extended-fields.proto +20 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/data/dataextensions/update-extended-fields-messages.proto +15 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/data/errors.proto +435 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/identification.proto +40 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/image.proto +8 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/media.proto +280 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/money.proto +32 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/pageurl.proto +32 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/paging.proto +121 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/query.proto +812 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/sorting.proto +36 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/spi.proto +85 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/tags.proto +55 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/wixlink.proto +203 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/audiences.proto +226 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/campaigns.proto +270 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/frequency-caps.proto +74 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/localization-managers.proto +11 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/managers.proto +11 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/offer-test.proto +338 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/offer.proto +298 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/offers-service.proto +696 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/placements.proto +423 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/schemas-service.proto +142 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/targeting.proto +378 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/upstream/wix/common/paging.proto +126 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/upstream/wix/common/query.proto +840 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/upstream/wix/common/sorting.proto +37 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerOffersServing/api/v1/dealer-offers-debug.proto +188 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerOffersServing/api/v1/dealer-offers-serving.proto +177 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerOffersServing/api/v1/offer.proto +87 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerPriority/api/v1/priority-service.proto +57 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerPriority/api/v1/priority.proto +132 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/graphql/definitions.proto +13 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/http/field_mask.proto +46 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/optimization_tester_service.proto +284 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/test.proto +170 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/bulk.proto +56 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/paging.proto +121 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/query.proto +741 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/sorting.proto +26 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/targeting/v1/targeting.proto +406 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/targeting/v1/targeting_service.proto +247 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/variants_generator/v1/variant.proto +92 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/variants_generator/v1/variants_generator_service.proto +73 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/sdk/definitions.proto +191 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/spi/definitions.proto +187 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/spi/http_error_status.proto +24 -0
- package/@wix/ambassador-dealer-v1-serving-offer/types/package.json +7 -0
- package/@wix/bex-bundled-mini-essentials/CHANGELOG.md +4 -0
- package/@wix/bex-bundled-mini-essentials/package.json +1 -1
- package/package.json +6 -5
|
@@ -0,0 +1,840 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package wix.dealerBackoffice.api.v1.upstream.wix.common;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/struct.proto";
|
|
6
|
+
import "google/protobuf/wrappers.proto";
|
|
7
|
+
import "wix/dealerBackoffice/api/v1/upstream/wix/common/paging.proto";
|
|
8
|
+
import "wix/dealerBackoffice/api/v1/upstream/wix/common/sorting.proto";
|
|
9
|
+
import "wix/api/annotations.proto";
|
|
10
|
+
import "wix/api/validations.proto";
|
|
11
|
+
|
|
12
|
+
option java_multiple_files = true;
|
|
13
|
+
option java_outer_classname = "QueryProto";
|
|
14
|
+
option java_package = "com.wix.dealerBackoffice.api.v1.upstream.wix.common";
|
|
15
|
+
message Query {
|
|
16
|
+
option (.wix.api.decomposite_of) = "wix.common.Query";
|
|
17
|
+
option (.wix.api.decomposition_minimum_fields) = {
|
|
18
|
+
field: "filter"
|
|
19
|
+
field: "sort"
|
|
20
|
+
field: "paging"
|
|
21
|
+
};
|
|
22
|
+
//Filter object in the following format:
|
|
23
|
+
//`"filter" : {
|
|
24
|
+
// "fieldName1": "value1",
|
|
25
|
+
// "fieldName2":{"$operator":"value2"}
|
|
26
|
+
// }`
|
|
27
|
+
//Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
28
|
+
google.protobuf.Value filter = 1;
|
|
29
|
+
//Sort object in the following format:
|
|
30
|
+
//`[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
31
|
+
// flynt-disable missing-array-limits
|
|
32
|
+
repeated Sorting sort = 2;
|
|
33
|
+
//Paging options to limit and skip the number of items.
|
|
34
|
+
Paging paging = 3;
|
|
35
|
+
//Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned.
|
|
36
|
+
// flynt-disable missing-array-limits
|
|
37
|
+
// flynt-disable missing-string-validations
|
|
38
|
+
repeated string fields = 4;
|
|
39
|
+
|
|
40
|
+
//Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned.
|
|
41
|
+
// flynt-disable missing-array-limits
|
|
42
|
+
// flynt-disable missing-string-validations
|
|
43
|
+
repeated string fieldsets = 5;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
message QueryV2 {
|
|
47
|
+
option (.wix.api.decomposite_of) = "wix.common.QueryV2";
|
|
48
|
+
option (.wix.api.decomposition_minimum_fields) = {
|
|
49
|
+
field: "filter"
|
|
50
|
+
field: "sort"
|
|
51
|
+
field: "paging"
|
|
52
|
+
};
|
|
53
|
+
option (.wix.api.decomposition_minimum_fields) = {
|
|
54
|
+
field: "filter"
|
|
55
|
+
field: "sort"
|
|
56
|
+
field: "cursor_paging"
|
|
57
|
+
};
|
|
58
|
+
// Filter object.
|
|
59
|
+
//
|
|
60
|
+
// Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
61
|
+
google.protobuf.Struct filter = 1;
|
|
62
|
+
// Sort object.
|
|
63
|
+
//
|
|
64
|
+
// Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
65
|
+
// flynt-disable missing-array-limits
|
|
66
|
+
repeated Sorting sort = 2;
|
|
67
|
+
//Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned.
|
|
68
|
+
// flynt-disable missing-array-limits
|
|
69
|
+
// flynt-disable missing-string-validations
|
|
70
|
+
repeated string fields = 4;
|
|
71
|
+
//Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned.
|
|
72
|
+
// flynt-disable missing-array-limits
|
|
73
|
+
// flynt-disable missing-string-validations
|
|
74
|
+
repeated string fieldsets = 5;
|
|
75
|
+
oneof pagingMethod {
|
|
76
|
+
//Paging options to limit and skip the number of items.
|
|
77
|
+
Paging paging = 3;
|
|
78
|
+
//Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.
|
|
79
|
+
CursorPaging cursor_paging = 6;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
message CursorQuery {
|
|
84
|
+
option (.wix.api.decomposite_of) = "wix.common.CursorQuery";
|
|
85
|
+
// Filter object.
|
|
86
|
+
//
|
|
87
|
+
// Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
88
|
+
google.protobuf.Struct filter = 1;
|
|
89
|
+
// Sort object.
|
|
90
|
+
//
|
|
91
|
+
// Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
92
|
+
repeated Sorting sort = 2 [(.wix.api.maxSize) = 5];
|
|
93
|
+
reserved 3;
|
|
94
|
+
reserved 4;
|
|
95
|
+
reserved 5;
|
|
96
|
+
oneof pagingMethod {
|
|
97
|
+
// Cursor paging options.
|
|
98
|
+
//
|
|
99
|
+
// Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
100
|
+
CursorPaging cursor_paging = 6;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
message Search {
|
|
105
|
+
option (.wix.api.decomposite_of) = "wix.common.Search";
|
|
106
|
+
option (.wix.api.decomposition_minimum_fields) = {
|
|
107
|
+
field: "filter"
|
|
108
|
+
field: "sort"
|
|
109
|
+
field: "paging"
|
|
110
|
+
};
|
|
111
|
+
option (.wix.api.decomposition_minimum_fields) = {
|
|
112
|
+
field: "filter"
|
|
113
|
+
field: "sort"
|
|
114
|
+
field: "cursor_paging"
|
|
115
|
+
};
|
|
116
|
+
// Filter object.
|
|
117
|
+
//
|
|
118
|
+
// Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
119
|
+
google.protobuf.Struct filter = 1;
|
|
120
|
+
// Sort object.
|
|
121
|
+
//
|
|
122
|
+
// Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
123
|
+
repeated Sorting sort = 2 [(.wix.api.maxSize) = 10];
|
|
124
|
+
// Projection on the result object - list of specific field names to return. If fieldsets are also specified, return the union of fieldsets and fields.
|
|
125
|
+
repeated string fields = 3 [(.wix.api.maxLength) = 200, (.wix.api.maxSize) = 20];
|
|
126
|
+
// Projection on the result object - list of named projections. For example, "basic" will return ID and name fields. Specifying multiple fieldsets will return the union of fields from all. Specifying fieldsets and fields will also return the union of fields.
|
|
127
|
+
repeated string fieldsets = 4 [(.wix.api.maxLength) = 100, (.wix.api.maxSize) = 20];
|
|
128
|
+
// Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
|
|
129
|
+
repeated Aggregation aggregations = 5 [(.wix.api.maxSize) = 10];
|
|
130
|
+
// Free text to match in searchable fields.
|
|
131
|
+
SearchDetails search = 6;
|
|
132
|
+
oneof paging_method {
|
|
133
|
+
// Pointer to page of results using offset. Can't be used together with 'cursor_paging'.
|
|
134
|
+
Paging paging = 7;
|
|
135
|
+
// Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can't be used together with 'filter' or 'sort'.
|
|
136
|
+
CursorPaging cursor_paging = 8;
|
|
137
|
+
}
|
|
138
|
+
// UTC offset or IANA time zone. Valid values are
|
|
139
|
+
// ISO 8601 UTC offsets, such as +02:00 or -06:00,
|
|
140
|
+
// and IANA time zone IDs, such as Europe/Rome.
|
|
141
|
+
//
|
|
142
|
+
// Affects all filters and aggregations returned values.
|
|
143
|
+
// You may override this behavior in a specific filter by providing
|
|
144
|
+
// timestamps including time zone. For example, `"2023-12-20T10:52:34.795Z"`.
|
|
145
|
+
google.protobuf.StringValue time_zone = 9 [(.wix.api.maxLength) = 50];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
message CursorSearch {
|
|
149
|
+
option (.wix.api.decomposite_of) = "wix.common.CursorSearch";
|
|
150
|
+
// Filter object.
|
|
151
|
+
//
|
|
152
|
+
// Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
153
|
+
google.protobuf.Struct filter = 1;
|
|
154
|
+
// List of sort objects.
|
|
155
|
+
//
|
|
156
|
+
// Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
157
|
+
repeated Sorting sort = 2 [(.wix.api.maxSize) = 10];
|
|
158
|
+
reserved 3;
|
|
159
|
+
reserved 4;
|
|
160
|
+
reserved 7;
|
|
161
|
+
// Aggregations are a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
|
|
162
|
+
repeated Aggregation aggregations = 5 [(.wix.api.maxSize) = 10];
|
|
163
|
+
// Free text to match in searchable fields.
|
|
164
|
+
SearchDetails search = 6;
|
|
165
|
+
oneof paging_method {
|
|
166
|
+
// Cursor paging options.
|
|
167
|
+
//
|
|
168
|
+
// Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
169
|
+
CursorPaging cursor_paging = 8;
|
|
170
|
+
}
|
|
171
|
+
// UTC offset or IANA time zone. Valid values are
|
|
172
|
+
// ISO 8601 UTC offsets, such as +02:00 or -06:00,
|
|
173
|
+
// and IANA time zone IDs, such as Europe/Rome.
|
|
174
|
+
//
|
|
175
|
+
// Affects all filters and aggregations returned values.
|
|
176
|
+
// You may override this behavior in a specific filter by providing
|
|
177
|
+
// timestamps including time zone. For example, `"2023-12-20T10:52:34.795Z"`.
|
|
178
|
+
google.protobuf.StringValue time_zone = 9 [(.wix.api.maxLength) = 50];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
message SearchRelated {
|
|
182
|
+
option (.wix.api.decomposite_of) = "wix.common.SearchRelated";
|
|
183
|
+
// A list of entity IDs to search related entities for.
|
|
184
|
+
repeated string related_to_ids = 1 [(.wix.api.minSize) = 1, (.wix.api.maxSize) = 10, (.wix.api.maxLength) = 50];
|
|
185
|
+
// Search details.
|
|
186
|
+
SearchRelatedDetails search = 2;
|
|
187
|
+
// A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf)
|
|
188
|
+
google.protobuf.Struct filter = 3;
|
|
189
|
+
// Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}].
|
|
190
|
+
repeated Sorting sort = 4 [(.wix.api.maxSize) = 10];
|
|
191
|
+
// Number of related documents to return.
|
|
192
|
+
google.protobuf.Int32Value limit = 5 [(.wix.api.max) = 100];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
message SearchRelatedDetails {
|
|
196
|
+
option (.wix.api.decomposite_of) = "wix.common.SearchRelatedDetails";
|
|
197
|
+
google.protobuf.StringValue expression = 2 [(.wix.api.maxLength) = 100]; // Search term or expression.
|
|
198
|
+
// Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path.
|
|
199
|
+
repeated string fields = 3 [(.wix.api.maxLength) = 200, (.wix.api.maxSize) = 20];
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
message SearchDetails {
|
|
204
|
+
option (.wix.api.decomposite_of) = "wix.common.SearchDetails";
|
|
205
|
+
enum Mode {
|
|
206
|
+
OR = 0; // Any of the search terms must be present.
|
|
207
|
+
AND = 1; // All search terms must be present.
|
|
208
|
+
}
|
|
209
|
+
Mode mode = 1; // Defines how separate search terms in `expression` are combined.
|
|
210
|
+
google.protobuf.StringValue expression = 2 [(.wix.api.maxLength) = 100]; // Search term or expression.
|
|
211
|
+
// Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path.
|
|
212
|
+
repeated string fields = 3 [(.wix.api.maxLength) = 200, (.wix.api.maxSize) = 20];
|
|
213
|
+
bool fuzzy = 4; // Whether to use auto fuzzy search (allowing typos by a managed proximity algorithm).
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
enum AggregationType {
|
|
217
|
+
UNKNOWN_AGGREGATION_TYPE = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];
|
|
218
|
+
VALUE = 1; // An aggregation where result buckets are dynamically built - one per unique value.
|
|
219
|
+
RANGE = 2; // An aggregation, where user can define set of ranges - each representing a bucket.
|
|
220
|
+
SCALAR = 3; // A single-value metric aggregation. For example, min, max, sum, avg.
|
|
221
|
+
DATE_HISTOGRAM = 4; // An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.)
|
|
222
|
+
NESTED = 5; // Multi-level aggregation, where each next aggregation is nested within previous one.
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
enum ScalarType {
|
|
226
|
+
UNKNOWN_SCALAR_TYPE = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];
|
|
227
|
+
COUNT_DISTINCT = 1; // Count of distinct values.
|
|
228
|
+
MIN = 2; // Minimum value.
|
|
229
|
+
MAX = 3; // Maximum value.
|
|
230
|
+
SUM = 4 [(.wix.api.enum_exposure) = PRIVATE]; // Sum of values.
|
|
231
|
+
AVG = 5 [(.wix.api.enum_exposure) = PRIVATE]; // Average of values.
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
message Aggregation {
|
|
235
|
+
option (.wix.api.decomposite_of) = "wix.common.Aggregation";
|
|
236
|
+
message RangeAggregation {
|
|
237
|
+
option (.wix.api.decomposite_of) = "wix.common.Aggregation.RangeAggregation";
|
|
238
|
+
message RangeBucket {
|
|
239
|
+
option (.wix.api.decomposite_of) = "wix.common.Aggregation.RangeAggregation.RangeBucket";
|
|
240
|
+
google.protobuf.DoubleValue from = 1; // Inclusive lower bound of the range. Required if `to` is not provided.
|
|
241
|
+
google.protobuf.DoubleValue to = 2; // Exclusive upper bound of the range. Required if `from` is not provided.
|
|
242
|
+
}
|
|
243
|
+
// List of range buckets, where during aggregation each entity will be placed in the first bucket its value falls into, based on the provided range bounds.
|
|
244
|
+
repeated RangeBucket buckets = 1 [(.wix.api.maxSize) = 50];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
message ValueAggregation {
|
|
248
|
+
option (.wix.api.decomposite_of) = "wix.common.Aggregation.ValueAggregation";
|
|
249
|
+
enum SortType {
|
|
250
|
+
COUNT = 0; // Sort by number of matches.
|
|
251
|
+
VALUE = 1; // Sort by value of the field alphabetically.
|
|
252
|
+
}
|
|
253
|
+
enum SortDirection {
|
|
254
|
+
DESC = 0; // Sort in descending order.
|
|
255
|
+
ASC = 1; // Sort in ascending order.
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
enum MissingValues {
|
|
259
|
+
EXCLUDE = 0; // Exclude missing values from the aggregation results.
|
|
260
|
+
INCLUDE = 1; // Include missing values in the aggregation results.
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
message IncludeMissingValuesOptions {
|
|
264
|
+
option (.wix.api.decomposite_of) = "wix.common.Aggregation.ValueAggregation.IncludeMissingValuesOptions";
|
|
265
|
+
string add_to_bucket = 1 [(.wix.api.maxLength) = 20]; // Specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
SortType sort_type = 1; // Whether to sort by number of matches or value of the field.
|
|
269
|
+
SortDirection sort_direction = 2; // Whether to sort in ascending or descending order.
|
|
270
|
+
google.protobuf.Int32Value limit = 3; // How many aggregations to return. Can be between 1 and 250. 10 is the default.
|
|
271
|
+
|
|
272
|
+
MissingValues missing_values = 4; // Whether to include or exclude missing values from the aggregation results. Default: `EXCLUDE`.
|
|
273
|
+
oneof options {
|
|
274
|
+
option (.wix.api.aligned_with_enum).field = "missing_values";
|
|
275
|
+
IncludeMissingValuesOptions include_options = 5; // Options for including missing values.
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
message ScalarAggregation {
|
|
280
|
+
option (.wix.api.decomposite_of) = "wix.common.Aggregation.ScalarAggregation";
|
|
281
|
+
ScalarType type = 1; // Define the operator for the scalar aggregation.
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
message GroupByAggregation {
|
|
285
|
+
option (.wix.api.decomposite_of) = "wix.common.Aggregation.GroupByAggregation";
|
|
286
|
+
google.protobuf.StringValue name = 1 [(.wix.api.maxLength) = 100]; // User-defined name of aggregation, should be unique, will appear in aggregation results.
|
|
287
|
+
string field_path = 3 [(.wix.api.maxLength) = 200]; // Field to aggregate by.
|
|
288
|
+
oneof kind {
|
|
289
|
+
ValueAggregation value = 4; // Value aggregation configuration.
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one.
|
|
294
|
+
message NestedAggregation {
|
|
295
|
+
option (.wix.api.decomposite_of) = "wix.common.Aggregation.NestedAggregation";
|
|
296
|
+
reserved 1;
|
|
297
|
+
|
|
298
|
+
enum NestedAggregationType {
|
|
299
|
+
UNKNOWN_AGGREGATION_TYPE = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];
|
|
300
|
+
VALUE = 1; // An aggregation where result buckets are dynamically built - one per unique value.
|
|
301
|
+
RANGE = 2; // An aggregation, where user can define set of ranges - each representing a bucket.
|
|
302
|
+
SCALAR = 3; // A single-value metric aggregation. For example, min, max, sum, avg.
|
|
303
|
+
DATE_HISTOGRAM = 4; // An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.).
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
message NestedAggregationItem {
|
|
307
|
+
option (.wix.api.decomposite_of) = "wix.common.Aggregation.NestedAggregation.NestedAggregationItem";
|
|
308
|
+
google.protobuf.StringValue name = 1 [(.wix.api.maxLength) = 100]; // User-defined name of aggregation, should be unique, will appear in aggregation results.
|
|
309
|
+
NestedAggregationType type = 2; // Type of aggregation, client must provide matching aggregation field below.
|
|
310
|
+
string field_path = 3 [(.wix.api.maxLength) = 200]; // Field to aggregate by, use dot notation to specify json path.
|
|
311
|
+
oneof kind {
|
|
312
|
+
ValueAggregation value = 4; // Value aggregation.
|
|
313
|
+
RangeAggregation range = 5; // Range aggregation.
|
|
314
|
+
ScalarAggregation scalar = 6; // Scalar aggregation.
|
|
315
|
+
DateHistogramAggregation date_histogram = 9; // Date histogram aggregation.
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// Flattened list of aggregations, where each next aggregation is nested within previous one.
|
|
320
|
+
repeated NestedAggregationItem nested_aggregations = 2 [(.wix.api.minSize) = 2, (.wix.api.maxSize) = 3];
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
message DateHistogramAggregation {
|
|
324
|
+
option (.wix.api.decomposite_of) = "wix.common.Aggregation.DateHistogramAggregation";
|
|
325
|
+
enum Interval {
|
|
326
|
+
UNKNOWN_INTERVAL = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];
|
|
327
|
+
YEAR = 1; // Yearly interval
|
|
328
|
+
MONTH = 2; // Monthly interval
|
|
329
|
+
WEEK = 3; // Weekly interval
|
|
330
|
+
DAY = 4; // Daily interval
|
|
331
|
+
HOUR = 5; // Hourly interval
|
|
332
|
+
MINUTE = 6; // Minute interval
|
|
333
|
+
SECOND = 7; // Second interval
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
Interval interval = 1; // Interval for date histogram aggregation.
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
google.protobuf.StringValue name = 1 [(.wix.api.maxLength) = 100]; // User-defined name of aggregation, should be unique, will appear in aggregation results.
|
|
340
|
+
AggregationType type = 2; // Type of aggregation, client must provide matching aggregation field below.
|
|
341
|
+
string field_path = 3 [(.wix.api.maxLength) = 200]; // Field to aggregate by, use dot notation to specify json path.
|
|
342
|
+
oneof kind {
|
|
343
|
+
ValueAggregation value = 4; // Value aggregation.
|
|
344
|
+
RangeAggregation range = 5; // Range aggregation.
|
|
345
|
+
ScalarAggregation scalar = 6; // Scalar aggregation.
|
|
346
|
+
DateHistogramAggregation date_histogram = 9; // Date histogram aggregation.
|
|
347
|
+
NestedAggregation nested = 8; // Nested aggregation.
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// Deprecated. Use `nested` instead.
|
|
351
|
+
GroupByAggregation group_by = 7 [deprecated = true, (.wix.api.field_deprecated) = {replaced_by: "kind.nested", target_removal_date: "2024-03-30"}];
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
message AggregationData {
|
|
355
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData";
|
|
356
|
+
message AggregationResults {
|
|
357
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults";
|
|
358
|
+
message ValueResults {
|
|
359
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.ValueResults";
|
|
360
|
+
message ValueAggregationResult {
|
|
361
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.ValueResults.ValueAggregationResult";
|
|
362
|
+
string value = 1 [(.wix.api.maxLength) = 100]; // Value of the field.
|
|
363
|
+
int32 count = 2; // Count of entities with this value.
|
|
364
|
+
}
|
|
365
|
+
repeated ValueAggregationResult results = 1 [(.wix.api.maxSize) = 250]; // List of value aggregations.
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
message RangeResults {
|
|
369
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.RangeResults";
|
|
370
|
+
message RangeAggregationResult {
|
|
371
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.RangeResults.RangeAggregationResult";
|
|
372
|
+
google.protobuf.DoubleValue from = 1; // Inclusive lower bound of the range.
|
|
373
|
+
google.protobuf.DoubleValue to = 2; // Exclusive upper bound of the range.
|
|
374
|
+
int32 count = 3; // Count of entities in this range.
|
|
375
|
+
}
|
|
376
|
+
repeated RangeAggregationResult results = 1 [(.wix.api.maxSize) = 50]; // List of ranges returned in same order as requested.
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
message ScalarResult {
|
|
380
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.ScalarResult";
|
|
381
|
+
ScalarType type = 1; // Type of scalar aggregation.
|
|
382
|
+
double value = 2; // Value of the scalar aggregation.
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
message GroupByValueResults {
|
|
386
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.GroupByValueResults";
|
|
387
|
+
message NestedValueAggregationResult {
|
|
388
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.GroupByValueResults.NestedValueAggregationResult";
|
|
389
|
+
string value = 1 [(.wix.api.maxLength) = 1000]; // Value of the field.
|
|
390
|
+
NestedAggregationResults nested_results = 2; // Nested aggregations.
|
|
391
|
+
|
|
392
|
+
}
|
|
393
|
+
repeated NestedValueAggregationResult results = 1 [(.wix.api.maxSize) = 1000]; // List of value aggregations.
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
message NestedAggregationResults {
|
|
397
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.NestedAggregationResults";
|
|
398
|
+
string name = 1 [(.wix.api.maxLength) = 100]; // User-defined name of aggregation, matches the one provided in request.
|
|
399
|
+
AggregationType type = 2; // Type of aggregation that matches result.
|
|
400
|
+
string field_path = 6 [(.wix.api.maxLength) = 200]; // Field to aggregate by, matches the one provided in request.
|
|
401
|
+
oneof result {
|
|
402
|
+
ValueResults values = 3; // Value aggregation results.
|
|
403
|
+
RangeResults ranges = 4; // Range aggregation results.
|
|
404
|
+
ScalarResult scalar = 5; // Scalar aggregation results.
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// Results of `NESTED` aggregation type in a flattened form.
|
|
409
|
+
// Aggregations in resulting array are keyed by requested aggregation `name`.
|
|
410
|
+
message NestedResults {
|
|
411
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.NestedResults";
|
|
412
|
+
message ValueResult {
|
|
413
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.NestedResults.ValueResult";
|
|
414
|
+
string value = 1 [(.wix.api.maxLength) = 1000]; // Value of the field.
|
|
415
|
+
google.protobuf.Int32Value count = 2; // Count of entities with this value.
|
|
416
|
+
}
|
|
417
|
+
message RangeResult {
|
|
418
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.NestedResults.RangeResult";
|
|
419
|
+
google.protobuf.DoubleValue from = 1; // Inclusive lower bound of the range.
|
|
420
|
+
google.protobuf.DoubleValue to = 2; // Exclusive upper bound of the range.
|
|
421
|
+
google.protobuf.Int32Value count = 3; // Count of entities in this range.
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
message ScalarResult {
|
|
425
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.NestedResults.ScalarResult";
|
|
426
|
+
double value = 1; // Value of the scalar aggregation.
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
message NestedResultValue {
|
|
430
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.NestedResults.NestedResultValue";
|
|
431
|
+
oneof result {
|
|
432
|
+
ValueResult value = 1; // Value aggregation result.
|
|
433
|
+
RangeResult range = 2; // Range aggregation result.
|
|
434
|
+
ScalarResult scalar = 3; // Scalar aggregation result.
|
|
435
|
+
ValueResult date_histogram = 4; // Date histogram aggregation result.
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
message Results {
|
|
440
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.NestedResults.Results";
|
|
441
|
+
map<string, NestedResultValue> results = 1; // List of nested aggregations.
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
repeated Results results = 1 [(.wix.api.maxSize) = 1000]; // List of nested aggregations.
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
message DateHistogramResults {
|
|
448
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.DateHistogramResults";
|
|
449
|
+
message DateHistogramResult {
|
|
450
|
+
option (.wix.api.decomposite_of) = "wix.common.AggregationData.AggregationResults.DateHistogramResults.DateHistogramResult";
|
|
451
|
+
string value = 1 [(.wix.api.maxLength) = 100]; // Date in ISO 8601 format.
|
|
452
|
+
int32 count = 2; // Count of documents in the bucket.
|
|
453
|
+
}
|
|
454
|
+
repeated DateHistogramResult results = 1 [(.wix.api.maxSize) = 200]; // List of date histogram aggregations.
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
string name = 1 [(.wix.api.maxLength) = 100]; // User-defined name of aggregation as derived from search request.
|
|
458
|
+
AggregationType type = 2; // Type of aggregation that must match provided kind as derived from search request.
|
|
459
|
+
string field_path = 6 [(.wix.api.maxLength) = 200]; // Field to aggregate by as derived from search request.
|
|
460
|
+
oneof result {
|
|
461
|
+
ValueResults values = 3; // Value aggregation results.
|
|
462
|
+
RangeResults ranges = 4; // Range aggregation results.
|
|
463
|
+
ScalarResult scalar = 5; // Scalar aggregation results.
|
|
464
|
+
GroupByValueResults grouped_by_value = 7; // Group by value aggregation results.
|
|
465
|
+
DateHistogramResults date_histogram = 8; // Date histogram aggregation results.
|
|
466
|
+
NestedResults nested = 9; // Nested aggregation results.
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
repeated AggregationResults results = 1 [(.wix.api.maxSize) = 10000]; // key = aggregation name (as derived from search request).
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/*
|
|
474
|
+
// Usage example in response composition:
|
|
475
|
+
message ProductSearchResponse {
|
|
476
|
+
option (.wix.api.decomposite_of) = "wix.common.ProductSearchResponse";
|
|
477
|
+
AggregationData aggregations = 1;
|
|
478
|
+
PagingMetadataV2 metadata = 2;
|
|
479
|
+
repeated Product products = 3;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// example Value type Request:
|
|
483
|
+
{
|
|
484
|
+
search: {
|
|
485
|
+
expression: "term"
|
|
486
|
+
},
|
|
487
|
+
aggregations: [
|
|
488
|
+
{
|
|
489
|
+
name: "my-value-aggregation",
|
|
490
|
+
type: "VALUE",
|
|
491
|
+
fieldPath: "path.to.field",
|
|
492
|
+
value: {
|
|
493
|
+
sort_type: "VALUE",
|
|
494
|
+
sort_direction: "DESC",
|
|
495
|
+
limit: 15
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
// example Value type Response:
|
|
502
|
+
{
|
|
503
|
+
aggregations: {
|
|
504
|
+
results: [
|
|
505
|
+
{
|
|
506
|
+
name: "my-value-aggregation",
|
|
507
|
+
type: "VALUE",
|
|
508
|
+
values: {
|
|
509
|
+
results: [
|
|
510
|
+
{
|
|
511
|
+
value: "v1",
|
|
512
|
+
count: 9
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
value: "v2",
|
|
516
|
+
count: 6
|
|
517
|
+
}
|
|
518
|
+
]
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
]
|
|
522
|
+
},
|
|
523
|
+
metadata: {
|
|
524
|
+
items: 25,
|
|
525
|
+
offset: 25,
|
|
526
|
+
total: 420,
|
|
527
|
+
tooManyToCount: false,
|
|
528
|
+
cursors: {
|
|
529
|
+
next: "SOMEHASHFORNEXT",
|
|
530
|
+
prev: "SOMEHASHFORPREV"
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
products: [...]
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
// example Range type Request:
|
|
537
|
+
{
|
|
538
|
+
search: {
|
|
539
|
+
expression: "term"
|
|
540
|
+
},
|
|
541
|
+
aggregations: [
|
|
542
|
+
{
|
|
543
|
+
name: "my-range-aggregation",
|
|
544
|
+
type: "RANGE",
|
|
545
|
+
fieldPath: "path.to.field",
|
|
546
|
+
range: {
|
|
547
|
+
buckets: [
|
|
548
|
+
{
|
|
549
|
+
to: 10
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
from: 10,
|
|
553
|
+
to: 20
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
from: 20
|
|
557
|
+
}
|
|
558
|
+
]
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
]
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
// example Range type Response:
|
|
565
|
+
{
|
|
566
|
+
aggregations: {
|
|
567
|
+
results: [
|
|
568
|
+
{
|
|
569
|
+
name: "my-range-aggregation",
|
|
570
|
+
type: "RANGE",
|
|
571
|
+
ranges: {
|
|
572
|
+
results: [
|
|
573
|
+
{
|
|
574
|
+
to: 10,
|
|
575
|
+
count: 5
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
from: 10,
|
|
579
|
+
to: 20,
|
|
580
|
+
count: 3
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
from: 20,
|
|
584
|
+
count: 1
|
|
585
|
+
}
|
|
586
|
+
]
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
]
|
|
590
|
+
},
|
|
591
|
+
metadata: {
|
|
592
|
+
items: 25,
|
|
593
|
+
offset: 25,
|
|
594
|
+
total: 420,
|
|
595
|
+
tooManyToCount: false,
|
|
596
|
+
cursors: {
|
|
597
|
+
next: "SOMEHASHFORNEXT",
|
|
598
|
+
prev: "SOMEHASHFORPREV"
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
products: [...]
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
// example Scalar type Request:
|
|
605
|
+
{
|
|
606
|
+
search: {
|
|
607
|
+
expression: "term"
|
|
608
|
+
},
|
|
609
|
+
aggregations: [
|
|
610
|
+
{
|
|
611
|
+
name: "my-scalar-aggregation",
|
|
612
|
+
type: "SCALAR",
|
|
613
|
+
fieldPath: "path.to.field",
|
|
614
|
+
scalar: {
|
|
615
|
+
type: "AVG"
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
// example Scalar type Response:
|
|
622
|
+
{
|
|
623
|
+
aggregations: {
|
|
624
|
+
results: [
|
|
625
|
+
{
|
|
626
|
+
name: "my-scalar-agregation",
|
|
627
|
+
type: "SCALAR",
|
|
628
|
+
scalar: {
|
|
629
|
+
type: "AVG",
|
|
630
|
+
value: 5.555
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
metadata: {
|
|
636
|
+
items: 25,
|
|
637
|
+
offset: 25,
|
|
638
|
+
total: 420,
|
|
639
|
+
tooManyToCount: false,
|
|
640
|
+
cursors: {
|
|
641
|
+
next: "SOMEHASHFORNEXT",
|
|
642
|
+
prev: "SOMEHASHFORPREV"
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
products: [...]
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// example Group By Aggregation Request:
|
|
649
|
+
{
|
|
650
|
+
"filter" : {
|
|
651
|
+
"region" : "EU"
|
|
652
|
+
},
|
|
653
|
+
"aggregations" : [ {
|
|
654
|
+
"name" : "production countries",
|
|
655
|
+
"type" : "VALUE",
|
|
656
|
+
"fieldPath" : "production_countries",
|
|
657
|
+
"value" : {
|
|
658
|
+
"limit" : 5
|
|
659
|
+
},
|
|
660
|
+
"groupBy" : {
|
|
661
|
+
"name" : "production companies",
|
|
662
|
+
"fieldPath" : "production_companies",
|
|
663
|
+
"value" : { }
|
|
664
|
+
}
|
|
665
|
+
} ]
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
// example Group By Aggregation Response:
|
|
669
|
+
{
|
|
670
|
+
"aggregations" : {
|
|
671
|
+
"results" : [ {
|
|
672
|
+
"name" : "production companies",
|
|
673
|
+
"type" : "VALUE",
|
|
674
|
+
"fieldPath" : "production_companies",
|
|
675
|
+
"groupedByValue" : {
|
|
676
|
+
"results" : [ {
|
|
677
|
+
"value" : "Warner Bros.",
|
|
678
|
+
"nestedResults" : {
|
|
679
|
+
"name" : "production countries",
|
|
680
|
+
"type" : "VALUE",
|
|
681
|
+
"fieldPath" : "production_countries",
|
|
682
|
+
"values" : {
|
|
683
|
+
"results" : [ {
|
|
684
|
+
"value" : "GB",
|
|
685
|
+
"count" : 221
|
|
686
|
+
}, {
|
|
687
|
+
"value" : "PL",
|
|
688
|
+
"count" : 12
|
|
689
|
+
} ]
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}, {
|
|
693
|
+
"value" : "Metro-Goldwyn-Mayer (MGM)",
|
|
694
|
+
"nestedResults" : {
|
|
695
|
+
"name" : "production countries",
|
|
696
|
+
"type" : "VALUE",
|
|
697
|
+
"fieldPath" : "production_countries",
|
|
698
|
+
"values" : {
|
|
699
|
+
"results" : [ {
|
|
700
|
+
"value" : "SWE",
|
|
701
|
+
"count" : 24
|
|
702
|
+
}, {
|
|
703
|
+
"value" : "FR",
|
|
704
|
+
"count" : 18
|
|
705
|
+
}, {
|
|
706
|
+
"value" : "LT",
|
|
707
|
+
"count" : 2
|
|
708
|
+
} ]
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
} ]
|
|
712
|
+
}
|
|
713
|
+
} ]
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// example of 2-level nested aggregation request:
|
|
718
|
+
{
|
|
719
|
+
"filter" : {
|
|
720
|
+
"region" : "EU"
|
|
721
|
+
},
|
|
722
|
+
"aggregations" : [ {
|
|
723
|
+
"name" : "my nested",
|
|
724
|
+
"type" : "NESTED",
|
|
725
|
+
"nested" : {
|
|
726
|
+
"nestedAggregations" : [ {
|
|
727
|
+
"name" : "daily",
|
|
728
|
+
"type" : "DATE_HISTOGRAM",
|
|
729
|
+
"fieldPath" : "date_updated",
|
|
730
|
+
"dateHistogram" : {
|
|
731
|
+
"interval" : "DAY"
|
|
732
|
+
}
|
|
733
|
+
}, {
|
|
734
|
+
"name" : "inventory status",
|
|
735
|
+
"type" : "VALUE",
|
|
736
|
+
"fieldPath" : "status",
|
|
737
|
+
"value" : { }
|
|
738
|
+
}, {
|
|
739
|
+
"name" : "sum",
|
|
740
|
+
"type" : "SCALAR",
|
|
741
|
+
"fieldPath" : "price",
|
|
742
|
+
"scalar" : {
|
|
743
|
+
"type" : "SUM"
|
|
744
|
+
}
|
|
745
|
+
} ]
|
|
746
|
+
}
|
|
747
|
+
} ]
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
// example of 2-level nested aggregation response:
|
|
751
|
+
{
|
|
752
|
+
"aggregations" : {
|
|
753
|
+
"results" : [ {
|
|
754
|
+
"name" : "my nested",
|
|
755
|
+
"type" : "NESTED",
|
|
756
|
+
"fieldPath" : "DUNNO WHAT TO DO WITH THIS",
|
|
757
|
+
"nested" : {
|
|
758
|
+
"results" : [ {
|
|
759
|
+
"results" : {
|
|
760
|
+
"daily" : {
|
|
761
|
+
"dateHistogram" : {
|
|
762
|
+
"value" : "2023.1.1"
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
"inventory status" : {
|
|
766
|
+
"value" : {
|
|
767
|
+
"value" : "SOLD",
|
|
768
|
+
"count" : 12
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
"sum" : {
|
|
772
|
+
"scalar" : {
|
|
773
|
+
"value" : 10.0
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}, {
|
|
778
|
+
"results" : {
|
|
779
|
+
"daily" : {
|
|
780
|
+
"dateHistogram" : {
|
|
781
|
+
"value" : "2023.1.1"
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
"inventory status" : {
|
|
785
|
+
"value" : {
|
|
786
|
+
"value" : "NOT-SOLD",
|
|
787
|
+
"count" : 13
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
"sum" : {
|
|
791
|
+
"scalar" : {
|
|
792
|
+
"value" : 5.0
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}, {
|
|
797
|
+
"results" : {
|
|
798
|
+
"daily" : {
|
|
799
|
+
"dateHistogram" : {
|
|
800
|
+
"value" : "2023.1.2"
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
"inventory status" : {
|
|
804
|
+
"value" : {
|
|
805
|
+
"value" : "SOLD",
|
|
806
|
+
"count" : 5
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
"sum" : {
|
|
810
|
+
"scalar" : {
|
|
811
|
+
"value" : 10.0
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}, {
|
|
816
|
+
"results" : {
|
|
817
|
+
"daily" : {
|
|
818
|
+
"dateHistogram" : {
|
|
819
|
+
"value" : "2023.1.2"
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
"inventory status" : {
|
|
823
|
+
"value" : {
|
|
824
|
+
"value" : "NOT-SOLD",
|
|
825
|
+
"count" : 7
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
"sum" : {
|
|
829
|
+
"scalar" : {
|
|
830
|
+
"value" : 10.0
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
} ]
|
|
835
|
+
}
|
|
836
|
+
} ]
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
*/
|