@bookinglab/booking-journey-api 2.18.0 → 2.20.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
@@ -1585,6 +1585,15 @@ interface OrdnanceAddressLookupResponse {
1585
1585
  interface OsPlacesStatusResponse {
1586
1586
  status: boolean;
1587
1587
  }
1588
+ /**
1589
+ * BookingLab Ordinance Survey service status (POST variant)
1590
+ */
1591
+ interface OrdinanceSurveyStatusRequest {
1592
+ host: string;
1593
+ }
1594
+ interface OrdinanceSurveyStatusResponse {
1595
+ status: boolean;
1596
+ }
1588
1597
  /**
1589
1598
  * BookingLab Get Purchase
1590
1599
  */
@@ -1974,6 +1983,14 @@ declare class BookingLabClient extends ApiClient {
1974
1983
  * @param isStaging - When true, hits the `osplaces-staging` variant
1975
1984
  */
1976
1985
  getOsPlacesStatus(token: string, isStaging?: boolean): Promise<ApiResponse<OsPlacesStatusResponse>>;
1986
+ /**
1987
+ * Check Ordinance Survey (OS Places) service status via POST (BookingLab).
1988
+ * Sends the host to the absolute serviceStatus endpoint on api.bookinglab.co.uk.
1989
+ * @param token - Value for the X-BL-TOKEN header
1990
+ * @param request - Body containing the host to check
1991
+ * @param production - When true, hits the production endpoint; otherwise the `-staging` variant
1992
+ */
1993
+ getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest, production?: boolean): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
1977
1994
  }
1978
1995
  /**
1979
1996
  * Create a new BookingLab client instance
@@ -2488,5 +2505,13 @@ declare function useUpdateBookinglabBooking(companyId: number, bookingId: number
2488
2505
  * @param enabled - Whether the query should run
2489
2506
  */
2490
2507
  declare function useOsPlacesStatus(token: string, isStaging?: boolean, enabled?: boolean): _tanstack_react_query.UseQueryResult<OsPlacesStatusResponse, Error>;
2508
+ /**
2509
+ * Hook for checking the Ordinance Survey (OS Places) service status via POST (BookingLab)
2510
+ * @param token - Value for the X-BL-TOKEN header
2511
+ * @param host - Host to check (sent in JSON body)
2512
+ * @param production - When true, hits the production endpoint; otherwise the `-staging` variant
2513
+ * @param enabled - Whether the query should run
2514
+ */
2515
+ declare function useOrdinanceSurveyStatus(token: string, host: string, production?: boolean, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
2491
2516
 
2492
- 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 OsPlacesStatusResponse, 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, useOsPlacesStatus, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateBookinglabBooking, useUpdateClient, useUpdateMember };
2517
+ 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 OrdinanceSurveyStatusRequest, type OrdinanceSurveyStatusResponse, type OrdnanceAddressDPA, type OrdnanceAddressLPI, type OrdnanceAddressLookupResponse, type OrdnanceAddressResult, type OsPlacesStatusResponse, 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, useOrdinanceSurveyStatus, useOrdnanceAddressLookup, useOsPlacesStatus, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateBookinglabBooking, useUpdateClient, useUpdateMember };
package/dist/index.d.ts CHANGED
@@ -1585,6 +1585,15 @@ interface OrdnanceAddressLookupResponse {
1585
1585
  interface OsPlacesStatusResponse {
1586
1586
  status: boolean;
1587
1587
  }
1588
+ /**
1589
+ * BookingLab Ordinance Survey service status (POST variant)
1590
+ */
1591
+ interface OrdinanceSurveyStatusRequest {
1592
+ host: string;
1593
+ }
1594
+ interface OrdinanceSurveyStatusResponse {
1595
+ status: boolean;
1596
+ }
1588
1597
  /**
1589
1598
  * BookingLab Get Purchase
1590
1599
  */
@@ -1974,6 +1983,14 @@ declare class BookingLabClient extends ApiClient {
1974
1983
  * @param isStaging - When true, hits the `osplaces-staging` variant
1975
1984
  */
1976
1985
  getOsPlacesStatus(token: string, isStaging?: boolean): Promise<ApiResponse<OsPlacesStatusResponse>>;
1986
+ /**
1987
+ * Check Ordinance Survey (OS Places) service status via POST (BookingLab).
1988
+ * Sends the host to the absolute serviceStatus endpoint on api.bookinglab.co.uk.
1989
+ * @param token - Value for the X-BL-TOKEN header
1990
+ * @param request - Body containing the host to check
1991
+ * @param production - When true, hits the production endpoint; otherwise the `-staging` variant
1992
+ */
1993
+ getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest, production?: boolean): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
1977
1994
  }
1978
1995
  /**
1979
1996
  * Create a new BookingLab client instance
@@ -2488,5 +2505,13 @@ declare function useUpdateBookinglabBooking(companyId: number, bookingId: number
2488
2505
  * @param enabled - Whether the query should run
2489
2506
  */
