@cavuno/board 4.60.0 → 4.62.0

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.
Files changed (68) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/{_spec-DtsIUScQ.d.mts → _spec-BCwCDDX2.d.mts} +81 -0
  3. package/dist/{_spec-DtsIUScQ.d.ts → _spec-BCwCDDX2.d.ts} +81 -0
  4. package/dist/bin.mjs +12 -5
  5. package/dist/{blog-VKligt-6.d.ts → blog-BQ869KiE.d.ts} +1 -1
  6. package/dist/{blog-BKnmvibN.d.mts → blog-C0wl_hx8.d.mts} +1 -1
  7. package/dist/{board-CWx0nu39.d.mts → board-D2ImSfzo.d.mts} +2 -2
  8. package/dist/{board-QuwKsDOt.d.ts → board-D5x6dfUk.d.ts} +2 -2
  9. package/dist/{breadcrumbs-8k7a572J.d.ts → breadcrumbs-CkIH_iCI.d.ts} +2 -2
  10. package/dist/{breadcrumbs-BEnF2UAW.d.mts → breadcrumbs-DqkhouJc.d.mts} +2 -2
  11. package/dist/browser/cavuno-board.global.min.js +1 -1
  12. package/dist/{chunk-R3QB3WM6.mjs → chunk-4KMZZR3A.mjs} +1 -1
  13. package/dist/{chunk-M4CX64RC.mjs → chunk-GRQRZRLO.mjs} +8 -1
  14. package/dist/{chunk-LO7D3AIX.mjs → chunk-HHMY3W7T.mjs} +7 -4
  15. package/dist/{chunk-MSY7ERBY.mjs → chunk-RAE63XH5.mjs} +3 -1
  16. package/dist/doctor.js +12 -5
  17. package/dist/doctor.mjs +12 -5
  18. package/dist/filters.d.mts +2 -2
  19. package/dist/filters.d.ts +2 -2
  20. package/dist/format.d.mts +4 -4
  21. package/dist/format.d.ts +4 -4
  22. package/dist/format.js +3 -1
  23. package/dist/format.mjs +2 -2
  24. package/dist/go.js +3 -1
  25. package/dist/go.mjs +1 -1
  26. package/dist/index.d.mts +191 -14
  27. package/dist/index.d.ts +191 -14
  28. package/dist/index.js +169 -3
  29. package/dist/index.mjs +162 -3
  30. package/dist/{jobs-D-vpMQ6a.d.mts → jobs-B86GBnD5.d.mts} +1 -1
  31. package/dist/{jobs-wc4h0pSV.d.ts → jobs-Bjb0KdER.d.ts} +1 -1
  32. package/dist/paths.d.mts +2 -0
  33. package/dist/paths.d.ts +2 -0
  34. package/dist/paths.js +3 -1
  35. package/dist/paths.mjs +1 -1
  36. package/dist/{roles-B_d0igKI.d.mts → roles-D745cT5b.d.mts} +3 -1
  37. package/dist/{roles-B_d0igKI.d.ts → roles-D745cT5b.d.ts} +3 -1
  38. package/dist/route-contract.d.mts +2 -2
  39. package/dist/route-contract.d.ts +2 -2
  40. package/dist/route-contract.js +9 -4
  41. package/dist/route-contract.mjs +2 -2
  42. package/dist/{search-Cgel3YbJ.d.ts → search-CQHlSXMC.d.ts} +1 -1
  43. package/dist/{search-B4fsEVF8.d.mts → search-PLWHFWyZ.d.mts} +1 -1
  44. package/dist/{seo-BGyEzgAX.d.ts → seo-C8JYKw0_.d.ts} +1 -1
  45. package/dist/{seo-BgMmH3QS.d.mts → seo-cXaJTDHD.d.mts} +1 -1
  46. package/dist/seo-files.d.mts +2 -2
  47. package/dist/seo-files.d.ts +2 -2
  48. package/dist/seo.d.mts +6 -6
  49. package/dist/seo.d.ts +6 -6
  50. package/dist/seo.js +3 -1
  51. package/dist/seo.mjs +2 -2
  52. package/dist/server.d.mts +6 -6
  53. package/dist/server.d.ts +6 -6
  54. package/dist/server.mjs +1 -1
  55. package/dist/sitemap.d.mts +6 -6
  56. package/dist/sitemap.d.ts +6 -6
  57. package/dist/sitemap.js +3 -1
  58. package/dist/sitemap.mjs +2 -2
  59. package/dist/suggest.d.mts +2 -2
  60. package/dist/suggest.d.ts +2 -2
  61. package/dist/well-known.d.mts +1 -1
  62. package/dist/well-known.d.ts +1 -1
  63. package/dist/well-known.js +9 -4
  64. package/dist/well-known.mjs +2 -2
  65. package/package.json +1 -1
  66. package/skills/cavuno-board-job-alerts/SKILL.md +31 -0
  67. package/skills/cavuno-board-products/SKILL.md +27 -1
  68. package/skills/manifest.json +2 -2
