@bookinglab/booking-journey-api 2.15.0 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1633,6 +1633,8 @@ interface BookingLabPurchaseResponse {
1633
1633
  interface BookingLabListBookingsParams {
1634
1634
  client_id?: number;
1635
1635
  member_id?: number;
1636
+ start_date?: string;
1637
+ end_date?: string;
1636
1638
  }
1637
1639
  interface BookingLabListBookingsResponse {
1638
1640
  total_entries?: number;
@@ -1644,6 +1646,65 @@ interface BookingLabListBookingsResponse {
1644
1646
  _links?: Record<string, any>;
1645
1647
  [key: string]: any;
1646
1648
  }
1649
+ interface BookingLabUpdateBookingClient {
1650
+ first_name?: string;
1651
+ first_name_extra?: string;
1652
+ last_name?: string;
1653
+ last_name_extra?: string;
1654
+ email?: string;
1655
+ mobile_prefix?: string;
1656
+ mobile?: string;
1657
+ mobile_prefix_country_code?: string;
1658
+ phone_prefix?: string;
1659
+ phone?: string;
1660
+ phone_prefix_country_code?: string;
1661
+ address1?: string;
1662
+ address2?: string;
1663
+ address3?: string;
1664
+ address4?: string;
1665
+ address5?: string;
1666
+ postcode?: string;
1667
+ country?: string;
1668
+ member_type?: number;
1669
+ member_level_id?: number;
1670
+ mem_join_date?: string;
1671
+ time_zone?: string;
1672
+ consent?: boolean;
1673
+ [key: string]: any;
1674
+ }
1675
+ interface BookingLabUpdateBookingRequest {
1676
+ datetime?: string;
1677
+ duration?: number;
1678
+ person_id?: number;
1679
+ resource_id?: number;
1680
+ service_id?: number;
1681
+ status?: string;
1682
+ position?: number;
1683
+ price?: number;
1684
+ paid?: number;
1685
+ time_zone?: string;
1686
+ email?: boolean;
1687
+ email_owner?: boolean;
1688
+ attended?: boolean;
1689
+ client_id?: number;
1690
+ client?: BookingLabUpdateBookingClient;
1691
+ extra_info?: {
1692
+ client_type?: number;
1693
+ [key: string]: any;
1694
+ };
1695
+ child_client_ids?: number[];
1696
+ private_note?: string;
1697
+ current_multi_status?: string;
1698
+ update_reason?: string;
1699
+ assets?: any[];
1700
+ requested_assets?: any[];
1701
+ attendees?: any[];
1702
+ [key: string]: any;
1703
+ }
1704
+ interface BookingLabUpdateBookingResponse {
1705
+ id?: number;
1706
+ [key: string]: any;
1707
+ }
1647
1708
 
1648
1709
  /**
1649
1710
  * Core API Client
@@ -1890,6 +1951,14 @@ declare class BookingLabClient extends ApiClient {
1890
1951
  * @param params - Optional query params (client_id, member_id)
1891
1952
  */
1892
1953
  listBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams): Promise<ApiResponse<BookingLabListBookingsResponse>>;
1954
+ /**
1955
+ * Update a booking for a company
1956
+ * @param companyId - The company ID
1957
+ * @param bookingId - The booking ID
1958
+ * @param request - Booking update body (all fields optional)
1959
+ * @param clientToken - Client token for authentication
1960
+ */
1961
+ updateBookinglabBooking(companyId: number, bookingId: number, request: BookingLabUpdateBookingRequest, clientToken: string): Promise<ApiResponse<BookingLabUpdateBookingResponse>>;
1893
1962
  }
1894
1963
  /**
1895
1964
  * Create a new BookingLab client instance
@@ -2391,5 +2460,9 @@ declare function useListBookinglabBookings(companyId: number, clientToken: strin
2391
2460
  * @param enabled - Whether the query should run
2392
2461
  */
