@surfiran/public-api-client 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -8
- package/dist/client.d.ts +19 -4
- package/dist/client.js +38 -2
- package/dist/generated/public-api-v1.d.ts +5 -5
- package/dist/types.d.ts +2 -0
- package/dist/types.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Public API Client
|
|
2
2
|
|
|
3
|
-
Zero-runtime-dependency TypeScript types and fetch client for SURFIRAN Public API V1. The checked-in package-local contract snapshot is OpenAPI `v0.
|
|
3
|
+
Zero-runtime-dependency TypeScript types and fetch client for SURFIRAN Public API V1. The checked-in package-local contract snapshot is OpenAPI `v0.18.0`.
|
|
4
4
|
|
|
5
5
|
Repository: `SURFIRAN/surfiran-public-api-client`
|
|
6
6
|
|
|
@@ -18,11 +18,11 @@ The repository split and production cutover are complete. This repository is the
|
|
|
18
18
|
|
|
19
19
|
`contract/public-api-v1.yaml` is the package-local immutable snapshot used for generation. `contract/provenance.json` records its source identity, immutable source revision, checksums, and, for standalone releases, the exact API artifact identity.
|
|
20
20
|
|
|
21
|
-
The checked-in `0.
|
|
21
|
+
The checked-in `0.28.0` snapshot and provenance come from the `SURFIRAN/surfiran-crm-api` main-branch release `public-api-contract/56ba99f1008e85dd59b51d91be29ac23fa3a1051-36217113430-1`. Published `0.20.0` and earlier keep their historical provenance, which may still reference the former monorepo owner or path. Do not rewrite an already published package version solely to rename historical provenance.
|
|
22
22
|
|
|
23
|
-
New client versions must consume
|
|
23
|
+
New client versions must consume the exact immutable GitHub Release assets produced from a successful `SURFIRAN/surfiran-crm-api` main-branch CI run. The release tag is `public-api-contract/<source SHA>-<run ID>-<attempt>` and contains only `public-api-v1.yaml` and `manifest.json`. Publication verifies the immutable release and both GitHub release attestations, the tag SHA, final successful source run, asset digests, manifest identity, and checked-in snapshot bytes. If any check is unavailable, publication stops. Pull-request artifacts are verification evidence only and are not valid release inputs. This repository must never read another repository's private working tree at build time.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
`src/generated/public-api-v1.ts` is generated from the checked-in snapshot; `src/client.ts` and `src/types.ts` are maintained in this repository against that reviewed contract. Never hand-edit generated source.
|
|
26
26
|
|
|
27
27
|
## Boundary
|
|
28
28
|
|
|
@@ -65,9 +65,9 @@ Generation is deterministic: stable ordering and formatting, LF newlines, no mac
|
|
|
65
65
|
|
|
66
66
|
A new contract update must:
|
|
67
67
|
|
|
68
|
-
1. use the exact immutable
|
|
68
|
+
1. use the exact immutable release assets from a successful API run on `refs/heads/main` triggered by `push` or `workflow_dispatch`;
|
|
69
69
|
2. make a reviewed package version change before rewriting contract provenance;
|
|
70
|
-
3. run `sync:api-contract-artifact` with the exact API commit, run ID, and run attempt;
|
|
70
|
+
3. verify/download the release assets, then run `sync:api-contract-artifact` with the exact API commit, run ID, and run attempt;
|
|
71
71
|
4. update `contract/public-api-v1.yaml` and `contract/provenance.json` together;
|
|
72
72
|
5. regenerate the client;
|
|
73
73
|
6. pass artifact verification, package verification, reproducibility, tests, typecheck, and build;
|
|
@@ -83,7 +83,9 @@ Do not duplicate the endpoint list here; the pinned OpenAPI snapshot and generat
|
|
|
83
83
|
|
|
84
84
|
## Publication and rollback
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Routine package CI runs on the non-production Linux `ci-worker` pool. Manual publication uses the dedicated trusted `package-publish` runner and never occupies `surfdmc-prod-deploy`; package and cross-repository artifact credentials do not move to Home or general CI workers.
|
|
87
|
+
|
|
88
|
+
Publication is manual and repository-local through [public-api-client-publish.yml](.github/workflows/public-api-client-publish.yml). It runs on `main` only with explicit publication authorization and `publish_confirm=PUBLISH`. A future version must be bound to an exact reviewed API contract release, pass package/reproducibility checks and publication preflight, create release provenance, and provide an exact previous rollback version. The workflow uses `PUBLIC_API_CONTRACT_READ_TOKEN` to read the private immutable API release and a separate `PUBLIC_API_CLIENT_RELEASE_SETTINGS_READ_TOKEN` with scoped Administration:read to confirm immutable Releases are enabled for this client repository. Before publishing to npmjs.org, it creates or exactly reuses an immutable client release `public-api-client/v<package version>` containing the packed tarball and provenance JSON. It marks the evidence release as non-latest and verifies its asset digests, source tag SHA, and GitHub release attestations. Retries must reproduce the same bytes, including the explicit generation timestamp. Missing or unverifiable release or publication evidence blocks npm publication; the workflow does not use Actions artifact storage for these gates.
|
|
87
89
|
|
|
88
90
|
Published versions are immutable. Rollback means pinning consumers to the previous verified exact package version. Package publication never deploys a consumer, changes API runtime behavior, applies a database migration, or authorizes production data/configuration access.
|
|
89
91
|
|
|
@@ -92,6 +94,6 @@ Published versions are immutable. Rollback means pinning consumers to the previo
|
|
|
92
94
|
- This README owns local setup, contract synchronization, CI, publication, and rollback guidance.
|
|
93
95
|
- [AGENTS.md](AGENTS.md) owns agent operating instructions.
|
|
94
96
|
- [Repository boundaries and documentation governance](https://github.com/SURFIRAN/surfiran-crm-api/blob/main/docs/architecture/REPOSITORY_BOUNDARIES.md) own shared architecture and current system state.
|
|
95
|
-
- [Contract snapshot](contract/public-api-v1.yaml) and [provenance](contract/provenance.json) are immutable evidence for `0.
|
|
97
|
+
- [Contract snapshot](contract/public-api-v1.yaml) and [provenance](contract/provenance.json) are immutable evidence for `0.28.0`, not current API ownership authorities.
|
|
96
98
|
|
|
97
99
|
Update existing guidance instead of creating duplicate contract or publication authorities. Preserve the historical snapshot, provenance, and generated bytes until a reviewed new package version imports a verified API artifact.
|
package/dist/client.d.ts
CHANGED
|
@@ -4,9 +4,7 @@ export type PublicApiClientOptions = {
|
|
|
4
4
|
fetchImpl?: typeof fetch;
|
|
5
5
|
requestId?: string;
|
|
6
6
|
/**
|
|
7
|
-
* Bounds every request issued by this client. Defaults to 10000ms
|
|
8
|
-
* the existing AbortController-based timeout precedent in
|
|
9
|
-
* server/services/webhookDispatcher.ts.
|
|
7
|
+
* Bounds every request issued by this client. Defaults to 10000ms.
|
|
10
8
|
*/
|
|
11
9
|
timeoutMs?: number;
|
|
12
10
|
};
|
|
@@ -73,7 +71,24 @@ export declare const createPublicApiClient: (options: PublicApiClientOptions) =>
|
|
|
73
71
|
getPublicSiteContentBookingCancellationPolicy(): Promise<PublicApiResult<PublicSiteTrustPageContentResponse>>;
|
|
74
72
|
getPublicSiteContentCookiePolicy(): Promise<PublicApiResult<PublicSiteTrustPageContentResponse>>;
|
|
75
73
|
getPublicSiteContentAccessibilityStatement(): Promise<PublicApiResult<PublicSiteTrustPageContentResponse>>;
|
|
76
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* The CMS-owned editorial composition for one country page
|
|
76
|
+
* (`/destinations/{country}`), or `data: null` when nothing is published
|
|
77
|
+
* for that country.
|
|
78
|
+
*
|
|
79
|
+
* `country` is a country slug — the lowercase hyphenated catalogue
|
|
80
|
+
* `countries` facet value (`iran`, `iraq`, `saudi-arabia`) — never a CMS
|
|
81
|
+
* registry key. The API composes it into its own `destination-<country>`
|
|
82
|
+
* page key; a value outside that shape is rejected with 400.
|
|
83
|
+
*/
|
|
84
|
+
getPublicSiteContentDestinationCountry(country: string): Promise<PublicApiResult<PublicSiteBlockPageContentResponse>>;
|
|
85
|
+
/**
|
|
86
|
+
* The Iran country page's CMS-owned editorial composition
|
|
87
|
+
* (`/destinations/iran`).
|
|
88
|
+
*
|
|
89
|
+
* Compatibility alias for `getPublicSiteContentDestinationCountry('iran')`:
|
|
90
|
+
* both read the same stored composition, so the two can never disagree.
|
|
91
|
+
*/
|
|
77
92
|
getPublicSiteContentDestinationIran(): Promise<PublicApiResult<PublicSiteBlockPageContentResponse>>;
|
|
78
93
|
getPublicTravelKnowledge(params: GetPublicTravelKnowledgeParams): Promise<PublicApiResult<PublicTravelKnowledgeResponse>>;
|
|
79
94
|
};
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
const DEFAULT_TIMEOUT_MS = 10000;
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Trims trailing slashes without a regular expression.
|
|
4
|
+
*
|
|
5
|
+
* `/\/+$/` has a candidate start at every slash, so a base URL ending in a
|
|
6
|
+
* long run of them was quadratic to reject (CodeQL js/polynomial-redos). This
|
|
7
|
+
* is a published client library: the base URL is whatever a consumer passes,
|
|
8
|
+
* and a library has no say in that. Scanning backwards is linear and says the
|
|
9
|
+
* same thing.
|
|
10
|
+
*/
|
|
11
|
+
const SLASH = 47;
|
|
12
|
+
const trimTrailingSlash = (value) => {
|
|
13
|
+
let end = value.length;
|
|
14
|
+
while (end > 0 && value.charCodeAt(end - 1) === SLASH)
|
|
15
|
+
end -= 1;
|
|
16
|
+
return value.slice(0, end);
|
|
17
|
+
};
|
|
3
18
|
const isAbortError = (err) => err instanceof Error && err.name === 'AbortError';
|
|
4
19
|
const toTimeoutResult = (status, requestId) => ({
|
|
5
20
|
ok: false,
|
|
@@ -130,6 +145,8 @@ const toSearchResultsQueryString = (params) => {
|
|
|
130
145
|
search.set('limit', String(params.limit));
|
|
131
146
|
if (params.type)
|
|
132
147
|
search.set('type', params.type);
|
|
148
|
+
if (params.locale)
|
|
149
|
+
search.set('locale', params.locale);
|
|
133
150
|
return `?${search.toString()}`;
|
|
134
151
|
};
|
|
135
152
|
const toTravelKnowledgeQueryString = (params) => {
|
|
@@ -370,7 +387,26 @@ export const createPublicApiClient = (options) => {
|
|
|
370
387
|
getPublicSiteContentAccessibilityStatement() {
|
|
371
388
|
return requestJson(`${baseUrl}/api/v1/site-content/accessibility-statement`, options);
|
|
372
389
|
},
|
|
373
|
-
/**
|
|
390
|
+
/**
|
|
391
|
+
* The CMS-owned editorial composition for one country page
|
|
392
|
+
* (`/destinations/{country}`), or `data: null` when nothing is published
|
|
393
|
+
* for that country.
|
|
394
|
+
*
|
|
395
|
+
* `country` is a country slug — the lowercase hyphenated catalogue
|
|
396
|
+
* `countries` facet value (`iran`, `iraq`, `saudi-arabia`) — never a CMS
|
|
397
|
+
* registry key. The API composes it into its own `destination-<country>`
|
|
398
|
+
* page key; a value outside that shape is rejected with 400.
|
|
399
|
+
*/
|
|
400
|
+
getPublicSiteContentDestinationCountry(country) {
|
|
401
|
+
return requestJson(`${baseUrl}/api/v1/site-content/destinations/${encodeURIComponent(country)}`, options);
|
|
402
|
+
},
|
|
403
|
+
/**
|
|
404
|
+
* The Iran country page's CMS-owned editorial composition
|
|
405
|
+
* (`/destinations/iran`).
|
|
406
|
+
*
|
|
407
|
+
* Compatibility alias for `getPublicSiteContentDestinationCountry('iran')`:
|
|
408
|
+
* both read the same stored composition, so the two can never disagree.
|
|
409
|
+
*/
|
|
374
410
|
getPublicSiteContentDestinationIran() {
|
|
375
411
|
return requestJson(`${baseUrl}/api/v1/site-content/destination-iran`, options);
|
|
376
412
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type GeneratedPublicApiVersion = '0.
|
|
2
|
-
export type GeneratedPublicApiPath = '/booking-intents' | '/booking-intents/{id}' | '/bot-protection' | '/brochure-leads' | '/destinations' | '/destinations/{slug}' | '/homepage' | '/inquiries' | '/locales' | '/localization/previews/{candidateId}' | '/localization/releases/{releaseId}' | '/localization/ui-catalogs/{snapshotId}' | '/marketing-unsubscribes' | '/reviews' | '/search' | '/search-suggestions' | '/site-content/about' | '/site-content/accessibility-statement' | '/site-content/booking-cancellation-policy' | '/site-content/contact' | '/site-content/cookie-policy' | '/site-content/destination-iran' | '/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/tailor-made' | '/site-content/terms' | '/site-content/travel-insurance' | '/site-features' | '/site-navigation' | '/sitemap' | '/support-requests' | '/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-insurance/rates' | '/travel-knowledge' | '/travel-status' | '/traveller-stories';
|
|
3
|
-
export type GeneratedPublicApiOperation = 'GET /booking-intents/{id}' | 'GET /bot-protection' | 'GET /destinations' | 'GET /destinations/{slug}' | 'GET /homepage' | 'GET /locales' | 'GET /localization/previews/{candidateId}' | 'GET /localization/releases/{releaseId}' | 'GET /localization/ui-catalogs/{snapshotId}' | 'GET /reviews' | 'GET /search' | '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/destination-iran' | '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/tailor-made' | '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-insurance/rates' | 'GET /travel-knowledge' | 'GET /travel-status' | 'GET /traveller-stories' | 'POST /booking-intents' | 'POST /brochure-leads' | 'POST /inquiries' | 'POST /marketing-unsubscribes' | 'POST /support-requests';
|
|
4
|
-
export type GeneratedPublicApiActiveOperation = 'GET /bot-protection' | 'GET /destinations' | 'GET /destinations/{slug}' | 'GET /homepage' | 'GET /locales' | 'GET /localization/previews/{candidateId}' | 'GET /localization/releases/{releaseId}' | 'GET /localization/ui-catalogs/{snapshotId}' | 'GET /reviews' | 'GET /search' | '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/destination-iran' | '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/tailor-made' | '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-insurance/rates' | 'GET /travel-knowledge' | 'GET /travel-status' | 'GET /traveller-stories' | 'POST /booking-intents' | 'POST /brochure-leads' | 'POST /inquiries' | 'POST /marketing-unsubscribes' | 'POST /support-requests';
|
|
1
|
+
export type GeneratedPublicApiVersion = '0.18.0';
|
|
2
|
+
export type GeneratedPublicApiPath = '/booking-intents' | '/booking-intents/{id}' | '/bot-protection' | '/brochure-leads' | '/destinations' | '/destinations/{slug}' | '/homepage' | '/inquiries' | '/locales' | '/localization/previews/{candidateId}' | '/localization/releases/{releaseId}' | '/localization/ui-catalogs/{snapshotId}' | '/marketing-unsubscribes' | '/reviews' | '/search' | '/search-suggestions' | '/site-content/about' | '/site-content/accessibility-statement' | '/site-content/booking-cancellation-policy' | '/site-content/contact' | '/site-content/cookie-policy' | '/site-content/destination-iran' | '/site-content/destinations/{country}' | '/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/tailor-made' | '/site-content/terms' | '/site-content/travel-insurance' | '/site-features' | '/site-navigation' | '/sitemap' | '/support-requests' | '/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-insurance/rates' | '/travel-knowledge' | '/travel-status' | '/traveller-stories';
|
|
3
|
+
export type GeneratedPublicApiOperation = 'GET /booking-intents/{id}' | 'GET /bot-protection' | 'GET /destinations' | 'GET /destinations/{slug}' | 'GET /homepage' | 'GET /locales' | 'GET /localization/previews/{candidateId}' | 'GET /localization/releases/{releaseId}' | 'GET /localization/ui-catalogs/{snapshotId}' | 'GET /reviews' | 'GET /search' | '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/destination-iran' | 'GET /site-content/destinations/{country}' | '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/tailor-made' | '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-insurance/rates' | 'GET /travel-knowledge' | 'GET /travel-status' | 'GET /traveller-stories' | 'POST /booking-intents' | 'POST /brochure-leads' | 'POST /inquiries' | 'POST /marketing-unsubscribes' | 'POST /support-requests';
|
|
4
|
+
export type GeneratedPublicApiActiveOperation = 'GET /bot-protection' | 'GET /destinations' | 'GET /destinations/{slug}' | 'GET /homepage' | 'GET /locales' | 'GET /localization/previews/{candidateId}' | 'GET /localization/releases/{releaseId}' | 'GET /localization/ui-catalogs/{snapshotId}' | 'GET /reviews' | 'GET /search' | '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/destination-iran' | 'GET /site-content/destinations/{country}' | '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/tailor-made' | '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-insurance/rates' | 'GET /travel-knowledge' | 'GET /travel-status' | 'GET /traveller-stories' | 'POST /booking-intents' | 'POST /brochure-leads' | 'POST /inquiries' | 'POST /marketing-unsubscribes' | 'POST /support-requests';
|
|
5
5
|
export type GeneratedPublicApiBlockedOperation = 'GET /booking-intents/{id}';
|
|
6
|
-
export type GeneratedPublicApiOperationId = 'getBookingIntent' | 'getPublicBotProtection' | 'listPublicDestinations' | 'getPublicDestinationBySlug' | 'getPublicHomepage' | 'listPublicLocales' | 'getPublicLocalizationCandidatePreview' | 'getPublicLocalizationRelease' | 'getPublicUiCatalog' | 'listPublicSiteReviews' | 'getPublicSearchResults' | 'getPublicSearchSuggestions' | 'getPublicSiteContentAbout' | 'getPublicSiteContentAccessibilityStatement' | 'getPublicSiteContentBookingCancellationPolicy' | 'getPublicSiteContentContact' | 'getPublicSiteContentCookiePolicy' | 'getPublicSiteContentDestinationIran' | 'getPublicSiteContentFaqs' | 'getPublicSiteContentFooter' | 'getPublicSiteContentHeader' | 'getPublicSiteContentHealthSafetySupport' | 'getPublicSiteContentHome' | 'getPublicSiteContentIranTravelStatus' | 'getPublicSiteContentIranVisaInformation' | 'getPublicSiteContentMoneyInIran' | 'getPublicSiteContentPrivacy' | 'getPublicSiteContentResponsibleTravel' | 'getPublicSiteContentTailorMade' | 'getPublicSiteContentTerms' | 'getPublicSiteContentTravelInsurance' | 'getPublicSiteFeatures' | 'getPublicSiteNavigation' | 'getPublicSitemap' | 'listPublicTourCategories' | 'listPublicTours' | 'getPublicTourBySlug' | 'listPublicTourAccommodations' | 'listPublicTourAvailability' | 'listPublicTourDepartures' | 'listPublicTourExperiences' | 'listPublicTourItinerary' | 'getPublicTourPreviewBySlug' | 'listPublicTourQuestions' | 'listPublicTourReviews' | 'getPublicTourReviewsSummary' | 'listPublicTourRoute' | 'getPublicTravelInsuranceRates' | 'listPublicTravelKnowledge' | 'getPublicTravelStatus' | 'listPublicTravellerStories' | 'createPublicBookingIntent' | 'createPublicBrochureLead' | 'createPublicInquiry' | 'createPublicMarketingUnsubscribe' | 'createPublicSupportRequest';
|
|
6
|
+
export type GeneratedPublicApiOperationId = 'getBookingIntent' | 'getPublicBotProtection' | 'listPublicDestinations' | 'getPublicDestinationBySlug' | 'getPublicHomepage' | 'listPublicLocales' | 'getPublicLocalizationCandidatePreview' | 'getPublicLocalizationRelease' | 'getPublicUiCatalog' | 'listPublicSiteReviews' | 'getPublicSearchResults' | 'getPublicSearchSuggestions' | 'getPublicSiteContentAbout' | 'getPublicSiteContentAccessibilityStatement' | 'getPublicSiteContentBookingCancellationPolicy' | 'getPublicSiteContentContact' | 'getPublicSiteContentCookiePolicy' | 'getPublicSiteContentDestinationIran' | 'getPublicSiteContentDestinationCountry' | 'getPublicSiteContentFaqs' | 'getPublicSiteContentFooter' | 'getPublicSiteContentHeader' | 'getPublicSiteContentHealthSafetySupport' | 'getPublicSiteContentHome' | 'getPublicSiteContentIranTravelStatus' | 'getPublicSiteContentIranVisaInformation' | 'getPublicSiteContentMoneyInIran' | 'getPublicSiteContentPrivacy' | 'getPublicSiteContentResponsibleTravel' | 'getPublicSiteContentTailorMade' | 'getPublicSiteContentTerms' | 'getPublicSiteContentTravelInsurance' | 'getPublicSiteFeatures' | 'getPublicSiteNavigation' | 'getPublicSitemap' | 'listPublicTourCategories' | 'listPublicTours' | 'getPublicTourBySlug' | 'listPublicTourAccommodations' | 'listPublicTourAvailability' | 'listPublicTourDepartures' | 'listPublicTourExperiences' | 'listPublicTourItinerary' | 'getPublicTourPreviewBySlug' | 'listPublicTourQuestions' | 'listPublicTourReviews' | 'getPublicTourReviewsSummary' | 'listPublicTourRoute' | 'getPublicTravelInsuranceRates' | 'listPublicTravelKnowledge' | 'getPublicTravelStatus' | 'listPublicTravellerStories' | 'createPublicBookingIntent' | 'createPublicBrochureLead' | 'createPublicInquiry' | 'createPublicMarketingUnsubscribe' | 'createPublicSupportRequest';
|
|
7
7
|
export type GeneratedPublicApiSchemaName = 'BookingIntentConflictErrorResponse' | 'BookingIntentResponse' | 'CanonicalIntakeAttribution' | 'CanonicalIntakeConsent' | 'CreateBookingIntentRequest' | 'CreateBookingIntentSuccessResponse' | 'CreateBrochureLeadRequest' | 'CreateBrochureLeadResponse' | 'CreateInquiryRequest' | 'CreateInquiryResponse' | 'CreateMarketingUnsubscribeRequest' | 'CreateMarketingUnsubscribeResponse' | 'CreateSupportRequestRequest' | 'CreateSupportRequestResponse' | 'GetBookingIntentStatusResponse' | 'PaginationMeta' | 'PublicApiAbuseBlockedError' | 'PublicApiBotCheckError' | 'PublicApiError' | 'PublicApiInternalError' | 'PublicApiNotFoundError' | 'PublicApiNotImplementedError' | 'PublicApiRateLimitError' | 'PublicApiTravelStatusUnavailableError' | 'PublicApiValidationError' | 'PublicAvailabilityListItem' | 'PublicAvailabilityListResponse' | 'PublicBookingIntentLinks' | 'PublicBookingIntentPublicStatus' | 'PublicBookingIntentStatus' | 'PublicBotProtectionResponse' | 'PublicCityDestinationContent' | 'PublicCityExperience' | 'PublicCityImage' | 'PublicCityLabelledValue' | 'PublicCityLink' | 'PublicCityNextPlace' | 'PublicCityReason' | 'PublicCityResource' | 'PublicCityRoutePattern' | 'PublicCityStayLink' | 'PublicCmsContentSnapshotId' | 'PublicDepartureListItem' | 'PublicDepartureListResponse' | 'PublicDestinationDetail' | 'PublicDestinationDetailResponse' | 'PublicDestinationListItem' | 'PublicDestinationListResponse' | 'PublicError' | 'PublicErrorEnvelope' | 'PublicHomepageResponse' | 'PublicHomepageSeo' | 'PublicHomepageStats' | 'PublicLocaleRegistryData' | 'PublicLocaleRegistryItem' | 'PublicLocaleRegistryResponse' | 'PublicLocaleTag' | 'PublicLocalizationCandidatePreview' | 'PublicLocalizationCandidatePreviewResponse' | 'PublicLocalizationRelease' | 'PublicLocalizationReleaseId' | 'PublicLocalizationReleaseResponse' | 'PublicLocalizationSnapshotReferences' | 'PublicNavLink' | 'PublicOfficialSourceCard' | 'PublicPriceDisplayByCurrency' | 'PublicSearchResultGroup' | 'PublicSearchResultItem' | 'PublicSearchResultsResponse' | 'PublicSearchSuggestion' | 'PublicSearchSuggestionsResponse' | 'PublicSeo' | 'PublicSiteBlockPageContentResponse' | 'PublicSiteChromeContent' | 'PublicSiteChromeContentResponse' | 'PublicSiteCta' | 'PublicSiteFeaturesResponse' | 'PublicSiteFeatureStates' | 'PublicSiteFooterNavGroup' | 'PublicSiteFooterNavGroupLink' | 'PublicSiteFooterPaymentNote' | 'PublicSiteFooterSupportBand' | 'PublicSiteHeaderMenuCategory' | 'PublicSiteHeaderMenuEditorial' | 'PublicSiteHeaderOffice' | 'PublicSiteHeaderQuickLink' | 'PublicSiteHeaderSearchShortcuts' | 'PublicSiteHomeContent' | 'PublicSiteHomeContentResponse' | 'PublicSiteHomeSection' | 'PublicSitemapEntry' | 'PublicSitemapResponse' | 'PublicSiteNavigationResponse' | 'PublicSiteNavItem' | 'PublicSiteReviewListResponse' | 'PublicSiteRouteKey' | 'PublicSiteSocialLink' | 'PublicSiteTrustPageContent' | 'PublicSiteTrustPageContentResponse' | 'PublicSiteTrustPageSeo' | 'PublicSiteTrustSection' | 'PublicSiteTrustTitledItem' | 'PublicStaticLink' | 'PublicSurfiranOperationalUpdate' | 'PublicTourAccommodationListItem' | 'PublicTourAccommodationListResponse' | 'PublicTourCatalogDepartureSummary' | 'PublicTourCatalogFacetOption' | 'PublicTourCatalogMetadata' | 'PublicTourCatalogStartingFrom' | 'PublicTourCategoryListItem' | 'PublicTourCategoryListResponse' | 'PublicTourDetail' | 'PublicTourDetailEditorial' | 'PublicTourDetailResponse' | 'PublicTourExperienceFrame' | 'PublicTourExperienceListItem' | 'PublicTourExperienceListResponse' | 'PublicTourItineraryDay' | 'PublicTourItineraryResponse' | 'PublicTourListItem' | 'PublicTourListResponse' | 'PublicTourMediaItem' | 'PublicTourQuestionListItem' | 'PublicTourQuestionListResponse' | 'PublicTourRatingBreakdownItem' | 'PublicTourReviewListItem' | 'PublicTourReviewListResponse' | 'PublicTourReviewsAggregate' | 'PublicTourReviewsSummary' | 'PublicTourReviewsSummaryResponse' | 'PublicTourRouteResponse' | 'PublicTourRouteStop' | 'PublicTourTailorJourney' | 'PublicTravelInsuranceAgeBand' | 'PublicTravelInsuranceDurationBand' | 'PublicTravelInsuranceRates' | 'PublicTravelInsuranceRatesResponse' | 'PublicTravelKnowledgeItem' | 'PublicTravelKnowledgeResponse' | 'PublicTravellerStoryListItem' | 'PublicTravellerStoryListResponse' | 'PublicTravelStatusCorrectionNotice' | 'PublicTravelStatusFreshness' | 'PublicTravelStatusHandoff' | 'PublicTravelStatusResponse' | 'PublicTravelStatusReviewerLabel' | 'PublicTravelStatusSection' | 'PublicTravelStatusState' | 'PublicTripBrief' | 'PublicUiCatalog' | 'PublicUiCatalogFallbackSummary' | 'PublicUiCatalogMessage' | 'PublicUiCatalogResponse' | 'PublicUiCatalogSnapshotId' | 'SupportRequestRecaptchaEvidence';
|
package/dist/types.d.ts
CHANGED
|
@@ -1623,6 +1623,8 @@ export type GetPublicSearchResultsParams = {
|
|
|
1623
1623
|
/** Maximum items per group. 1 through 25; defaults to 10 server-side. Group totals still report every match. */
|
|
1624
1624
|
limit?: number;
|
|
1625
1625
|
type?: 'tour' | 'destination';
|
|
1626
|
+
/** Published tour copy locale; omitted or en keeps the English results. */
|
|
1627
|
+
locale?: PublicContentLocale;
|
|
1626
1628
|
};
|
|
1627
1629
|
export type ListPublicTourCategoriesParams = {
|
|
1628
1630
|
limit?: number;
|
package/dist/types.js
CHANGED