@@ -11,12 +11,13 @@ call typed methods like `peek.getProductService().getAllProducts()` or directly
1111via the top-level short-forms like ` peek.getAllProducts() ` and
1212` peek.getAllActivities() ` .
1313
14- The package also ships a ** sibling accessor for the CNG backoffice** ,
15- ` CngAccessService ` (REST, not GraphQL). It reuses this package's auth
16- (` TokenManager ` ), retry/backoff loop, ` Logger ` , base error types, tooling, and
17- the Odyssey UI — differing only in transport (REST vs GraphQL) and gateway
18- routing (` cng_backoffice_api-v1 ` vs ` peek_backoffice_api-v1 ` ). See
19- "CNG accessor" below.
14+ The package also ships ** sibling accessors for other backoffices** —
15+ ` CngAccessService ` and ` AcmeAccessService ` (both REST, not GraphQL). They reuse
16+ this package's auth (` TokenManager ` ), retry/backoff loop, ` Logger ` , base error
17+ types, tooling, and the Odyssey UI — differing only in transport (REST vs
18+ GraphQL) and gateway routing (` cng_backoffice_api-v1 ` /
19+ ` acme_backoffice_api@v1 ` vs ` peek_backoffice_api-v1 ` ). See "CNG accessor" and
20+ "ACME accessor" below.
2021
2122## Layers
2223
@@ -234,7 +235,9 @@ Recurring patterns inside services:
234235The barrel re-exports only the public contract: ` PeekAccessService ` + its config,
235236each resource service class (and the options/result types callers need), all
236237data-model ** types** (including ` PeekAuthTokenClaims ` and ` PeekAuthTokenUser ` ),
237- the ` Logger ` interface + ` noopLogger ` , and the three typed error classes. Query strings and raw response interfaces are deliberately kept
238+ the ` Logger ` interface + ` noopLogger ` , and the typed error classes
239+ (` AdminAccountRequiredError ` , ` RateLimitError ` , ` PeekGraphQLError ` ,
240+ ` CngApiError ` , ` AcmeApiError ` ). Query strings and raw response interfaces are deliberately kept
238241internal — including the booking-webhook registration query
239242(` BOOKING_WEBHOOK_GQL_QUERY ` stays internal, documented via ` docs/webhooks.md ` ).
240243The webhook-related public exports are the two parsers ` parseBookingWebhook ` and
@@ -287,6 +290,40 @@ plumbing rather than forking the package.
287290> ` cng/products/product-queries.ts ` , ` product-converter.ts ` , and
288291> ` models/cng/product.ts ` .
289292
293+ ### 5c. ACME accessor (REST)
294+ ` src/acme-access-service.ts ` , ` src/internal/acme/ ` , ` src/models/acme/product.ts `
295+
296+ A third, brand-parallel accessor for the ** ACME** backoffice, built by cloning
297+ the CNG accessor. Same auth/transport/tooling reuse as CNG (§5b) — only the
298+ routing, endpoint, and response shape differ:
299+
300+ - ** ` AcmeAccessService ` ** — identical to ` CngAccessService ` : validates the same
301+ four config fields (` installId ` , ` jwtSecret ` , ` issuer ` , ` appId ` ; no
302+ ` gatewayKey ` ), builds the shared ` TokenManager ` + a ` RestClient ` , defaults to
303+ the app-registry base URL, and exposes ` getProductService() ` +
304+ ` getAllActivities() ` .
305+ - ** ` RestClient ` ** (` src/internal/acme/rest-client.ts ` ) — the CNG REST client
306+ cloned with ` extendableSlug = acme_backoffice_api@v1 ` (note the ` @v1 `
307+ separator, unlike CNG's ` -v1 ` ), logging ` "Making ACME request" ` and throwing
308+ ` AcmeApiError ` on non-2xx.
309+ - ** Products triad** (` src/internal/acme/products/ ` ) — ` product-queries.ts `
310+ (raw ` TemplateNode ` /` TemplatesResponse ` for the ` { list: [...] } ` envelope,
311+ plus the ` PUBLISHED_REVIEW_STATE ` constant, internal), ` product-converter.ts `
312+ (pure ` fromTemplateNodes ` → ` AcmeActivity ` , ** filtering to published
313+ templates only** and mapping ` colorCategory.backgroundColor ` → ` color ` ),
314+ ` product-service.ts ` (` AcmeProductService.getAllActivities() ` , tolerating a
315+ ` { list: [...] } ` envelope or a bare array). Endpoint segments live in
316+ ` src/internal/acme/endpoints.ts ` — the template-names path
317+ ` v2/b2b/event/templates/names?pageSize=-1&page=1 ` .
318+ - ** Model** ` src/models/acme/product.ts ` — ` AcmeActivity ` /` AcmeActivityTicket ` ,
319+ mirroring the CNG ` Activity ` shape. ACME exposes no tickets today, so
320+ ` tickets ` is always empty; only ` id ` /` name ` /` color ` are populated.
321+ - ** Public exports:** ` AcmeAccessService ` + ` AcmeAccessServiceConfig ` ,
322+ ` AcmeProductService ` , the ` AcmeActivity ` /` AcmeActivityTicket ` types, and
323+ ` AcmeApiError ` (added to the errors export). Distinct type names avoid the
324+ collision with CNG's ` Activity ` . REST paths and raw response interfaces stay
325+ internal.
326+
290327### 6. UI components — the ` ./ui ` subpath
291328` src/ui/ `
292329
0 commit comments