@wix/auto_sdk_bookings_resources 1.0.19 → 1.0.21

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 (41) hide show
  1. package/build/cjs/index.typings.d.ts +8 -2
  2. package/build/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +1 -1
  3. package/build/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +6 -3
  4. package/build/cjs/src/bookings-resources-v2-resource-resources.public.js +1 -1
  5. package/build/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
  6. package/build/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +35 -21
  7. package/build/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
  8. package/build/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +210 -35
  9. package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js +8 -6
  10. package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
  11. package/build/es/index.typings.d.ts +8 -2
  12. package/build/es/src/bookings-resources-v2-resource-resources.context.d.ts +1 -1
  13. package/build/es/src/bookings-resources-v2-resource-resources.public.d.ts +6 -3
  14. package/build/es/src/bookings-resources-v2-resource-resources.public.js +1 -1
  15. package/build/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
  16. package/build/es/src/bookings-resources-v2-resource-resources.types.d.ts +35 -21
  17. package/build/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
  18. package/build/es/src/bookings-resources-v2-resource-resources.universal.d.ts +210 -35
  19. package/build/es/src/bookings-resources-v2-resource-resources.universal.js +8 -6
  20. package/build/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
  21. package/build/internal/cjs/index.typings.d.ts +8 -2
  22. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +1 -1
  23. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +6 -3
  24. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js +1 -1
  25. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
  26. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +35 -21
  27. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
  28. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +210 -35
  29. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js +8 -6
  30. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
  31. package/build/internal/es/index.typings.d.ts +8 -2
  32. package/build/internal/es/src/bookings-resources-v2-resource-resources.context.d.ts +1 -1
  33. package/build/internal/es/src/bookings-resources-v2-resource-resources.public.d.ts +6 -3
  34. package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js +1 -1
  35. package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
  36. package/build/internal/es/src/bookings-resources-v2-resource-resources.types.d.ts +35 -21
  37. package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
  38. package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.d.ts +210 -35
  39. package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js +8 -6
  40. package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
  41. package/package.json +3 -3
@@ -194,6 +194,8 @@ export declare enum ManagementType {
194
194
  /** The resource is managed by a Wix user. */
195
195
  WIX_USER = "WIX_USER"
196
196
  }
197
+ /** @enumType */
198
+ export type ManagementTypeWithLiterals = ManagementType | 'WIX_USER';
197
199
  export interface ExtendedFields {
198
200
  /**
199
201
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
@@ -451,12 +453,14 @@ export interface Sorting {
451
453
  */
452
454
  fieldName?: string;
453
455
  /** Sort order. */
454
- order?: SortOrder;
456
+ order?: SortOrderWithLiterals;
455
457
  }
456
458
  export declare enum SortOrder {
457
459
  ASC = "ASC",
458
460
  DESC = "DESC"
459
461
  }
