@bookinglab/booking-journey-api 1.6.0 → 1.6.1

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 CHANGED
@@ -292,7 +292,11 @@ const clearBasketsMutation = useClearBaskets();
292
292
  clearBasketsMutation.mutate();
293
293
 
294
294
  const addServiceItemMutation = useAddServiceItem('basket-123');
295
- addServiceItemMutation.mutate({ service_id: 1, start: '2024-01-15T10:00:00Z', questions: { id: [1] } });
295
+ addServiceItemMutation.mutate({
296
+ service_id: 1,
297
+ start: '2024-01-15T10:00:00Z',
298
+ questions: [{ id: '123', answer: 'John Doe' }, { id: '456', answer: 'john@example.com' }]
299
+ });
296
300
 
297
301
  const { data: times } = useTimes(37000, { service_id: 48320, start_date: '2025-01-15' });
298
302
  // times.times = [{ start: "2025-01-15T09:00:00+00:00", available: true, durations: [30, 60, 90] }, ...]
package/dist/index.d.cts CHANGED
@@ -453,6 +453,10 @@ interface AddServiceItemAssets {
453
453
  person_group_id?: number[];
454
454
  resource_group_id?: number[];
455
455
  }
456
+ interface AddServiceItemQuestion {
457
+ id: string;
458
+ answer: string;
459
+ }
456
460
  interface AddServiceItemRequest {
457
461
  service_item_id?: string;
458
462
  service_id: number;
@@ -463,9 +467,7 @@ interface AddServiceItemRequest {
463
467
  resource_id?: number;
464
468
  assets?: AddServiceItemAssets;
465
469
  requested_assets?: AddServiceItemAssets;
466
- questions: {
467
- id: number;
468
- }[];
470
+ questions: AddServiceItemQuestion[];
469
471
  pre_time?: number;
470
472
  post_time?: number;
471
473
  time_zone?: string;
@@ -830,4 +832,4 @@ declare function useQuestions(companyId: number, params: GetQuestionsParams, ena
830
832
  */
831
833
  declare function useCheckoutBasket(basketId: string): _tanstack_react_query.UseMutationResult<CheckoutBasketResponse, Error, CheckoutBasketRequest, unknown>;
832
834
 
833
- export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, BookingLabClient, BookingLabProvider, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type GetChildCompaniesParams, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniProvider, type JrniService, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBookingsResponse, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type Resource, type ResourceLinks, type ResourcesResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientDetailsData, type UpdateMemberDetailsData, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabClient, useBookingLabContext, useCheckoutBasket, useChildCompanies, useClearBaskets, useCreateBasket, useJrniClient, useJrniContext, useLogin, useQuestions, useResources, useServices, useTimes };
835
+ export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, BookingLabClient, BookingLabProvider, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type GetChildCompaniesParams, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniProvider, type JrniService, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBookingsResponse, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type Resource, type ResourceLinks, type ResourcesResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientDetailsData, type UpdateMemberDetailsData, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabClient, useBookingLabContext, useCheckoutBasket, useChildCompanies, useClearBaskets, useCreateBasket, useJrniClient, useJrniContext, useLogin, useQuestions, useResources, useServices, useTimes };
package/dist/index.d.ts CHANGED
@@ -453,6 +453,10 @@ interface AddServiceItemAssets {
453
453
  person_group_id?: number[];
454
454
  resource_group_id?: number[];
455
455
  }
456
+ interface AddServiceItemQuestion {
457
+ id: string;
458
+ answer: string;
459
+ }
456
460
  interface AddServiceItemRequest {
457
461
  service_item_id?: string;
458
462
  service_id: number;
@@ -463,9 +467,7 @@ interface AddServiceItemRequest {
463
467
  resource_id?: number;
464
468
  assets?: AddServiceItemAssets;
465
469
  requested_assets?: AddServiceItemAssets;
466
- questions: {
467
- id: number;
468
- }[];
470
+ questions: AddServiceItemQuestion[];
469
471
  pre_time?: number;
470
472
  post_time?: number;
471
473
  time_zone?: string;
@@ -830,4 +832,4 @@ declare function useQuestions(companyId: number, params: GetQuestionsParams, ena
830
832
  */
831
833
  declare function useCheckoutBasket(basketId: string): _tanstack_react_query.UseMutationResult<CheckoutBasketResponse, Error, CheckoutBasketRequest, unknown>;
832
834
 
833
- export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, BookingLabClient, BookingLabProvider, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type GetChildCompaniesParams, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniProvider, type JrniService, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBookingsResponse, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type Resource, type ResourceLinks, type ResourcesResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientDetailsData, type UpdateMemberDetailsData, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabClient, useBookingLabContext, useCheckoutBasket, useChildCompanies, useClearBaskets, useCreateBasket, useJrniClient, useJrniContext, useLogin, useQuestions, useResources, useServices, useTimes };
835
+ export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, BookingLabClient, BookingLabProvider, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type GetChildCompaniesParams, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniProvider, type JrniService, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBookingsResponse, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type Resource, type ResourceLinks, type ResourcesResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientDetailsData, type UpdateMemberDetailsData, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabClient, useBookingLabContext, useCheckoutBasket, useChildCompanies, useClearBaskets, useCreateBasket, useJrniClient, useJrniContext, useLogin, useQuestions, useResources, useServices, useTimes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bookinglab/booking-journey-api",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript library for BookingLab and JRNI APIs with React hooks support",
6
6
  "main": "./dist/index.js",