@wix/auto_sdk_bookings_resources 1.0.27 → 1.0.28

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.
@@ -323,43 +323,26 @@ interface ListDeletedResourcesResponse {
323
323
  pagingMetadata?: CursorPagingMetadata;
324
324
  }
325
325
  interface CursorPagingMetadata {
326
- /**
327
- * Number of items returned in the current response page.
328
- *
329
- * This count reflects the actual number of items in the current result set,
330
- * which may be less than the requested limit if fewer items are available.
331
- */
326
+ /** Number of items returned in the response. */
332
327
  count?: number | null;
333
- /**
334
- * Navigation cursors for moving between result pages.
335
- *
336
- * Contains `next` and `prev` cursor tokens for pagination. Use the `next` cursor
337
- * to retrieve subsequent pages and `prev` cursor to go back to previous pages.
338
- * 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).
339
- */
328
+ /** Cursor strings that point to the next page, previous page, or both. */
340
329
  cursors?: Cursors;
341
330
  /**
342
- * Indicates whether additional results are available beyond the current page.
331
+ * Whether there are more pages to retrieve following the current page.
343
332
  *
344
- * - `true`: More results exist and can be retrieved using the `next` cursor.
345
- * - `false`: This is the final page of results.
333
+ * + `true`: Another page of results can be retrieved.
334
+ * + `false`: This is the last page.
346
335
  */
347
336
  hasNext?: boolean | null;
348
337
  }
