@peektravel/app-utilities 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -19,10 +19,20 @@ interface GraphQLBody<T> {
19
19
  errors?: unknown[];
20
20
  }
21
21
  interface GraphQLClientOptions {
22
- /** Base URL of the backoffice GraphQL gateway (no trailing slash). */
23
- baseUrl: string;
24
- /** Peek app ID, used in the endpoint path. */
25
- appId: string;
22
+ /**
23
+ * The install's app endpoint URL (the install webhook's `apiUrl`). When set it
24
+ * is the **sole request URL** — every GraphQL call POSTs to it unmodified, and
25
+ * `baseUrl`/`appId`/`endpointPathPrefix`/`endpointName` are ignored for URL
26
+ * construction. Takes precedence over `baseUrl`.
27
+ */
28
+ apiUrl?: string;
29
+ /**
30
+ * Base URL of the backoffice GraphQL gateway (no trailing slash). Used only
31
+ * when `apiUrl` is not set; the URL is `baseUrl/appId/[prefix/]endpointName`.
32
+ */
33
+ baseUrl?: string;
34
+ /** Peek app ID, used in the endpoint path (legacy `baseUrl` mode only). */
35
+ appId?: string;
26
36
  /** API gateway key sent as the `pk-api-key` header. Omitted from headers when absent (v2 mode). */
27
37
  gatewayKey?: string;
28
38
  /** Supplies a valid bearer token for each request. */
@@ -1536,9 +1546,29 @@ interface BaseAccessServiceConfig {
1536
1546
  jwtSecret: string;
1537
1547
  /** JWT issuer — the app name / app ID. */
1538
1548
  issuer: string;
1539
- /** App ID, used in the gateway endpoint path. */
1540
- appId: string;
1541
- /** Override the gateway base URL. Default: per-service. */
1549
+ /**
1550
+ * The install's **app endpoint URL** — persist the install webhook's `apiUrl`
1551
+ * and pass it here. When set it is used **as given**: for Peek it is the sole
1552
+ * request URL (every call POSTs to it); for CNG/ACME it is the base and the
1553
+ * REST path is appended. No app-id/gateway segment is inserted, so `appId` is
1554
+ * not required. This is the forward-looking way to target an install — prefer
1555
+ * it over `baseUrl`/`appId`, which are deprecated (the hardcoded base-URL
1556
+ * fallbacks will be removed and a URL will become required in a future release).
1557
+ */
1558
+ apiUrl?: string;
1559
+ /**
1560
+ * App ID, inserted into the gateway endpoint path.
1561
+ *
1562
+ * @deprecated Required only in the legacy `baseUrl` mode. Prefer `apiUrl` (the
1563
+ * install's app endpoint), which needs no app-id segment.
1564
+ */
1565
+ appId?: string;
1566
+ /**
1567
+ * Override the gateway base URL. Default: per-service.
1568
+ *
1569
+ * @deprecated Prefer `apiUrl` (the install's app endpoint, used as given). The
1570
+ * hardcoded per-service default will be removed and a URL will become required.
1571
+ */
1542
1572
  baseUrl?: string;
1543
1573
  /** JWT lifetime in seconds. Default: 3600. */
1544
1574
  tokenTtlSeconds?: number;
@@ -1803,20 +1833,34 @@ declare const PEEK_PLATFORMS: readonly ["peek", "cng", "acme"];
1803
1833
  * claim is the single thing that identifies which platform a request came from.
1804
1834
  */
1805
1835
  type PeekPlatform = (typeof PEEK_PLATFORMS)[number];
1806
- /** User context embedded in a Peek auth token. */
1836
+ /**
1837
+ * User context embedded in a Peek auth token.
1838
+ *
1839
+ * Every field is nullable: the token is untrusted even after its signature
1840
+ * verifies, so a claim may be absent, `null`, or a sentinel (`""`, `"null"`)
1841
+ * that this package normalizes to `null`. Never assume a field is populated —
1842
+ * always null-check.
1843
+ */
1807
1844
  interface PeekAuthTokenUser {
1808
- /** User's email address. */
1809
- email: string;
1810
- /** User's Peek account ID */
1811
- id: string;
1812
- /** Whether the user has admin privileges. */
1813
- isAdmin: boolean;
1814
- /** User's locale (e.g. `"en"`). */
1815
- locale: string;
1816
- /** User's display name. */
1817
- name: string;
1818
- /** Which platform embedded the app for this session. */
1819
- platform: PeekPlatform;
1845
+ /** User's email address, or `null` if the token omits it. */
1846
+ email: string | null;
1847
+ /**
1848
+ * The user's own Peek user ID — it identifies the signed-in person, **not**
1849
+ * the account or partner they belong to. Use it only to key the user; never
1850
+ * treat it as an account/partner id. `null` when the token omits it.
1851
+ */
1852
+ id: string | null;
1853
+ /** Whether the user has admin privileges, or `null` if the token omits it. */
1854
+ isAdmin: boolean | null;
1855
+ /** User's locale (e.g. `"en"`), or `null` if the token omits it. */
1856
+ locale: string | null;
1857
+ /** User's display name, or `null` if the token omits it. */
1858
+ name: string | null;
1859
+ /**
1860
+ * Which platform embedded the app for this session, or `null` when the token
1861
+ * omits it or reports one this version of the package doesn't recognize.
1862
+ */
1863
+ platform: PeekPlatform | null;
1820
1864
  }
1821
1865
  /** Claims returned by {@link PeekAccessService.verifyPeekAuthToken}. */
1822
1866
  interface PeekAuthTokenClaims {
@@ -1824,8 +1868,11 @@ interface PeekAuthTokenClaims {
1824
1868
  installId: string;
1825
1869
  /** App display version at time of issuance. */
1826
1870
  displayVersion: string;
1827
- /** Authenticated user context. */
1828
- user: PeekAuthTokenUser;
1871
+ /**
1872
+ * Authenticated user context, or `null` when the token carries no `user`
1873
+ * block. Do not assume a session token always names a user.
1874
+ */
1875
+ user: PeekAuthTokenUser | null;
1829
1876
  }
1830
1877
  /** The Peek account an install belongs to, as reported on an install webhook. */
1831
1878
  interface InstallWebhookAccount {
@@ -1935,13 +1982,15 @@ declare class PeekAccessService {
1935
1982
  * malformed
1936
1983
  * - `TokenExpiredError` — past `exp`
1937
1984
  * - `NotBeforeError` — before `nbf`
1938
- * - `InvalidPeekTokenError` — signature valid but the `user` block is missing
1939
- * its `id`
1985
+ *
1986
+ * Claim *extraction* is defensive: once the signature verifies, a token with
1987
+ * no `user` block yields `claims.user === null`, and any individual user field
1988
+ * that is absent or a sentinel (`""`, `"null"`) is normalized to `null`. This
1989
+ * method never throws on a shape problem — only on a verification failure.
1940
1990
  *
1941
1991
  * @throws {JsonWebTokenError} signature invalid or token malformed
1942
1992
  * @throws {TokenExpiredError} token has expired
1943
1993
  * @throws {NotBeforeError} token not yet valid
1944
- * @throws {InvalidPeekTokenError} verified token has no `user.id`
1945
1994
  */
1946
1995
  verifyPeekAuthToken(token: string): PeekAuthTokenClaims;
1947
1996
  /**
@@ -2090,12 +2139,22 @@ declare class PeekAccessService {
2090
2139
  }
2091
2140
 
2092
2141
  interface RestClientOptions$1 {
2093
- /** Base URL of the backoffice gateway (no trailing slash). */
2094
- baseUrl: string;
2095
- /** App ID, used in the endpoint path. */
2096
- appId: string;
2097
- /** Fixed extendable slug inserted between `appId` and the REST path. */
2098
- extendableSlug: string;
2142
+ /**
2143
+ * The install's app endpoint URL (the install webhook's `apiUrl`). When set it
2144
+ * is the **base URL** and only the REST path is appended (`apiUrl/path`) —
2145
+ * `baseUrl`/`appId`/`extendableSlug` are ignored. Takes precedence over
2146
+ * `baseUrl`.
2147
+ */
2148
+ apiUrl?: string;
2149
+ /**
2150
+ * Base URL of the backoffice gateway (no trailing slash). Used only when
2151
+ * `apiUrl` is not set; the URL is `baseUrl/appId/extendableSlug/path`.
2152
+ */
2153
+ baseUrl?: string;
2154
+ /** App ID, used in the endpoint path (legacy `baseUrl` mode only). */
2155
+ appId?: string;
2156
+ /** Fixed extendable slug inserted between `appId` and the REST path (legacy mode). */
2157
+ extendableSlug?: string;
2099
2158
  /** Supplies a valid bearer token for each request. */
2100
2159
  getToken: () => string;
2101
2160
  /** Backoff delays (ms) applied on successive HTTP 429 responses. */
@@ -2217,12 +2276,22 @@ declare class CngAccessService {
2217
2276
  }
2218
2277
 
2219
2278
  interface RestClientOptions {
2220
- /** Base URL of the backoffice gateway (no trailing slash). */
2221
- baseUrl: string;
2222
- /** App ID, used in the endpoint path. */
2223
- appId: string;
2224
- /** Fixed extendable slug inserted between `appId` and the REST path. */
2225
- extendableSlug: string;
2279
+ /**
2280
+ * The install's app endpoint URL (the install webhook's `apiUrl`). When set it
2281
+ * is the **base URL** and only the REST path is appended (`apiUrl/path`) —
2282
+ * `baseUrl`/`appId`/`extendableSlug` are ignored. Takes precedence over
2283
+ * `baseUrl`.
2284
+ */
2285
+ apiUrl?: string;
2286
+ /**
2287
+ * Base URL of the backoffice gateway (no trailing slash). Used only when
2288
+ * `apiUrl` is not set; the URL is `baseUrl/appId/extendableSlug/path`.
2289
+ */
2290
+ baseUrl?: string;
2291
+ /** App ID, used in the endpoint path (legacy `baseUrl` mode only). */
2292
+ appId?: string;
2293
+ /** Fixed extendable slug inserted between `appId` and the REST path (legacy mode). */
2294
+ extendableSlug?: string;
2226
2295
  /** Supplies a valid bearer token for each request. */
2227
2296
  getToken: () => string;
2228
2297
  /** Backoff delays (ms) applied on successive HTTP 429 responses. */
@@ -2341,6 +2410,52 @@ declare class AcmeAccessService {
2341
2410
  getAllActivities(): Promise<AcmeActivity[]>;
2342
2411
  }
2343
2412
 
2413
+ /**
2414
+ * Factory that turns a persisted install (or a parsed install webhook) into the
2415
+ * right access service for its platform, wired to the install's own app
2416
+ * endpoint.
2417
+ *
2418
+ * The install webhook is the only source of an install's `platform` and `apiUrl`
2419
+ * (see `src/models/peek/install.ts`), and those two facts are exactly what's
2420
+ * needed to target it: `platform` picks the service class, and `apiUrl` is used
2421
+ * **as given** as that service's endpoint. This helper encodes that mapping so a
2422
+ * consumer that persisted an install can construct its client in one call
2423
+ * instead of switching on the platform and hand-wiring the URL.
2424
+ */
2425
+
2426
+ /**
2427
+ * The per-install facts needed to build an access service — a structural subset
2428
+ * of {@link InstallWebhook}, so a persisted install record (or the webhook event
2429
+ * itself) satisfies it directly.
2430
+ */
2431
+ interface InstallAccessTarget {
2432
+ /** Which platform serves the install (the install webhook's `platform`). */
2433
+ platform: PeekPlatform | null;
2434
+ /** The install's app endpoint URL (the install webhook's `apiUrl`), used as given. */
2435
+ apiUrl: string;
2436
+ /** The install id (the install webhook's `installId`) — becomes the JWT subject. */
2437
+ installId: string;
2438
+ }
2439
+ /**
2440
+ * The per-app credentials/options shared by every access service — everything
2441
+ * except the per-install `installId`/`apiUrl` (supplied by the target) and the
2442
+ * deprecated `appId`/`baseUrl`/`mode` URL controls (superseded by `apiUrl`).
2443
+ * `gatewayKey` is accepted for Peek and ignored by CNG/ACME.
2444
+ */
2445
+ type InstallAccessConfig = Omit<PeekAccessServiceConfig, "installId" | "apiUrl" | "appId" | "baseUrl" | "mode">;
2446
+ /** The union of access services this factory can return, narrowed by `platform`. */
2447
+ type InstallAccessService = PeekAccessService | CngAccessService | AcmeAccessService;
2448
+ /**
2449
+ * Builds the access service for `install.platform`, using `install.apiUrl` as
2450
+ * the service's endpoint. Narrow the return by `install.platform` (or
2451
+ * `instanceof`) to reach a platform-specific surface.
2452
+ *
2453
+ * @throws {Error} when `install.platform` is `null` or unrecognised — an install
2454
+ * with an unknown platform has no service to route to, and silently defaulting
2455
+ * would point it at the wrong gateway.
2456
+ */
2457
+ declare function createAccessServiceForInstall(install: InstallAccessTarget, config: InstallAccessConfig): InstallAccessService;
2458
+
2344
2459
  /**
2345
2460
  * Public webhook surface for bookings.
2346
2461
  *
@@ -2432,16 +2547,24 @@ declare function parseWaiverWebhook(payload: unknown, options?: AccessOptions):
2432
2547
  * POSTs when an app is installed, uninstalled, or updated.
2433
2548
  *
2434
2549
  * That delivery carries two things at once: a **signed `app_registry_v2` JWT**
2435
- * (the security boundary) and a plain **JSON body** (the enrichment channel).
2550
+ * (the security boundary) and a plain **JSON body** (the event payload).
2436
2551
  * `parseInstallWebhook` verifies the JWT and merges both into this shape, so a
2437
2552
  * consumer sees one clean, flat, JSON-safe record instead of two differently
2438
- * shaped payloads. The verified JWT is authoritative for the fields it carries
2439
- * (`installId`, `accountId`, `status`, `displayVersion`, `user`); the JSON body
2440
- * is the only source of `accountName`, `platform`, and `isTest`.
2441
- *
2442
- * It is also the single origin of the account id in the whole system: no
2443
- * GraphQL read returns it, so whatever a consumer persists from this event is
2444
- * all it will ever have.
2553
+ * shaped payloads. The **JSON body is the source of the event data** — it
2554
+ * carries every field below; the verified JWT authenticates the delivery and
2555
+ * acts as the **fallback** for the fields it also happens to carry (`installId`,
2556
+ * `accountId`, `status`, `displayVersion`, `user`) when the body omits them.
2557
+ *
2558
+ * It is also the single origin of the account id (and the `apiUrl`/`timezone`)
2559
+ * in the whole system: no GraphQL read returns them, so whatever a consumer
2560
+ * persists from this event is all it will ever have.
2561
+ *
2562
+ * **Every install event is a full snapshot — upsert by `installId`.** An
2563
+ * `update_installed` event carries the *same complete record* as the original
2564
+ * `installed` event, so treat each delivery as an upsert keyed by `installId`
2565
+ * and overwrite the stored fields with the incoming ones. This is how the
2566
+ * registry pushes changes — e.g. a new `apiUrl` — so a consumer that only reads
2567
+ * the first `installed` event and ignores later updates will keep stale data.
2445
2568
  */
2446
2569
 
2447
2570
  /**
@@ -2460,9 +2583,10 @@ type InstallStatus = (typeof INSTALL_STATUSES)[number];
2460
2583
  * returns is the shape a consumer persists and later rehydrates. There is
2461
2584
  * deliberately no nested identity object and no second representation.
2462
2585
  *
2463
- * Fields sourced from the **verified JWT** (`installId`, `accountId`, `status`,
2464
- * `rawStatus`, `displayVersion`, `user`) are trustworthy; the enrichment fields
2465
- * (`accountName`, `platform`, `isTest`) come from the unauthenticated JSON body.
2586
+ * Every field is read from the **JSON body** first, falling back to the
2587
+ * **verified JWT** for the fields it also carries (`installId`, `accountId`,
2588
+ * `status`, `displayVersion`, `user`). The delivery is authenticated as a whole
2589
+ * by the JWT signature, so the body is trusted within a verified request.
2466
2590
  */
2467
2591
  interface InstallWebhook {
2468
2592
  /** Install ID — Peek-assigned UUID. Also the JWT subject (`sub`). */
@@ -2490,6 +2614,31 @@ interface InstallWebhook {
2490
2614
  platform: PeekPlatform | null;
2491
2615
  /** Whether this is a test account. Defaults to `false` when not reported. */
2492
2616
  isTest: boolean;
2617
+ /**
2618
+ * The account's IANA timezone (e.g. `"America/New_York"`), or `""` when the
2619
+ * body omits it.
2620
+ *
2621
+ * **Persist this per install.** It has no source other than this event, and
2622
+ * downstream date/time handling for the install (scheduling, day boundaries,
2623
+ * display) needs the account's own timezone rather than the server's.
2624
+ */
2625
+ timezone: string;
2626
+ /**
2627
+ * The **app endpoint URL** the registry serves this install from (the body's
2628
+ * `api.url`), or `""` when the body omits it.
2629
+ *
2630
+ * Use it **as given** as the base URL for this install's API calls — do not
2631
+ * decompose it or append your own app id. The registry may tag traffic with an
2632
+ * app id in the path; that is the registry's concern and opaque to callers, so
2633
+ * hit the URL unmodified.
2634
+ *
2635
+ * **Persist this per install, and refresh it on every install event.** It is
2636
+ * install-specific, has no source other than this webhook, and the registry
2637
+ * can change it: an `update_installed` event redelivers the full record with a
2638
+ * (possibly new) `apiUrl`, so re-key by `installId` and overwrite the stored
2639
+ * URL whenever an event arrives.
2640
+ */
2641
+ apiUrl: string;
2493
2642
  /**
2494
2643
  * The lifecycle status, or `null` when the registry sent a status this
2495
2644
  * version of the package does not know. Handle `null` explicitly — treating
@@ -2502,7 +2651,8 @@ interface InstallWebhook {
2502
2651
  displayVersion: string;
2503
2652
  /**
2504
2653
  * The user that triggered the event, or `null` for system-initiated events
2505
- * (install lifecycle changes are often system-initiated). From the JWT.
2654
+ * (install lifecycle changes are often system-initiated). Read from the body's
2655
+ * `modified_by`, falling back to the JWT's `user`.
2506
2656
  */
2507
2657
  user: PeekAuthTokenUser | null;
2508
2658
  }
@@ -2511,12 +2661,14 @@ interface InstallWebhook {
2511
2661
  * Verifies an install-status webhook token and merges it with the delivered
2512
2662
  * JSON body into one flat {@link InstallWebhook}.
2513
2663
  *
2514
- * The **verified token** is the authoritative source of `installId`,
2515
- * `accountId`, `status`, `displayVersion`, and `user`. The **JSON body** — which
2516
- * is not signed and so is trusted only for fields the token cannot carry —
2517
- * supplies `accountName`, `platform`, and `isTest`. A missing or malformed body
2518
- * degrades those three to `""`/`null`/`false`; it never overrides an
2519
- * authenticated field and never throws.
2664
+ * The **JSON body** is the source of the event data — `installId`, `accountId`,
2665
+ * `accountName`, `platform`, `isTest`, `timezone`, `apiUrl`, `status`,
2666
+ * `displayVersion`, and `user`. The **verified token** authenticates the whole
2667
+ * delivery and is the **fallback** for the fields it also carries (`installId`,
2668
+ * `accountId`, `status`, `displayVersion`, `user`) when the body omits them. A
2669
+ * missing or malformed body degrades the body-only fields (`accountName`,
2670
+ * `platform`, `isTest`, `timezone`, `apiUrl`) to `""`/`null`/`false` and leans
2671
+ * on the token for the rest; it never throws.
2520
2672
  *
2521
2673
  * Signature verification is strict: the HMAC signature (with `secret`), the
2522
2674
  * token expiry, the `"app_registry_v2"` issuer, and the `"Joken"` audience are
@@ -2644,19 +2796,6 @@ declare class PeekHttpError extends Error {
2644
2796
  readonly body: unknown;
2645
2797
  constructor(statusCode: number, url: string, body: unknown, message?: string);
2646
2798
  }
2647
- /**
2648
- * Thrown when an `app_registry_v2` token passes signature/issuer/audience
2649
- * verification but its `user` block is missing a required `id`. The signature is
2650
- * authentic, so this signals a structurally malformed token from the app
2651
- * registry rather than a forged one — distinct from the `jsonwebtoken`
2652
- * `JsonWebTokenError` family. The offending field is preserved on
2653
- * {@link InvalidPeekTokenError.field}.
2654
- */
2655
- declare class InvalidPeekTokenError extends Error {
2656
- /** The token field that was missing or empty (e.g. `"user.id"`). */
2657
- readonly field: string;
2658
- constructor(field: string);
2659
- }
2660
2799
  /**
2661
2800
  * Thrown when a payment or booking-modification operation is called on an
2662
2801
  * access service that was constructed without `fullCustomerAccess` (PII access
@@ -2697,4 +2836,4 @@ declare class AcmeApiError extends Error {
2697
2836
  constructor(statusCode: number, body: unknown, message?: string);
2698
2837
  }
2699
2838
 
2700
- export { ACTIVITY_PRODUCT_TYPE, ADD_ON_PRODUCT_TYPE, type AccessOptions, type AccountUser, AccountUserService, type AccountUserServiceOptions, AcmeAccessService, type AcmeAccessServiceConfig, type AcmeActivity, type AcmeActivityTicket, AcmeApiError, AcmeProductService, type Activity, type ActivityOverrides, type ActivityTicket, type AddAddonInput, AdminAccountRequiredError, type Agent, type AssignGuideResult, type AssignedActivity, type AssignedResource, type Availability, AvailabilityService, type AvailabilityTime, type AvailabilityTimesQuery, type Booking, type BookingAddon, type BookingAddonMoney, type BookingAddonOption, type BookingAddons, type BookingAddonsMutationResult, type BookingPaymentsOnFile, type BookingReadOptions, type BookingSearchBy, BookingService, type BookingServiceOptions, type BookingTimeRangeSearch, type CancelBookingResult, type Channel, type ClearOverridesInput, CngAccessService, type CngAccessServiceConfig, CngApiError, CngProductService, type CreateBookingGuest, type CreateBookingInput, type CreateBookingTicket, type CreateEngineInput, type CreatePromoCodeInput, type CreatedBooking, type CreatedPricingEngine, type CreatedPromoCode, type CustomQuestionAnswer, type DailyNote, DailyNoteService, type Duration, type Guest, type GuestMetadata, type Guide, type GuideAssignment, INSTALL_STATUSES, type InstallStatus, type InstallWebhook, type InstallWebhookAccount, type InstallWebhookClaims, InvalidPeekTokenError, type InvoiceLinkResult, type Logger, type MakePaymentInput, type MakePaymentResult, type Membership, type MembershipPurchaseInput, MembershipService, type NoteMode, type Payment, type PaymentSource, PeekAccessService, type PeekAccessServiceConfig, type PeekAuthTokenClaims, type PeekAuthTokenUser, PeekGraphQLError, PeekHttpError, type PeekPlatform, PiiAccessDisabledError, type Price, type PricingActivityContext, type PricingEngine, type PricingMoney, type PricingNamedRef, type PricingOverride, type PricingOverrideFilter, PricingService, type Product, type ProductMeetingLocation, ProductService, type ProductServiceOptions, type ProductTicket, type PromoCode, type PromoCodeFixedAmount, PromoCodeService, type PromoCodeServiceOptions, type PurchasedMembership, RENTAL_PRODUCT_TYPE, RateLimitError, type RefundInput, type RefundResult, ResellerService, type ResolvedOverride, type ResolvedPricingOverride, type ResolvedResourceOption, type Resource, type ResourceOptionOverride, type ResourceOptionQuantity, type ResourcePool, type ResourcePoolAccountUser, type ResourcePoolAssignment, type ResourcePoolMode, ResourcePoolService, type Review, ReviewService, type Ticket, type Timeslot, type TimeslotFilter, TimeslotService, type UpdateEngineInput, type UpdateTimeslotResult, type UpsertOverridesInput, type UpsertOverridesResult, type Waiver, noopLogger, parseBookingWebhook, parseInstallWebhook, parseWaiverWebhook, verifyInstallWebhook };
2839
+ export { ACTIVITY_PRODUCT_TYPE, ADD_ON_PRODUCT_TYPE, type AccessOptions, type AccountUser, AccountUserService, type AccountUserServiceOptions, AcmeAccessService, type AcmeAccessServiceConfig, type AcmeActivity, type AcmeActivityTicket, AcmeApiError, AcmeProductService, type Activity, type ActivityOverrides, type ActivityTicket, type AddAddonInput, AdminAccountRequiredError, type Agent, type AssignGuideResult, type AssignedActivity, type AssignedResource, type Availability, AvailabilityService, type AvailabilityTime, type AvailabilityTimesQuery, type Booking, type BookingAddon, type BookingAddonMoney, type BookingAddonOption, type BookingAddons, type BookingAddonsMutationResult, type BookingPaymentsOnFile, type BookingReadOptions, type BookingSearchBy, BookingService, type BookingServiceOptions, type BookingTimeRangeSearch, type CancelBookingResult, type Channel, type ClearOverridesInput, CngAccessService, type CngAccessServiceConfig, CngApiError, CngProductService, type CreateBookingGuest, type CreateBookingInput, type CreateBookingTicket, type CreateEngineInput, type CreatePromoCodeInput, type CreatedBooking, type CreatedPricingEngine, type CreatedPromoCode, type CustomQuestionAnswer, type DailyNote, DailyNoteService, type Duration, type Guest, type GuestMetadata, type Guide, type GuideAssignment, INSTALL_STATUSES, type InstallAccessConfig, type InstallAccessService, type InstallAccessTarget, type InstallStatus, type InstallWebhook, type InstallWebhookAccount, type InstallWebhookClaims, type InvoiceLinkResult, type Logger, type MakePaymentInput, type MakePaymentResult, type Membership, type MembershipPurchaseInput, MembershipService, type NoteMode, type Payment, type PaymentSource, PeekAccessService, type PeekAccessServiceConfig, type PeekAuthTokenClaims, type PeekAuthTokenUser, PeekGraphQLError, PeekHttpError, type PeekPlatform, PiiAccessDisabledError, type Price, type PricingActivityContext, type PricingEngine, type PricingMoney, type PricingNamedRef, type PricingOverride, type PricingOverrideFilter, PricingService, type Product, type ProductMeetingLocation, ProductService, type ProductServiceOptions, type ProductTicket, type PromoCode, type PromoCodeFixedAmount, PromoCodeService, type PromoCodeServiceOptions, type PurchasedMembership, RENTAL_PRODUCT_TYPE, RateLimitError, type RefundInput, type RefundResult, ResellerService, type ResolvedOverride, type ResolvedPricingOverride, type ResolvedResourceOption, type Resource, type ResourceOptionOverride, type ResourceOptionQuantity, type ResourcePool, type ResourcePoolAccountUser, type ResourcePoolAssignment, type ResourcePoolMode, ResourcePoolService, type Review, ReviewService, type Ticket, type Timeslot, type TimeslotFilter, TimeslotService, type UpdateEngineInput, type UpdateTimeslotResult, type UpsertOverridesInput, type UpsertOverridesResult, type Waiver, createAccessServiceForInstall, noopLogger, parseBookingWebhook, parseInstallWebhook, parseWaiverWebhook, verifyInstallWebhook };