@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/README.md +7 -6
- package/dist/index.cjs +30 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -32
- package/dist/index.d.ts +38 -32
- package/dist/index.js +31 -28
- package/dist/index.js.map +1 -1
- package/docs/webhooks.md +4 -3
- package/llms.txt +5 -4
- package/package.json +1 -1
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.
|
|
269
|
-
lifecycle events are often system-initiated (no acting user), so
|
|
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`), `
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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)
|