462
+ /** @enumType */
463
+ export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
460
464
  export interface Aggregation extends AggregationKindOneOf {
461
465
  /** Value aggregation */
462
466
  value?: ValueAggregation;
@@ -474,7 +478,7 @@ export interface Aggregation extends AggregationKindOneOf {
474
478
  */
475
479
  name?: string | null;
476
480
  /** Type of aggregation, client must provide matching aggregation field below */
477
- type?: AggregationType;
481
+ type?: AggregationTypeWithLiterals;
478
482
  /**
479
483
  * Field to aggregate by, use dot notation to specify json path
480
484
  * @maxLength 200
@@ -513,18 +517,24 @@ export declare enum SortType {
513
517
  /** Should sort by value of the field alphabetically */
514
518
  VALUE = "VALUE"
515
519
  }
520
+ /** @enumType */
521
+ export type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
516
522
  export declare enum SortDirection {
517
523
  /** Should sort in descending order */
518
524
  DESC = "DESC",
519
525
  /** Should sort in ascending order */
520
526
  ASC = "ASC"
521
527
  }
528
+ /** @enumType */
529
+ export type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
522
530
  export declare enum MissingValues {
523
531
  /** Should missing values be excluded from the aggregation results */
524
532
  EXCLUDE = "EXCLUDE",
525
533
  /** Should missing values be included in the aggregation results */
526
534
  INCLUDE = "INCLUDE"
527
535
  }
536
+ /** @enumType */
537
+ export type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
528
538
  export interface IncludeMissingValuesOptions {
529
539
  /**
530
540
  * Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
@@ -541,17 +551,19 @@ export declare enum ScalarType {
541
551
  /** Maximum value */
542
552
  MAX = "MAX"
543
553
  }
554
+ /** @enumType */
555
+ export type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
544
556
  export interface ValueAggregation extends ValueAggregationOptionsOneOf {
545
557
  /** Options for including missing values */
546
558
  includeOptions?: IncludeMissingValuesOptions;
547
559
  /** Should sort by number of matches or value of the field */
548
- sortType?: SortType;
560
+ sortType?: SortTypeWithLiterals;
549
561
  /** Should sort in ascending or descending order */
550
- sortDirection?: SortDirection;
562
+ sortDirection?: SortDirectionWithLiterals;
551
563
  /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
552
564
  limit?: number | null;
553
565
  /** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
554
- missingValues?: MissingValues;
566
+ missingValues?: MissingValuesWithLiterals;
555
567
  }
556
568
  /** @oneof */
557
569
  export interface ValueAggregationOptionsOneOf {
@@ -569,6 +581,8 @@ export declare enum NestedAggregationType {
569
581
  /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
570
582
  DATE_HISTOGRAM = "DATE_HISTOGRAM"
571
583
  }
584
+ /** @enumType */
585
+ export type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
572
586
  export interface RangeAggregation {
573
587
  /**
574
588
  * 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
@@ -578,11 +592,11 @@ export interface RangeAggregation {
578
592
  }
579
593
  export interface ScalarAggregation {
580
594
  /** Define the operator for the scalar aggregation */
581
- type?: ScalarType;
595
+ type?: ScalarTypeWithLiterals;
582
596
  }
583
597
  export interface DateHistogramAggregation {
584
598
  /** Interval for date histogram aggregation */
585
- interval?: Interval;
599
+ interval?: IntervalWithLiterals;
586
600
  }
587
601
  export declare enum Interval {
588
602
  UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
@@ -601,6 +615,8 @@ export declare enum Interval {
601
615
  /** Second interval */
602
616
  SECOND = "SECOND"
603
617
  }
618
+ /** @enumType */
619
+ export type IntervalWithLiterals = Interval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
604
620
  export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
605
621
  /** Value aggregation */
606
622
  value?: ValueAggregation;
@@ -616,7 +632,7 @@ export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
616
632
  */
617
633
  name?: string | null;
618
634
  /** Type of aggregation, client must provide matching aggregation field below */
619
- type?: NestedAggregationType;
635
+ type?: NestedAggregationTypeWithLiterals;
620
636
  /**
621
637
  * Field to aggregate by, use dont notation to specify json path
622
638
  * @maxLength 200
@@ -647,6 +663,8 @@ export declare enum AggregationType {
647
663
  /** Multi-level aggregation, where each next aggregation is nested within previous one */
648
664
  NESTED = "NESTED"
649
665
  }
666
+ /** @enumType */
667
+ export type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
650
668
  /** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
651
669
  export interface NestedAggregation {
652
670
  /**
@@ -677,7 +695,7 @@ export interface GroupByAggregationKindOneOf {
677
695
  }
678
696
  export interface SearchDetails {
679
697
  /** Defines how separate search terms in `expression` are combined */
680
- mode?: Mode;
698
+ mode?: ModeWithLiterals;
681
699
  /**
682
700
  * Search term or expression
683
701
  * @maxLength 100
@@ -698,6 +716,8 @@ export declare enum Mode {
698
716
  /** All search terms must be present */
699
717
  AND = "AND"
700
718
  }
719
+ /** @enumType */
720
+ export type ModeWithLiterals = Mode | 'OR' | 'AND';
701
721
  export interface SearchResourcesResponse {
702
722
  /** Retrieved resources. */
703
723
  resources?: Resource[];
@@ -743,7 +763,7 @@ export interface NestedAggregationResults extends NestedAggregationResultsResult
743
763
  */
744
764
  name?: string;
745
765
  /** Type of aggregation that matches result */
746
- type?: AggregationType;
766
+ type?: AggregationTypeWithLiterals;
747
767
  /**
748
768
  * Field to aggregate by, matches the one provided in request
749
769
  * @maxLength 200
@@ -775,7 +795,7 @@ export interface RangeResults {
775
795
  }
776
796
  export interface AggregationResultsScalarResult {
777
797
  /** Type of scalar aggregation */
778
- type?: ScalarType;
798
+ type?: ScalarTypeWithLiterals;
779
799
  /** Value of the scalar aggregation */
780
800
  value?: number;
781
801
  }
@@ -887,7 +907,7 @@ export interface AggregationResults extends AggregationResultsResultOneOf {
887
907
  */
888
908
  name?: string;
889
909
  /** Type of aggregation that must match provided kind as derived from search request */
890
- type?: AggregationType;
910
+ type?: AggregationTypeWithLiterals;
891
911
  /**
892
912
  * Field to aggregate by as derived from search request
893
913
  * @maxLength 200
@@ -965,14 +985,6 @@ export interface CountResourcesResponse {
965
985
  /** Total number of resources matching the filter. */
966
986
  count?: number;
967
987
  }
968
- export interface ImportResourceRequest {
969
- /** Resource to import. */
970
- resource?: Resource;
971
- }
972
- export interface ImportResourceResponse {
973
- /** Imported resource. */
974
- resource?: Resource;
975
- }
976
988
  export interface FixResourceSchedulesRequest {
977
989
  /**
978
990
  * ID of the resource to fix schedules for.
@@ -1094,7 +1106,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
1094
1106
  */
1095
1107
  appId?: string;
1096
1108
  /** @readonly */
1097
- identityType?: WebhookIdentityType;
1109
+ identityType?: WebhookIdentityTypeWithLiterals;
1098
1110
  }
1099
1111
  /** @oneof */
1100
1112
  export interface IdentificationDataIdOneOf {
@@ -1126,3 +1138,5 @@ export declare enum WebhookIdentityType {
1126
1138
  WIX_USER = "WIX_USER",
1127
1139
  APP = "APP"
1128
1140
  }
1141
+ /** @enumType */
1142
+ export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
@@ -1 +1 @@
1
- {"version":3,"file":"bookings-resources-v2-resource-resources.types.js","sourceRoot":"","sources":["../../../../src/bookings-resources-v2-resource-resources.types.ts"],"names":[],"mappings":"AA0MA,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,6CAA6C;IAC7C,uCAAqB,CAAA;AACvB,CAAC,EAHW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A;IACf,sBAAsB;IACtB,yBAAa,CAAA;IACb,qBAAqB;IACrB,uBAAW,CAAA;IACX,sBAAsB;IACtB,yBAAa,CAAA;IACb,sBAAsB;IACtB,6BAAiB,CAAA;IACjB,sBAAsB;IACtB,6BAAiB,CAAA;AACnB,CAAC,EAhBW,QAAQ,KAAR,QAAQ,QAgBnB;AAqCD,MAAM,CAAN,IAAY,eAYX;AAZD,WAAY,eAAe;IACzB,wEAAqD,CAAA;IACrD,uFAAuF;IACvF,kCAAe,CAAA;IACf,uFAAuF;IACvF,kCAAe,CAAA;IACf,kEAAkE;IAClE,oCAAiB,CAAA;IACjB,iHAAiH;IACjH,oDAAiC,CAAA;IACjC,yFAAyF;IACzF,oCAAiB,CAAA;AACnB,CAAC,EAZW,eAAe,KAAf,eAAe,QAY1B;AAmDD,MAAM,CAAN,IAAY,IAKX;AALD,WAAY,IAAI;IACd,8CAA8C;IAC9C,iBAAS,CAAA;IACT,uCAAuC;IACvC,mBAAW,CAAA;AACb,CAAC,EALW,IAAI,KAAJ,IAAI,QAKf;AAkdD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
1
+ {"version":3,"file":"bookings-resources-v2-resource-resources.types.js","sourceRoot":"","sources":["../../../../src/bookings-resources-v2-resource-resources.types.ts"],"names":[],"mappings":"AA0MA,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,6CAA6C;IAC7C,uCAAqB,CAAA;AACvB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAsSD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AA0DD,MAAM,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A;AACnB,CAAC,EAhBW,QAAQ,KAAR,QAAQ,QAgBnB;AAiDD,MAAM,CAAN,IAAY,eAYX;AAZD,WAAY,eAAe;IACzB,wEAAqD,CAAA;IACrD,uFAAuF;IACvF,kCAAe,CAAA;IACf,uFAAuF;IACvF,kCAAe,CAAA;IACf,kEAAkE;IAClE,oCAAiB,CAAA;IACjB,iHAAiH;IACjH,oDAAiC,CAAA;IACjC,yFAAyF;IACzF,oCAAiB,CAAA;AACnB,CAAC,EAZW,eAAe,KAAf,eAAe,QAY1B;AA6DD,MAAM,CAAN,IAAY,IAKX;AALD,WAAY,IAAI;IACd,8CAA8C;IAC9C,iBAAS,CAAA;IACT,uCAAuC;IACvC,mBAAW,CAAA;AACb,CAAC,EALW,IAAI,KAAJ,IAAI,QAKf;AA2cD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
@@ -1,4 +1,4 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
1
+ import { Search as SearchSdkType, NonNullablePaths, SearchSpec } from '@wix/sdk-types';
2
2
  /**
3
3
  * A resource represents an entity, such as a room or a staff member, that can be
4
4
  * scheduled for use in a *booking*
@@ -195,6 +195,8 @@ export declare enum ManagementType {
195
195
  /** The resource is managed by a Wix user. */
196
196
  WIX_USER = "WIX_USER"
197
197
  }
198
+ /** @enumType */
199
+ export type ManagementTypeWithLiterals = ManagementType | 'WIX_USER';
198
200
  export interface ExtendedFields {
199
201
  /**
200
202
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
@@ -452,12 +454,14 @@ export interface Sorting {
452
454
  */
453
455
  fieldName?: string;
454
456
  /** Sort order. */
455
- order?: SortOrder;
457
+ order?: SortOrderWithLiterals;
456
458
  }
457
459
  export declare enum SortOrder {
458
460
  ASC = "ASC",
459
461
  DESC = "DESC"
460
462
  }
463
+ /** @enumType */
464
+ export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
461
465
  export interface Aggregation extends AggregationKindOneOf {
462
466
  /** Value aggregation */
463
467
  value?: ValueAggregation;
@@ -475,7 +479,7 @@ export interface Aggregation extends AggregationKindOneOf {
475
479
  */
476
480
  name?: string | null;
477
481
  /** Type of aggregation, client must provide matching aggregation field below */
478
- type?: AggregationType;
482
+ type?: AggregationTypeWithLiterals;
479
483
  /**
480
484
  * Field to aggregate by, use dot notation to specify json path
481
485
  * @maxLength 200
@@ -514,18 +518,24 @@ export declare enum SortType {
514
518
  /** Should sort by value of the field alphabetically */
515
519
  VALUE = "VALUE"
516
520
  }
521
+ /** @enumType */
522
+ export type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
517
523
  export declare enum SortDirection {
518
524
  /** Should sort in descending order */
519
525
  DESC = "DESC",
520
526
  /** Should sort in ascending order */
521
527
  ASC = "ASC"
522
528
  }
529
+ /** @enumType */
530
+ export type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
523
531
  export declare enum MissingValues {
524
532
  /** Should missing values be excluded from the aggregation results */
525
533
  EXCLUDE = "EXCLUDE",
526
534
  /** Should missing values be included in the aggregation results */
527
535
  INCLUDE = "INCLUDE"
528
536
  }
537
+ /** @enumType */
538
+ export type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
529
539
  export interface IncludeMissingValuesOptions {
530
540
  /**
531
541
  * Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
@@ -542,17 +552,19 @@ export declare enum ScalarType {
542
552
  /** Maximum value */
543
553
  MAX = "MAX"
544
554
  }
555
+ /** @enumType */
556
+ export type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
545
557
  export interface ValueAggregation extends ValueAggregationOptionsOneOf {
546
558
  /** Options for including missing values */
547
559
  includeOptions?: IncludeMissingValuesOptions;
548
560
  /** Should sort by number of matches or value of the field */
549
- sortType?: SortType;
561
+ sortType?: SortTypeWithLiterals;
550
562
  /** Should sort in ascending or descending order */
551
- sortDirection?: SortDirection;
563
+ sortDirection?: SortDirectionWithLiterals;
552
564
  /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
553
565
  limit?: number | null;
554
566
  /** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
555
- missingValues?: MissingValues;
567
+ missingValues?: MissingValuesWithLiterals;
556
568
  }
557
569
  /** @oneof */
558
570
  export interface ValueAggregationOptionsOneOf {
@@ -570,6 +582,8 @@ export declare enum NestedAggregationType {
570
582
  /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
571
583
  DATE_HISTOGRAM = "DATE_HISTOGRAM"
572
584
  }
585
+ /** @enumType */
586
+ export type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
573
587
  export interface RangeAggregation {
574
588
  /**
575
589
  * 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
@@ -579,11 +593,11 @@ export interface RangeAggregation {
579
593
  }
580
594
  export interface ScalarAggregation {
581
595
  /** Define the operator for the scalar aggregation */
582
- type?: ScalarType;
596
+ type?: ScalarTypeWithLiterals;
583
597
  }
584
598
  export interface DateHistogramAggregation {
585
599
  /** Interval for date histogram aggregation */
586
- interval?: Interval;
600
+ interval?: IntervalWithLiterals;
587
601
  }
588
602
  export declare enum Interval {
589
603
  UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
@@ -602,6 +616,8 @@ export declare enum Interval {
602
616
  /** Second interval */
603
617
  SECOND = "SECOND"
604
618
  }
619
+ /** @enumType */
620
+ export type IntervalWithLiterals = Interval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
605
621
  export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
606
622
  /** Value aggregation */
607
623
  value?: ValueAggregation;
@@ -617,7 +633,7 @@ export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
617
633
  */
618
634
  name?: string | null;
619
635
  /** Type of aggregation, client must provide matching aggregation field below */
620
- type?: NestedAggregationType;
636
+ type?: NestedAggregationTypeWithLiterals;
621
637
  /**
622
638
  * Field to aggregate by, use dont notation to specify json path
623
639
  * @maxLength 200
@@ -648,6 +664,8 @@ export declare enum AggregationType {
648
664
  /** Multi-level aggregation, where each next aggregation is nested within previous one */
649
665
  NESTED = "NESTED"
650
666
  }
667
+ /** @enumType */
668
+ export type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
651
669
  /** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
652
670
  export interface NestedAggregation {
653
671
  /**
@@ -678,7 +696,7 @@ export interface GroupByAggregationKindOneOf {
678
696
  }
679
697
  export interface SearchDetails {
680
698
  /** Defines how separate search terms in `expression` are combined */
681
- mode?: Mode;
699
+ mode?: ModeWithLiterals;
682
700
  /**
683
701
  * Search term or expression
684
702
  * @maxLength 100
@@ -699,6 +717,8 @@ export declare enum Mode {
699
717
  /** All search terms must be present */
700
718
  AND = "AND"
701
719
  }
720
+ /** @enumType */
721
+ export type ModeWithLiterals = Mode | 'OR' | 'AND';
702
722
  export interface SearchResourcesResponse {
703
723
  /** Retrieved resources. */
704
724
  resources?: Resource[];
@@ -744,7 +764,7 @@ export interface NestedAggregationResults extends NestedAggregationResultsResult
744
764
  */
745
765
  name?: string;
746
766
  /** Type of aggregation that matches result */
747
- type?: AggregationType;
767
+ type?: AggregationTypeWithLiterals;
748
768
  /**
749
769
  * Field to aggregate by, matches the one provided in request
750
770
  * @maxLength 200
@@ -776,7 +796,7 @@ export interface RangeResults {
776
796
  }
777
797
  export interface AggregationResultsScalarResult {
778
798
  /** Type of scalar aggregation */
779
- type?: ScalarType;
799
+ type?: ScalarTypeWithLiterals;
780
800
  /** Value of the scalar aggregation */
781
801
  value?: number;
782
802
  }
@@ -888,7 +908,7 @@ export interface AggregationResults extends AggregationResultsResultOneOf {
888
908
  */
889
909
  name?: string;
890
910
  /** Type of aggregation that must match provided kind as derived from search request */
891
- type?: AggregationType;
911
+ type?: AggregationTypeWithLiterals;
892
912
  /**
893
913
  * Field to aggregate by as derived from search request
894
914
  * @maxLength 200
@@ -966,14 +986,6 @@ export interface CountResourcesResponse {
966
986
  /** Total number of resources matching the filter. */
967
987
  count?: number;
968
988
  }
969
- export interface ImportResourceRequest {
970
- /** Resource to import. */
971
- resource?: Resource;
972
- }
973
- export interface ImportResourceResponse {
974
- /** Imported resource. */
975
- resource?: Resource;
976
- }
977
989
  export interface FixResourceSchedulesRequest {
978
990
  /**
979
991
  * ID of the resource to fix schedules for.
@@ -1093,7 +1105,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
1093
1105
  */
1094
1106
  appId?: string;
1095
1107
  /** @readonly */
1096
- identityType?: WebhookIdentityType;
1108
+ identityType?: WebhookIdentityTypeWithLiterals;
1097
1109
  }
1098
1110
  /** @oneof */
1099
1111
  export interface IdentificationDataIdOneOf {
@@ -1125,6 +1137,8 @@ export declare enum WebhookIdentityType {
1125
1137
  WIX_USER = "WIX_USER",
1126
1138
  APP = "APP"
1127
1139
  }
1140
+ /** @enumType */
1141
+ export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1128
1142
  export interface BaseEventMetadata {
1129
1143
  /**
1130
1144
  * App instance ID.
@@ -1430,8 +1444,12 @@ export declare function bulkDeleteResources(ids: string[]): Promise<NonNullableP
1430
1444
  * Refer to the *supported filters article*
1431
1445
  * ([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))
1432
1446
  * for a complete list of supported filters and sorting options.
1447
+ * @param search - Search condition. Refer to the *supported filters article*
1448
+ * ([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))
1449
+ * for a complete list of supported filters and sorting options.
1433
1450
  * @public
1434
1451
  * @documentationMaturity preview
1452
+ * @requiredField search
1435
1453
  * @permissionId BOOKINGS.RESOURCE_READ
1436
1454
  * @permissionScope Read Bookings - Public Data
1437
1455
  * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
@@ -1447,17 +1465,174 @@ export declare function bulkDeleteResources(ids: string[]): Promise<NonNullableP
1447
1465
  * @applicableIdentity VISITOR
1448
1466
  * @fqn wix.bookings.resources.v2.ResourcesService.SearchResources
1449
1467
  */
1450
- export declare function searchResources(options?: SearchResourcesOptions): Promise<NonNullablePaths<SearchResourcesResponse, {
1468
+ export declare function searchResources(search: ResourceSearch): Promise<NonNullablePaths<SearchResourcesResponse, {
1451
1469
  [P in ResourceNonNullablePaths]: `resources.${number}.${P}`;
1452
1470
  }[ResourceNonNullablePaths] | `aggregationData.results` | `aggregationData.results.${number}.scalar.type` | `aggregationData.results.${number}.scalar.value` | `aggregationData.results.${number}.name` | `aggregationData.results.${number}.type` | `aggregationData.results.${number}.fieldPath`>>;
1453
- export interface SearchResourcesOptions {
1454
- /**
1455
- * Search condition. Refer to the *supported filters article*
1456
- * ([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))
1457
- * for a complete list of supported filters and sorting options.
1458
- */
1459
- search?: CursorSearch;
1460
- }
1471
+ export interface ResourceSearchSpec extends SearchSpec {
1472
+ aggregatable: [
1473
+ '_createdDate',
1474
+ '_id',
1475
+ '_updatedDate',
1476
+ 'appId',
1477
+ 'managementType',
1478
+ 'singleResource.locationOptions.availableInAllLocations',
1479
+ 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations',
1480
+ 'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations',
1481
+ 'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations',
1482
+ 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId',
1483
+ 'type'
1484
+ ];
1485
+ paging: 'cursor';
1486
+ wql: [
1487
+ {
1488
+ operators: ['$hasAll', '$hasSome'];
1489
+ fields: [
1490
+ 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'
1491
+ ];
1492
+ sort: 'BOTH';
1493
+ },
1494
+ {
1495
+ operators: '*';
1496
+ fields: [
1497
+ '_createdDate',
1498
+ '_id',
1499
+ '_updatedDate',
1500
+ 'appId',
1501
+ 'managementType',
1502
+ 'name',
1503
+ 'singleResource.locationOptions.availableInAllLocations',
1504
+ 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations',
1505
+ 'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations',
1506
+ 'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations',
1507
+ 'type'
1508
+ ];
1509
+ sort: 'BOTH';
1510
+ }
1511
+ ];
1512
+ }
1513
+ export type CommonSearchWithEntityContext = SearchSdkType<Resource, ResourceSearchSpec>;
1514
+ export type ResourceSearch = {
1515
+ /**
1516
+ Cursor pointing to page of results.
1517
+ When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
1518
+ */
1519
+ cursorPaging?: {
1520
+ /**
1521
+ Maximum number of items to return in the results.
1522
+ @max: 100
1523
+ */
1524
+ limit?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit'] | null;
1525
+ /**
1526
+ Pointer to the next or previous page in the list of results.
1527
+
1528
+ Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1529
+ Not relevant for the first request.
1530
+ @maxLength: 16000
1531
+ */
1532
+ cursor?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor'] | null;
1533
+ };
1534
+ /**
1535
+ 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)
1536
+ */
1537
+ filter?: CommonSearchWithEntityContext['filter'] | null;
1538
+ /**
1539
+ Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
1540
+ @maxSize: 10
1541
+ */
1542
+ sort?: {
1543
+ /**
1544
+ Name of the field to sort by.
1545
+ @maxLength: 512
1546
+ */
1547
+ fieldName?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['fieldName'];
1548
+ /**
1549
+ Sort order.
1550
+ */
1551
+ order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];
1552
+ }[];
1553
+ /**
1554
+ 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.
1555
+ @maxSize: 10
1556
+ */
1557
+ aggregations?: {
1558
+ /**
1559
+ Value aggregation
1560
+ */
1561
+ value?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['value'];
1562
+ /**
1563
+ Range aggregation
1564
+ */
1565
+ range?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['range'];
1566
+ /**
1567
+ Scalar aggregation
1568
+ */
1569
+ scalar?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['scalar'];
1570
+ /**
1571
+ Date histogram aggregation
1572
+ */
1573
+ dateHistogram?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['dateHistogram'];
1574
+ /**
1575
+ Nested aggregation
1576
+ */
1577
+ nested?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['nested'];
1578
+ /**
1579
+ User-defined name of aggregation, should be unique, will appear in aggregation results
1580
+ @maxLength: 100
1581
+ */
1582
+ name?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['name'] | null;
1583
+ /**
1584
+ Type of aggregation, client must provide matching aggregation field below
1585
+ */
1586
+ type?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['type'];
1587
+ /**
1588
+ Field to aggregate by, use dot notation to specify json path
1589
+ @maxLength: 200
1590
+ */
1591
+ fieldPath?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['fieldPath'];
1592
+ /**
1593
+ deprecated, use `nested` instead
1594
+ @deprecated: deprecated, use `nested` instead,
1595
+ @replacedBy: kind.nested,
1596
+ @targetRemovalDate: 2024-03-30
1597
+ */
1598
+ groupBy?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['groupBy'];
1599
+ }[];
1600
+ /**
1601
+ Free text to match in searchable fields
1602
+ */
1603
+ search?: {
1604
+ /**
1605
+ Defines how separate search terms in `expression` are combined
1606
+ */
1607
+ mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];
1608
+ /**
1609
+ Search term or expression
1610
+ @maxLength: 100
1611
+ */
1612
+ expression?: NonNullable<CommonSearchWithEntityContext['search']>['expression'] | null;
1613
+ /**
1614
+ Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path
1615
+ @maxLength: 200,
1616
+ @maxSize: 20
1617
+ */
1618
+ fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];
1619
+ /**
1620
+ Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm)
1621
+ */
1622
+ fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];
1623
+ };
1624
+ /**
1625
+ UTC offset or IANA time zone. Valid values are
1626
+ ISO 8601 UTC offsets, such as +02:00 or -06:00,
1627
+ and IANA time zone IDs, such as Europe/Rome
1628
+
1629
+ Affects all filters and aggregations returned values.
1630
+ You may override this behavior in a specific filter by providing
1631
+ timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
1632
+ @maxLength: 50
1633
+ */
1634
+ timeZone?: CommonSearchWithEntityContext['timeZone'] | null;
1635
+ };
1461
1636
  /**
1462
1637
  * Creates a query to retrieve a list of resources.
1463
1638
  *
@@ -1521,22 +1696,22 @@ export interface ResourcesQueryBuilder {
1521
1696
  * @param value - Value to compare against.
1522
1697
  * @documentationMaturity preview
1523
1698
  */
1524
- ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
1699
+ ge: (propertyName: 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder;
1525
1700
  /** @param propertyName - Property whose value is compared with `value`.
1526
1701
  * @param value - Value to compare against.
1527
1702
  * @documentationMaturity preview
1528
1703
  */
1529
- gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
1704
+ gt: (propertyName: 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder;
1530
1705
  /** @param propertyName - Property whose value is compared with `value`.
1531
1706
  * @param value - Value to compare against.
1532
1707
  * @documentationMaturity preview
1533
1708
  */
1534
- le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
1709
+ le: (propertyName: 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder;
1535
1710
  /** @param propertyName - Property whose value is compared with `value`.
1536
1711
  * @param value - Value to compare against.
1537
1712
  * @documentationMaturity preview
1538
1713
  */
1539
- lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
1714
+ lt: (propertyName: 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder;
1540
1715
  /** @param propertyName - Property whose value is compared with `string`.
1541
1716
  * @param string - String to compare against. Case-insensitive.
1542
1717
  * @documentationMaturity preview