@@ -118,7 +118,9 @@ var BOARD_PATHS = {
118
118
  /** The digital product catalogue. */
119
119
  products: "/products",
120
120
  /** A signed-in board user's purchased products. */
121
- mePurchases: "/me/purchases"
121
+ mePurchases: "/me/purchases",
122
+ /** The tip page: visitors tip the board through its tip jar. */
123
+ tip: "/tip"
122
124
  };
123
125
 
124
126
  // src/route-contract/roles.ts
@@ -158,7 +160,8 @@ var ROLE_PARAM_REGISTRY = {
158
160
  alertsManage: [],
159
161
  alertsConfirm: [],
160
162
  products: [],
161
- mePurchases: []
163
+ mePurchases: [],
164
+ tip: []
162
165
  };
163
166
  var REQUIRED_ROLES = [
164
167
  "jobDetail",
@@ -207,7 +210,8 @@ var CANONICAL_MANIFEST = {
207
210
  alertsManage: "/alerts/manage",
208
211
  alertsConfirm: "/alerts/confirm",
209
212
  products: BOARD_PATHS.products,
210
- mePurchases: BOARD_PATHS.mePurchases
213
+ mePurchases: BOARD_PATHS.mePurchases,
214
+ tip: BOARD_PATHS.tip
211
215
  }
212
216
  };
213
217
 
@@ -500,7 +504,8 @@ var ROLE_INDEX_PATHS = {
500
504
  product: BOARD_PATHS.products,
501
505
  purchase: BOARD_PATHS.home,
502
506
  products: BOARD_PATHS.products,
503
- mePurchases: BOARD_PATHS.home
507
+ mePurchases: BOARD_PATHS.home,
508
+ tip: BOARD_PATHS.home
504
509
  };
505
510
 
506
511
  // src/well-known/handler.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  compileManifest
3
- } from "./chunk-LO7D3AIX.mjs";
4
- import "./chunk-MSY7ERBY.mjs";
3
+ } from "./chunk-HHMY3W7T.mjs";
4
+ import "./chunk-RAE63XH5.mjs";
5
5
 
6
6
  // src/well-known/handler.ts
7
7
  var WELL_KNOWN_CACHE_CONTROL = "public, max-age=300";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cavuno/board",
3
- "version": "4.60.0",
3
+ "version": "4.62.0",
4
4
  "description": "Build custom job boards and careers pages with Cavuno’s TypeScript SDK.",
