@burdenoff/website-sdk 2026.817.2 → 2026.824.2

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.
@@ -1,360 +1,5 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
- import { Components } from 'react-markdown';
4
- import { W as WebSDKClient } from '../graphql-client-Cv6TO6hn.js';
5
-
6
- interface ContentPageData {
7
- id: string;
8
- title: string;
9
- slug: string;
10
- content: string;
11
- contentFormat: string;
12
- seoTitle?: string | null;
13
- seoDescription?: string | null;
14
- seoKeywords?: string | null;
15
- lastUpdated: string;
16
- version: number;
17
- tags?: string[];
18
- excerpt?: string | null;
19
- thumbnail?: string | null;
20
- author?: string | null;
21
- publishedAt?: string | null;
22
- readingTime?: number | null;
23
- featured?: boolean;
24
- category?: string | null;
25
- }
26
- interface ContentPageListItem {
27
- id: string;
28
- title: string;
29
- slug: string;
30
- lastUpdated: string;
31
- tags?: string[];
32
- excerpt?: string | null;
33
- thumbnail?: string | null;
34
- author?: string | null;
35
- publishedAt?: string | null;
36
- readingTime?: number | null;
37
- featured?: boolean;
38
- category?: string | null;
39
- seoDescription?: string | null;
40
- }
41
- interface ContentPageListData {
42
- items: ContentPageListItem[];
43
- total: number;
44
- hasMore: boolean;
45
- }
46
- interface UseContentPageOptions {
47
- /** Whether to use template variable replacement (resolvedContentPage) */
48
- resolve?: boolean;
49
- }
50
- /**
51
- * Hook to fetch a single public content page by slug.
52
- *
53
- * @example
54
- * ```tsx
55
- * const { data, loading, error } = useContentPage('privacy-policy');
56
- * ```
57
- */
58
- declare function useContentPage(slug: string, options?: UseContentPageOptions): {
59
- data: ContentPageData | null;
60
- loading: boolean;
61
- error: string | null;
62
- refetch: () => void;
63
- };
64
- /**
65
- * Hook to fetch a list of public content pages for the current product.
66
- *
67
- * @example
68
- * ```tsx
69
- * const { data, loading } = useContentPages({ limit: 10 });
70
- * ```
71
- */
72
- declare function useContentPages(options?: {
73
- limit?: number;
74
- offset?: number;
75
- }): {
76
- data: ContentPageListData | null;
77
- loading: boolean;
78
- error: string | null;
79
- refetch: () => void;
80
- };
81
- /**
82
- * Content renderer component.
83
- *
84
- * - `markdown` (default): renders with the shared {@link Markdown} component
85
- * (react-markdown + remark-gfm + rehype-sanitize).
86
- * - `html`: sanitized with DOMPurify before rendering.
87
- * - anything else: plain-text fallback
88
- *
89
- * @example
90
- * ```tsx
91
- * <ContentRenderer content={page.content} format={page.contentFormat} />
92
- * ```
93
- */
94
- declare function ContentRenderer({ content, format, className, }: {
95
- content: string;
96
- format?: string;
97
- className?: string;
98
- }): react_jsx_runtime.JSX.Element;
99
-
100
- interface MarkdownProps {
101
- /** Markdown source to render. */
102
- children: string;
103
- /** Additional classes for the wrapper element. */
104
- className?: string;
105
- /** Render without a wrapping block element, suitable for inline content. */
106
- inline?: boolean;
107
- /** Optional react-markdown component overrides. */
108
- components?: Components;
109
- }
110
- /**
111
- * Shared markdown renderer for website content.
112
- *
113
- * - Uses `react-markdown` for standards-compliant parsing.
114
- * - Enables GitHub Flavored Markdown (tables, task lists, strikethrough, autolinks).
115
- * - Sanitizes HTML via `rehype-sanitize` so raw markup in markdown is stripped.
116
- * - External links open in a new tab with safe rel attributes.
117
- */
118
- declare function Markdown({ children, className, inline, components, }: MarkdownProps): ReactNode;
119
-
120
- interface PublicInterviewRoundConfig {
121
- roundNumber: number;
122
- name: string;
123
- /** Round type enum from the backend (PHONE_SCREEN, TECHNICAL, …) as a string. */
124
- roundType: string;
125
- isRequired: boolean;
126
- description?: string | null;
127
- }
128
- interface PublicJobPosting {
129
- id: string;
130
- slug: string;
131
- title: string;
132
- department?: string | null;
133
- location?: string | null;
134
- employmentType?: string | null;
135
- openings?: number | null;
136
- description?: string | null;
137
- overview?: string | null;
138
- responsibilities: string[];
139
- learnings: string[];
140
- qualifications: string[];
141
- rounds: PublicInterviewRoundConfig[];
142
- }
143
- interface UsePublicJobPostingsOptions {
144
- /** Product ID override (falls back to product context / SDK config). */
145
- productId?: string;
146
- limit?: number;
147
- offset?: number;
148
- }
149
- interface UsePublicJobPostingOptions {
150
- /** Product ID override (falls back to product context / SDK config). */
151
- productId?: string;
152
- }
153
- /**
154
- * Fetch the list of public job postings for a product.
155
- * Throws on GraphQL/transport errors so callers can settle an error state.
156
- */
157
- declare function fetchPublicJobPostings(client: WebSDKClient, options?: UsePublicJobPostingsOptions): Promise<PublicJobPosting[]>;
158
- /**
159
- * Fetch a single public job posting by slug. Returns `null` when the posting
160
- * does not exist; throws on GraphQL/transport errors.
161
- */
162
- declare function fetchPublicJobPosting(client: WebSDKClient, slug: string, options?: UsePublicJobPostingOptions): Promise<PublicJobPosting | null>;
163
- /**
164
- * Hook to fetch the public job postings for the current product.
165
- *
166
- * @example
167
- * ```tsx
168
- * const { postings, loading, error } = usePublicJobPostings({ limit: 20 });
169
- * ```
170
- */
171
- declare function usePublicJobPostings(options?: UsePublicJobPostingsOptions): {
172
- postings: PublicJobPosting[];
173
- loading: boolean;
174
- error: string | null;
175
- refetch: () => void;
176
- };
177
- /**
178
- * Hook to fetch a single public job posting by slug.
179
- *
180
- * @example
181
- * ```tsx
182
- * const { posting, loading, error } = usePublicJobPosting('senior-engineer');
183
- * ```
184
- */
185
- declare function usePublicJobPosting(slug: string, options?: UsePublicJobPostingOptions): {
186
- posting: PublicJobPosting | null;
187
- loading: boolean;
188
- error: string | null;
189
- refetch: () => void;
190
- };
191
-
192
- interface BlogListPageProps {
193
- productName?: string;
194
- heroTitle?: string;
195
- heroSubtitle?: string;
196
- blogPostBasePath?: string;
197
- className?: string;
198
- seoTitle?: string;
199
- seoDescription?: string;
200
- seoKeywords?: string;
201
- }
202
- interface BlogPostPageProps {
203
- productName?: string;
204
- blogListUrl?: string;
205
- /** Back-link label. Default: "Back to Blog". Use e.g. "Back to Press"
206
- * when reusing this renderer for a press release at /press/:slug. */
207
- backLabel?: string;
208
- className?: string;
209
- }
210
- declare function BlogListPage(props: BlogListPageProps): react_jsx_runtime.JSX.Element;
211
- declare function BlogPostPage(props: BlogPostPageProps): react_jsx_runtime.JSX.Element;
212
-
213
- interface CaseStudiesListPageProps {
214
- productName?: string;
215
- /** Small label above the hero title. Default: "Customer Stories". */
216
- eyebrow?: string;
217
- heroTitle?: string;
218
- heroSubtitle?: string;
219
- caseStudyBasePath?: string;
220
- className?: string;
221
- seoTitle?: string;
222
- seoDescription?: string;
223
- seoKeywords?: string;
224
- /** Where the primary "get in touch" CTA points. Default: "/contact". */
225
- contactHref?: string;
226
- /** Primary CTA label. Default: "Get in touch". */
227
- contactLabel?: string;
228
- /** Secondary CTA target (shown in the empty state). Default: "/features". */
229
- exploreHref?: string;
230
- /** Secondary CTA label. Default: "Explore the product". */
231
- exploreLabel?: string;
232
- /** Heading for the empty state. Falls back to a product-aware default. */
233
- emptyTitle?: string;
234
- /** Body copy for the empty state. Falls back to a product-aware default. */
235
- emptySubtitle?: string;
236
- }
237
- interface CaseStudyPageProps {
238
- productName?: string;
239
- caseStudiesListUrl?: string;
240
- /** Back-link label. Default: "Back to Case Studies". */
241
- backLabel?: string;
242
- /** Where the closing "get in touch" CTA points. Default: "/contact". */
243
- contactHref?: string;
244
- /** Closing CTA label. Default: "Get in touch". */
245
- contactLabel?: string;
246
- className?: string;
247
- }
248
- declare function CaseStudiesListPage(props: CaseStudiesListPageProps): react_jsx_runtime.JSX.Element;
249
- declare function CaseStudyPage(props: CaseStudyPageProps): react_jsx_runtime.JSX.Element;
250
-
251
- interface ChangelogEntry {
252
- /** Release date as an ISO string. */
253
- date: string;
254
- /** Version identifier, e.g. "1.2.0". */
255
- version: string;
256
- /** Entry headline. */
257
- title: string;
258
- /** Category used for filtering, e.g. "feature", "fix", "improvement". */
259
- category: string;
260
- /** Entry body — plain text, markdown, or a React node. */
261
- content: ReactNode | string;
262
- /** Optional tags for search and filtering. */
263
- tags?: string[];
264
- }
265
- interface ChangelogPageProps {
266
- productName?: string;
267
- heroEyebrow?: string;
268
- heroTitle?: string;
269
- heroSubtitle?: string;
270
- /** Optional bottom CTA. Rendered only when ctaHref + ctaLabel are provided. */
271
- ctaTitle?: string;
272
- ctaSubtitle?: string;
273
- ctaHref?: string;
274
- ctaLabel?: string;
275
- className?: string;
276
- seoTitle?: string;
277
- seoDescription?: string;
278
- seoKeywords?: string;
279
- /**
280
- * Optional prop-driven entries. When provided, the component skips the CMS
281
- * fetch and renders these entries with search, category filters, and
282
- * pagination.
283
- */
284
- entries?: ChangelogEntry[];
285
- /** Number of entries per page in prop-driven mode. Defaults to 10. */
286
- pageSize?: number;
287
- }
288
- declare function ChangelogPage(props: ChangelogPageProps): react_jsx_runtime.JSX.Element;
289
-
290
- type PressKitAssetCategory = "LOGO" | "BANNER" | "SCREENSHOT" | "BROCHURE" | "DOCUMENT" | "PRESS_RELEASE" | "BRAND_GUIDE";
291
- interface PressKitAsset {
292
- id: string;
293
- category: PressKitAssetCategory;
294
- title: string;
295
- slug: string;
296
- description?: string | null;
297
- fileUrl: string;
298
- fileName?: string | null;
299
- fileSize?: number | null;
300
- mimeType?: string | null;
301
- thumbnailUrl?: string | null;
302
- version?: string | null;
303
- tags: string[];
304
- sortOrder: number;
305
- updatedAt: string;
306
- }
307
- interface PressKitPageProps {
308
- productName?: string;
309
- heroTitle?: string;
310
- heroSubtitle?: string;
311
- /** Media/press contact email shown in the contact block */
312
- mediaContactEmail?: string;
313
- /** Optional URL for a "Download brand kit" hero CTA (e.g. a zip asset) */
314
- brandKitUrl?: string;
315
- className?: string;
316
- seoTitle?: string;
317
- seoDescription?: string;
318
- seoKeywords?: string;
319
- /**
320
- * Show a "Press Releases" section (published content pages tagged
321
- * "press") above the downloadable assets. Self-hides when there are
322
- * none. Default: true.
323
- */
324
- showPressReleases?: boolean;
325
- /**
326
- * Base path for press-release detail links — `${basePath}/${slug}`.
327
- * Default: "/press".
328
- */
329
- pressReleaseBasePath?: string;
330
- /** Heading for the press-releases section. Default: "Press Releases". */
331
- pressReleasesTitle?: string;
332
- }
333
- declare function PressKitPage(props: PressKitPageProps): react_jsx_runtime.JSX.Element;
334
-
335
- interface ContractAsset {
336
- id: string;
337
- title: string;
338
- slug: string;
339
- description?: string | null;
340
- fileUrl: string;
341
- fileName?: string | null;
342
- fileSize?: number | null;
343
- mimeType?: string | null;
344
- version?: string | null;
345
- tags: string[];
346
- sortOrder: number;
347
- updatedAt: string;
348
- }
349
- interface ContractsPageProps {
350
- productName?: string;
351
- heroTitle?: string;
352
- heroSubtitle?: string;
353
- className?: string;
354
- seoTitle?: string;
355
- seoDescription?: string;
356
- seoKeywords?: string;
357
- }
358
- declare function ContractsPage(props: ContractsPageProps): react_jsx_runtime.JSX.Element;
359
-
360
- export { BlogListPage, type BlogListPageProps, BlogPostPage, type BlogPostPageProps, CaseStudiesListPage, type CaseStudiesListPageProps, CaseStudyPage, type CaseStudyPageProps, type ChangelogEntry, ChangelogPage, type ChangelogPageProps, type ContentPageData, type ContentPageListData, type ContentPageListItem, ContentRenderer, type ContractAsset, ContractsPage, type ContractsPageProps, Markdown, type MarkdownProps, type PressKitAsset, type PressKitAssetCategory, PressKitPage, type PressKitPageProps, type PublicInterviewRoundConfig, type PublicJobPosting, type UseContentPageOptions, type UsePublicJobPostingOptions, type UsePublicJobPostingsOptions, fetchPublicJobPosting, fetchPublicJobPostings, useContentPage, useContentPages, usePublicJobPosting, usePublicJobPostings };
1
+ export { B as BlogListPage, a as BlogListPageProps, b as BlogPostPage, c as BlogPostPageProps, f as CaseStudiesListPage, g as CaseStudiesListPageProps, h as CaseStudyPage, i as CaseStudyPageProps, j as ChangelogEntry, k as ChangelogPage, l as ChangelogPageProps, m as ContentPageData, n as ContentPageListData, o as ContentPageListItem, p as ContentRenderer, q as ContractAsset, r as ContractsPage, s as ContractsPageProps, M as Markdown, t as MarkdownProps, P as PressKitAsset, u as PressKitAssetCategory, v as PressKitPage, w as PressKitPageProps, x as PublicInterviewRoundConfig, y as PublicJobPosting, K as UseContentPageOptions, U as UsePublicJobPostingOptions, z as UsePublicJobPostingsOptions, A as fetchPublicJobPosting, D as fetchPublicJobPostings, E as fetchPublicJobPostingsForSubmission, F as useContentPage, G as useContentPages, H as usePublicJobPosting, I as usePublicJobPostings, J as usePublicJobPostingsForSubmission } from '../index-CFsUFxYo.js';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
4
+ import 'react-markdown';
5
+ import '../graphql-client-Cv6TO6hn.js';
@@ -354,16 +354,38 @@ var PUBLIC_CONTENT_PAGES_QUERY = `
354
354
  }
355
355
  }
356
356
  `;
