@wix/auto_sdk_bookings_services 1.0.64 → 1.0.65

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.
@@ -1894,48 +1894,61 @@ interface PagingMetadataV2 {
1894
1894
  }
1895
1895
  interface Cursors {
1896
1896
  /**
1897
- * Cursor pointing to next page in the list of results.
1897
+ * Cursor token for retrieving the next page of results.
1898
+ *
1899
+ * Use this token in subsequent requests to continue pagination forward.
1900
+ * Value is `null` when on the last page of results.
1898
1901
  * @maxLength 16000
1899
1902
  */
1900
1903
  next?: string | null;
1901
1904
  /**
1902
- * Cursor pointing to previous page in the list of results.
1905
+ * Cursor token for retrieving the previous page of results.
1906
+ *
1907
+ * Use this token to navigate backwards through result pages.
1908
+ * Value is `null` when on the first page of results.
1903
1909
  * @maxLength 16000
1904
1910
  */
1905
1911
  prev?: string | null;
1906
1912
  }
1907
1913
  interface SearchServicesRequest {
1908
- /** WQL, search or aggregation expression. */
1914
+ /**
1915
+ * Search criteria including filter, sort, aggregations, and paging options.
1916
+ *
1917
+ * Refer to the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)) for complete filter and sorting options.
1918
+ */
1909
1919
  search: CursorSearch;
1910
1920
  }