5
5
  "keywords": [
6
6
  "api-client",
@@ -108,6 +108,36 @@ await board.jobAlerts.updatePreference({
108
108
  });
109
109
  ```
110
110
 
111
+ ## Anonymous lane: digest engagement
112
+
113
+ Digest job links open your job page with `ja_alert`, `ja_email`, `ja_pos` and `ja_mv`. Report the click from the job page's server code, once per full `GET` (not on prefetches or `HEAD`), and forward the visitor's user agent so crawlers and link scanners are left out. `recordClick` always resolves with `status: 'accepted'`; never block the page on it.
114
+
115
+ Digest manage and unsubscribe links carry `ja_alert` and `ja_email`. Spread them into `unsubscribe` to attribute the unsubscribe to that email; a link without them returns `null`, which spreads to nothing.
116
+
117
+ ```ts snippet
118
+ import {
119
+ parseJobAlertClickParams,
120
+ parseJobAlertUnsubscribeParams,
121
+ } from '@cavuno/board';
122
+
123
+ const click = parseJobAlertClickParams(request.url);
124
+ if (click) {
125
+ await board.jobAlerts
126
+ .recordClick({
127
+ ...click,
128
+ jobId: job.id,
129
+ userAgent: request.headers.get('user-agent') ?? undefined,
130
+ })
131
+ .catch(() => undefined);
132
+ }
133
+
134
+ await board.jobAlerts.unsubscribe({
135
+ subscriptionId,
136
+ token,
137
+ ...parseJobAlertUnsubscribeParams(request.url),
138
+ });
139
+ ```
140
+
111
141
  ## Signed-in lane
112
142
 
113
143
  Authenticated alerts use `placeIds`, while anonymous alerts use `placeSlugs`. Create and update accept the same `AlertBody`; update is a full replacement.
@@ -150,6 +180,7 @@ Removal is the signed-in lane's stop action; there is no pause state.
150
180
  - Anonymous subscribe sends `consent: true` and reveals no subscription existence.
151
181
  - The confirm UI handles all four statuses, including resend after expiry.
152
182
  - Manage reads use `subscription`; manage writes use `subscriptionId`.
183
+ - Job pages opened from a digest call `recordClick` once, server-side, with the visitor's user agent; the unsubscribe passes the link's `ja_*` attribution.
153
184
  - Editing one field preserves every other field in both full-replace APIs.
154
185
  - UI promises only weekly delivery filtered by job function, place, and remote option.
155
186
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cavuno-board-products
3
- description: Digital product storefront with @cavuno/board. Use for product lists and pages, reviews, free claims, embedded paid checkout, the purchase download page with its email confirmation, downloads, buyer reviews, resending the link, or the signed-in buyer's purchases.
3
+ description: Digital product storefront with @cavuno/board. Use for product lists and pages, reviews, free claims, embedded paid checkout, the purchase download page with its email confirmation, downloads, buyer reviews, resending the link, the signed-in buyer's purchases, or the tip jar's tip page and tip checkout.
4
4
  ---
5
5
 
6
6
  # Digital product storefront
@@ -122,6 +122,31 @@ const { data: mine } = await board.purchases.mine({ cache: 'no-store' });
122
122
 
123
123
  `review` replaces the buyer's earlier review; `product_reviews_disabled` (404) when ratings are off, `purchase_refunded` (409), `purchase_review_invalid` (400). `mine` needs a board user session and lists purchases made while signed in plus those made with the user's verified email, each with `downloadUrl`.
124
124
 
125
+ ## Tip jar
126
+
127
+ A board can have one tip jar: visitors tip any amount at or above a minimum on the tip page, `BOARD_PATHS.tip` (`/tip`), the `tip` route role. `board.tipJar` reads it and takes tips; the types are `TipJar`, `TipJarCheckoutBody`, `TipJarCheckout` and `TipJarCheckoutStatus`.
128
+
129
+ ```ts snippet
130
+ const jar = await board.tipJar.get(); // tip_jar_not_found (404): hide the tip page and its links
131
+ // jar.suggestedCents: three amounts, smallest first; jar.minimumCents; jar.allowNote
132
+ // jar.tipCount is null unless the board shows the number of tips
133
+
134
+ const kit = await board.tipJar.checkout({
135
+ amountCents: 500, // at least jar.minimumCents
136
+ note: 'Thanks for the weekly roundup!', // only when jar.allowNote; 280 characters max
137
+ returnPath: '/tip',
138
+ website: '', // honeypot: render hidden, send empty
139
+ });
140
+ // Mount like a paid product: loadStripe(kit.publishableKey, { stripeAccount: kit.stripeAccountId })
141
+ // then initEmbeddedCheckout({ clientSecret: kit.clientSecret }). Expires after 30 minutes.
142
+
143
+ const status = await board.tipJar.getCheckout(sessionId, { cache: 'no-store' });
144
+ if (status.status === 'paid') showThanks(status.thankYouMessage, status.receiptEmail);
145
+ // 'processing' until the payment clears: poll briefly
146
+ ```
147
+
148
+ Stripe collects the tipper's email (prefilled for a signed-in board user), so the form asks only for the amount and the note. Render the note as a plain `textarea`. `receiptEmail` is masked (`m•••@gmail.com`) because the session id is in a shareable URL. Link to the tip page with `jar.url`, which follows the board's route manifest. Errors: `tip_amount_below_minimum` (400, `details.minimumCents`), `tip_amount_invalid`, `tip_note_not_allowed`, `tip_note_too_long` (400), `tip_jar_not_found` (404), `stripe_not_connected` (409), `rate_limited` (429), `rate_limit_unavailable` (503); `getCheckout` with an unknown session is `tip_checkout_not_found` (404). The API never returns other tippers' emails or notes.
149
+
125
150
  ## Completion gate
126
151
 
127
152
  - The list shows listed products only; a link-only product page renders with `noindex`.
@@ -129,6 +154,7 @@ const { data: mine } = await board.purchases.mine({ cache: 'no-store' });
129
154
  - A forwarded download link asks for the email, and the confirmation survives a reload through your own cookie.
130
155
  - Downloads start from a button; `purchase_download_limit_reached` disables the button instead of retrying.
131
156
  - Download pages, checkout status and `mine()` are `no-store`; purchase paths never reach analytics or the sitemap.
157
+ - The tip page hides when `board.tipJar.get()` is `tip_jar_not_found`; a test tip returns with `session_id` and `getCheckout` reaches `paid`.
132
158
 
133
159
  ## Cavuno SDK reference
134
160
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.60.0",
2
+ "version": "4.62.0",
3
3
  "skills": [
4
4
  {
5
5
  "name": "cavuno-board-account",
@@ -115,7 +115,7 @@
115
115
  },
116
116
  {
117
117
  "name": "cavuno-board-products",
118
- "description": "Digital product storefront with @cavuno/board. Use for product lists and pages, reviews, free claims, embedded paid checkout, the purchase download page with its email confirmation, downloads, buyer reviews, resending the link, or the signed-in buyer's purchases.",
118
+ "description": "Digital product storefront with @cavuno/board. Use for product lists and pages, reviews, free claims, embedded paid checkout, the purchase download page with its email confirmation, downloads, buyer reviews, resending the link, the signed-in buyer's purchases, or the tip jar's tip page and tip checkout.",
119
119
  "path": "skills/cavuno-board-products/SKILL.md",
120
120
  "framework": null,
121
121
  "category": "core"