@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.
- package/dist/api/asset.d.ts +5 -0
- package/dist/api/asset.js +11 -0
- package/dist/api/authKit.d.ts +28 -4
- package/dist/api/authKit.js +35 -1
- package/dist/api/bookings.d.ts +89 -0
- package/dist/api/bookings.js +179 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/docs/API_SUMMARY.md +503 -11
- package/dist/docs/app-objects.md +4 -0
- package/dist/docs/assets.md +63 -2
- package/dist/docs/auth-kit.md +46 -5
- package/dist/docs/bookings.md +324 -0
- package/dist/docs/members.md +182 -0
- package/dist/docs/overview.md +477 -475
- package/dist/docs/server-functions.md +4 -1
- package/dist/http.js +3 -0
- package/dist/openapi.yaml +5254 -4037
- package/dist/testing/index.js +1 -1
- package/dist/types/appManifest.d.ts +16 -4
- package/dist/types/asset.d.ts +25 -1
- package/dist/types/authKit.d.ts +58 -7
- package/dist/types/bookings.d.ts +301 -0
- package/dist/types/bookings.js +3 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/utils/freeTimes.d.ts +57 -0
- package/dist/utils/freeTimes.js +206 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/docs/API_SUMMARY.md +503 -11
- package/docs/app-objects.md +4 -0
- package/docs/assets.md +63 -2
- package/docs/auth-kit.md +46 -5
- package/docs/bookings.md +324 -0
- package/docs/members.md +182 -0
- package/docs/overview.md +477 -475
- package/docs/server-functions.md +4 -1
- package/openapi.yaml +5254 -4037
- package/package.json +1 -1
|
@@ -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)
|
|
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. */
|