@surfiran/public-api-client 0.23.0 → 0.24.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 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.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.16.0`.
4
4
 
5
5
  Repository: `SURFIRAN/surfiran-public-api-client`
6
6
 
@@ -18,7 +18,7 @@ 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.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.
21
+ The checked-in `0.24.0` snapshot and provenance come from the `SURFIRAN/surfiran-crm-api` main-branch artifact `public-api-contract-b502fc7e03f2d13bbcc72a0570d9d92bf39f5611-35221887128-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
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
24
 
@@ -92,6 +92,6 @@ Published versions are immutable. Rollback means pinning consumers to the previo
92
92
  - This README owns local setup, contract synchronization, CI, publication, and rollback guidance.
93
93
  - [AGENTS.md](AGENTS.md) owns agent operating instructions.
94
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.
95
+ - [Contract snapshot](contract/public-api-v1.yaml) and [provenance](contract/provenance.json) are immutable evidence for `0.24.0`, not current API ownership authorities.
96
96
 
97
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/types.d.ts CHANGED
@@ -419,12 +419,39 @@ export type PublicAvailabilityListItem = {
419
419
  priceDisplayByCurrency: PublicPriceDisplayByCurrency;
420
420
  promoLabel?: string | null;
421
421
  publicNote?: string | null;
422
+ /**
423
+ * Occupancy basis of the published price. For a structured departure or
424
+ * package price it is the basis of that same price tier (the basis
425
+ * roomOptions are derived from); null for a price that is not per person
426
+ * (a total private-group price).
427
+ */
422
428
  roomBasis?: 'twin_share' | 'double_share' | 'single_room' | 'triple_share' | 'family_room' | null;
429
+ /**
430
+ * Published room and private-departure price choices. Absent when the
431
+ * authoritative pricing model has not published a complete option. At most
432
+ * one single_room option is present: on a single-room-basis price it is the
433
+ * base price with no supplement fields; on a sharing-basis price it appears
434
+ * only when a positive single-room supplement applies, priced as base plus
435
+ * supplement, with supplementDisplay.
436
+ */
423
437
  roomOptions?: Array<{
424
438
  basis: 'twin_share' | 'double_share' | 'single_room' | 'private_departure';
425
439
  label: string;
426
440
  priceDisplay: string;
427
441
  priceDisplayByCurrency: PublicPriceDisplayByCurrency;
442
+ /**
443
+ * Present only on a single_room option priced as the sharing-basis price
444
+ * plus a positive single-room supplement. The per-person supplement alone
445
+ * as a finished display string (no "From" prefix), already included in
446
+ * priceDisplay. Render as-is; never parse or use for arithmetic.
447
+ */
448
+ supplementDisplay?: string;
449
+ /**
450
+ * Present exactly when supplementDisplay is present. The same supplement
451
+ * per public display currency; null where no approved rate exists.
452
+ * Display only, never for arithmetic.
453
+ */
454
+ supplementDisplayByCurrency?: PublicPriceDisplayByCurrency;
428
455
  minimumTravelers?: number;
429
456
  }>;
430
457
  remainingCapacityBucket: 'available' | 'limited' | 'full' | 'unconstrained' | 'unknown';
@@ -712,6 +739,10 @@ export type PublicInquiryRequest = {
712
739
  clickId?: string | null;
713
740
  } | null;
714
741
  consent?: {
742
+ /**
743
+ * Consent purpose. `departure_news` records an opt-in to departure-news
744
+ * emails; other values are accepted but not recorded as that opt-in.
745
+ */
715
746
  purpose: string;
716
747
  policyVersion: string;
717
748
  /** ISO-8601 timestamp with an explicit timezone. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@surfiran/public-api-client",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "TypeScript types and client for SURFIRAN CRM Public API V1",
5
5
  "type": "module",
6
6
  "engines": {