@surfiran/public-api-client 0.20.0 → 0.22.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 +56 -35
- package/dist/client.d.ts +5 -1
- package/dist/client.js +15 -1
- package/dist/generated/public-api-v1.d.ts +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +83 -4
- package/package.json +10 -6
package/README.md
CHANGED
|
@@ -1,76 +1,97 @@
|
|
|
1
1
|
# Public API Client
|
|
2
2
|
|
|
3
|
-
Zero-runtime-dependency TypeScript types and fetch client for SURFIRAN Public API V1. The package-local contract snapshot is OpenAPI `v0.14.0`.
|
|
3
|
+
Zero-runtime-dependency TypeScript types and fetch client for SURFIRAN Public API V1. The checked-in package-local contract snapshot is OpenAPI `v0.14.0`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Repository: `SURFIRAN/surfiran-public-api-client`
|
|
6
6
|
|
|
7
|
-
- [
|
|
8
|
-
- [System Architecture](../../docs/architecture/SYSTEM_ARCHITECTURE.md)
|
|
9
|
-
- [Public Web Product Model](../../docs/domains/public-web/PUBLIC_WEB_PRODUCT_MODEL.md)
|
|
7
|
+
Cross-repository ownership, API boundaries, and cutover status are maintained once in [`surfiran-crm-api/docs/architecture/REPOSITORY_BOUNDARIES.md`](https://github.com/SURFIRAN/surfiran-crm-api/blob/main/docs/architecture/REPOSITORY_BOUNDARIES.md).
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
## Repository status
|
|
10
|
+
|
|
11
|
+
The repository split and production cutover are complete. This repository is the active source for typed-client development, contract snapshot synchronization, generation, versioning, publication, package verification, and rollback.
|
|
12
|
+
|
|
13
|
+
`SURFIRAN/Tour-Operator-CRM` is a legacy monorepo retained only for historical reference, rollback/recovery history, and legitimate historical provenance. Do not use its former `packages/public-api-client/` tree or monorepo workflows for current client work.
|
|
12
14
|
|
|
13
15
|
## Contract ownership
|
|
14
16
|
|
|
15
|
-
`
|
|
17
|
+
`SURFIRAN/surfiran-crm-api` owns Public API business semantics and the canonical OpenAPI contract at [`openapi/public-api-v1.yaml`](https://github.com/SURFIRAN/surfiran-crm-api/blob/main/openapi/public-api-v1.yaml). This is the source path for future releases. This repository does not invent or redefine backend behavior.
|
|
18
|
+
|
|
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
|
+
|
|
21
|
+
The checked-in `0.21.0` snapshot and provenance come from the `SURFIRAN/surfiran-crm-api` main-branch artifact `public-api-contract-536ebba901fda5a96dcbbd173d1f533336e3bae7-35118709282-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
|
+
|
|
23
|
+
New client versions must consume an immutable reviewed contract artifact produced by a successful `SURFIRAN/surfiran-crm-api` main-branch CI run. The artifact is bound to the API source commit, GitHub Actions run identity, source ref/event, contract version, and checksum. 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
|
+
|
|
25
|
+
Generated client source is never hand-edited.
|
|
16
26
|
|
|
17
27
|
## Boundary
|
|
18
28
|
|
|
19
29
|
The client exposes only operations present and implemented in the pinned Public API contract. It must never:
|
|
20
30
|
|
|
21
|
-
- import
|
|
31
|
+
- import backend modules or connect to MariaDB;
|
|
22
32
|
- call internal CRM or generic-table routes;
|
|
23
|
-
- export raw CRM rows or passenger, supplier-private, payment, audit, internal-note, credential, cookie, token, or storage
|
|
24
|
-
- manufacture public media URLs from private upload fields;
|
|
25
|
-
-
|
|
33
|
+
- export raw CRM rows or passenger, supplier-private, payment, audit, internal-note, credential, cookie, token, or private-storage fields;
|
|
34
|
+
- manufacture public media URLs from private upload fields;
|
|
35
|
+
- create new business semantics that the API owner has not reviewed and released.
|
|
26
36
|
|
|
27
|
-
Booking-intent creation remains intent-only. It does not create a Booking
|
|
37
|
+
Booking-intent creation remains intent-only. It does not create a Booking, Passenger, payment, inventory hold, supplier confirmation, checkout, or Public Web behavior.
|
|
28
38
|
|
|
29
39
|
## Install and verify
|
|
30
40
|
|
|
31
|
-
|
|
41
|
+
Use Node.js 20 as configured in CI (the package requires Node.js 20 or later). Clone independently; no sibling working tree or legacy checkout is required.
|
|
32
42
|
|
|
33
43
|
```bash
|
|
44
|
+
git clone https://github.com/SURFIRAN/surfiran-public-api-client.git
|
|
45
|
+
cd surfiran-public-api-client
|
|
34
46
|
npm ci --include=dev
|
|
35
47
|
npm run generate
|
|
36
48
|
npm run verify:contract
|
|
49
|
+
npm run verify:api-contract-artifact -- --self-test
|
|
50
|
+
npm run verify:package
|
|
51
|
+
npm run verify:repository
|
|
37
52
|
npm run verify:generated
|
|
38
|
-
npm test
|
|
39
53
|
npm run typecheck
|
|
54
|
+
npm test
|
|
40
55
|
npm run build
|
|
56
|
+
npm run verify:pack
|
|
57
|
+
npm run verify:reproducibility
|
|
41
58
|
```
|
|
42
59
|
|
|
43
|
-
Generation is deterministic: stable ordering
|
|
60
|
+
Generation is deterministic: stable ordering and formatting, LF newlines, no machine paths, random IDs, or uncontrolled timestamps.
|
|
44
61
|
|
|
45
|
-
|
|
62
|
+
[ci.yml](.github/workflows/ci.yml) owns the package verification sequence and runner requirements. This package has no development server or production service to restart; generation and tests are the local development loop.
|
|
46
63
|
|
|
47
|
-
|
|
64
|
+
## Contract updates
|
|
48
65
|
|
|
49
|
-
|
|
50
|
-
npm run sync:public-api-client-contract -- --source-commit <canonical-source-commit>
|
|
51
|
-
```
|
|
66
|
+
A new contract update must:
|
|
52
67
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
68
|
+
1. use the exact immutable artifact from a successful API run on `refs/heads/main` triggered by `push` or `workflow_dispatch`;
|
|
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;
|
|
71
|
+
4. update `contract/public-api-v1.yaml` and `contract/provenance.json` together;
|
|
72
|
+
5. regenerate the client;
|
|
73
|
+
6. pass artifact verification, package verification, reproducibility, tests, typecheck, and build;
|
|
74
|
+
7. use a reviewed compatible or breaking version decision before publication.
|
|
56
75
|
|
|
57
|
-
|
|
58
|
-
duration-bucket, journey-type and departure-month selections. Values within a
|
|
59
|
-
group are ORed; groups are ANDed. `includeFacets: true` adds disjunctive facet
|
|
60
|
-
counts and the unfiltered catalog total. `destination` retains its legacy city
|
|
61
|
-
meaning; countries use `countries`. Dates mean published departures, not available
|
|
62
|
-
capacity. Price filtering and price sorting are not supported.
|
|
76
|
+
The sync command rejects rewriting provenance for the current package version and rejects API artifacts that are not valid release inputs.
|
|
63
77
|
|
|
64
|
-
|
|
65
|
-
it is bound to the normalized selection, locale and UTC reference day. Calls
|
|
66
|
-
without catalog parameters keep their existing pagination and response shape.
|
|
78
|
+
## Consumer usage
|
|
67
79
|
|
|
68
80
|
Consumers install an exact immutable `@surfiran/public-api-client` version and create a client with their supported Public API base URL. They check the typed success/error result for every operation and keep credentials/environment values outside code and logs.
|
|
69
81
|
|
|
70
|
-
Do not duplicate the endpoint list
|
|
82
|
+
Do not duplicate the endpoint list here; the pinned OpenAPI snapshot and generated route/types are the executable inventory.
|
|
71
83
|
|
|
72
84
|
## Publication and rollback
|
|
73
85
|
|
|
74
|
-
|
|
86
|
+
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 artifact, pass package/reproducibility checks and publication preflight, create release provenance, and provide an exact previous rollback version. Missing or unverifiable artifact provenance blocks publication. The workflow defines required inputs and the download/verification sequence.
|
|
87
|
+
|
|
88
|
+
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
|
+
|
|
90
|
+
## Documentation index
|
|
91
|
+
|
|
92
|
+
- This README owns local setup, contract synchronization, CI, publication, and rollback guidance.
|
|
93
|
+
- [AGENTS.md](AGENTS.md) owns agent operating instructions.
|
|
94
|
+
- [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.21.0`, not current API ownership authorities.
|
|
75
96
|
|
|
76
|
-
|
|
97
|
+
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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GetPublicSearchResultsParams, GetPublicSearchSuggestionsParams, GetPublicSitemapParams, GetPublicTourPreviewParams, GetPublicTravelKnowledgeParams, ListPublicDeparturesParams, ListPublicDestinationsParams, ListPublicTourAccommodationsParams, ListPublicTourAvailabilityParams, ListPublicTourCategoriesParams, ListPublicTourExperiencesParams, ListPublicTravellerStoriesParams, ListPublicTourQuestionsParams, ListPublicTourReviewsParams, ListPublicTourItineraryParams, ListPublicTourRouteParams, ListPublicToursParams, GetPublicTourParams, PublicApiResult, PublicAvailabilityListResponse, PublicBookingIntentRequest, PublicBookingIntentResponse, PublicBrochureLeadRequest, PublicBrochureLeadResponse, PublicDepartureListResponse, PublicDestinationDetailResponse, PublicDestinationListResponse, PublicHomepageResponse, PublicInquiryRequest, PublicInquiryResponse, PublicSearchResultsResponse, PublicSearchSuggestionsResponse, PublicSitemapResponse, PublicSiteChromeContentResponse, PublicSiteFeaturesResponse, PublicLocaleRegistryResponse, PublicLocalizationCandidatePreviewResponse, PublicLocalizationReleaseResponse, PublicUiCatalogResponse, LocalizationReleaseId, LocalizationPreviewCapability, UiCatalogSnapshotId, PublicSiteHomeContentResponse, PublicSiteNavigationResponse, PublicSiteTrustPageContentResponse, PublicTourAccommodationListResponse, PublicTourCategoryListResponse, PublicTourDetailResponse, PublicTourExperienceListResponse, PublicTravellerStoryListResponse, PublicTourListResponse, PublicTourQuestionListResponse, PublicTourReviewsSummaryResponse, PublicTourReviewListResponse, PublicTourItineraryResponse, PublicTourRouteResponse, PublicTravelKnowledgeResponse, PublicTravelStatusResponse } from './types.js';
|
|
1
|
+
import type { GetPublicSearchResultsParams, GetPublicSearchSuggestionsParams, GetPublicSitemapParams, GetPublicTourPreviewParams, GetPublicTravelKnowledgeParams, ListPublicDeparturesParams, ListPublicDestinationsParams, ListPublicTourAccommodationsParams, ListPublicTourAvailabilityParams, ListPublicTourCategoriesParams, ListPublicTourExperiencesParams, ListPublicTravellerStoriesParams, ListPublicTourQuestionsParams, ListPublicTourReviewsParams, ListPublicSiteReviewsParams, ListPublicTourItineraryParams, ListPublicTourRouteParams, ListPublicToursParams, GetPublicTourParams, PublicApiResult, PublicAvailabilityListResponse, PublicBookingIntentRequest, PublicBookingIntentResponse, PublicBrochureLeadRequest, PublicBrochureLeadResponse, PublicDepartureListResponse, PublicDestinationDetailResponse, PublicDestinationListResponse, PublicHomepageResponse, PublicInquiryRequest, PublicInquiryResponse, PublicSupportRequest, PublicSupportRequestResponse, PublicSearchResultsResponse, PublicSearchSuggestionsResponse, PublicSitemapResponse, PublicSiteChromeContentResponse, PublicSiteFeaturesResponse, PublicLocaleRegistryResponse, PublicLocalizationCandidatePreviewResponse, PublicLocalizationReleaseResponse, PublicUiCatalogResponse, LocalizationReleaseId, LocalizationPreviewCapability, UiCatalogSnapshotId, PublicSiteHomeContentResponse, PublicSiteNavigationResponse, PublicSiteTrustPageContentResponse, PublicSiteBlockPageContentResponse, PublicTourAccommodationListResponse, PublicTourCategoryListResponse, PublicTourDetailResponse, PublicTourExperienceListResponse, PublicTravellerStoryListResponse, PublicTourListResponse, PublicTourQuestionListResponse, PublicTourReviewsSummaryResponse, PublicTourReviewListResponse, PublicSiteReviewListResponse, PublicTourItineraryResponse, PublicTourRouteResponse, PublicTravelKnowledgeResponse, PublicTravelStatusResponse } from './types.js';
|
|
2
2
|
export type PublicApiClientOptions = {
|
|
3
3
|
baseUrl: string;
|
|
4
4
|
fetchImpl?: typeof fetch;
|
|
@@ -30,12 +30,14 @@ export declare const createPublicApiClient: (options: PublicApiClientOptions) =>
|
|
|
30
30
|
listPublicTourAccommodations(slug: string, params?: ListPublicTourAccommodationsParams): Promise<PublicApiResult<PublicTourAccommodationListResponse>>;
|
|
31
31
|
getPublicTourReviewsSummary(slug: string): Promise<PublicApiResult<PublicTourReviewsSummaryResponse>>;
|
|
32
32
|
listPublicTourReviews(slug: string, params?: ListPublicTourReviewsParams): Promise<PublicApiResult<PublicTourReviewListResponse>>;
|
|
33
|
+
listPublicSiteReviews(params?: ListPublicSiteReviewsParams): Promise<PublicApiResult<PublicSiteReviewListResponse>>;
|
|
33
34
|
listPublicTourRoute(slug: string, params?: ListPublicTourRouteParams): Promise<PublicApiResult<PublicTourRouteResponse>>;
|
|
34
35
|
listPublicTourItinerary(slug: string, params?: ListPublicTourItineraryParams): Promise<PublicApiResult<PublicTourItineraryResponse>>;
|
|
35
36
|
listPublicTourAvailability(slug: string, params?: ListPublicTourAvailabilityParams): Promise<PublicApiResult<PublicAvailabilityListResponse>>;
|
|
36
37
|
listPublicDestinations(params?: ListPublicDestinationsParams): Promise<PublicApiResult<PublicDestinationListResponse>>;
|
|
37
38
|
getPublicDestinationBySlug(slug: string): Promise<PublicApiResult<PublicDestinationDetailResponse>>;
|
|
38
39
|
createPublicInquiry(body: PublicInquiryRequest, idempotencyKey?: string): Promise<PublicApiResult<PublicInquiryResponse>>;
|
|
40
|
+
createPublicSupportRequest(body: PublicSupportRequest, idempotencyKey: string): Promise<PublicApiResult<PublicSupportRequestResponse>>;
|
|
39
41
|
createPublicBookingIntent(body: PublicBookingIntentRequest, idempotencyKey?: string): Promise<PublicApiResult<PublicBookingIntentResponse>>;
|
|
40
42
|
createPublicBrochureLead(body: PublicBrochureLeadRequest, idempotencyKey?: string): Promise<PublicApiResult<PublicBrochureLeadResponse>>;
|
|
41
43
|
getPublicHomepage(): Promise<PublicApiResult<PublicHomepageResponse>>;
|
|
@@ -68,5 +70,7 @@ export declare const createPublicApiClient: (options: PublicApiClientOptions) =>
|
|
|
68
70
|
getPublicSiteContentBookingCancellationPolicy(): Promise<PublicApiResult<PublicSiteTrustPageContentResponse>>;
|
|
69
71
|
getPublicSiteContentCookiePolicy(): Promise<PublicApiResult<PublicSiteTrustPageContentResponse>>;
|
|
70
72
|
getPublicSiteContentAccessibilityStatement(): Promise<PublicApiResult<PublicSiteTrustPageContentResponse>>;
|
|
73
|
+
/** The Iran country page's CMS-owned editorial composition (`/destinations/iran`). */
|
|
74
|
+
getPublicSiteContentDestinationIran(): Promise<PublicApiResult<PublicSiteBlockPageContentResponse>>;
|
|
71
75
|
getPublicTravelKnowledge(params: GetPublicTravelKnowledgeParams): Promise<PublicApiResult<PublicTravelKnowledgeResponse>>;
|
|
72
76
|
};
|
package/dist/client.js
CHANGED
|
@@ -91,7 +91,7 @@ const toQueryString = (params) => {
|
|
|
91
91
|
if (params?.[key]?.length)
|
|
92
92
|
search.set(key, params[key].join(','));
|
|
93
93
|
}
|
|
94
|
-
for (const key of ['includeFacets', 'hasUpcomingDepartures']) {
|
|
94
|
+
for (const key of ['includeFacets', 'hasUpcomingDepartures', 'isSignature']) {
|
|
95
95
|
if (params?.[key] !== undefined)
|
|
96
96
|
search.set(key, String(params[key]));
|
|
97
97
|
}
|
|
@@ -224,6 +224,9 @@ export const createPublicApiClient = (options) => {
|
|
|
224
224
|
listPublicTourReviews(slug, params) {
|
|
225
225
|
return requestJson(`${baseUrl}/api/v1/tours/${encodeURIComponent(slug)}/reviews${toPaginationQueryString(params)}`, options);
|
|
226
226
|
},
|
|
227
|
+
listPublicSiteReviews(params) {
|
|
228
|
+
return requestJson(`${baseUrl}/api/v1/reviews${toPaginationQueryString(params)}`, options);
|
|
229
|
+
},
|
|
227
230
|
listPublicTourRoute(slug, params) {
|
|
228
231
|
return requestJson(`${baseUrl}/api/v1/tours/${encodeURIComponent(slug)}/route${toPaginationQueryString(params)}`, options);
|
|
229
232
|
},
|
|
@@ -243,6 +246,13 @@ export const createPublicApiClient = (options) => {
|
|
|
243
246
|
const extra = idempotencyKey ? { 'idempotency-key': idempotencyKey } : undefined;
|
|
244
247
|
return postJson(`${baseUrl}/api/v1/inquiries`, body, options, extra);
|
|
245
248
|
},
|
|
249
|
+
// Contact Support form. The Idempotency-Key is required by the API; reuse it
|
|
250
|
+
// for every retry of the same payload so a retry never creates a second request.
|
|
251
|
+
createPublicSupportRequest(body, idempotencyKey) {
|
|
252
|
+
return postJson(`${baseUrl}/api/v1/support-requests`, body, options, {
|
|
253
|
+
'idempotency-key': idempotencyKey,
|
|
254
|
+
});
|
|
255
|
+
},
|
|
246
256
|
createPublicBookingIntent(body, idempotencyKey) {
|
|
247
257
|
const extra = idempotencyKey ? { 'idempotency-key': idempotencyKey } : undefined;
|
|
248
258
|
return postJson(`${baseUrl}/api/v1/booking-intents`, body, options, extra);
|
|
@@ -345,6 +355,10 @@ export const createPublicApiClient = (options) => {
|
|
|
345
355
|
getPublicSiteContentAccessibilityStatement() {
|
|
346
356
|
return requestJson(`${baseUrl}/api/v1/site-content/accessibility-statement`, options);
|
|
347
357
|
},
|
|
358
|
+
/** The Iran country page's CMS-owned editorial composition (`/destinations/iran`). */
|
|
359
|
+
getPublicSiteContentDestinationIran() {
|
|
360
|
+
return requestJson(`${baseUrl}/api/v1/site-content/destination-iran`, options);
|
|
361
|
+
},
|
|
348
362
|
getPublicTravelKnowledge(params) {
|
|
349
363
|
return requestJson(`${baseUrl}/api/v1/travel-knowledge${toTravelKnowledgeQueryString(params)}`, options);
|
|
350
364
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type GeneratedPublicApiVersion = '0.
|
|
2
|
-
export type GeneratedPublicApiPath = '/booking-intents' | '/booking-intents/{id}' | '/brochure-leads' | '/destinations' | '/destinations/{slug}' | '/homepage' | '/inquiries' | '/locales' | '/localization/previews/{candidateId}' | '/localization/releases/{releaseId}' | '/localization/ui-catalogs/{snapshotId}' | '/search' | '/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/tailor-made' | '/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 /locales' | 'GET /localization/previews/{candidateId}' | 'GET /localization/releases/{releaseId}' | 'GET /localization/ui-catalogs/{snapshotId}' | '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/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-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 /locales' | 'GET /localization/previews/{candidateId}' | 'GET /localization/releases/{releaseId}' | 'GET /localization/ui-catalogs/{snapshotId}' | '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/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-knowledge' | 'GET /travel-status' | 'GET /traveller-stories' | 'POST /booking-intents' | 'POST /brochure-leads' | 'POST /inquiries';
|
|
1
|
+
export type GeneratedPublicApiVersion = '0.16.0';
|
|
2
|
+
export type GeneratedPublicApiPath = '/booking-intents' | '/booking-intents/{id}' | '/brochure-leads' | '/destinations' | '/destinations/{slug}' | '/homepage' | '/inquiries' | '/locales' | '/localization/previews/{candidateId}' | '/localization/releases/{releaseId}' | '/localization/ui-catalogs/{snapshotId}' | '/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 /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 /support-requests';
|
|
4
|
+
export type GeneratedPublicApiActiveOperation = '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 /support-requests';
|
|
5
5
|
export type GeneratedPublicApiBlockedOperation = 'GET /booking-intents/{id}';
|
|
6
|
-
export type GeneratedPublicApiOperationId = 'getBookingIntent' | 'listPublicDestinations' | 'getPublicDestinationBySlug' | 'getPublicHomepage' | 'listPublicLocales' | 'getPublicLocalizationCandidatePreview' | 'getPublicLocalizationRelease' | 'getPublicUiCatalog' | 'getPublicSearchResults' | 'getPublicSearchSuggestions' | 'getPublicSiteContentAbout' | 'getPublicSiteContentAccessibilityStatement' | 'getPublicSiteContentBookingCancellationPolicy' | 'getPublicSiteContentContact' | 'getPublicSiteContentCookiePolicy' | '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' | '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' | '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' | 'PublicSiteChromeContent' | 'PublicSiteChromeContentResponse' | 'PublicSiteCta' | 'PublicSiteFeaturesResponse' | 'PublicSiteFeatureStates' | 'PublicSiteFooterNavGroup' | 'PublicSiteFooterNavGroupLink' | 'PublicSiteFooterPaymentNote' | 'PublicSiteFooterSupportBand' | 'PublicSiteHeaderMenuCategory' | 'PublicSiteHeaderMenuEditorial' | 'PublicSiteHeaderOffice' | 'PublicSiteHeaderQuickLink' | 'PublicSiteHeaderSearchShortcuts' | 'PublicSiteHomeContent' | 'PublicSiteHomeContentResponse' | 'PublicSiteHomeSection' | 'PublicSitemapEntry' | 'PublicSitemapResponse' | 'PublicSiteNavigationResponse' | 'PublicSiteNavItem' | 'PublicSiteRouteKey' | 'PublicSiteSocialLink' | 'PublicSiteTrustPageContent' | 'PublicSiteTrustPageContentResponse' | 'PublicSiteTrustPageSeo' | 'PublicSiteTrustSection' | 'PublicSiteTrustTitledItem' | 'PublicStaticLink' | 'PublicSurfiranOperationalUpdate' | 'PublicTourAccommodationListItem' | 'PublicTourAccommodationListResponse' | 'PublicTourCatalogDepartureSummary' | 'PublicTourCatalogFacetOption' | 'PublicTourCatalogMetadata' | 'PublicTourCategoryListItem' | 'PublicTourCategoryListResponse' | 'PublicTourDetail' | 'PublicTourDetailEditorial' | 'PublicTourDetailResponse' | 'PublicTourExperienceFrame' | 'PublicTourExperienceListItem' | 'PublicTourExperienceListResponse' | 'PublicTourItineraryDay' | 'PublicTourItineraryResponse' | 'PublicTourListItem' | 'PublicTourListResponse' | 'PublicTourMediaItem' | 'PublicTourQuestionListItem' | 'PublicTourQuestionListResponse' | 'PublicTourRatingBreakdownItem' | 'PublicTourReviewListItem' | 'PublicTourReviewListResponse' | 'PublicTourReviewsAggregate' | 'PublicTourReviewsSummary' | 'PublicTourReviewsSummaryResponse' | 'PublicTourRouteResponse' | 'PublicTourRouteStop' | 'PublicTourTailorJourney' | 'PublicTravelKnowledgeItem' | 'PublicTravelKnowledgeResponse' | 'PublicTravellerStoryListItem' | 'PublicTravellerStoryListResponse' | 'PublicTravelStatusCorrectionNotice' | 'PublicTravelStatusFreshness' | 'PublicTravelStatusHandoff' | 'PublicTravelStatusResponse' | 'PublicTravelStatusReviewerLabel' | 'PublicTravelStatusSection' | 'PublicTravelStatusState' | 'PublicTripBrief' | 'PublicUiCatalog' | 'PublicUiCatalogFallbackSummary' | 'PublicUiCatalogMessage' | 'PublicUiCatalogResponse' | 'PublicUiCatalogSnapshotId';
|
|
6
|
+
export type GeneratedPublicApiOperationId = 'getBookingIntent' | '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' | 'createPublicSupportRequest';
|
|
7
|
+
export type GeneratedPublicApiSchemaName = 'BookingIntentConflictErrorResponse' | 'BookingIntentResponse' | 'CanonicalIntakeAttribution' | 'CanonicalIntakeConsent' | 'CreateBookingIntentRequest' | 'CreateBookingIntentSuccessResponse' | 'CreateBrochureLeadRequest' | 'CreateBrochureLeadResponse' | 'CreateInquiryRequest' | 'CreateInquiryResponse' | 'CreateSupportRequestRequest' | 'CreateSupportRequestResponse' | 'GetBookingIntentStatusResponse' | 'PaginationMeta' | 'PublicApiAbuseBlockedError' | 'PublicApiError' | 'PublicApiInternalError' | 'PublicApiNotFoundError' | 'PublicApiNotImplementedError' | 'PublicApiRateLimitError' | 'PublicApiTravelStatusUnavailableError' | 'PublicApiValidationError' | 'PublicAvailabilityListItem' | 'PublicAvailabilityListResponse' | 'PublicBookingIntentLinks' | 'PublicBookingIntentPublicStatus' | 'PublicBookingIntentStatus' | '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';
|
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, PublicCityDestinationContent, PublicCityExperience, PublicCityImage, PublicCityLabelledValue, PublicCityLink, PublicCityNextPlace, PublicCityReason, PublicCityResource, PublicCityStayLink, PublicDestinationDetail, PublicTourListResponse, PublicTourCatalogMetadata, PublicTourCatalogFacetKey, PublicTourCatalogFacetOption, PublicTourCatalogSort, PublicTourCatalogDepartureSummary, PublicTourDetailResponse, PublicDepartureListResponse, PublicDestinationListResponse, PublicDestinationDetailResponse, PublicApiResult, ListPublicToursParams, GetPublicTourParams, PublicContentLocale, GetPublicTourPreviewParams, ListPublicDeparturesParams, ListPublicTourAvailabilityParams, ListPublicDestinationsParams, PublicInquiryRequest, PublicTourTailorJourney, PublicInquiryResponse, PublicBookingIntentRequest, PublicBookingIntentData, PublicBookingIntentResponse, PublicHomepageStats, PublicHomepageSeo, PublicHomepageResponse, PublicSitemapEntry, PublicSitemapResponse, PublicNavLink, PublicStaticLink, PublicSiteNavigationResponse, PublicTourCategoryListItem, PublicTourCategoryListResponse, PublicPriceDisplayByCurrency, PublicSearchResultItem, PublicSearchResultGroup, PublicSearchResultsResponse, PublicSearchSuggestion, PublicSearchSuggestionsResponse, PublicSiteRouteKey, PublicSiteCta, PublicSiteHomeSectionType, PublicSiteHomeSection, PublicSiteHomeContent, PublicSiteHomeContentResponse, PublicSiteNavItem, PublicSiteSocialPlatform, PublicSiteSocialLink, PublicSiteHeaderOffice, PublicSiteHeaderMenuCategory, PublicSiteHeaderMenuEditorial, PublicSiteHeaderQuickLink, PublicSiteHeaderSearchShortcuts, PublicSiteFooterNavGroupLink, PublicSiteFooterNavGroup, PublicSiteFooterSupportBand, PublicSiteFooterPaymentNote, PublicSiteChromeContent, PublicSiteChromeContentResponse, PublicSiteFeatureStates, PublicSiteFeaturesResponse, LocaleTag, LocalizationReleaseId, UiCatalogSnapshotId, CmsContentSnapshotId, PublicLocaleRegistryItem, PublicLocaleRegistryResponse, PublicLocalizationRelease, PublicLocalizationReleaseResponse, PublicUiCatalogMessage, PublicUiCatalog, PublicUiCatalogResponse, PublicSiteTrustSectionType, PublicSiteTrustTitledItem, PublicSiteTrustParagraphGroup, PublicSiteTrustTitledItemList, PublicSiteTrustBulletList, PublicSiteTrustSection, PublicSiteTrustPageSeo, PublicSiteTrustPageContent, PublicSiteTrustPageContentResponse, PublicTravelStatusState, PublicTravelStatusFreshness, PublicSurfiranOperationalUpdate, PublicTravelStatusResponse, PublicTravelKnowledgeType, PublicTravelKnowledgeItem, PublicTravelKnowledgeResponse, GetPublicSitemapParams, GetPublicSearchResultsParams, 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, PublicCityDestinationContent, PublicCityExperience, PublicCityImage, PublicCityLabelledValue, PublicCityLink, PublicCityNextPlace, PublicCityReason, PublicCityResource, PublicCityStayLink, PublicDestinationDetail, PublicTourListResponse, PublicTourCatalogMetadata, PublicTourCatalogFacetKey, PublicTourCatalogFacetOption, PublicTourCatalogSort, PublicTourCatalogStartingFrom, PublicTourCatalogDepartureSummary, PublicTourDetailResponse, PublicDepartureListResponse, PublicDestinationListResponse, PublicDestinationDetailResponse, PublicApiResult, ListPublicToursParams, GetPublicTourParams, PublicContentLocale, GetPublicTourPreviewParams, ListPublicDeparturesParams, ListPublicTourAvailabilityParams, ListPublicDestinationsParams, PublicInquiryRequest, PublicTourTailorJourney, PublicInquiryResponse, PublicSupportRequestCategory, PublicSupportRequest, PublicSupportRequestResponse, PublicBookingIntentRequest, PublicBookingIntentData, PublicBookingIntentResponse, PublicHomepageStats, PublicHomepageSeo, PublicHomepageResponse, PublicSitemapEntry, PublicSitemapResponse, PublicNavLink, PublicStaticLink, PublicSiteNavigationResponse, PublicTourCategoryListItem, PublicTourCategoryListResponse, PublicPriceDisplayByCurrency, PublicSearchResultItem, PublicSearchResultGroup, PublicSearchResultsResponse, PublicSearchSuggestion, PublicSearchSuggestionsResponse, PublicSiteRouteKey, PublicSiteCta, PublicSiteHomeSectionType, PublicSiteHomeSection, PublicSiteHomeContent, PublicSiteHomeContentResponse, PublicSiteNavItem, PublicSiteSocialPlatform, PublicSiteSocialLink, PublicSiteHeaderOffice, PublicSiteHeaderMenuCategory, PublicSiteHeaderMenuEditorial, PublicSiteHeaderQuickLink, PublicSiteHeaderSearchShortcuts, PublicSiteFooterNavGroupLink, PublicSiteFooterNavGroup, PublicSiteFooterSupportBand, PublicSiteFooterPaymentNote, PublicSiteChromeContent, PublicSiteChromeContentResponse, PublicSiteFeatureStates, PublicSiteFeaturesResponse, LocaleTag, LocalizationReleaseId, UiCatalogSnapshotId, CmsContentSnapshotId, PublicLocaleRegistryItem, PublicLocaleRegistryResponse, PublicLocalizationRelease, PublicLocalizationReleaseResponse, PublicUiCatalogMessage, PublicUiCatalog, PublicUiCatalogResponse, PublicSiteTrustSectionType, PublicSiteTrustTitledItem, PublicSiteTrustParagraphGroup, PublicSiteTrustTitledItemList, PublicSiteTrustBulletList, PublicSiteTrustSection, PublicSiteTrustPageSeo, PublicSiteTrustPageContent, PublicSiteTrustPageContentResponse, PublicSiteBlock, PublicSiteBlockPageContent, PublicSiteBlockPageContentResponse, PublicTravelStatusState, PublicTravelStatusFreshness, PublicSurfiranOperationalUpdate, PublicTravelStatusResponse, PublicTravelKnowledgeType, PublicTravelKnowledgeItem, PublicTravelKnowledgeResponse, GetPublicSitemapParams, GetPublicSearchResultsParams, GetPublicSearchSuggestionsParams, GetPublicTravelKnowledgeParams, ListPublicTourCategoriesParams, PublicTravellerStoryListItem, PublicTravellerStoryListResponse, ListPublicTravellerStoriesParams, PublicTourQuestionListItem, PublicTourQuestionListResponse, ListPublicTourQuestionsParams, PublicTourExperienceFrame, PublicTourExperienceListItem, PublicTourExperienceListResponse, ListPublicTourExperiencesParams, PublicTourAccommodationListItem, PublicTourAccommodationListResponse, ListPublicTourAccommodationsParams, PublicTourReviewsAggregate, PublicTourRatingBreakdownItem, PublicTourReviewsSummary, PublicTourReviewsSummaryResponse, PublicTourReviewListItem, PublicTourReviewListResponse, PublicSiteReviewListResponse, ListPublicSiteReviewsParams, 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_LOCALIZATION_NOT_FOUND' | 'PUBLIC_API_LOCALIZATION_UNAVAILABLE' | 'PUBLIC_API_CLIENT_TIMEOUT';
|
|
2
|
-
export type PublicApiV1Path = '/homepage' | '/site-navigation' | '/site-features' | '/locales' | '/localization/previews/{candidateId}' | '/localization/releases/{releaseId}' | '/localization/ui-catalogs/{snapshotId}' | '/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/tailor-made' | '/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' | '/locales' | '/localization/previews/{candidateId}' | '/localization/releases/{releaseId}' | '/localization/ui-catalogs/{snapshotId}' | '/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/tailor-made' | '/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' | '/site-content/destination-iran';
|
|
3
3
|
export type PublicError = {
|
|
4
4
|
code: string;
|
|
5
5
|
message: string;
|
|
@@ -346,10 +346,17 @@ export type PublicTourReviewListItem = {
|
|
|
346
346
|
rating: number;
|
|
347
347
|
title: string;
|
|
348
348
|
body: string;
|
|
349
|
-
/** Public attribution for the operator reply
|
|
349
|
+
/** Public attribution for the operator reply. */
|
|
350
350
|
replyAuthor?: string | null;
|
|
351
|
+
/** The operator's published reply text, or null when none was published. */
|
|
352
|
+
replyBody: string | null;
|
|
351
353
|
deepLink: string | null;
|
|
352
354
|
};
|
|
355
|
+
/** Site-wide staff-verified review cards: GET /api/v1/reviews. */
|
|
356
|
+
export type PublicSiteReviewListResponse = {
|
|
357
|
+
data: PublicTourReviewListItem[];
|
|
358
|
+
total: number;
|
|
359
|
+
};
|
|
353
360
|
/** Meal codes a day can include. Always returned in B,L,D order. */
|
|
354
361
|
export type PublicItineraryMealCode = 'B' | 'L' | 'D';
|
|
355
362
|
/**
|
|
@@ -591,12 +598,34 @@ export type PublicTourCatalogFacetOption = {
|
|
|
591
598
|
label: string;
|
|
592
599
|
count: number;
|
|
593
600
|
};
|
|
601
|
+
/**
|
|
602
|
+
* Lowest published starting price across every tour the filters match, not only
|
|
603
|
+
* the returned page, resolved through the same tiers as a tour card. Finished
|
|
604
|
+
* display strings only.
|
|
605
|
+
*/
|
|
606
|
+
export type PublicTourCatalogStartingFrom = {
|
|
607
|
+
startingPriceDisplay: string;
|
|
608
|
+
currency: string;
|
|
609
|
+
priceDisplayByCurrency: PublicPriceDisplayByCurrency;
|
|
610
|
+
/** How many matching tours publish a price; the minimum is over these. */
|
|
611
|
+
pricedTourCount: number;
|
|
612
|
+
};
|
|
594
613
|
export type PublicTourCatalogMetadata = {
|
|
595
614
|
asOf: string;
|
|
596
615
|
unfilteredTotal: number;
|
|
597
616
|
facets: Record<PublicTourCatalogFacetKey, PublicTourCatalogFacetOption[]>;
|
|
617
|
+
/**
|
|
618
|
+
* Null when no matching tour publishes a price or the priced tours span more
|
|
619
|
+
* than one currency.
|
|
620
|
+
*/
|
|
621
|
+
startingFrom: PublicTourCatalogStartingFrom | null;
|
|
598
622
|
};
|
|
599
|
-
|
|
623
|
+
/**
|
|
624
|
+
* `signature-rank` selects the operator's Signature band: only tours with a published
|
|
625
|
+
* positive `signatureRank` (null never appears in the band), rank ascending, ties by id.
|
|
626
|
+
* Pair it with `isSignature: true`.
|
|
627
|
+
*/
|
|
628
|
+
export type PublicTourCatalogSort = 'departure-soonest' | 'duration-asc' | 'duration-desc' | 'signature-rank' | 'default';
|
|
600
629
|
export type PublicTourDetailResponse = {
|
|
601
630
|
data: PublicTourDetail;
|
|
602
631
|
};
|
|
@@ -751,6 +780,27 @@ export type PublicInquiryResponse = {
|
|
|
751
780
|
leadEventId: string;
|
|
752
781
|
};
|
|
753
782
|
};
|
|
783
|
+
/** Closed server-owned vocabulary; crm-api maps each to a CRM request type, queue and priority. */
|
|
784
|
+
export type PublicSupportRequestCategory = 'travelling_now' | 'booking' | 'payment_refund' | 'visa' | 'insurance' | 'something_wrong' | 'something_else';
|
|
785
|
+
export type PublicSupportRequest = {
|
|
786
|
+
category: PublicSupportRequestCategory;
|
|
787
|
+
name: string;
|
|
788
|
+
email: string;
|
|
789
|
+
message: string;
|
|
790
|
+
/** Free text as the traveller typed it; never validated against a format or read back. */
|
|
791
|
+
bookingReference?: string | null;
|
|
792
|
+
currentLocation?: string | null;
|
|
793
|
+
/** Required by the API when category is travelling_now. */
|
|
794
|
+
phone?: string | null;
|
|
795
|
+
locale?: string | null;
|
|
796
|
+
};
|
|
797
|
+
export type PublicSupportRequestResponse = {
|
|
798
|
+
data: {
|
|
799
|
+
accepted: boolean;
|
|
800
|
+
/** Server-issued reference, e.g. SR-XXXX-XXXX-XXXX. */
|
|
801
|
+
reference: string;
|
|
802
|
+
};
|
|
803
|
+
};
|
|
754
804
|
export type PublicBookingIntentRequest = {
|
|
755
805
|
tourSlug: string;
|
|
756
806
|
departureId?: number | null;
|
|
@@ -980,7 +1030,7 @@ export type PublicTravelStatusResponse = {
|
|
|
980
1030
|
};
|
|
981
1031
|
};
|
|
982
1032
|
/** Closed public route vocabulary. Routing is resolved by the rendering layer. */
|
|
983
|
-
export type PublicSiteRouteKey = 'home' | 'tours' | 'tour-categories' | 'destinations' | 'about' | 'contact' | 'inquire' | 'faqs' | 'privacy' | 'terms' | 'responsible-travel' | 'iran-travel-status' | 'iran-visa-information' | 'money-in-iran' | 'travel-insurance' | 'health-safety-support' | 'booking-cancellation-policy' | 'cookie-policy' | 'accessibility-statement' | 'reviews' | 'travel-trade' | 'tailor-made' | 'ask-a-specialist' | 'journal' | 'travel-guide' | 'airport-transfers';
|
|
1033
|
+
export type PublicSiteRouteKey = 'home' | 'tours' | 'tour-categories' | 'destinations' | 'about' | 'contact' | 'inquire' | 'faqs' | 'privacy' | 'terms' | 'responsible-travel' | 'iran-travel-status' | 'iran-visa-information' | 'money-in-iran' | 'travel-insurance' | 'health-safety-support' | 'booking-cancellation-policy' | 'cookie-policy' | 'accessibility-statement' | 'destination-iran' | 'reviews' | 'travel-trade' | 'tailor-made' | 'ask-a-specialist' | 'journal' | 'travel-guide' | 'airport-transfers';
|
|
984
1034
|
export type PublicSiteCta = {
|
|
985
1035
|
label: string;
|
|
986
1036
|
routeKey: PublicSiteRouteKey;
|
|
@@ -1154,6 +1204,27 @@ export type PublicSiteTrustPageContent = {
|
|
|
1154
1204
|
export type PublicSiteTrustPageContentResponse = {
|
|
1155
1205
|
data: PublicSiteTrustPageContent | null;
|
|
1156
1206
|
};
|
|
1207
|
+
/** One published block of a registry-driven CMS page composition. */
|
|
1208
|
+
export type PublicSiteBlock = {
|
|
1209
|
+
/** One of the closed block types in the public block registry. */
|
|
1210
|
+
blockType: string;
|
|
1211
|
+
/** Stable authored id, unique within the page. Used as the DOM anchor. */
|
|
1212
|
+
blockId: string;
|
|
1213
|
+
/** Projected public-safe field values, shaped by the versioned block registry rather than this contract. */
|
|
1214
|
+
values: Record<string, unknown>;
|
|
1215
|
+
};
|
|
1216
|
+
/**
|
|
1217
|
+
* A block-only CMS page such as the Iran country page. There is no flat
|
|
1218
|
+
* trust-page snapshot, so the flat fields are empty strings and `blocks`
|
|
1219
|
+
* carries the page.
|
|
1220
|
+
*/
|
|
1221
|
+
export type PublicSiteBlockPageContent = PublicSiteTrustPageContent & {
|
|
1222
|
+
blocks: PublicSiteBlock[];
|
|
1223
|
+
};
|
|
1224
|
+
export type PublicSiteBlockPageContentResponse = {
|
|
1225
|
+
/** Null when no valid published composition exists for this page. */
|
|
1226
|
+
data: PublicSiteBlockPageContent | null;
|
|
1227
|
+
};
|
|
1157
1228
|
/**
|
|
1158
1229
|
* Effective on/off state for every known public website feature.
|
|
1159
1230
|
*
|
|
@@ -1329,6 +1400,7 @@ export type PublicApiV1RouteMap = {
|
|
|
1329
1400
|
'GET /destinations': PublicDestinationListResponse;
|
|
1330
1401
|
'GET /destinations/{slug}': PublicDestinationDetailResponse;
|
|
1331
1402
|
'POST /inquiries': PublicInquiryResponse;
|
|
1403
|
+
'POST /support-requests': PublicSupportRequestResponse;
|
|
1332
1404
|
'POST /booking-intents': PublicBookingIntentResponse;
|
|
1333
1405
|
'POST /brochure-leads': PublicBrochureLeadResponse;
|
|
1334
1406
|
'GET /travel-status': PublicTravelStatusResponse;
|
|
@@ -1351,6 +1423,7 @@ export type PublicApiV1RouteMap = {
|
|
|
1351
1423
|
'GET /site-content/booking-cancellation-policy': PublicSiteTrustPageContentResponse;
|
|
1352
1424
|
'GET /site-content/cookie-policy': PublicSiteTrustPageContentResponse;
|
|
1353
1425
|
'GET /site-content/accessibility-statement': PublicSiteTrustPageContentResponse;
|
|
1426
|
+
'GET /site-content/destination-iran': PublicSiteBlockPageContentResponse;
|
|
1354
1427
|
};
|
|
1355
1428
|
export type PublicApiResult<T> = {
|
|
1356
1429
|
ok: true;
|
|
@@ -1373,6 +1446,8 @@ export type ListPublicToursParams = {
|
|
|
1373
1446
|
journeyTypes?: string[];
|
|
1374
1447
|
months?: string[];
|
|
1375
1448
|
hasUpcomingDepartures?: boolean;
|
|
1449
|
+
/** Only tours staff flagged as Signature Trips. */
|
|
1450
|
+
isSignature?: boolean;
|
|
1376
1451
|
sort?: PublicTourCatalogSort;
|
|
1377
1452
|
includeFacets?: boolean;
|
|
1378
1453
|
limit?: number;
|
|
@@ -1420,6 +1495,10 @@ export type ListPublicTourAccommodationsParams = {
|
|
|
1420
1495
|
limit?: number;
|
|
1421
1496
|
};
|
|
1422
1497
|
export type PublicTourReviewsLimit = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
1498
|
+
export type ListPublicSiteReviewsParams = {
|
|
1499
|
+
/** Maximum review cards to return. Defaults to 50 when omitted; accepted range is 1 through 100. */
|
|
1500
|
+
limit?: number;
|
|
1501
|
+
};
|
|
1423
1502
|
export type ListPublicTourReviewsParams = {
|
|
1424
1503
|
/** Maximum review cards to return. Defaults to 3 when omitted; accepted range is 1 through 12. */
|
|
1425
1504
|
limit?: PublicTourReviewsLimit;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surfiran/public-api-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "TypeScript types and client for SURFIRAN CRM Public API V1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/
|
|
11
|
+
"url": "git+https://github.com/SURFIRAN/surfiran-public-api-client.git",
|
|
12
12
|
"directory": "."
|
|
13
13
|
},
|
|
14
14
|
"bugs": {
|
|
15
|
-
"url": "https://github.com/
|
|
15
|
+
"url": "https://github.com/SURFIRAN/surfiran-public-api-client/issues"
|
|
16
16
|
},
|
|
17
|
-
"homepage": "https://github.com/
|
|
17
|
+
"homepage": "https://github.com/SURFIRAN/surfiran-public-api-client",
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public",
|
|
20
20
|
"registry": "https://registry.npmjs.org"
|
|
@@ -44,15 +44,19 @@
|
|
|
44
44
|
"dist/types.js"
|
|
45
45
|
],
|
|
46
46
|
"scripts": {
|
|
47
|
-
"build": "
|
|
47
|
+
"build": "node scripts/build.cjs",
|
|
48
48
|
"generate": "node scripts/generate-public-api-v1.cjs",
|
|
49
|
-
"prepack": "npm run verify:contract && npm run verify:package && npm run verify:generated && npm run typecheck && npm test && npm run build",
|
|
49
|
+
"prepack": "npm run verify:contract && npm run verify:package && npm run verify:repository && npm run verify:generated && npm run typecheck && npm test && npm run build",
|
|
50
50
|
"typecheck": "tsc --noEmit",
|
|
51
51
|
"test": "vitest run",
|
|
52
52
|
"verify:contract": "node scripts/verify-contract.cjs",
|
|
53
|
+
"verify:api-contract-artifact": "node scripts/verify-api-contract-artifact.cjs",
|
|
54
|
+
"sync:api-contract-artifact": "node scripts/sync-api-contract-artifact.cjs",
|
|
53
55
|
"verify:generated": "node scripts/verify-generated.cjs",
|
|
54
56
|
"verify:package": "node scripts/verify-package.cjs",
|
|
55
57
|
"verify:pack": "node scripts/verify-pack.cjs",
|
|
58
|
+
"verify:repository": "node scripts/verify-standalone-repository.cjs",
|
|
59
|
+
"verify:reproducibility": "node scripts/verify-reproducibility.cjs",
|
|
56
60
|
"verify:publication-preflight": "node scripts/verify-publication-preflight.cjs",
|
|
57
61
|
"create:provenance": "node scripts/create-provenance.cjs",
|
|
58
62
|
"verify:provenance": "node scripts/verify-provenance.cjs"
|