@bookinglab/booking-journey-api 2.11.0 → 2.12.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
@@ -1506,6 +1506,74 @@ interface BookingLabCheckoutBasketResponse {
1506
1506
  }>;
1507
1507
  [key: string]: any;
1508
1508
  }
1509
+ interface OrdnanceAddressDPA {
1510
+ UPRN?: string;
1511
+ UDPRN?: string;
1512
+ ADDRESS: string;
1513
+ BUILDING_NUMBER?: string;
1514
+ BUILDING_NAME?: string;
1515
+ SUB_BUILDING_NAME?: string;
1516
+ ORGANISATION_NAME?: string;
1517
+ DEPARTMENT_NAME?: string;
1518
+ THOROUGHFARE_NAME?: string;
1519
+ DEPENDENT_THOROUGHFARE_NAME?: string;
1520
+ DEPENDENT_LOCALITY?: string;
1521
+ DOUBLE_DEPENDENT_LOCALITY?: string;
1522
+ POST_TOWN?: string;
1523
+ POSTCODE?: string;
1524
+ RPC?: string;
1525
+ X_COORDINATE?: number;
1526
+ Y_COORDINATE?: number;
1527
+ STATUS?: string;
1528
+ LOGICAL_STATUS_CODE?: string;
1529
+ CLASSIFICATION_CODE?: string;
1530
+ CLASSIFICATION_CODE_DESCRIPTION?: string;
1531
+ LOCAL_CUSTODIAN_CODE?: number;
1532
+ LOCAL_CUSTODIAN_CODE_DESCRIPTION?: string;
1533
+ COUNTRY_CODE?: string;
1534
+ COUNTRY_CODE_DESCRIPTION?: string;
1535
+ POSTAL_ADDRESS_CODE?: string;
1536
+ POSTAL_ADDRESS_CODE_DESCRIPTION?: string;
1537
+ BLPU_STATE_CODE?: string;
1538
+ BLPU_STATE_CODE_DESCRIPTION?: string;
1539
+ LAST_UPDATE_DATE?: string;
1540
+ ENTRY_DATE?: string;
1541
+ LANGUAGE?: string;
1542
+ MATCH?: number;
1543
+ MATCH_DESCRIPTION?: string;
1544
+ DELIVERY_POINT_SUFFIX?: string;
1545
+ [key: string]: any;
1546
+ }
1547
+ interface OrdnanceAddressLPI {
1548
+ UPRN?: string;
1549
+ ADDRESS: string;
1550
+ USRN?: string;
1551
+ LPI_KEY?: string;
1552
+ PAO_START_NUMBER?: string;
1553
+ PAO_TEXT?: string;
1554
+ STREET_DESCRIPTION?: string;
1555
+ TOWN_NAME?: string;
1556
+ ADMINISTRATIVE_AREA?: string;
1557
+ POSTCODE_LOCATOR?: string;
1558
+ CLASSIFICATION_CODE?: string;
1559
+ CLASSIFICATION_CODE_DESCRIPTION?: string;
1560
+ STREET_STATE_CODE?: string;
1561
+ STREET_STATE_CODE_DESCRIPTION?: string;
1562
+ STREET_CLASSIFICATION_CODE?: string;
1563
+ STREET_CLASSIFICATION_CODE_DESCRIPTION?: string;
1564
+ LPI_LOGICAL_STATUS_CODE?: string;
1565
+ LPI_LOGICAL_STATUS_CODE_DESCRIPTION?: string;
1566
+ MATCH?: number;
1567
+ MATCH_DESCRIPTION?: string;
1568
+ [key: string]: any;
1569
+ }
1570
+ interface OrdnanceAddressResult {
1571
+ DPA?: OrdnanceAddressDPA;
1572
+ LPI?: OrdnanceAddressLPI;
1573
+ }
1574
+ interface OrdnanceAddressLookupResponse {
1575
+ results: OrdnanceAddressResult[];
1576
+ }
1509
1577
 
1510
1578
  /**
1511
1579
  * Core API Client
@@ -1731,6 +1799,12 @@ declare class BookingLabClient extends ApiClient {
1731
1799
  * @param headers - Required clientToken/authToken/companyId
1732
1800
  */
1733
1801
  deleteBasketPublic(headers: BookingLabDeleteBasketHeaders): Promise<ApiResponse<BookingLabDeleteBasketResponse>>;
1802
+ /**
1803
+ * Look up UK addresses by postcode via Ordnance Survey
1804
+ * @param postcode - UK postcode
1805
+ * @param clientToken - Client token for authentication
1806
+ */
1807
+ getOrdnanceAddressLookup(postcode: string, clientToken: string): Promise<ApiResponse<OrdnanceAddressLookupResponse>>;
1734
1808
  }
1735
1809
  /**
1736
1810
  * Create a new BookingLab client instance
@@ -2208,5 +2282,12 @@ declare function useBookingLabCheckoutBasket(): _tanstack_react_query.UseMutatio
2208
2282
  declare function useBookingLabDeleteBasket(): _tanstack_react_query.UseMutationResult<BookingLabDeleteBasketResponse, Error, {
2209
2283
  headers: BookingLabDeleteBasketHeaders;
2210
2284
  }, unknown>;
2285
+ /**
2286
+ * Hook for looking up UK addresses by postcode via Ordnance Survey (BookingLab)
2287
+ * @param postcode - UK postcode
2288
+ * @param clientToken - Client token for authentication
2289
+ * @param enabled - Whether the query should run
2290
+ */
2291
+ declare function useOrdnanceAddressLookup(postcode: string, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdnanceAddressLookupResponse, Error>;
2211
2292
 
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 };
2293
+ 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
@@ -1506,6 +1506,74 @@ interface BookingLabCheckoutBasketResponse {
1506
1506
  }>;
