@burdenoff/website-sdk 2026.813.3 → 2026.817.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.
@@ -422,6 +422,138 @@ function ContentRenderer({
422
422
  }
423
423
  return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx("pre", { style: { whiteSpace: "pre-wrap", fontFamily: "inherit" }, children: content }) });
424
424
  }
425
+ var PUBLIC_JOB_POSTING_FIELDS = (
426
+ /* GraphQL */
427
+ `
428
+ id
429
+ slug
430
+ title
431
+ department
432
+ location
433
+ employmentType
434
+ openings
435
+ description
436
+ overview
437
+ responsibilities
438
+ learnings
439
+ qualifications
440
+ rounds {
441
+ roundNumber
442
+ name
443
+ roundType
444
+ isRequired
445
+ description
446
+ }
447
+ `
448
+ );
449
+ var PUBLIC_JOB_POSTINGS_QUERY = (
450
+ /* GraphQL */
451
+ `
452
+ query PublicJobPostings($productId: ID, $limit: Int, $offset: Int) {
453
+ publicJobPostings(productId: $productId, limit: $limit, offset: $offset) {
454
+ ${PUBLIC_JOB_POSTING_FIELDS}
455
+ }
456
+ }
457
+ `
458
+ );
459
+ var PUBLIC_JOB_POSTING_QUERY = (
460
+ /* GraphQL */
461
+ `
462
+ query PublicJobPosting($slug: String!, $productId: ID) {
463
+ publicJobPosting(slug: $slug, productId: $productId) {
464
+ ${PUBLIC_JOB_POSTING_FIELDS}
465
+ }
466
+ }
467
+ `
468
+ );
469
+ async function fetchPublicJobPostings(client, options) {
470
+ const result = await client.query(PUBLIC_JOB_POSTINGS_QUERY, {
471
+ productId: options?.productId,
472
+ limit: options?.limit ?? 50,
473
+ offset: options?.offset ?? 0
474
+ });
475
+ if (result.errors?.length) {
476
+ throw new Error(result.errors[0]?.message ?? "Unknown error");
477
+ }
478
+ return result.data?.publicJobPostings ?? [];
479
+ }
480
+ async function fetchPublicJobPosting(client, slug, options) {
481
+ const result = await client.query(PUBLIC_JOB_POSTING_QUERY, {
482
+ slug,
483
+ productId: options?.productId
484
+ });
485
+ if (result.errors?.length) {
486
+ throw new Error(result.errors[0]?.message ?? "Unknown error");
487
+ }
488
+ return result.data?.publicJobPosting ?? null;
489
+ }
490
+ function usePublicJobPostings(options) {
491
+ const client = useWebSDK();
492
+ const config = useWebSDKConfig();
493
+ const { product } = useProduct();
494
+ const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
495
+ const [postings, setPostings] = useState([]);
496
+ const [loading, setLoading] = useState(true);
497
+ const [error, setError] = useState(null);
498
+ const fetchPostings = useCallback(async () => {
499
+ setLoading(true);
500
+ setError(null);
501
+ try {
502
+ const items = await fetchPublicJobPostings(client, {
503
+ productId: resolvedProductId,
504
+ limit: options?.limit,
505
+ offset: options?.offset
506
+ });
507
+ setPostings(items);
508
+ } catch (err) {
509
+ setError(
510
+ err instanceof Error ? err.message : "Failed to fetch job postings"
511
+ );
512
+ setPostings([]);
513
+ } finally {
514
+ setLoading(false);
515
+ }
516
+ }, [client, resolvedProductId, options?.limit, options?.offset]);
517
+ useEffect(() => {
518
+ fetchPostings();
519
+ }, [fetchPostings]);
520
+ return { postings, loading, error, refetch: fetchPostings };
521
+ }
522
+ function usePublicJobPosting(slug, options) {
523
+ const client = useWebSDK();
524
+ const config = useWebSDKConfig();
525
+ const { product } = useProduct();
526
+ const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
527
+ const [posting, setPosting] = useState(null);
528
+ const [loading, setLoading] = useState(true);
529
+ const [error, setError] = useState(null);
530
+ const fetchPosting = useCallback(async () => {
531
+ if (!slug) {
532
+ setPosting(null);
533
+ setLoading(false);
534
+ return;
535
+ }
536
+ setLoading(true);
537
+ setError(null);
538
+ try {
539
+ const item = await fetchPublicJobPosting(client, slug, {
540
+ productId: resolvedProductId
541
+ });
542
+ setPosting(item);
543
+ } catch (err) {
544
+ setError(
545
+ err instanceof Error ? err.message : "Failed to fetch job posting"
546
+ );
547
+ setPosting(null);
548
+ } finally {
549
+ setLoading(false);
550
+ }
551
+ }, [client, resolvedProductId, slug]);
552
+ useEffect(() => {
553
+ fetchPosting();
554
+ }, [fetchPosting]);
555
+ return { posting, loading, error, refetch: fetchPosting };
556
+ }
425
557
  var PROSE_CSS = `
426
558
  .boff-prose {
427
559
  max-width: none;
@@ -3059,6 +3191,6 @@ function ContractsPage(props) {
3059
3191
  ] });
3060
3192
  }
3061
3193
 
3062
- export { BlogListPage, BlogPostPage, CaseStudiesListPage, CaseStudyPage, ChangelogPage, ContentRenderer, ContractsPage, Markdown, PressKitPage, useContentPage, useContentPages };
3194
+ export { BlogListPage, BlogPostPage, CaseStudiesListPage, CaseStudyPage, ChangelogPage, ContentRenderer, ContractsPage, Markdown, PressKitPage, fetchPublicJobPosting, fetchPublicJobPostings, useContentPage, useContentPages, usePublicJobPosting, usePublicJobPostings };
3063
3195
  //# sourceMappingURL=index.mjs.map
3064
3196
  //# sourceMappingURL=index.mjs.map