@peektravel/app-utilities 0.8.2 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,3 +1,24 @@
1
+ /**
2
+ * A platform's tiny map of **API endpoint key → relative path** (the "slug"
3
+ * inserted between the install's base API URL and the endpoint's own path).
4
+ *
5
+ * The base API URL is the install's app endpoint with no routing segment — the
6
+ * install webhook's `apiUrl` (with any slug stripped back off), or
7
+ * `baseUrl/appId` when built from the deprecated defaults. Each service class
8
+ * resolves *its own* slug through this lookup, so two services on the same
9
+ * platform can route through different slugs. Adding a new API — even one on a
10
+ * different slug than its siblings — is a single entry here.
11
+ *
12
+ * An empty-string path means the endpoint sits directly on the base with no
13
+ * slug (e.g. the legacy Peek v1 GraphQL gateway, which has no extendable slug).
14
+ */
15
+ declare class ApiEndpoints<Key extends string = string> {
16
+ private readonly paths;
17
+ constructor(paths: Readonly<Record<Key, string>>);
18
+ /** The relative path (slug) for `endpoint`, appended to the base API URL. */
19
+ pathFor(endpoint: Key): string;
20
+ }
21
+
1
22
  /**
2
23
  * Minimal structured logger interface the package can write diagnostics to.
3
24
  *
@@ -20,19 +41,13 @@ interface GraphQLBody<T> {
20
41
  }
21
42
  interface GraphQLClientOptions {
22
43
  /**
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`.
44
+ * The install's **base API URL** (no trailing slash, no routing slug). Every
45
+ * GraphQL call POSTs to `baseApiUrl/<slug>`, where the slug comes from
46
+ * {@link endpoints} for the request's endpoint name.
27
47
  */
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;
48
+ baseApiUrl: string;
49
+ /** Maps an endpoint name to the relative slug appended to {@link baseApiUrl}. */
50
+ endpoints: ApiEndpoints;
36
51
  /** API gateway key sent as the `pk-api-key` header. Omitted from headers when absent (v2 mode). */
37
52
  gatewayKey?: string;
38
53
  /** Supplies a valid bearer token for each request. */
@@ -43,11 +58,6 @@ interface GraphQLClientOptions {
43
58
  logger: Logger;
44
59
  /** `fetch` implementation to use. */
45
60
  fetchFn: typeof fetch;
46
- /**
47
- * Optional fixed path segment inserted between `appId` and the endpoint name.
48
- * Used in v2 mode: `baseUrl/appId/endpointPathPrefix/endpointName`.
49
- */
50
- endpointPathPrefix?: string;
51
61
  }