2490
2507
  declare function useOsPlacesStatus(token: string, isStaging?: boolean, enabled?: boolean): _tanstack_react_query.UseQueryResult<OsPlacesStatusResponse, Error>;
2508
+ /**
2509
+ * Hook for checking the Ordinance Survey (OS Places) service status via POST (BookingLab)
2510
+ * @param token - Value for the X-BL-TOKEN header
2511
+ * @param host - Host to check (sent in JSON body)
2512
+ * @param production - When true, hits the production endpoint; otherwise the `-staging` variant
2513
+ * @param enabled - Whether the query should run
2514
+ */
2515
+ declare function useOrdinanceSurveyStatus(token: string, host: string, production?: boolean, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
2491
2516
 
2492
- 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 OsPlacesStatusResponse, 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, useOsPlacesStatus, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateBookinglabBooking, useUpdateClient, useUpdateMember };
2517
+ 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 OrdinanceSurveyStatusRequest, type OrdinanceSurveyStatusResponse, type OrdnanceAddressDPA, type OrdnanceAddressLPI, type OrdnanceAddressLookupResponse, type OrdnanceAddressResult, type OsPlacesStatusResponse, 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, useOrdinanceSurveyStatus, useOrdnanceAddressLookup, useOsPlacesStatus, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateBookinglabBooking, useUpdateClient, useUpdateMember };
package/dist/index.js CHANGED
@@ -647,6 +647,44 @@ var BookingLabClient = class extends ApiClient {
647
647
  throw error;
648
648
  }
649
649
  }
650
+ /**
651
+ * Check Ordinance Survey (OS Places) service status via POST (BookingLab).
652
+ * Sends the host to the absolute serviceStatus endpoint on api.bookinglab.co.uk.
653
+ * @param token - Value for the X-BL-TOKEN header
654
+ * @param request - Body containing the host to check
655
+ * @param production - When true, hits the production endpoint; otherwise the `-staging` variant
656
+ */
657
+ async getOrdinanceSurveyStatus(token, request, production = false) {
658
+ const url = `https://api.bookinglab.co.uk/serviceStatus/osplaces${production ? "" : "-staging"}`;
659
+ const controller = new AbortController();
660
+ const timeoutId = setTimeout(() => controller.abort(), this.timeout);
661
+ try {
662
+ const response = await fetch(url, {
663
+ method: "POST",
664
+ headers: {
665
+ "Content-Type": "application/json",
666
+ "X-BL-TOKEN": token
667
+ },
668
+ body: JSON.stringify(request),
669
+ signal: controller.signal
670
+ });
671
+ clearTimeout(timeoutId);
672
+ if (!response.ok) {
673
+ throw {
674
+ message: `HTTP ${response.status}: ${response.statusText}`,
675
+ status: response.status
676
+ };
677
+ }
678
+ const data = await response.json();
679
+ return { data, status: response.status, headers: response.headers };
680
+ } catch (error) {
681
+ clearTimeout(timeoutId);
682
+ if (error.name === "AbortError") {
683
+ throw { message: "Request timeout", code: "TIMEOUT" };
684
+ }
685
+ throw error;
686
+ }
687
+ }
650
688
  };
651
689
  function createBookingLabClient(baseUrl, authToken, appId) {
652
690
  const client = new BookingLabClient({ baseUrl });
@@ -1552,6 +1590,18 @@ function useOsPlacesStatus(token, isStaging = false, enabled = true) {
1552
1590
  enabled: enabled && !!token
1553
1591
  });
1554
1592
  }
1593
+ function useOrdinanceSurveyStatus(token, host, production = false, enabled = true) {
1594
+ const client = useBookingLabClient();
1595
+ return reactQuery.useQuery({
1596
+ queryKey: ["ordinanceSurveyStatus", host, production],
1597
+ queryFn: async () => {
1598
+ const request = { host };
1599
+ const response = await client.getOrdinanceSurveyStatus(token, request, production);
1600
+ return response.data;
1601
+ },
1602
+ enabled: enabled && !!token && !!host
1603
+ });
1604
+ }
1555
1605
 
1556
1606
  exports.ApiClient = ApiClient;
1557
1607
  exports.ApiClientContext = ApiClientContext;
@@ -1601,6 +1651,7 @@ exports.useJrniContext = useJrniContext;
1601
1651
  exports.useListBookinglabBookings = useListBookinglabBookings;
1602
1652
  exports.useListBookings = useListBookings;
1603
1653
  exports.useLogin = useLogin;
1654
+ exports.useOrdinanceSurveyStatus = useOrdinanceSurveyStatus;
1604
1655
  exports.useOrdnanceAddressLookup = useOrdnanceAddressLookup;
1605
1656
  exports.useOsPlacesStatus = useOsPlacesStatus;
1606
1657
  exports.useQuestions = useQuestions;