2393
2462
  declare function useGetPurchase(companyId: number, serviceId: number, purchaseId: string | number, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabPurchaseResponse, Error>;
2463
+ /**
2464
+ * Hook for updating a booking (BookingLab)
2465
+ */
2466
+ declare function useUpdateBookinglabBooking(companyId: number, bookingId: number, clientToken: string): _tanstack_react_query.UseMutationResult<BookingLabUpdateBookingResponse, Error, BookingLabUpdateBookingRequest, unknown>;
2394
2467
 
2395
- export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientContext, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, type BookingLabAddBasketServiceItemHeaders, type BookingLabAddBasketServiceItemQuestion, type BookingLabAddBasketServiceItemRequest, type BookingLabAddBasketServiceItemResponse, type BookingLabCheckoutBasketBooking, type BookingLabCheckoutBasketEmbeddedClient, type BookingLabCheckoutBasketEmbeddedMember, type BookingLabCheckoutBasketHeaders, type BookingLabCheckoutBasketRequest, type BookingLabCheckoutBasketResponse, BookingLabClient, type BookingLabCompany, type BookingLabConfigPage, type BookingLabConfigProduct, type BookingLabConfigRequest, type BookingLabConfigResponse, type BookingLabConfigUserJourney, BookingLabContext, type BookingLabCreateBasketHeaders, type BookingLabCreateBasketRequest, type BookingLabCreateBasketResponse, type BookingLabDay, type BookingLabDeleteBasketHeaders, type BookingLabDeleteBasketResponse, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, type BookingLabGetCompaniesParams, type BookingLabGetCompaniesResponse, type BookingLabGetDaysParams, type BookingLabGetDaysResponse, type BookingLabGetQuestionsResponse, type BookingLabGetServicesResponse, type BookingLabGetTimesParams, type BookingLabGetTimesResponse, type BookingLabGetTokenRequest, type BookingLabGetTokenResponse, type BookingLabHeldAsset, type BookingLabListBookingsParams, type BookingLabListBookingsResponse, BookingLabProvider, type BookingLabPurchaseEmbedded, type BookingLabPurchaseRefund, type BookingLabPurchaseResponse, type BookingLabQuestion, type BookingLabService, type BookingLabTime, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CancelMemberBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CompanyResponse, type CompanySettings, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type FindClientByEmailResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniContext, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type OrdnanceAddressDPA, type OrdnanceAddressLPI, type OrdnanceAddressLookupResponse, type OrdnanceAddressResult, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type RescheduleBookingRequest, type RescheduleBookingResponse, type ResetPasswordRequest, type Resource, type ResourceLinks, type ResourcesResponse, type SendCustomEmailRequest, type SendCustomEmailResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabAddBasketServiceItem, useBookingLabCheckoutBasket, useBookingLabClient, useBookingLabCompanies, useBookingLabConfig, useBookingLabContext, useBookingLabCreateBasket, useBookingLabDays, useBookingLabDeleteBasket, useBookingLabForgotPassword, useBookingLabGetToken, useBookingLabQuestions, useBookingLabService, useBookingLabServices, useBookingLabTimes, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useGetPurchase, useJrniClient, useJrniContext, useListBookinglabBookings, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
2468
+ export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientContext, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, type BookingLabAddBasketServiceItemHeaders, type BookingLabAddBasketServiceItemQuestion, type BookingLabAddBasketServiceItemRequest, type BookingLabAddBasketServiceItemResponse, type BookingLabCheckoutBasketBooking, type BookingLabCheckoutBasketEmbeddedClient, type BookingLabCheckoutBasketEmbeddedMember, type BookingLabCheckoutBasketHeaders, type BookingLabCheckoutBasketRequest, type BookingLabCheckoutBasketResponse, BookingLabClient, type BookingLabCompany, type BookingLabConfigPage, type BookingLabConfigProduct, type BookingLabConfigRequest, type BookingLabConfigResponse, type BookingLabConfigUserJourney, BookingLabContext, type BookingLabCreateBasketHeaders, type BookingLabCreateBasketRequest, type BookingLabCreateBasketResponse, type BookingLabDay, type BookingLabDeleteBasketHeaders, type BookingLabDeleteBasketResponse, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, type BookingLabGetCompaniesParams, type BookingLabGetCompaniesResponse, type BookingLabGetDaysParams, type BookingLabGetDaysResponse, type BookingLabGetQuestionsResponse, type BookingLabGetServicesResponse, type BookingLabGetTimesParams, type BookingLabGetTimesResponse, type BookingLabGetTokenRequest, type BookingLabGetTokenResponse, type BookingLabHeldAsset, type BookingLabListBookingsParams, type BookingLabListBookingsResponse, BookingLabProvider, type BookingLabPurchaseEmbedded, type BookingLabPurchaseRefund, type BookingLabPurchaseResponse, type BookingLabQuestion, type BookingLabService, type BookingLabTime, type BookingLabUpdateBookingClient, type BookingLabUpdateBookingRequest, type BookingLabUpdateBookingResponse, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CancelMemberBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CompanyResponse, type CompanySettings, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type FindClientByEmailResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniContext, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type OrdnanceAddressDPA, type OrdnanceAddressLPI, type OrdnanceAddressLookupResponse, type OrdnanceAddressResult, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type RescheduleBookingRequest, type RescheduleBookingResponse, type ResetPasswordRequest, type Resource, type ResourceLinks, type ResourcesResponse, type SendCustomEmailRequest, type SendCustomEmailResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabAddBasketServiceItem, useBookingLabCheckoutBasket, useBookingLabClient, useBookingLabCompanies, useBookingLabConfig, useBookingLabContext, useBookingLabCreateBasket, useBookingLabDays, useBookingLabDeleteBasket, useBookingLabForgotPassword, useBookingLabGetToken, useBookingLabQuestions, useBookingLabService, useBookingLabServices, useBookingLabTimes, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useGetPurchase, useJrniClient, useJrniContext, useListBookinglabBookings, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateBookinglabBooking, useUpdateClient, useUpdateMember };
package/dist/index.d.ts CHANGED
@@ -1633,6 +1633,8 @@ interface BookingLabPurchaseResponse {
1633
1633
  interface BookingLabListBookingsParams {
1634
1634
  client_id?: number;
1635
1635
  member_id?: number;
1636
+ start_date?: string;
1637
+ end_date?: string;
1636
1638
  }
1637
1639
  interface BookingLabListBookingsResponse {
1638
1640
  total_entries?: number;
@@ -1644,6 +1646,65 @@ interface BookingLabListBookingsResponse {
1644
1646
  _links?: Record<string, any>;
1645
1647
  [key: string]: any;
1646
1648
  }
1649
+ interface BookingLabUpdateBookingClient {
1650
+ first_name?: string;
1651
+ first_name_extra?: string;
1652
+ last_name?: string;
1653
+ last_name_extra?: string;
1654
+ email?: string;
1655
+ mobile_prefix?: string;
1656
+ mobile?: string;
1657
+ mobile_prefix_country_code?: string;
1658
+ phone_prefix?: string;
1659
+ phone?: string;
1660
+ phone_prefix_country_code?: string;
1661
+ address1?: string;
1662
+ address2?: string;
1663
+ address3?: string;
1664
+ address4?: string;
1665
+ address5?: string;
1666
+ postcode?: string;
1667
+ country?: string;
1668
+ member_type?: number;
1669
+ member_level_id?: number;
1670
+ mem_join_date?: string;
1671
+ time_zone?: string;
1672
+ consent?: boolean;
1673
+ [key: string]: any;
1674
+ }
1675
+ interface BookingLabUpdateBookingRequest {
1676
+ datetime?: string;
1677
+ duration?: number;
1678
+ person_id?: number;
1679
+ resource_id?: number;
1680
+ service_id?: number;
1681
+ status?: string;
1682
+ position?: number;
1683
+ price?: number;
1684
+ paid?: number;
1685
+ time_zone?: string;
1686
+ email?: boolean;
1687
+ email_owner?: boolean;
1688
+ attended?: boolean;
1689
+ client_id?: number;
1690
+ client?: BookingLabUpdateBookingClient;
1691
+ extra_info?: {
1692
+ client_type?: number;
1693
+ [key: string]: any;
1694
+ };
1695
+ child_client_ids?: number[];
1696
+ private_note?: string;
1697
+ current_multi_status?: string;
1698
+ update_reason?: string;
1699
+ assets?: any[];
1700
+ requested_assets?: any[];
1701
+ attendees?: any[];
1702
+ [key: string]: any;
1703
+ }
1704
+ interface BookingLabUpdateBookingResponse {
1705
+ id?: number;
1706
+ [key: string]: any;
1707
+ }
1647
1708
 
1648
1709
  /**
1649
1710
  * Core API Client
@@ -1890,6 +1951,14 @@ declare class BookingLabClient extends ApiClient {
1890
1951
  * @param params - Optional query params (client_id, member_id)
1891
1952
  */
1892
1953
  listBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams): Promise<ApiResponse<BookingLabListBookingsResponse>>;
1954
+ /**
1955
+ * Update a booking for a company
1956
+ * @param companyId - The company ID
1957
+ * @param bookingId - The booking ID
1958
+ * @param request - Booking update body (all fields optional)
1959
+ * @param clientToken - Client token for authentication
1960
+ */
1961
+ updateBookinglabBooking(companyId: number, bookingId: number, request: BookingLabUpdateBookingRequest, clientToken: string): Promise<ApiResponse<BookingLabUpdateBookingResponse>>;
1893
1962
  }