52
62
  declare class GraphQLClient {
53
63
  private readonly options;
@@ -1671,13 +1681,17 @@ interface BaseAccessServiceConfig {
1671
1681
  /** JWT issuer — the app name / app ID. */
1672
1682
  issuer: string;
1673
1683
  /**
1674
- * The install's **app endpoint URL** — persist the install webhook's `apiUrl`
1675
- * and pass it here. When set it is used **as given**: for Peek it is the sole
1676
- * request URL (every call POSTs to it); for CNG/ACME it is the base and the
1677
- * REST path is appended. No app-id/gateway segment is inserted, so `appId` is
1678
- * not required. This is the forward-looking way to target an install — prefer
1679
- * it over `baseUrl`/`appId`, which are deprecated (the hardcoded base-URL
1680
- * fallbacks will be removed and a URL will become required in a future release).
1684
+ * The install's **base API URL** — persist the install webhook's `apiUrl` and
1685
+ * pass it here. It is the app endpoint with no per-platform routing slug; each
1686
+ * service class appends its own slug (e.g. `peek_backoffice_api-v1`, via that
1687
+ * platform's endpoint lookup) when it makes a call, so different services can
1688
+ * route through different slugs. If the URL you pass still carries this
1689
+ * platform's slug it is stripped back off to recover the base; a URL carrying a
1690
+ * *different* platform's slug makes the constructor throw. No app-id/gateway
1691
+ * segment is inserted, so `appId` is not required. This is the forward-looking
1692
+ * way to target an install — prefer it over `baseUrl`/`appId`, which are
1693
+ * deprecated (the hardcoded base-URL fallbacks will be removed and a URL will
1694
+ * become required in a future release).
1681
1695
  */
1682
1696
  apiUrl?: string;
1683
1697
  /**
@@ -2178,109 +2192,101 @@ declare class PeekAccessService {
2178
2192
  * authenticated transport. The instance is created lazily and reused.
2179
2193
  */
2180
2194
  getReviewService(): ReviewService;
2181
- /** All products (activities + add-ons). Delegates to {@link ProductService.getAllProducts}. */
2195
+ /** All products (activities + add-ons). @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link ProductService.getAllProducts}. */
2182
2196
  getAllProducts(): Promise<Product[]>;
2183
- /** All activity products (excludes add-ons). Delegates to {@link ProductService.getAllActivities}. */
2197
+ /** All activity products (excludes add-ons). @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link ProductService.getAllActivities}. */
2184
2198
  getAllActivities(): Promise<Product[]>;
2185
- /** All rental products. Delegates to {@link ProductService.getAllRentals}. */
2199
+ /** All rental products. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link ProductService.getAllRentals}. */
2186
2200
  getAllRentals(): Promise<Product[]>;
2187
- /** All add-on products. Delegates to {@link ProductService.getAllAddons}. */
2201
+ /** All add-on products. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link ProductService.getAllAddons}. */
2188
2202
  getAllAddons(): Promise<Product[]>;
2189
- /** An activity's custom questions. Delegates to {@link ProductService.getCustomQuestions}. */
2203
+ /** An activity's custom questions. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link ProductService.getCustomQuestions}. */
2190
2204
  getCustomQuestions(productId: string): Promise<CustomQuestion[]>;
2191
- /** All active account users. Delegates to {@link AccountUserService.getAll}. */
2205
+ /** All active account users. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link AccountUserService.getAll}. */
2192
2206
  getAllAccountUsers(): Promise<AccountUser[]>;
2193
- /** Account user by id, or null. Delegates to {@link AccountUserService.getById}. */
2207
+ /** Account user by id, or null. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link AccountUserService.getById}. */
2194
2208
  getAccountUserById(userId: string): Promise<AccountUser | null>;
2195
- /** All resource pools. Delegates to {@link ResourcePoolService.getAll}. */
2209
+ /** All resource pools. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link ResourcePoolService.getAll}. */
2196
2210
  getAllResourcePools(mode?: ResourcePoolMode): Promise<ResourcePool[]>;
2197
- /** Timeslots for an activity on a given date. Delegates to {@link TimeslotService.getForDay}. */
2211
+ /** Timeslots for an activity on a given date. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link TimeslotService.getForDay}. */
2198
2212
  getTimeslotsForDay(productId: string, date: string, filter?: TimeslotFilter): Promise<Timeslot[]>;
2199
- /** Single timeslot by id. Delegates to {@link TimeslotService.getById}. */
2213
+ /** Single timeslot by id. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link TimeslotService.getById}. */
2200
2214
  getTimeslotById(timeslotId: string): Promise<Timeslot | null>;
2201
- /** Set timeslot status. Delegates to {@link TimeslotService.setAvailability}. */
2215
+ /** Set timeslot status. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link TimeslotService.setAvailability}. */
2202
2216
  setTimeslotAvailability(timeslotId: string, status: string): Promise<UpdateTimeslotResult>;
2203
- /** Set timeslot manifest notes. Delegates to {@link TimeslotService.setNotes}. */
2217
+ /** Set timeslot manifest notes. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link TimeslotService.setNotes}. */
2204
2218
  setTimeslotNotes(timeslotId: string, manifestNotes: string): Promise<UpdateTimeslotResult>;
2205
- /** Assign or unassign guides on timeslots. Delegates to {@link TimeslotService.assignGuide}. */
2219
+ /** Assign or unassign guides on timeslots. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link TimeslotService.assignGuide}. */
2206
2220
  assignTimeslotGuide(assignment: GuideAssignment): Promise<AssignGuideResult>;
2207
- /** All reseller channels. Delegates to {@link ResellerService.getAllChannels}. */
2221
+ /** All reseller channels. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link ResellerService.getAllChannels}. */
2208
2222
  getAllChannels(agentsPerChannel?: number): Promise<Channel[]>;
2209
- /** All promo codes. Delegates to {@link PromoCodeService.getAll}. */
2223
+ /** All promo codes. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link PromoCodeService.getAll}. */
2210
2224
  getAllPromoCodes(): Promise<PromoCode[]>;
2211
- /** Create a promo code. Delegates to {@link PromoCodeService.create}. */
2225
+ /** Create a promo code. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link PromoCodeService.create}. */
2212
2226
  createPromoCode(input: CreatePromoCodeInput): Promise<CreatedPromoCode>;
2213
- /** Create a pricing engine. Delegates to {@link PricingService.createEngine}. */
2227
+ /** Create a pricing engine. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link PricingService.createEngine}. */
2214
2228
  createPricingEngine(input: CreateEngineInput): Promise<CreatedPricingEngine>;
2215
- /** Update a pricing engine. Delegates to {@link PricingService.updateEngine}. */
2229
+ /** Update a pricing engine. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link PricingService.updateEngine}. */
2216
2230
  updatePricingEngine(input: UpdateEngineInput): Promise<PricingEngine>;
2217
- /** Delete a pricing engine (idempotent). Delegates to {@link PricingService.deleteEngine}. */
2231
+ /** Delete a pricing engine (idempotent). @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link PricingService.deleteEngine}. */
2218
2232
  deletePricingEngine(engineId: string): Promise<void>;
2219
- /** Upsert pricing overrides. Delegates to {@link PricingService.upsertOverrides}. */
2233
+ /** Upsert pricing overrides. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link PricingService.upsertOverrides}. */
2220
2234
  upsertPricingOverrides(input: UpsertOverridesInput): Promise<UpsertOverridesResult>;
2221
- /** Clear pricing overrides for a set of activities. Delegates to {@link PricingService.clearOverrides}. */
2235
+ /** Clear pricing overrides for a set of activities. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link PricingService.clearOverrides}. */
2222
2236
  clearPricingOverrides(input: ClearOverridesInput): Promise<UpsertOverridesResult>;
2223
- /** Today's daily note. Delegates to {@link DailyNoteService.getToday}. */
2237
+ /** Today's daily note. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link DailyNoteService.getToday}. */
2224
2238
  getDailyNoteToday(): Promise<DailyNote | null>;
2225
- /** Update today's daily note. Delegates to {@link DailyNoteService.update}. */
2239
+ /** Update today's daily note. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link DailyNoteService.update}. */
2226
2240
  updateDailyNote(note: string): Promise<DailyNote | null>;
2227
- /** Availability times for an activity. Delegates to {@link AvailabilityService.getAvailabilityTimes}. */
2241
+ /** Availability times for an activity. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link AvailabilityService.getAvailabilityTimes}. */
2228
2242
  getAvailabilityTimes(query: AvailabilityTimesQuery): Promise<AvailabilityTime[]>;
2229
- /** All memberships. Delegates to {@link MembershipService.getAll}. */
2243
+ /** All memberships. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link MembershipService.getAll}. */
2230
2244
  getAllMemberships(): Promise<Membership[]>;
2231
- /** Purchase a membership. Delegates to {@link MembershipService.purchase}. */
2245
+ /** Purchase a membership. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link MembershipService.purchase}. */
2232
2246
  purchaseMembership(input: MembershipPurchaseInput): Promise<PurchasedMembership>;
2233
- /** Booking by id. Delegates to {@link BookingService.getById}. */
2247
+ /** Booking by id. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.getById}. */
2234
2248
  getBookingById(bookingId: string, options?: BookingReadOptions): Promise<Booking | null>;
2235
- /** Bookings by time range. Delegates to {@link BookingService.searchByTimeRange}. */
2249
+ /** Bookings by time range. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.searchByTimeRange}. */
2236
2250
  searchBookingsByTimeRange(input: BookingTimeRangeSearch): Promise<Booking[]>;
2237
- /** Bookings on a timeslot. Delegates to {@link BookingService.searchByTimeslot}. */
2251
+ /** Bookings on a timeslot. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.searchByTimeslot}. */
2238
2252
  searchBookingsByTimeslot(timeslotId: string, options?: BookingReadOptions): Promise<Booking[]>;
2239
- /** Guests on a booking. Delegates to {@link BookingService.getGuests}. */
2253
+ /** Guests on a booking. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.getGuests}. */
2240
2254
  getBookingGuests(bookingId: string): Promise<Guest[]>;
2241
- /** Payments on file for a booking. Delegates to {@link BookingService.getPaymentsOnFile}. */
2255
+ /** Payments on file for a booking. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.getPaymentsOnFile}. */
2242
2256
  getBookingPaymentsOnFile(bookingId: string): Promise<BookingPaymentsOnFile | null>;
2243
- /** Append or overwrite operator notes. Delegates to {@link BookingService.appendNote}. */
2257
+ /** Append or overwrite operator notes. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.appendNote}. */
2244
2258
  appendBookingNote(bookingId: string, note: string, mode?: NoteMode): Promise<Booking | null>;
2245
- /** Set booking check-in status. Delegates to {@link BookingService.setCheckinStatus}. */
2259
+ /** Set booking check-in status. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.setCheckinStatus}. */
2246
2260
  setBookingCheckinStatus(bookingId: string, checkedIn: boolean): Promise<Booking | null>;
2247
- /** Cancel a booking. Delegates to {@link BookingService.cancel}. */
2261
+ /** Cancel a booking. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.cancel}. */
2248
2262
  cancelBooking(bookingId: string, notes?: string): Promise<CancelBookingResult>;
2249
- /** Charge a booking. Delegates to {@link BookingService.makePayment}. */
2263
+ /** Charge a booking. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.makePayment}. */
2250
2264
  makeBookingPayment(input: MakePaymentInput): Promise<MakePaymentResult>;
2251
- /** Refund a booking payment. Delegates to {@link BookingService.refund}. */
2265
+ /** Refund a booking payment. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.refund}. */
2252
2266
  refundBooking(input: RefundInput): Promise<RefundResult>;
2253
- /** Create an invoice link. Delegates to {@link BookingService.createInvoiceLink}. */
2267
+ /** Create an invoice link. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.createInvoiceLink}. */
2254
2268
  createBookingInvoiceLink(bookingId: string): Promise<InvoiceLinkResult>;
2255
- /** List add-ons on a booking. Delegates to {@link BookingService.listAddons}. */
2269
+ /** List add-ons on a booking. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.listAddons}. */
2256
2270
  listBookingAddons(bookingId: string): Promise<BookingAddons>;
2257
- /** Add an add-on to a booking. Delegates to {@link BookingService.addAddon}. */
2271
+ /** Add an add-on to a booking. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.addAddon}. */
2258
2272
  addBookingAddon(bookingId: string, input: AddAddonInput): Promise<BookingAddonsMutationResult>;
2259
- /** Remove an add-on from a booking. Delegates to {@link BookingService.removeAddon}. */
2273
+ /** Remove an add-on from a booking. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.removeAddon}. */
2260
2274
  removeBookingAddon(bookingId: string, input: AddAddonInput): Promise<BookingAddonsMutationResult>;
2261
- /** Create a booking. Delegates to {@link BookingService.create}. */
2275
+ /** Create a booking. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link BookingService.create}. */
2262
2276
  createBooking(input: CreateBookingInput): Promise<CreatedBooking>;
2263
- /** Reviews for an activity. Delegates to {@link ReviewService.getReviews}. */
2277
+ /** Reviews for an activity. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link ReviewService.getReviews}. */
2264
2278
  getReviews(productId: string, reviewCount?: number, reviewOffset?: number): Promise<Review[]>;
2265
2279
  }
2266
2280
 
2267
2281
  interface RestClientOptions$1 {
2268
2282
  /**
2269
- * The install's app endpoint URL (the install webhook's `apiUrl`). When set it
2270
- * is the **base URL** and only the REST path is appended (`apiUrl/path`) —
2271
- * `baseUrl`/`appId`/`extendableSlug` are ignored. Takes precedence over
2272
- * `baseUrl`.
2283
+ * The install's **base API URL** (no trailing slash, no routing slug). Each
2284
+ * request builds `baseApiUrl/<slug>/<path>`, where the slug comes from
2285
+ * {@link endpoints} for the request's endpoint key.
2273
2286
  */
2274
- apiUrl?: string;
2275
- /**
2276
- * Base URL of the backoffice gateway (no trailing slash). Used only when
2277
- * `apiUrl` is not set; the URL is `baseUrl/appId/extendableSlug/path`.
2278
- */
2279
- baseUrl?: string;
2280
- /** App ID, used in the endpoint path (legacy `baseUrl` mode only). */
2281
- appId?: string;
2282
- /** Fixed extendable slug inserted between `appId` and the REST path (legacy mode). */
2283
- extendableSlug?: string;
2287
+ baseApiUrl: string;
2288
+ /** Maps an endpoint key to the relative slug appended to {@link baseApiUrl}. */
2289
+ endpoints: ApiEndpoints;
2284
2290
  /** Supplies a valid bearer token for each request. */
2285
2291
  getToken: () => string;
2286
2292
  /** Backoff delays (ms) applied on successive HTTP 429 responses. */
@@ -2303,7 +2309,7 @@ declare class RestClient$1 {
2303
2309
  * @throws {CngPermissionError} on HTTP 403 (app missing a permission)
2304
2310
  * @throws {CngApiError} on any other non-2xx response
2305
2311
  */
2306
- get<T>(path: string): Promise<T>;
2312
+ get<T>(endpoint: string, path: string): Promise<T>;
2307
2313
  private endpoint;
2308
2314
  private buildHeaders;
2309
2315
  }
@@ -2390,7 +2396,7 @@ type CngAccessServiceConfig = BaseAccessServiceConfig;
2390
2396
  * appId: process.env.PEEK_APP_ID!,
2391
2397
  * });
