@wix/auto_sdk_bookings_resources 1.0.20 → 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.
- package/build/cjs/index.typings.d.ts +8 -2
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +1 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +6 -3
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js +1 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +35 -13
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +210 -27
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js +8 -6
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
- package/build/es/index.typings.d.ts +8 -2
- package/build/es/src/bookings-resources-v2-resource-resources.context.d.ts +1 -1
- package/build/es/src/bookings-resources-v2-resource-resources.public.d.ts +6 -3
- package/build/es/src/bookings-resources-v2-resource-resources.public.js +1 -1
- package/build/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
- package/build/es/src/bookings-resources-v2-resource-resources.types.d.ts +35 -13
- package/build/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
- package/build/es/src/bookings-resources-v2-resource-resources.universal.d.ts +210 -27
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js +8 -6
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +8 -2
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +1 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +6 -3
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js +1 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +35 -13
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +210 -27
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js +8 -6
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
- package/build/internal/es/index.typings.d.ts +8 -2
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.d.ts +1 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.d.ts +6 -3
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js +1 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.d.ts +35 -13
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.d.ts +210 -27
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js +8 -6
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
- 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?:
|
|
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?:
|
|
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?:
|
|
560
|
+
sortType?: SortTypeWithLiterals;
|
|
549
561
|
/** Should sort in ascending or descending order */
|
|
550
|
-
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?:
|
|
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?:
|
|
595
|
+
type?: ScalarTypeWithLiterals;
|
|
582
596
|
}
|
|
583
597
|
export interface DateHistogramAggregation {
|
|
584
598
|
/** Interval for date histogram aggregation */
|
|
585
|
-
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
910
|
+
type?: AggregationTypeWithLiterals;
|
|
891
911
|
/**
|
|
892
912
|
* Field to aggregate by as derived from search request
|
|
893
913
|
* @maxLength 200
|
|
@@ -1086,7 +1106,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
1086
1106
|
*/
|
|
1087
1107
|
appId?: string;
|
|
1088
1108
|
/** @readonly */
|
|
1089
|
-
identityType?:
|
|
1109
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
1090
1110
|
}
|
|
1091
1111
|
/** @oneof */
|
|
1092
1112
|
export interface IdentificationDataIdOneOf {
|
|
@@ -1118,3 +1138,5 @@ export declare enum WebhookIdentityType {
|
|
|
1118
1138
|
WIX_USER = "WIX_USER",
|
|
1119
1139
|
APP = "APP"
|
|
1120
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,cAAc,KAAd,cAAc,QAGzB;
|
|
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,CAAN,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,uCAAuC;IACvC,2BAAe,CAAA;IACf,uDAAuD;IACvD,2BAAe,CAAA;AACjB,CAAC,EALW,QAAQ,KAAR,QAAQ,QAKnB;AAKD,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,sCAAsC;IACtC,8BAAa,CAAA;IACb,qCAAqC;IACrC,4BAAW,CAAA;AACb,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAKD,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,qEAAqE;IACrE,oCAAmB,CAAA;IACnB,mEAAmE;IACnE,oCAAmB,CAAA;AACrB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAaD,MAAM,CAAN,IAAY,UAQX;AARD,WAAY,UAAU;IACpB,yDAA2C,CAAA;IAC3C,+BAA+B;IAC/B,+CAAiC,CAAA;IACjC,oBAAoB;IACpB,yBAAW,CAAA;IACX,oBAAoB;IACpB,yBAAW,CAAA;AACb,CAAC,EARW,UAAU,KAAV,UAAU,QAQrB;AA6BD,MAAM,CAAN,IAAY,qBAUX;AAVD,WAAY,qBAAqB;IAC/B,8EAAqD,CAAA;IACrD,uFAAuF;IACvF,wCAAe,CAAA;IACf,uFAAuF;IACvF,wCAAe,CAAA;IACf,kEAAkE;IAClE,0CAAiB,CAAA;IACjB,iHAAiH;IACjH,0DAAiC,CAAA;AACnC,CAAC,EAVW,qBAAqB,KAArB,qBAAqB,QAUhC;AA6BD,MAAM,CAAN,IAAY,QAgBX;AAhBD,WAAY,QAAQ;IAClB,iDAAqC,CAAA;IACrC,sBAAsB;IACtB,yBAAa,CAAA;IACb,uBAAuB;IACvB,2BAAe,CAAA;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;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?:
|
|
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?:
|
|
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?:
|
|
561
|
+
sortType?: SortTypeWithLiterals;
|
|
550
562
|
/** Should sort in ascending or descending order */
|
|
551
|
-
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?:
|
|
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?:
|
|
596
|
+
type?: ScalarTypeWithLiterals;
|
|
583
597
|
}
|
|
584
598
|
export interface DateHistogramAggregation {
|
|
585
599
|
/** Interval for date histogram aggregation */
|
|
586
|
-
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
911
|
+
type?: AggregationTypeWithLiterals;
|
|
892
912
|
/**
|
|
893
913
|
* Field to aggregate by as derived from search request
|
|
894
914
|
* @maxLength 200
|
|
@@ -1085,7 +1105,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
1085
1105
|
*/
|
|
1086
1106
|
appId?: string;
|
|
1087
1107
|
/** @readonly */
|
|
1088
|
-
identityType?:
|
|
1108
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
1089
1109
|
}
|
|
1090
1110
|
/** @oneof */
|
|
1091
1111
|
export interface IdentificationDataIdOneOf {
|
|
@@ -1117,6 +1137,8 @@ export declare enum WebhookIdentityType {
|
|
|
1117
1137
|
WIX_USER = "WIX_USER",
|
|
1118
1138
|
APP = "APP"
|
|
1119
1139
|
}
|
|
1140
|
+
/** @enumType */
|
|
1141
|
+
export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
1120
1142
|
export interface BaseEventMetadata {
|
|
1121
1143
|
/**
|
|
1122
1144
|
* App instance ID.
|
|
@@ -1422,8 +1444,12 @@ export declare function bulkDeleteResources(ids: string[]): Promise<NonNullableP
|
|
|
1422
1444
|
* Refer to the *supported filters article*
|
|
1423
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))
|
|
1424
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.
|
|
1425
1450
|
* @public
|
|
1426
1451
|
* @documentationMaturity preview
|
|
1452
|
+
* @requiredField search
|
|
1427
1453
|
* @permissionId BOOKINGS.RESOURCE_READ
|
|
1428
1454
|
* @permissionScope Read Bookings - Public Data
|
|
1429
1455
|
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
@@ -1439,17 +1465,174 @@ export declare function bulkDeleteResources(ids: string[]): Promise<NonNullableP
|
|
|
1439
1465
|
* @applicableIdentity VISITOR
|
|
1440
1466
|
* @fqn wix.bookings.resources.v2.ResourcesService.SearchResources
|
|
1441
1467
|
*/
|
|
1442
|
-
export declare function searchResources(
|
|
1468
|
+
export declare function searchResources(search: ResourceSearch): Promise<NonNullablePaths<SearchResourcesResponse, {
|
|
1443
1469
|
[P in ResourceNonNullablePaths]: `resources.${number}.${P}`;
|
|
1444
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`>>;
|
|
1445
|
-
export interface
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
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
|
+
};
|
|
1453
1636
|
/**
|
|
1454
1637
|
* Creates a query to retrieve a list of resources.
|
|
1455
1638
|
*
|
|
@@ -1513,22 +1696,22 @@ export interface ResourcesQueryBuilder {
|
|
|
1513
1696
|
* @param value - Value to compare against.
|
|
1514
1697
|
* @documentationMaturity preview
|
|
1515
1698
|
*/
|
|
1516
|
-
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;
|
|
1517
1700
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1518
1701
|
* @param value - Value to compare against.
|
|
1519
1702
|
* @documentationMaturity preview
|
|
1520
1703
|
*/
|
|
1521
|
-
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;
|
|
1522
1705
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1523
1706
|
* @param value - Value to compare against.
|
|
1524
1707
|
* @documentationMaturity preview
|
|
1525
1708
|
*/
|
|
1526
|
-
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;
|
|
1527
1710
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1528
1711
|
* @param value - Value to compare against.
|
|
1529
1712
|
* @documentationMaturity preview
|
|
1530
1713
|
*/
|
|
1531
|
-
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;
|
|
1532
1715
|
/** @param propertyName - Property whose value is compared with `string`.
|
|
1533
1716
|
* @param string - String to compare against. Case-insensitive.
|
|
1534
1717
|
* @documentationMaturity preview
|
|
@@ -382,8 +382,12 @@ export async function bulkDeleteResources(ids) {
|
|
|
382
382
|
* Refer to the *supported filters article*
|
|
383
383
|
* ([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))
|
|
384
384
|
* for a complete list of supported filters and sorting options.
|
|
385
|
+
* @param search - Search condition. Refer to the *supported filters article*
|
|
386
|
+
* ([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))
|
|
387
|
+
* for a complete list of supported filters and sorting options.
|
|
385
388
|
* @public
|
|
386
389
|
* @documentationMaturity preview
|
|
390
|
+
* @requiredField search
|
|
387
391
|
* @permissionId BOOKINGS.RESOURCE_READ
|
|
388
392
|
* @permissionScope Read Bookings - Public Data
|
|
389
393
|
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
@@ -399,12 +403,10 @@ export async function bulkDeleteResources(ids) {
|
|
|
399
403
|
* @applicableIdentity VISITOR
|
|
400
404
|
* @fqn wix.bookings.resources.v2.ResourcesService.SearchResources
|
|
401
405
|
*/
|
|
402
|
-
export async function searchResources(
|
|
406
|
+
export async function searchResources(search) {
|
|
403
407
|
// @ts-ignore
|
|
404
408
|
const { httpClient, sideEffects } = arguments[1];
|
|
405
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
406
|
-
search: options?.search,
|
|
407
|
-
});
|
|
409
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ search: search });
|
|
408
410
|
const reqOpts = ambassadorWixBookingsResourcesV2Resource.searchResources(payload);
|
|
409
411
|
sideEffects?.onSiteCall?.();
|
|
410
412
|
try {
|
|
@@ -415,9 +417,9 @@ export async function searchResources(options) {
|
|
|
415
417
|
catch (err) {
|
|
416
418
|
const transformedError = sdkTransformError(err, {
|
|
417
419
|
spreadPathsToArguments: {},
|
|
418
|
-
explicitPathsToArguments: { search: '$[0]
|
|
420
|
+
explicitPathsToArguments: { search: '$[0]' },
|
|
419
421
|
singleArgumentUnchanged: false,
|
|
420
|
-
}, ['
|
|
422
|
+
}, ['search']);
|
|
421
423
|
sideEffects?.onError?.(err);
|
|
422
424
|
throw transformedError;
|
|
423
425
|
}
|