@proveanything/smartlinks 2.0.69 → 2.0.71

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.
@@ -587,7 +587,10 @@ Key records to the returned canonical `id`, and refuse `null` — otherwise anyo
587
587
  empty fields** — it never overwrites a name or field the contact already has, because a visitor's typed
588
588
  details are unverified. It's race-safe: two simultaneous entries with one email end on one contact.
589
589
  Returns `{ contactId, created }`. `forCaller()` is the signed-in caller's own contact (`null` when
590
- anonymous). **Never return contact ids to public callers** — keep them on your records.
590
+ anonymous): `{ contactId, email, phone, firstName, lastName, displayName, tags, customFields }`. Use it
591
+ to check what a member is before returning member-only content — a level the staff set
592
+ (`customFields.level`), a tag. It includes staff-only fields, so return only what the caller may see
593
+ (see members.md). **Never return contact ids to public callers** — keep them on your records.
591
594
 
592
595
  This is not consent. A ticked "keep me updated" box is evidence you can record (below); subscribing
593
596
  someone to marketing is the double opt-in flow (`comms.signup`, see comms.md).
package/dist/http.js CHANGED
@@ -216,6 +216,9 @@ function shouldSkipCache(path) {
216
216
  // Never cache /me endpoints (contact/me, loyalty/me, etc.) — always user-specific.
217
217
  if (/\/me(\?|$)/i.test(path))
218
218
  return true;
219
+ // Bookings change by the second (places left, busy times, a booking's status) — never serve them stale.
220
+ if (/\/app\/[^/]+\/bookings(\/|\?|$)/i.test(path))
221
+ return true;
219
222
  return false;
220
223
  }
221
224
  /** Evict the oldest (LRU) entry when the cache is at capacity. */