357
+ function resolveContentPageGate(resolvedProductId, hasProvider, productLoading) {
358
+ if (resolvedProductId) return "fetch";
359
+ return hasProvider && productLoading ? "wait" : "unavailable";
360
+ }
357
361
  function useContentPage(slug, options) {
358
362
  const client = useWebSDK();
359
363
  const config = useWebSDKConfig();
360
- const { product } = useProduct();
364
+ const {
365
+ product,
366
+ loading: productLoading,
367
+ error: productError,
368
+ hasProvider
369
+ } = useProduct();
361
370
  const resolvedProductId = product?.id || config.productId;
371
+ const gate = resolveContentPageGate(
372
+ resolvedProductId,
373
+ hasProvider,
374
+ productLoading
375
+ );
362
376
  const [data, setData] = React.useState(null);
363
377
  const [loading, setLoading] = React.useState(true);
364
378
  const [error, setError] = React.useState(null);
365
379
  const fetchPage = React.useCallback(async () => {
366
- if (!resolvedProductId) return;
380
+ if (gate === "wait") return;
381
+ if (gate === "unavailable") {
382
+ setData(null);
383
+ setError(
384
+ productError ?? "Product unavailable \u2014 cannot load content page"
385
+ );
386
+ setLoading(false);
387
+ return;
388
+ }
367
389
  setLoading(true);
368
390
  setError(null);
369
391
  try {
@@ -388,7 +410,7 @@ function useContentPage(slug, options) {
388
410
  } finally {
389
411
  setLoading(false);
390
412
  }
391
- }, [client, resolvedProductId, slug, options?.resolve]);
413
+ }, [client, gate, productError, resolvedProductId, slug, options?.resolve]);
392
414
  React.useEffect(() => {
393
415
  fetchPage();
394
416
  }, [fetchPage]);
