@burdenoff/website-sdk 2026.824.1 → 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.
@@ -488,6 +488,25 @@ var PUBLIC_JOB_POSTING_QUERY = (
488
488
  }
489
489
  `
490
490
  );
491
+ var PUBLIC_JOB_POSTINGS_FOR_SUBMISSION_QUERY = (
492
+ /* GraphQL */
493
+ `
494
+ query PublicJobPostingsForSubmission(
495
+ $productId: ID
496
+ $limit: Int
497
+ $offset: Int
498
+ ) {
499
+ publicJobPostingsForSubmission(
500
+ productId: $productId
501
+ limit: $limit
502
+ offset: $offset
503
+ ) {
504
+ id
505
+ title
506
+ }
507
+ }
508
+ `
509
+ );
491
510
  async function fetchPublicJobPostings(client, options) {
492
511
  const result = await client.query(PUBLIC_JOB_POSTINGS_QUERY, {
493
512
  productId: options?.productId,
@@ -509,6 +528,17 @@ async function fetchPublicJobPosting(client, slug, options) {
509
528
  }
510
529
  return result.data?.publicJobPosting ?? null;
511
530
  }
531
+ async function fetchPublicJobPostingsForSubmission(client, options) {
532
+ const result = await client.query(PUBLIC_JOB_POSTINGS_FOR_SUBMISSION_QUERY, {
533
+ productId: options?.productId,
534
+ limit: options?.limit ?? 50,
535
+ offset: options?.offset ?? 0
536
+ });
537
+ if (result.errors?.length) {
538
+ throw new Error(result.errors[0]?.message ?? "Unknown error");
539
+ }
540
+ return result.data?.publicJobPostingsForSubmission ?? [];
541
+ }
512
542
  function usePublicJobPostings(options) {
513
543
  const client = useWebSDK();
514
544
  const config = useWebSDKConfig();
@@ -541,6 +571,38 @@ function usePublicJobPostings(options) {
541
571
  }, [fetchPostings]);
542
572
  return { postings, loading, error, refetch: fetchPostings };
543
573
  }
574
+ function usePublicJobPostingsForSubmission(options) {
575
+ const client = useWebSDK();
576
+ const config = useWebSDKConfig();
577
+ const { product } = useProduct();
578
+ const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
579
+ const [postings, setPostings] = useState([]);
580
+ const [loading, setLoading] = useState(true);
581
+ const [error, setError] = useState(null);
582
+ const fetchPostings = useCallback(async () => {
583
+ setLoading(true);
584
+ setError(null);
585
+ try {
586
+ const items = await fetchPublicJobPostingsForSubmission(client, {
587
+ productId: resolvedProductId,
588
+ limit: options?.limit,
589
+ offset: options?.offset
590
+ });
591
+ setPostings(items);
592
+ } catch (err) {
593
+ setError(
594
+ err instanceof Error ? err.message : "Failed to fetch job postings"
595
+ );
596
+ setPostings([]);
597
+ } finally {
598
+ setLoading(false);
599
+ }
600
+ }, [client, resolvedProductId, options?.limit, options?.offset]);
601
+ useEffect(() => {
602
+ fetchPostings();
603
+ }, [fetchPostings]);
604
+ return { postings, loading, error, refetch: fetchPostings };
605
+ }
544
606
  function usePublicJobPosting(slug, options) {
545
607
  const client = useWebSDK();
546
608
  const config = useWebSDKConfig();
@@ -3213,6 +3275,6 @@ function ContractsPage(props) {
3213
3275
  ] });
3214
3276
  }
3215
3277
 
3216
- export { BlogListPage, BlogPostPage, CaseStudiesListPage, CaseStudyPage, ChangelogPage, ContentRenderer, ContractsPage, Markdown, PressKitPage, fetchPublicJobPosting, fetchPublicJobPostings, useContentPage, useContentPages, usePublicJobPosting, usePublicJobPostings };
3278
+ export { BlogListPage, BlogPostPage, CaseStudiesListPage, CaseStudyPage, ChangelogPage, ContentRenderer, ContractsPage, Markdown, PressKitPage, fetchPublicJobPosting, fetchPublicJobPostings, fetchPublicJobPostingsForSubmission, useContentPage, useContentPages, usePublicJobPosting, usePublicJobPostings, usePublicJobPostingsForSubmission };
3217
3279
  //# sourceMappingURL=index.mjs.map
3218
3280
  //# sourceMappingURL=index.mjs.map