@cavuno/board 1.41.0 → 1.42.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 (48) hide show
  1. package/dist/{_spec-l_596ZwW.d.mts → _spec-LdkTxfx0.d.mts} +33 -0
  2. package/dist/{_spec-l_596ZwW.d.ts → _spec-LdkTxfx0.d.ts} +33 -0
  3. package/dist/{board-CyHA6rRP.d.mts → board-Cs93Lf23.d.mts} +1 -1
  4. package/dist/{board-BzK5j73O.d.ts → board-FxC9Wdhi.d.ts} +1 -1
  5. package/dist/filters.d.mts +2 -2
  6. package/dist/filters.d.ts +2 -2
  7. package/dist/format.d.mts +3 -3
  8. package/dist/format.d.ts +3 -3
  9. package/dist/go.d.mts +65 -0
  10. package/dist/go.d.ts +65 -0
  11. package/dist/go.js +130 -0
  12. package/dist/go.mjs +107 -0
  13. package/dist/index.d.mts +9 -9
  14. package/dist/index.d.ts +9 -9
  15. package/dist/index.js +1 -1
  16. package/dist/index.mjs +1 -1
  17. package/dist/{jobs-BhthvMkA.d.mts → jobs-BtazrWfv.d.mts} +1 -1
  18. package/dist/{jobs-CXudz1Y4.d.ts → jobs-TIAPH3Ol.d.ts} +1 -1
  19. package/dist/paths.d.mts +25 -1
  20. package/dist/paths.d.ts +25 -1
  21. package/dist/paths.js +20 -1
  22. package/dist/paths.mjs +20 -1
  23. package/dist/roles-vY0AXhoc.d.mts +82 -0
  24. package/dist/roles-vY0AXhoc.d.ts +82 -0
  25. package/dist/route-contract.d.mts +257 -0
  26. package/dist/route-contract.d.ts +257 -0
  27. package/dist/route-contract.js +1131 -0
  28. package/dist/route-contract.mjs +1108 -0
  29. package/dist/{salaries-ByBuHCLH.d.ts → salaries-BEAqkaFt.d.ts} +2 -2
  30. package/dist/{salaries-Dr_Zugal.d.mts → salaries-CB9Ve4kS.d.mts} +2 -2
  31. package/dist/{search-DZrq-k76.d.ts → search-DWmHHXn8.d.ts} +1 -1
  32. package/dist/{search-CrIlXSJP.d.mts → search-YhoVpXFY.d.mts} +1 -1
  33. package/dist/seo.d.mts +4 -4
  34. package/dist/seo.d.ts +4 -4
  35. package/dist/server.d.mts +5 -5
  36. package/dist/server.d.ts +5 -5
  37. package/dist/sitemap.d.mts +5 -5
  38. package/dist/sitemap.d.ts +5 -5
  39. package/dist/sitemap.js +8 -1
  40. package/dist/sitemap.mjs +8 -1
  41. package/dist/suggest.d.mts +2 -2
  42. package/dist/suggest.d.ts +2 -2
  43. package/dist/well-known.d.mts +113 -0
  44. package/dist/well-known.d.ts +113 -0
  45. package/dist/well-known.js +561 -0
  46. package/dist/well-known.mjs +538 -0
  47. package/package.json +31 -1
  48. package/skills/manifest.json +1 -1
@@ -4840,6 +4840,39 @@ interface components {
4840
4840
  /** @description Space-separated list of scopes granted on the issued token. */
4841
4841
  scope: string;
4842
4842
  };