1894
1963
  /**
1895
1964
  * Create a new BookingLab client instance
@@ -2391,5 +2460,9 @@ declare function useListBookinglabBookings(companyId: number, clientToken: strin
2391
2460
  * @param enabled - Whether the query should run
2392
2461
  */
2393
2462
  declare function useGetPurchase(companyId: number, serviceId: number, purchaseId: string | number, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabPurchaseResponse, Error>;
2463
+ /**
2464
+ * Hook for updating a booking (BookingLab)
2465
+ */
2466
+ declare function useUpdateBookinglabBooking(companyId: number, bookingId: number, clientToken: string): _tanstack_react_query.UseMutationResult<BookingLabUpdateBookingResponse, Error, BookingLabUpdateBookingRequest, unknown>;
2394
2467
 
2395
- export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientContext, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, type BookingLabAddBasketServiceItemHeaders, type BookingLabAddBasketServiceItemQuestion, type BookingLabAddBasketServiceItemRequest, type BookingLabAddBasketServiceItemResponse, type BookingLabCheckoutBasketBooking, type BookingLabCheckoutBasketEmbeddedClient, type BookingLabCheckoutBasketEmbeddedMember, type BookingLabCheckoutBasketHeaders, type BookingLabCheckoutBasketRequest, type BookingLabCheckoutBasketResponse, BookingLabClient, type BookingLabCompany, type BookingLabConfigPage, type BookingLabConfigProduct, type BookingLabConfigRequest, type BookingLabConfigResponse, type BookingLabConfigUserJourney, BookingLabContext, type BookingLabCreateBasketHeaders, type BookingLabCreateBasketRequest, type BookingLabCreateBasketResponse, type BookingLabDay, type BookingLabDeleteBasketHeaders, type BookingLabDeleteBasketResponse, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, type BookingLabGetCompaniesParams, type BookingLabGetCompaniesResponse, type BookingLabGetDaysParams, type BookingLabGetDaysResponse, type BookingLabGetQuestionsResponse, type BookingLabGetServicesResponse, type BookingLabGetTimesParams, type BookingLabGetTimesResponse, type BookingLabGetTokenRequest, type BookingLabGetTokenResponse, type BookingLabHeldAsset, type BookingLabListBookingsParams, type BookingLabListBookingsResponse, BookingLabProvider, type BookingLabPurchaseEmbedded, type BookingLabPurchaseRefund, type BookingLabPurchaseResponse, type BookingLabQuestion, type BookingLabService, type BookingLabTime, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CancelMemberBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CompanyResponse, type CompanySettings, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type FindClientByEmailResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniContext, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type OrdnanceAddressDPA, type OrdnanceAddressLPI, type OrdnanceAddressLookupResponse, type OrdnanceAddressResult, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type RescheduleBookingRequest, type RescheduleBookingResponse, type ResetPasswordRequest, type Resource, type ResourceLinks, type ResourcesResponse, type SendCustomEmailRequest, type SendCustomEmailResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabAddBasketServiceItem, useBookingLabCheckoutBasket, useBookingLabClient, useBookingLabCompanies, useBookingLabConfig, useBookingLabContext, useBookingLabCreateBasket, useBookingLabDays, useBookingLabDeleteBasket, useBookingLabForgotPassword, useBookingLabGetToken, useBookingLabQuestions, useBookingLabService, useBookingLabServices, useBookingLabTimes, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useGetPurchase, useJrniClient, useJrniContext, useListBookinglabBookings, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
2468
+ export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientContext, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, type BookingLabAddBasketServiceItemHeaders, type BookingLabAddBasketServiceItemQuestion, type BookingLabAddBasketServiceItemRequest, type BookingLabAddBasketServiceItemResponse, type BookingLabCheckoutBasketBooking, type BookingLabCheckoutBasketEmbeddedClient, type BookingLabCheckoutBasketEmbeddedMember, type BookingLabCheckoutBasketHeaders, type BookingLabCheckoutBasketRequest, type BookingLabCheckoutBasketResponse, BookingLabClient, type BookingLabCompany, type BookingLabConfigPage, type BookingLabConfigProduct, type BookingLabConfigRequest, type BookingLabConfigResponse, type BookingLabConfigUserJourney, BookingLabContext, type BookingLabCreateBasketHeaders, type BookingLabCreateBasketRequest, type BookingLabCreateBasketResponse, type BookingLabDay, type BookingLabDeleteBasketHeaders, type BookingLabDeleteBasketResponse, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, type BookingLabGetCompaniesParams, type BookingLabGetCompaniesResponse, type BookingLabGetDaysParams, type BookingLabGetDaysResponse, type BookingLabGetQuestionsResponse, type BookingLabGetServicesResponse, type BookingLabGetTimesParams, type BookingLabGetTimesResponse, type BookingLabGetTokenRequest, type BookingLabGetTokenResponse, type BookingLabHeldAsset, type BookingLabListBookingsParams, type BookingLabListBookingsResponse, BookingLabProvider, type BookingLabPurchaseEmbedded, type BookingLabPurchaseRefund, type BookingLabPurchaseResponse, type BookingLabQuestion, type BookingLabService, type BookingLabTime, type BookingLabUpdateBookingClient, type BookingLabUpdateBookingRequest, type BookingLabUpdateBookingResponse, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CancelMemberBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CompanyResponse, type CompanySettings, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type FindClientByEmailResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniContext, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type OrdnanceAddressDPA, type OrdnanceAddressLPI, type OrdnanceAddressLookupResponse, type OrdnanceAddressResult, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type RescheduleBookingRequest, type RescheduleBookingResponse, type ResetPasswordRequest, type Resource, type ResourceLinks, type ResourcesResponse, type SendCustomEmailRequest, type SendCustomEmailResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabAddBasketServiceItem, useBookingLabCheckoutBasket, useBookingLabClient, useBookingLabCompanies, useBookingLabConfig, useBookingLabContext, useBookingLabCreateBasket, useBookingLabDays, useBookingLabDeleteBasket, useBookingLabForgotPassword, useBookingLabGetToken, useBookingLabQuestions, useBookingLabService, useBookingLabServices, useBookingLabTimes, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useGetPurchase, useJrniClient, useJrniContext, useListBookinglabBookings, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateBookinglabBooking, useUpdateClient, useUpdateMember };
package/dist/index.js CHANGED
@@ -575,6 +575,8 @@ var BookingLabClient = class extends ApiClient {
575
575
  const queryParams = {};
576
576
  if (params?.client_id !== void 0) queryParams.client_id = params.client_id;
577
577
  if (params?.member_id !== void 0) queryParams.member_id = params.member_id;
578
+ if (params?.start_date !== void 0) queryParams.start_date = params.start_date;
579
+ if (params?.end_date !== void 0) queryParams.end_date = params.end_date;
578
580
  return this.get(
579
581
  `/company/${companyId}/bookings`,
580
582
  {
@@ -586,6 +588,25 @@ var BookingLabClient = class extends ApiClient {
586
588
  }
587
589
  );
588
590
  }
591
+ /**
592
+ * Update a booking for a company
593
+ * @param companyId - The company ID
594
+ * @param bookingId - The booking ID
595
+ * @param request - Booking update body (all fields optional)
596
+ * @param clientToken - Client token for authentication
597
+ */
598
+ async updateBookinglabBooking(companyId, bookingId, request, clientToken) {
599
+ return this.put(
600
+ `/company/${companyId}/booking/${bookingId}`,
601
+ request,
602
+ {
603
+ headers: {
604
+ "clienttoken": clientToken,
605
+ "x-company-id": String(companyId)
606
+ }
607
+ }
608
+ );
609
+ }
589
610
  };