349
338
  interface Cursors {
350
339
  /**
351
- * Cursor token for retrieving the next page of results.
352
- *
353
- * Use this token in subsequent requests to continue pagination forward.
354
- * Value is `null` when on the last page of results.
340
+ * Cursor string pointing to the next page in the list of results.
355
341
  * @maxLength 16000
356
342
  */
357
343
  next?: string | null;
358
344
  /**
359
- * Cursor token for retrieving the previous page of results.
360
- *
361
- * Use this token to navigate backwards through result pages.
362
- * Value is `null` when on the first page of results.
345
+ * Cursor pointing to the previous page in the list of results.
363
346
  * @maxLength 16000
364
347
  */
365
348
  prev?: string | null;
@@ -443,43 +426,40 @@ interface BulkDeleteResourcesResponse {
443
426
  }
444
427
  interface SearchResourcesRequest {
445
428
  /**
446
- * Search criteria including filter, sort, aggregations, and paging options.
447
- *
448
- * Refer to the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)) for complete filter and sorting options.
429
+ * Search condition. Refer to the *supported filters article*
430
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
431
+ * for a complete list of supported filters and sorting options.
449
432
  */
450
433
  search?: CursorSearch;
451
434
  }
452
435
  interface CursorSearch extends CursorSearchPagingMethodOneOf {
453
436
  /**
454
- * Cursor-based paging for result navigation. When requesting `cursor_paging.cursor`,
455
- * `filter`, `sort`, or `search` can't be specified.
437
+ * Cursor pointing to page of results.
438
+ * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
456
439
  */
457
440
  cursorPaging?: CursorPaging;
458
- /**
459
- * Filter object for narrowing search results. For example, to return only resources available at specific business locations: `"filter": {"single_resource.location_options.specific_location_options.business_locations.location_id": {"$in": ["location-id-1", "location-id-2"]}}`.
460
- *
461
- * Learn more about the filter format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)).
462
- */
441
+ /** 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) */
463
442
  filter?: Record<string, any> | null;
464
443
  /**
465
- * Array of sort objects specifying result order. For example, to sort by resource name in ascending order: `"sort": [{"fieldName": "name", "order": "ASC"}]`.
466
- *
467
- * Learn more about the sort format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)).
444
+ * Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
468
445
  * @maxSize 10
469
446
  */
470
447
  sort?: Sorting[];
471
448
  /**
472
- * Aggregations for grouping data into categories (facets) and providing summaries for each category.
473
- * For example, use aggregations to categorize search results by resource type, management type, or location availability.
449
+ * 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.
474
450
  * @maxSize 10
475
451
  */
476
452
  aggregations?: Aggregation[];
477
- /** Free text to match in searchable fields. */
453
+ /** Free text to match in searchable fields */
478
454
  search?: SearchDetails;
479
455
  /**
480
- * 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`.
456
+ * UTC offset or IANA time zone. Valid values are
457
+ * ISO 8601 UTC offsets, such as +02:00 or -06:00,
458
+ * and IANA time zone IDs, such as Europe/Rome
481
459
  *
482
- * Default: Time zone specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).
460
+ * Affects all filters and aggregations returned values.
461
+ * You may override this behavior in a specific filter by providing
462
+ * timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
483
463
  * @maxLength 50
484
464
  */
485
465
  timeZone?: string | null;
@@ -487,8 +467,8 @@ interface CursorSearch extends CursorSearchPagingMethodOneOf {
487
467
  /** @oneof */
488
468
  interface CursorSearchPagingMethodOneOf {
489
469
  /**
490
- * Cursor-based paging for result navigation. When requesting `cursor_paging.cursor`,
491
- * `filter`, `sort`, or `search` can't be specified.
470
+ * Cursor pointing to page of results.
471
+ * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
492
472
  */
493
473
  cursorPaging?: CursorPaging;
494
474
  }
@@ -508,31 +488,31 @@ declare enum SortOrder {
508
488
  /** @enumType */
509
489
  type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
510
490
  interface Aggregation extends AggregationKindOneOf {
511
- /** Value aggregation configuration. */
491
+ /** Value aggregation */
512
492
  value?: ValueAggregation;
513
- /** Range aggregation configuration. */
493
+ /** Range aggregation */
514
494
  range?: RangeAggregation;
515
- /** Scalar aggregation configuration. */
495
+ /** Scalar aggregation */
516
496
  scalar?: ScalarAggregation;
517
- /** Date histogram aggregation configuration. */
497
+ /** Date histogram aggregation */
518
498
  dateHistogram?: DateHistogramAggregation;
519
- /** Nested aggregation configuration. */
499
+ /** Nested aggregation */
520
500
  nested?: NestedAggregation;
521
501
  /**
522
- * Aggregation name, returned in `aggregations.results.name`.
502
+ * User-defined name of aggregation, should be unique, will appear in aggregation results
523
503
  * @maxLength 100
524
504
  */
525
505
  name?: string | null;
526
- /** Type of aggregation. Client must specify matching aggregation field below. */
506
+ /** Type of aggregation, client must provide matching aggregation field below */
527
507
  type?: AggregationTypeWithLiterals;
528
508
  /**
529
- * Field to aggregate by. Use dot notation to specify a JSON path. For example `name` or `locationOptions.businessLocations.locationId`.
509
+ * Field to aggregate by, use dot notation to specify json path
530
510
  * @maxLength 200
531
511
  */
532
512
  fieldPath?: string;
533
513
  /**
534
- * Deprecated. Use `nested` instead.
535
- * @deprecated Deprecated. Use `nested` instead.
514
+ * deprecated, use `nested` instead
515
+ * @deprecated deprecated, use `nested` instead
536
516
  * @replacedBy kind.nested
537
517
  * @targetRemovalDate 2024-03-30
538
518
  */
@@ -540,123 +520,108 @@ interface Aggregation extends AggregationKindOneOf {
540
520
  }
541
521
  /** @oneof */
542
522
  interface AggregationKindOneOf {
543
- /** Value aggregation configuration. */
523
+ /** Value aggregation */
544
524
  value?: ValueAggregation;
545
- /** Range aggregation configuration. */
525
+ /** Range aggregation */
546
526
  range?: RangeAggregation;
547
- /** Scalar aggregation configuration. */
527
+ /** Scalar aggregation */
548
528
  scalar?: ScalarAggregation;
549
- /** Date histogram aggregation configuration. */
529
+ /** Date histogram aggregation */
550
530
  dateHistogram?: DateHistogramAggregation;
551
- /** Nested aggregation configuration. */
531
+ /** Nested aggregation */
552
532
  nested?: NestedAggregation;
553
533
  }
554
534
  interface RangeBucket {
555
- /** Inclusive lower bound of the range. Required if `to` isn't specified. */
535
+ /** Inclusive lower bound of the range. Required if to is not given */
556
536
  from?: number | null;
557
- /** Exclusive upper bound of the range. Required if `from` isn't specified. */
537
+ /** Exclusive upper bound of the range. Required if from is not given */
558
538
  to?: number | null;
559
539
  }
560
540
  declare enum SortType {
561
- /** Number of matches in the results. */
541
+ /** Should sort by number of matches */
562
542
  COUNT = "COUNT",
563
- /** Alphabetically by the field value. */
543
+ /** Should sort by value of the field alphabetically */
564
544
  VALUE = "VALUE"
565
545
  }
566
546
  /** @enumType */
567
547
  type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
568
548
  declare enum SortDirection {
569
- /** Descending order. */
549
+ /** Should sort in descending order */
570
550
  DESC = "DESC",
571
- /** Ascending order. */
551
+ /** Should sort in ascending order */
572
552
  ASC = "ASC"
573
553
  }
574
554
  /** @enumType */
575
555
  type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
576
556
  declare enum MissingValues {
577
- /** Exclude missing values from the aggregation results. */
557
+ /** Should missing values be excluded from the aggregation results */
578
558
  EXCLUDE = "EXCLUDE",
579
- /** Include missing values in the aggregation results. */
559
+ /** Should missing values be included in the aggregation results */
580
560
  INCLUDE = "INCLUDE"
581
561
  }
582
562
  /** @enumType */
583
563
  type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
584
564
  interface IncludeMissingValuesOptions {
585
565
  /**
586
- * Custom bucket name for missing values.
587
- *
588
- * Default values:
589
- * - string: `N/A`
590
- * - int: `0`
591
- * - bool: `false`
566
+ * Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
592
567
  * @maxLength 20
593
568
  */
594
569
  addToBucket?: string;
595
570
  }
596
571
  declare enum ScalarType {
597
572
  UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
598
- /** Total number of distinct values. */
573
+ /** Count of distinct values */
599
574
  COUNT_DISTINCT = "COUNT_DISTINCT",
600
- /** Minimum value. */
575
+ /** Minimum value */
601
576
  MIN = "MIN",
602
- /** Maximum value. */
577
+ /** Maximum value */
603
578
  MAX = "MAX"
604
579
  }
605
580
  /** @enumType */
606
581
  type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
607
582
  interface ValueAggregation extends ValueAggregationOptionsOneOf {
608
- /** Options for including missing values in the aggregation results. */
583
+ /** Options for including missing values */
609
584
  includeOptions?: IncludeMissingValuesOptions;
610
- /** Whether to sort by number of matches or value of the field. */
585
+ /** Should sort by number of matches or value of the field */
611
586
  sortType?: SortTypeWithLiterals;
612
- /** Whether to sort in ascending or descending order. */
587
+ /** Should sort in ascending or descending order */
613
588
  sortDirection?: SortDirectionWithLiterals;
614
- /**
615
- * Number of aggregations to return.
616
- *
617
- * Min: `1`
618
- * Max: `250`
619
- * Default: `10`
620
- */
589
+ /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
621
590
  limit?: number | null;
622
- /**
623
- * Whether missing values should be included or excluded from the aggregation results.
624
- *
625
- * Default: `EXCLUDE`
626
- */
591
+ /** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
627
592
  missingValues?: MissingValuesWithLiterals;
628
593
  }
629
594
  /** @oneof */
630
595
  interface ValueAggregationOptionsOneOf {
631
- /** Options for including missing values in the aggregation results. */
596
+ /** Options for including missing values */
632
597
  includeOptions?: IncludeMissingValuesOptions;
633
598
  }
634
599
  declare enum NestedAggregationType {
635
600
  UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
636
- /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */
601
+ /** An aggregation where result buckets are dynamically built - one per unique value */
637
602
  VALUE = "VALUE",
638
- /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */
603
+ /** An aggregation, where user can define set of ranges - each representing a bucket */
639
604
  RANGE = "RANGE",
640
- /** Calculates a single numerical value from a dataset, summarizing the dataset into 1 key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
605
+ /** A single-value metric aggregation - e.g. min, max, sum, avg */
641
606
  SCALAR = "SCALAR",
642
- /** 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.). */
607
+ /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
643
608
  DATE_HISTOGRAM = "DATE_HISTOGRAM"
644
609
  }
645
610
  /** @enumType */
646
611
  type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
647
612
  interface RangeAggregation {
648
613
  /**
649
- * 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.
614
+ * 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
650
615
  * @maxSize 50
651
616
  */
652
617
  buckets?: RangeBucket[];
653
618
  }
654
619
  interface ScalarAggregation {
655
- /** Operator for the scalar aggregation, for example `COUNT_DISTINCT`, `MIN`, `MAX`. */
620
+ /** Define the operator for the scalar aggregation */
656
621
  type?: ScalarTypeWithLiterals;
657
622
  }
658
623
  interface DateHistogramAggregation {
659
- /** Time interval for date histogram aggregation, for example `DAY`, `HOUR`, `MONTH`. */
624
+ /** Interval for date histogram aggregation */
660
625
  interval?: IntervalWithLiterals;
661
626
  }
662
627
  declare enum Interval {
@@ -679,331 +644,315 @@ declare enum Interval {
679
644
  /** @enumType */
680
645
  type IntervalWithLiterals = Interval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
681
646
  interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
682
- /** Value aggregation configuration. Calculates the distribution of field values within the dataset. */
647
+ /** Value aggregation */
683
648
  value?: ValueAggregation;
684
- /** Range aggregation configuration. Calculates counts within user-defined value ranges. */
649
+ /** Range aggregation */
685
650
  range?: RangeAggregation;
686
- /** Scalar aggregation configuration. Calculates single numerical metrics like count, min, max, sum, or average. */
651
+ /** Scalar aggregation */
687
652
  scalar?: ScalarAggregation;
688
- /** Date histogram aggregation configuration. Calculates counts within time intervals. */
653
+ /** Date histogram aggregation */
689
654
  dateHistogram?: DateHistogramAggregation;
690
655
  /**
691
- * User-defined name of aggregation. Must be unique and will appear in aggregation results.
656
+ * User-defined name of aggregation, should be unique, will appear in aggregation results
692
657
  * @maxLength 100
693
658
  */
694
659
  name?: string | null;
695
- /** Type of aggregation. Client must specify matching aggregation field below. */
660
+ /** Type of aggregation, client must provide matching aggregation field below */
696
661
  type?: NestedAggregationTypeWithLiterals;
697
662
  /**
698
- * Path to the field to aggregate by in dot notation. For example `name` or `locationOptions.businessLocations.locationId`.
663
+ * Field to aggregate by, use dont notation to specify json path
699
664
  * @maxLength 200
700
665
  */
701
666
  fieldPath?: string;
702
667
  }
703
668
  /** @oneof */
704
669
  interface NestedAggregationItemKindOneOf {
705
- /** Value aggregation configuration. Calculates the distribution of field values within the dataset. */
670
+ /** Value aggregation */
706
671
  value?: ValueAggregation;
707
- /** Range aggregation configuration. Calculates counts within user-defined value ranges. */
672
+ /** Range aggregation */
708
673
  range?: RangeAggregation;
709
- /** Scalar aggregation configuration. Calculates single numerical metrics like count, min, max, sum, or average. */
674
+ /** Scalar aggregation */
710
675
  scalar?: ScalarAggregation;
711
- /** Date histogram aggregation configuration. Calculates counts within time intervals. */
676
+ /** Date histogram aggregation */
712
677
  dateHistogram?: DateHistogramAggregation;
713
678
  }
714
679
  declare enum AggregationType {
715
680
  UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
716
- /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */
681
+ /** An aggregation where result buckets are dynamically built - one per unique value */
717
682
  VALUE = "VALUE",
718
- /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */
683
+ /** An aggregation, where user can define set of ranges - each representing a bucket */
719
684
  RANGE = "RANGE",
720
- /** Calculates a single numerical value from a dataset, summarizing the dataset into 1 key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
685
+ /** A single-value metric aggregation - e.g. min, max, sum, avg */
721
686
  SCALAR = "SCALAR",
722
- /** 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.). */
687
+ /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
723
688
  DATE_HISTOGRAM = "DATE_HISTOGRAM",
724
- /** Flattened list of aggregations, where each aggregation is nested within previous 1. */
689
+ /** Multi-level aggregation, where each next aggregation is nested within previous one */
725
690
  NESTED = "NESTED"
726
691
  }
727
692
  /** @enumType */
728
693
  type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
729
- /** 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. */
694
+ /** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
730
695
  interface NestedAggregation {
731
696
  /**
732
- * Flattened list of aggregations where each next aggregation is nested within the previous 1.
697
+ * Flattened list of aggregations, where each next aggregation is nested within previous one
733
698
  * @minSize 2
734
699
  * @maxSize 3
735
700
  */
736
701
  nestedAggregations?: NestedAggregationItem[];
737
702
  }
738
703
  interface GroupByAggregation extends GroupByAggregationKindOneOf {
739
- /** Value aggregation configuration. */
704
+ /** Value aggregation configuration */
740
705
  value?: ValueAggregation;
741
706
  /**
742
- * User-defined name of aggregation. Must be unique and will appear in aggregation results.
707
+ * User-defined name of aggregation, should be unique, will appear in aggregation results
743
708
  * @maxLength 100
744
709
  */
745
710
  name?: string | null;
746
711
  /**
747
- * Path to the field to aggregate by in dot notation. For example `name` or `locationOptions.businessLocations.locationId`.
712
+ * Field to aggregate by
748
713
  * @maxLength 200
749
714
  */
750
715
  fieldPath?: string;
751
716
  }
752
717
  /** @oneof */
753
718
  interface GroupByAggregationKindOneOf {
754
- /** Value aggregation configuration. */
719
+ /** Value aggregation configuration */
755
720
  value?: ValueAggregation;
756
721
  }
757
722
  interface SearchDetails {
758
- /** Search mode. Defines the search logic for combining multiple terms in the `expression`. */
723
+ /** Defines how separate search terms in `expression` are combined */
759
724
  mode?: ModeWithLiterals;
760
725
  /**
761
- * Search term or expression.
726
+ * Search term or expression
762
727
  * @maxLength 100
763
728
  */
764
729
  expression?: string | null;
765
730
  /**
766
- * Fields to search in. If the array is empty, all searchable fields are searched. Use dot notation to specify a JSON path. For example, `locationOptions.availableInAllLocations`.
731
+ * Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path
767
732
  * @maxLength 200
768
733
  * @maxSize 20
769
734
  */
770
735
  fields?: string[];
771
- /** 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. */
736
+ /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
772
737
  fuzzy?: boolean;
773
738
  }
774
739
  declare enum Mode {
775
- /** At least 1 of the search terms must be present. */
740
+ /** Any of the search terms must be present */
776
741
  OR = "OR",
777
- /** All search terms must be present. */
742
+ /** All search terms must be present */
778
743
  AND = "AND"
779
744
  }
780
745
  /** @enumType */
781
746
  type ModeWithLiterals = Mode | 'OR' | 'AND';
782
747
  interface SearchResourcesResponse {
783
- /**
784
- * Retrieved resources that match the search criteria specified in the request.
785
- *
786
- * Each resource includes all available information such as name, type, management details,
787
- * location options, working hour schedules, and availability configurations.
788
- */
748
+ /** Retrieved resources. */
789
749
  resources?: Resource[];
790
- /**
791
- * Cursor-based paging metadata for navigating through search results.
792
- *
793
- * Contains navigation information including the current page cursor, whether additional
794
- * results are available, and result counts. Use the `next` cursor to fetch subsequent pages.
795
- */
750
+ /** Paging metadata. */
796
751
  pagingMetadata?: CursorPagingMetadata;
797
- /**
798
- * Aggregation results derived from the aggregations specified in the search request.
799
- *
800
- * Provides analytical summaries such as resource counts by type, location distribution,
801
- * management type statistics, or custom groupings. Only populated when aggregations
802
- * are included in the search criteria.
803
- */
752
+ /** Aggregation results. */
804
753
  aggregationData?: AggregationData;
805
754
  }
806
755
  interface AggregationData {
807
756
  /**
808
- * Array of aggregation results, each containing the aggregation metadata and its calculated values for the specified search criteria.
757
+ * key = aggregation name (as derived from search request)
809
758
  * @maxSize 10000
810
759
  */
811
760
  results?: AggregationResults[];
812
761
  }
813
762
  interface ValueAggregationResult {
814
763
  /**
815
- * Value of the field.
764
+ * Value of the field
816
765
  * @maxLength 100
817
766
  */
818
767
  value?: string;
819
- /** Count of entities with this value. */
768
+ /** Count of entities with this value */
820
769
  count?: number;
821
770
  }
822
771
  interface RangeAggregationResult {
823
- /** Inclusive lower bound of the range. */
772
+ /** Inclusive lower bound of the range */
824
773
  from?: number | null;
825
- /** Exclusive upper bound of the range. */
774
+ /** Exclusive upper bound of the range */
826
775
  to?: number | null;
827
- /** Count of entities in this range. */
776
+ /** Count of entities in this range */
828
777
  count?: number;
829
778
  }
830
779
  interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
831
- /** Value aggregation results. */
780
+ /** Value aggregation results */
832
781
  values?: ValueResults;
833
- /** Range aggregation results. */
782
+ /** Range aggregation results */
834
783
  ranges?: RangeResults;
835
- /** Scalar aggregation results. */
784
+ /** Scalar aggregation results */
836
785
  scalar?: AggregationResultsScalarResult;
837
786
  /**
838
- * User-defined name of aggregation, matches the one specified in request.
787
+ * User-defined name of aggregation, matches the one provided in request
839
788
  * @maxLength 100
840
789
  */
841
790
  name?: string;
842
- /** Type of aggregation that matches result. */
791
+ /** Type of aggregation that matches result */
843
792
  type?: AggregationTypeWithLiterals;
844
793
  /**
845
- * Path to the field to aggregate by in dot notation. For example `name` or `locationOptions.businessLocations.locationId`.
794
+ * Field to aggregate by, matches the one provided in request
846
795
  * @maxLength 200
847
796
  */
848
797
  fieldPath?: string;
849
798
  }
850
799
  /** @oneof */
851
800
  interface NestedAggregationResultsResultOneOf {
852
- /** Value aggregation results. */
801
+ /** Value aggregation results */
853
802
  values?: ValueResults;
854
- /** Range aggregation results. */
803
+ /** Range aggregation results */
855
804
  ranges?: RangeResults;
856
- /** Scalar aggregation results. */
805
+ /** Scalar aggregation results */
857
806
  scalar?: AggregationResultsScalarResult;
858
807
  }
859
808
  interface ValueResults {
860
809
  /**
861
- * Array of value aggregation results, each containing a field value and the count of entities with that value.
810
+ * List of value aggregations
862
811
  * @maxSize 250
863
812
  */
864
813
  results?: ValueAggregationResult[];
865
814
  }
866
815
  interface RangeResults {
867
816
  /**
868
- * Array of range aggregation results returned in the same order as requested, each containing range bounds and count of entities within that range.
817
+ * List of ranges returned in same order as requested
869
818
  * @maxSize 50
870
819
  */
871
820
  results?: RangeAggregationResult[];
872
821
  }
873
822
  interface AggregationResultsScalarResult {
874
- /** Type of scalar aggregation. */
823
+ /** Type of scalar aggregation */
875
824
  type?: ScalarTypeWithLiterals;
876
- /** Value of the scalar aggregation. */
825
+ /** Value of the scalar aggregation */
877
826
  value?: number;
878
827
  }
879
828
  interface NestedValueAggregationResult {
880
829
  /**
881
- * Value of the field.
830
+ * Value of the field
882
831
  * @maxLength 1000
883
832
  */
884
833
  value?: string;
885
- /** Nested aggregations result data. */
834
+ /** Nested aggregations */
886
835
  nestedResults?: NestedAggregationResults;
887
836
  }
888
837
  interface ValueResult {
889
838
  /**
890
- * Value of the field.
839
+ * Value of the field
891
840
  * @maxLength 1000
892
841
  */
893
842
  value?: string;
894
- /** Count of entities with this value. */
843
+ /** Count of entities with this value */
895
844
  count?: number | null;
896
845
  }
897
846
  interface RangeResult {
898
- /** Inclusive lower bound of the range. */
847
+ /** Inclusive lower bound of the range */
899
848
  from?: number | null;
900
- /** Exclusive upper bound of the range. */
849
+ /** Exclusive upper bound of the range */
901
850
  to?: number | null;
902
- /** Count of entities in this range. */
851
+ /** Count of entities in this range */
903
852
  count?: number | null;
904
853
  }
905
854
  interface ScalarResult {
906
- /** Value of the scalar aggregation. */
855
+ /** Value of the scalar aggregation */
907
856
  value?: number;
908
857
  }
909
858
  interface NestedResultValue extends NestedResultValueResultOneOf {
910
- /** Value aggregation result. */
859
+ /** Value aggregation result */
911
860
  value?: ValueResult;
912
- /** Range aggregation result. */
861
+ /** Range aggregation result */
913
862
  range?: RangeResult;
914
- /** Scalar aggregation result. */
863
+ /** Scalar aggregation result */
915
864
  scalar?: ScalarResult;
916
- /** Date histogram aggregation result. */
865
+ /** Date histogram aggregation result */
917
866
  dateHistogram?: ValueResult;
918
867
  }
919
868
  /** @oneof */
920
869
  interface NestedResultValueResultOneOf {
921
- /** Value aggregation result. */
870
+ /** Value aggregation result */
922
871
  value?: ValueResult;
923
- /** Range aggregation result. */
872
+ /** Range aggregation result */
924
873
  range?: RangeResult;
925
- /** Scalar aggregation result. */
874
+ /** Scalar aggregation result */
926
875
  scalar?: ScalarResult;
927
- /** Date histogram aggregation result. */
876
+ /** Date histogram aggregation result */
928
877
  dateHistogram?: ValueResult;
929
878
  }
930
879
  interface Results {
931
- /** Map of nested aggregation results, keyed by aggregation name. */
880
+ /** List of nested aggregations */
932
881
  results?: Record<string, NestedResultValue>;
933
882
  }
934
883
  interface DateHistogramResult {
935
884
  /**
936
- * Date in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601).
885
+ * Date in ISO 8601 format
937
886
  * @maxLength 100
938
887
  */
939
888
  value?: string;
940
- /** Count of documents in the bucket. */
889
+ /** Count of documents in the bucket */
941
890
  count?: number;
942
891
  }
943
892
  interface GroupByValueResults {
944
893
  /**
945
- * Array of nested value aggregation results, each containing a field value and the associated nested aggregation data.
894
+ * List of value aggregations
946
895
  * @maxSize 1000
947
896
  */
948
897
  results?: NestedValueAggregationResult[];
949
898
  }
950
899
  interface DateHistogramResults {
951
900
  /**
952
- * Array of date histogram aggregation results, each containing a date bucket and its count.
901
+ * List of date histogram aggregations
953
902
  * @maxSize 200
954
903
  */
955
904
  results?: DateHistogramResult[];
956
905
  }
957
906
  /**
958
907
  * Results of `NESTED` aggregation type in a flattened form
959
- * Aggregations in resulting array are keyed by requested aggregation `name`.
908
+ * aggregations in resulting array are keyed by requested aggregation `name`.
960
909
  */
961
910
  interface NestedResults {
962
911
  /**
963
- * Array of nested aggregation result groups, each containing multiple aggregation results.
912
+ * List of nested aggregations
964
913
  * @maxSize 1000
965
914
  */
966
915
  results?: Results[];
967
916
  }
968
917
  interface AggregationResults extends AggregationResultsResultOneOf {
969
- /** Value aggregation results. */
918
+ /** Value aggregation results */
970
919
  values?: ValueResults;
971
- /** Range aggregation results. */
920
+ /** Range aggregation results */
972
921
  ranges?: RangeResults;
973
- /** Scalar aggregation results. */
922
+ /** Scalar aggregation results */
974
923
  scalar?: AggregationResultsScalarResult;
975
- /** Group by value aggregation results. */
924
+ /** Group by value aggregation results */
976
925
  groupedByValue?: GroupByValueResults;
977
- /** Date histogram aggregation results. */
926
+ /** Date histogram aggregation results */
978
927
  dateHistogram?: DateHistogramResults;
979
- /** Nested aggregation results. */
928
+ /** Nested aggregation results */
980
929
  nested?: NestedResults;
981
930
  /**
982
- * User-defined name of aggregation as derived from search request.
931
+ * User-defined name of aggregation as derived from search request
983
932
  * @maxLength 100
984
933
  */
985
934
  name?: string;
986
- /** Type of aggregation that must match specified kind as derived from search request. */
935
+ /** Type of aggregation that must match provided kind as derived from search request */
987
936
  type?: AggregationTypeWithLiterals;
988
937
  /**
989
- * Path to the field to aggregate by in dot notation. For example `name` or `locationOptions.businessLocations.locationId`.
938
+ * Field to aggregate by as derived from search request
990
939
  * @maxLength 200
991
940
  */
992
941
  fieldPath?: string;
993
942
  }
994
943
  /** @oneof */
995
944
  interface AggregationResultsResultOneOf {
996
- /** Value aggregation results. */
945
+ /** Value aggregation results */
997
946
  values?: ValueResults;
998
- /** Range aggregation results. */
947
+ /** Range aggregation results */
999
948
  ranges?: RangeResults;
1000
- /** Scalar aggregation results. */
949
+ /** Scalar aggregation results */
1001
950
  scalar?: AggregationResultsScalarResult;
1002
- /** Group by value aggregation results. */
951
+ /** Group by value aggregation results */
1003
952
  groupedByValue?: GroupByValueResults;
1004
- /** Date histogram aggregation results. */
953
+ /** Date histogram aggregation results */
1005
954
  dateHistogram?: DateHistogramResults;
1006
- /** Nested aggregation results. */
955
+ /** Nested aggregation results */
1007
956
  nested?: NestedResults;
1008
957
  }
1009
958
  interface QueryResourcesRequest {
@@ -1394,8 +1343,8 @@ interface ResourceSearchSpec extends SearchSpec {
1394
1343
  type CommonSearchWithEntityContext = Search<Resource, ResourceSearchSpec>;
1395
1344
  type ResourceSearch = {
1396
1345
  /**
1397
- Cursor-based paging for result navigation. When requesting `cursor_paging.cursor`,
1398
- `filter`, `sort`, or `search` can't be specified.
1346
+ Cursor pointing to page of results.
1347
+ When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
1399
1348
  */
1400
1349
  cursorPaging?: {
1401
1350
  /**
@@ -1413,15 +1362,11 @@ type ResourceSearch = {
1413
1362
  cursor?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor'] | null;
1414
1363
  };
1415
1364
  /**
1416
- Filter object for narrowing search results. For example, to return only resources available at specific business locations: `"filter": {"single_resource.location_options.specific_location_options.business_locations.location_id": {"$in": ["location-id-1", "location-id-2"]}}`.
1417
-
1418
- Learn more about the filter format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)).
1365
+ 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)
1419
1366
  */
1420
1367
  filter?: CommonSearchWithEntityContext['filter'] | null;
1421
1368
  /**
1422
- Array of sort objects specifying result order. For example, to sort by resource name in ascending order: `"sort": [{"fieldName": "name", "order": "ASC"}]`.
1423
-
1424
- Learn more about the sort format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)).
1369
+ Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
1425
1370
  @maxSize: 10
1426
1371
  */
1427
1372
  sort?: {
@@ -1436,81 +1381,84 @@ type ResourceSearch = {
1436
1381
  order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];
1437
1382
  }[];
1438
1383
  /**
1439
- Aggregations for grouping data into categories (facets) and providing summaries for each category.
1440
- For example, use aggregations to categorize search results by resource type, management type, or location availability.
1384
+ 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.
1441
1385
  @maxSize: 10
1442
1386
  */
1443
1387
  aggregations?: {
1444
1388
  /**
1445
- Value aggregation configuration.
1389
+ Value aggregation
1446
1390
  */
1447
1391
  value?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['value'];
1448
1392
  /**
1449
- Range aggregation configuration.
1393
+ Range aggregation
1450
1394
  */
1451
1395
  range?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['range'];
1452
1396
  /**
1453
- Scalar aggregation configuration.
1397
+ Scalar aggregation
1454
1398
  */
1455
1399
  scalar?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['scalar'];
1456
1400
  /**
1457
- Date histogram aggregation configuration.
1401
+ Date histogram aggregation
1458
1402
  */
1459
1403
  dateHistogram?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['dateHistogram'];
1460
1404
  /**
1461
- Nested aggregation configuration.
1405
+ Nested aggregation
1462
1406
  */
1463
1407
  nested?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['nested'];
1464
1408
  /**
1465
- Aggregation name, returned in `aggregations.results.name`.
1409
+ User-defined name of aggregation, should be unique, will appear in aggregation results
1466
1410
  @maxLength: 100
1467
1411
  */
1468
1412
  name?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['name'] | null;
1469
1413
  /**
1470
- Type of aggregation. Client must specify matching aggregation field below.
1414
+ Type of aggregation, client must provide matching aggregation field below
1471
1415
  */
1472
1416
  type?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['type'];
1473
1417
  /**
1474
- Field to aggregate by. Use dot notation to specify a JSON path. For example `name` or `locationOptions.businessLocations.locationId`.
1418
+ Field to aggregate by, use dot notation to specify json path
1475
1419
  @maxLength: 200
1476
1420
  */
1477
1421
  fieldPath?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['fieldPath'];
1478
1422
  /**
1479
- Deprecated. Use `nested` instead.
1480
- @deprecated: Deprecated. Use `nested` instead.,
1423
+ deprecated, use `nested` instead
1424
+ @deprecated: deprecated, use `nested` instead,
1481
1425
  @replacedBy: kind.nested,
1482
1426
  @targetRemovalDate: 2024-03-30
1483
1427
  */
1484
1428
  groupBy?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['groupBy'];
1485
1429
  }[];
1486
1430
  /**
1487
- Free text to match in searchable fields.
1431
+ Free text to match in searchable fields
1488
1432
  */
1489
1433
  search?: {
1490
1434
  /**
1491
- Search mode. Defines the search logic for combining multiple terms in the `expression`.
1435
+ Defines how separate search terms in `expression` are combined
1492
1436
  */
1493
1437
  mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];
1494
1438
  /**
1495
- Search term or expression.
1439
+ Search term or expression
1496
1440
  @maxLength: 100
1497
1441
  */
1498
1442
  expression?: NonNullable<CommonSearchWithEntityContext['search']>['expression'] | null;
1499
1443
  /**
1500
- Fields to search in. If the array is empty, all searchable fields are searched. Use dot notation to specify a JSON path. For example, `locationOptions.availableInAllLocations`.
1444
+ Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path
1501
1445
  @maxLength: 200,
1502
1446
  @maxSize: 20
1503
1447
  */
1504
1448
  fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];
1505
1449
  /**
1506
- 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.
1450
+ Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm)
1507
1451
  */
1508
1452
  fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];
1509
1453
  };
1510
1454
  /**
1511
- 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`.
1455
+ UTC offset or IANA time zone. Valid values are
1456
+ ISO 8601 UTC offsets, such as +02:00 or -06:00,
1457
+ and IANA time zone IDs, such as Europe/Rome
1512
1458
 
1513
- Default: Time zone specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).
1459
+ Affects all filters and aggregations returned values.
1460
+ You may override this behavior in a specific filter by providing
1461
+ timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
1514
1462
  @maxLength: 50
1515
1463
  */
1516
1464
  timeZone?: CommonSearchWithEntityContext['timeZone'] | null;