2392
2398
  *
2393
- * const activities: Activity[] = await cng.getAllActivities();
2399
+ * const activities: Activity[] = await cng.getProductService().getAllActivities();
2394
2400
  * ```
2395
2401
  *
2396
2402
  * @throws {Error} from the constructor when any required config field
@@ -2405,27 +2411,19 @@ declare class CngAccessService {
2405
2411
  * authenticated transport. The instance is created lazily and reused.
2406
2412
  */
2407
2413
  getProductService(): CngProductService;
2408
- /** All activities. Delegates to {@link CngProductService.getAllActivities}. */
2414
+ /** All activities. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link CngProductService.getAllActivities}. */
2409
2415
  getAllActivities(): Promise<Activity[]>;
2410
2416
  }
2411
2417
 
2412
2418
  interface RestClientOptions {
2413
2419
  /**
2414
- * The install's app endpoint URL (the install webhook's `apiUrl`). When set it
2415
- * is the **base URL** and only the REST path is appended (`apiUrl/path`) —
2416
- * `baseUrl`/`appId`/`extendableSlug` are ignored. Takes precedence over
2417
- * `baseUrl`.
2418
- */
2419
- apiUrl?: string;
2420
- /**
2421
- * Base URL of the backoffice gateway (no trailing slash). Used only when
2422
- * `apiUrl` is not set; the URL is `baseUrl/appId/extendableSlug/path`.
2420
+ * The install's **base API URL** (no trailing slash, no routing slug). Each
2421
+ * request builds `baseApiUrl/<slug>/<path>`, where the slug comes from
2422
+ * {@link endpoints} for the request's endpoint key.
2423
2423
  */
2424
- baseUrl?: string;
2425
- /** App ID, used in the endpoint path (legacy `baseUrl` mode only). */
2426
- appId?: string;
2427
- /** Fixed extendable slug inserted between `appId` and the REST path (legacy mode). */
2428
- extendableSlug?: string;
2424
+ baseApiUrl: string;
2425
+ /** Maps an endpoint key to the relative slug appended to {@link baseApiUrl}. */
2426
+ endpoints: ApiEndpoints;
2429
2427
  /** Supplies a valid bearer token for each request. */
2430
2428
  getToken: () => string;
2431
2429
  /** Backoff delays (ms) applied on successive HTTP 429 responses. */
@@ -2447,7 +2445,7 @@ declare class RestClient {
2447
2445
  * @throws {RateLimitError} on HTTP 429 after retries are exhausted
2448
2446
  * @throws {AcmeApiError} on any other non-2xx response
2449
2447
  */
2450
- get<T>(path: string): Promise<T>;
2448
+ get<T>(endpoint: string, path: string): Promise<T>;
2451
2449
  private endpoint;
2452
2450
  private buildHeaders;
2453
2451
  }
@@ -2525,7 +2523,7 @@ type AcmeAccessServiceConfig = BaseAccessServiceConfig;
2525
2523
  * appId: process.env.PEEK_APP_ID!,
2526
2524
  * });
2527
2525
  *
2528
- * const activities: AcmeActivity[] = await acme.getAllActivities();
2526
+ * const activities: AcmeActivity[] = await acme.getProductService().getAllActivities();
2529
2527
  * ```
