@bookinglab/booking-journey-api 2.11.0 → 2.13.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 CHANGED
@@ -639,6 +639,11 @@ interface CreateClientRequest {
639
639
  send_welcome_email?: boolean;
640
640
  member_type?: number;
641
641
  password?: string;
642
+ address1?: string;
643
+ address2?: string;
644
+ address3?: string;
645
+ address4?: string;
646
+ postcode?: string;
642
647
  }
643
648
  /**
644
649
  * Cancel Booking Types (BookingLab)
@@ -1506,6 +1511,74 @@ interface BookingLabCheckoutBasketResponse {
1506
1511
  }>;
1507
1512
  [key: string]: any;
1508
1513
  }
1514
+ interface OrdnanceAddressDPA {
1515
+ UPRN?: string;
1516
+ UDPRN?: string;
1517
+ ADDRESS: string;
1518
+ BUILDING_NUMBER?: string;
1519
+ BUILDING_NAME?: string;
1520
+ SUB_BUILDING_NAME?: string;
1521
+ ORGANISATION_NAME?: string;
1522
+ DEPARTMENT_NAME?: string;
1523
+ THOROUGHFARE_NAME?: string;
1524
+ DEPENDENT_THOROUGHFARE_NAME?: string;
1525
+ DEPENDENT_LOCALITY?: string;
1526
+ DOUBLE_DEPENDENT_LOCALITY?: string;
1527
+ POST_TOWN?: string;
1528
+ POSTCODE?: string;
1529
+ RPC?: string;
1530
+ X_COORDINATE?: number;
1531
+ Y_COORDINATE?: number;
1532
+ STATUS?: string;
1533
+ LOGICAL_STATUS_CODE?: string;
1534
+ CLASSIFICATION_CODE?: string;
1535
+ CLASSIFICATION_CODE_DESCRIPTION?: string;
1536
+ LOCAL_CUSTODIAN_CODE?: number;
1537
+ LOCAL_CUSTODIAN_CODE_DESCRIPTION?: string;
1538
+ COUNTRY_CODE?: string;
1539
+ COUNTRY_CODE_DESCRIPTION?: string;
1540
+ POSTAL_ADDRESS_CODE?: string;
1541
+ POSTAL_ADDRESS_CODE_DESCRIPTION?: string;
1542
+ BLPU_STATE_CODE?: string;
1543
+ BLPU_STATE_CODE_DESCRIPTION?: string;
1544
+ LAST_UPDATE_DATE?: string;
1545
+ ENTRY_DATE?: string;
1546
+ LANGUAGE?: string;
1547
+ MATCH?: number;
1548
+ MATCH_DESCRIPTION?: string;
1549
+ DELIVERY_POINT_SUFFIX?: string;
1550
+ [key: string]: any;
1551
+ }
1552
+ interface OrdnanceAddressLPI {
1553
+ UPRN?: string;
1554
+ ADDRESS: string;
1555
+ USRN?: string;
1556
+ LPI_KEY?: string;
1557
+ PAO_START_NUMBER?: string;
1558
+ PAO_TEXT?: string;
1559
+ STREET_DESCRIPTION?: string;
1560
+ TOWN_NAME?: string;
1561
+ ADMINISTRATIVE_AREA?: string;
1562
+ POSTCODE_LOCATOR?: string;
1563
+ CLASSIFICATION_CODE?: string;
1564
+ CLASSIFICATION_CODE_DESCRIPTION?: string;
1565
+ STREET_STATE_CODE?: string;
1566
+ STREET_STATE_CODE_DESCRIPTION?: string;
1567
+ STREET_CLASSIFICATION_CODE?: string;
1568
+ STREET_CLASSIFICATION_CODE_DESCRIPTION?: string;
1569
+ LPI_LOGICAL_STATUS_CODE?: string;
1570
+ LPI_LOGICAL_STATUS_CODE_DESCRIPTION?: string;
1571
+ MATCH?: number;
1572
+ MATCH_DESCRIPTION?: string;
1573
+ [key: string]: any;
1574
+ }
1575
+ interface OrdnanceAddressResult {
1576
+ DPA?: OrdnanceAddressDPA;
1577
+ LPI?: OrdnanceAddressLPI;
1578
+ }
1579
+ interface OrdnanceAddressLookupResponse {
1580
+ results: OrdnanceAddressResult[];
1581
+ }
1509
1582
 
1510
1583
  /**
1511
1584
  * Core API Client
@@ -1731,6 +1804,12 @@ declare class BookingLabClient extends ApiClient {
1731
1804
  * @param headers - Required clientToken/authToken/companyId
1732
1805
  */
1733
1806
  deleteBasketPublic(headers: BookingLabDeleteBasketHeaders): Promise<ApiResponse<BookingLabDeleteBasketResponse>>;