1507
1507
  [key: string]: any;
1508
1508
  }
1509
+ interface OrdnanceAddressDPA {
1510
+ UPRN?: string;
1511
+ UDPRN?: string;
1512
+ ADDRESS: string;
1513
+ BUILDING_NUMBER?: string;
1514
+ BUILDING_NAME?: string;
1515
+ SUB_BUILDING_NAME?: string;
1516
+ ORGANISATION_NAME?: string;
1517
+ DEPARTMENT_NAME?: string;
1518
+ THOROUGHFARE_NAME?: string;
1519
+ DEPENDENT_THOROUGHFARE_NAME?: string;
1520
+ DEPENDENT_LOCALITY?: string;
1521
+ DOUBLE_DEPENDENT_LOCALITY?: string;
1522
+ POST_TOWN?: string;
1523
+ POSTCODE?: string;
1524
+ RPC?: string;
1525
+ X_COORDINATE?: number;
1526
+ Y_COORDINATE?: number;
1527
+ STATUS?: string;
1528
+ LOGICAL_STATUS_CODE?: string;
1529
+ CLASSIFICATION_CODE?: string;
1530
+ CLASSIFICATION_CODE_DESCRIPTION?: string;
1531
+ LOCAL_CUSTODIAN_CODE?: number;
1532
+ LOCAL_CUSTODIAN_CODE_DESCRIPTION?: string;
1533
+ COUNTRY_CODE?: string;
1534
+ COUNTRY_CODE_DESCRIPTION?: string;
1535
+ POSTAL_ADDRESS_CODE?: string;
1536
+ POSTAL_ADDRESS_CODE_DESCRIPTION?: string;
1537
+ BLPU_STATE_CODE?: string;
1538
+ BLPU_STATE_CODE_DESCRIPTION?: string;
1539
+ LAST_UPDATE_DATE?: string;
1540
+ ENTRY_DATE?: string;
1541
+ LANGUAGE?: string;
1542
+ MATCH?: number;
1543
+ MATCH_DESCRIPTION?: string;
1544
+ DELIVERY_POINT_SUFFIX?: string;
1545
+ [key: string]: any;
1546
+ }
1547
+ interface OrdnanceAddressLPI {
1548
+ UPRN?: string;
1549
+ ADDRESS: string;
1550
+ USRN?: string;
1551
+ LPI_KEY?: string;
1552
+ PAO_START_NUMBER?: string;
1553
+ PAO_TEXT?: string;
1554
+ STREET_DESCRIPTION?: string;
1555
+ TOWN_NAME?: string;
1556
+ ADMINISTRATIVE_AREA?: string;
1557
+ POSTCODE_LOCATOR?: string;
1558
+ CLASSIFICATION_CODE?: string;
1559
+ CLASSIFICATION_CODE_DESCRIPTION?: string;
1560
+ STREET_STATE_CODE?: string;
1561
+ STREET_STATE_CODE_DESCRIPTION?: string;
1562
+ STREET_CLASSIFICATION_CODE?: string;
1563
+ STREET_CLASSIFICATION_CODE_DESCRIPTION?: string;
1564
+ LPI_LOGICAL_STATUS_CODE?: string;
1565
+ LPI_LOGICAL_STATUS_CODE_DESCRIPTION?: string;
1566
+ MATCH?: number;
1567
+ MATCH_DESCRIPTION?: string;
1568
+ [key: string]: any;
1569
+ }
1570
+ interface OrdnanceAddressResult {
1571
+ DPA?: OrdnanceAddressDPA;
1572
+ LPI?: OrdnanceAddressLPI;
1573
+ }
1574
+ interface OrdnanceAddressLookupResponse {
1575
+ results: OrdnanceAddressResult[];
1576
+ }
1509
1577
 
1510
1578
  /**
1511
1579
  * Core API Client
@@ -1731,6 +1799,12 @@ declare class BookingLabClient extends ApiClient {
1731
1799
  * @param headers - Required clientToken/authToken/companyId
1732
1800
  */
1733
1801
  deleteBasketPublic(headers: BookingLabDeleteBasketHeaders): Promise<ApiResponse<BookingLabDeleteBasketResponse>>;
1802
+ /**
1803
+ * Look up UK addresses by postcode via Ordnance Survey
1804
+ * @param postcode - UK postcode
1805
+ * @param clientToken - Client token for authentication
1806
+ */
1807
+ getOrdnanceAddressLookup(postcode: string, clientToken: string): Promise<ApiResponse<OrdnanceAddressLookupResponse>>;
1734
1808
  }
1735
1809
  /**
1736
1810
  * Create a new BookingLab client instance
@@ -2208,5 +2282,12 @@ declare function useBookingLabCheckoutBasket(): _tanstack_react_query.UseMutatio
2208
2282
  declare function useBookingLabDeleteBasket(): _tanstack_react_query.UseMutationResult<BookingLabDeleteBasketResponse, Error, {
2209
2283
  headers: BookingLabDeleteBasketHeaders;
2210
2284
  }, unknown>;
2285
+ /**
2286
+ * Hook for looking up UK addresses by postcode via Ordnance Survey (BookingLab)
2287
+ * @param postcode - UK postcode
2288
+ * @param clientToken - Client token for authentication
2289
+ * @param enabled - Whether the query should run
2290
+ */
2291
+ declare function useOrdnanceAddressLookup(postcode: string, clientToken: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<OrdnanceAddressLookupResponse, Error>;
2211
2292
 
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 };
2293
+ 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;