2530
2528
  *
2531
2529
  * @throws {Error} from the constructor when any required config field
@@ -2540,7 +2538,7 @@ declare class AcmeAccessService {
2540
2538
  * authenticated transport. The instance is created lazily and reused.
2541
2539
  */
2542
2540
  getProductService(): AcmeProductService;
2543
- /** All activities. Delegates to {@link AcmeProductService.getAllActivities}. */
2541
+ /** All activities. @deprecated The access service exposes only its resource-service accessors; call the service directly instead. See {@link AcmeProductService.getAllActivities}. */
2544
2542
  getAllActivities(): Promise<AcmeActivity[]>;
2545
2543
  }
2546
2544
 
@@ -2565,7 +2563,12 @@ declare class AcmeAccessService {
2565
2563
  interface InstallAccessTarget {
2566
2564
  /** Which platform serves the install (the install webhook's `platform`). */
2567
2565
  platform: PeekPlatform | null;
2568
- /** The install's app endpoint URL (the install webhook's `apiUrl`), used as given. */
2566
+ /**
2567
+ * The install's base API URL (the install webhook's `apiUrl`). The chosen
2568
+ * access service's service classes append their own backoffice slug when they
2569
+ * call; a URL already carrying this platform's slug is stripped back to the
2570
+ * base, and one carrying a different platform's slug throws.
2571
+ */
2569
2572
  apiUrl: string;
2570
2573
  /** The install id (the install webhook's `installId`) — becomes the JWT subject. */
2571
2574
  installId: string;