1807
+ /**
1808
+ * Look up UK addresses by postcode via Ordnance Survey
1809
+ * @param postcode - UK postcode
1810
+ * @param clientToken - Client token for authentication
1811
+ */
1812
+ getOrdnanceAddressLookup(postcode: string, clientToken: string): Promise<ApiResponse<OrdnanceAddressLookupResponse>>;
1734
1813
  }
1735
1814
  /**
1736
1815
  * Create a new BookingLab client instance
@@ -2208,5 +2287,12 @@ declare function useBookingLabCheckoutBasket(): _tanstack_react_query.UseMutatio
2208
2287
  declare function useBookingLabDeleteBasket(): _tanstack_react_query.UseMutationResult<BookingLabDeleteBasketResponse, Error, {
2209
2288
  headers: BookingLabDeleteBasketHeaders;
2210
2289
  }, unknown>;
2290
+ /**
2291
+ * Hook for looking up UK addresses by postcode via Ordnance Survey (BookingLab)
2292
+ * @param postcode - UK postcode
2293
+ * @param clientToken - Client token for authentication
2294
+ * @param enabled - Whether the query should run
2295
+ */
2296
+ declare function useOrdnanceAddressLookup(postcode: string, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdnanceAddressLookupResponse, Error>;
2211
2297
 
2212
- 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 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 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, useJrniClient, useJrniContext, useListBookings, useLogin, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
2298
+ 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 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, useJrniClient, useJrniContext, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
package/dist/index.d.ts CHANGED
@@ -639,6 +639,11 @@ interface CreateClientRequest {
639
639
  send_welcome_email?: boolean;
640
640
  member_type?: number;
641
641
  password?: string;
642
+ address1?: string;
643
+ address2?: string;
644
+ address3?: string;
645
+ address4?: string;
646
+ postcode?: string;
642
647
  }
643
648
  /**
644
649
  * Cancel Booking Types (BookingLab)
@@ -1506,6 +1511,74 @@ interface BookingLabCheckoutBasketResponse {
1506
1511
  }>;
1507
1512
  [key: string]: any;
1508
1513
  }
1514
+ interface OrdnanceAddressDPA {
1515
+ UPRN?: string;
1516
+ UDPRN?: string;
1517
+ ADDRESS: string;
1518
+ BUILDING_NUMBER?: string;
1519
+ BUILDING_NAME?: string;
1520
+ SUB_BUILDING_NAME?: string;
1521
+ ORGANISATION_NAME?: string;
1522
+ DEPARTMENT_NAME?: string;
1523
+ THOROUGHFARE_NAME?: string;
1524
+ DEPENDENT_THOROUGHFARE_NAME?: string;
1525
+ DEPENDENT_LOCALITY?: string;
1526
+ DOUBLE_DEPENDENT_LOCALITY?: string;
1527
+ POST_TOWN?: string;
1528
+ POSTCODE?: string;
1529
+ RPC?: string;
1530
+ X_COORDINATE?: number;
1531
+ Y_COORDINATE?: number;
1532
+ STATUS?: string;
1533
+ LOGICAL_STATUS_CODE?: string;
1534
+ CLASSIFICATION_CODE?: string;
1535
+ CLASSIFICATION_CODE_DESCRIPTION?: string;
1536
+ LOCAL_CUSTODIAN_CODE?: number;
1537
+ LOCAL_CUSTODIAN_CODE_DESCRIPTION?: string;
1538
+ COUNTRY_CODE?: string;
1539
+ COUNTRY_CODE_DESCRIPTION?: string;
1540
+ POSTAL_ADDRESS_CODE?: string;
1541
+ POSTAL_ADDRESS_CODE_DESCRIPTION?: string;
1542
+ BLPU_STATE_CODE?: string;
1543
+ BLPU_STATE_CODE_DESCRIPTION?: string;
1544
+ LAST_UPDATE_DATE?: string;
1545
+ ENTRY_DATE?: string;
1546
+ LANGUAGE?: string;
1547
+ MATCH?: number;
1548
+ MATCH_DESCRIPTION?: string;
1549
+ DELIVERY_POINT_SUFFIX?: string;
1550
+ [key: string]: any;
1551
+ }
1552
+ interface OrdnanceAddressLPI {
1553
+ UPRN?: string;
1554
+ ADDRESS: string;
1555
+ USRN?: string;
1556
+ LPI_KEY?: string;
1557
+ PAO_START_NUMBER?: string;
1558
+ PAO_TEXT?: string;
1559
+ STREET_DESCRIPTION?: string;
1560
+ TOWN_NAME?: string;
1561
+ ADMINISTRATIVE_AREA?: string;
1562
+ POSTCODE_LOCATOR?: string;
1563
+ CLASSIFICATION_CODE?: string;
1564
+ CLASSIFICATION_CODE_DESCRIPTION?: string;
1565
+ STREET_STATE_CODE?: string;
1566
+ STREET_STATE_CODE_DESCRIPTION?: string;
1567
+ STREET_CLASSIFICATION_CODE?: string;
1568
+ STREET_CLASSIFICATION_CODE_DESCRIPTION?: string;
1569
+ LPI_LOGICAL_STATUS_CODE?: string;
1570
+ LPI_LOGICAL_STATUS_CODE_DESCRIPTION?: string;
1571
+ MATCH?: number;
1572
+ MATCH_DESCRIPTION?: string;
1573
+ [key: string]: any;
1574
+ }
1575
+ interface OrdnanceAddressResult {
1576
+ DPA?: OrdnanceAddressDPA;
1577
+ LPI?: OrdnanceAddressLPI;
1578
+ }
1579
+ interface OrdnanceAddressLookupResponse {
1580
+ results: OrdnanceAddressResult[];
1581
+ }
1509
1582
 
1510
1583
  /**
1511
1584
  * Core API Client
@@ -1731,6 +1804,12 @@ declare class BookingLabClient extends ApiClient {
1731
1804
  * @param headers - Required clientToken/authToken/companyId
1732
1805
  */
1733
1806
  deleteBasketPublic(headers: BookingLabDeleteBasketHeaders): Promise<ApiResponse<BookingLabDeleteBasketResponse>>;
1807
+ /**
1808
+ * Look up UK addresses by postcode via Ordnance Survey
1809
+ * @param postcode - UK postcode
1810
+ * @param clientToken - Client token for authentication
1811
+ */
1812
+ getOrdnanceAddressLookup(postcode: string, clientToken: string): Promise<ApiResponse<OrdnanceAddressLookupResponse>>;
1734
1813
  }
