@peektravel/app-utilities 0.8.1 → 0.8.2

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/llms.txt CHANGED
@@ -147,7 +147,13 @@ the app-registry installations API default. `createAccessServiceForInstall` rout
147
147
 
148
148
  - `CngAccessService` — `getProductService().getAllActivities()` (short-form
149
149
  `getAllActivities()`) → `Activity[]` (`Activity`/`ActivityTicket` models).
150
- Errors surface as `CngApiError`.
150
+ Only `productId`/`name`/`color` are populated: `type` is always `"ACTIVITY"`
151
+ and `tickets` is always empty (CNG's products endpoint exposes neither). Only
152
+ active products are returned.
153
+ Errors surface as `CngApiError`, except HTTP 403 — a missing app permission —
154
+ which surfaces as `CngPermissionError` (`.permissions` lists the permission
155
+ names, e.g. `["products:read"]`; logged at `warn`, meant to be caught and
156
+ shown to the operator).
151
157
  - `AcmeAccessService` — `getProductService().getAllActivities()` (short-form
152
158
  `getAllActivities()`) → `AcmeActivity[]` (`AcmeActivity`/`AcmeActivityTicket`
153
159
  models). Errors surface as `AcmeApiError`.
@@ -186,8 +192,9 @@ stay internal.
186
192
  418/429 with no GraphQL `errors` — e.g. 401/404/5xx; carries `.statusCode`,
187
193
  `.url`, and raw `.body`; surfaced before JSON parsing so non-JSON error pages
188
194
  keep their status), `PiiAccessDisabledError` (a payment/booking-modification op
189
- was called without `fullCustomerAccess`), and the REST-sibling `CngApiError` /
190
- `AcmeApiError` — all importable; branch with `instanceof`. Token claim
195
+ was called without `fullCustomerAccess`), the REST-sibling `CngApiError` /
196
+ `AcmeApiError`, and `CngPermissionError` (CNG HTTP 403; `.permissions`,
197
+ `.statusCode`, raw `.body`) — all importable; branch with `instanceof`. Token claim
191
198
  extraction never throws once the signature verifies: a missing `user` block
192
199
  gives `user: null`, and each user field (including `id`, the person's own id —
193
200
  not an account/partner id) is nullable, with `""`/`"null"` normalized to `null`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peektravel/app-utilities",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "GraphQL JS mapping utilities extracted from the Peek Pro Autopilot connector.",
5
5
  "license": "MIT",
6
6
  "repository": {