590
611
  function createBookingLabClient(baseUrl, authToken, appId) {
591
612
  const client = new BookingLabClient({ baseUrl });
@@ -1452,7 +1473,7 @@ function useOrdnanceAddressLookup(postcode, clientToken, enabled = true) {
1452
1473
  function useListBookinglabBookings(companyId, clientToken, params, enabled = true) {
1453
1474
  const client = useBookingLabClient();
1454
1475
  return reactQuery.useQuery({
1455
- queryKey: ["bookingLabListBookings", companyId, params?.client_id, params?.member_id],
1476
+ queryKey: ["bookingLabListBookings", companyId, params?.client_id, params?.member_id, params?.start_date, params?.end_date],
1456
1477
  queryFn: async () => {
1457
1478
  const response = await client.listBookinglabBookings(companyId, clientToken, params);
1458
1479
  return response.data;
@@ -1471,6 +1492,15 @@ function useGetPurchase(companyId, serviceId, purchaseId, clientToken, enabled =
1471
1492
  enabled: enabled && !!companyId && !!serviceId && !!purchaseId && !!clientToken
1472
1493
  });
1473
1494
  }
1495
+ function useUpdateBookinglabBooking(companyId, bookingId, clientToken) {
1496
+ const client = useBookingLabClient();
1497
+ return reactQuery.useMutation({
1498
+ mutationFn: async (request) => {
1499
+ const response = await client.updateBookinglabBooking(companyId, bookingId, request, clientToken);
1500
+ return response.data;
1501
+ }
1502
+ });
1503
+ }
1474
1504
 
1475
1505
  exports.ApiClient = ApiClient;
1476
1506
  exports.ApiClientContext = ApiClientContext;
@@ -1528,6 +1558,7 @@ exports.useResources = useResources;
1528
1558
  exports.useSendCustomEmail = useSendCustomEmail;
1529
1559
  exports.useServices = useServices;
1530
1560
  exports.useTimes = useTimes;
1561
+ exports.useUpdateBookinglabBooking = useUpdateBookinglabBooking;
1531
1562
  exports.useUpdateClient = useUpdateClient;
1532
1563
  exports.useUpdateMember = useUpdateMember;
1533
1564
  //# sourceMappingURL=index.js.map