@bookinglab/booking-journey-api 2.19.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 +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1988,8 +1988,9 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1988
1988
|
* Sends the host to the absolute serviceStatus endpoint on api.bookinglab.co.uk.
|
|
1989
1989
|
* @param token - Value for the X-BL-TOKEN header
|
|
1990
1990
|
* @param request - Body containing the host to check
|
|
1991
|
+
* @param production - When true, hits the production endpoint; otherwise the `-staging` variant
|
|
1991
1992
|
*/
|
|
1992
|
-
getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
|
|
1993
|
+
getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest, production?: boolean): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
|
|
1993
1994
|
}
|
|
1994
1995
|
/**
|
|
1995
1996
|
* Create a new BookingLab client instance
|
|
@@ -2508,8 +2509,9 @@ declare function useOsPlacesStatus(token: string, isStaging?: boolean, enabled?:
|
|
|
2508
2509
|
* Hook for checking the Ordinance Survey (OS Places) service status via POST (BookingLab)
|
|
2509
2510
|
* @param token - Value for the X-BL-TOKEN header
|
|
2510
2511
|
* @param host - Host to check (sent in JSON body)
|
|
2512
|
+
* @param production - When true, hits the production endpoint; otherwise the `-staging` variant
|
|
2511
2513
|
* @param enabled - Whether the query should run
|
|
2512
2514
|
*/
|
|
2513
|
-
declare function useOrdinanceSurveyStatus(token: string, host: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
|
|
2515
|
+
declare function useOrdinanceSurveyStatus(token: string, host: string, production?: boolean, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
|
|
2514
2516
|
|
|
2515
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
|
@@ -1988,8 +1988,9 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1988
1988
|
* Sends the host to the absolute serviceStatus endpoint on api.bookinglab.co.uk.
|
|
1989
1989
|
* @param token - Value for the X-BL-TOKEN header
|
|
1990
1990
|
* @param request - Body containing the host to check
|
|
1991
|
+
* @param production - When true, hits the production endpoint; otherwise the `-staging` variant
|
|
1991
1992
|
*/
|
|
1992
|
-
getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
|
|
1993
|
+
getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest, production?: boolean): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
|
|
1993
1994
|
}
|
|
1994
1995
|
/**
|
|
1995
1996
|
* Create a new BookingLab client instance
|
|
@@ -2508,8 +2509,9 @@ declare function useOsPlacesStatus(token: string, isStaging?: boolean, enabled?:
|
|
|
2508
2509
|
* Hook for checking the Ordinance Survey (OS Places) service status via POST (BookingLab)
|
|
2509
2510
|
* @param token - Value for the X-BL-TOKEN header
|
|
2510
2511
|
* @param host - Host to check (sent in JSON body)
|
|
2512
|
+
* @param production - When true, hits the production endpoint; otherwise the `-staging` variant
|
|
2511
2513
|
* @param enabled - Whether the query should run
|
|
2512
2514
|
*/
|
|
2513
|
-
declare function useOrdinanceSurveyStatus(token: string, host: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
|
|
2515
|
+
declare function useOrdinanceSurveyStatus(token: string, host: string, production?: boolean, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
|
|
2514
2516
|
|
|
2515
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
|
@@ -652,9 +652,10 @@ var BookingLabClient = class extends ApiClient {
|
|
|
652
652
|
* Sends the host to the absolute serviceStatus endpoint on api.bookinglab.co.uk.
|
|
653
653
|
* @param token - Value for the X-BL-TOKEN header
|
|
654
654
|
* @param request - Body containing the host to check
|
|
655
|
+
* @param production - When true, hits the production endpoint; otherwise the `-staging` variant
|
|
655
656
|
*/
|
|
656
|
-
async getOrdinanceSurveyStatus(token, request) {
|
|
657
|
-
const url =
|
|
657
|
+
async getOrdinanceSurveyStatus(token, request, production = false) {
|
|
658
|
+
const url = `https://api.bookinglab.co.uk/serviceStatus/osplaces${production ? "" : "-staging"}`;
|
|
658
659
|
const controller = new AbortController();
|
|
659
660
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
660
661
|
try {
|
|
@@ -1589,13 +1590,13 @@ function useOsPlacesStatus(token, isStaging = false, enabled = true) {
|
|
|
1589
1590
|
enabled: enabled && !!token
|
|
1590
1591
|
});
|
|
1591
1592
|
}
|
|
1592
|
-
function useOrdinanceSurveyStatus(token, host, enabled = true) {
|
|
1593
|
+
function useOrdinanceSurveyStatus(token, host, production = false, enabled = true) {
|
|
1593
1594
|
const client = useBookingLabClient();
|
|
1594
1595
|
return reactQuery.useQuery({
|
|
1595
|
-
queryKey: ["ordinanceSurveyStatus", host],
|
|
1596
|
+
queryKey: ["ordinanceSurveyStatus", host, production],
|
|
1596
1597
|
queryFn: async () => {
|
|
1597
1598
|
const request = { host };
|
|
1598
|
-
const response = await client.getOrdinanceSurveyStatus(token, request);
|
|
1599
|
+
const response = await client.getOrdinanceSurveyStatus(token, request, production);
|
|
1599
1600
|
return response.data;
|
|
1600
1601
|
},
|
|
1601
1602
|
enabled: enabled && !!token && !!host
|