@surfiran/public-api-client 0.5.0 → 0.11.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/dist/client.d.ts +10 -1
- package/dist/client.js +11 -0
- package/dist/generated/public-api-v1.d.ts +5 -5
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +165 -24
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GetPublicSearchSuggestionsParams, GetPublicSitemapParams, GetPublicTravelKnowledgeParams, ListPublicDeparturesParams, ListPublicDestinationsParams, ListPublicTourAccommodationsParams, ListPublicTourAvailabilityParams, ListPublicTourCategoriesParams, ListPublicTourExperiencesParams, ListPublicTravellerStoriesParams, ListPublicTourQuestionsParams, ListPublicTourReviewsParams, ListPublicTourItineraryParams, ListPublicTourRouteParams, ListPublicToursParams, PublicApiResult, PublicAvailabilityListResponse, PublicBookingIntentRequest, PublicBookingIntentResponse, PublicBrochureLeadRequest, PublicBrochureLeadResponse, PublicDepartureListResponse, PublicDestinationDetailResponse, PublicDestinationListResponse, PublicHomepageResponse, PublicInquiryRequest, PublicInquiryResponse, PublicSearchSuggestionsResponse, PublicSitemapResponse, PublicSiteChromeContentResponse, PublicSiteFeaturesResponse, PublicSiteHomeContentResponse, PublicSiteNavigationResponse, PublicSiteTrustPageContentResponse, PublicTourAccommodationListResponse, PublicTourCategoryListResponse, PublicTourDetailResponse, PublicTourExperienceListResponse, PublicTravellerStoryListResponse, PublicTourListResponse, PublicTourQuestionListResponse, PublicTourReviewsSummaryResponse, PublicTourReviewListResponse, PublicTourItineraryResponse, PublicTourRouteResponse, PublicTravelKnowledgeResponse, PublicTravelStatusResponse } from './types.js';
|
|
1
|
+
import type { GetPublicSearchSuggestionsParams, GetPublicSitemapParams, GetPublicTourPreviewParams, GetPublicTravelKnowledgeParams, ListPublicDeparturesParams, ListPublicDestinationsParams, ListPublicTourAccommodationsParams, ListPublicTourAvailabilityParams, ListPublicTourCategoriesParams, ListPublicTourExperiencesParams, ListPublicTravellerStoriesParams, ListPublicTourQuestionsParams, ListPublicTourReviewsParams, ListPublicTourItineraryParams, ListPublicTourRouteParams, ListPublicToursParams, PublicApiResult, PublicAvailabilityListResponse, PublicBookingIntentRequest, PublicBookingIntentResponse, PublicBrochureLeadRequest, PublicBrochureLeadResponse, PublicDepartureListResponse, PublicDestinationDetailResponse, PublicDestinationListResponse, PublicHomepageResponse, PublicInquiryRequest, PublicInquiryResponse, PublicSearchSuggestionsResponse, PublicSitemapResponse, PublicSiteChromeContentResponse, PublicSiteFeaturesResponse, PublicSiteHomeContentResponse, PublicSiteNavigationResponse, PublicSiteTrustPageContentResponse, PublicTourAccommodationListResponse, PublicTourCategoryListResponse, PublicTourDetailResponse, PublicTourExperienceListResponse, PublicTravellerStoryListResponse, PublicTourListResponse, PublicTourQuestionListResponse, PublicTourReviewsSummaryResponse, PublicTourReviewListResponse, PublicTourItineraryResponse, PublicTourRouteResponse, PublicTravelKnowledgeResponse, PublicTravelStatusResponse } from './types.js';
|
|
2
2
|
export type PublicApiClientOptions = {
|
|
3
3
|
baseUrl: string;
|
|
4
4
|
fetchImpl?: typeof fetch;
|
|
@@ -13,6 +13,15 @@ export type PublicApiClientOptions = {
|
|
|
13
13
|
export declare const createPublicApiClient: (options: PublicApiClientOptions) => {
|
|
14
14
|
listPublicTours(params?: ListPublicToursParams): Promise<PublicApiResult<PublicTourListResponse>>;
|
|
15
15
|
getPublicTourBySlug(slug: string): Promise<PublicApiResult<PublicTourDetailResponse>>;
|
|
16
|
+
/**
|
|
17
|
+
* ADR-0022 Tour Product/Edition MVP candidate preview: renders the same
|
|
18
|
+
* public-safe DTO as getPublicTourBySlug, with the Edition-sourced
|
|
19
|
+
* fields overlaid from an unpublished candidate instead of the currently
|
|
20
|
+
* live manifest. `token` is a short-lived signed token minted by the
|
|
21
|
+
* CRM, required (not optional, unlike this client's other params
|
|
22
|
+
* objects) — there is no unauthenticated variant of this call.
|
|
23
|
+
*/
|
|
24
|
+
getPublicTourPreviewBySlug(slug: string, params: GetPublicTourPreviewParams): Promise<PublicApiResult<PublicTourDetailResponse>>;
|
|
16
25
|
listPublicTourDepartures(slug: string, params?: ListPublicDeparturesParams): Promise<PublicApiResult<PublicDepartureListResponse>>;
|
|
17
26
|
listPublicTourQuestions(slug: string, params?: ListPublicTourQuestionsParams): Promise<PublicApiResult<PublicTourQuestionListResponse>>;
|
|
18
27
|
listPublicTourExperiences(slug: string, params?: ListPublicTourExperiencesParams): Promise<PublicApiResult<PublicTourExperienceListResponse>>;
|
package/dist/client.js
CHANGED
|
@@ -161,6 +161,17 @@ export const createPublicApiClient = (options) => {
|
|
|
161
161
|
getPublicTourBySlug(slug) {
|
|
162
162
|
return requestJson(`${baseUrl}/api/v1/tours/${encodeURIComponent(slug)}`, options);
|
|
163
163
|
},
|
|
164
|
+
/**
|
|
165
|
+
* ADR-0022 Tour Product/Edition MVP candidate preview: renders the same
|
|
166
|
+
* public-safe DTO as getPublicTourBySlug, with the Edition-sourced
|
|
167
|
+
* fields overlaid from an unpublished candidate instead of the currently
|
|
168
|
+
* live manifest. `token` is a short-lived signed token minted by the
|
|
169
|
+
* CRM, required (not optional, unlike this client's other params
|
|
170
|
+
* objects) — there is no unauthenticated variant of this call.
|
|
171
|
+
*/
|
|
172
|
+
getPublicTourPreviewBySlug(slug, params) {
|
|
173
|
+
return requestJson(`${baseUrl}/api/v1/tours/${encodeURIComponent(slug)}/preview?token=${encodeURIComponent(params.token)}`, options);
|
|
174
|
+
},
|
|
164
175
|
listPublicTourDepartures(slug, params) {
|
|
165
176
|
return requestJson(`${baseUrl}/api/v1/tours/${encodeURIComponent(slug)}/departures${toPaginationQueryString(params)}`, options);
|
|
166
177
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type GeneratedPublicApiVersion = '0.9.0';
|
|
2
|
-
export type GeneratedPublicApiPath = '/booking-intents' | '/booking-intents/{id}' | '/brochure-leads' | '/destinations' | '/destinations/{slug}' | '/homepage' | '/inquiries' | '/search-suggestions' | '/site-content/about' | '/site-content/accessibility-statement' | '/site-content/booking-cancellation-policy' | '/site-content/contact' | '/site-content/cookie-policy' | '/site-content/faqs' | '/site-content/footer' | '/site-content/header' | '/site-content/health-safety-support' | '/site-content/home' | '/site-content/iran-travel-status' | '/site-content/iran-visa-information' | '/site-content/money-in-iran' | '/site-content/privacy' | '/site-content/responsible-travel' | '/site-content/terms' | '/site-content/travel-insurance' | '/site-features' | '/site-navigation' | '/sitemap' | '/tour-categories' | '/tours' | '/tours/{slug}' | '/tours/{slug}/accommodations' | '/tours/{slug}/availability' | '/tours/{slug}/departures' | '/tours/{slug}/experiences' | '/tours/{slug}/itinerary' | '/tours/{slug}/questions' | '/tours/{slug}/reviews' | '/tours/{slug}/reviews-summary' | '/tours/{slug}/route' | '/travel-knowledge' | '/travel-status' | '/traveller-stories';
|
|
3
|
-
export type GeneratedPublicApiOperation = 'GET /booking-intents/{id}' | 'GET /destinations' | 'GET /destinations/{slug}' | 'GET /homepage' | 'GET /search-suggestions' | 'GET /site-content/about' | 'GET /site-content/accessibility-statement' | 'GET /site-content/booking-cancellation-policy' | 'GET /site-content/contact' | 'GET /site-content/cookie-policy' | 'GET /site-content/faqs' | 'GET /site-content/footer' | 'GET /site-content/header' | 'GET /site-content/health-safety-support' | 'GET /site-content/home' | 'GET /site-content/iran-travel-status' | 'GET /site-content/iran-visa-information' | 'GET /site-content/money-in-iran' | 'GET /site-content/privacy' | 'GET /site-content/responsible-travel' | 'GET /site-content/terms' | 'GET /site-content/travel-insurance' | 'GET /site-features' | 'GET /site-navigation' | 'GET /sitemap' | 'GET /tour-categories' | 'GET /tours' | 'GET /tours/{slug}' | 'GET /tours/{slug}/accommodations' | 'GET /tours/{slug}/availability' | 'GET /tours/{slug}/departures' | 'GET /tours/{slug}/experiences' | 'GET /tours/{slug}/itinerary' | 'GET /tours/{slug}/questions' | 'GET /tours/{slug}/reviews' | 'GET /tours/{slug}/reviews-summary' | 'GET /tours/{slug}/route' | 'GET /travel-knowledge' | 'GET /travel-status' | 'GET /traveller-stories' | 'POST /booking-intents' | 'POST /brochure-leads' | 'POST /inquiries';
|
|
4
|
-
export type GeneratedPublicApiActiveOperation = 'GET /destinations' | 'GET /destinations/{slug}' | 'GET /homepage' | 'GET /search-suggestions' | 'GET /site-content/about' | 'GET /site-content/accessibility-statement' | 'GET /site-content/booking-cancellation-policy' | 'GET /site-content/contact' | 'GET /site-content/cookie-policy' | 'GET /site-content/faqs' | 'GET /site-content/footer' | 'GET /site-content/header' | 'GET /site-content/health-safety-support' | 'GET /site-content/home' | 'GET /site-content/iran-travel-status' | 'GET /site-content/iran-visa-information' | 'GET /site-content/money-in-iran' | 'GET /site-content/privacy' | 'GET /site-content/responsible-travel' | 'GET /site-content/terms' | 'GET /site-content/travel-insurance' | 'GET /site-features' | 'GET /site-navigation' | 'GET /sitemap' | 'GET /tour-categories' | 'GET /tours' | 'GET /tours/{slug}' | 'GET /tours/{slug}/accommodations' | 'GET /tours/{slug}/availability' | 'GET /tours/{slug}/departures' | 'GET /tours/{slug}/experiences' | 'GET /tours/{slug}/itinerary' | 'GET /tours/{slug}/questions' | 'GET /tours/{slug}/reviews' | 'GET /tours/{slug}/reviews-summary' | 'GET /tours/{slug}/route' | 'GET /travel-knowledge' | 'GET /travel-status' | 'GET /traveller-stories' | 'POST /booking-intents' | 'POST /brochure-leads' | 'POST /inquiries';
|
|
2
|
+
export type GeneratedPublicApiPath = '/booking-intents' | '/booking-intents/{id}' | '/brochure-leads' | '/destinations' | '/destinations/{slug}' | '/homepage' | '/inquiries' | '/search-suggestions' | '/site-content/about' | '/site-content/accessibility-statement' | '/site-content/booking-cancellation-policy' | '/site-content/contact' | '/site-content/cookie-policy' | '/site-content/faqs' | '/site-content/footer' | '/site-content/header' | '/site-content/health-safety-support' | '/site-content/home' | '/site-content/iran-travel-status' | '/site-content/iran-visa-information' | '/site-content/money-in-iran' | '/site-content/privacy' | '/site-content/responsible-travel' | '/site-content/terms' | '/site-content/travel-insurance' | '/site-features' | '/site-navigation' | '/sitemap' | '/tour-categories' | '/tours' | '/tours/{slug}' | '/tours/{slug}/accommodations' | '/tours/{slug}/availability' | '/tours/{slug}/departures' | '/tours/{slug}/experiences' | '/tours/{slug}/itinerary' | '/tours/{slug}/preview' | '/tours/{slug}/questions' | '/tours/{slug}/reviews' | '/tours/{slug}/reviews-summary' | '/tours/{slug}/route' | '/travel-knowledge' | '/travel-status' | '/traveller-stories';
|
|
3
|
+
export type GeneratedPublicApiOperation = 'GET /booking-intents/{id}' | 'GET /destinations' | 'GET /destinations/{slug}' | 'GET /homepage' | 'GET /search-suggestions' | 'GET /site-content/about' | 'GET /site-content/accessibility-statement' | 'GET /site-content/booking-cancellation-policy' | 'GET /site-content/contact' | 'GET /site-content/cookie-policy' | 'GET /site-content/faqs' | 'GET /site-content/footer' | 'GET /site-content/header' | 'GET /site-content/health-safety-support' | 'GET /site-content/home' | 'GET /site-content/iran-travel-status' | 'GET /site-content/iran-visa-information' | 'GET /site-content/money-in-iran' | 'GET /site-content/privacy' | 'GET /site-content/responsible-travel' | 'GET /site-content/terms' | 'GET /site-content/travel-insurance' | 'GET /site-features' | 'GET /site-navigation' | 'GET /sitemap' | 'GET /tour-categories' | 'GET /tours' | 'GET /tours/{slug}' | 'GET /tours/{slug}/accommodations' | 'GET /tours/{slug}/availability' | 'GET /tours/{slug}/departures' | 'GET /tours/{slug}/experiences' | 'GET /tours/{slug}/itinerary' | 'GET /tours/{slug}/preview' | 'GET /tours/{slug}/questions' | 'GET /tours/{slug}/reviews' | 'GET /tours/{slug}/reviews-summary' | 'GET /tours/{slug}/route' | 'GET /travel-knowledge' | 'GET /travel-status' | 'GET /traveller-stories' | 'POST /booking-intents' | 'POST /brochure-leads' | 'POST /inquiries';
|
|
4
|
+
export type GeneratedPublicApiActiveOperation = 'GET /destinations' | 'GET /destinations/{slug}' | 'GET /homepage' | 'GET /search-suggestions' | 'GET /site-content/about' | 'GET /site-content/accessibility-statement' | 'GET /site-content/booking-cancellation-policy' | 'GET /site-content/contact' | 'GET /site-content/cookie-policy' | 'GET /site-content/faqs' | 'GET /site-content/footer' | 'GET /site-content/header' | 'GET /site-content/health-safety-support' | 'GET /site-content/home' | 'GET /site-content/iran-travel-status' | 'GET /site-content/iran-visa-information' | 'GET /site-content/money-in-iran' | 'GET /site-content/privacy' | 'GET /site-content/responsible-travel' | 'GET /site-content/terms' | 'GET /site-content/travel-insurance' | 'GET /site-features' | 'GET /site-navigation' | 'GET /sitemap' | 'GET /tour-categories' | 'GET /tours' | 'GET /tours/{slug}' | 'GET /tours/{slug}/accommodations' | 'GET /tours/{slug}/availability' | 'GET /tours/{slug}/departures' | 'GET /tours/{slug}/experiences' | 'GET /tours/{slug}/itinerary' | 'GET /tours/{slug}/preview' | 'GET /tours/{slug}/questions' | 'GET /tours/{slug}/reviews' | 'GET /tours/{slug}/reviews-summary' | 'GET /tours/{slug}/route' | 'GET /travel-knowledge' | 'GET /travel-status' | 'GET /traveller-stories' | 'POST /booking-intents' | 'POST /brochure-leads' | 'POST /inquiries';
|
|
5
5
|
export type GeneratedPublicApiBlockedOperation = 'GET /booking-intents/{id}';
|
|
6
|
-
export type GeneratedPublicApiOperationId = 'getBookingIntent' | 'listPublicDestinations' | 'getPublicDestinationBySlug' | 'getPublicHomepage' | 'getPublicSearchSuggestions' | 'getPublicSiteContentAbout' | 'getPublicSiteContentAccessibilityStatement' | 'getPublicSiteContentBookingCancellationPolicy' | 'getPublicSiteContentContact' | 'getPublicSiteContentCookiePolicy' | 'getPublicSiteContentFaqs' | 'getPublicSiteContentFooter' | 'getPublicSiteContentHeader' | 'getPublicSiteContentHealthSafetySupport' | 'getPublicSiteContentHome' | 'getPublicSiteContentIranTravelStatus' | 'getPublicSiteContentIranVisaInformation' | 'getPublicSiteContentMoneyInIran' | 'getPublicSiteContentPrivacy' | 'getPublicSiteContentResponsibleTravel' | 'getPublicSiteContentTerms' | 'getPublicSiteContentTravelInsurance' | 'getPublicSiteFeatures' | 'getPublicSiteNavigation' | 'getPublicSitemap' | 'listPublicTourCategories' | 'listPublicTours' | 'getPublicTourBySlug' | 'listPublicTourAccommodations' | 'listPublicTourAvailability' | 'listPublicTourDepartures' | 'listPublicTourExperiences' | 'listPublicTourItinerary' | 'listPublicTourQuestions' | 'listPublicTourReviews' | 'getPublicTourReviewsSummary' | 'listPublicTourRoute' | 'listPublicTravelKnowledge' | 'getPublicTravelStatus' | 'listPublicTravellerStories' | 'createPublicBookingIntent' | 'createPublicBrochureLead' | 'createPublicInquiry';
|
|
7
|
-
export type GeneratedPublicApiSchemaName = 'BookingIntentConflictErrorResponse' | 'BookingIntentResponse' | 'CreateBookingIntentRequest' | 'CreateBookingIntentSuccessResponse' | 'CreateBrochureLeadRequest' | 'CreateBrochureLeadResponse' | 'CreateInquiryRequest' | 'CreateInquiryResponse' | 'GetBookingIntentStatusResponse' | 'PaginationMeta' | 'PublicApiAbuseBlockedError' | 'PublicApiError' | 'PublicApiInternalError' | 'PublicApiNotFoundError' | 'PublicApiNotImplementedError' | 'PublicApiRateLimitError' | 'PublicApiTravelStatusUnavailableError' | 'PublicApiValidationError' | 'PublicAvailabilityListItem' | 'PublicAvailabilityListResponse' | 'PublicBookingIntentLinks' | 'PublicBookingIntentPublicStatus' | 'PublicBookingIntentStatus' | 'PublicDepartureListItem' | 'PublicDepartureListResponse' | 'PublicDestinationDetail' | 'PublicDestinationDetailResponse' | 'PublicDestinationListItem' | 'PublicDestinationListResponse' | 'PublicError' | 'PublicErrorEnvelope' | 'PublicHomepageResponse' | 'PublicHomepageSeo' | 'PublicHomepageStats' | 'PublicNavLink' | 'PublicOfficialSourceCard' | 'PublicSearchSuggestion' | 'PublicSearchSuggestionsResponse' | 'PublicSeo' | 'PublicSiteChromeContent' | 'PublicSiteChromeContentResponse' | 'PublicSiteCta' | 'PublicSiteFeaturesResponse' | 'PublicSiteFeatureStates' | 'PublicSiteHomeContent' | 'PublicSiteHomeContentResponse' | 'PublicSiteHomeSection' | 'PublicSitemapEntry' | 'PublicSitemapResponse' | 'PublicSiteNavigationResponse' | 'PublicSiteNavItem' | 'PublicSiteRouteKey' | 'PublicSiteSocialLink' | 'PublicSiteTrustPageContent' | 'PublicSiteTrustPageContentResponse' | 'PublicSiteTrustPageSeo' | 'PublicSiteTrustSection' | 'PublicSiteTrustTitledItem' | 'PublicStaticLink' | 'PublicSurfiranOperationalUpdate' | 'PublicTourAccommodationListItem' | 'PublicTourAccommodationListResponse' | 'PublicTourCategoryListItem' | 'PublicTourCategoryListResponse' | 'PublicTourDetail' | 'PublicTourDetailEditorial' | 'PublicTourDetailResponse' | 'PublicTourExperienceFrame' | 'PublicTourExperienceListItem' | 'PublicTourExperienceListResponse' | 'PublicTourItineraryDay' | 'PublicTourItineraryResponse' | 'PublicTourListItem' | 'PublicTourListResponse' | 'PublicTourQuestionListItem' | 'PublicTourQuestionListResponse' | 'PublicTourRatingBreakdownItem' | 'PublicTourReviewListItem' | 'PublicTourReviewListResponse' | 'PublicTourReviewsAggregate' | 'PublicTourReviewsSummary' | 'PublicTourReviewsSummaryResponse' | 'PublicTourRouteResponse' | 'PublicTourRouteStop' | 'PublicTravelKnowledgeItem' | 'PublicTravelKnowledgeResponse' | 'PublicTravellerStoryListItem' | 'PublicTravellerStoryListResponse' | 'PublicTravelStatusCorrectionNotice' | 'PublicTravelStatusFreshness' | 'PublicTravelStatusHandoff' | 'PublicTravelStatusResponse' | 'PublicTravelStatusReviewerLabel' | 'PublicTravelStatusSection' | 'PublicTravelStatusState';
|
|
6
|
+
export type GeneratedPublicApiOperationId = 'getBookingIntent' | 'listPublicDestinations' | 'getPublicDestinationBySlug' | 'getPublicHomepage' | 'getPublicSearchSuggestions' | 'getPublicSiteContentAbout' | 'getPublicSiteContentAccessibilityStatement' | 'getPublicSiteContentBookingCancellationPolicy' | 'getPublicSiteContentContact' | 'getPublicSiteContentCookiePolicy' | 'getPublicSiteContentFaqs' | 'getPublicSiteContentFooter' | 'getPublicSiteContentHeader' | 'getPublicSiteContentHealthSafetySupport' | 'getPublicSiteContentHome' | 'getPublicSiteContentIranTravelStatus' | 'getPublicSiteContentIranVisaInformation' | 'getPublicSiteContentMoneyInIran' | 'getPublicSiteContentPrivacy' | 'getPublicSiteContentResponsibleTravel' | 'getPublicSiteContentTerms' | 'getPublicSiteContentTravelInsurance' | 'getPublicSiteFeatures' | 'getPublicSiteNavigation' | 'getPublicSitemap' | 'listPublicTourCategories' | 'listPublicTours' | 'getPublicTourBySlug' | 'listPublicTourAccommodations' | 'listPublicTourAvailability' | 'listPublicTourDepartures' | 'listPublicTourExperiences' | 'listPublicTourItinerary' | 'getPublicTourPreviewBySlug' | 'listPublicTourQuestions' | 'listPublicTourReviews' | 'getPublicTourReviewsSummary' | 'listPublicTourRoute' | 'listPublicTravelKnowledge' | 'getPublicTravelStatus' | 'listPublicTravellerStories' | 'createPublicBookingIntent' | 'createPublicBrochureLead' | 'createPublicInquiry';
|
|
7
|
+
export type GeneratedPublicApiSchemaName = 'BookingIntentConflictErrorResponse' | 'BookingIntentResponse' | 'CanonicalIntakeAttribution' | 'CanonicalIntakeConsent' | 'CreateBookingIntentRequest' | 'CreateBookingIntentSuccessResponse' | 'CreateBrochureLeadRequest' | 'CreateBrochureLeadResponse' | 'CreateInquiryRequest' | 'CreateInquiryResponse' | 'GetBookingIntentStatusResponse' | 'PaginationMeta' | 'PublicApiAbuseBlockedError' | 'PublicApiError' | 'PublicApiInternalError' | 'PublicApiNotFoundError' | 'PublicApiNotImplementedError' | 'PublicApiRateLimitError' | 'PublicApiTravelStatusUnavailableError' | 'PublicApiValidationError' | 'PublicAvailabilityListItem' | 'PublicAvailabilityListResponse' | 'PublicBookingIntentLinks' | 'PublicBookingIntentPublicStatus' | 'PublicBookingIntentStatus' | 'PublicDepartureListItem' | 'PublicDepartureListResponse' | 'PublicDestinationDetail' | 'PublicDestinationDetailResponse' | 'PublicDestinationListItem' | 'PublicDestinationListResponse' | 'PublicError' | 'PublicErrorEnvelope' | 'PublicHomepageResponse' | 'PublicHomepageSeo' | 'PublicHomepageStats' | 'PublicNavLink' | 'PublicOfficialSourceCard' | 'PublicSearchSuggestion' | 'PublicSearchSuggestionsResponse' | 'PublicSeo' | 'PublicSiteChromeContent' | 'PublicSiteChromeContentResponse' | 'PublicSiteCta' | 'PublicSiteFeaturesResponse' | 'PublicSiteFeatureStates' | 'PublicSiteHomeContent' | 'PublicSiteHomeContentResponse' | 'PublicSiteHomeSection' | 'PublicSitemapEntry' | 'PublicSitemapResponse' | 'PublicSiteNavigationResponse' | 'PublicSiteNavItem' | 'PublicSiteRouteKey' | 'PublicSiteSocialLink' | 'PublicSiteTrustPageContent' | 'PublicSiteTrustPageContentResponse' | 'PublicSiteTrustPageSeo' | 'PublicSiteTrustSection' | 'PublicSiteTrustTitledItem' | 'PublicStaticLink' | 'PublicSurfiranOperationalUpdate' | 'PublicTourAccommodationListItem' | 'PublicTourAccommodationListResponse' | 'PublicTourCategoryListItem' | 'PublicTourCategoryListResponse' | 'PublicTourDetail' | 'PublicTourDetailEditorial' | 'PublicTourDetailResponse' | 'PublicTourExperienceFrame' | 'PublicTourExperienceListItem' | 'PublicTourExperienceListResponse' | 'PublicTourItineraryDay' | 'PublicTourItineraryResponse' | 'PublicTourListItem' | 'PublicTourListResponse' | 'PublicTourQuestionListItem' | 'PublicTourQuestionListResponse' | 'PublicTourRatingBreakdownItem' | 'PublicTourReviewListItem' | 'PublicTourReviewListResponse' | 'PublicTourReviewsAggregate' | 'PublicTourReviewsSummary' | 'PublicTourReviewsSummaryResponse' | 'PublicTourRouteResponse' | 'PublicTourRouteStop' | 'PublicTourTailorJourney' | 'PublicTravelKnowledgeItem' | 'PublicTravelKnowledgeResponse' | 'PublicTravellerStoryListItem' | 'PublicTravellerStoryListResponse' | 'PublicTravelStatusCorrectionNotice' | 'PublicTravelStatusFreshness' | 'PublicTravelStatusHandoff' | 'PublicTravelStatusResponse' | 'PublicTravelStatusReviewerLabel' | 'PublicTravelStatusSection' | 'PublicTravelStatusState';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { createPublicApiClient } from './client.js';
|
|
2
|
-
export type { PublicApiErrorCode, PublicApiV1Path, PublicApiV1RouteMap, PublicError, PublicErrorEnvelope, PublicApiError, PublicApiNotImplementedError, PublicApiValidationError, PublicApiRateLimitError, PublicApiAbuseBlockedError, PublicTourListItem, PublicTourDetail, PublicTourDetailEditorial, PublicDepartureListItem, PublicAvailabilityStatus, PublicAvailabilityListItem, PublicAvailabilityListResponse, PublicDestinationListItem, PublicDestinationDetail, PublicTourListResponse, PublicTourDetailResponse, PublicDepartureListResponse, PublicDestinationListResponse, PublicDestinationDetailResponse, PublicApiResult, ListPublicToursParams, ListPublicDeparturesParams, ListPublicTourAvailabilityParams, ListPublicDestinationsParams, PublicInquiryRequest, PublicInquiryResponse, PublicBookingIntentRequest, PublicBookingIntentData, PublicBookingIntentResponse, PublicHomepageStats, PublicHomepageSeo, PublicHomepageResponse, PublicSitemapEntry, PublicSitemapResponse, PublicNavLink, PublicStaticLink, PublicSiteNavigationResponse, PublicTourCategoryListItem, PublicTourCategoryListResponse, PublicSearchSuggestion, PublicSearchSuggestionsResponse, PublicSiteRouteKey, PublicSiteCta, PublicSiteHomeSectionType, PublicSiteHomeSection, PublicSiteHomeContent, PublicSiteHomeContentResponse, PublicSiteNavItem, PublicSiteSocialPlatform, PublicSiteSocialLink, PublicSiteChromeContent, PublicSiteChromeContentResponse, PublicSiteFeatureStates, PublicSiteFeaturesResponse, PublicSiteTrustSectionType, PublicSiteTrustTitledItem, PublicSiteTrustParagraphGroup, PublicSiteTrustTitledItemList, PublicSiteTrustBulletList, PublicSiteTrustSection, PublicSiteTrustPageSeo, PublicSiteTrustPageContent, PublicSiteTrustPageContentResponse, PublicTravelStatusState, PublicTravelStatusFreshness, PublicSurfiranOperationalUpdate, PublicTravelStatusResponse, PublicTravelKnowledgeType, PublicTravelKnowledgeItem, PublicTravelKnowledgeResponse, GetPublicSitemapParams, GetPublicSearchSuggestionsParams, GetPublicTravelKnowledgeParams, ListPublicTourCategoriesParams, PublicTravellerStoryListItem, PublicTravellerStoryListResponse, ListPublicTravellerStoriesParams, PublicTourQuestionListItem, PublicTourQuestionListResponse, ListPublicTourQuestionsParams, PublicTourExperienceFrame, PublicTourExperienceListItem, PublicTourExperienceListResponse, ListPublicTourExperiencesParams, PublicTourAccommodationListItem, PublicTourAccommodationListResponse, ListPublicTourAccommodationsParams, PublicTourReviewsAggregate, PublicTourRatingBreakdownItem, PublicTourReviewsSummary, PublicTourReviewsSummaryResponse, PublicTourReviewListItem, PublicTourReviewListResponse, PublicTourReviewsLimit, ListPublicTourReviewsParams, PublicTourRouteStop, PublicTourRouteResponse, ListPublicTourRouteParams, PublicItineraryMealCode, PublicTourItineraryDay, PublicTourItineraryResponse, ListPublicTourItineraryParams, PublicBrochureLeadRequest, PublicBrochureLeadResponse, } from './types.js';
|
|
2
|
+
export type { PublicApiErrorCode, PublicApiV1Path, PublicApiV1RouteMap, PublicError, PublicErrorEnvelope, PublicApiError, PublicApiNotImplementedError, PublicApiValidationError, PublicApiRateLimitError, PublicApiAbuseBlockedError, PublicTourListItem, PublicTourDetail, PublicTourDetailEditorial, PublicDepartureListItem, PublicAvailabilityStatus, PublicAvailabilityListItem, PublicAvailabilityListResponse, PublicDestinationListItem, PublicDestinationDetail, PublicTourListResponse, PublicTourDetailResponse, PublicDepartureListResponse, PublicDestinationListResponse, PublicDestinationDetailResponse, PublicApiResult, ListPublicToursParams, GetPublicTourPreviewParams, ListPublicDeparturesParams, ListPublicTourAvailabilityParams, ListPublicDestinationsParams, PublicInquiryRequest, PublicTourTailorJourney, PublicInquiryResponse, PublicBookingIntentRequest, PublicBookingIntentData, PublicBookingIntentResponse, PublicHomepageStats, PublicHomepageSeo, PublicHomepageResponse, PublicSitemapEntry, PublicSitemapResponse, PublicNavLink, PublicStaticLink, PublicSiteNavigationResponse, PublicTourCategoryListItem, PublicTourCategoryListResponse, PublicSearchSuggestion, PublicSearchSuggestionsResponse, PublicSiteRouteKey, PublicSiteCta, PublicSiteHomeSectionType, PublicSiteHomeSection, PublicSiteHomeContent, PublicSiteHomeContentResponse, PublicSiteNavItem, PublicSiteSocialPlatform, PublicSiteSocialLink, PublicSiteChromeContent, PublicSiteChromeContentResponse, PublicSiteFeatureStates, PublicSiteFeaturesResponse, PublicSiteTrustSectionType, PublicSiteTrustTitledItem, PublicSiteTrustParagraphGroup, PublicSiteTrustTitledItemList, PublicSiteTrustBulletList, PublicSiteTrustSection, PublicSiteTrustPageSeo, PublicSiteTrustPageContent, PublicSiteTrustPageContentResponse, PublicTravelStatusState, PublicTravelStatusFreshness, PublicSurfiranOperationalUpdate, PublicTravelStatusResponse, PublicTravelKnowledgeType, PublicTravelKnowledgeItem, PublicTravelKnowledgeResponse, GetPublicSitemapParams, GetPublicSearchSuggestionsParams, GetPublicTravelKnowledgeParams, ListPublicTourCategoriesParams, PublicTravellerStoryListItem, PublicTravellerStoryListResponse, ListPublicTravellerStoriesParams, PublicTourQuestionListItem, PublicTourQuestionListResponse, ListPublicTourQuestionsParams, PublicTourExperienceFrame, PublicTourExperienceListItem, PublicTourExperienceListResponse, ListPublicTourExperiencesParams, PublicTourAccommodationListItem, PublicTourAccommodationListResponse, ListPublicTourAccommodationsParams, PublicTourReviewsAggregate, PublicTourRatingBreakdownItem, PublicTourReviewsSummary, PublicTourReviewsSummaryResponse, PublicTourReviewListItem, PublicTourReviewListResponse, PublicTourReviewsLimit, ListPublicTourReviewsParams, PublicTourRouteStop, PublicTourRouteResponse, ListPublicTourRouteParams, PublicItineraryMealCode, PublicTourItineraryDay, PublicTourItineraryResponse, ListPublicTourItineraryParams, PublicBrochureLeadRequest, PublicBrochureLeadResponse, } from './types.js';
|
|
3
3
|
export type { PublicApiClientOptions } from './client.js';
|
|
4
4
|
export type { GeneratedPublicApiVersion, GeneratedPublicApiPath, GeneratedPublicApiOperation, GeneratedPublicApiActiveOperation, GeneratedPublicApiBlockedOperation, GeneratedPublicApiOperationId, GeneratedPublicApiSchemaName, } from './generated/public-api-v1.js';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type PublicApiErrorCode = 'PUBLIC_API_ROUTE_NOT_IMPLEMENTED' | 'PUBLIC_API_INTERNAL_ERROR' | 'PUBLIC_API_TOUR_NOT_FOUND' | 'PUBLIC_API_DESTINATION_NOT_FOUND' | 'PUBLIC_API_INVALID_QUERY' | 'PUBLIC_API_BOOKING_INTENT_VALIDATION_ERROR' | 'PUBLIC_API_IDEMPOTENCY_CONFLICT' | 'PUBLIC_API_RATE_LIMITED' | 'PUBLIC_API_ABUSE_BLOCKED' | 'PUBLIC_API_TRAVEL_STATUS_UNAVAILABLE' | 'PUBLIC_API_SITE_CONTENT_UNAVAILABLE' | 'PUBLIC_API_CLIENT_TIMEOUT';
|
|
2
|
-
export type PublicApiV1Path = '/homepage' | '/site-navigation' | '/site-features' | '/sitemap' | '/search-suggestions' | '/tour-categories' | '/tours' | '/tours/{slug}' | '/tours/{slug}/departures' | '/tours/{slug}/availability' | '/tours/{slug}/reviews' | '/destinations' | '/destinations/{slug}' | '/inquiries' | '/booking-intents' | '/travel-status' | '/travel-knowledge' | '/site-content/home' | '/site-content/header' | '/site-content/footer' | '/site-content/about' | '/site-content/contact' | '/site-content/faqs' | '/site-content/privacy' | '/site-content/terms' | '/site-content/responsible-travel' | '/site-content/iran-travel-status' | '/site-content/iran-visa-information' | '/site-content/money-in-iran' | '/site-content/travel-insurance' | '/site-content/health-safety-support' | '/site-content/booking-cancellation-policy' | '/site-content/cookie-policy' | '/site-content/accessibility-statement';
|
|
2
|
+
export type PublicApiV1Path = '/homepage' | '/site-navigation' | '/site-features' | '/sitemap' | '/search-suggestions' | '/tour-categories' | '/tours' | '/tours/{slug}' | '/tours/{slug}/preview' | '/tours/{slug}/departures' | '/tours/{slug}/availability' | '/tours/{slug}/reviews' | '/destinations' | '/destinations/{slug}' | '/inquiries' | '/booking-intents' | '/travel-status' | '/travel-knowledge' | '/site-content/home' | '/site-content/header' | '/site-content/footer' | '/site-content/about' | '/site-content/contact' | '/site-content/faqs' | '/site-content/privacy' | '/site-content/terms' | '/site-content/responsible-travel' | '/site-content/iran-travel-status' | '/site-content/iran-visa-information' | '/site-content/money-in-iran' | '/site-content/travel-insurance' | '/site-content/health-safety-support' | '/site-content/booking-cancellation-policy' | '/site-content/cookie-policy' | '/site-content/accessibility-statement';
|
|
3
3
|
export type PublicError = {
|
|
4
4
|
code: string;
|
|
5
5
|
message: string;
|
|
@@ -92,33 +92,30 @@ export type PublicTourListItem = {
|
|
|
92
92
|
beyondIran?: boolean;
|
|
93
93
|
/**
|
|
94
94
|
* How this route is run — `"Small Group"` or `"Private"` — from
|
|
95
|
-
* `tour_packages.travel_format` (
|
|
96
|
-
* `20260804_tour_packages_travel_format.sql`,
|
|
97
|
-
*
|
|
98
|
-
* published, never a guessed default. Optional so a response
|
|
99
|
-
* before this field existed still typechecks. "Tailor-Made" is not
|
|
100
|
-
* here — it has no fixed tour to attach to; it is the `/inquire`
|
|
95
|
+
* `tour_packages.travel_format` (migration
|
|
96
|
+
* `20260804_tour_packages_travel_format.sql`, applied in production since
|
|
97
|
+
* 2026-08-27, so this carries a real value wherever staff have set one).
|
|
98
|
+
* Null means not published, never a guessed default. Optional so a response
|
|
99
|
+
* projected before this field existed still typechecks. "Tailor-Made" is not
|
|
100
|
+
* a value here — it has no fixed tour to attach to; it is the `/inquire`
|
|
101
|
+
* flow.
|
|
101
102
|
*/
|
|
102
103
|
travelFormat?: string | null;
|
|
103
104
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* `
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
105
|
+
* True when staff have flagged this tour as a "Signature Trip" from
|
|
106
|
+
* `tour_packages.is_signature` (draft migration
|
|
107
|
+
* `20260820_tour_packages_is_signature.sql`, not yet executed in
|
|
108
|
+
* production, so this is `false` for every tour today). Independent of the
|
|
109
|
+
* homepage's positional "Signature Iran Tours" grid, which does not read
|
|
110
|
+
* this column. Optional so a response projected before this field existed
|
|
111
|
+
* still typechecks; absent means false.
|
|
111
112
|
*/
|
|
113
|
+
isSignature?: boolean;
|
|
114
|
+
/** Reserved for future backend-verified historical price data. Currently always null. */
|
|
112
115
|
previousPriceDisplay?: string | null;
|
|
113
|
-
/**
|
|
114
|
-
* Staff-authored deal ribbon label (`tour_packages.deal_label`), e.g.
|
|
115
|
-
* `"−15% off"` or `"Sale"`. Null when no deal is published.
|
|
116
|
-
*/
|
|
116
|
+
/** Reserved for a future backend-verified promotion label. Currently always null. */
|
|
117
117
|
dealLabel?: string | null;
|
|
118
|
-
/**
|
|
119
|
-
* Staff-authored savings pill text (`tour_packages.savings_note`), e.g.
|
|
120
|
-
* `"Save €330 · booked by 31 Aug"`. Null when no deal is published.
|
|
121
|
-
*/
|
|
118
|
+
/** Reserved for future backend-verified savings copy. Currently always null. */
|
|
122
119
|
savingsNote?: string | null;
|
|
123
120
|
/**
|
|
124
121
|
* Published tour-level maximum group size (`tour_packages.max_group_size`),
|
|
@@ -128,6 +125,20 @@ export type PublicTourListItem = {
|
|
|
128
125
|
* published.
|
|
129
126
|
*/
|
|
130
127
|
maxGroupSize?: number | null;
|
|
128
|
+
/**
|
|
129
|
+
* Staff-authored city the tour begins in (`tour_packages.start_city`).
|
|
130
|
+
* Published so a curated value can override the endpoints the card otherwise
|
|
131
|
+
* derives from itinerary day objects, whose fallback reaches a day title when
|
|
132
|
+
* the day itself names no city. Null when unpublished — never backfilled and
|
|
133
|
+
* never guessed, so a consumer should fall back to its own derivation rather
|
|
134
|
+
* than treat null as "this tour has no start city".
|
|
135
|
+
*/
|
|
136
|
+
startCity?: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* Staff-authored city the tour ends in (`tour_packages.finish_city`). Same
|
|
139
|
+
* provenance and null semantics as `startCity`.
|
|
140
|
+
*/
|
|
141
|
+
finishCity?: string | null;
|
|
131
142
|
status: string;
|
|
132
143
|
updatedAt: string | null;
|
|
133
144
|
};
|
|
@@ -141,10 +152,37 @@ export type PublicTourDetail = PublicTourListItem & {
|
|
|
141
152
|
seoTitle: string | null;
|
|
142
153
|
seoDescription: string | null;
|
|
143
154
|
editorial?: PublicTourDetailEditorial | null;
|
|
155
|
+
/**
|
|
156
|
+
* Operator-configured "Tailor This Journey" call to action.
|
|
157
|
+
*
|
|
158
|
+
* Absent when no operator has configured the module for this tour, so a
|
|
159
|
+
* consumer keeps whatever default tailor-made hand-off it already renders.
|
|
160
|
+
* Present with `enabled: false` and no other field when an operator switched
|
|
161
|
+
* it off — that is the signal to render nothing for this tour.
|
|
162
|
+
*
|
|
163
|
+
* The call to action leads to a personalised-proposal inquiry only. It never
|
|
164
|
+
* represents a booking, reservation, inventory hold, price guarantee,
|
|
165
|
+
* payment, or confirmed departure.
|
|
166
|
+
*/
|
|
167
|
+
tailorThisJourney?: PublicTourTailorJourney;
|
|
168
|
+
/** Operator-curated related tours (PR-13 / OA-9), in the pinned order. Empty when none are pinned/published. */
|
|
169
|
+
relatedJourneys?: PublicTourListItem[];
|
|
170
|
+
};
|
|
171
|
+
export type PublicTourTailorJourney = {
|
|
172
|
+
enabled: boolean;
|
|
173
|
+
/** Canonical public slug of the source tour, for inquiry attribution. Present only when enabled. */
|
|
174
|
+
tourSlug?: string;
|
|
175
|
+
/** Operator override for the headline. Null means the consumer uses its own default copy. */
|
|
176
|
+
ctaTitle?: string | null;
|
|
177
|
+
/** Operator override for the supporting text. Null means the consumer uses its own default copy. */
|
|
178
|
+
ctaText?: string | null;
|
|
179
|
+
/** Published customisation prompts, in the operator's authored order. */
|
|
180
|
+
suggestedCustomizationOptions?: string[];
|
|
144
181
|
};
|
|
145
182
|
export type PublicTourDetailEditorial = {
|
|
146
183
|
tourType: string | null;
|
|
147
184
|
tourCode: string | null;
|
|
185
|
+
breadcrumbTitle: string | null;
|
|
148
186
|
authorName: string | null;
|
|
149
187
|
authorUrl: string | null;
|
|
150
188
|
authorRole: string | null;
|
|
@@ -172,6 +210,7 @@ export type PublicTourDetailEditorial = {
|
|
|
172
210
|
heroQuote: {
|
|
173
211
|
text: string;
|
|
174
212
|
authorName: string | null;
|
|
213
|
+
travelDate: string | null;
|
|
175
214
|
sourceUrl: string | null;
|
|
176
215
|
} | null;
|
|
177
216
|
payment?: {
|
|
@@ -196,6 +235,7 @@ export type PublicTourDetailEditorial = {
|
|
|
196
235
|
body: string;
|
|
197
236
|
ctaLabel: string | null;
|
|
198
237
|
href: string | null;
|
|
238
|
+
icon: 'info' | 'card' | 'shield' | 'globe' | 'people' | 'route' | null;
|
|
199
239
|
}>;
|
|
200
240
|
};
|
|
201
241
|
export type PublicDepartureListItem = {
|
|
@@ -471,20 +511,58 @@ export type PublicInquiryRequest = {
|
|
|
471
511
|
name: string;
|
|
472
512
|
email: string;
|
|
473
513
|
message: string;
|
|
514
|
+
/**
|
|
515
|
+
* Stable event identifier shared by the structured API submission and any
|
|
516
|
+
* transport fallback. The server creates one when an older client omits it.
|
|
517
|
+
*/
|
|
518
|
+
leadEventId?: string | null;
|
|
519
|
+
phone?: string | null;
|
|
520
|
+
travelersCount?: number | null;
|
|
521
|
+
locale?: string | null;
|
|
522
|
+
formId?: string | null;
|
|
523
|
+
attribution?: {
|
|
524
|
+
landingPage?: string | null;
|
|
525
|
+
referrer?: string | null;
|
|
526
|
+
utmSource?: string | null;
|
|
527
|
+
utmMedium?: string | null;
|
|
528
|
+
utmCampaign?: string | null;
|
|
529
|
+
utmContent?: string | null;
|
|
530
|
+
utmTerm?: string | null;
|
|
531
|
+
sessionId?: string | null;
|
|
532
|
+
clickId?: string | null;
|
|
533
|
+
} | null;
|
|
534
|
+
consent?: {
|
|
535
|
+
purpose: string;
|
|
536
|
+
policyVersion: string;
|
|
537
|
+
/** ISO-8601 timestamp with an explicit timezone. */
|
|
538
|
+
capturedAt: string;
|
|
539
|
+
} | null;
|
|
474
540
|
tourSlug?: string | null;
|
|
475
|
-
/**
|
|
476
|
-
|
|
541
|
+
/**
|
|
542
|
+
* Closed public intent used by the CRM sales queue for inquiry routing.
|
|
543
|
+
* `tailor_made` requires a `tourSlug` whose tour is publicly eligible and
|
|
544
|
+
* whose Tailor This Journey call to action is enabled.
|
|
545
|
+
*/
|
|
546
|
+
requestType?: 'tour_inquiry' | 'waiting_list' | 'specialist_question' | 'tailor_made' | null;
|
|
477
547
|
/**
|
|
478
548
|
* Optional requested departure date (YYYY-MM-DD) when the inquiry was
|
|
479
549
|
* submitted from a specific public departure card. No departure identifier or
|
|
480
550
|
* commercial data is sent.
|
|
481
551
|
*/
|
|
482
552
|
departureDate?: string | null;
|
|
553
|
+
/**
|
|
554
|
+
* Customisation options the traveller selected from the ones published for
|
|
555
|
+
* the named tour. Requires `tourSlug` and `requestType: 'tailor_made'`, and
|
|
556
|
+
* every entry must match one of that tour's published
|
|
557
|
+
* `suggestedCustomizationOptions`. Free-text preferences belong in `message`.
|
|
558
|
+
*/
|
|
559
|
+
customizationOptions?: string[] | null;
|
|
483
560
|
};
|
|
484
561
|
export type PublicInquiryResponse = {
|
|
485
562
|
data: {
|
|
486
563
|
accepted: boolean;
|
|
487
564
|
inquiryId: string;
|
|
565
|
+
leadEventId: string;
|
|
488
566
|
};
|
|
489
567
|
};
|
|
490
568
|
export type PublicBookingIntentRequest = {
|
|
@@ -495,10 +573,16 @@ export type PublicBookingIntentRequest = {
|
|
|
495
573
|
leadTravelerEmail?: string | null;
|
|
496
574
|
leadTravelerPhone?: string | null;
|
|
497
575
|
notes?: string | null;
|
|
576
|
+
leadEventId?: string | null;
|
|
577
|
+
locale?: string | null;
|
|
578
|
+
formId?: string | null;
|
|
579
|
+
attribution?: PublicInquiryRequest['attribution'];
|
|
580
|
+
consent?: PublicInquiryRequest['consent'];
|
|
498
581
|
};
|
|
499
582
|
export type PublicBookingIntentStatus = 'received' | 'needs_review' | 'expired' | 'cancelled' | 'converted_internal';
|
|
500
583
|
export type PublicBookingIntentData = {
|
|
501
584
|
publicId: string;
|
|
585
|
+
leadEventId: string;
|
|
502
586
|
status: PublicBookingIntentStatus;
|
|
503
587
|
tourSlug: string;
|
|
504
588
|
departureId: number | null;
|
|
@@ -523,11 +607,17 @@ export type PublicBrochureLeadRequest = {
|
|
|
523
607
|
utmSource?: string | null;
|
|
524
608
|
utmMedium?: string | null;
|
|
525
609
|
utmCampaign?: string | null;
|
|
610
|
+
leadEventId?: string | null;
|
|
611
|
+
locale?: string | null;
|
|
612
|
+
formId?: string | null;
|
|
613
|
+
attribution?: PublicInquiryRequest['attribution'];
|
|
614
|
+
consent?: PublicInquiryRequest['consent'];
|
|
526
615
|
};
|
|
527
616
|
export type PublicBrochureLeadResponse = {
|
|
528
617
|
data: {
|
|
529
618
|
accepted: boolean;
|
|
530
619
|
leadId: string;
|
|
620
|
+
leadEventId: string;
|
|
531
621
|
};
|
|
532
622
|
};
|
|
533
623
|
export type PublicHomepageStats = {
|
|
@@ -768,6 +858,52 @@ export type PublicSiteFeatureStates = {
|
|
|
768
858
|
* selections already stored in a visitor's browser are not affected.
|
|
769
859
|
*/
|
|
770
860
|
compareTours: boolean;
|
|
861
|
+
/**
|
|
862
|
+
* True when the website may show traveller reviews and ratings. When false,
|
|
863
|
+
* review sections are removed from tour pages, the homepage, the tours
|
|
864
|
+
* catalog, and the tailor-made enquiry page, the dedicated reviews page is
|
|
865
|
+
* unavailable, and review ratings are omitted from structured data.
|
|
866
|
+
*/
|
|
867
|
+
tourReviews: boolean;
|
|
868
|
+
/**
|
|
869
|
+
* True when the website may show deal ribbons, previous prices, and savings
|
|
870
|
+
* notes on tour cards. When false, those promotional marks are hidden while
|
|
871
|
+
* current prices and availability stay visible.
|
|
872
|
+
*/
|
|
873
|
+
dealBadges: boolean;
|
|
874
|
+
/**
|
|
875
|
+
* True when the website may offer the email-gated PDF brochure download on
|
|
876
|
+
* tour pages. When false, every brochure control and the download dialog are
|
|
877
|
+
* removed.
|
|
878
|
+
*/
|
|
879
|
+
brochureDownload: boolean;
|
|
880
|
+
/**
|
|
881
|
+
* True when the website may show the published traveller questions section
|
|
882
|
+
* on tour pages. When false, the section is removed and the questions are
|
|
883
|
+
* omitted from structured data.
|
|
884
|
+
*/
|
|
885
|
+
tourQuestions: boolean;
|
|
886
|
+
/**
|
|
887
|
+
* True when the website may show the related-tours rail on tour pages. When
|
|
888
|
+
* false, the rail is removed.
|
|
889
|
+
*/
|
|
890
|
+
relatedTours: boolean;
|
|
891
|
+
/**
|
|
892
|
+
* True when the website may promote the tailor-made service on tour pages
|
|
893
|
+
* and the tours catalog. When false, those teaser sections are removed;
|
|
894
|
+
* tailor-made pages stay reachable directly.
|
|
895
|
+
*/
|
|
896
|
+
tailorMadeTeaser: boolean;
|
|
897
|
+
/**
|
|
898
|
+
* True when the website may show the guided trip-finder widget on the
|
|
899
|
+
* homepage. When false, the widget is removed.
|
|
900
|
+
*/
|
|
901
|
+
tripFinder: boolean;
|
|
902
|
+
/**
|
|
903
|
+
* True when the website may show the traveller moments and stories section
|
|
904
|
+
* on the homepage. When false, the section is removed.
|
|
905
|
+
*/
|
|
906
|
+
travellerStories: boolean;
|
|
771
907
|
};
|
|
772
908
|
export type PublicSiteFeaturesResponse = {
|
|
773
909
|
data: {
|
|
@@ -783,6 +919,7 @@ export type PublicApiV1RouteMap = {
|
|
|
783
919
|
'GET /tour-categories': PublicTourCategoryListResponse;
|
|
784
920
|
'GET /tours': PublicTourListResponse;
|
|
785
921
|
'GET /tours/{slug}': PublicTourDetailResponse;
|
|
922
|
+
'GET /tours/{slug}/preview': PublicTourDetailResponse;
|
|
786
923
|
'GET /tours/{slug}/departures': PublicDepartureListResponse;
|
|
787
924
|
'GET /tours/{slug}/availability': PublicAvailabilityListResponse;
|
|
788
925
|
'GET /tours/{slug}/reviews': PublicTourReviewListResponse;
|
|
@@ -836,6 +973,10 @@ export type ListPublicDeparturesParams = {
|
|
|
836
973
|
limit?: number;
|
|
837
974
|
cursor?: string;
|
|
838
975
|
};
|
|
976
|
+
export type GetPublicTourPreviewParams = {
|
|
977
|
+
/** Short-lived signed candidate-preview token minted by the CRM (ADR-0022). Required. */
|
|
978
|
+
token: string;
|
|
979
|
+
};
|
|
839
980
|
export type ListPublicTourQuestionsParams = {
|
|
840
981
|
limit?: number;
|
|
841
982
|
};
|