@@ -493,6 +515,25 @@ var PUBLIC_JOB_POSTING_QUERY = (
493
515
  }
494
516
  `
495
517
  );
518
+ var PUBLIC_JOB_POSTINGS_FOR_SUBMISSION_QUERY = (
519
+ /* GraphQL */
520
+ `
521
+ query PublicJobPostingsForSubmission(
522
+ $productId: ID
523
+ $limit: Int
524
+ $offset: Int
525
+ ) {
526
+ publicJobPostingsForSubmission(
527
+ productId: $productId
528
+ limit: $limit
529
+ offset: $offset
530
+ ) {
531
+ id
532
+ title
533
+ }
534
+ }
535
+ `
536
+ );
496
537
  async function fetchPublicJobPostings(client, options) {
497
538
  const result = await client.query(PUBLIC_JOB_POSTINGS_QUERY, {
498
539
  productId: options?.productId,
@@ -514,6 +555,17 @@ async function fetchPublicJobPosting(client, slug, options) {
514
555
  }
515
556
  return result.data?.publicJobPosting ?? null;
516
557
  }
558
+ async function fetchPublicJobPostingsForSubmission(client, options) {
559
+ const result = await client.query(PUBLIC_JOB_POSTINGS_FOR_SUBMISSION_QUERY, {
560
+ productId: options?.productId,
561
+ limit: options?.limit ?? 50,
562
+ offset: options?.offset ?? 0
563
+ });
564
+ if (result.errors?.length) {
565
+ throw new Error(result.errors[0]?.message ?? "Unknown error");
566
+ }
567
+ return result.data?.publicJobPostingsForSubmission ?? [];
568
+ }
517
569
  function usePublicJobPostings(options) {
518
570
  const client = useWebSDK();
519
571
  const config = useWebSDKConfig();
@@ -546,6 +598,38 @@ function usePublicJobPostings(options) {
546
598
  }, [fetchPostings]);
547
599
  return { postings, loading, error, refetch: fetchPostings };
548
600
  }
601
+ function usePublicJobPostingsForSubmission(options) {
602
+ const client = useWebSDK();
603
+ const config = useWebSDKConfig();
604
+ const { product } = useProduct();
605
+ const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
606
+ const [postings, setPostings] = React.useState([]);
607
+ const [loading, setLoading] = React.useState(true);
608
+ const [error, setError] = React.useState(null);
609
+ const fetchPostings = React.useCallback(async () => {
610
+ setLoading(true);
611
+ setError(null);
612
+ try {
613
+ const items = await fetchPublicJobPostingsForSubmission(client, {
614
+ productId: resolvedProductId,
615
+ limit: options?.limit,
616
+ offset: options?.offset
617
+ });
618
+ setPostings(items);
619
+ } catch (err) {
620
+ setError(
621
+ err instanceof Error ? err.message : "Failed to fetch job postings"
622
+ );
623
+ setPostings([]);
624
+ } finally {
625
+ setLoading(false);
626
+ }
627
+ }, [client, resolvedProductId, options?.limit, options?.offset]);
628
+ React.useEffect(() => {
629
+ fetchPostings();
630
+ }, [fetchPostings]);
631
+ return { postings, loading, error, refetch: fetchPostings };
632
+ }
549
633
  function usePublicJobPosting(slug, options) {
550
634
  const client = useWebSDK();
551
635
  const config = useWebSDKConfig();
@@ -3229,9 +3313,11 @@ exports.Markdown = Markdown;
3229
3313
  exports.PressKitPage = PressKitPage;
3230
3314
  exports.fetchPublicJobPosting = fetchPublicJobPosting;
3231
3315
  exports.fetchPublicJobPostings = fetchPublicJobPostings;
3316
+ exports.fetchPublicJobPostingsForSubmission = fetchPublicJobPostingsForSubmission;
3232
3317
  exports.useContentPage = useContentPage;
3233
3318
  exports.useContentPages = useContentPages;
3234
3319
  exports.usePublicJobPosting = usePublicJobPosting;
3235
3320
  exports.usePublicJobPostings = usePublicJobPostings;
3321
+ exports.usePublicJobPostingsForSubmission = usePublicJobPostingsForSubmission;
3236
3322
  //# sourceMappingURL=index.js.map
3237
3323
  //# sourceMappingURL=index.js.map