@wix/bookings 1.0.417 → 1.0.419

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.
@@ -180,31 +180,41 @@ interface QueryAvailabilityOptions {
180
180
  slotsPerDay?: number | null;
181
181
  }
182
182
 
183
- type RESTFunctionDescriptor$b<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$b) => T;
184
- interface HttpClient$b {
185
- request<TResponse, TData = any>(req: RequestOptionsFactory$b<TResponse, TData>): Promise<HttpResponse$b<TResponse>>;
183
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
184
+ interface HttpClient {
185
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
186
186
  fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
187
187
  }
188
- type RequestOptionsFactory$b<TResponse = any, TData = any> = (context: any) => RequestOptions$b<TResponse, TData>;
189
- type HttpResponse$b<T = any> = {
188
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
189
+ type HttpResponse<T = any> = {
190
190
  data: T;
191
191
  status: number;
192
192
  statusText: string;
193
193
  headers: any;
194
194
  request?: any;
195
195
  };
196
- type RequestOptions$b<_TResponse = any, Data = any> = {
196
+ type RequestOptions<_TResponse = any, Data = any> = {
197
197
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
198
198
  url: string;
199
199
  data?: Data;
200
200
  params?: URLSearchParams;
201
- } & APIMetadata$b;
202
- type APIMetadata$b = {
201
+ } & APIMetadata;
202
+ type APIMetadata = {
203
203
  methodFqn?: string;
204
204
  entityFqdn?: string;
205
205
  packageName?: string;
206
206
  };
207
- type BuildRESTFunction$b<T extends RESTFunctionDescriptor$b> = T extends RESTFunctionDescriptor$b<infer U> ? U : never;
207
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
208
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
209
+ __type: 'event-definition';
210
+ type: Type;
211
+ isDomainEvent?: boolean;
212
+ transformations?: (envelope: unknown) => Payload;
213
+ __payload: Payload;
214
+ };
215
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
216
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
217
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
208
218
 
209
219
  declare global {
210
220
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -213,9 +223,9 @@ declare global {
213
223
  }
214
224
  }
215
225
 
216
- declare function queryAvailability$1(httpClient: HttpClient$b): (query: QueryV2, options?: QueryAvailabilityOptions) => Promise<QueryAvailabilityResponse & QueryAvailabilityResponseNonNullableFields>;
226
+ declare function queryAvailability$1(httpClient: HttpClient): (query: QueryV2, options?: QueryAvailabilityOptions) => Promise<QueryAvailabilityResponse & QueryAvailabilityResponseNonNullableFields>;
217
227
 
218
- declare const queryAvailability: BuildRESTFunction$b<typeof queryAvailability$1>;
228
+ declare const queryAvailability: BuildRESTFunction<typeof queryAvailability$1>;
219
229
 
220
230
  declare const context$b_queryAvailability: typeof queryAvailability;
221
231
  declare namespace context$b {
@@ -645,44 +655,11 @@ interface GetAvailabilityTimeSlotOptions {
645
655
  includeResourceTypeIds?: string[];
646
656
  }
647
657
 
648
- type RESTFunctionDescriptor$a<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$a) => T;
649
- interface HttpClient$a {
650
- request<TResponse, TData = any>(req: RequestOptionsFactory$a<TResponse, TData>): Promise<HttpResponse$a<TResponse>>;
651
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
652
- }
653
- type RequestOptionsFactory$a<TResponse = any, TData = any> = (context: any) => RequestOptions$a<TResponse, TData>;
654
- type HttpResponse$a<T = any> = {
655
- data: T;
656
- status: number;
657
- statusText: string;
658
- headers: any;
659
- request?: any;
660
- };
661
- type RequestOptions$a<_TResponse = any, Data = any> = {
662
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
663
- url: string;
664
- data?: Data;
665
- params?: URLSearchParams;
666
- } & APIMetadata$a;
667
- type APIMetadata$a = {
668
- methodFqn?: string;
669
- entityFqdn?: string;
670
- packageName?: string;
671
- };
672
- type BuildRESTFunction$a<T extends RESTFunctionDescriptor$a> = T extends RESTFunctionDescriptor$a<infer U> ? U : never;
673
-
674
- declare global {
675
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
676
- interface SymbolConstructor {
677
- readonly observable: symbol;
678
- }
679
- }
680
-
681
- declare function listAvailabilityTimeSlots$1(httpClient: HttpClient$a): (options?: ListAvailabilityTimeSlotsOptions) => Promise<ListAvailabilityTimeSlotsResponse & ListAvailabilityTimeSlotsResponseNonNullableFields>;
682
- declare function getAvailabilityTimeSlot$1(httpClient: HttpClient$a): (serviceId: string, localStartDate: string, localEndDate: string, timeZone: string | null, location: Location$5, options?: GetAvailabilityTimeSlotOptions) => Promise<GetAvailabilityTimeSlotResponse & GetAvailabilityTimeSlotResponseNonNullableFields>;
658
+ declare function listAvailabilityTimeSlots$1(httpClient: HttpClient): (options?: ListAvailabilityTimeSlotsOptions) => Promise<ListAvailabilityTimeSlotsResponse & ListAvailabilityTimeSlotsResponseNonNullableFields>;
659
+ declare function getAvailabilityTimeSlot$1(httpClient: HttpClient): (serviceId: string, localStartDate: string, localEndDate: string, timeZone: string | null, location: Location$5, options?: GetAvailabilityTimeSlotOptions) => Promise<GetAvailabilityTimeSlotResponse & GetAvailabilityTimeSlotResponseNonNullableFields>;
683
660
 
684
- declare const listAvailabilityTimeSlots: BuildRESTFunction$a<typeof listAvailabilityTimeSlots$1>;
685
- declare const getAvailabilityTimeSlot: BuildRESTFunction$a<typeof getAvailabilityTimeSlot$1>;
661
+ declare const listAvailabilityTimeSlots: BuildRESTFunction<typeof listAvailabilityTimeSlots$1>;
662
+ declare const getAvailabilityTimeSlot: BuildRESTFunction<typeof getAvailabilityTimeSlot$1>;
686
663
 
687
664
  declare const context$a_getAvailabilityTimeSlot: typeof getAvailabilityTimeSlot;
688
665
  declare const context$a_listAvailabilityTimeSlots: typeof listAvailabilityTimeSlots;
@@ -1087,44 +1064,11 @@ interface ListMultiServiceAvailabilityTimeSlotsOptions {
1087
1064
  cursorPaging?: CursorPaging$2;
1088
1065
  }
1089
1066
 
1090
- type RESTFunctionDescriptor$9<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$9) => T;
1091
- interface HttpClient$9 {
1092
- request<TResponse, TData = any>(req: RequestOptionsFactory$9<TResponse, TData>): Promise<HttpResponse$9<TResponse>>;
1093
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1094
- }
1095
- type RequestOptionsFactory$9<TResponse = any, TData = any> = (context: any) => RequestOptions$9<TResponse, TData>;
1096
- type HttpResponse$9<T = any> = {
1097
- data: T;
1098
- status: number;
1099
- statusText: string;
1100
- headers: any;
1101
- request?: any;
1102
- };
1103
- type RequestOptions$9<_TResponse = any, Data = any> = {
1104
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1105
- url: string;
1106
- data?: Data;
1107
- params?: URLSearchParams;
1108
- } & APIMetadata$9;
1109
- type APIMetadata$9 = {
1110
- methodFqn?: string;
1111
- entityFqdn?: string;
1112
- packageName?: string;
1113
- };
1114
- type BuildRESTFunction$9<T extends RESTFunctionDescriptor$9> = T extends RESTFunctionDescriptor$9<infer U> ? U : never;
1067
+ declare function listMultiServiceAvailabilityTimeSlots$1(httpClient: HttpClient): (options?: ListMultiServiceAvailabilityTimeSlotsOptions) => Promise<ListMultiServiceAvailabilityTimeSlotsResponse & ListMultiServiceAvailabilityTimeSlotsResponseNonNullableFields>;
1068
+ declare function getMultiServiceAvailabilityTimeSlot$1(httpClient: HttpClient): (services: Service$1[], localStartDate: string, localEndDate: string, timeZone: string | null, location: Location$4) => Promise<GetMultiServiceAvailabilityTimeSlotResponse & GetMultiServiceAvailabilityTimeSlotResponseNonNullableFields>;
1115
1069
 
1116
- declare global {
1117
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1118
- interface SymbolConstructor {
1119
- readonly observable: symbol;
1120
- }
1121
- }
1122
-
1123
- declare function listMultiServiceAvailabilityTimeSlots$1(httpClient: HttpClient$9): (options?: ListMultiServiceAvailabilityTimeSlotsOptions) => Promise<ListMultiServiceAvailabilityTimeSlotsResponse & ListMultiServiceAvailabilityTimeSlotsResponseNonNullableFields>;
1124
- declare function getMultiServiceAvailabilityTimeSlot$1(httpClient: HttpClient$9): (services: Service$1[], localStartDate: string, localEndDate: string, timeZone: string | null, location: Location$4) => Promise<GetMultiServiceAvailabilityTimeSlotResponse & GetMultiServiceAvailabilityTimeSlotResponseNonNullableFields>;
1125
-
1126
- declare const listMultiServiceAvailabilityTimeSlots: BuildRESTFunction$9<typeof listMultiServiceAvailabilityTimeSlots$1>;
1127
- declare const getMultiServiceAvailabilityTimeSlot: BuildRESTFunction$9<typeof getMultiServiceAvailabilityTimeSlot$1>;
1070
+ declare const listMultiServiceAvailabilityTimeSlots: BuildRESTFunction<typeof listMultiServiceAvailabilityTimeSlots$1>;
1071
+ declare const getMultiServiceAvailabilityTimeSlot: BuildRESTFunction<typeof getMultiServiceAvailabilityTimeSlot$1>;
1128
1072
 
1129
1073
  declare const context$9_getMultiServiceAvailabilityTimeSlot: typeof getMultiServiceAvailabilityTimeSlot;
1130
1074
  declare const context$9_listMultiServiceAvailabilityTimeSlots: typeof listMultiServiceAvailabilityTimeSlots;
@@ -1627,58 +1571,25 @@ interface ListEventsOptions {
1627
1571
  partialFailure?: boolean | null;
1628
1572
  }
1629
1573
 
1630
- type RESTFunctionDescriptor$8<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$8) => T;
1631
- interface HttpClient$8 {
1632
- request<TResponse, TData = any>(req: RequestOptionsFactory$8<TResponse, TData>): Promise<HttpResponse$8<TResponse>>;
1633
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1634
- }
1635
- type RequestOptionsFactory$8<TResponse = any, TData = any> = (context: any) => RequestOptions$8<TResponse, TData>;
1636
- type HttpResponse$8<T = any> = {
1637
- data: T;
1638
- status: number;
1639
- statusText: string;
1640
- headers: any;
1641
- request?: any;
1642
- };
1643
- type RequestOptions$8<_TResponse = any, Data = any> = {
1644
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1645
- url: string;
1646
- data?: Data;
1647
- params?: URLSearchParams;
1648
- } & APIMetadata$8;
1649
- type APIMetadata$8 = {
1650
- methodFqn?: string;
1651
- entityFqdn?: string;
1652
- packageName?: string;
1653
- };
1654
- type BuildRESTFunction$8<T extends RESTFunctionDescriptor$8> = T extends RESTFunctionDescriptor$8<infer U> ? U : never;
1574
+ declare function listProviders$1(httpClient: HttpClient): () => Promise<ListProvidersResponse & ListProvidersResponseNonNullableFields>;
1575
+ declare function getConnection$1(httpClient: HttpClient): (connectionId: string | null) => Promise<GetConnectionResponse & GetConnectionResponseNonNullableFields>;
1576
+ declare function listConnections$1(httpClient: HttpClient): (options?: ListConnectionsOptions) => Promise<ListConnectionsResponse & ListConnectionsResponseNonNullableFields>;
1577
+ declare function connectByOAuth$1(httpClient: HttpClient): (providerId: string | null, scheduleId: string | null, redirectUrl: string | null) => Promise<ConnectByOAuthResponse>;
1578
+ declare function connectByCredentials$1(httpClient: HttpClient): (providerId: string | null, scheduleId: string | null, email: string | null, password: string | null) => Promise<ConnectByCredentialsResponse & ConnectByCredentialsResponseNonNullableFields>;
1579
+ declare function listCalendars$1(httpClient: HttpClient): (connectionId: string | null) => Promise<ListCalendarsResponse & ListCalendarsResponseNonNullableFields>;
1580
+ declare function updateSyncConfig$1(httpClient: HttpClient): (connectionId: string | null, syncConfig: ConnectionSyncConfig) => Promise<UpdateSyncConfigResponse & UpdateSyncConfigResponseNonNullableFields>;
1581
+ declare function disconnect$1(httpClient: HttpClient): (connectionId: string | null) => Promise<DisconnectResponse & DisconnectResponseNonNullableFields>;
1582
+ declare function listEvents$1(httpClient: HttpClient): (options?: ListEventsOptions) => Promise<ListEventsResponse & ListEventsResponseNonNullableFields>;
1655
1583
 