1911
1921
  interface CursorSearch extends CursorSearchPagingMethodOneOf {
1912
1922
  /**
1913
- * Cursor pointing to page of results.
1914
- * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
1923
+ * Cursor-based paging for result navigation. When requesting `cursor_paging.cursor`,
1924
+ * `filter`, `sort`, or `search` can't be specified.
1915
1925
  */
1916
1926
  cursorPaging?: CursorPaging;
1917
- /** 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) */
1927
+ /**
1928
+ * Filter object for narrowing search results. For example, to return only services with specific payment options: `"filter": {"payment.options.online": true, "payment.options.in_person": false}`.
1929
+ *
1930
+ * Learn more about the filter format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)).
1931
+ */
1918
1932
  filter?: Record<string, any> | null;
1919
1933
  /**
1920
- * Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
1934
+ * Array of sort objects specifying result order. For example, to sort by creation date in descending order: `"sort": [{"fieldName": "createdDate", "order": "DESC"}]`.
1935
+ *
1936
+ * Learn more about the sort format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)).
1921
1937
  * @maxSize 10
1922
1938
  */
1923
1939
  sort?: Sorting[];
1924
1940
  /**
1925
- * 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.
1941
+ * Aggregations for grouping data into categories (facets) and providing summaries for each category.
1942
+ * For example, use aggregations to categorize search results by service type, payment options, or locations.
1926
1943
  * @maxSize 10
1927
1944
  */
1928
1945
  aggregations?: Aggregation[];
1929
- /** Free text to match in searchable fields */
1946
+ /** Free text to match in searchable fields. */
1930
1947
  search?: SearchDetails;
1931
1948
  /**
1932
- * UTC offset or IANA time zone. Valid values are
1933
- * ISO 8601 UTC offsets, such as +02:00 or -06:00,
1934
- * and IANA time zone IDs, such as Europe/Rome
1949
+ * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) or [ISO 8601 UTC offset format](https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC) for adjusting time fields in the specified filters and returned aggregation data. For example, `America/New_York`, `UTC`, or `+02:00`.
1935
1950
  *
1936
- * Affects all filters and aggregations returned values.
1937
- * You may override this behavior in a specific filter by providing
1938
- * timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
1951
+ * Default: Time zone specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).
1939
1952
  * @maxLength 50
1940
1953
  */
1941
1954
  timeZone?: string | null;
@@ -1943,37 +1956,37 @@ interface CursorSearch extends CursorSearchPagingMethodOneOf {
1943
1956
  /** @oneof */
1944
1957
  interface CursorSearchPagingMethodOneOf {
1945
1958
  /**
1946
- * Cursor pointing to page of results.
1947
- * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
1959
+ * Cursor-based paging for result navigation. When requesting `cursor_paging.cursor`,
1960
+ * `filter`, `sort`, or `search` can't be specified.
1948
1961
  */
1949
1962
  cursorPaging?: CursorPaging;
1950
1963
  }
1951
1964
  interface Aggregation extends AggregationKindOneOf {
1952
- /** Value aggregation */
1965
+ /** Value aggregation configuration. */
1953
1966
  value?: ValueAggregation;
1954
- /** Range aggregation */
1967
+ /** Range aggregation configuration. */
1955
1968
  range?: RangeAggregation;
1956
- /** Scalar aggregation */
1969
+ /** Scalar aggregation configuration. */
1957
1970
  scalar?: ScalarAggregation;
1958
- /** Date histogram aggregation */
1971
+ /** Date histogram aggregation configuration. */
1959
1972
  dateHistogram?: DateHistogramAggregation;
1960
- /** Nested aggregation */
1973
+ /** Nested aggregation configuration. */
1961
1974
  nested?: NestedAggregation;
1962
1975
  /**
1963
- * User-defined name of aggregation, should be unique, will appear in aggregation results
1976
+ * User-defined name of aggregation. Must be unique and will appear in aggregation results.
1964
1977
  * @maxLength 100
1965
1978
  */
1966
1979
  name?: string | null;
1967
- /** Type of aggregation, client must provide matching aggregation field below */
1980
+ /** Type of aggregation. Client must specify matching aggregation field below. */
1968
1981
  type?: AggregationTypeWithLiterals;
1969
1982
  /**
1970
- * Field to aggregate by, use dot notation to specify json path
1983
+ * Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`.
1971
1984
  * @maxLength 200
1972
1985
  */
1973
1986
  fieldPath?: string;
1974
1987
  /**
1975
- * deprecated, use `nested` instead
1976
- * @deprecated deprecated, use `nested` instead
1988
+ * Deprecated, use `nested` instead.
1989
+ * @deprecated Deprecated, use `nested` instead.
1977
1990
  * @replacedBy kind.nested
1978
1991
  * @targetRemovalDate 2025-01-01
1979
1992
  */
@@ -1981,21 +1994,21 @@ interface Aggregation extends AggregationKindOneOf {
1981
1994
  }
1982
1995
  /** @oneof */
1983
1996
  interface AggregationKindOneOf {
1984
- /** Value aggregation */
1997
+ /** Value aggregation configuration. */
1985
1998
  value?: ValueAggregation;
1986
- /** Range aggregation */
1999
+ /** Range aggregation configuration. */
1987
2000
  range?: RangeAggregation;
1988
- /** Scalar aggregation */
2001
+ /** Scalar aggregation configuration. */
1989
2002
  scalar?: ScalarAggregation;
1990
- /** Date histogram aggregation */
2003
+ /** Date histogram aggregation configuration. */
1991
2004
  dateHistogram?: DateHistogramAggregation;
1992
- /** Nested aggregation */
2005
+ /** Nested aggregation configuration. */
1993
2006
  nested?: NestedAggregation;
1994
2007
  }
1995
2008
  interface RangeBucket {
1996
- /** Inclusive lower bound of the range. Required if to is not given. */
2009
+ /** Inclusive lower bound of the range. Required if `to` isn't specified. */
1997
2010
  from?: number | null;
1998
- /** Exclusive upper bound of the range. Required if from is not given. */
2011
+ /** Exclusive upper bound of the range. Required if `from` isn't specified. */
1999
2012
  to?: number | null;
2000
2013
  }
2001
2014
  declare enum SortType {
@@ -2018,58 +2031,80 @@ declare enum MissingValues {
2018
2031
  type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
2019
2032
  interface IncludeMissingValuesOptions {
2020
2033
  /**
2021
- * can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
2034
+ * Custom bucket name for missing values.
2035
+ *
2036
+ * Default values:
2037
+ * - string: `N/A`
2038
+ * - int: `0`
2039
+ * - bool: `false`
2022
2040
  * @maxLength 20
2023
2041
  */
2024
2042
  addToBucket?: string;
2025
2043
  }
2026
2044
  declare enum ScalarType {
2027
2045
  UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
2046
+ /** Total number of distinct values. */
2028
2047
  COUNT_DISTINCT = "COUNT_DISTINCT",
2048
+ /** Minimum value. */
2029
2049
  MIN = "MIN",
2050
+ /** Maximum value. */
2030
2051
  MAX = "MAX"
2031
2052
  }
2032
2053
  /** @enumType */
2033
2054
  type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
2034
2055
  interface ValueAggregation extends ValueAggregationOptionsOneOf {
2035
- /** options for including missing values */
2056
+ /** Options for including missing values in the aggregation results. */
2036
2057
  includeOptions?: IncludeMissingValuesOptions;
2037
- /** Should sort by number of matches or value of the field */
2058
+ /** Whether to sort by number of matches or value of the field. */
2038
2059
  sortType?: SortTypeWithLiterals;
2039
- /** Should sort in ascending or descending order */
2060
+ /** Whether to sort in ascending or descending order. */
2040
2061
  sortDirection?: SortDirectionWithLiterals;
2041
- /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
2062
+ /**
2063
+ * Number of aggregations to return.
2064
+ *
2065
+ * Min: `1`
2066
+ * Max: `250`
2067
+ * Default: `10`
2068
+ */
2042
2069
  limit?: number | null;
2043
- /** should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
2070
+ /**
2071
+ * Whether missing values should be included or excluded from the aggregation results.
2072
+ *
2073
+ * Default: `EXCLUDE`
2074
+ */
2044
2075
  missingValues?: MissingValuesWithLiterals;
2045
2076
  }
2046
2077
  /** @oneof */
2047
2078
  interface ValueAggregationOptionsOneOf {
2048
- /** options for including missing values */
2079
+ /** Options for including missing values in the aggregation results. */
2049
2080
  includeOptions?: IncludeMissingValuesOptions;
2050
2081
  }
2051
2082
  declare enum NestedAggregationType {
2052
2083
  UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
2084
+ /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */
2053
2085
  VALUE = "VALUE",
2086
+ /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */
2054
2087
  RANGE = "RANGE",
2088
+ /** Calculates a single numerical value from a dataset, summarizing the dataset into 1 key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
2055
2089
  SCALAR = "SCALAR",
2090
+ /** Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). */
2056
2091
  DATE_HISTOGRAM = "DATE_HISTOGRAM"
2057
2092
  }
2058
2093
  /** @enumType */
2059
2094
  type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
2060
2095
  interface RangeAggregation {
2061
2096
  /**
2062
- * Range buckets
2097
+ * List of range buckets defining the ranges for aggregation. During aggregation, each entity is placed in the first bucket where its value falls within the specified range bounds.
2063
2098
  * @maxSize 50
2064
2099
  */
2065
2100
  buckets?: RangeBucket[];
2066
2101
  }
2067
2102
  interface ScalarAggregation {
2068
- /** Define the operator for the scalar aggregation */
2103
+ /** Operator for the scalar aggregation, for example `COUNT_DISTINCT`, `MIN`, `MAX`. */
2069
2104
  type?: ScalarTypeWithLiterals;
2070
2105
  }
2071
2106
  interface DateHistogramAggregation {
2072
- /** Interval for date histogram aggregation */
2107
+ /** Time interval for date histogram aggregation, for example `DAY`, `HOUR`, `MONTH`. */
2073
2108
  interval?: IntervalWithLiterals;
2074
2109
  }
2075
2110
  declare enum Interval {
@@ -2093,322 +2128,355 @@ declare enum Interval {
2093
2128
  /** @enumType */
2094
2129
  type IntervalWithLiterals = Interval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
2095
2130
  interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
2096
- /** Value aggregation */
2131
+ /** Value aggregation configuration. Calculates the distribution of field values within the dataset. */
2097
2132
  value?: ValueAggregation;
2098
- /** Range aggregation */
2133
+ /** Range aggregation configuration. Calculates counts within user-defined value ranges. */
2099
2134
  range?: RangeAggregation;
2100
- /** Scalar aggregation */
2135
+ /** Scalar aggregation configuration. Calculates single numerical metrics like count, min, max, sum, or average. */
2101
2136
  scalar?: ScalarAggregation;
2102
- /** Date histogram aggregation */
2137
+ /** Date histogram aggregation configuration. Calculates counts within time intervals. */
2103
2138
  dateHistogram?: DateHistogramAggregation;
2104
2139
  /**
2105
- * User-defined name of aggregation, should be unique, will appear in aggregation results
2140
+ * User-defined name of aggregation. Must be unique and will appear in aggregation results.
2106
2141
  * @maxLength 100
2107
2142
  */
2108
2143
  name?: string | null;
2109
- /** Type of aggregation, client must provide matching aggregation field below */
2144
+ /** Type of aggregation. Client must specify matching aggregation field below. */
2110
2145
  type?: NestedAggregationTypeWithLiterals;
2111
2146
  /**
2112
- * Field to aggregate by, use dont notation to specify json path
2147
+ * Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`.
2113
2148
  * @maxLength 200
2114
2149
  */
2115
2150
  fieldPath?: string;
2116
2151
  }
2117
2152
  /** @oneof */
2118
2153
  interface NestedAggregationItemKindOneOf {
2119
- /** Value aggregation */
2154
+ /** Value aggregation configuration. Calculates the distribution of field values within the dataset. */
2120
2155
  value?: ValueAggregation;
2121
- /** Range aggregation */
2156
+ /** Range aggregation configuration. Calculates counts within user-defined value ranges. */
2122
2157
  range?: RangeAggregation;
2123
- /** Scalar aggregation */
2158
+ /** Scalar aggregation configuration. Calculates single numerical metrics like count, min, max, sum, or average. */
2124
2159
  scalar?: ScalarAggregation;
2125
- /** Date histogram aggregation */
2160
+ /** Date histogram aggregation configuration. Calculates counts within time intervals. */
2126
2161
  dateHistogram?: DateHistogramAggregation;
2127
2162
  }
2128
2163
  declare enum AggregationType {
2129
2164
  UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
2165
+ /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */
2130
2166
  VALUE = "VALUE",
2167
+ /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */
2131
2168
  RANGE = "RANGE",
2169
+ /** Calculates a single numerical value from a dataset, summarizing the dataset into 1 key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
2132
2170
  SCALAR = "SCALAR",
2171
+ /** Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). */
2133
2172
  DATE_HISTOGRAM = "DATE_HISTOGRAM",
2173
+ /** Flattened list of aggregations, where each aggregation is nested within previous 1. */
2134
2174
  NESTED = "NESTED"
2135
2175
  }
2136
2176
  /** @enumType */
2137
2177
  type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
2138
- /** nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
2178
+ /** Nested aggregation for multi-level faceted search. Allows exploring large amounts of data through multiple levels of categorization, where each subsequent aggregation is nested within the previous aggregation to create hierarchical data summaries. */
2139
2179
  interface NestedAggregation {
2140
2180
  /**
2141
- * Flattened list of aggregations, where each next aggregation is nested within previous one
2181
+ * Flattened list of aggregations where each next aggregation is nested within the previous 1.
2142
2182
  * @minSize 2
2143
2183
  * @maxSize 10
2144
2184
  */
2145
2185
  nestedAggregations?: NestedAggregationItem[];
2146
2186
  }
2147
2187
  interface GroupByAggregation extends GroupByAggregationKindOneOf {
2148
- /** Value aggregation configuration */
2188
+ /** Value aggregation configuration. */
2149
2189
  value?: ValueAggregation;
2150
2190
  /**
2151
- * User-defined name of aggregation, should be unique, will appear in aggregation results
2191
+ * User-defined name of aggregation. Must be unique and will appear in aggregation results.
2152
2192
  * @maxLength 100
2153
2193
  */
2154
2194
  name?: string | null;
2155
2195
  /**
2156
- * Field to aggregate by
2196
+ * Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`.
2157
2197
  * @maxLength 200
2158
2198
  */
2159
2199
  fieldPath?: string;
2160
2200
  }
2161
2201
  /** @oneof */
2162
2202
  interface GroupByAggregationKindOneOf {
2163
- /** Value aggregation configuration */
2203
+ /** Value aggregation configuration. */
2164
2204
  value?: ValueAggregation;
2165
2205
  }
2166
2206
  interface SearchDetails {
2167
- /** Boolean search mode */
2207
+ /** Search mode. Defines the search logic for combining multiple terms in the `expression`. */
2168
2208
  mode?: ModeWithLiterals;
2169
2209
  /**
2170
- * Search term or expression
2210
+ * Search term or expression.
2171
2211
  * @maxLength 200
2172
2212
  */
2173
2213
  expression?: string | null;
2174
2214
  /**
2175
- * Fields to search in. If empty - server will search in own default fields
2215
+ * Fields to search in. If the array is empty, all searchable fields are searched. Use dot notation to specify a JSON path. For example, `order.address.streetName`.
2176
2216
  * @maxSize 10
2177
2217
  * @maxLength 200
2178
2218
  */
2179
2219
  fields?: string[];
2180
- /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
2220
+ /** Whether to enable the search function to use an algorithm to automatically find results that are close to the search expression, such as typos and declensions. */
2181
2221
  fuzzy?: boolean;
2182
2222
  }
2183
2223
  declare enum Mode {
2184
- /** Any */
2224
+ /** At least 1 of the search terms must be present. */
2185
2225
  OR = "OR",
2186
- /** All */
2226
+ /** All search terms must be present. */
2187
2227
  AND = "AND"
2188
2228
  }
2189
2229
  /** @enumType */
2190
2230
  type ModeWithLiterals = Mode | 'OR' | 'AND';
2191
2231
  interface SearchServicesResponse {
2192
- /** The retrieved services. */
2232
+ /**
2233
+ * Retrieved services that match the search criteria specified in the request.
2234
+ *
2235
+ * Each service includes all standard service information including name, description,
2236
+ * pricing details, location options, schedule information, and payment configuration.
2237
+ */
2193
2238
  services?: Service[];
2194
- /** Cursor paging metadata */
2239
+ /**
2240
+ * Cursor-based paging metadata for navigating search results.
2241
+ *
2242
+ * Contains the current page's cursor information, whether there are more results available,
2243
+ * and count details. Use the `next` cursor to retrieve subsequent pages of results.
2244
+ */
2195
2245
  pagingMetadata?: CursorPagingMetadata;
2196
- /** Response aggregation data */
2246
+ /**
2247
+ * Aggregation results based on the aggregations specified in the search request.
2248
+ *
2249
+ * Provides categorized data summaries such as service counts by type, location distribution,
2250
+ * payment method statistics, or custom aggregations. Available only when aggregations
2251
+ * are requested in the search criteria.
2252
+ */
2197
2253
  aggregationData?: AggregationData;
2198
2254
  }
2199
2255
  interface CursorPagingMetadata {
2200
- /** Number of items returned in the response. */
2256
+ /**
2257
+ * Number of items returned in the current response page.
2258
+ *
2259
+ * This count reflects the actual number of items in the current result set,
2260
+ * which may be less than the requested limit if fewer items are available.
2261
+ */
2201
2262
  count?: number | null;
2202
- /** Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */
2263
+ /**
2264
+ * Navigation cursors for moving between result pages.
2265
+ *
2266
+ * Contains `next` and `prev` cursor tokens for pagination. Use the `next` cursor
2267
+ * to retrieve subsequent pages and `prev` cursor to go back to previous pages.
2268
+ * Learn more about cursor paging in the [API Query Language guide](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging).
2269
+ */
2203
2270
  cursors?: Cursors;
2204
2271
  /**
2205
- * Indicates if there are more results after the current page.
2206
- * If `true`, another page of results can be retrieved.
2207
- * If `false`, this is the last page.
2272
+ * Indicates whether additional results are available beyond the current page.
2273
+ *
2274
+ * - `true`: More results exist and can be retrieved using the `next` cursor.
2275
+ * - `false`: This is the final page of results.
2208
2276
  */
2209
2277
  hasNext?: boolean | null;
2210
2278
  }
2211
2279
  interface AggregationData {
2212
2280
  /**
2213
- * key = aggregation name (as derived from search request)
2281
+ * Array of aggregation results, each containing the aggregation metadata and its calculated values for the specified search criteria.
2214
2282
  * @maxSize 10000
2215
2283
  */
2216
2284
  results?: AggregationResults[];
2217
2285
  }
2218
2286
  interface ValueAggregationResult {
2219
2287
  /**
2220
- * Value of the field
2288
+ * Value of the field.
2221
2289
  * @maxLength 100
2222
2290
  */
2223
2291
  value?: string;
2224
- /** Count of entities with this value */
2292
+ /** Count of entities with this value. */
2225
2293
  count?: number;
2226
2294
  }
2227
2295
  interface RangeAggregationResult {
2228
- /** Inclusive lower bound of the range */
2296
+ /** Inclusive lower bound of the range. */
2229
2297
  from?: number | null;
2230
- /** Exclusive upper bound of the range */
2298
+ /** Exclusive upper bound of the range. */
2231
2299
  to?: number | null;
2232
- /** Count of entities in this range */
2300
+ /** Count of entities in this range. */
2233
2301
  count?: number;
2234
2302
  }
2235
2303
  interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
2236
- /** Value aggregation results */
2304
+ /** Value aggregation results. */
2237
2305
  values?: ValueResults;
2238
- /** Range aggregation results */
2306
+ /** Range aggregation results. */
2239
2307
  ranges?: RangeResults;
2240
- /** Scalar aggregation results */
2308
+ /** Scalar aggregation results. */
2241
2309
  scalar?: AggregationResultsScalarResult;
2242
2310
  /**
2243
- * User-defined name of aggregation, matches the one provided in request
2311
+ * User-defined name of aggregation, matches the one specified in request.
2244
2312
  * @maxLength 100
2245
2313
  */
2246
2314
  name?: string;
2247
- /** Type of aggregation that matches result */
2315
+ /** Type of aggregation that matches result. */
2248
2316
  type?: AggregationTypeWithLiterals;
2249
2317
  /**
2250
- * Field to aggregate by, matches the one provided in request
2318
+ * Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`.
2251
2319
  * @maxLength 200
2252
2320
  */
2253
2321
  fieldPath?: string;
2254
2322
  }
2255
2323
  /** @oneof */
2256
2324
  interface NestedAggregationResultsResultOneOf {
2257
- /** Value aggregation results */
2325
+ /** Value aggregation results. */
2258
2326
  values?: ValueResults;
2259
- /** Range aggregation results */
2327
+ /** Range aggregation results. */
2260
2328
  ranges?: RangeResults;
2261
- /** Scalar aggregation results */
2329
+ /** Scalar aggregation results. */
2262
2330
  scalar?: AggregationResultsScalarResult;
2263
2331
  }
2264
2332
  interface ValueResults {
2265
2333
  /**
2266
- * List of value aggregations
2334
+ * Array of value aggregation results, each containing a field value and the count of entities with that value.
2267
2335
  * @maxSize 250
2268
2336
  */
2269
2337
  results?: ValueAggregationResult[];
2270
2338
  }
2271
2339
  interface RangeResults {
2272
2340
  /**
2273
- * List of ranges returned in same order as requested
2341
+ * Array of range aggregation results returned in the same order as requested, each containing range bounds and count of entities within that range.
2274
2342
  * @maxSize 50
2275
2343
  */
2276
2344
  results?: RangeAggregationResult[];
2277
2345
  }
2278
2346
  interface AggregationResultsScalarResult {
2279
- /** Type of scalar aggregation */
2347
+ /** Type of scalar aggregation. */
2280
2348
  type?: ScalarTypeWithLiterals;
2281
- /** Value of the scalar aggregation */
2349
+ /** Value of the scalar aggregation. */
2282
2350
  value?: number;
2283
2351
  }
2284
2352
  interface NestedValueAggregationResult {
2285
2353
  /**
2286
- * Value of the field
2354
+ * Value of the field.
2287
2355
  * @maxLength 1000
2288
2356
  */
2289
2357
  value?: string;
2290
- /** Nested aggregations */
2358
+ /** Nested aggregations. */
2291
2359
  nestedResults?: NestedAggregationResults;
2292
2360
  }
2293
2361
  interface ValueResult {
2294
2362
  /**
2295
- * Value of the field
2363
+ * Value of the field.
2296
2364
  * @maxLength 1000
2297
2365
  */
2298
2366
  value?: string;
2299
- /** Count of entities with this value */
2367
+ /** Count of entities with this value. */
2300
2368
  count?: number | null;
2301
2369
  }
2302
2370
  interface RangeResult {
2303
- /** Inclusive lower bound of the range */
2371
+ /** Inclusive lower bound of the range. */
2304
2372
  from?: number | null;
2305
- /** Exclusive upper bound of the range */
2373
+ /** Exclusive upper bound of the range. */
2306
2374
  to?: number | null;
2307
- /** Count of entities in this range */
2375
+ /** Count of entities in this range. */
2308
2376
  count?: number | null;
2309
2377
  }
2310
2378
  interface ScalarResult {
2311
- /** Value of the scalar aggregation */
2379
+ /** Value of the scalar aggregation. */
2312
2380
  value?: number;
2313
2381
  }
2314
2382
  interface NestedResultValue extends NestedResultValueResultOneOf {
2315
- /** Value aggregation result */
2383
+ /** Value aggregation result. */
2316
2384
  value?: ValueResult;
2317
- /** Range aggregation result */
2385
+ /** Range aggregation result. */
2318
2386
  range?: RangeResult;
2319
- /** Scalar aggregation result */
2387
+ /** Scalar aggregation result. */
2320
2388
  scalar?: ScalarResult;
2321
- /** Date histogram aggregation result */
2389
+ /** Date histogram aggregation result. */
2322
2390
  dateHistogram?: ValueResult;
2323
2391
  }
2324
2392
  /** @oneof */
2325
2393
  interface NestedResultValueResultOneOf {
2326
- /** Value aggregation result */
2394
+ /** Value aggregation result. */
2327
2395
  value?: ValueResult;
2328
- /** Range aggregation result */
2396
+ /** Range aggregation result. */
2329
2397
  range?: RangeResult;
2330
- /** Scalar aggregation result */
2398
+ /** Scalar aggregation result. */
2331
2399
  scalar?: ScalarResult;
2332
- /** Date histogram aggregation result */
2400
+ /** Date histogram aggregation result. */
2333
2401
  dateHistogram?: ValueResult;
2334
2402
  }
2335
2403
  interface Results {
2336
- /** List of nested aggregations */
2404
+ /** Map of nested aggregation results, keyed by aggregation name. */
2337
2405
  results?: Record<string, NestedResultValue>;
2338
2406
  }
2339
2407
  interface DateHistogramResult {
2340
2408
  /**
2341
- * Date in ISO 8601 format
2409
+ * Date in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601).
2342
2410
  * @maxLength 100
2343
2411
  */
2344
2412
  value?: string;
2345
- /** Count of documents in the bucket */
2413
+ /** Count of documents in the bucket. */
2346
2414
  count?: number;
2347
2415
  }
2348
2416
  interface GroupByValueResults {
2349
2417
  /**
2350
- * List of value aggregations
2418
+ * Array of nested value aggregation results, each containing a field value and the associated nested aggregation data.
2351
2419
  * @maxSize 1000
2352
2420
  */
2353
2421
  results?: NestedValueAggregationResult[];
2354
2422
  }
2355
2423
  interface DateHistogramResults {
2356
2424
  /**
2357
- * List of date histogram aggregations
2425
+ * Array of date histogram aggregation results, each containing a date bucket and its count.
2358
2426
  * @maxSize 200
2359
2427
  */
2360
2428
  results?: DateHistogramResult[];
2361
2429
  }
2362
2430
  /**
2363
- * results of `NESTED` aggregation type in a flattened form
2364
- * aggregations in resulting array are keyed by requested aggregation `name`.
2431
+ * Results of `NESTED` aggregation type in a flattened form.
2432
+ * Aggregations in resulting array are keyed by requested aggregation `name`.
2365
2433
  */
2366
2434
  interface NestedResults {
2367
2435
  /**
2368
- * List of nested aggregations
2436
+ * Array of nested aggregation result groups, each containing multiple aggregation results.
2369
2437
  * @maxSize 1000
2370
2438
  */
2371
2439
  results?: Results[];
2372
2440
  }
2373
2441
  interface AggregationResults extends AggregationResultsResultOneOf {
2374
- /** Value aggregation results */
2442
+ /** Value aggregation results. */
2375
2443
  values?: ValueResults;
2376
- /** Range aggregation results */
2444
+ /** Range aggregation results. */
2377
2445
  ranges?: RangeResults;
2378
- /** Scalar aggregation results */
2446
+ /** Scalar aggregation results. */
2379
2447
  scalar?: AggregationResultsScalarResult;
2380
- /** Group by value aggregation results */
2448
+ /** Group by value aggregation results. */
2381
2449
  groupedByValue?: GroupByValueResults;
2382
- /** Date histogram aggregation results */
2450
+ /** Date histogram aggregation results. */
2383
2451
  dateHistogram?: DateHistogramResults;
2384
- /** Nested aggregation results */
2452
+ /** Nested aggregation results. */
2385
2453
  nested?: NestedResults;
2386
2454
  /**
2387
- * User-defined name of aggregation as derived from search request
2455
+ * User-defined name of aggregation as derived from search request.
2388
2456
  * @maxLength 100
2389
2457
  */
2390
2458
  name?: string;
2391
- /** Type of aggregation that must match provided kind as derived from search request */
2459
+ /** Type of aggregation that must match specified kind as derived from search request. */
2392
2460
  type?: AggregationTypeWithLiterals;
2393
2461
  /**
2394
- * Field to aggregate by as derived from search request
2462
+ * Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`.
2395
2463
  * @maxLength 200
2396
2464
  */
2397
2465
  fieldPath?: string;
2398
2466
  }
2399
2467
  /** @oneof */
2400
2468
  interface AggregationResultsResultOneOf {
2401
- /** Value aggregation results */
2469
+ /** Value aggregation results. */
2402
2470
  values?: ValueResults;
2403
- /** Range aggregation results */
2471
+ /** Range aggregation results. */
2404
2472
  ranges?: RangeResults;
2405
- /** Scalar aggregation results */
2473
+ /** Scalar aggregation results. */
2406
2474
  scalar?: AggregationResultsScalarResult;
2407
- /** Group by value aggregation results */
2475
+ /** Group by value aggregation results. */
2408
2476
  groupedByValue?: GroupByValueResults;
2409
- /** Date histogram aggregation results */
2477
+ /** Date histogram aggregation results. */
2410
2478
  dateHistogram?: DateHistogramResults;
2411
- /** Nested aggregation results */
2479
+ /** Nested aggregation results. */
2412
2480
  nested?: NestedResults;
2413
2481
  }
2414
2482
  interface QueryPoliciesRequest {
@@ -3721,8 +3789,8 @@ interface ServiceSearchSpec extends SearchSpec {
3721
3789
  type CommonSearchWithEntityContext = Search<Service, ServiceSearchSpec>;
3722
3790
  type ServiceSearch = {
3723
3791
  /**
3724
- Cursor pointing to page of results.
3725
- When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
3792
+ Cursor-based paging for result navigation. When requesting `cursor_paging.cursor`,
3793
+ `filter`, `sort`, or `search` can't be specified.
3726
3794
  */
3727
3795
  cursorPaging?: {
3728
3796
  /**
@@ -3741,11 +3809,15 @@ type ServiceSearch = {
3741
3809
  cursor?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor'] | null;
3742
3810
  };
3743
3811
  /**
3744
- 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)
3812
+ Filter object for narrowing search results. For example, to return only services with specific payment options: `"filter": {"payment.options.online": true, "payment.options.in_person": false}`.
3813
+
3814
+ Learn more about the filter format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)).
3745
3815
  */
3746
3816
  filter?: CommonSearchWithEntityContext['filter'] | null;
3747
3817
  /**
3748
- Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
3818
+ Array of sort objects specifying result order. For example, to sort by creation date in descending order: `"sort": [{"fieldName": "createdDate", "order": "DESC"}]`.
3819
+
3820
+ Learn more about the sort format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)).
3749
3821
  @maxSize: 10
3750
3822
  */
3751
3823
  sort?: {
@@ -3760,84 +3832,81 @@ type ServiceSearch = {
3760
3832
  order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];
3761
3833
  }[];
3762
3834
  /**
3763
- 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.
3835
+ Aggregations for grouping data into categories (facets) and providing summaries for each category.
3836
+ For example, use aggregations to categorize search results by service type, payment options, or locations.
3764
3837
  @maxSize: 10
3765
3838
  */
3766
3839
  aggregations?: {
3767
3840
  /**
3768
- Value aggregation
3841
+ Value aggregation configuration.
3769
3842
  */
3770
3843
  value?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['value'];
3771
3844
  /**
3772
- Range aggregation
3845
+ Range aggregation configuration.
3773
3846
  */
3774
3847
  range?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['range'];
3775
3848
  /**
3776
- Scalar aggregation
3849
+ Scalar aggregation configuration.
3777
3850
  */
3778
3851
  scalar?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['scalar'];
3779
3852
  /**
3780
- Date histogram aggregation
3853
+ Date histogram aggregation configuration.
3781
3854
  */
3782
3855
  dateHistogram?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['dateHistogram'];
3783
3856
  /**
3784
- Nested aggregation
3857
+ Nested aggregation configuration.
3785
3858
  */
3786
3859
  nested?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['nested'];
3787
3860
  /**
3788
- User-defined name of aggregation, should be unique, will appear in aggregation results
3861
+ User-defined name of aggregation. Must be unique and will appear in aggregation results.
3789
3862
  @maxLength: 100
3790
3863
  */
3791
3864
  name?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['name'] | null;
3792
3865
  /**
3793
- Type of aggregation, client must provide matching aggregation field below
3866
+ Type of aggregation. Client must specify matching aggregation field below.
3794
3867
  */
3795
3868
  type?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['type'];
3796
3869
  /**
3797
- Field to aggregate by, use dot notation to specify json path
3870
+ Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`.
3798
3871
  @maxLength: 200
3799
3872
  */
3800
3873
  fieldPath?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['fieldPath'];
3801
3874
  /**
3802
- deprecated, use `nested` instead
3803
- @deprecated: deprecated, use `nested` instead,
3875
+ Deprecated, use `nested` instead.
3876
+ @deprecated: Deprecated, use `nested` instead.,
3804
3877
  @replacedBy: kind.nested,
3805
3878
  @targetRemovalDate: 2025-01-01
3806
3879
  */
3807
3880
  groupBy?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['groupBy'];
3808
3881
  }[];
3809
3882
  /**
3810
- Free text to match in searchable fields
3883
+ Free text to match in searchable fields.
3811
3884
  */
3812
3885
  search?: {
3813
3886
  /**
3814
- Boolean search mode
3887
+ Search mode. Defines the search logic for combining multiple terms in the `expression`.
3815
3888
  */
3816
3889
  mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];
3817
3890
  /**
3818
- Search term or expression
3891
+ Search term or expression.
3819
3892
  @maxLength: 200
3820
3893
  */
3821
3894
  expression?: NonNullable<CommonSearchWithEntityContext['search']>['expression'] | null;
3822
3895
  /**
3823
- Fields to search in. If empty - server will search in own default fields
3896
+ Fields to search in. If the array is empty, all searchable fields are searched. Use dot notation to specify a JSON path. For example, `order.address.streetName`.
3824
3897
  @maxSize: 10,
3825
3898
  @maxLength: 200
3826
3899
  */
3827
3900
  fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];
3828
3901
  /**
3829
- Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm)
3902
+ Whether to enable the search function to use an algorithm to automatically find results that are close to the search expression, such as typos and declensions.
3830
3903
  */
3831
3904
  fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];
3832
3905
  };
3833
3906
  /**
3834
- UTC offset or IANA time zone. Valid values are
3835
- ISO 8601 UTC offsets, such as +02:00 or -06:00,
3836
- and IANA time zone IDs, such as Europe/Rome
3907
+ Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) or [ISO 8601 UTC offset format](https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC) for adjusting time fields in the specified filters and returned aggregation data. For example, `America/New_York`, `UTC`, or `+02:00`.
3837
3908
 
3838
- Affects all filters and aggregations returned values.
3839
- You may override this behavior in a specific filter by providing
3840
- timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
3909
+ Default: Time zone specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).
3841
3910
  @maxLength: 50
3842
3911
  */
3843
3912
  timeZone?: CommonSearchWithEntityContext['timeZone'] | null;