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