1656
- declare global {
1657
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1658
- interface SymbolConstructor {
1659
- readonly observable: symbol;
1660
- }
1661
- }
1662
-
1663
- declare function listProviders$1(httpClient: HttpClient$8): () => Promise<ListProvidersResponse & ListProvidersResponseNonNullableFields>;
1664
- declare function getConnection$1(httpClient: HttpClient$8): (connectionId: string | null) => Promise<GetConnectionResponse & GetConnectionResponseNonNullableFields>;
1665
- declare function listConnections$1(httpClient: HttpClient$8): (options?: ListConnectionsOptions) => Promise<ListConnectionsResponse & ListConnectionsResponseNonNullableFields>;
1666
- declare function connectByOAuth$1(httpClient: HttpClient$8): (providerId: string | null, scheduleId: string | null, redirectUrl: string | null) => Promise<ConnectByOAuthResponse>;
1667
- declare function connectByCredentials$1(httpClient: HttpClient$8): (providerId: string | null, scheduleId: string | null, email: string | null, password: string | null) => Promise<ConnectByCredentialsResponse & ConnectByCredentialsResponseNonNullableFields>;
1668
- declare function listCalendars$1(httpClient: HttpClient$8): (connectionId: string | null) => Promise<ListCalendarsResponse & ListCalendarsResponseNonNullableFields>;
1669
- declare function updateSyncConfig$1(httpClient: HttpClient$8): (connectionId: string | null, syncConfig: ConnectionSyncConfig) => Promise<UpdateSyncConfigResponse & UpdateSyncConfigResponseNonNullableFields>;
1670
- declare function disconnect$1(httpClient: HttpClient$8): (connectionId: string | null) => Promise<DisconnectResponse & DisconnectResponseNonNullableFields>;
1671
- declare function listEvents$1(httpClient: HttpClient$8): (options?: ListEventsOptions) => Promise<ListEventsResponse & ListEventsResponseNonNullableFields>;
1672
-
1673
- declare const listProviders: BuildRESTFunction$8<typeof listProviders$1>;
1674
- declare const getConnection: BuildRESTFunction$8<typeof getConnection$1>;
1675
- declare const listConnections: BuildRESTFunction$8<typeof listConnections$1>;
1676
- declare const connectByOAuth: BuildRESTFunction$8<typeof connectByOAuth$1>;
1677
- declare const connectByCredentials: BuildRESTFunction$8<typeof connectByCredentials$1>;
1678
- declare const listCalendars: BuildRESTFunction$8<typeof listCalendars$1>;
1679
- declare const updateSyncConfig: BuildRESTFunction$8<typeof updateSyncConfig$1>;
1680
- declare const disconnect: BuildRESTFunction$8<typeof disconnect$1>;
1681
- declare const listEvents: BuildRESTFunction$8<typeof listEvents$1>;
1584
+ declare const listProviders: BuildRESTFunction<typeof listProviders$1>;
1585
+ declare const getConnection: BuildRESTFunction<typeof getConnection$1>;
1586
+ declare const listConnections: BuildRESTFunction<typeof listConnections$1>;
1587
+ declare const connectByOAuth: BuildRESTFunction<typeof connectByOAuth$1>;
1588
+ declare const connectByCredentials: BuildRESTFunction<typeof connectByCredentials$1>;
1589
+ declare const listCalendars: BuildRESTFunction<typeof listCalendars$1>;
1590
+ declare const updateSyncConfig: BuildRESTFunction<typeof updateSyncConfig$1>;
1591
+ declare const disconnect: BuildRESTFunction<typeof disconnect$1>;
1592
+ declare const listEvents: BuildRESTFunction<typeof listEvents$1>;
1682
1593
 
