@wix/bookings 1.0.421 → 1.0.423

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.
@@ -568,37 +568,30 @@ interface QueryAvailabilityOptions {
568
568
  slotsPerDay?: number | null;
569
569
  }
570
570
 
571
- interface HttpClient {
572
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
573
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
571
+ interface HttpClient$b {
572
+ request<TResponse, TData = any>(req: RequestOptionsFactory$b<TResponse, TData>): Promise<HttpResponse$b<TResponse>>;
573
+ fetchWithAuth: typeof fetch;
574
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
574
575
  }
575
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
576
- type HttpResponse<T = any> = {
576
+ type RequestOptionsFactory$b<TResponse = any, TData = any> = (context: any) => RequestOptions$b<TResponse, TData>;
577
+ type HttpResponse$b<T = any> = {
577
578
  data: T;
578
579
  status: number;
579
580
  statusText: string;
580
581
  headers: any;
581
582
  request?: any;
582
583
  };
583
- type RequestOptions<_TResponse = any, Data = any> = {
584
+ type RequestOptions$b<_TResponse = any, Data = any> = {
584
585
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
585
586
  url: string;
586
587
  data?: Data;
587
588
  params?: URLSearchParams;
588
- } & APIMetadata;
589
- type APIMetadata = {
589
+ } & APIMetadata$b;
590
+ type APIMetadata$b = {
590
591
  methodFqn?: string;
591
592
  entityFqdn?: string;
592
593
  packageName?: string;
593
594
  };
594
- type EventDefinition<Payload = unknown, Type extends string = string> = {
595
- __type: 'event-definition';
596
- type: Type;
597
- isDomainEvent?: boolean;
598
- transformations?: (envelope: unknown) => Payload;
599
- __payload: Payload;
600
- };
601
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
602
595
 
603
596
  declare global {
604
597
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -610,7 +603,7 @@ declare global {
610
603
  declare const __metadata$b: {
611
604
  PACKAGE_NAME: string;
612
605
  };
613
- declare function queryAvailability(httpClient: HttpClient): (query: QueryV2$6, options?: QueryAvailabilityOptions) => Promise<QueryAvailabilityResponse & QueryAvailabilityResponseNonNullableFields>;
606
+ declare function queryAvailability(httpClient: HttpClient$b): (query: QueryV2$6, options?: QueryAvailabilityOptions) => Promise<QueryAvailabilityResponse & QueryAvailabilityResponseNonNullableFields>;
614
607
 
615
608
  type index_d$b_AvailabilityWaitingList = AvailabilityWaitingList;
616
609
  type index_d$b_CalculateMultiSlotAvailabilityRequest = CalculateMultiSlotAvailabilityRequest;
@@ -1609,11 +1602,43 @@ interface GetAvailabilityTimeSlotOptions {
1609
1602
  includeResourceTypeIds?: string[];
1610
1603
  }
1611
1604
 
1605
+ interface HttpClient$a {
1606
+ request<TResponse, TData = any>(req: RequestOptionsFactory$a<TResponse, TData>): Promise<HttpResponse$a<TResponse>>;
1607
+ fetchWithAuth: typeof fetch;
1608
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
1609
+ }
1610
+ type RequestOptionsFactory$a<TResponse = any, TData = any> = (context: any) => RequestOptions$a<TResponse, TData>;
1611
+ type HttpResponse$a<T = any> = {
1612
+ data: T;
1613
+ status: number;
1614
+ statusText: string;
1615
+ headers: any;
1616
+ request?: any;
1617
+ };
1618
+ type RequestOptions$a<_TResponse = any, Data = any> = {
1619
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1620
+ url: string;
1621
+ data?: Data;
1622
+ params?: URLSearchParams;
1623
+ } & APIMetadata$a;
1624
+ type APIMetadata$a = {
1625
+ methodFqn?: string;
1626
+ entityFqdn?: string;
1627
+ packageName?: string;
1628
+ };
1629
+
1630
+ declare global {
1631
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1632
+ interface SymbolConstructor {
1633
+ readonly observable: symbol;
1634
+ }
1635
+ }
1636
+
1612
1637
  declare const __metadata$a: {
1613
1638
  PACKAGE_NAME: string;
1614
1639
  };
1615
- declare function listAvailabilityTimeSlots(httpClient: HttpClient): (options?: ListAvailabilityTimeSlotsOptions) => Promise<ListAvailabilityTimeSlotsResponse$1 & ListAvailabilityTimeSlotsResponseNonNullableFields$1>;
1616
- declare function getAvailabilityTimeSlot(httpClient: HttpClient): (serviceId: string, localStartDate: string, localEndDate: string, timeZone: string | null, location: Location$8, options?: GetAvailabilityTimeSlotOptions) => Promise<GetAvailabilityTimeSlotResponse$1 & GetAvailabilityTimeSlotResponseNonNullableFields$1>;
1640
+ declare function listAvailabilityTimeSlots(httpClient: HttpClient$a): (options?: ListAvailabilityTimeSlotsOptions) => Promise<ListAvailabilityTimeSlotsResponse$1 & ListAvailabilityTimeSlotsResponseNonNullableFields$1>;
1641
+ declare function getAvailabilityTimeSlot(httpClient: HttpClient$a): (serviceId: string, localStartDate: string, localEndDate: string, timeZone: string | null, location: Location$8, options?: GetAvailabilityTimeSlotOptions) => Promise<GetAvailabilityTimeSlotResponse$1 & GetAvailabilityTimeSlotResponseNonNullableFields$1>;
1617
1642
 
1618
1643
  type index_d$a_GetAvailabilityTimeSlotOptions = GetAvailabilityTimeSlotOptions;
1619
1644
  type index_d$a_ListAvailabilityTimeSlotsOptions = ListAvailabilityTimeSlotsOptions;
@@ -2570,11 +2595,43 @@ interface ListMultiServiceAvailabilityTimeSlotsOptions {
2570
2595
  cursorPaging?: CursorPaging$7;
2571
2596
  }
2572
2597
 
2598
+ interface HttpClient$9 {
2599
+ request<TResponse, TData = any>(req: RequestOptionsFactory$9<TResponse, TData>): Promise<HttpResponse$9<TResponse>>;
2600
+ fetchWithAuth: typeof fetch;
2601
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
2602
+ }
2603
+ type RequestOptionsFactory$9<TResponse = any, TData = any> = (context: any) => RequestOptions$9<TResponse, TData>;
2604
+ type HttpResponse$9<T = any> = {
2605
+ data: T;
2606
+ status: number;
2607
+ statusText: string;
2608
+ headers: any;
2609
+ request?: any;
2610
+ };
2611
+ type RequestOptions$9<_TResponse = any, Data = any> = {
2612
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2613
+ url: string;
2614
+ data?: Data;
2615
+ params?: URLSearchParams;
2616
+ } & APIMetadata$9;
2617
+ type APIMetadata$9 = {
2618
+ methodFqn?: string;
2619
+ entityFqdn?: string;
2620
+ packageName?: string;
2621
+ };
2622
+
2623
+ declare global {
2624
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2625
+ interface SymbolConstructor {
2626
+ readonly observable: symbol;
2627
+ }
2628
+ }
2629
+
2573
2630
  declare const __metadata$9: {
2574
2631
  PACKAGE_NAME: string;
2575
2632
  };
2576
- declare function listMultiServiceAvailabilityTimeSlots(httpClient: HttpClient): (options?: ListMultiServiceAvailabilityTimeSlotsOptions) => Promise<ListMultiServiceAvailabilityTimeSlotsResponse & ListMultiServiceAvailabilityTimeSlotsResponseNonNullableFields>;
2577
- declare function getMultiServiceAvailabilityTimeSlot(httpClient: HttpClient): (services: Service$2[], localStartDate: string, localEndDate: string, timeZone: string | null, location: Location$7) => Promise<GetMultiServiceAvailabilityTimeSlotResponse & GetMultiServiceAvailabilityTimeSlotResponseNonNullableFields>;
2633
+ declare function listMultiServiceAvailabilityTimeSlots(httpClient: HttpClient$9): (options?: ListMultiServiceAvailabilityTimeSlotsOptions) => Promise<ListMultiServiceAvailabilityTimeSlotsResponse & ListMultiServiceAvailabilityTimeSlotsResponseNonNullableFields>;
2634
+ declare function getMultiServiceAvailabilityTimeSlot(httpClient: HttpClient$9): (services: Service$2[], localStartDate: string, localEndDate: string, timeZone: string | null, location: Location$7) => Promise<GetMultiServiceAvailabilityTimeSlotResponse & GetMultiServiceAvailabilityTimeSlotResponseNonNullableFields>;
2578
2635
 
2579
2636
  type index_d$9_CalculateEventBasedAvailabilityRequest = CalculateEventBasedAvailabilityRequest;
2580
2637
  type index_d$9_CalculateEventBasedAvailabilityResponse = CalculateEventBasedAvailabilityResponse;
@@ -4206,18 +4263,50 @@ interface ListEventsOptions {
4206
4263
  partialFailure?: boolean | null;
4207
4264
  }
4208
4265
 
4266
+ interface HttpClient$8 {
4267
+ request<TResponse, TData = any>(req: RequestOptionsFactory$8<TResponse, TData>): Promise<HttpResponse$8<TResponse>>;
4268
+ fetchWithAuth: typeof fetch;
4269
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
4270
+ }
4271
+ type RequestOptionsFactory$8<TResponse = any, TData = any> = (context: any) => RequestOptions$8<TResponse, TData>;
4272
+ type HttpResponse$8<T = any> = {
4273
+ data: T;
4274
+ status: number;
4275
+ statusText: string;
4276
+ headers: any;
4277
+ request?: any;
4278
+ };
4279
+ type RequestOptions$8<_TResponse = any, Data = any> = {
4280
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
4281
+ url: string;
4282
+ data?: Data;
4283
+ params?: URLSearchParams;
4284
+ } & APIMetadata$8;
4285
+ type APIMetadata$8 = {
4286
+ methodFqn?: string;
4287
+ entityFqdn?: string;
4288
+ packageName?: string;
4289
+ };
4290
+
4291
+ declare global {
4292
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
4293
+ interface SymbolConstructor {
4294
+ readonly observable: symbol;
4295
+ }
4296
+ }
4297
+
4209
4298
  declare const __metadata$8: {
4210
4299
  PACKAGE_NAME: string;
4211
4300
  };
4212
- declare function listProviders(httpClient: HttpClient): () => Promise<ListProvidersResponse & ListProvidersResponseNonNullableFields>;
4213
- declare function getConnection(httpClient: HttpClient): (connectionId: string | null) => Promise<GetConnectionResponse & GetConnectionResponseNonNullableFields>;
4214
- declare function listConnections(httpClient: HttpClient): (options?: ListConnectionsOptions) => Promise<ListConnectionsResponse & ListConnectionsResponseNonNullableFields>;
4215
- declare function connectByOAuth(httpClient: HttpClient): (providerId: string | null, scheduleId: string | null, redirectUrl: string | null) => Promise<ConnectByOAuthResponse>;
4216
- declare function connectByCredentials(httpClient: HttpClient): (providerId: string | null, scheduleId: string | null, email: string | null, password: string | null) => Promise<ConnectByCredentialsResponse & ConnectByCredentialsResponseNonNullableFields>;
4217
- declare function listCalendars(httpClient: HttpClient): (connectionId: string | null) => Promise<ListCalendarsResponse & ListCalendarsResponseNonNullableFields>;
4218
- declare function updateSyncConfig(httpClient: HttpClient): (connectionId: string | null, syncConfig: ConnectionSyncConfig) => Promise<UpdateSyncConfigResponse & UpdateSyncConfigResponseNonNullableFields>;
4219
- declare function disconnect(httpClient: HttpClient): (connectionId: string | null) => Promise<DisconnectResponse & DisconnectResponseNonNullableFields>;
4220
- declare function listEvents(httpClient: HttpClient): (options?: ListEventsOptions) => Promise<ListEventsResponse & ListEventsResponseNonNullableFields>;
4301
+ declare function listProviders(httpClient: HttpClient$8): () => Promise<ListProvidersResponse & ListProvidersResponseNonNullableFields>;
4302
+ declare function getConnection(httpClient: HttpClient$8): (connectionId: string | null) => Promise<GetConnectionResponse & GetConnectionResponseNonNullableFields>;
4303
+ declare function listConnections(httpClient: HttpClient$8): (options?: ListConnectionsOptions) => Promise<ListConnectionsResponse & ListConnectionsResponseNonNullableFields>;
4304
+ declare function connectByOAuth(httpClient: HttpClient$8): (providerId: string | null, scheduleId: string | null, redirectUrl: string | null) => Promise<ConnectByOAuthResponse>;
4305
+ declare function connectByCredentials(httpClient: HttpClient$8): (providerId: string | null, scheduleId: string | null, email: string | null, password: string | null) => Promise<ConnectByCredentialsResponse & ConnectByCredentialsResponseNonNullableFields>;
4306
+ declare function listCalendars(httpClient: HttpClient$8): (connectionId: string | null) => Promise<ListCalendarsResponse & ListCalendarsResponseNonNullableFields>;
4307
+ declare function updateSyncConfig(httpClient: HttpClient$8): (connectionId: string | null, syncConfig: ConnectionSyncConfig) => Promise<UpdateSyncConfigResponse & UpdateSyncConfigResponseNonNullableFields>;
4308
+ declare function disconnect(httpClient: HttpClient$8): (connectionId: string | null) => Promise<DisconnectResponse & DisconnectResponseNonNullableFields>;
4309
+ declare function listEvents(httpClient: HttpClient$8): (options?: ListEventsOptions) => Promise<ListEventsResponse & ListEventsResponseNonNullableFields>;
4221
4310
 
4222
4311
  type index_d$8_Calendar = Calendar;
4223
4312
  type index_d$8_Calendars = Calendars;
@@ -5772,10 +5861,50 @@ interface UpdateResource {
5772
5861
  wixUserId?: string | null;
5773
5862
  }
5774
5863
 
5864
+ interface HttpClient$7 {
5865
+ request<TResponse, TData = any>(req: RequestOptionsFactory$7<TResponse, TData>): Promise<HttpResponse$7<TResponse>>;
5866
+ fetchWithAuth: typeof fetch;
5867
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
5868
+ }
5869
+ type RequestOptionsFactory$7<TResponse = any, TData = any> = (context: any) => RequestOptions$7<TResponse, TData>;
5870
+ type HttpResponse$7<T = any> = {
5871
+ data: T;
5872
+ status: number;
5873
+ statusText: string;
5874
+ headers: any;
5875
+ request?: any;
5876
+ };
5877
+ type RequestOptions$7<_TResponse = any, Data = any> = {
5878
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
5879
+ url: string;
5880
+ data?: Data;
5881
+ params?: URLSearchParams;
5882
+ } & APIMetadata$7;
5883
+ type APIMetadata$7 = {
5884
+ methodFqn?: string;
5885
+ entityFqdn?: string;
5886
+ packageName?: string;
5887
+ };
5888
+ type EventDefinition$4<Payload = unknown, Type extends string = string> = {
5889
+ __type: 'event-definition';
5890
+ type: Type;
5891
+ isDomainEvent?: boolean;
5892
+ transformations?: (envelope: unknown) => Payload;
5893
+ __payload: Payload;
5894
+ };
5895
+ declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
5896
+
5897
+ declare global {
5898
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
5899
+ interface SymbolConstructor {
5900
+ readonly observable: symbol;
5901
+ }
5902
+ }
5903
+
5775
5904
  declare const __metadata$7: {
5776
5905
  PACKAGE_NAME: string;
5777
5906
  };
5778
- declare function createResource(httpClient: HttpClient): (resource: Resource$2, options?: CreateResourceOptions) => Promise<Resource$2 & {
5907
+ declare function createResource(httpClient: HttpClient$7): (resource: Resource$2, options?: CreateResourceOptions) => Promise<Resource$2 & {
5779
5908
  images: string;
5780
5909
  schedules: {
5781
5910
  _id: string;
@@ -5848,7 +5977,7 @@ declare function createResource(httpClient: HttpClient): (resource: Resource$2,
5848
5977
  }[];
5849
5978
  status: ResourceStatus$2;
5850
5979
  }>;
5851
- declare function updateResource(httpClient: HttpClient): (_id: string | null, resource: UpdateResource) => Promise<Resource$2 & {
5980
+ declare function updateResource(httpClient: HttpClient$7): (_id: string | null, resource: UpdateResource) => Promise<Resource$2 & {
5852
5981
  images: string;
5853
5982
  schedules: {
5854
5983
  _id: string;
@@ -5921,9 +6050,9 @@ declare function updateResource(httpClient: HttpClient): (_id: string | null, re
5921
6050
  }[];
5922
6051
  status: ResourceStatus$2;
5923
6052
  }>;
5924
- declare function updateSchedule(httpClient: HttpClient): (resourceId: string | null, schedule: Schedule$2) => Promise<UpdateScheduleResponse & UpdateScheduleResponseNonNullableFields>;
5925
- declare function deleteResource(httpClient: HttpClient): (_id: string) => Promise<DeleteResourceResponse & DeleteResourceResponseNonNullableFields>;
5926
- declare const onResourceNotification: EventDefinition<ResourceNotificationEnvelope, "com.wixpress.bookings.resources.core.api.v1.resource.ResourceNotification">;
6053
+ declare function updateSchedule(httpClient: HttpClient$7): (resourceId: string | null, schedule: Schedule$2) => Promise<UpdateScheduleResponse & UpdateScheduleResponseNonNullableFields>;
6054
+ declare function deleteResource(httpClient: HttpClient$7): (_id: string) => Promise<DeleteResourceResponse & DeleteResourceResponseNonNullableFields>;
6055
+ declare const onResourceNotification: EventDefinition$4<ResourceNotificationEnvelope, "com.wixpress.bookings.resources.core.api.v1.resource.ResourceNotification">;
5927
6056
 
5928
6057
  type index_d$7_BatchCreateResourceRequest = BatchCreateResourceRequest;
5929
6058
  type index_d$7_BatchCreateResourceResponse = BatchCreateResourceResponse;
@@ -8100,6 +8229,7 @@ interface ServiceOptionsAndVariantsUpdatedEnvelope {
8100
8229
  metadata: EventMetadata$2;
8101
8230
  }
8102
8231
  interface ServiceOptionsAndVariantsDeletedEnvelope {
8232
+ entity: ServiceOptionsAndVariants;
8103
8233
  metadata: EventMetadata$2;
8104
8234
  }
8105
8235
  interface UpdateServiceOptionsAndVariants {
@@ -8212,10 +8342,50 @@ interface ServiceOptionsAndVariantsListQueryBuilder {
8212
8342
  find: () => Promise<ServiceOptionsAndVariantsListQueryResult>;
8213
8343
  }
8214
8344
 
8345
+ interface HttpClient$6 {
8346
+ request<TResponse, TData = any>(req: RequestOptionsFactory$6<TResponse, TData>): Promise<HttpResponse$6<TResponse>>;
8347
+ fetchWithAuth: typeof fetch;
8348
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
8349
+ }
8350
+ type RequestOptionsFactory$6<TResponse = any, TData = any> = (context: any) => RequestOptions$6<TResponse, TData>;
8351
+ type HttpResponse$6<T = any> = {
8352
+ data: T;
8353
+ status: number;
8354
+ statusText: string;
8355
+ headers: any;
8356
+ request?: any;
8357
+ };
8358
+ type RequestOptions$6<_TResponse = any, Data = any> = {
8359
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
8360
+ url: string;
8361
+ data?: Data;
8362
+ params?: URLSearchParams;
8363
+ } & APIMetadata$6;
8364
+ type APIMetadata$6 = {
8365
+ methodFqn?: string;
8366
+ entityFqdn?: string;
8367
+ packageName?: string;
8368
+ };
8369
+ type EventDefinition$3<Payload = unknown, Type extends string = string> = {
8370
+ __type: 'event-definition';
8371
+ type: Type;
8372
+ isDomainEvent?: boolean;
8373
+ transformations?: (envelope: unknown) => Payload;
8374
+ __payload: Payload;
8375
+ };
8376
+ declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
8377
+
8378
+ declare global {
8379
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
8380
+ interface SymbolConstructor {
8381
+ readonly observable: symbol;
8382
+ }
8383
+ }
8384
+
8215
8385
  declare const __metadata$6: {
8216
8386
  PACKAGE_NAME: string;
8217
8387
  };
8218
- declare function createServiceOptionsAndVariants(httpClient: HttpClient): (serviceOptionsAndVariants: ServiceOptionsAndVariants) => Promise<ServiceOptionsAndVariants & {
8388
+ declare function createServiceOptionsAndVariants(httpClient: HttpClient$6): (serviceOptionsAndVariants: ServiceOptionsAndVariants) => Promise<ServiceOptionsAndVariants & {
8219
8389
  options?: {
8220
8390
  values: {
8221
8391
  customData?: {
@@ -8248,8 +8418,8 @@ declare function createServiceOptionsAndVariants(httpClient: HttpClient): (servi
8248
8418
  currency: string;
8249
8419
  } | undefined;
8250
8420
  }>;
8251
- declare function cloneServiceOptionsAndVariants(httpClient: HttpClient): (cloneFromId: string, targetServiceId: string) => Promise<CloneServiceOptionsAndVariantsResponse & CloneServiceOptionsAndVariantsResponseNonNullableFields>;
8252
- declare function getServiceOptionsAndVariants(httpClient: HttpClient): (serviceOptionsAndVariantsId: string) => Promise<ServiceOptionsAndVariants & {
8421
+ declare function cloneServiceOptionsAndVariants(httpClient: HttpClient$6): (cloneFromId: string, targetServiceId: string) => Promise<CloneServiceOptionsAndVariantsResponse & CloneServiceOptionsAndVariantsResponseNonNullableFields>;
8422
+ declare function getServiceOptionsAndVariants(httpClient: HttpClient$6): (serviceOptionsAndVariantsId: string) => Promise<ServiceOptionsAndVariants & {
8253
8423
  options?: {
8254
8424
  values: {
8255
8425
  customData?: {
@@ -8282,8 +8452,8 @@ declare function getServiceOptionsAndVariants(httpClient: HttpClient): (serviceO
8282
8452
  currency: string;
8283
8453
  } | undefined;
8284
8454
  }>;
8285
- declare function getServiceOptionsAndVariantsByServiceId(httpClient: HttpClient): (serviceId: string) => Promise<GetServiceOptionsAndVariantsByServiceIdResponse & GetServiceOptionsAndVariantsByServiceIdResponseNonNullableFields>;
8286
- declare function updateServiceOptionsAndVariants(httpClient: HttpClient): (_id: string | null, serviceOptionsAndVariants: UpdateServiceOptionsAndVariants) => Promise<ServiceOptionsAndVariants & {
8455
+ declare function getServiceOptionsAndVariantsByServiceId(httpClient: HttpClient$6): (serviceId: string) => Promise<GetServiceOptionsAndVariantsByServiceIdResponse & GetServiceOptionsAndVariantsByServiceIdResponseNonNullableFields>;
8456
+ declare function updateServiceOptionsAndVariants(httpClient: HttpClient$6): (_id: string | null, serviceOptionsAndVariants: UpdateServiceOptionsAndVariants) => Promise<ServiceOptionsAndVariants & {
8287
8457
  options?: {
8288
8458
  values: {
8289
8459
  customData?: {
@@ -8316,11 +8486,11 @@ declare function updateServiceOptionsAndVariants(httpClient: HttpClient): (_id:
8316
8486
  currency: string;
8317
8487
  } | undefined;
8318
8488
  }>;
8319
- declare function deleteServiceOptionsAndVariants(httpClient: HttpClient): (serviceOptionsAndVariantsId: string, options?: DeleteServiceOptionsAndVariantsOptions) => Promise<void>;
8320
- declare function queryServiceOptionsAndVariants(httpClient: HttpClient): () => ServiceOptionsAndVariantsListQueryBuilder;
8321
- declare const onServiceOptionsAndVariantsCreated: EventDefinition<ServiceOptionsAndVariantsCreatedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_created">;
8322
- declare const onServiceOptionsAndVariantsUpdated: EventDefinition<ServiceOptionsAndVariantsUpdatedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_updated">;
8323
- declare const onServiceOptionsAndVariantsDeleted: EventDefinition<ServiceOptionsAndVariantsDeletedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_deleted">;
8489
+ declare function deleteServiceOptionsAndVariants(httpClient: HttpClient$6): (serviceOptionsAndVariantsId: string, options?: DeleteServiceOptionsAndVariantsOptions) => Promise<void>;
8490
+ declare function queryServiceOptionsAndVariants(httpClient: HttpClient$6): () => ServiceOptionsAndVariantsListQueryBuilder;
8491
+ declare const onServiceOptionsAndVariantsCreated: EventDefinition$3<ServiceOptionsAndVariantsCreatedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_created">;
8492
+ declare const onServiceOptionsAndVariantsUpdated: EventDefinition$3<ServiceOptionsAndVariantsUpdatedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_updated">;
8493
+ declare const onServiceOptionsAndVariantsDeleted: EventDefinition$3<ServiceOptionsAndVariantsDeletedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_deleted">;
8324
8494
 
8325
8495
  type index_d$6_BookingsApprovalPolicy = BookingsApprovalPolicy;
8326
8496
  type index_d$6_BusinessServicesPolicy = BusinessServicesPolicy;
@@ -9213,10 +9383,42 @@ interface QueryExtendedBookingsOptions {
9213
9383
  withBookingAttendanceInfo?: boolean;
9214
9384
  }
9215
9385
 
9386
+ interface HttpClient$5 {
9387
+ request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
9388
+ fetchWithAuth: typeof fetch;
9389
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
9390
+ }
9391
+ type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
9392
+ type HttpResponse$5<T = any> = {
9393
+ data: T;
9394
+ status: number;
9395
+ statusText: string;
9396
+ headers: any;
9397
+ request?: any;
9398
+ };
9399
+ type RequestOptions$5<_TResponse = any, Data = any> = {
9400
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
9401
+ url: string;
9402
+ data?: Data;
9403
+ params?: URLSearchParams;
9404
+ } & APIMetadata$5;
9405
+ type APIMetadata$5 = {
9406
+ methodFqn?: string;
9407
+ entityFqdn?: string;
9408
+ packageName?: string;
9409
+ };
9410
+
9411
+ declare global {
9412
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
9413
+ interface SymbolConstructor {
9414
+ readonly observable: symbol;
9415
+ }
9416
+ }
9417
+
9216
9418
  declare const __metadata$5: {
9217
9419
  PACKAGE_NAME: string;
9218
9420
  };
9219
- declare function queryExtendedBookings(httpClient: HttpClient): (query: CommonQueryV2, options?: QueryExtendedBookingsOptions) => Promise<QueryExtendedBookingsResponse & QueryExtendedBookingsResponseNonNullableFields>;
9421
+ declare function queryExtendedBookings(httpClient: HttpClient$5): (query: CommonQueryV2, options?: QueryExtendedBookingsOptions) => Promise<QueryExtendedBookingsResponse & QueryExtendedBookingsResponseNonNullableFields>;
9220
9422
 
9221
9423
  type index_d$5_BookingFeeDetails = BookingFeeDetails;
9222
9424
  type index_d$5_BookingFeeStatus = BookingFeeStatus;
@@ -14701,6 +14903,7 @@ interface ServiceUpdatedEnvelope {
14701
14903
  metadata: EventMetadata$1;
14702
14904
  }
14703
14905
  interface ServiceDeletedEnvelope {
14906
+ entity: Service;
14704
14907
  metadata: EventMetadata$1;
14705
14908
  }
14706
14909
  interface UpdateService {
@@ -14897,10 +15100,50 @@ interface CloneServiceOptions {
14897
15100
  cloneServiceName?: string | null;
14898
15101
  }
14899
15102
 
15103
+ interface HttpClient$4 {
15104
+ request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
15105
+ fetchWithAuth: typeof fetch;
15106
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
15107
+ }
15108
+ type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
15109
+ type HttpResponse$4<T = any> = {
15110
+ data: T;
15111
+ status: number;
15112
+ statusText: string;
15113
+ headers: any;
15114
+ request?: any;
15115
+ };
15116
+ type RequestOptions$4<_TResponse = any, Data = any> = {
15117
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
15118
+ url: string;
15119
+ data?: Data;
15120
+ params?: URLSearchParams;
15121
+ } & APIMetadata$4;
15122
+ type APIMetadata$4 = {
15123
+ methodFqn?: string;
15124
+ entityFqdn?: string;
15125
+ packageName?: string;
15126
+ };
15127
+ type EventDefinition$2<Payload = unknown, Type extends string = string> = {
15128
+ __type: 'event-definition';
15129
+ type: Type;
15130
+ isDomainEvent?: boolean;
15131
+ transformations?: (envelope: unknown) => Payload;
15132
+ __payload: Payload;
15133
+ };
15134
+ declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
15135
+
15136
+ declare global {
15137
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
15138
+ interface SymbolConstructor {
15139
+ readonly observable: symbol;
15140
+ }
15141
+ }
15142
+
14900
15143
  declare const __metadata$4: {
14901
15144
  PACKAGE_NAME: string;
14902
15145
  };
14903
- declare function createService(httpClient: HttpClient): (service: Service) => Promise<Service & {
15146
+ declare function createService(httpClient: HttpClient$4): (service: Service) => Promise<Service & {
14904
15147
  type: ServiceType;
14905
15148
  media?: {
14906
15149
  items: {
@@ -15049,7 +15292,7 @@ declare function createService(httpClient: HttpClient): (service: Service) => Pr
15049
15292
  } | undefined;
15050
15293
  } | undefined;
15051
15294
  }>;
15052
- declare function getService(httpClient: HttpClient): (serviceId: string) => Promise<Service & {
15295
+ declare function getService(httpClient: HttpClient$4): (serviceId: string) => Promise<Service & {
15053
15296
  type: ServiceType;
15054
15297
  media?: {
15055
15298
  items: {
@@ -15198,7 +15441,7 @@ declare function getService(httpClient: HttpClient): (serviceId: string) => Prom
15198
15441
  } | undefined;
15199
15442
  } | undefined;
15200
15443
  }>;
15201
- declare function updateService(httpClient: HttpClient): (_id: string | null, service: UpdateService) => Promise<Service & {
15444
+ declare function updateService(httpClient: HttpClient$4): (_id: string | null, service: UpdateService) => Promise<Service & {
15202
15445
  type: ServiceType;
15203
15446
  media?: {
15204
15447
  items: {
@@ -15347,22 +15590,22 @@ declare function updateService(httpClient: HttpClient): (_id: string | null, ser
15347
15590
  } | undefined;
15348
15591
  } | undefined;
15349
15592
  }>;
15350
- declare function bulkUpdateServices(httpClient: HttpClient): (options?: BulkUpdateServicesOptions) => Promise<BulkUpdateServicesResponse & BulkUpdateServicesResponseNonNullableFields>;
15351
- declare function deleteService(httpClient: HttpClient): (serviceId: string, options?: DeleteServiceOptions) => Promise<void>;
15352
- declare function bulkDeleteServices(httpClient: HttpClient): (ids: string[], options?: BulkDeleteServicesOptions) => Promise<BulkDeleteServicesResponse & BulkDeleteServicesResponseNonNullableFields>;
15353
- declare function queryServices(httpClient: HttpClient): (options?: QueryServicesOptions) => ServicesQueryBuilder;
15354
- declare function searchServices(httpClient: HttpClient): (search: CursorSearch) => Promise<SearchServicesResponse & SearchServicesResponseNonNullableFields>;
15355
- declare function queryPolicies(httpClient: HttpClient): (query: CursorQuery) => Promise<QueryPoliciesResponse & QueryPoliciesResponseNonNullableFields>;
15356
- declare function countServices(httpClient: HttpClient): (options?: CountServicesOptions) => Promise<CountServicesResponse & CountServicesResponseNonNullableFields>;
15357
- declare function setServiceLocations(httpClient: HttpClient): (serviceId: string, locations: V2Location[], options?: SetServiceLocationsOptions) => Promise<SetServiceLocationsResponse & SetServiceLocationsResponseNonNullableFields>;
15358
- declare function enablePricingPlansForService(httpClient: HttpClient): (serviceId: string, pricingPlanIds: string[]) => Promise<EnablePricingPlansForServiceResponse & EnablePricingPlansForServiceResponseNonNullableFields>;
15359
- declare function disablePricingPlansForService(httpClient: HttpClient): (serviceId: string, options?: DisablePricingPlansForServiceOptions) => Promise<DisablePricingPlansForServiceResponse & DisablePricingPlansForServiceResponseNonNullableFields>;
15360
- declare function setCustomSlug(httpClient: HttpClient): (serviceId: string, slugName: string) => Promise<SetCustomSlugResponse & SetCustomSlugResponseNonNullableFields>;
15361
- declare function validateSlug(httpClient: HttpClient): (serviceId: string, options: ValidateSlugOptions) => Promise<ValidateSlugResponse & ValidateSlugResponseNonNullableFields>;
15362
- declare function cloneService(httpClient: HttpClient): (sourceServiceId: string, options?: CloneServiceOptions) => Promise<CloneServiceResponse & CloneServiceResponseNonNullableFields>;
15363
- declare const onServiceCreated: EventDefinition<ServiceCreatedEnvelope, "wix.bookings.services.v2.service_created">;
15364
- declare const onServiceUpdated: EventDefinition<ServiceUpdatedEnvelope, "wix.bookings.services.v2.service_updated">;
15365
- declare const onServiceDeleted: EventDefinition<ServiceDeletedEnvelope, "wix.bookings.services.v2.service_deleted">;
15593
+ declare function bulkUpdateServices(httpClient: HttpClient$4): (options?: BulkUpdateServicesOptions) => Promise<BulkUpdateServicesResponse & BulkUpdateServicesResponseNonNullableFields>;
15594
+ declare function deleteService(httpClient: HttpClient$4): (serviceId: string, options?: DeleteServiceOptions) => Promise<void>;
15595
+ declare function bulkDeleteServices(httpClient: HttpClient$4): (ids: string[], options?: BulkDeleteServicesOptions) => Promise<BulkDeleteServicesResponse & BulkDeleteServicesResponseNonNullableFields>;
15596
+ declare function queryServices(httpClient: HttpClient$4): (options?: QueryServicesOptions) => ServicesQueryBuilder;
15597
+ declare function searchServices(httpClient: HttpClient$4): (search: CursorSearch) => Promise<SearchServicesResponse & SearchServicesResponseNonNullableFields>;
15598
+ declare function queryPolicies(httpClient: HttpClient$4): (query: CursorQuery) => Promise<QueryPoliciesResponse & QueryPoliciesResponseNonNullableFields>;
15599
+ declare function countServices(httpClient: HttpClient$4): (options?: CountServicesOptions) => Promise<CountServicesResponse & CountServicesResponseNonNullableFields>;
15600
+ declare function setServiceLocations(httpClient: HttpClient$4): (serviceId: string, locations: V2Location[], options?: SetServiceLocationsOptions) => Promise<SetServiceLocationsResponse & SetServiceLocationsResponseNonNullableFields>;
15601
+ declare function enablePricingPlansForService(httpClient: HttpClient$4): (serviceId: string, pricingPlanIds: string[]) => Promise<EnablePricingPlansForServiceResponse & EnablePricingPlansForServiceResponseNonNullableFields>;
15602
+ declare function disablePricingPlansForService(httpClient: HttpClient$4): (serviceId: string, options?: DisablePricingPlansForServiceOptions) => Promise<DisablePricingPlansForServiceResponse & DisablePricingPlansForServiceResponseNonNullableFields>;
15603
+ declare function setCustomSlug(httpClient: HttpClient$4): (serviceId: string, slugName: string) => Promise<SetCustomSlugResponse & SetCustomSlugResponseNonNullableFields>;
15604
+ declare function validateSlug(httpClient: HttpClient$4): (serviceId: string, options: ValidateSlugOptions) => Promise<ValidateSlugResponse & ValidateSlugResponseNonNullableFields>;
15605
+ declare function cloneService(httpClient: HttpClient$4): (sourceServiceId: string, options?: CloneServiceOptions) => Promise<CloneServiceResponse & CloneServiceResponseNonNullableFields>;
15606
+ declare const onServiceCreated: EventDefinition$2<ServiceCreatedEnvelope, "wix.bookings.services.v2.service_created">;
15607
+ declare const onServiceUpdated: EventDefinition$2<ServiceUpdatedEnvelope, "wix.bookings.services.v2.service_updated">;
15608
+ declare const onServiceDeleted: EventDefinition$2<ServiceDeletedEnvelope, "wix.bookings.services.v2.service_deleted">;
15366
15609
 
15367
15610
  type index_d$4_Action = Action;
15368
15611
  declare const index_d$4_Action: typeof Action;
@@ -15905,16 +16148,56 @@ interface DeleteCategoryOptions {
15905
16148
  deleteServices?: boolean | null;
15906
16149
  }
15907
16150
 
16151
+ interface HttpClient$3 {
16152
+ request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
16153
+ fetchWithAuth: typeof fetch;
16154
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
16155
+ }
16156
+ type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
16157
+ type HttpResponse$3<T = any> = {
16158
+ data: T;
16159
+ status: number;
16160
+ statusText: string;
16161
+ headers: any;
16162
+ request?: any;
16163
+ };
16164
+ type RequestOptions$3<_TResponse = any, Data = any> = {
16165
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
16166
+ url: string;
16167
+ data?: Data;
16168
+ params?: URLSearchParams;
16169
+ } & APIMetadata$3;
16170
+ type APIMetadata$3 = {
16171
+ methodFqn?: string;
16172
+ entityFqdn?: string;
16173
+ packageName?: string;
16174
+ };
16175
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
16176
+ __type: 'event-definition';
16177
+ type: Type;
16178
+ isDomainEvent?: boolean;
16179
+ transformations?: (envelope: unknown) => Payload;
16180
+ __payload: Payload;
16181
+ };
16182
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
16183
+
16184
+ declare global {
16185
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
16186
+ interface SymbolConstructor {
16187
+ readonly observable: symbol;
16188
+ }
16189
+ }
16190
+
15908
16191
  declare const __metadata$3: {
15909
16192
  PACKAGE_NAME: string;
15910
16193
  };
15911
- declare function listCategories(httpClient: HttpClient): (options?: ListCategoriesOptions) => Promise<ListCategoryResponse & ListCategoryResponseNonNullableFields>;
15912
- declare function createCategory(httpClient: HttpClient): (category: Category) => Promise<Category & {
16194
+ declare function listCategories(httpClient: HttpClient$3): (options?: ListCategoriesOptions) => Promise<ListCategoryResponse & ListCategoryResponseNonNullableFields>;
16195
+ declare function createCategory(httpClient: HttpClient$3): (category: Category) => Promise<Category & {
15913
16196
  status: Status;
15914
16197
  }>;
15915
- declare function updateCategory(httpClient: HttpClient): (_id: string | null, category: UpdateCategory) => Promise<UpdateCategoryResponse & UpdateCategoryResponseNonNullableFields>;
15916
- declare function deleteCategory(httpClient: HttpClient): (_id: string | null, options?: DeleteCategoryOptions) => Promise<DeleteCategoryResponse>;
15917
- declare const onCategoryNotification: EventDefinition<CategoryNotificationEnvelope, "com.wixpress.bookings.services.api.v1.CategoryNotification">;
16198
+ declare function updateCategory(httpClient: HttpClient$3): (_id: string | null, category: UpdateCategory) => Promise<UpdateCategoryResponse & UpdateCategoryResponseNonNullableFields>;
16199
+ declare function deleteCategory(httpClient: HttpClient$3): (_id: string | null, options?: DeleteCategoryOptions) => Promise<DeleteCategoryResponse>;
16200
+ declare const onCategoryNotification: EventDefinition$1<CategoryNotificationEnvelope, "com.wixpress.bookings.services.api.v1.CategoryNotification">;
15918
16201
 
15919
16202
  type index_d$3_BatchCreateCategoryRequest = BatchCreateCategoryRequest;
15920
16203
  type index_d$3_BatchCreateCategoryResponse = BatchCreateCategoryResponse;
@@ -16373,15 +16656,47 @@ interface AttendancesQueryBuilder {
16373
16656
  find: () => Promise<AttendancesQueryResult>;
16374
16657
  }
16375
16658
 
16659
+ interface HttpClient$2 {
16660
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
16661
+ fetchWithAuth: typeof fetch;
16662
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
16663
+ }
16664
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
16665
+ type HttpResponse$2<T = any> = {
16666
+ data: T;
16667
+ status: number;
16668
+ statusText: string;
16669
+ headers: any;
16670
+ request?: any;
16671
+ };
16672
+ type RequestOptions$2<_TResponse = any, Data = any> = {
16673
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
16674
+ url: string;
16675
+ data?: Data;
16676
+ params?: URLSearchParams;
16677
+ } & APIMetadata$2;
16678
+ type APIMetadata$2 = {
16679
+ methodFqn?: string;
16680
+ entityFqdn?: string;
16681
+ packageName?: string;
16682
+ };
16683
+
16684
+ declare global {
16685
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
16686
+ interface SymbolConstructor {
16687
+ readonly observable: symbol;
16688
+ }
16689
+ }
16690
+
16376
16691
  declare const __metadata$2: {
16377
16692
  PACKAGE_NAME: string;
16378
16693
  };
16379
- declare function getAttendance(httpClient: HttpClient): (attendanceId: string) => Promise<Attendance & {
16694
+ declare function getAttendance(httpClient: HttpClient$2): (attendanceId: string) => Promise<Attendance & {
16380
16695
  status: AttendanceStatus;
16381
16696
  numberOfAttendees: number;
16382
16697
  }>;
16383
- declare function setAttendance(httpClient: HttpClient): (attendance: Attendance, options?: SetAttendanceOptions) => Promise<SetAttendanceResponse & SetAttendanceResponseNonNullableFields>;
16384
- declare function queryAttendance(httpClient: HttpClient): () => AttendancesQueryBuilder;
16698
+ declare function setAttendance(httpClient: HttpClient$2): (attendance: Attendance, options?: SetAttendanceOptions) => Promise<SetAttendanceResponse & SetAttendanceResponseNonNullableFields>;
16699
+ declare function queryAttendance(httpClient: HttpClient$2): () => AttendancesQueryBuilder;
16385
16700
 
16386
16701
  type index_d$2_Attendance = Attendance;
16387
16702
  type index_d$2_AttendanceDetails = AttendanceDetails;
@@ -19408,18 +19723,58 @@ interface ConfirmOrDeclineBookingOptions {
19408
19723
  paymentStatus?: PaymentStatus$1;
19409
19724
  }
19410
19725
 
19726
+ interface HttpClient$1 {
19727
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
19728
+ fetchWithAuth: typeof fetch;
19729
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
19730
+ }
19731
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
19732
+ type HttpResponse$1<T = any> = {
19733
+ data: T;
19734
+ status: number;
19735
+ statusText: string;
19736
+ headers: any;
19737
+ request?: any;
19738
+ };
19739
+ type RequestOptions$1<_TResponse = any, Data = any> = {
19740
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
19741
+ url: string;
19742
+ data?: Data;
19743
+ params?: URLSearchParams;
19744
+ } & APIMetadata$1;
19745
+ type APIMetadata$1 = {
19746
+ methodFqn?: string;
19747
+ entityFqdn?: string;
19748
+ packageName?: string;
19749
+ };
19750
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
19751
+ __type: 'event-definition';
19752
+ type: Type;
19753
+ isDomainEvent?: boolean;
19754
+ transformations?: (envelope: unknown) => Payload;
19755
+ __payload: Payload;
19756
+ };
19757
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
19758
+
19759
+ declare global {
19760
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
19761
+ interface SymbolConstructor {
19762
+ readonly observable: symbol;
19763
+ }
19764
+ }
19765
+
19411
19766
  declare const __metadata$1: {
19412
19767
  PACKAGE_NAME: string;
19413
19768
  };
19414
- declare function createBooking(httpClient: HttpClient): (booking: Booking$1, options?: CreateBookingOptions) => Promise<CreateBookingResponse & CreateBookingResponseNonNullableFields>;
19415
- declare function bulkCreateBooking(httpClient: HttpClient): (createBookingsInfo: CreateBookingInfo[], options?: BulkCreateBookingOptions) => Promise<BulkCreateBookingResponse & BulkCreateBookingResponseNonNullableFields>;
19416
- declare function rescheduleBooking(httpClient: HttpClient): (bookingId: string, slot: V2Slot, options?: RescheduleBookingOptions) => Promise<RescheduleBookingResponse & RescheduleBookingResponseNonNullableFields>;
19417
- declare function confirmBooking(httpClient: HttpClient): (bookingId: string, revision: string | null, options?: ConfirmBookingOptions) => Promise<ConfirmBookingResponse & ConfirmBookingResponseNonNullableFields>;
19418
- declare function updateExtendedFields(httpClient: HttpClient): (_id: string, namespace: string, options: UpdateExtendedFieldsOptions) => Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
19419
- declare function declineBooking(httpClient: HttpClient): (bookingId: string, revision: string | null, options?: DeclineBookingOptions) => Promise<DeclineBookingResponse & DeclineBookingResponseNonNullableFields>;
19420
- declare function cancelBooking(httpClient: HttpClient): (bookingId: string, options?: CancelBookingOptions) => Promise<CancelBookingResponse & CancelBookingResponseNonNullableFields>;
19421
- declare function updateNumberOfParticipants(httpClient: HttpClient): (bookingId: string, options?: UpdateNumberOfParticipantsOptions) => Promise<UpdateNumberOfParticipantsResponse & UpdateNumberOfParticipantsResponseNonNullableFields>;
19422
- declare function confirmOrDeclineBooking(httpClient: HttpClient): (bookingId: string, options?: ConfirmOrDeclineBookingOptions) => Promise<ConfirmOrDeclineBookingResponse & ConfirmOrDeclineBookingResponseNonNullableFields>;
19769
+ declare function createBooking(httpClient: HttpClient$1): (booking: Booking$1, options?: CreateBookingOptions) => Promise<CreateBookingResponse & CreateBookingResponseNonNullableFields>;
19770
+ declare function bulkCreateBooking(httpClient: HttpClient$1): (createBookingsInfo: CreateBookingInfo[], options?: BulkCreateBookingOptions) => Promise<BulkCreateBookingResponse & BulkCreateBookingResponseNonNullableFields>;
19771
+ declare function rescheduleBooking(httpClient: HttpClient$1): (bookingId: string, slot: V2Slot, options?: RescheduleBookingOptions) => Promise<RescheduleBookingResponse & RescheduleBookingResponseNonNullableFields>;
19772
+ declare function confirmBooking(httpClient: HttpClient$1): (bookingId: string, revision: string | null, options?: ConfirmBookingOptions) => Promise<ConfirmBookingResponse & ConfirmBookingResponseNonNullableFields>;
19773
+ declare function updateExtendedFields(httpClient: HttpClient$1): (_id: string, namespace: string, options: UpdateExtendedFieldsOptions) => Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
19774
+ declare function declineBooking(httpClient: HttpClient$1): (bookingId: string, revision: string | null, options?: DeclineBookingOptions) => Promise<DeclineBookingResponse & DeclineBookingResponseNonNullableFields>;
19775
+ declare function cancelBooking(httpClient: HttpClient$1): (bookingId: string, options?: CancelBookingOptions) => Promise<CancelBookingResponse & CancelBookingResponseNonNullableFields>;
19776
+ declare function updateNumberOfParticipants(httpClient: HttpClient$1): (bookingId: string, options?: UpdateNumberOfParticipantsOptions) => Promise<UpdateNumberOfParticipantsResponse & UpdateNumberOfParticipantsResponseNonNullableFields>;
19777
+ declare function confirmOrDeclineBooking(httpClient: HttpClient$1): (bookingId: string, options?: ConfirmOrDeclineBookingOptions) => Promise<ConfirmOrDeclineBookingResponse & ConfirmOrDeclineBookingResponseNonNullableFields>;
19423
19778
  declare const onBookingCreated: EventDefinition<BookingCreatedEnvelope, "wix.bookings.v2.booking_created">;
19424
19779
  declare const onBookingRescheduled: EventDefinition<BookingRescheduledEnvelope, "wix.bookings.v2.booking_rescheduled">;
19425
19780
  declare const onBookingCanceled: EventDefinition<BookingCanceledEnvelope, "wix.bookings.v2.booking_canceled">;
@@ -20281,6 +20636,38 @@ interface CalculatePriceResponseNonNullableFields {
20281
20636
  };
20282
20637
  }
20283
20638
 
20639
+ interface HttpClient {
20640
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
20641
+ fetchWithAuth: typeof fetch;
20642
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
20643
+ }
20644
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
20645
+ type HttpResponse<T = any> = {
20646
+ data: T;
20647
+ status: number;
20648
+ statusText: string;
20649
+ headers: any;
20650
+ request?: any;
20651
+ };
20652
+ type RequestOptions<_TResponse = any, Data = any> = {
20653
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
20654
+ url: string;
20655
+ data?: Data;
20656
+ params?: URLSearchParams;
20657
+ } & APIMetadata;
20658
+ type APIMetadata = {
20659
+ methodFqn?: string;
20660
+ entityFqdn?: string;
20661
+ packageName?: string;
20662
+ };
20663
+
20664
+ declare global {
20665
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
20666
+ interface SymbolConstructor {
20667
+ readonly observable: symbol;
20668
+ }
20669
+ }
20670
+
20284
20671
  declare const __metadata: {
20285
20672
  PACKAGE_NAME: string;
20286
20673
  };