@peektravel/app-utilities 0.7.2 → 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/docs/webhooks.md CHANGED
@@ -265,9 +265,10 @@ The **JSON body is the source of the event data**; the fields it shares with the
265
265
  token (`installId`, `accountId`, `status`, `displayVersion`, `user`) fall back to
266
266
  the **verified token** when the body omits them. The token authenticates the
267
267
  whole delivery — only Peek can mint a valid one — so the body is trusted within a
268
- verified request. Unlike `verifyPeekAuthToken`, `user` is nullable: install
269
- lifecycle events are often system-initiated (no acting user), so the parser
270
- tolerates a missing `modified_by`/`user`.
268
+ verified request. `user` is nullable here — as it is on `verifyPeekAuthToken` —
269
+ because install lifecycle events are often system-initiated (no acting user), so
270
+ the parser tolerates a missing `modified_by`/`user`, and every field inside a
271
+ present `user` is itself nullable (a sentinel `""`/`"null"` id becomes `null`).
271
272
 
272
273
  > **Migrating from `verifyInstallWebhook` / `parseInstallEvent`?**
273
274
  > `verifyInstallWebhook(token, secret)` still works but is `@deprecated` — it
package/llms.txt CHANGED
@@ -169,10 +169,11 @@ stay internal.
169
169
  418/429 with no GraphQL `errors` — e.g. 401/404/5xx; carries `.statusCode`,
170
170
  `.url`, and raw `.body`; surfaced before JSON parsing so non-JSON error pages
171
171
  keep their status), `PiiAccessDisabledError` (a payment/booking-modification op
172
- was called without `fullCustomerAccess`), `InvalidPeekTokenError` (a
173
- signature-valid `app_registry_v2` token whose `user` block has no `id`;
174
- carries `.field`), and the REST-sibling `CngApiError` / `AcmeApiError` — all
175
- importable; branch with `instanceof`.
172
+ was called without `fullCustomerAccess`), and the REST-sibling `CngApiError` /
173
+ `AcmeApiError` — all importable; branch with `instanceof`. Token claim
174
+ extraction never throws once the signature verifies: a missing `user` block
175
+ gives `user: null`, and each user field (including `id`, the person's own id —
176
+ not an account/partner id) is nullable, with `""`/`"null"` normalized to `null`.
176
177
  - Plain `Error` for validation/precondition failures thrown before any request.
177
178
 
178
179
  ## Webhooks (booking + waiver + install)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peektravel/app-utilities",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "GraphQL JS mapping utilities extracted from the Peek Pro Autopilot connector.",
5
5
  "license": "MIT",
6
6
  "repository": {