@bookinglab/booking-journey-api 2.14.0 → 2.15.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
@@ -1630,6 +1630,20 @@ interface BookingLabPurchaseResponse {
1630
1630
  _links?: Record<string, any>;
1631
1631
  [key: string]: any;
1632
1632
  }
1633
+ interface BookingLabListBookingsParams {
1634
+ client_id?: number;
1635
+ member_id?: number;
1636
+ }
1637
+ interface BookingLabListBookingsResponse {
1638
+ total_entries?: number;
1639
+ include_cancelled?: boolean;
1640
+ _embedded?: {
1641
+ bookings?: any[];
1642
+ [key: string]: any;
1643
+ };
1644
+ _links?: Record<string, any>;
1645
+ [key: string]: any;
1646
+ }
1633
1647
 
1634
1648
  /**
1635
1649
  * Core API Client
@@ -1869,6 +1883,13 @@ declare class BookingLabClient extends ApiClient {
1869
1883
  * @param clientToken - Client token for authentication
1870
1884
  */
1871
1885
  getPurchase(companyId: number, serviceId: number, purchaseId: string | number, clientToken: string): Promise<ApiResponse<BookingLabPurchaseResponse>>;
1886
+ /**
1887
+ * List bookings for a company
1888
+ * @param companyId - The company ID
1889
+ * @param clientToken - Client token for authentication
1890
+ * @param params - Optional query params (client_id, member_id)
1891
+ */
1892
+ listBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams): Promise<ApiResponse<BookingLabListBookingsResponse>>;
1872
1893
  }
1873
1894
  /**
1874
1895
  * Create a new BookingLab client instance
@@ -2353,6 +2374,14 @@ declare function useBookingLabDeleteBasket(): _tanstack_react_query.UseMutationR
2353
2374
  * @param enabled - Whether the query should run
2354
2375
  */
2355
2376
  declare function useOrdnanceAddressLookup(postcode: string, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdnanceAddressLookupResponse, Error>;
2377
+ /**
2378
+ * Hook for listing bookings for a company (BookingLab)
2379
+ * @param companyId - The company ID
2380
+ * @param clientToken - Client token for authentication
2381
+ * @param params - Optional query params (client_id, member_id)
2382
+ * @param enabled - Whether the query should run
2383
+ */
2384
+ declare function useListBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabListBookingsResponse, Error>;
2356
2385
  /**
2357
2386
  * Hook for fetching a purchase by ID (BookingLab)
2358
2387
  * @param companyId - The company ID
@@ -2363,4 +2392,4 @@ declare function useOrdnanceAddressLookup(postcode: string, clientToken: string,
2363
2392
  */
2364
2393
  declare function useGetPurchase(companyId: number, serviceId: number, purchaseId: string | number, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabPurchaseResponse, Error>;
2365
2394
 
2366
- 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, 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, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
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 };
package/dist/index.d.ts CHANGED
@@ -1630,6 +1630,20 @@ interface BookingLabPurchaseResponse {
1630
1630
  _links?: Record<string, any>;
1631
1631
  [key: string]: any;
1632
1632
  }
1633
+ interface BookingLabListBookingsParams {
1634
+ client_id?: number;
1635
+ member_id?: number;
1636
+ }
1637
+ interface BookingLabListBookingsResponse {
1638
+ total_entries?: number;
1639
+ include_cancelled?: boolean;
1640
+ _embedded?: {
1641
+ bookings?: any[];
1642
+ [key: string]: any;
1643
+ };
1644
+ _links?: Record<string, any>;
1645
+ [key: string]: any;
1646
+ }
1633
1647
 
1634
1648
  /**
1635
1649
  * Core API Client
@@ -1869,6 +1883,13 @@ declare class BookingLabClient extends ApiClient {
1869
1883
  * @param clientToken - Client token for authentication
1870
1884
  */
1871
1885
  getPurchase(companyId: number, serviceId: number, purchaseId: string | number, clientToken: string): Promise<ApiResponse<BookingLabPurchaseResponse>>;
1886
+ /**
1887
+ * List bookings for a company
1888
+ * @param companyId - The company ID
1889
+ * @param clientToken - Client token for authentication
1890
+ * @param params - Optional query params (client_id, member_id)
1891
+ */
1892
+ listBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams): Promise<ApiResponse<BookingLabListBookingsResponse>>;
1872
1893
  }