1683
1594
  declare const context$8_connectByCredentials: typeof connectByCredentials;
1684
1595
  declare const context$8_connectByOAuth: typeof connectByOAuth;
@@ -2381,50 +2292,7 @@ interface UpdateResource {
2381
2292
  wixUserId?: string | null;
2382
2293
  }
2383
2294
 
2384
- type RESTFunctionDescriptor$7<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$7) => T;
2385
- interface HttpClient$7 {
2386
- request<TResponse, TData = any>(req: RequestOptionsFactory$7<TResponse, TData>): Promise<HttpResponse$7<TResponse>>;
2387
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
2388
- }
2389
- type RequestOptionsFactory$7<TResponse = any, TData = any> = (context: any) => RequestOptions$7<TResponse, TData>;
2390
- type HttpResponse$7<T = any> = {
2391
- data: T;
2392
- status: number;
2393
- statusText: string;
2394
- headers: any;
2395
- request?: any;
2396
- };
2397
- type RequestOptions$7<_TResponse = any, Data = any> = {
2398
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2399
- url: string;
2400
- data?: Data;
2401
- params?: URLSearchParams;
2402
- } & APIMetadata$7;
2403
- type APIMetadata$7 = {
2404
- methodFqn?: string;
2405
- entityFqdn?: string;
2406
- packageName?: string;
2407
- };
2408
- type BuildRESTFunction$7<T extends RESTFunctionDescriptor$7> = T extends RESTFunctionDescriptor$7<infer U> ? U : never;
2409
- type EventDefinition$4<Payload = unknown, Type extends string = string> = {
2410
- __type: 'event-definition';
2411
- type: Type;
2412
- isDomainEvent?: boolean;
2413
- transformations?: (envelope: unknown) => Payload;
2414
- __payload: Payload;
2415
- };
2416
- declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
2417
- type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
2418
- type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
2419
-
2420
- declare global {
2421
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2422
- interface SymbolConstructor {
2423
- readonly observable: symbol;
2424
- }
2425
- }
2426
-
2427
- declare function createResource$1(httpClient: HttpClient$7): (resource: Resource, options?: CreateResourceOptions) => Promise<Resource & {
2295
+ declare function createResource$1(httpClient: HttpClient): (resource: Resource, options?: CreateResourceOptions) => Promise<Resource & {
2428
2296
  images: string;
2429
2297
  schedules: {
2430
2298
  _id: string;
@@ -2497,7 +2365,7 @@ declare function createResource$1(httpClient: HttpClient$7): (resource: Resource
2497
2365
  }[];
2498
2366
  status: ResourceStatus;
2499
2367
  }>;
2500
- declare function updateResource$1(httpClient: HttpClient$7): (_id: string | null, resource: UpdateResource) => Promise<Resource & {
2368
+ declare function updateResource$1(httpClient: HttpClient): (_id: string | null, resource: UpdateResource) => Promise<Resource & {
2501
2369
  images: string;
2502
2370
  schedules: {
2503
2371
  _id: string;
@@ -2570,15 +2438,15 @@ declare function updateResource$1(httpClient: HttpClient$7): (_id: string | null
2570
2438
  }[];
2571
2439
  status: ResourceStatus;
2572
2440
  }>;
2573
- declare function updateSchedule$1(httpClient: HttpClient$7): (resourceId: string | null, schedule: Schedule) => Promise<UpdateScheduleResponse & UpdateScheduleResponseNonNullableFields>;
2574
- declare function deleteResource$1(httpClient: HttpClient$7): (_id: string) => Promise<DeleteResourceResponse & DeleteResourceResponseNonNullableFields>;
2575
- declare const onResourceNotification$1: EventDefinition$4<ResourceNotificationEnvelope, "com.wixpress.bookings.resources.core.api.v1.resource.ResourceNotification">;
2441
+ declare function updateSchedule$1(httpClient: HttpClient): (resourceId: string | null, schedule: Schedule) => Promise<UpdateScheduleResponse & UpdateScheduleResponseNonNullableFields>;
2442
+ declare function deleteResource$1(httpClient: HttpClient): (_id: string) => Promise<DeleteResourceResponse & DeleteResourceResponseNonNullableFields>;
2443
+ declare const onResourceNotification$1: EventDefinition<ResourceNotificationEnvelope, "com.wixpress.bookings.resources.core.api.v1.resource.ResourceNotification">;
2576
2444
 
2577
- declare const createResource: BuildRESTFunction$7<typeof createResource$1>;
2578
- declare const updateResource: BuildRESTFunction$7<typeof updateResource$1>;
2579
- declare const updateSchedule: BuildRESTFunction$7<typeof updateSchedule$1>;
2580
- declare const deleteResource: BuildRESTFunction$7<typeof deleteResource$1>;
2581
- declare const onResourceNotification: BuildEventDefinition$4<typeof onResourceNotification$1>;
2445
+ declare const createResource: BuildRESTFunction<typeof createResource$1>;
2446
+ declare const updateResource: BuildRESTFunction<typeof updateResource$1>;
2447
+ declare const updateSchedule: BuildRESTFunction<typeof updateSchedule$1>;
2448
+ declare const deleteResource: BuildRESTFunction<typeof deleteResource$1>;
2449
+ declare const onResourceNotification: BuildEventDefinition<typeof onResourceNotification$1>;
2582
2450
 
2583
2451
  declare const context$7_createResource: typeof createResource;
2584
2452
  declare const context$7_deleteResource: typeof deleteResource;
@@ -3002,50 +2870,7 @@ interface ServiceOptionsAndVariantsListQueryBuilder {
3002
2870
  find: () => Promise<ServiceOptionsAndVariantsListQueryResult>;
3003
2871
  }
3004
2872
 
3005
- type RESTFunctionDescriptor$6<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$6) => T;
3006
- interface HttpClient$6 {
3007
- request<TResponse, TData = any>(req: RequestOptionsFactory$6<TResponse, TData>): Promise<HttpResponse$6<TResponse>>;
3008
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
3009
- }
3010
- type RequestOptionsFactory$6<TResponse = any, TData = any> = (context: any) => RequestOptions$6<TResponse, TData>;
3011
- type HttpResponse$6<T = any> = {
3012
- data: T;
3013
- status: number;
3014
- statusText: string;
3015
- headers: any;
3016
- request?: any;
3017
- };
3018
- type RequestOptions$6<_TResponse = any, Data = any> = {
3019
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
3020
- url: string;
3021
- data?: Data;
3022
- params?: URLSearchParams;
3023
- } & APIMetadata$6;
3024
- type APIMetadata$6 = {
3025
- methodFqn?: string;
3026
- entityFqdn?: string;
3027
- packageName?: string;
3028
- };
3029
- type BuildRESTFunction$6<T extends RESTFunctionDescriptor$6> = T extends RESTFunctionDescriptor$6<infer U> ? U : never;
3030
- type EventDefinition$3<Payload = unknown, Type extends string = string> = {
3031
- __type: 'event-definition';
3032
- type: Type;
3033
- isDomainEvent?: boolean;
3034
- transformations?: (envelope: unknown) => Payload;
3035
- __payload: Payload;
3036
- };
3037
- declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
3038
- type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
3039
- type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
3040
-
3041
- declare global {
3042
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3043
- interface SymbolConstructor {
3044
- readonly observable: symbol;
3045
- }
3046
- }
3047
-
3048
- declare function createServiceOptionsAndVariants$1(httpClient: HttpClient$6): (serviceOptionsAndVariants: ServiceOptionsAndVariants) => Promise<ServiceOptionsAndVariants & {
2873
+ declare function createServiceOptionsAndVariants$1(httpClient: HttpClient): (serviceOptionsAndVariants: ServiceOptionsAndVariants) => Promise<ServiceOptionsAndVariants & {
3049
2874
  options?: {
3050
2875
  values: {
3051
2876
  customData?: {
@@ -3078,8 +2903,8 @@ declare function createServiceOptionsAndVariants$1(httpClient: HttpClient$6): (s
3078
2903
  currency: string;
3079
2904
  } | undefined;
3080
2905
  }>;
3081
- declare function cloneServiceOptionsAndVariants$1(httpClient: HttpClient$6): (cloneFromId: string, targetServiceId: string) => Promise<CloneServiceOptionsAndVariantsResponse & CloneServiceOptionsAndVariantsResponseNonNullableFields>;
3082
- declare function getServiceOptionsAndVariants$1(httpClient: HttpClient$6): (serviceOptionsAndVariantsId: string) => Promise<ServiceOptionsAndVariants & {
2906
+ declare function cloneServiceOptionsAndVariants$1(httpClient: HttpClient): (cloneFromId: string, targetServiceId: string) => Promise<CloneServiceOptionsAndVariantsResponse & CloneServiceOptionsAndVariantsResponseNonNullableFields>;
2907
+ declare function getServiceOptionsAndVariants$1(httpClient: HttpClient): (serviceOptionsAndVariantsId: string) => Promise<ServiceOptionsAndVariants & {
3083
2908
  options?: {
3084
2909
  values: {
3085
2910
  customData?: {
@@ -3112,8 +2937,8 @@ declare function getServiceOptionsAndVariants$1(httpClient: HttpClient$6): (serv
3112
2937
  currency: string;
3113
2938
  } | undefined;
3114
2939
  }>;
3115
- declare function getServiceOptionsAndVariantsByServiceId$1(httpClient: HttpClient$6): (serviceId: string) => Promise<GetServiceOptionsAndVariantsByServiceIdResponse & GetServiceOptionsAndVariantsByServiceIdResponseNonNullableFields>;
3116
- declare function updateServiceOptionsAndVariants$1(httpClient: HttpClient$6): (_id: string | null, serviceOptionsAndVariants: UpdateServiceOptionsAndVariants) => Promise<ServiceOptionsAndVariants & {
2940
+ declare function getServiceOptionsAndVariantsByServiceId$1(httpClient: HttpClient): (serviceId: string) => Promise<GetServiceOptionsAndVariantsByServiceIdResponse & GetServiceOptionsAndVariantsByServiceIdResponseNonNullableFields>;
2941
+ declare function updateServiceOptionsAndVariants$1(httpClient: HttpClient): (_id: string | null, serviceOptionsAndVariants: UpdateServiceOptionsAndVariants) => Promise<ServiceOptionsAndVariants & {
3117
2942
  options?: {
3118
2943
  values: {
3119
2944
  customData?: {
@@ -3146,22 +2971,22 @@ declare function updateServiceOptionsAndVariants$1(httpClient: HttpClient$6): (_
3146
2971
  currency: string;
3147
2972
  } | undefined;
3148
2973
  }>;
3149
- declare function deleteServiceOptionsAndVariants$1(httpClient: HttpClient$6): (serviceOptionsAndVariantsId: string, options?: DeleteServiceOptionsAndVariantsOptions) => Promise<void>;
3150
- declare function queryServiceOptionsAndVariants$1(httpClient: HttpClient$6): () => ServiceOptionsAndVariantsListQueryBuilder;
3151
- declare const onServiceOptionsAndVariantsCreated$1: EventDefinition$3<ServiceOptionsAndVariantsCreatedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_created">;
3152
- declare const onServiceOptionsAndVariantsUpdated$1: EventDefinition$3<ServiceOptionsAndVariantsUpdatedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_updated">;
3153
- declare const onServiceOptionsAndVariantsDeleted$1: EventDefinition$3<ServiceOptionsAndVariantsDeletedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_deleted">;
2974
+ declare function deleteServiceOptionsAndVariants$1(httpClient: HttpClient): (serviceOptionsAndVariantsId: string, options?: DeleteServiceOptionsAndVariantsOptions) => Promise<void>;
2975
+ declare function queryServiceOptionsAndVariants$1(httpClient: HttpClient): () => ServiceOptionsAndVariantsListQueryBuilder;
2976
+ declare const onServiceOptionsAndVariantsCreated$1: EventDefinition<ServiceOptionsAndVariantsCreatedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_created">;
2977
+ declare const onServiceOptionsAndVariantsUpdated$1: EventDefinition<ServiceOptionsAndVariantsUpdatedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_updated">;
2978
+ declare const onServiceOptionsAndVariantsDeleted$1: EventDefinition<ServiceOptionsAndVariantsDeletedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_deleted">;
3154
2979
 
3155
- declare const createServiceOptionsAndVariants: BuildRESTFunction$6<typeof createServiceOptionsAndVariants$1>;
3156
- declare const cloneServiceOptionsAndVariants: BuildRESTFunction$6<typeof cloneServiceOptionsAndVariants$1>;
3157
- declare const getServiceOptionsAndVariants: BuildRESTFunction$6<typeof getServiceOptionsAndVariants$1>;
3158
- declare const getServiceOptionsAndVariantsByServiceId: BuildRESTFunction$6<typeof getServiceOptionsAndVariantsByServiceId$1>;
3159
- declare const updateServiceOptionsAndVariants: BuildRESTFunction$6<typeof updateServiceOptionsAndVariants$1>;
3160
- declare const deleteServiceOptionsAndVariants: BuildRESTFunction$6<typeof deleteServiceOptionsAndVariants$1>;
3161
- declare const queryServiceOptionsAndVariants: BuildRESTFunction$6<typeof queryServiceOptionsAndVariants$1>;
3162
- declare const onServiceOptionsAndVariantsCreated: BuildEventDefinition$3<typeof onServiceOptionsAndVariantsCreated$1>;
3163
- declare const onServiceOptionsAndVariantsUpdated: BuildEventDefinition$3<typeof onServiceOptionsAndVariantsUpdated$1>;
3164
- declare const onServiceOptionsAndVariantsDeleted: BuildEventDefinition$3<typeof onServiceOptionsAndVariantsDeleted$1>;
2980
+ declare const createServiceOptionsAndVariants: BuildRESTFunction<typeof createServiceOptionsAndVariants$1>;
2981
+ declare const cloneServiceOptionsAndVariants: BuildRESTFunction<typeof cloneServiceOptionsAndVariants$1>;
2982
+ declare const getServiceOptionsAndVariants: BuildRESTFunction<typeof getServiceOptionsAndVariants$1>;
2983
+ declare const getServiceOptionsAndVariantsByServiceId: BuildRESTFunction<typeof getServiceOptionsAndVariantsByServiceId$1>;
2984
+ declare const updateServiceOptionsAndVariants: BuildRESTFunction<typeof updateServiceOptionsAndVariants$1>;
2985
+ declare const deleteServiceOptionsAndVariants: BuildRESTFunction<typeof deleteServiceOptionsAndVariants$1>;
2986
+ declare const queryServiceOptionsAndVariants: BuildRESTFunction<typeof queryServiceOptionsAndVariants$1>;
2987
+ declare const onServiceOptionsAndVariantsCreated: BuildEventDefinition<typeof onServiceOptionsAndVariantsCreated$1>;
2988
+ declare const onServiceOptionsAndVariantsUpdated: BuildEventDefinition<typeof onServiceOptionsAndVariantsUpdated$1>;
2989
+ declare const onServiceOptionsAndVariantsDeleted: BuildEventDefinition<typeof onServiceOptionsAndVariantsDeleted$1>;
3165
2990
 
3166
2991
  declare const context$6_cloneServiceOptionsAndVariants: typeof cloneServiceOptionsAndVariants;
3167
2992
  declare const context$6_createServiceOptionsAndVariants: typeof createServiceOptionsAndVariants;
@@ -3814,42 +3639,9 @@ interface QueryExtendedBookingsOptions {
3814
3639
  withBookingAttendanceInfo?: boolean;
3815
3640
  }
3816
3641
 
3817
- type RESTFunctionDescriptor$5<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$5) => T;
3818
- interface HttpClient$5 {
3819
- request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
3820
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
3821
- }
3822
- type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
3823
- type HttpResponse$5<T = any> = {
3824
- data: T;
3825
- status: number;
3826
- statusText: string;
3827
- headers: any;
3828
- request?: any;
3829
- };
3830
- type RequestOptions$5<_TResponse = any, Data = any> = {
3831
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
3832
- url: string;
3833
- data?: Data;
3834
- params?: URLSearchParams;
3835
- } & APIMetadata$5;
3836
- type APIMetadata$5 = {
3837
- methodFqn?: string;
3838
- entityFqdn?: string;
3839
- packageName?: string;
3840
- };
3841
- type BuildRESTFunction$5<T extends RESTFunctionDescriptor$5> = T extends RESTFunctionDescriptor$5<infer U> ? U : never;
3842
-
3843
- declare global {
3844
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3845
- interface SymbolConstructor {
3846
- readonly observable: symbol;
3847
- }
3848
- }
3849
-
3850
- declare function queryExtendedBookings$1(httpClient: HttpClient$5): (query: CommonQueryV2, options?: QueryExtendedBookingsOptions) => Promise<QueryExtendedBookingsResponse & QueryExtendedBookingsResponseNonNullableFields>;
3642
+ declare function queryExtendedBookings$1(httpClient: HttpClient): (query: CommonQueryV2, options?: QueryExtendedBookingsOptions) => Promise<QueryExtendedBookingsResponse & QueryExtendedBookingsResponseNonNullableFields>;
3851
3643
 
3852
- declare const queryExtendedBookings: BuildRESTFunction$5<typeof queryExtendedBookings$1>;
3644
+ declare const queryExtendedBookings: BuildRESTFunction<typeof queryExtendedBookings$1>;
3853
3645
 
3854
3646
  declare const context$5_queryExtendedBookings: typeof queryExtendedBookings;
3855
3647
  declare namespace context$5 {
@@ -4947,50 +4739,7 @@ interface CountServicesOptions {
4947
4739
  filter?: Record<string, any> | null;
4948
4740
  }
4949
4741
 
4950
- type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
4951
- interface HttpClient$4 {
4952
- request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
4953
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
4954
- }
4955
- type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
4956
- type HttpResponse$4<T = any> = {
4957
- data: T;
4958
- status: number;
4959
- statusText: string;
4960
- headers: any;
4961
- request?: any;
4962
- };
4963
- type RequestOptions$4<_TResponse = any, Data = any> = {
4964
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
4965
- url: string;
4966
- data?: Data;
4967
- params?: URLSearchParams;
4968
- } & APIMetadata$4;
4969
- type APIMetadata$4 = {
4970
- methodFqn?: string;
4971
- entityFqdn?: string;
4972
- packageName?: string;
4973
- };
4974
- type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
4975
- type EventDefinition$2<Payload = unknown, Type extends string = string> = {
4976
- __type: 'event-definition';
4977
- type: Type;
4978
- isDomainEvent?: boolean;
4979
- transformations?: (envelope: unknown) => Payload;
4980
- __payload: Payload;
4981
- };
4982
- declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
4983
- type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
4984
- type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
4985
-
4986
- declare global {
4987
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
4988
- interface SymbolConstructor {
4989
- readonly observable: symbol;
4990
- }
4991
- }
4992
-
4993
- declare function createService$1(httpClient: HttpClient$4): (service: Service) => Promise<Service & {
4742
+ declare function createService$1(httpClient: HttpClient): (service: Service) => Promise<Service & {
4994
4743
  type: ServiceType;
4995
4744
  media?: {
4996
4745
  items: {
@@ -5139,7 +4888,7 @@ declare function createService$1(httpClient: HttpClient$4): (service: Service) =
5139
4888
  } | undefined;
5140
4889
  } | undefined;
5141
4890
  }>;
5142
- declare function getService$1(httpClient: HttpClient$4): (serviceId: string) => Promise<Service & {
4891
+ declare function getService$1(httpClient: HttpClient): (serviceId: string) => Promise<Service & {
5143
4892
  type: ServiceType;
5144
4893
  media?: {
5145
4894
  items: {
@@ -5288,7 +5037,7 @@ declare function getService$1(httpClient: HttpClient$4): (serviceId: string) =>
5288
5037
  } | undefined;
5289
5038
  } | undefined;
5290
5039
  }>;
5291
- declare function updateService$1(httpClient: HttpClient$4): (_id: string | null, service: UpdateService) => Promise<Service & {
5040
+ declare function updateService$1(httpClient: HttpClient): (_id: string | null, service: UpdateService) => Promise<Service & {
5292
5041
  type: ServiceType;
5293
5042
  media?: {
5294
5043
  items: {
@@ -5437,22 +5186,22 @@ declare function updateService$1(httpClient: HttpClient$4): (_id: string | null,
5437
5186
  } | undefined;
5438
5187
  } | undefined;
5439
5188
  }>;
5440
- declare function deleteService$1(httpClient: HttpClient$4): (serviceId: string, options?: DeleteServiceOptions) => Promise<void>;
5441
- declare function queryServices$1(httpClient: HttpClient$4): (options?: QueryServicesOptions) => ServicesQueryBuilder;
5442
- declare function countServices$1(httpClient: HttpClient$4): (options?: CountServicesOptions) => Promise<CountServicesResponse & CountServicesResponseNonNullableFields>;
5443
- declare const onServiceCreated$1: EventDefinition$2<ServiceCreatedEnvelope, "wix.bookings.services.v2.service_created">;
5444
- declare const onServiceUpdated$1: EventDefinition$2<ServiceUpdatedEnvelope, "wix.bookings.services.v2.service_updated">;
5445
- declare const onServiceDeleted$1: EventDefinition$2<ServiceDeletedEnvelope, "wix.bookings.services.v2.service_deleted">;
5189
+ declare function deleteService$1(httpClient: HttpClient): (serviceId: string, options?: DeleteServiceOptions) => Promise<void>;
5190
+ declare function queryServices$1(httpClient: HttpClient): (options?: QueryServicesOptions) => ServicesQueryBuilder;
5191
+ declare function countServices$1(httpClient: HttpClient): (options?: CountServicesOptions) => Promise<CountServicesResponse & CountServicesResponseNonNullableFields>;
5192
+ declare const onServiceCreated$1: EventDefinition<ServiceCreatedEnvelope, "wix.bookings.services.v2.service_created">;
5193
+ declare const onServiceUpdated$1: EventDefinition<ServiceUpdatedEnvelope, "wix.bookings.services.v2.service_updated">;
5194
+ declare const onServiceDeleted$1: EventDefinition<ServiceDeletedEnvelope, "wix.bookings.services.v2.service_deleted">;
5446
5195
 
5447
- declare const createService: BuildRESTFunction$4<typeof createService$1>;
5448
- declare const getService: BuildRESTFunction$4<typeof getService$1>;
5449
- declare const updateService: BuildRESTFunction$4<typeof updateService$1>;
5450
- declare const deleteService: BuildRESTFunction$4<typeof deleteService$1>;
5451
- declare const queryServices: BuildRESTFunction$4<typeof queryServices$1>;
5452
- declare const countServices: BuildRESTFunction$4<typeof countServices$1>;
5453
- declare const onServiceCreated: BuildEventDefinition$2<typeof onServiceCreated$1>;
5454
- declare const onServiceUpdated: BuildEventDefinition$2<typeof onServiceUpdated$1>;
5455
- declare const onServiceDeleted: BuildEventDefinition$2<typeof onServiceDeleted$1>;
5196
+ declare const createService: BuildRESTFunction<typeof createService$1>;
5197
+ declare const getService: BuildRESTFunction<typeof getService$1>;
5198
+ declare const updateService: BuildRESTFunction<typeof updateService$1>;
5199
+ declare const deleteService: BuildRESTFunction<typeof deleteService$1>;
5200
+ declare const queryServices: BuildRESTFunction<typeof queryServices$1>;
5201
+ declare const countServices: BuildRESTFunction<typeof countServices$1>;
5202
+ declare const onServiceCreated: BuildEventDefinition<typeof onServiceCreated$1>;
5203
+ declare const onServiceUpdated: BuildEventDefinition<typeof onServiceUpdated$1>;
5204
+ declare const onServiceDeleted: BuildEventDefinition<typeof onServiceDeleted$1>;
5456
5205
 
5457
5206
  declare const context$4_countServices: typeof countServices;
5458
5207
  declare const context$4_createService: typeof createService;
@@ -5594,62 +5343,19 @@ interface DeleteCategoryOptions {
5594
5343
  deleteServices?: boolean | null;
5595
5344
  }
5596
5345
 
5597
- type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
5598
- interface HttpClient$3 {
5599
- request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
5600
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
5601
- }
5602
- type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
5603
- type HttpResponse$3<T = any> = {
5604
- data: T;
5605
- status: number;
5606
- statusText: string;
5607
- headers: any;
5608
- request?: any;
5609
- };
5610
- type RequestOptions$3<_TResponse = any, Data = any> = {
5611
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
5612
- url: string;
5613
- data?: Data;
5614
- params?: URLSearchParams;
5615
- } & APIMetadata$3;
5616
- type APIMetadata$3 = {
5617
- methodFqn?: string;
5618
- entityFqdn?: string;
5619
- packageName?: string;
5620
- };
5621
- type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
5622
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
5623
- __type: 'event-definition';
5624
- type: Type;
5625
- isDomainEvent?: boolean;
5626
- transformations?: (envelope: unknown) => Payload;
5627
- __payload: Payload;
5628
- };
5629
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
5630
- type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
5631
- type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
5632
-
5633
- declare global {
5634
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
5635
- interface SymbolConstructor {
5636
- readonly observable: symbol;
5637
- }
5638
- }
5639
-
5640
- declare function listCategories$1(httpClient: HttpClient$3): (options?: ListCategoriesOptions) => Promise<ListCategoryResponse & ListCategoryResponseNonNullableFields>;
5641
- declare function createCategory$1(httpClient: HttpClient$3): (category: Category) => Promise<Category & {
5346
+ declare function listCategories$1(httpClient: HttpClient): (options?: ListCategoriesOptions) => Promise<ListCategoryResponse & ListCategoryResponseNonNullableFields>;
5347
+ declare function createCategory$1(httpClient: HttpClient): (category: Category) => Promise<Category & {
5642
5348
  status: Status;
5643
5349
  }>;
5644
- declare function updateCategory$1(httpClient: HttpClient$3): (_id: string | null, category: UpdateCategory) => Promise<UpdateCategoryResponse & UpdateCategoryResponseNonNullableFields>;
5645
- declare function deleteCategory$1(httpClient: HttpClient$3): (_id: string | null, options?: DeleteCategoryOptions) => Promise<DeleteCategoryResponse>;
5646
- declare const onCategoryNotification$1: EventDefinition$1<CategoryNotificationEnvelope, "com.wixpress.bookings.services.api.v1.CategoryNotification">;
5350
+ declare function updateCategory$1(httpClient: HttpClient): (_id: string | null, category: UpdateCategory) => Promise<UpdateCategoryResponse & UpdateCategoryResponseNonNullableFields>;
5351
+ declare function deleteCategory$1(httpClient: HttpClient): (_id: string | null, options?: DeleteCategoryOptions) => Promise<DeleteCategoryResponse>;
5352
+ declare const onCategoryNotification$1: EventDefinition<CategoryNotificationEnvelope, "com.wixpress.bookings.services.api.v1.CategoryNotification">;
5647
5353
 
5648
- declare const listCategories: BuildRESTFunction$3<typeof listCategories$1>;
5649
- declare const createCategory: BuildRESTFunction$3<typeof createCategory$1>;
5650
- declare const updateCategory: BuildRESTFunction$3<typeof updateCategory$1>;
5651
- declare const deleteCategory: BuildRESTFunction$3<typeof deleteCategory$1>;
5652
- declare const onCategoryNotification: BuildEventDefinition$1<typeof onCategoryNotification$1>;
5354
+ declare const listCategories: BuildRESTFunction<typeof listCategories$1>;
5355
+ declare const createCategory: BuildRESTFunction<typeof createCategory$1>;
5356
+ declare const updateCategory: BuildRESTFunction<typeof updateCategory$1>;
5357
+ declare const deleteCategory: BuildRESTFunction<typeof deleteCategory$1>;
5358
+ declare const onCategoryNotification: BuildEventDefinition<typeof onCategoryNotification$1>;
5653
5359
 
5654
5360
  declare const context$3_createCategory: typeof createCategory;
5655
5361
  declare const context$3_deleteCategory: typeof deleteCategory;
@@ -5801,49 +5507,16 @@ interface AttendancesQueryBuilder {
5801
5507
  find: () => Promise<AttendancesQueryResult>;
5802
5508
  }
5803
5509
 
5804
- type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
5805
- interface HttpClient$2 {
5806
- request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
5807
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
5808
- }
5809
- type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
5810
- type HttpResponse$2<T = any> = {
5811
- data: T;
5812
- status: number;
5813
- statusText: string;
5814
- headers: any;
5815
- request?: any;
5816
- };
5817
- type RequestOptions$2<_TResponse = any, Data = any> = {
5818
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
5819
- url: string;
5820
- data?: Data;
5821
- params?: URLSearchParams;
5822
- } & APIMetadata$2;
5823
- type APIMetadata$2 = {
5824
- methodFqn?: string;
5825
- entityFqdn?: string;
5826
- packageName?: string;
5827
- };
5828
- type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
5829
-
5830
- declare global {
5831
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
5832
- interface SymbolConstructor {
5833
- readonly observable: symbol;
5834
- }
5835
- }
5836
-
5837
- declare function getAttendance$1(httpClient: HttpClient$2): (attendanceId: string) => Promise<Attendance & {
5510
+ declare function getAttendance$1(httpClient: HttpClient): (attendanceId: string) => Promise<Attendance & {
5838
5511
  status: AttendanceStatus;
5839
5512
  numberOfAttendees: number;
5840
5513
  }>;
5841
- declare function setAttendance$1(httpClient: HttpClient$2): (attendance: Attendance, options?: SetAttendanceOptions) => Promise<SetAttendanceResponse & SetAttendanceResponseNonNullableFields>;
5842
- declare function queryAttendance$1(httpClient: HttpClient$2): () => AttendancesQueryBuilder;
5514
+ declare function setAttendance$1(httpClient: HttpClient): (attendance: Attendance, options?: SetAttendanceOptions) => Promise<SetAttendanceResponse & SetAttendanceResponseNonNullableFields>;
5515
+ declare function queryAttendance$1(httpClient: HttpClient): () => AttendancesQueryBuilder;
5843
5516
 
5844
- declare const getAttendance: BuildRESTFunction$2<typeof getAttendance$1>;
5845
- declare const setAttendance: BuildRESTFunction$2<typeof setAttendance$1>;
5846
- declare const queryAttendance: BuildRESTFunction$2<typeof queryAttendance$1>;
5517
+ declare const getAttendance: BuildRESTFunction<typeof getAttendance$1>;
5518
+ declare const setAttendance: BuildRESTFunction<typeof setAttendance$1>;
5519
+ declare const queryAttendance: BuildRESTFunction<typeof queryAttendance$1>;
5847
5520
 
5848
5521
  declare const context$2_getAttendance: typeof getAttendance;
5849
5522
  declare const context$2_queryAttendance: typeof queryAttendance;
@@ -7416,58 +7089,15 @@ interface ConfirmOrDeclineBookingOptions {
7416
7089
  paymentStatus?: PaymentStatus$1;
7417
7090
  }
7418
7091
 
7419
- type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
7420
- interface HttpClient$1 {
7421
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
7422
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
7423
- }
7424
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
7425
- type HttpResponse$1<T = any> = {
7426
- data: T;
7427
- status: number;
7428
- statusText: string;
7429
- headers: any;
7430
- request?: any;
7431
- };
7432
- type RequestOptions$1<_TResponse = any, Data = any> = {
7433
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
7434
- url: string;
7435
- data?: Data;
7436
- params?: URLSearchParams;
7437
- } & APIMetadata$1;
7438
- type APIMetadata$1 = {
7439
- methodFqn?: string;
7440
- entityFqdn?: string;
7441
- packageName?: string;
7442
- };
7443
- type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
7444
- type EventDefinition<Payload = unknown, Type extends string = string> = {
7445
- __type: 'event-definition';
7446
- type: Type;
7447
- isDomainEvent?: boolean;
7448
- transformations?: (envelope: unknown) => Payload;
7449
- __payload: Payload;
7450
- };
7451
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
7452
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
7453
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
7454
-
7455
- declare global {
7456
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
7457
- interface SymbolConstructor {
7458
- readonly observable: symbol;
7459
- }
7460
- }
7461
-
7462
- declare function createBooking$1(httpClient: HttpClient$1): (booking: Booking$1, options?: CreateBookingOptions) => Promise<CreateBookingResponse & CreateBookingResponseNonNullableFields>;
7463
- declare function bulkCreateBooking$1(httpClient: HttpClient$1): (createBookingsInfo: CreateBookingInfo[], options?: BulkCreateBookingOptions) => Promise<BulkCreateBookingResponse & BulkCreateBookingResponseNonNullableFields>;
7464
- declare function rescheduleBooking$1(httpClient: HttpClient$1): (bookingId: string, slot: V2Slot, options?: RescheduleBookingOptions) => Promise<RescheduleBookingResponse & RescheduleBookingResponseNonNullableFields>;
7465
- declare function confirmBooking$1(httpClient: HttpClient$1): (bookingId: string, revision: string | null, options?: ConfirmBookingOptions) => Promise<ConfirmBookingResponse & ConfirmBookingResponseNonNullableFields>;
7466
- declare function updateExtendedFields$1(httpClient: HttpClient$1): (_id: string, namespace: string, options: UpdateExtendedFieldsOptions) => Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
7467
- declare function declineBooking$1(httpClient: HttpClient$1): (bookingId: string, revision: string | null, options?: DeclineBookingOptions) => Promise<DeclineBookingResponse & DeclineBookingResponseNonNullableFields>;
7468
- declare function cancelBooking$1(httpClient: HttpClient$1): (bookingId: string, options?: CancelBookingOptions) => Promise<CancelBookingResponse & CancelBookingResponseNonNullableFields>;
7469
- declare function updateNumberOfParticipants$1(httpClient: HttpClient$1): (bookingId: string, options?: UpdateNumberOfParticipantsOptions) => Promise<UpdateNumberOfParticipantsResponse & UpdateNumberOfParticipantsResponseNonNullableFields>;
7470
- declare function confirmOrDeclineBooking$1(httpClient: HttpClient$1): (bookingId: string, options?: ConfirmOrDeclineBookingOptions) => Promise<ConfirmOrDeclineBookingResponse & ConfirmOrDeclineBookingResponseNonNullableFields>;
7092
+ declare function createBooking$1(httpClient: HttpClient): (booking: Booking$1, options?: CreateBookingOptions) => Promise<CreateBookingResponse & CreateBookingResponseNonNullableFields>;
7093
+ declare function bulkCreateBooking$1(httpClient: HttpClient): (createBookingsInfo: CreateBookingInfo[], options?: BulkCreateBookingOptions) => Promise<BulkCreateBookingResponse & BulkCreateBookingResponseNonNullableFields>;
7094
+ declare function rescheduleBooking$1(httpClient: HttpClient): (bookingId: string, slot: V2Slot, options?: RescheduleBookingOptions) => Promise<RescheduleBookingResponse & RescheduleBookingResponseNonNullableFields>;
7095
+ declare function confirmBooking$1(httpClient: HttpClient): (bookingId: string, revision: string | null, options?: ConfirmBookingOptions) => Promise<ConfirmBookingResponse & ConfirmBookingResponseNonNullableFields>;
7096
+ declare function updateExtendedFields$1(httpClient: HttpClient): (_id: string, namespace: string, options: UpdateExtendedFieldsOptions) => Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
7097
+ declare function declineBooking$1(httpClient: HttpClient): (bookingId: string, revision: string | null, options?: DeclineBookingOptions) => Promise<DeclineBookingResponse & DeclineBookingResponseNonNullableFields>;
7098
+ declare function cancelBooking$1(httpClient: HttpClient): (bookingId: string, options?: CancelBookingOptions) => Promise<CancelBookingResponse & CancelBookingResponseNonNullableFields>;
7099
+ declare function updateNumberOfParticipants$1(httpClient: HttpClient): (bookingId: string, options?: UpdateNumberOfParticipantsOptions) => Promise<UpdateNumberOfParticipantsResponse & UpdateNumberOfParticipantsResponseNonNullableFields>;
7100
+ declare function confirmOrDeclineBooking$1(httpClient: HttpClient): (bookingId: string, options?: ConfirmOrDeclineBookingOptions) => Promise<ConfirmOrDeclineBookingResponse & ConfirmOrDeclineBookingResponseNonNullableFields>;
7471
7101
  declare const onBookingCreated$1: EventDefinition<BookingCreatedEnvelope, "wix.bookings.v2.booking_created">;
7472
7102
  declare const onBookingRescheduled$1: EventDefinition<BookingRescheduledEnvelope, "wix.bookings.v2.booking_rescheduled">;
7473
7103
  declare const onBookingCanceled$1: EventDefinition<BookingCanceledEnvelope, "wix.bookings.v2.booking_canceled">;
@@ -7476,15 +7106,15 @@ declare const onBookingConfirmed$1: EventDefinition<BookingConfirmedEnvelope, "w
7476
7106
  declare const onBookingDeclined$1: EventDefinition<BookingDeclinedEnvelope, "wix.bookings.v2.booking_declined">;
7477
7107
  declare const onBookingNumberOfParticipantsUpdated$1: EventDefinition<BookingNumberOfParticipantsUpdatedEnvelope, "wix.bookings.v2.booking_number_of_participants_updated">;
7478
7108
 
7479
- declare const createBooking: BuildRESTFunction$1<typeof createBooking$1>;
7480
- declare const bulkCreateBooking: BuildRESTFunction$1<typeof bulkCreateBooking$1>;
7481
- declare const rescheduleBooking: BuildRESTFunction$1<typeof rescheduleBooking$1>;
7482
- declare const confirmBooking: BuildRESTFunction$1<typeof confirmBooking$1>;
7483
- declare const updateExtendedFields: BuildRESTFunction$1<typeof updateExtendedFields$1>;
7484
- declare const declineBooking: BuildRESTFunction$1<typeof declineBooking$1>;
7485
- declare const cancelBooking: BuildRESTFunction$1<typeof cancelBooking$1>;
7486
- declare const updateNumberOfParticipants: BuildRESTFunction$1<typeof updateNumberOfParticipants$1>;
7487
- declare const confirmOrDeclineBooking: BuildRESTFunction$1<typeof confirmOrDeclineBooking$1>;
7109
+ declare const createBooking: BuildRESTFunction<typeof createBooking$1>;
7110
+ declare const bulkCreateBooking: BuildRESTFunction<typeof bulkCreateBooking$1>;
7111
+ declare const rescheduleBooking: BuildRESTFunction<typeof rescheduleBooking$1>;
7112
+ declare const confirmBooking: BuildRESTFunction<typeof confirmBooking$1>;
7113
+ declare const updateExtendedFields: BuildRESTFunction<typeof updateExtendedFields$1>;
7114
+ declare const declineBooking: BuildRESTFunction<typeof declineBooking$1>;
7115
+ declare const cancelBooking: BuildRESTFunction<typeof cancelBooking$1>;
7116
+ declare const updateNumberOfParticipants: BuildRESTFunction<typeof updateNumberOfParticipants$1>;
7117
+ declare const confirmOrDeclineBooking: BuildRESTFunction<typeof confirmOrDeclineBooking$1>;
7488
7118
  declare const onBookingCreated: BuildEventDefinition<typeof onBookingCreated$1>;
7489
7119
  declare const onBookingRescheduled: BuildEventDefinition<typeof onBookingRescheduled$1>;
7490
7120
  declare const onBookingCanceled: BuildEventDefinition<typeof onBookingCanceled$1>;
@@ -8052,39 +7682,6 @@ interface CalculatePriceResponseNonNullableFields {
8052
7682
  };
8053
7683
  }
8054
7684
 
8055
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
8056
- interface HttpClient {
8057
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
8058
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
8059
- }
8060
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8061
- type HttpResponse<T = any> = {
8062
- data: T;
8063
- status: number;
8064
- statusText: string;
8065
- headers: any;
8066
- request?: any;
8067
- };
8068
- type RequestOptions<_TResponse = any, Data = any> = {
8069
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
8070
- url: string;
8071
- data?: Data;
8072
- params?: URLSearchParams;
8073
- } & APIMetadata;
8074
- type APIMetadata = {
8075
- methodFqn?: string;
8076
- entityFqdn?: string;
8077
- packageName?: string;
8078
- };
8079
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
8080
-
8081
- declare global {
8082
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
8083
- interface SymbolConstructor {
8084
- readonly observable: symbol;
8085
- }
8086
- }
8087
-
8088
7685
  declare function previewPrice$1(httpClient: HttpClient): (bookingLineItems: BookingLineItem[]) => Promise<PreviewPriceResponse & PreviewPriceResponseNonNullableFields>;
8089
7686
  declare function calculatePrice$1(httpClient: HttpClient): (booking: Booking) => Promise<CalculatePriceResponse & CalculatePriceResponseNonNullableFields>;
8090
7687