@bookinglab/booking-journey-api 2.8.0 → 2.9.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/README.md +2 -0
- package/dist/index.d.cts +71 -1
- package/dist/index.d.ts +71 -1
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -412,6 +412,8 @@ const client = useJrniClient();
|
|
|
412
412
|
- `useService(id)` - Get a specific service
|
|
413
413
|
- `useSendCustomEmail(companyId, clientToken)` - Send a custom email
|
|
414
414
|
- `useBookingLabForgotPassword(companyId, clientToken)` - Request a password reset email
|
|
415
|
+
- `useBookingLabConfig(request, clientToken, enabled?)` - Fetch company configuration and branding
|
|
416
|
+
- `useBookingLabGetToken(request, clientToken, enabled?)` - Fetch a token for a client/company
|
|
415
417
|
- `useBookingLabClient()` - Access the BookingLab client directly
|
|
416
418
|
|
|
417
419
|
```typescript
|
package/dist/index.d.cts
CHANGED
|
@@ -1074,6 +1074,50 @@ interface BookingLabForgotPasswordResponse {
|
|
|
1074
1074
|
result: string;
|
|
1075
1075
|
message: string;
|
|
1076
1076
|
}
|
|
1077
|
+
interface BookingLabConfigRequest {
|
|
1078
|
+
client: string;
|
|
1079
|
+
company: number;
|
|
1080
|
+
}
|
|
1081
|
+
interface BookingLabConfigPage {
|
|
1082
|
+
pageTitle?: string;
|
|
1083
|
+
pageGuidance?: string;
|
|
1084
|
+
termsAndConditions?: string;
|
|
1085
|
+
privacyStatment?: string;
|
|
1086
|
+
[key: string]: unknown;
|
|
1087
|
+
}
|
|
1088
|
+
interface BookingLabConfigUserJourney {
|
|
1089
|
+
pages?: Record<string, BookingLabConfigPage>;
|
|
1090
|
+
[key: string]: unknown;
|
|
1091
|
+
}
|
|
1092
|
+
interface BookingLabConfigProduct {
|
|
1093
|
+
userJourney?: BookingLabConfigUserJourney;
|
|
1094
|
+
[key: string]: unknown;
|
|
1095
|
+
}
|
|
1096
|
+
interface BookingLabConfigResponse {
|
|
1097
|
+
company: number;
|
|
1098
|
+
companyName: string;
|
|
1099
|
+
requireLogin?: boolean;
|
|
1100
|
+
favicon?: string;
|
|
1101
|
+
favicon_link?: string;
|
|
1102
|
+
footer_colour?: string;
|
|
1103
|
+
header_colour?: string;
|
|
1104
|
+
header_text?: string;
|
|
1105
|
+
host?: string;
|
|
1106
|
+
logo?: string;
|
|
1107
|
+
logo_link?: string;
|
|
1108
|
+
page_title?: string;
|
|
1109
|
+
text_colour?: string;
|
|
1110
|
+
terms?: string;
|
|
1111
|
+
cache?: Record<string, unknown>;
|
|
1112
|
+
[key: string]: unknown;
|
|
1113
|
+
}
|
|
1114
|
+
interface BookingLabGetTokenRequest {
|
|
1115
|
+
client: string;
|
|
1116
|
+
company: number;
|
|
1117
|
+
}
|
|
1118
|
+
interface BookingLabGetTokenResponse {
|
|
1119
|
+
[key: string]: unknown;
|
|
1120
|
+
}
|
|
1077
1121
|
|
|
1078
1122
|
/**
|
|
1079
1123
|
* Core API Client
|
|
@@ -1216,6 +1260,18 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1216
1260
|
* @param clientToken - Client token for authentication
|
|
1217
1261
|
*/
|
|
1218
1262
|
forgotPassword(companyId: number, request: BookingLabForgotPasswordRequest, clientToken: string): Promise<ApiResponse<BookingLabForgotPasswordResponse>>;
|
|
1263
|
+
/**
|
|
1264
|
+
* Get company configuration
|
|
1265
|
+
* @param request - Config request with client and company
|
|
1266
|
+
* @param clientToken - Client token for authentication
|
|
1267
|
+
*/
|
|
1268
|
+
getConfig(request: BookingLabConfigRequest, clientToken: string): Promise<ApiResponse<BookingLabConfigResponse>>;
|
|
1269
|
+
/**
|
|
1270
|
+
* Get a token for a client/company
|
|
1271
|
+
* @param request - Token request with client and company
|
|
1272
|
+
* @param clientToken - Client token for authentication
|
|
1273
|
+
*/
|
|
1274
|
+
getToken(request: BookingLabGetTokenRequest, clientToken: string): Promise<ApiResponse<BookingLabGetTokenResponse>>;
|
|
1219
1275
|
}
|
|
1220
1276
|
/**
|
|
1221
1277
|
* Create a new BookingLab client instance
|
|
@@ -1612,5 +1668,19 @@ declare function useSendCustomEmail(companyId: number, clientToken: string): _ta
|
|
|
1612
1668
|
* @param clientToken - Client token for authentication
|
|
1613
1669
|
*/
|
|
1614
1670
|
declare function useBookingLabForgotPassword(companyId: number, clientToken: string): _tanstack_react_query.UseMutationResult<BookingLabForgotPasswordResponse, Error, BookingLabForgotPasswordRequest, unknown>;
|
|
1671
|
+
/**
|
|
1672
|
+
* Hook for fetching BookingLab company configuration
|
|
1673
|
+
* @param request - Config request with client and company
|
|
1674
|
+
* @param clientToken - Client token for authentication
|
|
1675
|
+
* @param enabled - Whether the query should run
|
|
1676
|
+
*/
|
|
1677
|
+
declare function useBookingLabConfig(request: BookingLabConfigRequest, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabConfigResponse, Error>;
|
|
1678
|
+
/**
|
|
1679
|
+
* Hook for getting a BookingLab token
|
|
1680
|
+
* @param request - Token request with client and company
|
|
1681
|
+
* @param clientToken - Client token for authentication
|
|
1682
|
+
* @param enabled - Whether the query should run
|
|
1683
|
+
*/
|
|
1684
|
+
declare function useBookingLabGetToken(request: BookingLabGetTokenRequest, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabGetTokenResponse, Error>;
|
|
1615
1685
|
|
|
1616
|
-
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, BookingLabClient, BookingLabContext, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, BookingLabProvider, 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 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, useBookingLabClient, useBookingLabContext, useBookingLabForgotPassword, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useJrniClient, useJrniContext, useListBookings, useLogin, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
|
|
1686
|
+
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, BookingLabClient, type BookingLabConfigPage, type BookingLabConfigProduct, type BookingLabConfigRequest, type BookingLabConfigResponse, type BookingLabConfigUserJourney, BookingLabContext, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, type BookingLabGetTokenRequest, type BookingLabGetTokenResponse, BookingLabProvider, 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 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, useBookingLabClient, useBookingLabConfig, useBookingLabContext, useBookingLabForgotPassword, useBookingLabGetToken, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useJrniClient, useJrniContext, useListBookings, useLogin, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
|
package/dist/index.d.ts
CHANGED
|
@@ -1074,6 +1074,50 @@ interface BookingLabForgotPasswordResponse {
|
|
|
1074
1074
|
result: string;
|
|
1075
1075
|
message: string;
|
|
1076
1076
|
}
|
|
1077
|
+
interface BookingLabConfigRequest {
|
|
1078
|
+
client: string;
|
|
1079
|
+
company: number;
|
|
1080
|
+
}
|
|
1081
|
+
interface BookingLabConfigPage {
|
|
1082
|
+
pageTitle?: string;
|
|
1083
|
+
pageGuidance?: string;
|
|
1084
|
+
termsAndConditions?: string;
|
|
1085
|
+
privacyStatment?: string;
|
|
1086
|
+
[key: string]: unknown;
|
|
1087
|
+
}
|
|
1088
|
+
interface BookingLabConfigUserJourney {
|
|
1089
|
+
pages?: Record<string, BookingLabConfigPage>;
|
|
1090
|
+
[key: string]: unknown;
|
|
1091
|
+
}
|
|
1092
|
+
interface BookingLabConfigProduct {
|
|
1093
|
+
userJourney?: BookingLabConfigUserJourney;
|
|
1094
|
+
[key: string]: unknown;
|
|
1095
|
+
}
|
|
1096
|
+
interface BookingLabConfigResponse {
|
|
1097
|
+
company: number;
|
|
1098
|
+
companyName: string;
|
|
1099
|
+
requireLogin?: boolean;
|
|
1100
|
+
favicon?: string;
|
|
1101
|
+
favicon_link?: string;
|
|
1102
|
+
footer_colour?: string;
|
|
1103
|
+
header_colour?: string;
|
|
1104
|
+
header_text?: string;
|
|
1105
|
+
host?: string;
|
|
1106
|
+
logo?: string;
|
|
1107
|
+
logo_link?: string;
|
|
1108
|
+
page_title?: string;
|
|
1109
|
+
text_colour?: string;
|
|
1110
|
+
terms?: string;
|
|
1111
|
+
cache?: Record<string, unknown>;
|
|
1112
|
+
[key: string]: unknown;
|
|
1113
|
+
}
|
|
1114
|
+
interface BookingLabGetTokenRequest {
|
|
1115
|
+
client: string;
|
|
1116
|
+
company: number;
|
|
1117
|
+
}
|
|
1118
|
+
interface BookingLabGetTokenResponse {
|
|
1119
|
+
[key: string]: unknown;
|
|
1120
|
+
}
|
|
1077
1121
|
|
|
1078
1122
|
/**
|
|
1079
1123
|
* Core API Client
|
|
@@ -1216,6 +1260,18 @@ declare class BookingLabClient extends ApiClient {
|
|
|
1216
1260
|
* @param clientToken - Client token for authentication
|
|
1217
1261
|
*/
|
|
1218
1262
|
forgotPassword(companyId: number, request: BookingLabForgotPasswordRequest, clientToken: string): Promise<ApiResponse<BookingLabForgotPasswordResponse>>;
|
|
1263
|
+
/**
|
|
1264
|
+
* Get company configuration
|
|
1265
|
+
* @param request - Config request with client and company
|
|
1266
|
+
* @param clientToken - Client token for authentication
|
|
1267
|
+
*/
|
|
1268
|
+
getConfig(request: BookingLabConfigRequest, clientToken: string): Promise<ApiResponse<BookingLabConfigResponse>>;
|
|
1269
|
+
/**
|
|
1270
|
+
* Get a token for a client/company
|
|
1271
|
+
* @param request - Token request with client and company
|
|
1272
|
+
* @param clientToken - Client token for authentication
|
|
1273
|
+
*/
|
|
1274
|
+
getToken(request: BookingLabGetTokenRequest, clientToken: string): Promise<ApiResponse<BookingLabGetTokenResponse>>;
|
|
1219
1275
|
}
|
|
1220
1276
|
/**
|
|
1221
1277
|
* Create a new BookingLab client instance
|
|
@@ -1612,5 +1668,19 @@ declare function useSendCustomEmail(companyId: number, clientToken: string): _ta
|
|
|
1612
1668
|
* @param clientToken - Client token for authentication
|
|
1613
1669
|
*/
|
|
1614
1670
|
declare function useBookingLabForgotPassword(companyId: number, clientToken: string): _tanstack_react_query.UseMutationResult<BookingLabForgotPasswordResponse, Error, BookingLabForgotPasswordRequest, unknown>;
|
|
1671
|
+
/**
|
|
1672
|
+
* Hook for fetching BookingLab company configuration
|
|
1673
|
+
* @param request - Config request with client and company
|
|
1674
|
+
* @param clientToken - Client token for authentication
|
|
1675
|
+
* @param enabled - Whether the query should run
|
|
1676
|
+
*/
|
|
1677
|
+
declare function useBookingLabConfig(request: BookingLabConfigRequest, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabConfigResponse, Error>;
|
|
1678
|
+
/**
|
|
1679
|
+
* Hook for getting a BookingLab token
|
|
1680
|
+
* @param request - Token request with client and company
|
|
1681
|
+
* @param clientToken - Client token for authentication
|
|
1682
|
+
* @param enabled - Whether the query should run
|
|
1683
|
+
*/
|
|
1684
|
+
declare function useBookingLabGetToken(request: BookingLabGetTokenRequest, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<BookingLabGetTokenResponse, Error>;
|
|
1615
1685
|
|
|
1616
|
-
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, BookingLabClient, BookingLabContext, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, BookingLabProvider, 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 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, useBookingLabClient, useBookingLabContext, useBookingLabForgotPassword, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useJrniClient, useJrniContext, useListBookings, useLogin, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
|
|
1686
|
+
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, BookingLabClient, type BookingLabConfigPage, type BookingLabConfigProduct, type BookingLabConfigRequest, type BookingLabConfigResponse, type BookingLabConfigUserJourney, BookingLabContext, type BookingLabForgotPasswordRequest, type BookingLabForgotPasswordResponse, type BookingLabGetTokenRequest, type BookingLabGetTokenResponse, BookingLabProvider, 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 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, useBookingLabClient, useBookingLabConfig, useBookingLabContext, useBookingLabForgotPassword, useBookingLabGetToken, useCancelBooking, useCancelMemberBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCompany, useCreateBasket, useCreateClient, useDates, useFindClientByEmail, useForgottenPassword, useGetMember, useJrniClient, useJrniContext, useListBookings, useLogin, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
|
package/dist/index.js
CHANGED
|
@@ -341,6 +341,30 @@ var BookingLabClient = class extends ApiClient {
|
|
|
341
341
|
}
|
|
342
342
|
);
|
|
343
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* Get company configuration
|
|
346
|
+
* @param request - Config request with client and company
|
|
347
|
+
* @param clientToken - Client token for authentication
|
|
348
|
+
*/
|
|
349
|
+
async getConfig(request, clientToken) {
|
|
350
|
+
return this.post("/config", request, {
|
|
351
|
+
headers: {
|
|
352
|
+
"clienttoken": clientToken
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Get a token for a client/company
|
|
358
|
+
* @param request - Token request with client and company
|
|
359
|
+
* @param clientToken - Client token for authentication
|
|
360
|
+
*/
|
|
361
|
+
async getToken(request, clientToken) {
|
|
362
|
+
return this.post("/token", request, {
|
|
363
|
+
headers: {
|
|
364
|
+
"clienttoken": clientToken
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
}
|
|
344
368
|
};
|
|
345
369
|
function createBookingLabClient(baseUrl, authToken, appId) {
|
|
346
370
|
const client = new BookingLabClient({ baseUrl });
|
|
@@ -1069,6 +1093,28 @@ function useBookingLabForgotPassword(companyId, clientToken) {
|
|
|
1069
1093
|
}
|
|
1070
1094
|
});
|
|
1071
1095
|
}
|
|
1096
|
+
function useBookingLabConfig(request, clientToken, enabled = true) {
|
|
1097
|
+
const client = useBookingLabClient();
|
|
1098
|
+
return reactQuery.useQuery({
|
|
1099
|
+
queryKey: ["bookingLabConfig", request.client, request.company],
|
|
1100
|
+
queryFn: async () => {
|
|
1101
|
+
const response = await client.getConfig(request, clientToken);
|
|
1102
|
+
return response.data;
|
|
1103
|
+
},
|
|
1104
|
+
enabled: enabled && !!request.client && !!request.company && !!clientToken
|
|
1105
|
+
});
|
|
1106
|
+
}
|
|
1107
|
+
function useBookingLabGetToken(request, clientToken, enabled = true) {
|
|
1108
|
+
const client = useBookingLabClient();
|
|
1109
|
+
return reactQuery.useQuery({
|
|
1110
|
+
queryKey: ["bookingLabGetToken", request.client, request.company],
|
|
1111
|
+
queryFn: async () => {
|
|
1112
|
+
const response = await client.getToken(request, clientToken);
|
|
1113
|
+
return response.data;
|
|
1114
|
+
},
|
|
1115
|
+
enabled: enabled && !!request.client && !!request.company && !!clientToken
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1072
1118
|
|
|
1073
1119
|
exports.ApiClient = ApiClient;
|
|
1074
1120
|
exports.ApiClientContext = ApiClientContext;
|
|
@@ -1085,8 +1131,10 @@ exports.createJrniClient = createJrniClient;
|
|
|
1085
1131
|
exports.useAddServiceItem = useAddServiceItem;
|
|
1086
1132
|
exports.useApiClientContext = useApiClientContext;
|
|
1087
1133
|
exports.useBookingLabClient = useBookingLabClient;
|
|
1134
|
+
exports.useBookingLabConfig = useBookingLabConfig;
|
|
1088
1135
|
exports.useBookingLabContext = useBookingLabContext;
|
|
1089
1136
|
exports.useBookingLabForgotPassword = useBookingLabForgotPassword;
|
|
1137
|
+
exports.useBookingLabGetToken = useBookingLabGetToken;
|
|
1090
1138
|
exports.useCancelBooking = useCancelBooking;
|
|
1091
1139
|
exports.useCancelMemberBooking = useCancelMemberBooking;
|
|
1092
1140
|
exports.useCheckoutBasket = useCheckoutBasket;
|