@bookinglab/booking-journey-api 2.14.0 → 2.16.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 +32 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1630,6 +1630,22 @@ interface BookingLabPurchaseResponse {
|
|
|
1630
1630
|
_links?: Record<string, any>;
|
|
1631
1631
|
[key: string]: any;
|
|
1632
1632
|
}
|
|
1633
|
+
interface BookingLabListBookingsParams {
|
|
1634
|
+
client_id?: number;
|
|
1635
|
+
member_id?: number;
|
|
1636
|
+
start_date?: string;
|
|
1637
|
+
end_date?: string;
|
|
1638
|
+
}
|
|
1639
|
+
interface BookingLabListBookingsResponse {
|
|
1640
|
+
total_entries?: number;
|
|
1641
|
+
include_cancelled?: boolean;
|
|
1642
|
+
_embedded?: {
|
|
1643
|
+
bookings?: any[];
|
|
1644
|
+
[key: string]: any;
|
|
1645
|
+
};
|
|
1646
|
+
_links?: Record<string, any>;
|
|
1647
|
+
[key: string]: any;
|
|
1648
|
+
}
|
|
1633
1649
|
|
|
1634
1650
|
/**
|
|
1635
1651
|
* Core API Client
|
|
@@ -1869,6 +1885,13 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1869
1885
|
* @param clientToken - Client token for authentication
|
|
1870
1886
|
*/
|
|
1871
1887
|
getPurchase(companyId: number, serviceId: number, purchaseId: string | number, clientToken: string): Promise<ApiResponse<BookingLabPurchaseResponse>>;
|
|
1888
|
+
/**
|
|
1889
|
+
* List bookings for a company
|
|
1890
|
+
* @param companyId - The company ID
|
|
1891
|
+
* @param clientToken - Client token for authentication
|
|
1892
|
+
* @param params - Optional query params (client_id, member_id)
|
|
1893
|
+
*/
|
|
1894
|
+
listBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams): Promise<ApiResponse<BookingLabListBookingsResponse>>;
|
|
1872
1895
|
}
|
|
1873
1896
|
/**
|
|
1874
1897
|
* Create a new BookingLab client instance
|
|
@@ -2353,6 +2376,14 @@ declare function useBookingLabDeleteBasket(): _tanstack_react_query.UseMutationR
|
|
|
2353
2376
|
* @param enabled - Whether the query should run
|
|
2354
2377
|
*/
|
|
2355
2378
|
declare function useOrdnanceAddressLookup(postcode: string, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdnanceAddressLookupResponse, Error>;
|
|
2379
|
+
/**
|
|
2380
|
+
* Hook for listing bookings for a company (BookingLab)
|
|
2381
|
+
* @param companyId - The company ID
|
|
2382
|
+
* @param clientToken - Client token for authentication
|
|
2383
|
+
* @param params - Optional query params (client_id, member_id)
|
|
2384
|
+
* @param enabled - Whether the query should run
|
|
2385
|
+
*/
|
|
2386
|
+
declare function useListBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabListBookingsResponse, Error>;
|
|
2356
2387
|
/**
|
|
2357
2388
|
* Hook for fetching a purchase by ID (BookingLab)
|
|
2358
2389
|
* @param companyId - The company ID
|
|
@@ -2363,4 +2394,4 @@ declare function useOrdnanceAddressLookup(postcode: string, clientToken: string,
|
|
|
2363
2394
|
*/
|
|
2364
2395
|
declare function useGetPurchase(companyId: number, serviceId: number, purchaseId: string | number, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabPurchaseResponse, Error>;
|
|
2365
2396
|
|
|
2366
|
-
export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientContext, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, type BookingLabAddBasketServiceItemHeaders, type BookingLabAddBasketServiceItemQuestion, type BookingLabAddBasketServiceItemRequest, type BookingLabAddBasketServiceItemResponse, type BookingLabCheckoutBasketBooking, type BookingLabCheckoutBasketEmbeddedClient, type BookingLabCheckoutBasketEmbeddedMember, type BookingLabCheckoutBasketHeaders, type BookingLabCheckoutBasketRequest, type BookingLabCheckoutBasketResponse, BookingLabClient, type BookingLabCompany, type BookingLabConfigPage, type BookingLabConfigProduct, type BookingLabConfigRequest, type BookingLabConfigResponse, type BookingLabConfigUserJourney, BookingLabContext, type BookingLabCreateBasketHeaders, type BookingLabCreateBasketRequest, type BookingLabCreateBasketResponse, type BookingLabDay, type BookingLabDeleteBasketHeaders, type BookingLabDeleteBasketResponse, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, type BookingLabGetCompaniesParams, type BookingLabGetCompaniesResponse, type BookingLabGetDaysParams, type BookingLabGetDaysResponse, type BookingLabGetQuestionsResponse, type BookingLabGetServicesResponse, type BookingLabGetTimesParams, type BookingLabGetTimesResponse, type BookingLabGetTokenRequest, type BookingLabGetTokenResponse, type BookingLabHeldAsset, BookingLabProvider, type BookingLabPurchaseEmbedded, type BookingLabPurchaseRefund, type BookingLabPurchaseResponse, type BookingLabQuestion, type BookingLabService, type BookingLabTime, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CancelMemberBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CompanyResponse, type CompanySettings, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type FindClientByEmailResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniContext, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type OrdnanceAddressDPA, type OrdnanceAddressLPI, type OrdnanceAddressLookupResponse, type OrdnanceAddressResult, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type RescheduleBookingRequest, type RescheduleBookingResponse, type ResetPasswordRequest, type Resource, type ResourceLinks, type ResourcesResponse, type SendCustomEmailRequest, type SendCustomEmailResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabAddBasketServiceItem, useBookingLabCheckoutBasket, useBookingLabClient, useBookingLabCompanies, useBookingLabConfig, useBookingLabContext, useBookingLabCreateBasket, useBookingLabDays, useBookingLabDeleteBasket, useBookingLabForgotPassword, useBookingLabGetToken, useBookingLabQuestions, useBookingLabService, useBookingLabServices, useBookingLabTimes, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useGetPurchase, useJrniClient, useJrniContext, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
|
|
2397
|
+
export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientContext, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, type BookingLabAddBasketServiceItemHeaders, type BookingLabAddBasketServiceItemQuestion, type BookingLabAddBasketServiceItemRequest, type BookingLabAddBasketServiceItemResponse, type BookingLabCheckoutBasketBooking, type BookingLabCheckoutBasketEmbeddedClient, type BookingLabCheckoutBasketEmbeddedMember, type BookingLabCheckoutBasketHeaders, type BookingLabCheckoutBasketRequest, type BookingLabCheckoutBasketResponse, BookingLabClient, type BookingLabCompany, type BookingLabConfigPage, type BookingLabConfigProduct, type BookingLabConfigRequest, type BookingLabConfigResponse, type BookingLabConfigUserJourney, BookingLabContext, type BookingLabCreateBasketHeaders, type BookingLabCreateBasketRequest, type BookingLabCreateBasketResponse, type BookingLabDay, type BookingLabDeleteBasketHeaders, type BookingLabDeleteBasketResponse, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, type BookingLabGetCompaniesParams, type BookingLabGetCompaniesResponse, type BookingLabGetDaysParams, type BookingLabGetDaysResponse, type BookingLabGetQuestionsResponse, type BookingLabGetServicesResponse, type BookingLabGetTimesParams, type BookingLabGetTimesResponse, type BookingLabGetTokenRequest, type BookingLabGetTokenResponse, type BookingLabHeldAsset, type BookingLabListBookingsParams, type BookingLabListBookingsResponse, BookingLabProvider, type BookingLabPurchaseEmbedded, type BookingLabPurchaseRefund, type BookingLabPurchaseResponse, type BookingLabQuestion, type BookingLabService, type BookingLabTime, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CancelMemberBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CompanyResponse, type CompanySettings, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type FindClientByEmailResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniContext, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type OrdnanceAddressDPA, type OrdnanceAddressLPI, type OrdnanceAddressLookupResponse, type OrdnanceAddressResult, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type RescheduleBookingRequest, type RescheduleBookingResponse, type ResetPasswordRequest, type Resource, type ResourceLinks, type ResourcesResponse, type SendCustomEmailRequest, type SendCustomEmailResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabAddBasketServiceItem, useBookingLabCheckoutBasket, useBookingLabClient, useBookingLabCompanies, useBookingLabConfig, useBookingLabContext, useBookingLabCreateBasket, useBookingLabDays, useBookingLabDeleteBasket, useBookingLabForgotPassword, useBookingLabGetToken, useBookingLabQuestions, useBookingLabService, useBookingLabServices, useBookingLabTimes, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useGetPurchase, useJrniClient, useJrniContext, useListBookinglabBookings, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
|
package/dist/index.d.ts
CHANGED
|
@@ -1630,6 +1630,22 @@ interface BookingLabPurchaseResponse {
|
|
|
1630
1630
|
_links?: Record<string, any>;
|
|
1631
1631
|
[key: string]: any;
|
|
1632
1632
|
}
|
|
1633
|
+
interface BookingLabListBookingsParams {
|
|
1634
|
+
client_id?: number;
|
|
1635
|
+
member_id?: number;
|
|
1636
|
+
start_date?: string;
|
|
1637
|
+
end_date?: string;
|
|
1638
|
+
}
|
|
1639
|
+
interface BookingLabListBookingsResponse {
|
|
1640
|
+
total_entries?: number;
|
|
1641
|
+
include_cancelled?: boolean;
|
|
1642
|
+
_embedded?: {
|
|
1643
|
+
bookings?: any[];
|
|
1644
|
+
[key: string]: any;
|
|
1645
|
+
};
|
|
1646
|
+
_links?: Record<string, any>;
|
|
1647
|
+
[key: string]: any;
|
|
1648
|
+
}
|
|
1633
1649
|
|
|
1634
1650
|
/**
|
|
1635
1651
|
* Core API Client
|
|
@@ -1869,6 +1885,13 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1869
1885
|
* @param clientToken - Client token for authentication
|
|
1870
1886
|
*/
|
|
1871
1887
|
getPurchase(companyId: number, serviceId: number, purchaseId: string | number, clientToken: string): Promise<ApiResponse<BookingLabPurchaseResponse>>;
|
|
1888
|
+
/**
|
|
1889
|
+
* List bookings for a company
|
|
1890
|
+
* @param companyId - The company ID
|
|
1891
|
+
* @param clientToken - Client token for authentication
|
|
1892
|
+
* @param params - Optional query params (client_id, member_id)
|
|
1893
|
+
*/
|
|
1894
|
+
listBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams): Promise<ApiResponse<BookingLabListBookingsResponse>>;
|
|
1872
1895
|
}
|
|
1873
1896
|
/**
|
|
1874
1897
|
* Create a new BookingLab client instance
|
|
@@ -2353,6 +2376,14 @@ declare function useBookingLabDeleteBasket(): _tanstack_react_query.UseMutationR
|
|
|
2353
2376
|
* @param enabled - Whether the query should run
|
|
2354
2377
|
*/
|
|
2355
2378
|
declare function useOrdnanceAddressLookup(postcode: string, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdnanceAddressLookupResponse, Error>;
|
|
2379
|
+
/**
|
|
2380
|
+
* Hook for listing bookings for a company (BookingLab)
|
|
2381
|
+
* @param companyId - The company ID
|
|
2382
|
+
* @param clientToken - Client token for authentication
|
|
2383
|
+
* @param params - Optional query params (client_id, member_id)
|
|
2384
|
+
* @param enabled - Whether the query should run
|
|
2385
|
+
*/
|
|
2386
|
+
declare function useListBookinglabBookings(companyId: number, clientToken: string, params?: BookingLabListBookingsParams, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabListBookingsResponse, Error>;
|
|
2356
2387
|
/**
|
|
2357
2388
|
* Hook for fetching a purchase by ID (BookingLab)
|
|
2358
2389
|
* @param companyId - The company ID
|
|
@@ -2363,4 +2394,4 @@ declare function useOrdnanceAddressLookup(postcode: string, clientToken: string,
|
|
|
2363
2394
|
*/
|
|
2364
2395
|
declare function useGetPurchase(companyId: number, serviceId: number, purchaseId: string | number, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabPurchaseResponse, Error>;
|
|
2365
2396
|
|
|
2366
|
-
export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientContext, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, type BookingLabAddBasketServiceItemHeaders, type BookingLabAddBasketServiceItemQuestion, type BookingLabAddBasketServiceItemRequest, type BookingLabAddBasketServiceItemResponse, type BookingLabCheckoutBasketBooking, type BookingLabCheckoutBasketEmbeddedClient, type BookingLabCheckoutBasketEmbeddedMember, type BookingLabCheckoutBasketHeaders, type BookingLabCheckoutBasketRequest, type BookingLabCheckoutBasketResponse, BookingLabClient, type BookingLabCompany, type BookingLabConfigPage, type BookingLabConfigProduct, type BookingLabConfigRequest, type BookingLabConfigResponse, type BookingLabConfigUserJourney, BookingLabContext, type BookingLabCreateBasketHeaders, type BookingLabCreateBasketRequest, type BookingLabCreateBasketResponse, type BookingLabDay, type BookingLabDeleteBasketHeaders, type BookingLabDeleteBasketResponse, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, type BookingLabGetCompaniesParams, type BookingLabGetCompaniesResponse, type BookingLabGetDaysParams, type BookingLabGetDaysResponse, type BookingLabGetQuestionsResponse, type BookingLabGetServicesResponse, type BookingLabGetTimesParams, type BookingLabGetTimesResponse, type BookingLabGetTokenRequest, type BookingLabGetTokenResponse, type BookingLabHeldAsset, BookingLabProvider, type BookingLabPurchaseEmbedded, type BookingLabPurchaseRefund, type BookingLabPurchaseResponse, type BookingLabQuestion, type BookingLabService, type BookingLabTime, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CancelMemberBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CompanyResponse, type CompanySettings, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type FindClientByEmailResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniContext, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type OrdnanceAddressDPA, type OrdnanceAddressLPI, type OrdnanceAddressLookupResponse, type OrdnanceAddressResult, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type RescheduleBookingRequest, type RescheduleBookingResponse, type ResetPasswordRequest, type Resource, type ResourceLinks, type ResourcesResponse, type SendCustomEmailRequest, type SendCustomEmailResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabAddBasketServiceItem, useBookingLabCheckoutBasket, useBookingLabClient, useBookingLabCompanies, useBookingLabConfig, useBookingLabContext, useBookingLabCreateBasket, useBookingLabDays, useBookingLabDeleteBasket, useBookingLabForgotPassword, useBookingLabGetToken, useBookingLabQuestions, useBookingLabService, useBookingLabServices, useBookingLabTimes, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useGetPurchase, useJrniClient, useJrniContext, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
|
|
2397
|
+
export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientContext, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, type BookingLabAddBasketServiceItemHeaders, type BookingLabAddBasketServiceItemQuestion, type BookingLabAddBasketServiceItemRequest, type BookingLabAddBasketServiceItemResponse, type BookingLabCheckoutBasketBooking, type BookingLabCheckoutBasketEmbeddedClient, type BookingLabCheckoutBasketEmbeddedMember, type BookingLabCheckoutBasketHeaders, type BookingLabCheckoutBasketRequest, type BookingLabCheckoutBasketResponse, BookingLabClient, type BookingLabCompany, type BookingLabConfigPage, type BookingLabConfigProduct, type BookingLabConfigRequest, type BookingLabConfigResponse, type BookingLabConfigUserJourney, BookingLabContext, type BookingLabCreateBasketHeaders, type BookingLabCreateBasketRequest, type BookingLabCreateBasketResponse, type BookingLabDay, type BookingLabDeleteBasketHeaders, type BookingLabDeleteBasketResponse, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, type BookingLabGetCompaniesParams, type BookingLabGetCompaniesResponse, type BookingLabGetDaysParams, type BookingLabGetDaysResponse, type BookingLabGetQuestionsResponse, type BookingLabGetServicesResponse, type BookingLabGetTimesParams, type BookingLabGetTimesResponse, type BookingLabGetTokenRequest, type BookingLabGetTokenResponse, type BookingLabHeldAsset, type BookingLabListBookingsParams, type BookingLabListBookingsResponse, BookingLabProvider, type BookingLabPurchaseEmbedded, type BookingLabPurchaseRefund, type BookingLabPurchaseResponse, type BookingLabQuestion, type BookingLabService, type BookingLabTime, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CancelMemberBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CompanyResponse, type CompanySettings, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type FindClientByEmailResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniContext, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type OrdnanceAddressDPA, type OrdnanceAddressLPI, type OrdnanceAddressLookupResponse, type OrdnanceAddressResult, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type RescheduleBookingRequest, type RescheduleBookingResponse, type ResetPasswordRequest, type Resource, type ResourceLinks, type ResourcesResponse, type SendCustomEmailRequest, type SendCustomEmailResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabAddBasketServiceItem, useBookingLabCheckoutBasket, useBookingLabClient, useBookingLabCompanies, useBookingLabConfig, useBookingLabContext, useBookingLabCreateBasket, useBookingLabDays, useBookingLabDeleteBasket, useBookingLabForgotPassword, useBookingLabGetToken, useBookingLabQuestions, useBookingLabService, useBookingLabServices, useBookingLabTimes, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useGetPurchase, useJrniClient, useJrniContext, useListBookinglabBookings, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
|
package/dist/index.js
CHANGED
|
@@ -565,6 +565,29 @@ var BookingLabClient = class extends ApiClient {
|
|
|
565
565
|
}
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
|
+
/**
|
|
569
|
+
* List bookings for a company
|
|
570
|
+
* @param companyId - The company ID
|
|
571
|
+
* @param clientToken - Client token for authentication
|
|
572
|
+
* @param params - Optional query params (client_id, member_id)
|
|
573
|
+
*/
|
|
574
|
+
async listBookinglabBookings(companyId, clientToken, params) {
|
|
575
|
+
const queryParams = {};
|
|
576
|
+
if (params?.client_id !== void 0) queryParams.client_id = params.client_id;
|
|
577
|
+
if (params?.member_id !== void 0) queryParams.member_id = params.member_id;
|
|
578
|
+
if (params?.start_date !== void 0) queryParams.start_date = params.start_date;
|
|
579
|
+
if (params?.end_date !== void 0) queryParams.end_date = params.end_date;
|
|
580
|
+
return this.get(
|
|
581
|
+
`/company/${companyId}/bookings`,
|
|
582
|
+
{
|
|
583
|
+
params: Object.keys(queryParams).length ? queryParams : void 0,
|
|
584
|
+
headers: {
|
|
585
|
+
"clienttoken": clientToken,
|
|
586
|
+
"x-company-id": String(companyId)
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
);
|
|
590
|
+
}
|
|
568
591
|
};
|
|
569
592
|
function createBookingLabClient(baseUrl, authToken, appId) {
|
|
570
593
|
const client = new BookingLabClient({ baseUrl });
|
|
@@ -1428,6 +1451,17 @@ function useOrdnanceAddressLookup(postcode, clientToken, enabled = true) {
|
|
|
1428
1451
|
enabled: enabled && !!postcode && !!clientToken
|
|
1429
1452
|
});
|
|
1430
1453
|
}
|
|
1454
|
+
function useListBookinglabBookings(companyId, clientToken, params, enabled = true) {
|
|
1455
|
+
const client = useBookingLabClient();
|
|
1456
|
+
return reactQuery.useQuery({
|
|
1457
|
+
queryKey: ["bookingLabListBookings", companyId, params?.client_id, params?.member_id, params?.start_date, params?.end_date],
|
|
1458
|
+
queryFn: async () => {
|
|
1459
|
+
const response = await client.listBookinglabBookings(companyId, clientToken, params);
|
|
1460
|
+
return response.data;
|
|
1461
|
+
},
|
|
1462
|
+
enabled: enabled && !!companyId && !!clientToken
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1431
1465
|
function useGetPurchase(companyId, serviceId, purchaseId, clientToken, enabled = true) {
|
|
1432
1466
|
const client = useBookingLabClient();
|
|
1433
1467
|
return reactQuery.useQuery({
|
|
@@ -1485,6 +1519,7 @@ exports.useGetMember = useGetMember;
|
|
|
1485
1519
|
exports.useGetPurchase = useGetPurchase;
|
|
1486
1520
|
exports.useJrniClient = useJrniClient;
|
|
1487
1521
|
exports.useJrniContext = useJrniContext;
|
|
1522
|
+
exports.useListBookinglabBookings = useListBookinglabBookings;
|
|
1488
1523
|
exports.useListBookings = useListBookings;
|
|
1489
1524
|
exports.useLogin = useLogin;
|
|
1490
1525
|
exports.useOrdnanceAddressLookup = useOrdnanceAddressLookup;
|