@bookinglab/booking-journey-api 2.19.0 → 2.21.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 +36 -3
- package/dist/index.d.ts +36 -3
- package/dist/index.js +36 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1296,6 +1296,20 @@ interface BookingLabAddBasketServiceItemResponse {
|
|
|
1296
1296
|
}>;
|
|
1297
1297
|
[key: string]: any;
|
|
1298
1298
|
}
|
|
1299
|
+
interface BookingLabUpdateBasketServiceItemRequest {
|
|
1300
|
+
company_id: number;
|
|
1301
|
+
start: string;
|
|
1302
|
+
service_id: number;
|
|
1303
|
+
duration: number;
|
|
1304
|
+
questions: BookingLabAddBasketServiceItemQuestion[];
|
|
1305
|
+
[key: string]: any;
|
|
1306
|
+
}
|
|
1307
|
+
interface BookingLabUpdateBasketServiceItemHeaders {
|
|
1308
|
+
clientToken: string;
|
|
1309
|
+
authToken: string;
|
|
1310
|
+
companyId: number;
|
|
1311
|
+
}
|
|
1312
|
+
type BookingLabUpdateBasketServiceItemResponse = BookingLabAddBasketServiceItemResponse;
|
|
1299
1313
|
interface BookingLabCreateBasketRequest {
|
|
1300
1314
|
company_id: number;
|
|
1301
1315
|
}
|
|
@@ -1934,6 +1948,14 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1934
1948
|
* @param headers - Required clientToken/authToken/companyId
|
|
1935
1949
|
*/
|
|
1936
1950
|
addBasketServiceItem(basketId: string, request: BookingLabAddBasketServiceItemRequest, headers: BookingLabAddBasketServiceItemHeaders): Promise<ApiResponse<BookingLabAddBasketServiceItemResponse>>;
|
|
1951
|
+
/**
|
|
1952
|
+
* Update a service item in a public basket (BookingLab)
|
|
1953
|
+
* @param basketId - The basket ID
|
|
1954
|
+
* @param serviceItemId - The service item ID to update
|
|
1955
|
+
* @param request - Service item body
|
|
1956
|
+
* @param headers - Required clientToken/authToken/companyId
|
|
1957
|
+
*/
|
|
1958
|
+
updateBasketServiceItem(basketId: string, serviceItemId: string, request: BookingLabUpdateBasketServiceItemRequest, headers: BookingLabUpdateBasketServiceItemHeaders): Promise<ApiResponse<BookingLabUpdateBasketServiceItemResponse>>;
|
|
1937
1959
|
/**
|
|
1938
1960
|
* Checkout a public basket (BookingLab)
|
|
1939
1961
|
* @param basketId - The basket ID
|
|
@@ -1988,8 +2010,9 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1988
2010
|
* Sends the host to the absolute serviceStatus endpoint on api.bookinglab.co.uk.
|
|
1989
2011
|
* @param token - Value for the X-BL-TOKEN header
|
|
1990
2012
|
* @param request - Body containing the host to check
|
|
2013
|
+
* @param production - When true, hits the production endpoint; otherwise the `-staging` variant
|
|
1991
2014
|
*/
|
|
1992
|
-
getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
|
|
2015
|
+
getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest, production?: boolean): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
|
|
1993
2016
|
}
|
|
1994
2017
|
/**
|
|
1995
2018
|
* Create a new BookingLab client instance
|
|
@@ -2454,6 +2477,15 @@ declare function useBookingLabAddBasketServiceItem(): _tanstack_react_query.UseM
|
|
|
2454
2477
|
request: BookingLabAddBasketServiceItemRequest;
|
|
2455
2478
|
headers: BookingLabAddBasketServiceItemHeaders;
|
|
2456
2479
|
}, unknown>;
|
|
2480
|
+
/**
|
|
2481
|
+
* Hook for updating a service item in a public basket (BookingLab)
|
|
2482
|
+
*/
|
|
2483
|
+
declare function useUpdateBasketServiceItem(): _tanstack_react_query.UseMutationResult<BookingLabAddBasketServiceItemResponse, Error, {
|
|
2484
|
+
basketId: string;
|
|
2485
|
+
serviceItemId: string;
|
|
2486
|
+
request: BookingLabUpdateBasketServiceItemRequest;
|
|
2487
|
+
headers: BookingLabUpdateBasketServiceItemHeaders;
|
|
2488
|
+
}, unknown>;
|
|
2457
2489
|
/**
|
|
2458
2490
|
* Hook for checking out a public basket (BookingLab)
|
|
2459
2491
|
*/
|
|
@@ -2508,8 +2540,9 @@ declare function useOsPlacesStatus(token: string, isStaging?: boolean, enabled?:
|
|
|
2508
2540
|
* Hook for checking the Ordinance Survey (OS Places) service status via POST (BookingLab)
|
|
2509
2541
|
* @param token - Value for the X-BL-TOKEN header
|
|
2510
2542
|
* @param host - Host to check (sent in JSON body)
|
|
2543
|
+
* @param production - When true, hits the production endpoint; otherwise the `-staging` variant
|
|
2511
2544
|
* @param enabled - Whether the query should run
|
|
2512
2545
|
*/
|
|
2513
|
-
declare function useOrdinanceSurveyStatus(token: string, host: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
|
|
2546
|
+
declare function useOrdinanceSurveyStatus(token: string, host: string, production?: boolean, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
|
|
2514
2547
|
|
|
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 };
|
|
2548
|
+
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 BookingLabUpdateBasketServiceItemHeaders, type BookingLabUpdateBasketServiceItemRequest, type BookingLabUpdateBasketServiceItemResponse, 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, useUpdateBasketServiceItem, useUpdateBookinglabBooking, useUpdateClient, useUpdateMember };
|
package/dist/index.d.ts
CHANGED
|
@@ -1296,6 +1296,20 @@ interface BookingLabAddBasketServiceItemResponse {
|
|
|
1296
1296
|
}>;
|
|
1297
1297
|
[key: string]: any;
|
|
1298
1298
|
}
|
|
1299
|
+
interface BookingLabUpdateBasketServiceItemRequest {
|
|
1300
|
+
company_id: number;
|
|
1301
|
+
start: string;
|
|
1302
|
+
service_id: number;
|
|
1303
|
+
duration: number;
|
|
1304
|
+
questions: BookingLabAddBasketServiceItemQuestion[];
|
|
1305
|
+
[key: string]: any;
|
|
1306
|
+
}
|
|
1307
|
+
interface BookingLabUpdateBasketServiceItemHeaders {
|
|
1308
|
+
clientToken: string;
|
|
1309
|
+
authToken: string;
|
|
1310
|
+
companyId: number;
|
|
1311
|
+
}
|
|
1312
|
+
type BookingLabUpdateBasketServiceItemResponse = BookingLabAddBasketServiceItemResponse;
|
|
1299
1313
|
interface BookingLabCreateBasketRequest {
|
|
1300
1314
|
company_id: number;
|
|
1301
1315
|
}
|
|
@@ -1934,6 +1948,14 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1934
1948
|
* @param headers - Required clientToken/authToken/companyId
|
|
1935
1949
|
*/
|
|
1936
1950
|
addBasketServiceItem(basketId: string, request: BookingLabAddBasketServiceItemRequest, headers: BookingLabAddBasketServiceItemHeaders): Promise<ApiResponse<BookingLabAddBasketServiceItemResponse>>;
|
|
1951
|
+
/**
|
|
1952
|
+
* Update a service item in a public basket (BookingLab)
|
|
1953
|
+
* @param basketId - The basket ID
|
|
1954
|
+
* @param serviceItemId - The service item ID to update
|
|
1955
|
+
* @param request - Service item body
|
|
1956
|
+
* @param headers - Required clientToken/authToken/companyId
|
|
1957
|
+
*/
|
|
1958
|
+
updateBasketServiceItem(basketId: string, serviceItemId: string, request: BookingLabUpdateBasketServiceItemRequest, headers: BookingLabUpdateBasketServiceItemHeaders): Promise<ApiResponse<BookingLabUpdateBasketServiceItemResponse>>;
|
|
1937
1959
|
/**
|
|
1938
1960
|
* Checkout a public basket (BookingLab)
|
|
1939
1961
|
* @param basketId - The basket ID
|
|
@@ -1988,8 +2010,9 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1988
2010
|
* Sends the host to the absolute serviceStatus endpoint on api.bookinglab.co.uk.
|
|
1989
2011
|
* @param token - Value for the X-BL-TOKEN header
|
|
1990
2012
|
* @param request - Body containing the host to check
|
|
2013
|
+
* @param production - When true, hits the production endpoint; otherwise the `-staging` variant
|
|
1991
2014
|
*/
|
|
1992
|
-
getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
|
|
2015
|
+
getOrdinanceSurveyStatus(token: string, request: OrdinanceSurveyStatusRequest, production?: boolean): Promise<ApiResponse<OrdinanceSurveyStatusResponse>>;
|
|
1993
2016
|
}
|
|
1994
2017
|
/**
|
|
1995
2018
|
* Create a new BookingLab client instance
|
|
@@ -2454,6 +2477,15 @@ declare function useBookingLabAddBasketServiceItem(): _tanstack_react_query.UseM
|
|
|
2454
2477
|
request: BookingLabAddBasketServiceItemRequest;
|
|
2455
2478
|
headers: BookingLabAddBasketServiceItemHeaders;
|
|
2456
2479
|
}, unknown>;
|
|
2480
|
+
/**
|
|
2481
|
+
* Hook for updating a service item in a public basket (BookingLab)
|
|
2482
|
+
*/
|
|
2483
|
+
declare function useUpdateBasketServiceItem(): _tanstack_react_query.UseMutationResult<BookingLabAddBasketServiceItemResponse, Error, {
|
|
2484
|
+
basketId: string;
|
|
2485
|
+
serviceItemId: string;
|
|
2486
|
+
request: BookingLabUpdateBasketServiceItemRequest;
|
|
2487
|
+
headers: BookingLabUpdateBasketServiceItemHeaders;
|
|
2488
|
+
}, unknown>;
|
|
2457
2489
|
/**
|
|
2458
2490
|
* Hook for checking out a public basket (BookingLab)
|
|
2459
2491
|
*/
|
|
@@ -2508,8 +2540,9 @@ declare function useOsPlacesStatus(token: string, isStaging?: boolean, enabled?:
|
|
|
2508
2540
|
* Hook for checking the Ordinance Survey (OS Places) service status via POST (BookingLab)
|
|
2509
2541
|
* @param token - Value for the X-BL-TOKEN header
|
|
2510
2542
|
* @param host - Host to check (sent in JSON body)
|
|
2543
|
+
* @param production - When true, hits the production endpoint; otherwise the `-staging` variant
|
|
2511
2544
|
* @param enabled - Whether the query should run
|
|
2512
2545
|
*/
|
|
2513
|
-
declare function useOrdinanceSurveyStatus(token: string, host: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
|
|
2546
|
+
declare function useOrdinanceSurveyStatus(token: string, host: string, production?: boolean, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdinanceSurveyStatusResponse, Error>;
|
|
2514
2547
|
|
|
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 };
|
|
2548
|
+
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 BookingLabUpdateBasketServiceItemHeaders, type BookingLabUpdateBasketServiceItemRequest, type BookingLabUpdateBasketServiceItemResponse, 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, useUpdateBasketServiceItem, useUpdateBookinglabBooking, useUpdateClient, useUpdateMember };
|
package/dist/index.js
CHANGED
|
@@ -501,6 +501,26 @@ var BookingLabClient = class extends ApiClient {
|
|
|
501
501
|
}
|
|
502
502
|
);
|
|
503
503
|
}
|
|
504
|
+
/**
|
|
505
|
+
* Update a service item in a public basket (BookingLab)
|
|
506
|
+
* @param basketId - The basket ID
|
|
507
|
+
* @param serviceItemId - The service item ID to update
|
|
508
|
+
* @param request - Service item body
|
|
509
|
+
* @param headers - Required clientToken/authToken/companyId
|
|
510
|
+
*/
|
|
511
|
+
async updateBasketServiceItem(basketId, serviceItemId, request, headers) {
|
|
512
|
+
return this.put(
|
|
513
|
+
`/baskets/${basketId}/service_item-public/${serviceItemId}`,
|
|
514
|
+
request,
|
|
515
|
+
{
|
|
516
|
+
headers: {
|
|
517
|
+
"clienttoken": headers.clientToken,
|
|
518
|
+
"authtoken": headers.authToken,
|
|
519
|
+
"x-company-id": String(headers.companyId)
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
);
|
|
523
|
+
}
|
|
504
524
|
/**
|
|
505
525
|
* Checkout a public basket (BookingLab)
|
|
506
526
|
* @param basketId - The basket ID
|
|
@@ -652,9 +672,10 @@ var BookingLabClient = class extends ApiClient {
|
|
|
652
672
|
* Sends the host to the absolute serviceStatus endpoint on api.bookinglab.co.uk.
|
|
653
673
|
* @param token - Value for the X-BL-TOKEN header
|
|
654
674
|
* @param request - Body containing the host to check
|
|
675
|
+
* @param production - When true, hits the production endpoint; otherwise the `-staging` variant
|
|
655
676
|
*/
|
|
656
|
-
async getOrdinanceSurveyStatus(token, request) {
|
|
657
|
-
const url =
|
|
677
|
+
async getOrdinanceSurveyStatus(token, request, production = false) {
|
|
678
|
+
const url = `https://api.bookinglab.co.uk/serviceStatus/osplaces${production ? "" : "-staging"}`;
|
|
658
679
|
const controller = new AbortController();
|
|
659
680
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
660
681
|
try {
|
|
@@ -1518,6 +1539,15 @@ function useBookingLabAddBasketServiceItem() {
|
|
|
1518
1539
|
}
|
|
1519
1540
|
});
|
|
1520
1541
|
}
|
|
1542
|
+
function useUpdateBasketServiceItem() {
|
|
1543
|
+
const client = useBookingLabClient();
|
|
1544
|
+
return reactQuery.useMutation({
|
|
1545
|
+
mutationFn: async (input) => {
|
|
1546
|
+
const response = await client.updateBasketServiceItem(input.basketId, input.serviceItemId, input.request, input.headers);
|
|
1547
|
+
return response.data;
|
|
1548
|
+
}
|
|
1549
|
+
});
|
|
1550
|
+
}
|
|
1521
1551
|
function useBookingLabCheckoutBasket() {
|
|
1522
1552
|
const client = useBookingLabClient();
|
|
1523
1553
|
return reactQuery.useMutation({
|
|
@@ -1589,13 +1619,13 @@ function useOsPlacesStatus(token, isStaging = false, enabled = true) {
|
|
|
1589
1619
|
enabled: enabled && !!token
|
|
1590
1620
|
});
|
|
1591
1621
|
}
|
|
1592
|
-
function useOrdinanceSurveyStatus(token, host, enabled = true) {
|
|
1622
|
+
function useOrdinanceSurveyStatus(token, host, production = false, enabled = true) {
|
|
1593
1623
|
const client = useBookingLabClient();
|
|
1594
1624
|
return reactQuery.useQuery({
|
|
1595
|
-
queryKey: ["ordinanceSurveyStatus", host],
|
|
1625
|
+
queryKey: ["ordinanceSurveyStatus", host, production],
|
|
1596
1626
|
queryFn: async () => {
|
|
1597
1627
|
const request = { host };
|
|
1598
|
-
const response = await client.getOrdinanceSurveyStatus(token, request);
|
|
1628
|
+
const response = await client.getOrdinanceSurveyStatus(token, request, production);
|
|
1599
1629
|
return response.data;
|
|
1600
1630
|
},
|
|
1601
1631
|
enabled: enabled && !!token && !!host
|
|
@@ -1660,6 +1690,7 @@ exports.useResources = useResources;
|
|
|
1660
1690
|
exports.useSendCustomEmail = useSendCustomEmail;
|
|
1661
1691
|
exports.useServices = useServices;
|
|
1662
1692
|
exports.useTimes = useTimes;
|
|
1693
|
+
exports.useUpdateBasketServiceItem = useUpdateBasketServiceItem;
|
|
1663
1694
|
exports.useUpdateBookinglabBooking = useUpdateBookinglabBooking;
|
|
1664
1695
|
exports.useUpdateClient = useUpdateClient;
|
|
1665
1696
|
exports.useUpdateMember = useUpdateMember;
|