@wix/bookings 1.0.39 → 1.0.40
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/src/bookings-services-v2-service.http.d.ts +2 -17
- package/build/cjs/src/bookings-services-v2-service.http.js +3 -18
- package/build/cjs/src/bookings-services-v2-service.http.js.map +1 -1
- package/build/cjs/src/bookings-services-v2-service.public.d.ts +1 -1
- package/build/cjs/src/bookings-services-v2-service.types.d.ts +42 -33
- package/build/cjs/src/bookings-services-v2-service.types.js +1 -1
- package/build/cjs/src/bookings-services-v2-service.types.js.map +1 -1
- package/build/cjs/src/bookings-services-v2-service.universal.d.ts +45 -49
- package/build/cjs/src/bookings-services-v2-service.universal.js +6 -19
- package/build/cjs/src/bookings-services-v2-service.universal.js.map +1 -1
- package/build/es/src/bookings-services-v2-service.http.d.ts +2 -17
- package/build/es/src/bookings-services-v2-service.http.js +3 -18
- package/build/es/src/bookings-services-v2-service.http.js.map +1 -1
- package/build/es/src/bookings-services-v2-service.public.d.ts +1 -1
- package/build/es/src/bookings-services-v2-service.types.d.ts +42 -33
- package/build/es/src/bookings-services-v2-service.types.js +1 -1
- package/build/es/src/bookings-services-v2-service.types.js.map +1 -1
- package/build/es/src/bookings-services-v2-service.universal.d.ts +45 -49
- package/build/es/src/bookings-services-v2-service.universal.js +6 -19
- package/build/es/src/bookings-services-v2-service.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
2
|
import { GetServiceRequest, GetServiceResponse, QueryServicesRequest, QueryServicesResponse } from './bookings-services-v2-service.types';
|
|
3
|
-
/**
|
|
3
|
+
/** Retrieves a service. */
|
|
4
4
|
export declare function getService(payload: GetServiceRequest): RequestOptionsFactory<GetServiceResponse>;
|
|
5
|
-
/**
|
|
6
|
-
* <!--ONLY:REST-->
|
|
7
|
-
* Query Services using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) with [Cursor paging](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging) only.
|
|
8
|
-
* Retrieves a list of services according to the provided filters and paging.
|
|
9
|
-
*
|
|
10
|
-
* To retrieve all services use an empty query:
|
|
11
|
-
* ```javascript
|
|
12
|
-
* {
|
|
13
|
-
* "query": {}
|
|
14
|
-
* }
|
|
15
|
-
* ```
|
|
16
|
-
* >**Notes:**
|
|
17
|
-
* > + Use UTC when specifying filters with dates.
|
|
18
|
-
* > - Only 1 use at a time of each filter once in the same query is supported. If a filter is defined more than once in a query, only the first occurrence is taken.
|
|
19
|
-
* <!--END:ONLY:REST-->
|
|
20
|
-
*/
|
|
5
|
+
/** To learn about working with Query endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection). */
|
|
21
6
|
export declare function queryServices(payload: QueryServicesRequest): RequestOptionsFactory<QueryServicesResponse>;
|
|
@@ -19,7 +19,7 @@ const _getServiceRequest = {};
|
|
|
19
19
|
const _getServiceResponse = { service: '_service' };
|
|
20
20
|
const _image = { urlExpirationDate: 'google.protobuf.Timestamp' };
|
|
21
21
|
const _location = {
|
|
22
|
-
|
|
22
|
+
calculatedAddress: '_address',
|
|
23
23
|
business: '_businessLocationOptions',
|
|
24
24
|
custom: '_customLocationOptions',
|
|
25
25
|
};
|
|
@@ -87,7 +87,7 @@ function resolveWixBookingsServicesV2ServicesServiceUrl(opts) {
|
|
|
87
87
|
};
|
|
88
88
|
return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
89
89
|
}
|
|
90
|
-
/**
|
|
90
|
+
/** Retrieves a service. */
|
|
91
91
|
function getService(payload) {
|
|
92
92
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getServiceRequest, {});
|
|
93
93
|
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getServiceResponse, {
|
|
@@ -122,22 +122,7 @@ function getService(payload) {
|
|
|
122
122
|
return __getService;
|
|
123
123
|
}
|
|
124
124
|
exports.getService = getService;
|
|
125
|
-
/**
|
|
126
|
-
* <!--ONLY:REST-->
|
|
127
|
-
* Query Services using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) with [Cursor paging](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging) only.
|
|
128
|
-
* Retrieves a list of services according to the provided filters and paging.
|
|
129
|
-
*
|
|
130
|
-
* To retrieve all services use an empty query:
|
|
131
|
-
* ```javascript
|
|
132
|
-
* {
|
|
133
|
-
* "query": {}
|
|
134
|
-
* }
|
|
135
|
-
* ```
|
|
136
|
-
* >**Notes:**
|
|
137
|
-
* > + Use UTC when specifying filters with dates.
|
|
138
|
-
* > - Only 1 use at a time of each filter once in the same query is supported. If a filter is defined more than once in a query, only the first occurrence is taken.
|
|
139
|
-
* <!--END:ONLY:REST-->
|
|
140
|
-
*/
|
|
125
|
+
/** To learn about working with Query endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection). */
|
|
141
126
|
function queryServices(payload) {
|
|
142
127
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryServicesRequest, {});
|
|
143
128
|
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryServicesResponse, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookings-services-v2-service.http.js","sourceRoot":"","sources":["../../../src/bookings-services-v2-service.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAUhD,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACjD,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,6BAA6B;CACzC,CAAC;AACF,MAAM,cAAc,GAAG;IACrB,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;CACzC,CAAC;AACF,MAAM,wBAAwB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACzD,MAAM,sBAAsB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACvD,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACpD,MAAM,MAAM,GAAG,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,CAAC;AAClE,MAAM,SAAS,GAAG;IAChB,
|
|
1
|
+
{"version":3,"file":"bookings-services-v2-service.http.js","sourceRoot":"","sources":["../../../src/bookings-services-v2-service.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAUhD,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACjD,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,6BAA6B;CACzC,CAAC;AACF,MAAM,cAAc,GAAG;IACrB,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;CACzC,CAAC;AACF,MAAM,wBAAwB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACzD,MAAM,sBAAsB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACvD,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACpD,MAAM,MAAM,GAAG,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,CAAC;AAClE,MAAM,SAAS,GAAG;IAChB,iBAAiB,EAAE,UAAU;IAC7B,QAA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,uBAAU,EACrD,qBAAqB,EACrB,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EAAC,sBAAsB,EAAE;QAC/D,QAAQ;QACR,gBAAgB;QAChB,cAAc;QACd,wBAAwB;QACxB,sBAAsB;QACtB,MAAM;QACN,SAAS;QACT,MAAM;QACN,UAAU;QACV,SAAS;QACT,QAAQ;QACR,KAAK;KACN,CAAC,CAAC;IAEH,SAAS,eAAe,CAAC,EAAE,IAAI,EAAO;QACpC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,MAAM,EAAE,MAAa;YACrB,GAAG,EAAE,8CAA8C,CAAC;gBAClD,SAAS,EAAE,oBAAoB;gBAC/B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,eAAe,CAAC,OAAO,GAAG,OAAO,CAAC;IAElC,OAAO,eAAe,CAAC;AACzB,CAAC;AAzCD,sCAyCC"}
|
|
@@ -2,4 +2,4 @@ import { HttpClient } from '@wix/sdk-types';
|
|
|
2
2
|
export declare function getService(httpClient: HttpClient): (serviceId: string) => Promise<import("./bookings-services-v2-service.universal").Service>;
|
|
3
3
|
export declare function queryServices(httpClient: HttpClient): () => import("./bookings-services-v2-service.universal").ServicesQueryBuilder;
|
|
4
4
|
export { ServiceType, RateType, LocationType, SortOrder, Status, Event, InvalidSlugError, } from './bookings-services-v2-service.universal';
|
|
5
|
-
export { Service, Media, MediaItem, MediaItemItemOneOf, V2Category, Form, FormSettings, Payment, PaymentRateOneOf, FixedPayment, Money, CustomPayment, VariedPayment, PaymentOptions, OnlineBooking, Conferencing, Location, LocationOptionsOneOf, Address, StreetAddress, AddressLocation, BusinessLocationOptions, CustomLocationOptions, BookingPolicy, PolicyDescription, LimitEarlyBookingPolicy, LimitLateBookingPolicy, BookAfterStartPolicy, CancellationPolicy, ReschedulePolicy, WaitlistPolicy, ParticipantsPolicy, Schedule, AvailabilityConstraints, Slug, URLs, ExtendedFields, SeoSchema, Keyword, Tag, Settings, CreateServiceRequest, CreateServiceResponse, GetServiceRequest, GetServiceResponse, UpdateServiceRequest, UpdateServiceResponse, DeleteServiceRequest, DeleteServiceResponse, QueryServicesRequest, CursorQuery, CursorQueryPagingMethodOneOf, Sorting, CursorPaging, QueryServicesResponse, CursorPagingMetadata, Cursors, CountServicesRequest, CountServicesResponse, CategoryNotification, Category, Empty, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, ExtendedFieldsUpdatedEvent, AddStaffMembersToServiceRequest, AddStaffMembersToServiceResponse, StaffMember, InvalidStaffMember, RemoveStaffMembersFromServiceRequest, RemoveStaffMembersFromServiceResponse, ConnectPricingPlansToServiceRequest, ConnectPricingPlansToServiceResponse, InvalidPricingPlan, DisconnectPricingPlansFromServiceRequest, DisconnectPricingPlansFromServiceResponse, SetCustomSlugRequest, SetCustomSlugResponse, ValidateSlugRequest, ValidateSlugResponse, ServicesQueryResult, ServicesQueryBuilder, } from './bookings-services-v2-service.universal';
|
|
5
|
+
export { Service, Media, MediaItem, MediaItemItemOneOf, V2Category, Form, FormSettings, Payment, PaymentRateOneOf, FixedPayment, Money, CustomPayment, VariedPayment, PaymentOptions, OnlineBooking, Conferencing, Location, LocationOptionsOneOf, Address, AddressStreetOneOf, StreetAddress, AddressLocation, BusinessLocationOptions, CustomLocationOptions, BookingPolicy, PolicyDescription, LimitEarlyBookingPolicy, LimitLateBookingPolicy, BookAfterStartPolicy, CancellationPolicy, ReschedulePolicy, WaitlistPolicy, ParticipantsPolicy, Schedule, AvailabilityConstraints, Slug, URLs, ExtendedFields, SeoSchema, Keyword, Tag, Settings, CreateServiceRequest, CreateServiceResponse, GetServiceRequest, GetServiceResponse, UpdateServiceRequest, UpdateServiceResponse, DeleteServiceRequest, DeleteServiceResponse, QueryServicesRequest, CursorQuery, CursorQueryPagingMethodOneOf, Sorting, CursorPaging, QueryServicesResponse, CursorPagingMetadata, Cursors, CountServicesRequest, CountServicesResponse, CategoryNotification, Category, Empty, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, ExtendedFieldsUpdatedEvent, AddStaffMembersToServiceRequest, AddStaffMembersToServiceResponse, StaffMember, InvalidStaffMember, RemoveStaffMembersFromServiceRequest, RemoveStaffMembersFromServiceResponse, ConnectPricingPlansToServiceRequest, ConnectPricingPlansToServiceResponse, InvalidPricingPlan, DisconnectPricingPlansFromServiceRequest, DisconnectPricingPlansFromServiceResponse, SetCustomSlugRequest, SetCustomSlugResponse, ValidateSlugRequest, ValidateSlugResponse, ServicesQueryResult, ServicesQueryBuilder, } from './bookings-services-v2-service.universal';
|
|
@@ -312,7 +312,7 @@ export interface Location extends LocationOptionsOneOf {
|
|
|
312
312
|
* The location address, based on the location `type`. If `type` is `CUSTOMER`, this address is empty.
|
|
313
313
|
* @readonly
|
|
314
314
|
*/
|
|
315
|
-
|
|
315
|
+
calculatedAddress?: Address;
|
|
316
316
|
/** The service is offered at the referenced business location. */
|
|
317
317
|
business?: BusinessLocationOptions;
|
|
318
318
|
/** The service is offered at a custom location. */
|
|
@@ -327,14 +327,14 @@ export interface LocationOptionsOneOf {
|
|
|
327
327
|
}
|
|
328
328
|
export declare enum LocationType {
|
|
329
329
|
UNKNOWN_LOCATION_TYPE = "UNKNOWN_LOCATION_TYPE",
|
|
330
|
-
/** The location is unique to this service and isn't defined as one of the business locations. */
|
|
330
|
+
/** The location is unique to this service and isn't defined as one of the business locations. `CUSTOM` is the equivalent of the `OWNER_CUSTOM` location type in [Schedules & Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions). */
|
|
331
331
|
CUSTOM = "CUSTOM",
|
|
332
332
|
/** The location is one of the business locations available using the Business Info [Locations API](https://dev.wix.com/api/rest/business-info/locations). */
|
|
333
333
|
BUSINESS = "BUSINESS",
|
|
334
334
|
/** The location can be determined by the customer and is not set up beforehand. This is applicable to services of type `APPOINTMENT` only. */
|
|
335
335
|
CUSTOMER = "CUSTOMER"
|
|
336
336
|
}
|
|
337
|
-
export interface Address {
|
|
337
|
+
export interface Address extends AddressStreetOneOf {
|
|
338
338
|
/** 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */
|
|
339
339
|
country?: string | null;
|
|
340
340
|
/** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */
|
|
@@ -343,10 +343,19 @@ export interface Address {
|
|
|
343
343
|
city?: string | null;
|
|
344
344
|
/** Postal or zip code. */
|
|
345
345
|
postalCode?: string | null;
|
|
346
|
-
/** Street address. Includes street name, number, and apartment number in separate fields. */
|
|
347
|
-
streetAddress?: StreetAddress;
|
|
348
346
|
/** Full address of the location. */
|
|
349
347
|
formattedAddress?: string | null;
|
|
348
|
+
/** Street name and number. */
|
|
349
|
+
streetAddress?: StreetAddress;
|
|
350
|
+
/** Main address line, usually street and number as free text. */
|
|
351
|
+
addressLine?: string | null;
|
|
352
|
+
}
|
|
353
|
+
/** @oneof */
|
|
354
|
+
export interface AddressStreetOneOf {
|
|
355
|
+
/** Street name and number. */
|
|
356
|
+
streetAddress?: StreetAddress;
|
|
357
|
+
/** Main address line, usually street and number as free text. */
|
|
358
|
+
addressLine?: string | null;
|
|
350
359
|
}
|
|
351
360
|
/** Street address. Includes street name, number, and apartment number in separate fields. */
|
|
352
361
|
export interface StreetAddress {
|
|
@@ -702,41 +711,41 @@ export interface Settings {
|
|
|
702
711
|
keywords?: Keyword[];
|
|
703
712
|
}
|
|
704
713
|
export interface CreateServiceRequest {
|
|
705
|
-
/** Service to be created */
|
|
714
|
+
/** Service to be created. */
|
|
706
715
|
service?: Service;
|
|
707
716
|
}
|
|
708
717
|
export interface CreateServiceResponse {
|
|
709
|
-
/** The created
|
|
718
|
+
/** The created service. */
|
|
710
719
|
service?: Service;
|
|
711
720
|
}
|
|
712
721
|
export interface GetServiceRequest {
|
|
713
|
-
/**
|
|
722
|
+
/** ID of the service to retrieve. */
|
|
714
723
|
serviceId: string;
|
|
715
724
|
}
|
|
716
725
|
export interface GetServiceResponse {
|
|
717
|
-
/** The retrieved
|
|
726
|
+
/** The retrieved service. */
|
|
718
727
|
service?: Service;
|
|
719
728
|
}
|
|
720
729
|
export interface UpdateServiceRequest {
|
|
721
|
-
/** Service to
|
|
730
|
+
/** Service to update. [Partial updates](https:\\example.com) are supported. */
|
|
722
731
|
service?: Service;
|
|
723
|
-
/** Explicit list of fields to update */
|
|
732
|
+
/** Explicit list of fields to update. */
|
|
724
733
|
mask?: string[];
|
|
725
734
|
}
|
|
726
735
|
export interface UpdateServiceResponse {
|
|
727
|
-
/** The updated
|
|
736
|
+
/** The updated service. */
|
|
728
737
|
service?: Service;
|
|
729
738
|
}
|
|
730
739
|
export interface DeleteServiceRequest {
|
|
731
|
-
/**
|
|
740
|
+
/** ID of the service to delete. */
|
|
732
741
|
serviceId?: string;
|
|
733
|
-
/** The revision of the
|
|
742
|
+
/** The revision of the service. */
|
|
734
743
|
revision?: string;
|
|
735
744
|
}
|
|
736
745
|
export interface DeleteServiceResponse {
|
|
737
746
|
}
|
|
738
747
|
export interface QueryServicesRequest {
|
|
739
|
-
/** WQL expression */
|
|
748
|
+
/** WQL expression. */
|
|
740
749
|
query: CursorQuery;
|
|
741
750
|
}
|
|
742
751
|
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
@@ -785,9 +794,9 @@ export interface CursorPaging {
|
|
|
785
794
|
cursor?: string | null;
|
|
786
795
|
}
|
|
787
796
|
export interface QueryServicesResponse {
|
|
788
|
-
/** The retrieved
|
|
797
|
+
/** The retrieved services. */
|
|
789
798
|
services?: Service[];
|
|
790
|
-
/** Paging metadata, count and [cursors](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */
|
|
799
|
+
/** Paging metadata, including offset, count and [cursors](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */
|
|
791
800
|
pagingMetadata?: CursorPagingMetadata;
|
|
792
801
|
}
|
|
793
802
|
export interface CursorPagingMetadata {
|
|
@@ -809,11 +818,11 @@ export interface Cursors {
|
|
|
809
818
|
prev?: string | null;
|
|
810
819
|
}
|
|
811
820
|
export interface CountServicesRequest {
|
|
812
|
-
/** The filters
|
|
821
|
+
/** The filters for performing the count. */
|
|
813
822
|
filter?: Record<string, any> | null;
|
|
814
823
|
}
|
|
815
824
|
export interface CountServicesResponse {
|
|
816
|
-
/** The number of
|
|
825
|
+
/** The number of services matching the given filter. */
|
|
817
826
|
count?: number;
|
|
818
827
|
}
|
|
819
828
|
/** An event sent every time a category entity is changed. */
|
|
@@ -925,13 +934,13 @@ export interface ExtendedFieldsUpdatedEvent {
|
|
|
925
934
|
currentEntityAsJson?: string;
|
|
926
935
|
}
|
|
927
936
|
export interface AddStaffMembersToServiceRequest {
|
|
928
|
-
/**
|
|
937
|
+
/** ID of the service to add the staff members to. */
|
|
929
938
|
serviceId?: string;
|
|
930
|
-
/**
|
|
939
|
+
/** IDs of the staff members to add to the service. */
|
|
931
940
|
staffMembersIds?: string[];
|
|
932
941
|
}
|
|
933
942
|
export interface AddStaffMembersToServiceResponse {
|
|
934
|
-
/** The added staff members */
|
|
943
|
+
/** The added staff members. */
|
|
935
944
|
staffMembers?: StaffMember[];
|
|
936
945
|
}
|
|
937
946
|
export interface StaffMember {
|
|
@@ -965,21 +974,21 @@ export interface InvalidStaffMember {
|
|
|
965
974
|
message?: string;
|
|
966
975
|
}
|
|
967
976
|
export interface RemoveStaffMembersFromServiceRequest {
|
|
968
|
-
/**
|
|
977
|
+
/** ID of the service to remove the staff members from. */
|
|
969
978
|
serviceId?: string;
|
|
970
|
-
/**
|
|
979
|
+
/** IDs of the staff members to remove from the service. */
|
|
971
980
|
staffMembersIds?: string[];
|
|
972
981
|
}
|
|
973
982
|
export interface RemoveStaffMembersFromServiceResponse {
|
|
974
983
|
}
|
|
975
984
|
export interface ConnectPricingPlansToServiceRequest {
|
|
976
|
-
/**
|
|
985
|
+
/** ID of the service to add the pricing plans to. */
|
|
977
986
|
serviceId?: string;
|
|
978
|
-
/**
|
|
987
|
+
/** IDs of the pricing plans to connect to the service. */
|
|
979
988
|
pricingPlansIds?: string[];
|
|
980
989
|
}
|
|
981
990
|
export interface ConnectPricingPlansToServiceResponse {
|
|
982
|
-
/**
|
|
991
|
+
/** IDs of the pricing plans connect to the service. */
|
|
983
992
|
pricingPlansIds?: string[];
|
|
984
993
|
}
|
|
985
994
|
export interface InvalidPricingPlan {
|
|
@@ -989,15 +998,15 @@ export interface InvalidPricingPlan {
|
|
|
989
998
|
message?: string;
|
|
990
999
|
}
|
|
991
1000
|
export interface DisconnectPricingPlansFromServiceRequest {
|
|
992
|
-
/**
|
|
1001
|
+
/** ID of the service to disconnect the pricing plans from. */
|
|
993
1002
|
serviceId?: string;
|
|
994
|
-
/**
|
|
1003
|
+
/** ID of the pricing plans to disconnect from the service. */
|
|
995
1004
|
pricingPlansIds?: string[];
|
|
996
1005
|
}
|
|
997
1006
|
export interface DisconnectPricingPlansFromServiceResponse {
|
|
998
1007
|
}
|
|
999
1008
|
export interface SetCustomSlugRequest {
|
|
1000
|
-
/**
|
|
1009
|
+
/** ID of the service to assign the custom slug to. */
|
|
1001
1010
|
serviceId?: string;
|
|
1002
1011
|
/** The custom name to set as the active slug for the service. */
|
|
1003
1012
|
slugName?: string;
|
|
@@ -1011,11 +1020,11 @@ export interface ValidateSlugRequest {
|
|
|
1011
1020
|
slugName?: string;
|
|
1012
1021
|
}
|
|
1013
1022
|
export interface ValidateSlugResponse {
|
|
1014
|
-
/**
|
|
1023
|
+
/** Whether the requested slug name is valid. */
|
|
1015
1024
|
valid?: boolean;
|
|
1016
|
-
/** The requested custom name to validate
|
|
1025
|
+
/** The requested custom slug name to validate. If valid, the slug name can be set as a slug for the service and is populated with the requested slug. Otherwise, `slugName` is empty. */
|
|
1017
1026
|
slugName?: string | null;
|
|
1018
|
-
/**
|
|
1027
|
+
/** If the slug is invalid, this field is populated with the reasons why the slug is invalid. Validation errors may include `SLUG_IS_TOO_LONG`, `SLUG_CONTAIN_ILLEGAL_CHARACTERS`, and `SLUG_ALREADY_EXISTS`. */
|
|
1019
1028
|
errors?: InvalidSlugError[];
|
|
1020
1029
|
}
|
|
1021
1030
|
export declare enum InvalidSlugError {
|
|
@@ -26,7 +26,7 @@ var RateType;
|
|
|
26
26
|
var LocationType;
|
|
27
27
|
(function (LocationType) {
|
|
28
28
|
LocationType["UNKNOWN_LOCATION_TYPE"] = "UNKNOWN_LOCATION_TYPE";
|
|
29
|
-
/** The location is unique to this service and isn't defined as one of the business locations. */
|
|
29
|
+
/** The location is unique to this service and isn't defined as one of the business locations. `CUSTOM` is the equivalent of the `OWNER_CUSTOM` location type in [Schedules & Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions). */
|
|
30
30
|
LocationType["CUSTOM"] = "CUSTOM";
|
|
31
31
|
/** The location is one of the business locations available using the Business Info [Locations API](https://dev.wix.com/api/rest/business-info/locations). */
|
|
32
32
|
LocationType["BUSINESS"] = "BUSINESS";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookings-services-v2-service.types.js","sourceRoot":"","sources":["../../../src/bookings-services-v2-service.types.ts"],"names":[],"mappings":";;;AAsFA,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,4DAA6C,CAAA;IAC7C,qCAAqC;IACrC,0CAA2B,CAAA;IAC3B,8BAA8B;IAC9B,8BAAe,CAAA;IACf,+BAA+B;IAC/B,gCAAiB,CAAA;AACnB,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB;AAmID,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB,mDAAuC,CAAA;IACvC,qCAAqC;IACrC,2BAAe,CAAA;IACf,wEAAwE;IACxE,6BAAiB,CAAA;IACjB,uFAAuF;IACvF,6BAAiB,CAAA;IACjB,8CAA8C;IAC9C,6BAAiB,CAAA;AACnB,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAiHD,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,+DAA+C,CAAA;IAC/C,
|
|
1
|
+
{"version":3,"file":"bookings-services-v2-service.types.js","sourceRoot":"","sources":["../../../src/bookings-services-v2-service.types.ts"],"names":[],"mappings":";;;AAsFA,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,4DAA6C,CAAA;IAC7C,qCAAqC;IACrC,0CAA2B,CAAA;IAC3B,8BAA8B;IAC9B,8BAAe,CAAA;IACf,+BAA+B;IAC/B,gCAAiB,CAAA;AACnB,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB;AAmID,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB,mDAAuC,CAAA;IACvC,qCAAqC;IACrC,2BAAe,CAAA;IACf,wEAAwE;IACxE,6BAAiB,CAAA;IACjB,uFAAuF;IACvF,6BAAiB,CAAA;IACjB,8CAA8C;IAC9C,6BAAiB,CAAA;AACnB,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAiHD,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,+DAA+C,CAAA;IAC/C,iQAAiQ;IACjQ,iCAAiB,CAAA;IACjB,6JAA6J;IAC7J,qCAAqB,CAAA;IACrB,8IAA8I;IAC9I,qCAAqB,CAAA;AACvB,CAAC,EARW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAQvB;AAieD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AA8ED,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,sBAAsB;IACtB,6BAAmB,CAAA;IACnB,2BAA2B;IAC3B,6BAAmB,CAAA;AACrB,CAAC,EALW,MAAM,GAAN,cAAM,KAAN,cAAM,QAKjB;AAED,IAAY,KAIX;AAJD,WAAY,KAAK;IACf,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;AACrB,CAAC,EAJW,KAAK,GAAL,aAAK,KAAL,aAAK,QAIhB;AA4LD,IAAY,gBAQX;AARD,WAAY,gBAAgB;IAC1B,6DAAyC,CAAA;IACzC,gFAAgF;IAChF,yDAAqC,CAAA;IACrC,0DAA0D;IAC1D,uFAAmE,CAAA;IACnE,6EAA6E;IAC7E,+DAA2C,CAAA;AAC7C,CAAC,EARW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAQ3B"}
|
|
@@ -295,7 +295,7 @@ export interface Location extends LocationOptionsOneOf {
|
|
|
295
295
|
* The location address, based on the location `type`. If `type` is `CUSTOMER`, this address is empty.
|
|
296
296
|
* @readonly
|
|
297
297
|
*/
|
|
298
|
-
|
|
298
|
+
calculatedAddress?: Address;
|
|
299
299
|
/** The service is offered at the referenced business location. */
|
|
300
300
|
business?: BusinessLocationOptions;
|
|
301
301
|
/** The service is offered at a custom location. */
|
|
@@ -310,14 +310,14 @@ export interface LocationOptionsOneOf {
|
|
|
310
310
|
}
|
|
311
311
|
export declare enum LocationType {
|
|
312
312
|
UNKNOWN_LOCATION_TYPE = "UNKNOWN_LOCATION_TYPE",
|
|
313
|
-
/** The location is unique to this service and isn't defined as one of the business locations. */
|
|
313
|
+
/** The location is unique to this service and isn't defined as one of the business locations. `CUSTOM` is the equivalent of the `OWNER_CUSTOM` location type in [Schedules & Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions). */
|
|
314
314
|
CUSTOM = "CUSTOM",
|
|
315
315
|
/** The location is one of the business locations available using the Business Info [Locations API](https://dev.wix.com/api/rest/business-info/locations). */
|
|
316
316
|
BUSINESS = "BUSINESS",
|
|
317
317
|
/** The location can be determined by the customer and is not set up beforehand. This is applicable to services of type `APPOINTMENT` only. */
|
|
318
318
|
CUSTOMER = "CUSTOMER"
|
|
319
319
|
}
|
|
320
|
-
export interface Address {
|
|
320
|
+
export interface Address extends AddressStreetOneOf {
|
|
321
321
|
/** 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */
|
|
322
322
|
country?: string | null;
|
|
323
323
|
/** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */
|
|
@@ -326,8 +326,17 @@ export interface Address {
|
|
|
326
326
|
city?: string | null;
|
|
327
327
|
/** Postal or zip code. */
|
|
328
328
|
postalCode?: string | null;
|
|
329
|
-
/** Street
|
|
329
|
+
/** Street name and number. */
|
|
330
330
|
streetAddress?: StreetAddress;
|
|
331
|
+
/** Main address line, usually street and number as free text. */
|
|
332
|
+
addressLine1?: string | null;
|
|
333
|
+
}
|
|
334
|
+
/** @oneof */
|
|
335
|
+
export interface AddressStreetOneOf {
|
|
336
|
+
/** Street name and number. */
|
|
337
|
+
streetAddress?: StreetAddress;
|
|
338
|
+
/** Main address line, usually street and number as free text. */
|
|
339
|
+
addressLine?: string | null;
|
|
331
340
|
}
|
|
332
341
|
/** Street address. Includes street name, number, and apartment number in separate fields. */
|
|
333
342
|
export interface StreetAddress {
|
|
@@ -677,41 +686,41 @@ export interface Settings {
|
|
|
677
686
|
keywords?: Keyword[];
|
|
678
687
|
}
|
|
679
688
|
export interface CreateServiceRequest {
|
|
680
|
-
/** Service to be created */
|
|
689
|
+
/** Service to be created. */
|
|
681
690
|
service?: Service;
|
|
682
691
|
}
|
|
683
692
|
export interface CreateServiceResponse {
|
|
684
|
-
/** The created
|
|
693
|
+
/** The created service. */
|
|
685
694
|
service?: Service;
|
|
686
695
|
}
|
|
687
696
|
export interface GetServiceRequest {
|
|
688
|
-
/**
|
|
697
|
+
/** ID of the service to retrieve. */
|
|
689
698
|
serviceId: string;
|
|
690
699
|
}
|
|
691
700
|
export interface GetServiceResponse {
|
|
692
|
-
/** The retrieved
|
|
701
|
+
/** The retrieved service. */
|
|
693
702
|
service?: Service;
|
|
694
703
|
}
|
|
695
704
|
export interface UpdateServiceRequest {
|
|
696
|
-
/** Service to
|
|
705
|
+
/** Service to update. [Partial updates](https:\\example.com) are supported. */
|
|
697
706
|
service?: Service;
|
|
698
|
-
/** Explicit list of fields to update */
|
|
707
|
+
/** Explicit list of fields to update. */
|
|
699
708
|
mask?: string[];
|
|
700
709
|
}
|
|
701
710
|
export interface UpdateServiceResponse {
|
|
702
|
-
/** The updated
|
|
711
|
+
/** The updated service. */
|
|
703
712
|
service?: Service;
|
|
704
713
|
}
|
|
705
714
|
export interface DeleteServiceRequest {
|
|
706
|
-
/**
|
|
715
|
+
/** ID of the service to delete. */
|
|
707
716
|
serviceId?: string;
|
|
708
|
-
/** The revision of the
|
|
717
|
+
/** The revision of the service. */
|
|
709
718
|
revision?: string;
|
|
710
719
|
}
|
|
711
720
|
export interface DeleteServiceResponse {
|
|
712
721
|
}
|
|
713
722
|
export interface QueryServicesRequest {
|
|
714
|
-
/** WQL expression */
|
|
723
|
+
/** WQL expression. */
|
|
715
724
|
query: CursorQuery;
|
|
716
725
|
}
|
|
717
726
|
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
@@ -760,9 +769,9 @@ export interface CursorPaging {
|
|
|
760
769
|
cursor?: string | null;
|
|
761
770
|
}
|
|
762
771
|
export interface QueryServicesResponse {
|
|
763
|
-
/** The retrieved
|
|
772
|
+
/** The retrieved services. */
|
|
764
773
|
services?: Service[];
|
|
765
|
-
/** Paging metadata, count and [cursors](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */
|
|
774
|
+
/** Paging metadata, including offset, count and [cursors](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */
|
|
766
775
|
pagingMetadata?: CursorPagingMetadata;
|
|
767
776
|
}
|
|
768
777
|
export interface CursorPagingMetadata {
|
|
@@ -784,11 +793,11 @@ export interface Cursors {
|
|
|
784
793
|
prev?: string | null;
|
|
785
794
|
}
|
|
786
795
|
export interface CountServicesRequest {
|
|
787
|
-
/** The filters
|
|
796
|
+
/** The filters for performing the count. */
|
|
788
797
|
filter?: Record<string, any> | null;
|
|
789
798
|
}
|
|
790
799
|
export interface CountServicesResponse {
|
|
791
|
-
/** The number of
|
|
800
|
+
/** The number of services matching the given filter. */
|
|
792
801
|
count?: number;
|
|
793
802
|
}
|
|
794
803
|
/** An event sent every time a category entity is changed. */
|
|
@@ -900,13 +909,13 @@ export interface ExtendedFieldsUpdatedEvent {
|
|
|
900
909
|
currentEntityAsJson?: string;
|
|
901
910
|
}
|
|
902
911
|
export interface AddStaffMembersToServiceRequest {
|
|
903
|
-
/**
|
|
912
|
+
/** ID of the service to add the staff members to. */
|
|
904
913
|
serviceId?: string;
|
|
905
|
-
/**
|
|
914
|
+
/** IDs of the staff members to add to the service. */
|
|
906
915
|
staffMembersIds?: string[];
|
|
907
916
|
}
|
|
908
917
|
export interface AddStaffMembersToServiceResponse {
|
|
909
|
-
/** The added staff members */
|
|
918
|
+
/** The added staff members. */
|
|
910
919
|
staffMembers?: StaffMember[];
|
|
911
920
|
}
|
|
912
921
|
export interface StaffMember {
|
|
@@ -940,21 +949,21 @@ export interface InvalidStaffMember {
|
|
|
940
949
|
message?: string;
|
|
941
950
|
}
|
|
942
951
|
export interface RemoveStaffMembersFromServiceRequest {
|
|
943
|
-
/**
|
|
952
|
+
/** ID of the service to remove the staff members from. */
|
|
944
953
|
serviceId?: string;
|
|
945
|
-
/**
|
|
954
|
+
/** IDs of the staff members to remove from the service. */
|
|
946
955
|
staffMembersIds?: string[];
|
|
947
956
|
}
|
|
948
957
|
export interface RemoveStaffMembersFromServiceResponse {
|
|
949
958
|
}
|
|
950
959
|
export interface ConnectPricingPlansToServiceRequest {
|
|
951
|
-
/**
|
|
960
|
+
/** ID of the service to add the pricing plans to. */
|
|
952
961
|
serviceId?: string;
|
|
953
|
-
/**
|
|
962
|
+
/** IDs of the pricing plans to connect to the service. */
|
|
954
963
|
pricingPlansIds?: string[];
|
|
955
964
|
}
|
|
956
965
|
export interface ConnectPricingPlansToServiceResponse {
|
|
957
|
-
/**
|
|
966
|
+
/** IDs of the pricing plans connect to the service. */
|
|
958
967
|
pricingPlansIds?: string[];
|
|
959
968
|
}
|
|
960
969
|
export interface InvalidPricingPlan {
|
|
@@ -964,15 +973,15 @@ export interface InvalidPricingPlan {
|
|
|
964
973
|
message?: string;
|
|
965
974
|
}
|
|
966
975
|
export interface DisconnectPricingPlansFromServiceRequest {
|
|
967
|
-
/**
|
|
976
|
+
/** ID of the service to disconnect the pricing plans from. */
|
|
968
977
|
serviceId?: string;
|
|
969
|
-
/**
|
|
978
|
+
/** ID of the pricing plans to disconnect from the service. */
|
|
970
979
|
pricingPlansIds?: string[];
|
|
971
980
|
}
|
|
972
981
|
export interface DisconnectPricingPlansFromServiceResponse {
|
|
973
982
|
}
|
|
974
983
|
export interface SetCustomSlugRequest {
|
|
975
|
-
/**
|
|
984
|
+
/** ID of the service to assign the custom slug to. */
|
|
976
985
|
serviceId?: string;
|
|
977
986
|
/** The custom name to set as the active slug for the service. */
|
|
978
987
|
slugName?: string;
|
|
@@ -986,11 +995,11 @@ export interface ValidateSlugRequest {
|
|
|
986
995
|
slugName?: string;
|
|
987
996
|
}
|
|
988
997
|
export interface ValidateSlugResponse {
|
|
989
|
-
/**
|
|
998
|
+
/** Whether the requested slug name is valid. */
|
|
990
999
|
valid?: boolean;
|
|
991
|
-
/** The requested custom name to validate
|
|
1000
|
+
/** The requested custom slug name to validate. If valid, the slug name can be set as a slug for the service and is populated with the requested slug. Otherwise, `slugName` is empty. */
|
|
992
1001
|
slugName?: string | null;
|
|
993
|
-
/**
|
|
1002
|
+
/** If the slug is invalid, this field is populated with the reasons why the slug is invalid. Validation errors may include `SLUG_IS_TOO_LONG`, `SLUG_CONTAIN_ILLEGAL_CHARACTERS`, and `SLUG_ALREADY_EXISTS`. */
|
|
994
1003
|
errors?: InvalidSlugError[];
|
|
995
1004
|
}
|
|
996
1005
|
export declare enum InvalidSlugError {
|
|
@@ -1003,29 +1012,16 @@ export declare enum InvalidSlugError {
|
|
|
1003
1012
|
SLUG_ALREADY_EXISTS = "SLUG_ALREADY_EXISTS"
|
|
1004
1013
|
}
|
|
1005
1014
|
/**
|
|
1006
|
-
*
|
|
1007
|
-
* @param serviceId -
|
|
1015
|
+
* Retrieves a service.
|
|
1016
|
+
* @param serviceId - ID of the service to retrieve.
|
|
1008
1017
|
* @public
|
|
1009
1018
|
* @documentationMaturity preview
|
|
1010
1019
|
* @requiredField serviceId
|
|
1011
|
-
* @returns The retrieved
|
|
1020
|
+
* @returns The retrieved service.
|
|
1012
1021
|
*/
|
|
1013
1022
|
export declare function getService(serviceId: string): Promise<Service>;
|
|
1014
1023
|
/**
|
|
1015
|
-
*
|
|
1016
|
-
* Query Services using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) with [Cursor paging](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging) only.
|
|
1017
|
-
* Retrieves a list of services according to the provided filters and paging.
|
|
1018
|
-
*
|
|
1019
|
-
* To retrieve all services use an empty query:
|
|
1020
|
-
* ```javascript
|
|
1021
|
-
* {
|
|
1022
|
-
* "query": {}
|
|
1023
|
-
* }
|
|
1024
|
-
* ```
|
|
1025
|
-
* >**Notes:**
|
|
1026
|
-
* > + Use UTC when specifying filters with dates.
|
|
1027
|
-
* > - Only 1 use at a time of each filter once in the same query is supported. If a filter is defined more than once in a query, only the first occurrence is taken.
|
|
1028
|
-
* <!--END:ONLY:REST-->
|
|
1024
|
+
* To learn about working with Query endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
1029
1025
|
* @public
|
|
1030
1026
|
* @documentationMaturity preview
|
|
1031
1027
|
*/
|
|
@@ -73,7 +73,7 @@ var RateType;
|
|
|
73
73
|
var LocationType;
|
|
74
74
|
(function (LocationType) {
|
|
75
75
|
LocationType["UNKNOWN_LOCATION_TYPE"] = "UNKNOWN_LOCATION_TYPE";
|
|
76
|
-
/** The location is unique to this service and isn't defined as one of the business locations. */
|
|
76
|
+
/** The location is unique to this service and isn't defined as one of the business locations. `CUSTOM` is the equivalent of the `OWNER_CUSTOM` location type in [Schedules & Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions). */
|
|
77
77
|
LocationType["CUSTOM"] = "CUSTOM";
|
|
78
78
|
/** The location is one of the business locations available using the Business Info [Locations API](https://dev.wix.com/api/rest/business-info/locations). */
|
|
79
79
|
LocationType["BUSINESS"] = "BUSINESS";
|
|
@@ -113,7 +113,7 @@ const _customLocationOptions = { address: 'wix.common.Address' };
|
|
|
113
113
|
const _getServiceRequest = {};
|
|
114
114
|
const _getServiceResponse = { service: '_service' };
|
|
115
115
|
const _location = {
|
|
116
|
-
|
|
116
|
+
calculatedAddress: 'wix.common.Address',
|
|
117
117
|
business: '_businessLocationOptions',
|
|
118
118
|
custom: '_customLocationOptions',
|
|
119
119
|
};
|
|
@@ -132,12 +132,12 @@ const _uRLs = {
|
|
|
132
132
|
calendarPage: 'wix.common.PageUrlV2',
|
|
133
133
|
};
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
136
|
-
* @param serviceId -
|
|
135
|
+
* Retrieves a service.
|
|
136
|
+
* @param serviceId - ID of the service to retrieve.
|
|
137
137
|
* @public
|
|
138
138
|
* @documentationMaturity preview
|
|
139
139
|
* @requiredField serviceId
|
|
140
|
-
* @returns The retrieved
|
|
140
|
+
* @returns The retrieved service.
|
|
141
141
|
*/
|
|
142
142
|
function getService(serviceId) {
|
|
143
143
|
var _a, _b, _c;
|
|
@@ -192,20 +192,7 @@ function getService(serviceId) {
|
|
|
192
192
|
}
|
|
193
193
|
exports.getService = getService;
|
|
194
194
|
/**
|
|
195
|
-
*
|
|
196
|
-
* Query Services using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) with [Cursor paging](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging) only.
|
|
197
|
-
* Retrieves a list of services according to the provided filters and paging.
|
|
198
|
-
*
|
|
199
|
-
* To retrieve all services use an empty query:
|
|
200
|
-
* ```javascript
|
|
201
|
-
* {
|
|
202
|
-
* "query": {}
|
|
203
|
-
* }
|
|
204
|
-
* ```
|
|
205
|
-
* >**Notes:**
|
|
206
|
-
* > + Use UTC when specifying filters with dates.
|
|
207
|
-
* > - Only 1 use at a time of each filter once in the same query is supported. If a filter is defined more than once in a query, only the first occurrence is taken.
|
|
208
|
-
* <!--END:ONLY:REST-->
|
|
195
|
+
* To learn about working with Query endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
209
196
|
* @public
|
|
210
197
|
* @documentationMaturity preview
|
|
211
198
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookings-services-v2-service.universal.js","sourceRoot":"","sources":["../../../src/bookings-services-v2-service.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAIiC;AAEjC,4GAA8F;AAC9F,aAAa;AACb,4FAA6E;AAE7E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAwF5B,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,4DAA6C,CAAA;IAC7C,qCAAqC;IACrC,0CAA2B,CAAA;IAC3B,8BAA8B;IAC9B,8BAAe,CAAA;IACf,+BAA+B;IAC/B,gCAAiB,CAAA;AACnB,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB;AA2GD,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB,mDAAuC,CAAA;IACvC,qCAAqC;IACrC,2BAAe,CAAA;IACf,wEAAwE;IACxE,6BAAiB,CAAA;IACjB,uFAAuF;IACvF,6BAAiB,CAAA;IACjB,8CAA8C;IAC9C,6BAAiB,CAAA;AACnB,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAiHD,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,+DAA+C,CAAA;IAC/C,
|
|
1
|
+
{"version":3,"file":"bookings-services-v2-service.universal.js","sourceRoot":"","sources":["../../../src/bookings-services-v2-service.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAIiC;AAEjC,4GAA8F;AAC9F,aAAa;AACb,4FAA6E;AAE7E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,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