4843
+ Transaction: {
4844
+ id: string;
4845
+ /** @enum {string} */
4846
+ object: "transaction";
4847
+ /** @enum {string} */
4848
+ kind: "card_post" | "invoice" | "subscription";
4849
+ /** @enum {string} */
4850
+ status: "paid" | "open" | "void" | "uncollectible";
4851
+ /** @enum {string} */
4852
+ method: "card" | "invoice";
4853
+ /** @description Amount in Stripe minor units (cents for most currencies). */
4854
+ amountCents: number;
4855
+ currency: string;
4856
+ description: string;
4857
+ customerLabel: string;
4858
+ customerEmail: string | null;
4859
+ /** @description ISO-8601 transaction date. */
4860
+ date: string;
4861
+ /** @description ISO-8601 invoice due date, or null. Past-due is client-derived from this field. */
4862
+ invoiceDueAt: string | null;
4863
+ stripeInvoiceId: string | null;
4864
+ hostedInvoiceUrl: string | null;
4865
+ receiptUrl: string | null;
4866
+ methodBrand: string | null;
4867
+ methodLast4: string | null;
4868
+ methodType: string | null;
4869
+ /** @enum {string|null} */
4870
+ publishTiming: "on_issue" | "on_payment" | null;
4871
+ /** @description jobOrders id when this row is order-sourced. */
4872
+ orderId: string | null;
4873
+ /** @description employerSubscriptions id when this row is a subscription renewal. Cross-link: GET /v1/employer-subscriptions/:id. */
4874
+ subscriptionId: string | null;
4875
+ };
4843
4876
  TransferOwnershipBody: {
4844
4877
  /** @description The user ID of the member who will become the primary owner. */
4845
4878
  newOwnerUserId: string;
@@ -4840,6 +4840,39 @@ interface components {
4840
4840
  /** @description Space-separated list of scopes granted on the issued token. */
4841
4841
  scope: string;
4842
4842
  };
4843
+ Transaction: {
4844
+ id: string;
4845
+ /** @enum {string} */
4846
+ object: "transaction";
4847
+ /** @enum {string} */
4848
+ kind: "card_post" | "invoice" | "subscription";
4849
+ /** @enum {string} */
4850
+ status: "paid" | "open" | "void" | "uncollectible";
4851
+ /** @enum {string} */
4852
+ method: "card" | "invoice";
4853
+ /** @description Amount in Stripe minor units (cents for most currencies). */
4854
+ amountCents: number;
4855
+ currency: string;
4856
+ description: string;
4857
+ customerLabel: string;
4858
+ customerEmail: string | null;
4859
+ /** @description ISO-8601 transaction date. */
4860
+ date: string;
4861
+ /** @description ISO-8601 invoice due date, or null. Past-due is client-derived from this field. */
4862
+ invoiceDueAt: string | null;
4863
+ stripeInvoiceId: string | null;
4864
+ hostedInvoiceUrl: string | null;
4865
+ receiptUrl: string | null;
4866
+ methodBrand: string | null;
4867
+ methodLast4: string | null;
4868
+ methodType: string | null;
4869
+ /** @enum {string|null} */
4870
+ publishTiming: "on_issue" | "on_payment" | null;
4871
+ /** @description jobOrders id when this row is order-sourced. */
4872
+ orderId: string | null;
4873
+ /** @description employerSubscriptions id when this row is a subscription renewal. Cross-link: GET /v1/employer-subscriptions/:id. */
4874
+ subscriptionId: string | null;
4875
+ };
4843
4876
  TransferOwnershipBody: {
4844
4877
  /** @description The user ID of the member who will become the primary owner. */
4845
4878
  newOwnerUserId: string;
@@ -1,4 +1,4 @@
1
- import { S as Schemas } from './_spec-l_596ZwW.mjs';
1
+ import { S as Schemas } from './_spec-LdkTxfx0.mjs';
2
2
 
3
3
  type PublicBoard = Schemas['PublicBoardContext'];
4
4
  type PublicBoardFeatures = PublicBoard['features'];
@@ -1,4 +1,4 @@
1
- import { S as Schemas } from './_spec-l_596ZwW.js';
1
+ import { S as Schemas } from './_spec-LdkTxfx0.js';
2
2
 
3
3
  type PublicBoard = Schemas['PublicBoardContext'];
4
4
  type PublicBoardFeatures = PublicBoard['features'];
@@ -1,6 +1,6 @@
1
1
  import { B as BoardLabelOverrides } from './ui-copy-CKfFTtLk.mjs';
2
- import { J as JobSort, E as EmploymentType, R as RemoteOption, S as Seniority } from './jobs-BhthvMkA.mjs';
3
- import './_spec-l_596ZwW.mjs';
2
+ import { J as JobSort, E as EmploymentType, R as RemoteOption, S as Seniority } from './jobs-BtazrWfv.mjs';
3
+ import './_spec-LdkTxfx0.mjs';
4
4
 
5
5
  declare const REMOTE_OPTIONS: readonly RemoteOption[];
6
6
  /**
package/dist/filters.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { B as BoardLabelOverrides } from './ui-copy-CKfFTtLk.js';
2
- import { J as JobSort, E as EmploymentType, R as RemoteOption, S as Seniority } from './jobs-CXudz1Y4.js';
3
- import './_spec-l_596ZwW.js';
2
+ import { J as JobSort, E as EmploymentType, R as RemoteOption, S as Seniority } from './jobs-TIAPH3Ol.js';
3
+ import './_spec-LdkTxfx0.js';
4
4
 
5
5
  declare const REMOTE_OPTIONS: readonly RemoteOption[];
6
6
  /**
package/dist/format.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-BhthvMkA.mjs';
1
+ import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-BtazrWfv.mjs';
2
2
  import { B as BoardLabelOverrides } from './ui-copy-CKfFTtLk.mjs';
3
3
  export { A as AlertsCopy, a as ApplyCopy, b as BlogCopy, c as BreadcrumbsCopy, C as CopyLinkCopy, E as EntityCopy, F as FooterCopy, J as JobCardCopy, d as JobDetailCopy, e as JobSearchCopy, N as NavCopy, P as PUBLIC_LABEL_GROUPS, f as PaginationCopy, S as SalaryCopy, U as UiCopy, u as uiCopy } from './ui-copy-CKfFTtLk.mjs';
4
- import { C as CustomFieldDefinition } from './board-CyHA6rRP.mjs';
5
- import './_spec-l_596ZwW.mjs';
4
+ import { C as CustomFieldDefinition } from './board-Cs93Lf23.mjs';
5
+ import './_spec-LdkTxfx0.mjs';
6
6
 
7
7
  /**
8
8
  * Date display helpers in the board language (required leading parameter,
package/dist/format.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-CXudz1Y4.js';
1
+ import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-TIAPH3Ol.js';
2
2
  import { B as BoardLabelOverrides } from './ui-copy-CKfFTtLk.js';
3
3
  export { A as AlertsCopy, a as ApplyCopy, b as BlogCopy, c as BreadcrumbsCopy, C as CopyLinkCopy, E as EntityCopy, F as FooterCopy, J as JobCardCopy, d as JobDetailCopy, e as JobSearchCopy, N as NavCopy, P as PUBLIC_LABEL_GROUPS, f as PaginationCopy, S as SalaryCopy, U as UiCopy, u as uiCopy } from './ui-copy-CKfFTtLk.js';
4
- import { C as CustomFieldDefinition } from './board-BzK5j73O.js';
5
- import './_spec-l_596ZwW.js';
4
+ import { C as CustomFieldDefinition } from './board-FxC9Wdhi.js';
5
+ import './_spec-LdkTxfx0.js';
6
6
 
7
7
  /**
8
8
  * Date display helpers in the board language (required leading parameter,
package/dist/go.d.mts ADDED
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Pure `/go` indirection for self-deployed SDK boards (LNK-04).
3
+ *
4
+ * Mirrors the hosted-app contract:
5
+ * - `/go/job/<id>` → 302 to jobDetailPath(companySlug, jobSlug)
6
+ * - `/go/alerts-manage` / `/go/alerts-confirm` → 302 carrying query
7
+ * - unknown / unresolvable → 302 to BOARD_PATHS.jobs
8
+ * - every response: `X-Robots-Tag: noindex, nofollow`
9
+ *
10
+ * Framework-portable: takes a standard Request, returns a standard
11
+ * Response. No Next.js imports (same discipline as the sitemap walker).
12
+ */
13
+ interface ResolvedJobSlugs {
14
+ companySlug: string;
15
+ jobSlug: string;
16
+ }
17
+ interface GoRedirectResult {
18
+ location: string;
19
+ status: 302;
20
+ }
21
+ /**
22
+ * Optional job-id → slugs lookup. The public Board API currently exposes
23
+ * job retrieve **by slug only** (`board.jobs.retrieve(jobSlug)`); there is
24
+ * no publishable-key endpoint that resolves an immutable job id to slugs.
25
+ *
26
+ * When `lookupJob` is omitted, `/go/job/<id>` degrades to the jobs index
27
+ * (safe, never 404). Pass a custom lookup when a data-plane endpoint lands
28
+ * (see TODO(LNK-04-followup)).
29
+ */
30
+ type GoJobLookup = (jobId: string) => Promise<ResolvedJobSlugs | null> | ResolvedJobSlugs | null;
31
+ interface CreateGoHandlerConfig {
32
+ /**
33
+ * Optional job resolver. Injected so tests can fake the data client and
34
+ * so callers can wire a future Board API id-lookup without an SDK release.
35
+ */
36
+ lookupJob?: GoJobLookup;
37
+ /**
38
+ * Base origin used to absolutize Location (e.g. `https://jobs.example.com`).
39
+ * When omitted, Location is absolute against the incoming request URL —
40
+ * correct for same-host mounts.
41
+ */
42
+ origin?: string;
43
+ }
44
+ declare function goResponseHeaders(): Record<string, string>;
45
+ /**
46
+ * Pure role → location resolver. Shared by the handler so unit tests can
47
+ * assert the contract without spinning a Request.
48
+ */
49
+ declare function resolveGoRedirect(parts: readonly string[] | undefined, search: string, resolvedJob: ResolvedJobSlugs | null): GoRedirectResult;
50
+ /**
51
+ * Create a `(request) => Response` handler the starter mounts at `/go/*`.
52
+ *
53
+ * @example
54
+ * // Next.js App Router
55
+ * import { createGoHandler } from '@cavuno/board/go';
56
+ * export const GET = createGoHandler({});
57
+ *
58
+ * // With a future id-lookup:
59
+ * export const GET = createGoHandler({
60
+ * lookupJob: async (id) => board.jobs.retrieveById?.(id) ?? null,
61
+ * });
62
+ */
63
+ declare function createGoHandler(config?: CreateGoHandlerConfig): (request: Request) => Promise<Response>;
64
+
65
+ export { type CreateGoHandlerConfig, type GoJobLookup, type GoRedirectResult, type ResolvedJobSlugs, createGoHandler, goResponseHeaders, resolveGoRedirect };
package/dist/go.d.ts ADDED
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Pure `/go` indirection for self-deployed SDK boards (LNK-04).
3
+ *
4
+ * Mirrors the hosted-app contract:
5
+ * - `/go/job/<id>` → 302 to jobDetailPath(companySlug, jobSlug)
6
+ * - `/go/alerts-manage` / `/go/alerts-confirm` → 302 carrying query
7
+ * - unknown / unresolvable → 302 to BOARD_PATHS.jobs
8
+ * - every response: `X-Robots-Tag: noindex, nofollow`
9
+ *
10
+ * Framework-portable: takes a standard Request, returns a standard
11
+ * Response. No Next.js imports (same discipline as the sitemap walker).
12
+ */
13
+ interface ResolvedJobSlugs {
14
+ companySlug: string;
15
+ jobSlug: string;
16
+ }
17
+ interface GoRedirectResult {
18
+ location: string;
19
+ status: 302;
20
+ }
21
+ /**
22
+ * Optional job-id → slugs lookup. The public Board API currently exposes
23
+ * job retrieve **by slug only** (`board.jobs.retrieve(jobSlug)`); there is
24
+ * no publishable-key endpoint that resolves an immutable job id to slugs.
25
+ *
26
+ * When `lookupJob` is omitted, `/go/job/<id>` degrades to the jobs index
27
+ * (safe, never 404). Pass a custom lookup when a data-plane endpoint lands
28
+ * (see TODO(LNK-04-followup)).
29
+ */
30
+ type GoJobLookup = (jobId: string) => Promise<ResolvedJobSlugs | null> | ResolvedJobSlugs | null;
31
+ interface CreateGoHandlerConfig {
32
+ /**
33
+ * Optional job resolver. Injected so tests can fake the data client and
34
+ * so callers can wire a future Board API id-lookup without an SDK release.
35
+ */
36
+ lookupJob?: GoJobLookup;
37
+ /**
38
+ * Base origin used to absolutize Location (e.g. `https://jobs.example.com`).
39
+ * When omitted, Location is absolute against the incoming request URL —
40
+ * correct for same-host mounts.
41
+ */
42
+ origin?: string;
43
+ }
44
+ declare function goResponseHeaders(): Record<string, string>;
45
+ /**
46
+ * Pure role → location resolver. Shared by the handler so unit tests can
47
+ * assert the contract without spinning a Request.
48
+ */
49
+ declare function resolveGoRedirect(parts: readonly string[] | undefined, search: string, resolvedJob: ResolvedJobSlugs | null): GoRedirectResult;
50
+ /**
51
+ * Create a `(request) => Response` handler the starter mounts at `/go/*`.
52
+ *
53
+ * @example
54
+ * // Next.js App Router
55
+ * import { createGoHandler } from '@cavuno/board/go';
56
+ * export const GET = createGoHandler({});
57
+ *
58
+ * // With a future id-lookup:
59
+ * export const GET = createGoHandler({
60
+ * lookupJob: async (id) => board.jobs.retrieveById?.(id) ?? null,
61
+ * });
62
+ */
63
+ declare function createGoHandler(config?: CreateGoHandlerConfig): (request: Request) => Promise<Response>;
64
+
65
+ export { type CreateGoHandlerConfig, type GoJobLookup, type GoRedirectResult, type ResolvedJobSlugs, createGoHandler, goResponseHeaders, resolveGoRedirect };
package/dist/go.js ADDED
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/go/index.ts
21
+ var go_exports = {};
22
+ __export(go_exports, {
23
+ createGoHandler: () => createGoHandler,
24
+ goResponseHeaders: () => goResponseHeaders,
25
+ resolveGoRedirect: () => resolveGoRedirect
26
+ });
27
+ module.exports = __toCommonJS(go_exports);
28
+
29
+ // src/paths/index.ts
30
+ function jobDetailPath(companySlug, jobSlug) {
31
+ return `/companies/${companySlug}/jobs/${jobSlug}`;
32
+ }
33
+ var BOARD_PATHS = {
34
+ home: "/",
35
+ jobs: "/jobs",
36
+ companies: "/companies",
37
+ salaries: "/salaries",
38
+ salaryCompanies: "/salaries/companies",
39
+ salaryTitles: "/salaries/titles",
40
+ salarySkills: "/salaries/skills",
41
+ salaryLocations: "/salaries/locations",
42
+ blog: "/blog",
43
+ about: "/about",
44
+ privacyPolicy: "/privacy-policy",
45
+ termsOfService: "/terms-of-service",
46
+ cookiePolicy: "/cookie-policy",
47
+ impressum: "/impressum",
48
+ talent: "/talent",
49
+ employers: "/employers",
50
+ /**
51
+ * Alert-email surfaces (ADR-0090 D1/D4). Promoted out of raw literals in
52
+ * the job-alerts composer so /go indirection and email composition share
53
+ * one definition.
54
+ */
55
+ alertsManage: "/alerts/manage",
56
+ alertsConfirm: "/alerts/confirm"
57
+ };
58
+
59
+ // src/go/create-go-handler.ts
60
+ var NOINDEX_ROBOTS = "noindex, nofollow";
61
+ function goResponseHeaders() {
62
+ return {
63
+ "X-Robots-Tag": NOINDEX_ROBOTS,
64
+ "Cache-Control": "private, no-store"
65
+ };
66
+ }
67
+ function resolveGoRedirect(parts, search, resolvedJob) {
68
+ const role = parts?.[0];
69
+ const id = parts?.[1];
70
+ const query = search.startsWith("?") ? search : search ? `?${search}` : "";
71
+ if (role === "job") {
72
+ if (id && resolvedJob?.companySlug && resolvedJob.jobSlug) {
73
+ return {
74
+ location: jobDetailPath(resolvedJob.companySlug, resolvedJob.jobSlug),
75
+ status: 302
76
+ };
77
+ }
78
+ return { location: BOARD_PATHS.jobs, status: 302 };
79
+ }
80
+ if (role === "alerts-manage") {
81
+ return {
82
+ location: `${BOARD_PATHS.alertsManage}${query}`,
83
+ status: 302
84
+ };
85
+ }
86
+ if (role === "alerts-confirm") {
87
+ return {
88
+ location: `${BOARD_PATHS.alertsConfirm}${query}`,
89
+ status: 302
90
+ };
91
+ }
92
+ return { location: BOARD_PATHS.jobs, status: 302 };
93
+ }
94
+ function partsFromRequest(request) {
95
+ const { pathname } = new URL(request.url);
96
+ const segments = pathname.split("/").map((s) => s.trim()).filter(Boolean);
97
+ const goIdx = segments.findIndex((s) => s === "go");
98
+ if (goIdx >= 0) {
99
+ return segments.slice(goIdx + 1);
100
+ }
101
+ return segments;
102
+ }
103
+ function createGoHandler(config = {}) {
104
+ const { lookupJob, origin } = config;
105
+ return async function goHandler(request) {
106
+ const url = new URL(request.url);
107
+ const parts = partsFromRequest(request);
108
+ let resolvedJob = null;
109
+ if (parts[0] === "job" && parts[1]) {
110
+ if (lookupJob) {
111
+ try {
112
+ resolvedJob = await lookupJob(parts[1]) ?? null;
113
+ } catch {
114
+ resolvedJob = null;
115
+ }
116
+ } else {
117
+ resolvedJob = null;
118
+ }
119
+ }
120
+ const result = resolveGoRedirect(parts, url.search, resolvedJob);
121
+ const locationBase = origin ?? url.origin;
122
+ return new Response(null, {
123
+ status: result.status,
124
+ headers: {
125
+ ...goResponseHeaders(),
126
+ Location: new URL(result.location, locationBase).toString()
127
+ }
128
+ });
129
+ };
130
+ }
package/dist/go.mjs ADDED
@@ -0,0 +1,107 @@
1
+ // src/paths/index.ts
2
+ function jobDetailPath(companySlug, jobSlug) {
3
+ return `/companies/${companySlug}/jobs/${jobSlug}`;
4
+ }
5
+ var BOARD_PATHS = {
6
+ home: "/",
7
+ jobs: "/jobs",
8
+ companies: "/companies",
9
+ salaries: "/salaries",
10
+ salaryCompanies: "/salaries/companies",
11
+ salaryTitles: "/salaries/titles",
12
+ salarySkills: "/salaries/skills",
13
+ salaryLocations: "/salaries/locations",
14
+ blog: "/blog",
15
+ about: "/about",
16
+ privacyPolicy: "/privacy-policy",
17
+ termsOfService: "/terms-of-service",
18
+ cookiePolicy: "/cookie-policy",
19
+ impressum: "/impressum",
20
+ talent: "/talent",
21
+ employers: "/employers",
22
+ /**
23
+ * Alert-email surfaces (ADR-0090 D1/D4). Promoted out of raw literals in
24
+ * the job-alerts composer so /go indirection and email composition share
25
+ * one definition.
26
+ */
27
+ alertsManage: "/alerts/manage",
28
+ alertsConfirm: "/alerts/confirm"
29
+ };
30
+
31
+ // src/go/create-go-handler.ts
32
+ var NOINDEX_ROBOTS = "noindex, nofollow";
33
+ function goResponseHeaders() {
34
+ return {
35
+ "X-Robots-Tag": NOINDEX_ROBOTS,
36
+ "Cache-Control": "private, no-store"
37
+ };
38
+ }
39
+ function resolveGoRedirect(parts, search, resolvedJob) {
40
+ const role = parts?.[0];
41
+ const id = parts?.[1];
42
+ const query = search.startsWith("?") ? search : search ? `?${search}` : "";
43
+ if (role === "job") {
44
+ if (id && resolvedJob?.companySlug && resolvedJob.jobSlug) {
45
+ return {
46
+ location: jobDetailPath(resolvedJob.companySlug, resolvedJob.jobSlug),
47
+ status: 302
48
+ };
49
+ }
50
+ return { location: BOARD_PATHS.jobs, status: 302 };
51
+ }
52
+ if (role === "alerts-manage") {
53
+ return {
54
+ location: `${BOARD_PATHS.alertsManage}${query}`,
55
+ status: 302
56
+ };
57
+ }
58
+ if (role === "alerts-confirm") {
59
+ return {
60
+ location: `${BOARD_PATHS.alertsConfirm}${query}`,
61
+ status: 302
62
+ };
63
+ }
64
+ return { location: BOARD_PATHS.jobs, status: 302 };
65
+ }
66
+ function partsFromRequest(request) {
67
+ const { pathname } = new URL(request.url);
68
+ const segments = pathname.split("/").map((s) => s.trim()).filter(Boolean);
69
+ const goIdx = segments.findIndex((s) => s === "go");
70
+ if (goIdx >= 0) {
71
+ return segments.slice(goIdx + 1);
72
+ }
73
+ return segments;
74
+ }
75
+ function createGoHandler(config = {}) {
76
+ const { lookupJob, origin } = config;
77
+ return async function goHandler(request) {
78
+ const url = new URL(request.url);
79
+ const parts = partsFromRequest(request);
80
+ let resolvedJob = null;
81
+ if (parts[0] === "job" && parts[1]) {
82
+ if (lookupJob) {
83
+ try {
84
+ resolvedJob = await lookupJob(parts[1]) ?? null;
85
+ } catch {
86
+ resolvedJob = null;
87
+ }
88
+ } else {
89
+ resolvedJob = null;
90
+ }
91
+ }
92
+ const result = resolveGoRedirect(parts, url.search, resolvedJob);
93
+ const locationBase = origin ?? url.origin;
94
+ return new Response(null, {
95
+ status: result.status,
96
+ headers: {
97
+ ...goResponseHeaders(),
98
+ Location: new URL(result.location, locationBase).toString()
99
+ }
100
+ });
101
+ };
102
+ }
103
+ export {
104
+ createGoHandler,
105
+ goResponseHeaders,
106
+ resolveGoRedirect
107
+ };
package/dist/index.d.mts CHANGED
@@ -1,11 +1,11 @@
1
- import { S as Schemas, c as components } from './_spec-l_596ZwW.mjs';
2
- import { F as FetchOptions, c as StorageMode, B as BoardRequest, A as Awaitable, L as Logger, d as BoardClient, a as SearchSuggestQuery } from './search-CrIlXSJP.mjs';
3
- export { e as ACCESS_TOKEN_KEY, f as BOARD_ACCESS_GRANT_KEY, C as CompanySuggestion, g as CustomStorage, R as REFRESH_TOKEN_KEY, b as SuggestResult, S as SuggestionItem, T as TermSuggestion } from './search-CrIlXSJP.mjs';
4
- export { C as CustomFieldDefinition, a as CustomFieldOption, b as CustomFieldType, P as PublicBoard, c as PublicBoardAnalytics, d as PublicBoardFeatures, e as PublicBoardTheme } from './board-CyHA6rRP.mjs';
5
- import { R as RemoteOption, E as EmploymentType, S as Seniority, L as ListEnvelope, b as JobsListQuery, c as JobCardListEnvelope, d as JobsSearchBody, e as JobCardSearchEnvelope, f as JobsSimilarQuery, g as SearchEnvelope } from './jobs-BhthvMkA.mjs';
6
- export { h as CustomFieldValue, C as CustomFieldValues, i as EducationRequirement, j as JobCatalogPagination, k as JobCompany, J as JobSort, O as OfficeLocation, l as OffsetPagination, P as PublicJob, a as PublicJobCard, m as RelatedSearch, n as RemotePermit, o as RemoteTimezone, p as StorefrontPagination } from './jobs-BhthvMkA.mjs';
7
- import { b as CompaniesListQuery, c as CompanyListEnvelope, d as CompaniesSearchBody, e as CompanyJobsListQuery, f as CompanySimilarQuery, g as CompanyMarketsListQuery, h as SalaryDetailQuery, i as BlogPostsListQuery, j as BlogSimilarQuery, k as BlogSearchBody } from './salaries-Dr_Zugal.mjs';
8
- export { B as BlogAuthorEmbed, l as BlogTagEmbed, C as CompanyCategorySalary, m as CompanyMarket, n as CompanyMarketRef, a as CompanySalary, L as LocationSalaryDetail, o as LocationSkillsIndex, p as LocationTitlesIndex, q as PublicBlogAdjacentPosts, r as PublicBlogAuthor, s as PublicBlogPost, P as PublicBlogPostSummary, t as PublicBlogTag, u as PublicCompany, v as PublicCompanyDetail, w as SalaryCompany, x as SalaryLocation, y as SalarySkill, z as SalaryTitle, A as SkillLocationSalary, D as SkillLocationsIndex, S as SkillSalaryDetail, E as TitleLocationSalary, F as TitleLocationsIndex, T as TitleSalaryDetail } from './salaries-Dr_Zugal.mjs';
1
+ import { S as Schemas, c as components } from './_spec-LdkTxfx0.mjs';
2
+ import { F as FetchOptions, c as StorageMode, B as BoardRequest, A as Awaitable, L as Logger, d as BoardClient, a as SearchSuggestQuery } from './search-YhoVpXFY.mjs';
3
+ export { e as ACCESS_TOKEN_KEY, f as BOARD_ACCESS_GRANT_KEY, C as CompanySuggestion, g as CustomStorage, R as REFRESH_TOKEN_KEY, b as SuggestResult, S as SuggestionItem, T as TermSuggestion } from './search-YhoVpXFY.mjs';
4
+ export { C as CustomFieldDefinition, a as CustomFieldOption, b as CustomFieldType, P as PublicBoard, c as PublicBoardAnalytics, d as PublicBoardFeatures, e as PublicBoardTheme } from './board-Cs93Lf23.mjs';
5
+ import { R as RemoteOption, E as EmploymentType, S as Seniority, L as ListEnvelope, b as JobsListQuery, c as JobCardListEnvelope, d as JobsSearchBody, e as JobCardSearchEnvelope, f as JobsSimilarQuery, g as SearchEnvelope } from './jobs-BtazrWfv.mjs';
6
+ export { h as CustomFieldValue, C as CustomFieldValues, i as EducationRequirement, j as JobCatalogPagination, k as JobCompany, J as JobSort, O as OfficeLocation, l as OffsetPagination, P as PublicJob, a as PublicJobCard, m as RelatedSearch, n as RemotePermit, o as RemoteTimezone, p as StorefrontPagination } from './jobs-BtazrWfv.mjs';
7
+ import { b as CompaniesListQuery, c as CompanyListEnvelope, d as CompaniesSearchBody, e as CompanyJobsListQuery, f as CompanySimilarQuery, g as CompanyMarketsListQuery, h as SalaryDetailQuery, i as BlogPostsListQuery, j as BlogSimilarQuery, k as BlogSearchBody } from './salaries-CB9Ve4kS.mjs';
8
+ export { B as BlogAuthorEmbed, l as BlogTagEmbed, C as CompanyCategorySalary, m as CompanyMarket, n as CompanyMarketRef, a as CompanySalary, L as LocationSalaryDetail, o as LocationSkillsIndex, p as LocationTitlesIndex, q as PublicBlogAdjacentPosts, r as PublicBlogAuthor, s as PublicBlogPost, P as PublicBlogPostSummary, t as PublicBlogTag, u as PublicCompany, v as PublicCompanyDetail, w as SalaryCompany, x as SalaryLocation, y as SalarySkill, z as SalaryTitle, A as SkillLocationSalary, D as SkillLocationsIndex, S as SkillSalaryDetail, E as TitleLocationSalary, F as TitleLocationsIndex, T as TitleSalaryDetail } from './salaries-CB9Ve4kS.mjs';
9
9
 
10
10
  /**
11
11
  * Well-known `<domain>_<snake_reason>` codes the Board API sends, grouped by
@@ -141,7 +141,7 @@ declare function paginate<Q extends Record<string, unknown>, P extends PageShape
141
141
  * constant because the package is platform-neutral and cannot read
142
142
  * package.json at runtime.
143
143
  */
144
- declare const SDK_VERSION = "1.41.0";
144
+ declare const SDK_VERSION = "1.42.0";
145
145
 
146
146
  type SavedJob = Schemas['SavedJob'];
147
147
  type SavedJobsListQuery = {
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { S as Schemas, c as components } from './_spec-l_596ZwW.js';
2
- import { F as FetchOptions, c as StorageMode, B as BoardRequest, A as Awaitable, L as Logger, d as BoardClient, a as SearchSuggestQuery } from './search-DZrq-k76.js';
3
- export { e as ACCESS_TOKEN_KEY, f as BOARD_ACCESS_GRANT_KEY, C as CompanySuggestion, g as CustomStorage, R as REFRESH_TOKEN_KEY, b as SuggestResult, S as SuggestionItem, T as TermSuggestion } from './search-DZrq-k76.js';
4
- export { C as CustomFieldDefinition, a as CustomFieldOption, b as CustomFieldType, P as PublicBoard, c as PublicBoardAnalytics, d as PublicBoardFeatures, e as PublicBoardTheme } from './board-BzK5j73O.js';
5
- import { R as RemoteOption, E as EmploymentType, S as Seniority, L as ListEnvelope, b as JobsListQuery, c as JobCardListEnvelope, d as JobsSearchBody, e as JobCardSearchEnvelope, f as JobsSimilarQuery, g as SearchEnvelope } from './jobs-CXudz1Y4.js';
6
- export { h as CustomFieldValue, C as CustomFieldValues, i as EducationRequirement, j as JobCatalogPagination, k as JobCompany, J as JobSort, O as OfficeLocation, l as OffsetPagination, P as PublicJob, a as PublicJobCard, m as RelatedSearch, n as RemotePermit, o as RemoteTimezone, p as StorefrontPagination } from './jobs-CXudz1Y4.js';
7
- import { b as CompaniesListQuery, c as CompanyListEnvelope, d as CompaniesSearchBody, e as CompanyJobsListQuery, f as CompanySimilarQuery, g as CompanyMarketsListQuery, h as SalaryDetailQuery, i as BlogPostsListQuery, j as BlogSimilarQuery, k as BlogSearchBody } from './salaries-ByBuHCLH.js';
8
- export { B as BlogAuthorEmbed, l as BlogTagEmbed, C as CompanyCategorySalary, m as CompanyMarket, n as CompanyMarketRef, a as CompanySalary, L as LocationSalaryDetail, o as LocationSkillsIndex, p as LocationTitlesIndex, q as PublicBlogAdjacentPosts, r as PublicBlogAuthor, s as PublicBlogPost, P as PublicBlogPostSummary, t as PublicBlogTag, u as PublicCompany, v as PublicCompanyDetail, w as SalaryCompany, x as SalaryLocation, y as SalarySkill, z as SalaryTitle, A as SkillLocationSalary, D as SkillLocationsIndex, S as SkillSalaryDetail, E as TitleLocationSalary, F as TitleLocationsIndex, T as TitleSalaryDetail } from './salaries-ByBuHCLH.js';
1
+ import { S as Schemas, c as components } from './_spec-LdkTxfx0.js';
2
+ import { F as FetchOptions, c as StorageMode, B as BoardRequest, A as Awaitable, L as Logger, d as BoardClient, a as SearchSuggestQuery } from './search-DWmHHXn8.js';
3
+ export { e as ACCESS_TOKEN_KEY, f as BOARD_ACCESS_GRANT_KEY, C as CompanySuggestion, g as CustomStorage, R as REFRESH_TOKEN_KEY, b as SuggestResult, S as SuggestionItem, T as TermSuggestion } from './search-DWmHHXn8.js';
4
+ export { C as CustomFieldDefinition, a as CustomFieldOption, b as CustomFieldType, P as PublicBoard, c as PublicBoardAnalytics, d as PublicBoardFeatures, e as PublicBoardTheme } from './board-FxC9Wdhi.js';
5
+ import { R as RemoteOption, E as EmploymentType, S as Seniority, L as ListEnvelope, b as JobsListQuery, c as JobCardListEnvelope, d as JobsSearchBody, e as JobCardSearchEnvelope, f as JobsSimilarQuery, g as SearchEnvelope } from './jobs-TIAPH3Ol.js';
6
+ export { h as CustomFieldValue, C as CustomFieldValues, i as EducationRequirement, j as JobCatalogPagination, k as JobCompany, J as JobSort, O as OfficeLocation, l as OffsetPagination, P as PublicJob, a as PublicJobCard, m as RelatedSearch, n as RemotePermit, o as RemoteTimezone, p as StorefrontPagination } from './jobs-TIAPH3Ol.js';
7
+ import { b as CompaniesListQuery, c as CompanyListEnvelope, d as CompaniesSearchBody, e as CompanyJobsListQuery, f as CompanySimilarQuery, g as CompanyMarketsListQuery, h as SalaryDetailQuery, i as BlogPostsListQuery, j as BlogSimilarQuery, k as BlogSearchBody } from './salaries-BEAqkaFt.js';
8
+ export { B as BlogAuthorEmbed, l as BlogTagEmbed, C as CompanyCategorySalary, m as CompanyMarket, n as CompanyMarketRef, a as CompanySalary, L as LocationSalaryDetail, o as LocationSkillsIndex, p as LocationTitlesIndex, q as PublicBlogAdjacentPosts, r as PublicBlogAuthor, s as PublicBlogPost, P as PublicBlogPostSummary, t as PublicBlogTag, u as PublicCompany, v as PublicCompanyDetail, w as SalaryCompany, x as SalaryLocation, y as SalarySkill, z as SalaryTitle, A as SkillLocationSalary, D as SkillLocationsIndex, S as SkillSalaryDetail, E as TitleLocationSalary, F as TitleLocationsIndex, T as TitleSalaryDetail } from './salaries-BEAqkaFt.js';
9
9
 
10
10
  /**
11
11
  * Well-known `<domain>_<snake_reason>` codes the Board API sends, grouped by
@@ -141,7 +141,7 @@ declare function paginate<Q extends Record<string, unknown>, P extends PageShape
141
141
  * constant because the package is platform-neutral and cannot read
142
142
  * package.json at runtime.
143
143
  */
144
- declare const SDK_VERSION = "1.41.0";
144
+ declare const SDK_VERSION = "1.42.0";
145
145
 
146
146
  type SavedJob = Schemas['SavedJob'];
147
147
  type SavedJobsListQuery = {
package/dist/index.js CHANGED
@@ -312,7 +312,7 @@ async function clearSession(storage) {
312
312
  }
313
313
 
314
314
  // src/version.ts
315
- var SDK_VERSION = "1.41.0";
315
+ var SDK_VERSION = "1.42.0";
316
316
 
317
317
  // src/client.ts
318
318
  function isRawBody(body) {
package/dist/index.mjs CHANGED
@@ -265,7 +265,7 @@ async function clearSession(storage) {
265
265
  }
266
266
 
267
267
  // src/version.ts
268
- var SDK_VERSION = "1.41.0";
268
+ var SDK_VERSION = "1.42.0";
269
269
 
270
270
  // src/client.ts
271
271
  function isRawBody(body) {
@@ -1,4 +1,4 @@
1
- import { S as Schemas } from './_spec-l_596ZwW.mjs';
1
+ import { S as Schemas } from './_spec-LdkTxfx0.mjs';
2
2
 
3
3
  /**
4
4
  * Stripe-shaped success envelopes (`01-conventions.md` §5.1). The
@@ -1,4 +1,4 @@
1
- import { S as Schemas } from './_spec-l_596ZwW.js';
1
+ import { S as Schemas } from './_spec-LdkTxfx0.js';
2
2
 
3
3
  /**
4
4
  * Stripe-shaped success envelopes (`01-conventions.md` §5.1). The
package/dist/paths.d.mts CHANGED
@@ -62,11 +62,35 @@ declare const BOARD_PATHS: {
62
62
  readonly impressum: "/impressum";
63
63
  readonly talent: "/talent";
64
64
  readonly employers: "/employers";
65
+ /**
66
+ * Alert-email surfaces (ADR-0090 D1/D4). Promoted out of raw literals in
67
+ * the job-alerts composer so /go indirection and email composition share
68
+ * one definition.
69
+ */
70
+ readonly alertsManage: "/alerts/manage";
71
+ readonly alertsConfirm: "/alerts/confirm";
65
72
  };
73
+ /**
74
+ * Email `/go` indirection paths (ADR-0090 D4 / LNK-05). Pure builders so
75
+ * Convex email composers can emit structure-independent links without
76
+ * importing `@cavuno/board/go` (handler code is not safe in that runtime).
77
+ *
78
+ * Shapes match the hosted handler + SDK `createGoHandler` contracts:
79
+ * /go/job/<immutableId>
80
+ * /go/alerts-manage
81
+ * /go/alerts-confirm
82
+ *
83
+ * No encoding — callers pass opaque Convex ids / static role segments that
84
+ * are already URL-safe path segments. Query strings are composed by the
85
+ * caller (tokens must ride through verbatim).
86
+ */
87
+ declare function goJobPath(jobId: string): string;
88
+ declare function goAlertsManagePath(): string;
89
+ declare function goAlertsConfirmPath(): string;
66
90
  /**
67
91
  * Prefix a board-relative path with the board origin. A trailing slash on
68
92
  * the origin is tolerated (stripped) so callers need not normalise first.
69
93
  */
70
94
  declare function boardUrl(origin: string, path: string): string;
71
95
 
72
- export { BOARD_PATHS, blogAuthorPath, blogPostPath, blogTagPath, boardUrl, companyMarketPath, companyPath, companySalaryPath, jobDetailPath, jobsCategoryPath, jobsLocationPath, jobsSkillPath, salaryLocationPath, salarySkillPath, salaryTitlePath };
96
+ export { BOARD_PATHS, blogAuthorPath, blogPostPath, blogTagPath, boardUrl, companyMarketPath, companyPath, companySalaryPath, goAlertsConfirmPath, goAlertsManagePath, goJobPath, jobDetailPath, jobsCategoryPath, jobsLocationPath, jobsSkillPath, salaryLocationPath, salarySkillPath, salaryTitlePath };