1735
1814
  /**
1736
1815
  * Create a new BookingLab client instance
@@ -2208,5 +2287,12 @@ declare function useBookingLabCheckoutBasket(): _tanstack_react_query.UseMutatio
2208
2287
  declare function useBookingLabDeleteBasket(): _tanstack_react_query.UseMutationResult<BookingLabDeleteBasketResponse, Error, {
2209
2288
  headers: BookingLabDeleteBasketHeaders;
2210
2289
  }, unknown>;
2290
+ /**
2291
+ * Hook for looking up UK addresses by postcode via Ordnance Survey (BookingLab)
2292
+ * @param postcode - UK postcode
2293
+ * @param clientToken - Client token for authentication
2294
+ * @param enabled - Whether the query should run
2295
+ */
2296
+ declare function useOrdnanceAddressLookup(postcode: string, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdnanceAddressLookupResponse, Error>;
2211
2297
 
2212
- 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 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 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, useJrniClient, useJrniContext, useListBookings, useLogin, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
2298
+ 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 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, useJrniClient, useJrniContext, useListBookings, useLogin, useOrdnanceAddressLookup, useQuestions, useRescheduleBooking, useResetPassword, useResources, useSendCustomEmail, useServices, useTimes, useUpdateClient, useUpdateMember };
package/dist/index.js CHANGED
@@ -532,6 +532,21 @@ var BookingLabClient = class extends ApiClient {
532
532
  }
533
533
  });
534
534
  }
535
+ /**
536
+ * Look up UK addresses by postcode via Ordnance Survey
537
+ * @param postcode - UK postcode
538
+ * @param clientToken - Client token for authentication
539
+ */
540
+ async getOrdnanceAddressLookup(postcode, clientToken) {
541
+ return this.get(
542
+ `/ordnance_survey/postcode/${encodeURIComponent(postcode)}`,
543
+ {
544
+ headers: {
545
+ "clienttoken": clientToken
546
+ }
547
+ }
548
+ );
549
+ }
535
550
  };
536
551
  function createBookingLabClient(baseUrl, authToken, appId) {
537
552
  const client = new BookingLabClient({ baseUrl });
@@ -1384,6 +1399,17 @@ function useBookingLabDeleteBasket() {
1384
1399
  }
1385
1400
  });
1386
1401
  }
1402
+ function useOrdnanceAddressLookup(postcode, clientToken, enabled = true) {
1403
+ const client = useBookingLabClient();
1404
+ return reactQuery.useQuery({
1405
+ queryKey: ["ordnanceAddressLookup", postcode],
1406
+ queryFn: async () => {
1407
+ const response = await client.getOrdnanceAddressLookup(postcode, clientToken);
1408
+ return response.data;
1409
+ },
1410
+ enabled: enabled && !!postcode && !!clientToken
1411
+ });
1412
+ }
1387
1413
 
1388
1414
  exports.ApiClient = ApiClient;
1389
1415
  exports.ApiClientContext = ApiClientContext;
@@ -1431,6 +1457,7 @@ exports.useJrniClient = useJrniClient;
1431
1457
  exports.useJrniContext = useJrniContext;
1432
1458
  exports.useListBookings = useListBookings;
1433
1459
  exports.useLogin = useLogin;
1460
+ exports.useOrdnanceAddressLookup = useOrdnanceAddressLookup;
1434
1461
  exports.useQuestions = useQuestions;
1435
1462
  exports.useRescheduleBooking = useRescheduleBooking;
1436
1463
  exports.useResetPassword = useResetPassword;