@cavuno/board 4.9.0 → 4.11.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 (40) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/{_spec-B9Ah8dNs.d.mts → _spec-Ck02NvUF.d.mts} +72 -1
  3. package/dist/{_spec-B9Ah8dNs.d.ts → _spec-Ck02NvUF.d.ts} +72 -1
  4. package/dist/{blog-BmqWfLZi.d.mts → blog-CZUXieNu.d.mts} +1 -1
  5. package/dist/{blog-bh07fZ8Q.d.ts → blog-ClwNmr_N.d.ts} +1 -1
  6. package/dist/{board-De8nLbk7.d.ts → board-6XZx1x5M.d.ts} +2 -2
  7. package/dist/{board-B4jLqmxn.d.mts → board-wHyyyAhT.d.mts} +2 -2
  8. package/dist/{breadcrumbs-B1HVufC7.d.ts → breadcrumbs-CPaEpS6h.d.ts} +2 -2
  9. package/dist/{breadcrumbs-BVQL2dNY.d.mts → breadcrumbs-DJjtyjlf.d.mts} +2 -2
  10. package/dist/browser/cavuno-board.global.min.js +1 -1
  11. package/dist/{chunk-T46JASKG.mjs → chunk-XEJWXRLK.mjs} +7 -0
  12. package/dist/filters.d.mts +2 -2
  13. package/dist/filters.d.ts +2 -2
  14. package/dist/format.d.mts +4 -4
  15. package/dist/format.d.ts +4 -4
  16. package/dist/index.d.mts +93 -14
  17. package/dist/index.d.ts +93 -14
  18. package/dist/index.js +118 -4
  19. package/dist/index.mjs +112 -5
  20. package/dist/{jobs-Iv6Wkvvf.d.ts → jobs-3BAwXBxR.d.ts} +1 -1
  21. package/dist/{jobs-B7q3BgIK.d.mts → jobs-iG5udM2R.d.mts} +1 -1
  22. package/dist/{search-DC0jatQN.d.mts → search-5DzB-OrD.d.mts} +1 -1
  23. package/dist/{search-CbDZwdyl.d.ts → search-kfabRi5l.d.ts} +1 -1
  24. package/dist/{seo-HCE7aCkh.d.mts → seo-C_Mt1i-Y.d.mts} +1 -1
  25. package/dist/{seo-BDFUuvXM.d.ts → seo-DndU15zg.d.ts} +1 -1
  26. package/dist/seo-files.d.mts +2 -2
  27. package/dist/seo-files.d.ts +2 -2
  28. package/dist/seo.d.mts +6 -6
  29. package/dist/seo.d.ts +6 -6
  30. package/dist/server.d.mts +6 -6
  31. package/dist/server.d.ts +6 -6
  32. package/dist/server.mjs +1 -1
  33. package/dist/sitemap.d.mts +6 -6
  34. package/dist/sitemap.d.ts +6 -6
  35. package/dist/suggest.d.mts +2 -2
  36. package/dist/suggest.d.ts +2 -2
  37. package/package.json +1 -1
  38. package/skills/cavuno-board-setup/SKILL.md +1 -0
  39. package/skills/cavuno-board-talent-access/SKILL.md +149 -0
  40. package/skills/manifest.json +8 -1
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: cavuno-board-talent-access
3
+ description: Employer talent-access paywall with @cavuno/board. Use for charging models, remaining credits, per-candidate unlock gates, embedded checkout, in-place upgrades, or the company billing portal.
4
+ ---
5
+
6
+ # Employer talent-access paywall
7
+
8
+ Operators sell access to the candidate directory: profile-unlock credits and/or first-message credits. Credits are company-scoped. This is a different buyer from the candidate job-access paywall (`board.me.access.*`, skill `cavuno-board-paywall`).
9
+
10
+ Two charging models (from `retrieve().accessModel`):
11
+
12
+ - `paid_messaging` — full profiles; a first cold message spends a message credit.
13
+ - `paid_unlocks_and_messaging` — directory cards redact; opaque `/p/{id}` requires an unlock credit; messaging stays credit-gated.
14
+
15
+ When no public `talent_access` plan exists, `accessModel` is `none` and the paywall is inert.
16
+
17
+ ## Read the CTA and remaining credits
18
+
19
+ `board.me.talentAccess.retrieve()` is the gating signal for a Message-vs-upsell CTA. Never cache it.
20
+
21
+ ```ts snippet
22
+ const access = await board.me.talentAccess.retrieve();
23
+ access.hasTalentAccess;
24
+ access.accessModel;
25
+ access.unlockCreditsRemaining;
26
+ access.messageCreditsRemaining;
27
+ access.hasUnlimitedUnlocks;
28
+ access.hasUnlimitedMessages;
29
+ access.companyId;
30
+ ```
31
+
32
+ `companyId` is set when the viewer has exactly one approved membership. It is `null` when they have none or more than one — pass `companyId` on writes or the API returns `company_required`.
33
+
34
+ ## Gate one candidate
35
+
36
+ Per-candidate already-unlocked state is a sibling read so the singleton never takes a candidate id.
37
+
38
+ ```ts snippet
39
+ const gate = await board.me.talentAccess.retrieveCandidate('bu_candidate');
40
+ if (!gate.alreadyUnlocked && !gate.hasUnlimitedUnlocks) {
41
+ renderUnlockCta(gate.unlockCreditsRemaining);
42
+ }
43
+ ```
44
+
45
+ ## Mint and mount checkout
46
+
47
+ `checkout` requires a signed-in approved employer and returns a mount kit. `returnPath` is relative; session metadata is `origin: talent_access`. Public talent plans come from `board.plans.list({ purpose: 'talent_access' })`.
48
+
49
+ ```ts snippet
50
+ import { loadStripe } from '@stripe/stripe-js';
51
+
52
+ const kit = await board.me.talentAccess.checkout({
53
+ planId: 'plan_1',
54
+ returnPath: '/employers',
55
+ colorMode: 'light',
56
+ });
57
+
58
+ const stripe = await loadStripe(kit.publishableKey, {
59
+ stripeAccount: kit.stripeAccountId,
60
+ });
61
+ ```
62
+
63
+ The kit contains `sessionId`, `clientSecret`, `stripeAccountId`, `publishableKey`, and `offerType`. The host owns Stripe.js and embedded-checkout mounting. Gate failures use `talent_access_unavailable`, `company_required`, and `stripe_not_connected`; handle them with `cavuno-board-errors`.
64
+
65
+ ## Confirm from remaining credits
66
+
67
+ `retrieveCheckout` reports `open`, `complete`, or `expired`. Open sessions are remountable with their `clientSecret`; expired sessions require a new checkout. After completion, poll `retrieve()` because webhook delivery is asynchronous.
68
+
69
+ ```ts snippet
70
+ const checkout = await board.me.talentAccess.retrieveCheckout(kit.sessionId);
71
+
72
+ if (checkout.status === 'complete') {
73
+ let access = await board.me.talentAccess.retrieve();
74
+ for (let poll = 0; !access.hasTalentAccess && poll < 10; poll++) {
75
+ await new Promise((resolve) => setTimeout(resolve, 1000));
76
+ access = await board.me.talentAccess.retrieve();
77
+ }
78
+ if (access.hasTalentAccess) renderUnlockedDirectory();
79
+ else renderPendingAccess();
80
+ }
81
+ ```
82
+
83
+ ## Spend an unlock
84
+
85
+ Unlock is idempotent: a second call for the same company/candidate pair returns `alreadyUnlocked: true` with no decrement.
86
+
87
+ ```ts snippet
88
+ const unlock = await board.me.talentAccess.unlock({
89
+ candidateId: 'bu_candidate',
90
+ });
91
+ if (unlock.alreadyUnlocked) renderProfile();
92
+ else renderProfile(unlock.unlockCreditsRemaining);
93
+ ```
94
+
95
+ `talent_access_required` means no plan or no remaining unlock credits.
96
+
97
+ ## Upgrade in place
98
+
99
+ Out-of-credits plan changes call `upgrade`, never a second checkout. Checkout would mint a parallel subscription.
100
+
101
+ ```ts snippet
102
+ await board.me.talentAccess.upgrade({ planId: 'plan_pro' });
103
+ ```
104
+
105
+ `already_on_plan` means the company already holds that plan. `talent_access_required` means there is no current talent_access subscription to swap.
106
+
107
+ ## Open the company billing portal
108
+
109
+ Job-posting and talent-access subscriptions share one Stripe customer per company. There is no `me.talentAccess.portal`.
110
+
111
+ ```ts snippet
112
+ const { url } = await board.me.companies.billingPortal.create('acme', {
113
+ returnPath: '/employers/billing',
114
+ });
115
+ location.href = url;
116
+ ```
117
+
118
+ ## Message credits spend on start
119
+
120
+ There is no separate message-credit spend endpoint. The composer gates on `hasTalentAccess` and remaining message credits; `conversations.start` still 403s `messaging_talent_access_required` on a cold send without credit.
121
+
122
+ ```ts snippet
123
+ await board.me.conversations.start({
124
+ candidateBoardUserId: 'bu_candidate',
125
+ body: 'Hi, your profile looks like a great fit.',
126
+ });
127
+ ```
128
+
129
+ ## Named vs opaque profile routes
130
+
131
+ Named `/p/{handle}` is the share bypass and always shows a full `public` profile. Opaque `/p/{id}` is the unlock-gated route. When `accessModel === 'paid_unlocks_and_messaging'`, directory cards redact for viewers who are not unlimited.
132
+
133
+ ```ts snippet
134
+ const named = await board.talent.retrieve('jane-doe');
135
+ const opaque = await board.talent.retrieve('bu_candidate');
136
+ ```
137
+
138
+ ## Completion gate
139
+
140
+ - `retrieve()` drives the Message-vs-upsell CTA and remaining-credit hints.
141
+ - Opaque `/p/{id}` uses `retrieveCandidate` then `unlock`; named `/p/{handle}` does not.
142
+ - Checkout reaches `complete`, then bounded `retrieve()` polling reaches `hasTalentAccess: true`.
143
+ - `upgrade` is the out-of-credits plan swap; never a second checkout session.
144
+ - Billing management uses `me.companies.billingPortal.create`, not a talent-access portal.
145
+ - First-message spend stays on `conversations.start`.
146
+
147
+ ## Cavuno SDK reference
148
+
149
+ For setup and API details beyond this workflow, use the [Cavuno Board SDK documentation](https://cavuno.com/docs/sdk).
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.9.0",
2
+ "version": "4.11.0",
3
3
  "skills": [
4
4
  {
5
5
  "name": "cavuno-board-account",
@@ -154,6 +154,13 @@
154
154
  "path": "skills/cavuno-board-smoke-test/SKILL.md",
155
155
  "framework": null,
156
156
  "category": "core"
157
+ },
158
+ {
159
+ "name": "cavuno-board-talent-access",
160
+ "description": "Employer talent-access paywall with @cavuno/board. Use for charging models, remaining credits, per-candidate unlock gates, embedded checkout, in-place upgrades, or the company billing portal.",
161
+ "path": "skills/cavuno-board-talent-access/SKILL.md",
162
+ "framework": null,
163
+ "category": "core"
157
164
  }
158
165
  ]
159
166
  }