@bookinglab/booking-journey-api 2.17.0 → 2.19.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 +54 -7
- package/dist/index.d.ts +54 -7
- package/dist/index.js +120 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1579,6 +1579,21 @@ interface OrdnanceAddressResult {
|
|
|
1579
1579
|
interface OrdnanceAddressLookupResponse {
|
|
1580
1580
|
results: OrdnanceAddressResult[];
|
|
1581
1581
|
}
|
|
1582
|
+
/**
|
|
1583
|
+
* BookingLab OS Places service status
|
|
1584
|
+
*/
|
|
1585
|
+
interface OsPlacesStatusResponse {
|
|
1586
|
+
status: boolean;
|
|
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
|
+
}
|
|
1582
1597
|
/**
|
|
1583
1598
|
* BookingLab Get Purchase
|
|
1584
1599
|
*/
|
|
@@ -1863,8 +1878,9 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1863
1878
|
* Get services for a company
|
|
1864
1879
|
* @param companyId - The company ID
|
|
1865
1880
|
* @param clientToken - Client token for authentication
|
|
1881
|
+
* @param bypassCacheToken - Optional. When provided, sent as `X-Bypass-Cache` header
|
|
1866
1882
|
*/
|
|
1867
|
-
getCompanyServices(companyId: number, clientToken: string): Promise<ApiResponse<BookingLabGetServicesResponse>>;
|
|
1883
|
+
getCompanyServices(companyId: number, clientToken: string, bypassCacheToken?: string): Promise<ApiResponse<BookingLabGetServicesResponse>>;
|
|
1868
1884
|
/**
|
|
1869
1885
|
* Get a single service by ID for a company
|
|
1870
1886
|
* @param companyId - The company ID
|
|
@@ -1948,9 +1964,10 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1948
1964
|
* List bookings for a company
|
|
1949
1965
|
* @param companyId - The company ID
|
|
1950
1966
|
* @param clientToken - Client token for authentication
|
|
1951
|
-
* @param params - Optional query params (client_id, member_id)
|
|
1967
|
+
* @param params - Optional query params (client_id, member_id, start_date, end_date)
|
|
1968
|
+
* @param bypassCacheToken - Optional. When provided, sent as `X-Bypass-Cache` header
|
|
1952
1969
|
*/
|
|
1953
|
-
listBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams): Promise<ApiResponse<BookingLabListBookingsResponse>>;
|
|
1970
|
+
listBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams, bypassCacheToken?: string): Promise<ApiResponse<BookingLabListBookingsResponse>>;
|
|
1954
1971
|
/**
|
|
1955
1972
|
* Update a booking for a company
|
|
1956
1973
|
* @param companyId - The company ID
|
|
@@ -1959,6 +1976,20 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1959
1976
|
* @param clientToken - Client token for authentication
|
|
1960
1977
|
*/
|
|
1961
1978
|
updateBookinglabBooking(companyId: number, bookingId: number, request: BookingLabUpdateBookingRequest, clientToken: string): Promise<ApiResponse<BookingLabUpdateBookingResponse>>;
|
|
1979
|
+
/**
|
|
1980
|
+
* Get OS Places service status (BookingLab).
|
|
1981
|
+
* Calls the absolute serviceStatus endpoint on staging.bookinglab.co.uk.
|
|
1982
|
+
* @param token - Value for the X-BL-TOKEN header
|
|
1983
|
+
* @param isStaging - When true, hits the `osplaces-staging` variant
|
|
1984
|
+
*/
|
|
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
|
+
*/
|
|
1992
|
+
getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
|
|
1962
1993
|
}
|
|
1963
1994
|
/**
|
|
1964
1995
|
* Create a new BookingLab client instance
|
|
@@ -2374,8 +2405,9 @@ declare function useBookingLabGetToken(request: BookingLabGetTokenRequest, clien
|
|
|
2374
2405
|
* @param companyId - The company ID
|
|
2375
2406
|
* @param clientToken - Client token for authentication
|
|
2376
2407
|
* @param enabled - Whether the query should run
|
|
2408
|
+
* @param bypassCacheToken - Optional. Sent as `X-Bypass-Cache` header when provided
|
|
2377
2409
|
*/
|
|
2378
|
-
declare function useBookingLabServices(companyId: number, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabGetServicesResponse, Error>;
|
|
2410
|
+
declare function useBookingLabServices(companyId: number, clientToken: string, enabled?: boolean, bypassCacheToken?: string): _tanstack_react_query.UseQueryResult<BookingLabGetServicesResponse, Error>;
|
|
2379
2411
|
/**
|
|
2380
2412
|
* Hook for fetching a single service for a company by ID (BookingLab)
|
|
2381
2413
|
* @param companyId - The company ID
|
|
@@ -2447,10 +2479,11 @@ declare function useOrdnanceAddressLookup(postcode: string, clientToken: string,
|
|
|
2447
2479
|
* Hook for listing bookings for a company (BookingLab)
|
|
2448
2480
|
* @param companyId - The company ID
|
|
2449
2481
|
* @param clientToken - Client token for authentication
|
|
2450
|
-
* @param params - Optional query params (client_id, member_id)
|
|
2482
|
+
* @param params - Optional query params (client_id, member_id, start_date, end_date)
|
|
2451
2483
|
* @param enabled - Whether the query should run
|
|
2484
|
+
* @param bypassCacheToken - Optional. Sent as `X-Bypass-Cache` header when provided
|
|
2452
2485
|
*/
|
|
2453
|
-
declare function useListBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabListBookingsResponse, Error>;
|
|
2486
|
+
declare function useListBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams, enabled?: boolean, bypassCacheToken?: string): _tanstack_react_query.UseQueryResult<BookingLabListBookingsResponse, Error>;
|
|
2454
2487
|
/**
|
|
2455
2488
|
* Hook for fetching a purchase by ID (BookingLab)
|
|
2456
2489
|
* @param companyId - The company ID
|
|
@@ -2464,5 +2497,19 @@ declare function useGetPurchase(companyId: number, serviceId: number, purchaseId
|
|
|
2464
2497
|
* Hook for updating a booking (BookingLab)
|
|
2465
2498
|
*/
|
|
2466
2499
|
declare function useUpdateBookinglabBooking(companyId: number, bookingId: number, clientToken: string): _tanstack_react_query.UseMutationResult<BookingLabUpdateBookingResponse, Error, BookingLabUpdateBookingRequest, unknown>;
|
|
2500
|
+
/**
|
|
2501
|
+
* Hook for checking the OS Places service status (BookingLab)
|
|
2502
|
+
* @param token - Value for the X-BL-TOKEN header
|
|
2503
|
+
* @param isStaging - When true, queries the `osplaces-staging` endpoint
|
|
2504
|
+
* @param enabled - Whether the query should run
|
|
2505
|
+
*/
|
|
2506
|
+
declare function useOsPlacesStatus(token: string, isStaging?: boolean, enabled?: boolean): _tanstack_react_query.UseQueryResult<OsPlacesStatusResponse, Error>;
|
|
2507
|
+
/**
|
|
2508
|
+
* Hook for checking the Ordinance Survey (OS Places) service status via POST (BookingLab)
|
|
2509
|
+
* @param token - Value for the X-BL-TOKEN header
|
|
2510
|
+
* @param host - Host to check (sent in JSON body)
|
|
2511
|
+
* @param enabled - Whether the query should run
|
|
2512
|
+
*/
|
|
2513
|
+
declare function useOrdinanceSurveyStatus(token: string, host: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
|
|
2467
2514
|
|
|
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 };
|
|
2515
|
+
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
|
@@ -1579,6 +1579,21 @@ interface OrdnanceAddressResult {
|
|
|
1579
1579
|
interface OrdnanceAddressLookupResponse {
|
|
1580
1580
|
results: OrdnanceAddressResult[];
|
|
1581
1581
|
}
|
|
1582
|
+
/**
|
|
1583
|
+
* BookingLab OS Places service status
|
|
1584
|
+
*/
|
|
1585
|
+
interface OsPlacesStatusResponse {
|
|
1586
|
+
status: boolean;
|
|
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
|
+
}
|
|
1582
1597
|
/**
|
|
1583
1598
|
* BookingLab Get Purchase
|
|
1584
1599
|
*/
|
|
@@ -1863,8 +1878,9 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1863
1878
|
* Get services for a company
|
|
1864
1879
|
* @param companyId - The company ID
|
|
1865
1880
|
* @param clientToken - Client token for authentication
|
|
1881
|
+
* @param bypassCacheToken - Optional. When provided, sent as `X-Bypass-Cache` header
|
|
1866
1882
|
*/
|
|
1867
|
-
getCompanyServices(companyId: number, clientToken: string): Promise<ApiResponse<BookingLabGetServicesResponse>>;
|
|
1883
|
+
getCompanyServices(companyId: number, clientToken: string, bypassCacheToken?: string): Promise<ApiResponse<BookingLabGetServicesResponse>>;
|
|
1868
1884
|
/**
|
|
1869
1885
|
* Get a single service by ID for a company
|
|
1870
1886
|
* @param companyId - The company ID
|
|
@@ -1948,9 +1964,10 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1948
1964
|
* List bookings for a company
|
|
1949
1965
|
* @param companyId - The company ID
|
|
1950
1966
|
* @param clientToken - Client token for authentication
|
|
1951
|
-
* @param params - Optional query params (client_id, member_id)
|
|
1967
|
+
* @param params - Optional query params (client_id, member_id, start_date, end_date)
|
|
1968
|
+
* @param bypassCacheToken - Optional. When provided, sent as `X-Bypass-Cache` header
|
|
1952
1969
|
*/
|
|
1953
|
-
listBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams): Promise<ApiResponse<BookingLabListBookingsResponse>>;
|
|
1970
|
+
listBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams, bypassCacheToken?: string): Promise<ApiResponse<BookingLabListBookingsResponse>>;
|
|
1954
1971
|
/**
|
|
1955
1972
|
* Update a booking for a company
|
|
1956
1973
|
* @param companyId - The company ID
|
|
@@ -1959,6 +1976,20 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1959
1976
|
* @param clientToken - Client token for authentication
|
|
1960
1977
|
*/
|
|
1961
1978
|
updateBookinglabBooking(companyId: number, bookingId: number, request: BookingLabUpdateBookingRequest, clientToken: string): Promise<ApiResponse<BookingLabUpdateBookingResponse>>;
|
|
1979
|
+
/**
|
|
1980
|
+
* Get OS Places service status (BookingLab).
|
|
1981
|
+
* Calls the absolute serviceStatus endpoint on staging.bookinglab.co.uk.
|
|
1982
|
+
* @param token - Value for the X-BL-TOKEN header
|
|
1983
|
+
* @param isStaging - When true, hits the `osplaces-staging` variant
|
|
1984
|
+
*/
|
|
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
|
+
*/
|
|
1992
|
+
getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
|
|
1962
1993
|
}
|
|
1963
1994
|
/**
|
|
1964
1995
|
* Create a new BookingLab client instance
|
|
@@ -2374,8 +2405,9 @@ declare function useBookingLabGetToken(request: BookingLabGetTokenRequest, clien
|
|
|
2374
2405
|
* @param companyId - The company ID
|
|
2375
2406
|
* @param clientToken - Client token for authentication
|
|
2376
2407
|
* @param enabled - Whether the query should run
|
|
2408
|
+
* @param bypassCacheToken - Optional. Sent as `X-Bypass-Cache` header when provided
|
|
2377
2409
|
*/
|
|
2378
|
-
declare function useBookingLabServices(companyId: number, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabGetServicesResponse, Error>;
|
|
2410
|
+
declare function useBookingLabServices(companyId: number, clientToken: string, enabled?: boolean, bypassCacheToken?: string): _tanstack_react_query.UseQueryResult<BookingLabGetServicesResponse, Error>;
|
|
2379
2411
|
/**
|
|
2380
2412
|
* Hook for fetching a single service for a company by ID (BookingLab)
|
|
2381
2413
|
* @param companyId - The company ID
|
|
@@ -2447,10 +2479,11 @@ declare function useOrdnanceAddressLookup(postcode: string, clientToken: string,
|
|
|
2447
2479
|
* Hook for listing bookings for a company (BookingLab)
|
|
2448
2480
|
* @param companyId - The company ID
|
|
2449
2481
|
* @param clientToken - Client token for authentication
|
|
2450
|
-
* @param params - Optional query params (client_id, member_id)
|
|
2482
|
+
* @param params - Optional query params (client_id, member_id, start_date, end_date)
|
|
2451
2483
|
* @param enabled - Whether the query should run
|
|
2484
|
+
* @param bypassCacheToken - Optional. Sent as `X-Bypass-Cache` header when provided
|
|
2452
2485
|
*/
|
|
2453
|
-
declare function useListBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabListBookingsResponse, Error>;
|
|
2486
|
+
declare function useListBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams, enabled?: boolean, bypassCacheToken?: string): _tanstack_react_query.UseQueryResult<BookingLabListBookingsResponse, Error>;
|
|
2454
2487
|
/**
|
|
2455
2488
|
* Hook for fetching a purchase by ID (BookingLab)
|
|
2456
2489
|
* @param companyId - The company ID
|
|
@@ -2464,5 +2497,19 @@ declare function useGetPurchase(companyId: number, serviceId: number, purchaseId
|
|
|
2464
2497
|
* Hook for updating a booking (BookingLab)
|
|
2465
2498
|
*/
|
|
2466
2499
|
declare function useUpdateBookinglabBooking(companyId: number, bookingId: number, clientToken: string): _tanstack_react_query.UseMutationResult<BookingLabUpdateBookingResponse, Error, BookingLabUpdateBookingRequest, unknown>;
|
|
2500
|
+
/**
|
|
2501
|
+
* Hook for checking the OS Places service status (BookingLab)
|
|
2502
|
+
* @param token - Value for the X-BL-TOKEN header
|
|
2503
|
+
* @param isStaging - When true, queries the `osplaces-staging` endpoint
|
|
2504
|
+
* @param enabled - Whether the query should run
|
|
2505
|
+
*/
|
|
2506
|
+
declare function useOsPlacesStatus(token: string, isStaging?: boolean, enabled?: boolean): _tanstack_react_query.UseQueryResult<OsPlacesStatusResponse, Error>;
|
|
2507
|
+
/**
|
|
2508
|
+
* Hook for checking the Ordinance Survey (OS Places) service status via POST (BookingLab)
|
|
2509
|
+
* @param token - Value for the X-BL-TOKEN header
|
|
2510
|
+
* @param host - Host to check (sent in JSON body)
|
|
2511
|
+
* @param enabled - Whether the query should run
|
|
2512
|
+
*/
|
|
2513
|
+
declare function useOrdinanceSurveyStatus(token: string, host: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
|
|
2467
2514
|
|
|
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 };
|
|
2515
|
+
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
|
@@ -369,15 +369,16 @@ var BookingLabClient = class extends ApiClient {
|
|
|
369
369
|
* Get services for a company
|
|
370
370
|
* @param companyId - The company ID
|
|
371
371
|
* @param clientToken - Client token for authentication
|
|
372
|
+
* @param bypassCacheToken - Optional. When provided, sent as `X-Bypass-Cache` header
|
|
372
373
|
*/
|
|
373
|
-
async getCompanyServices(companyId, clientToken) {
|
|
374
|
+
async getCompanyServices(companyId, clientToken, bypassCacheToken) {
|
|
375
|
+
const headers = {
|
|
376
|
+
"clienttoken": clientToken
|
|
377
|
+
};
|
|
378
|
+
if (bypassCacheToken) headers["X-Bypass-Cache"] = bypassCacheToken;
|
|
374
379
|
return this.get(
|
|
375
380
|
`/company/${companyId}/services`,
|
|
376
|
-
{
|
|
377
|
-
headers: {
|
|
378
|
-
"clienttoken": clientToken
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
+
{ headers }
|
|
381
382
|
);
|
|
382
383
|
}
|
|
383
384
|
/**
|
|
@@ -569,22 +570,25 @@ var BookingLabClient = class extends ApiClient {
|
|
|
569
570
|
* List bookings for a company
|
|
570
571
|
* @param companyId - The company ID
|
|
571
572
|
* @param clientToken - Client token for authentication
|
|
572
|
-
* @param params - Optional query params (client_id, member_id)
|
|
573
|
+
* @param params - Optional query params (client_id, member_id, start_date, end_date)
|
|
574
|
+
* @param bypassCacheToken - Optional. When provided, sent as `X-Bypass-Cache` header
|
|
573
575
|
*/
|
|
574
|
-
async listBookinglabBookings(companyId, clientToken, params) {
|
|
576
|
+
async listBookinglabBookings(companyId, clientToken, params, bypassCacheToken) {
|
|
575
577
|
const queryParams = {};
|
|
576
578
|
if (params?.client_id !== void 0) queryParams.client_id = params.client_id;
|
|
577
579
|
if (params?.member_id !== void 0) queryParams.member_id = params.member_id;
|
|
578
580
|
if (params?.start_date !== void 0) queryParams.start_date = params.start_date;
|
|
579
581
|
if (params?.end_date !== void 0) queryParams.end_date = params.end_date;
|
|
582
|
+
const headers = {
|
|
583
|
+
"clienttoken": clientToken,
|
|
584
|
+
"x-company-id": String(companyId)
|
|
585
|
+
};
|
|
586
|
+
if (bypassCacheToken) headers["X-Bypass-Cache"] = bypassCacheToken;
|
|
580
587
|
return this.get(
|
|
581
588
|
`/company/${companyId}/bookings`,
|
|
582
589
|
{
|
|
583
590
|
params: Object.keys(queryParams).length ? queryParams : void 0,
|
|
584
|
-
headers
|
|
585
|
-
"clienttoken": clientToken,
|
|
586
|
-
"x-company-id": String(companyId)
|
|
587
|
-
}
|
|
591
|
+
headers
|
|
588
592
|
}
|
|
589
593
|
);
|
|
590
594
|
}
|
|
@@ -607,6 +611,79 @@ var BookingLabClient = class extends ApiClient {
|
|
|
607
611
|
}
|
|
608
612
|
);
|
|
609
613
|
}
|
|
614
|
+
/**
|
|
615
|
+
* Get OS Places service status (BookingLab).
|
|
616
|
+
* Calls the absolute serviceStatus endpoint on staging.bookinglab.co.uk.
|
|
617
|
+
* @param token - Value for the X-BL-TOKEN header
|
|
618
|
+
* @param isStaging - When true, hits the `osplaces-staging` variant
|
|
619
|
+
*/
|
|
620
|
+
async getOsPlacesStatus(token, isStaging = false) {
|
|
621
|
+
const url = `https://staging.bookinglab.co.uk/serviceStatus/osplaces${isStaging ? "-staging" : ""}`;
|
|
622
|
+
const controller = new AbortController();
|
|
623
|
+
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
624
|
+
try {
|
|
625
|
+
const response = await fetch(url, {
|
|
626
|
+
method: "GET",
|
|
627
|
+
headers: {
|
|
628
|
+
"Content-Type": "application/json",
|
|
629
|
+
"X-BL-TOKEN": token
|
|
630
|
+
},
|
|
631
|
+
signal: controller.signal
|
|
632
|
+
});
|
|
633
|
+
clearTimeout(timeoutId);
|
|
634
|
+
if (!response.ok) {
|
|
635
|
+
throw {
|
|
636
|
+
message: `HTTP ${response.status}: ${response.statusText}`,
|
|
637
|
+
status: response.status
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
const data = await response.json();
|
|
641
|
+
return { data, status: response.status, headers: response.headers };
|
|
642
|
+
} catch (error) {
|
|
643
|
+
clearTimeout(timeoutId);
|
|
644
|
+
if (error.name === "AbortError") {
|
|
645
|
+
throw { message: "Request timeout", code: "TIMEOUT" };
|
|
646
|
+
}
|
|
647
|
+
throw error;
|
|
648
|
+
}
|
|
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
|
+
*/
|
|
656
|
+
async getOrdinanceSurveyStatus(token, request) {
|
|
657
|
+
const url = "https://api.bookinglab.co.uk/serviceStatus/osplaces";
|
|
658
|
+
const controller = new AbortController();
|
|
659
|
+
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
660
|
+
try {
|
|
661
|
+
const response = await fetch(url, {
|
|
662
|
+
method: "POST",
|
|
663
|
+
headers: {
|
|
664
|
+
"Content-Type": "application/json",
|
|
665
|
+
"X-BL-TOKEN": token
|
|
666
|
+
},
|
|
667
|
+
body: JSON.stringify(request),
|
|
668
|
+
signal: controller.signal
|
|
669
|
+
});
|
|
670
|
+
clearTimeout(timeoutId);
|
|
671
|
+
if (!response.ok) {
|
|
672
|
+
throw {
|
|
673
|
+
message: `HTTP ${response.status}: ${response.statusText}`,
|
|
674
|
+
status: response.status
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
const data = await response.json();
|
|
678
|
+
return { data, status: response.status, headers: response.headers };
|
|
679
|
+
} catch (error) {
|
|
680
|
+
clearTimeout(timeoutId);
|
|
681
|
+
if (error.name === "AbortError") {
|
|
682
|
+
throw { message: "Request timeout", code: "TIMEOUT" };
|
|
683
|
+
}
|
|
684
|
+
throw error;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
610
687
|
};
|
|
611
688
|
function createBookingLabClient(baseUrl, authToken, appId) {
|
|
612
689
|
const client = new BookingLabClient({ baseUrl });
|
|
@@ -1357,12 +1434,12 @@ function useBookingLabGetToken(request, clientToken, enabled = true) {
|
|
|
1357
1434
|
enabled: enabled && !!request.client && !!request.company && !!clientToken
|
|
1358
1435
|
});
|
|
1359
1436
|
}
|
|
1360
|
-
function useBookingLabServices(companyId, clientToken, enabled = true) {
|
|
1437
|
+
function useBookingLabServices(companyId, clientToken, enabled = true, bypassCacheToken) {
|
|
1361
1438
|
const client = useBookingLabClient();
|
|
1362
1439
|
return reactQuery.useQuery({
|
|
1363
|
-
queryKey: ["bookingLabServices", companyId],
|
|
1440
|
+
queryKey: ["bookingLabServices", companyId, bypassCacheToken],
|
|
1364
1441
|
queryFn: async () => {
|
|
1365
|
-
const response = await client.getCompanyServices(companyId, clientToken);
|
|
1442
|
+
const response = await client.getCompanyServices(companyId, clientToken, bypassCacheToken);
|
|
1366
1443
|
return response.data;
|
|
1367
1444
|
},
|
|
1368
1445
|
enabled: enabled && !!companyId && !!clientToken
|
|
@@ -1470,12 +1547,12 @@ function useOrdnanceAddressLookup(postcode, clientToken, enabled = true) {
|
|
|
1470
1547
|
enabled: enabled && !!postcode && !!clientToken
|
|
1471
1548
|
});
|
|
1472
1549
|
}
|
|
1473
|
-
function useListBookinglabBookings(companyId, clientToken, params, enabled = true) {
|
|
1550
|
+
function useListBookinglabBookings(companyId, clientToken, params, enabled = true, bypassCacheToken) {
|
|
1474
1551
|
const client = useBookingLabClient();
|
|
1475
1552
|
return reactQuery.useQuery({
|
|
1476
|
-
queryKey: ["bookingLabListBookings", companyId, params?.client_id, params?.member_id, params?.start_date, params?.end_date],
|
|
1553
|
+
queryKey: ["bookingLabListBookings", companyId, params?.client_id, params?.member_id, params?.start_date, params?.end_date, bypassCacheToken],
|
|
1477
1554
|
queryFn: async () => {
|
|
1478
|
-
const response = await client.listBookinglabBookings(companyId, clientToken, params);
|
|
1555
|
+
const response = await client.listBookinglabBookings(companyId, clientToken, params, bypassCacheToken);
|
|
1479
1556
|
return response.data;
|
|
1480
1557
|
},
|
|
1481
1558
|
enabled: enabled && !!companyId && !!clientToken
|
|
@@ -1501,6 +1578,29 @@ function useUpdateBookinglabBooking(companyId, bookingId, clientToken) {
|
|
|
1501
1578
|
}
|
|
1502
1579
|
});
|
|
1503
1580
|
}
|
|
1581
|
+
function useOsPlacesStatus(token, isStaging = false, enabled = true) {
|
|
1582
|
+
const client = useBookingLabClient();
|
|
1583
|
+
return reactQuery.useQuery({
|
|
1584
|
+
queryKey: ["osPlacesStatus", isStaging],
|
|
1585
|
+
queryFn: async () => {
|
|
1586
|
+
const response = await client.getOsPlacesStatus(token, isStaging);
|
|
1587
|
+
return response.data;
|
|
1588
|
+
},
|
|
1589
|
+
enabled: enabled && !!token
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1592
|
+
function useOrdinanceSurveyStatus(token, host, enabled = true) {
|
|
1593
|
+
const client = useBookingLabClient();
|
|
1594
|
+
return reactQuery.useQuery({
|
|
1595
|
+
queryKey: ["ordinanceSurveyStatus", host],
|
|
1596
|
+
queryFn: async () => {
|
|
1597
|
+
const request = { host };
|
|
1598
|
+
const response = await client.getOrdinanceSurveyStatus(token, request);
|
|
1599
|
+
return response.data;
|
|
1600
|
+
},
|
|
1601
|
+
enabled: enabled && !!token && !!host
|
|
1602
|
+
});
|
|
1603
|
+
}
|
|
1504
1604
|
|
|
1505
1605
|
exports.ApiClient = ApiClient;
|
|
1506
1606
|
exports.ApiClientContext = ApiClientContext;
|
|
@@ -1550,7 +1650,9 @@ exports.useJrniContext = useJrniContext;
|
|
|
1550
1650
|
exports.useListBookinglabBookings = useListBookinglabBookings;
|
|
1551
1651
|
exports.useListBookings = useListBookings;
|
|
1552
1652
|
exports.useLogin = useLogin;
|
|
1653
|
+
exports.useOrdinanceSurveyStatus = useOrdinanceSurveyStatus;
|
|
1553
1654
|
exports.useOrdnanceAddressLookup = useOrdnanceAddressLookup;
|
|
1655
|
+
exports.useOsPlacesStatus = useOsPlacesStatus;
|
|
1554
1656
|
exports.useQuestions = useQuestions;
|
|
1555
1657
|
exports.useRescheduleBooking = useRescheduleBooking;
|
|
1556
1658
|
exports.useResetPassword = useResetPassword;
|