1873
1894
  /**
1874
1895
  * Create a new BookingLab client instance
@@ -2353,6 +2374,14 @@ declare function useBookingLabDeleteBasket(): _tanstack_react_query.UseMutationR
2353
2374
  * @param enabled - Whether the query should run
2354
2375
  */
2355
2376
  declare function useOrdnanceAddressLookup(postcode: string, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdnanceAddressLookupResponse, Error>;
2377
+ /**
2378
+ * Hook for listing bookings for a company (BookingLab)
2379
+ * @param companyId - The company ID
2380
+ * @param clientToken - Client token for authentication
2381
+ * @param params - Optional query params (client_id, member_id)
2382
+ * @param enabled - Whether the query should run
2383
+ */
2384
+ declare function useListBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabListBookingsResponse, Error>;
2356
2385
  /**
2357
2386
  * Hook for fetching a purchase by ID (BookingLab)
2358
2387
  * @param companyId - The company ID
@@ -2363,4 +2392,4 @@ declare function useOrdnanceAddressLookup(postcode: string, clientToken: string,
2363
2392
  */
2364
2393
  declare function useGetPurchase(companyId: number, serviceId: number, purchaseId: string | number, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabPurchaseResponse, Error>;
2365
2394
 
2366
- 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, 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, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
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 };
package/dist/index.js CHANGED
@@ -565,6 +565,27 @@ var BookingLabClient = class extends ApiClient {
565
565
  }
566
566
  );
567
567
  }
568
+ /**
569
+ * List bookings for a company
570
+ * @param companyId - The company ID
571
+ * @param clientToken - Client token for authentication
572
+ * @param params - Optional query params (client_id, member_id)
573
+ */
574
+ async listBookinglabBookings(companyId, clientToken, params) {
575
+ const queryParams = {};
576
+ if (params?.client_id !== void 0) queryParams.client_id = params.client_id;
577
+ if (params?.member_id !== void 0) queryParams.member_id = params.member_id;
578
+ return this.get(
579
+ `/company/${companyId}/bookings`,
580
+ {
581
+ params: Object.keys(queryParams).length ? queryParams : void 0,
582
+ headers: {
583
+ "clienttoken": clientToken,
584
+ "x-company-id": String(companyId)
585
+ }
586
+ }
587
+ );
588
+ }
568
589
  };
569
590
  function createBookingLabClient(baseUrl, authToken, appId) {
570
591
  const client = new BookingLabClient({ baseUrl });
@@ -1428,6 +1449,17 @@ function useOrdnanceAddressLookup(postcode, clientToken, enabled = true) {
1428
1449
  enabled: enabled && !!postcode && !!clientToken
1429
1450
  });
1430
1451
  }
1452
+ function useListBookinglabBookings(companyId, clientToken, params, enabled = true) {
1453
+ const client = useBookingLabClient();
1454
+ return reactQuery.useQuery({
1455
+ queryKey: ["bookingLabListBookings", companyId, params?.client_id, params?.member_id],
1456
+ queryFn: async () => {
1457
+ const response = await client.listBookinglabBookings(companyId, clientToken, params);
1458
+ return response.data;
1459
+ },
1460
+ enabled: enabled && !!companyId && !!clientToken
1461
+ });
1462
+ }
1431
1463
  function useGetPurchase(companyId, serviceId, purchaseId, clientToken, enabled = true) {
1432
1464
  const client = useBookingLabClient();
1433
1465
  return reactQuery.useQuery({
@@ -1485,6 +1517,7 @@ exports.useGetMember = useGetMember;
1485
1517
  exports.useGetPurchase = useGetPurchase;
1486
1518
  exports.useJrniClient = useJrniClient;
1487
1519
  exports.useJrniContext = useJrniContext;
1520
+ exports.useListBookinglabBookings = useListBookinglabBookings;
1488
1521
  exports.useListBookings = useListBookings;
1489
1522
  exports.useLogin = useLogin;
1490
1523
  exports.useOrdnanceAddressLookup = useOrdnanceAddressLookup;