@fern-api/fdr-sdk 1.2.39-99e577b270 → 1.2.39-a23cd4c739

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 (58) hide show
  1. package/dist/js/converters/index.js +4 -9
  2. package/dist/js/converters/index.js.map +1 -1
  3. package/dist/js/converters/index.mjs +4 -9
  4. package/dist/js/converters/index.mjs.map +1 -1
  5. package/dist/js/index.js +4 -9
  6. package/dist/js/index.js.map +1 -1
  7. package/dist/js/index.mjs +4 -9
  8. package/dist/js/index.mjs.map +1 -1
  9. package/dist/js/navigation/index.js +4 -9
  10. package/dist/js/navigation/index.js.map +1 -1
  11. package/dist/js/navigation/index.mjs +4 -9
  12. package/dist/js/navigation/index.mjs.map +1 -1
  13. package/dist/js/navigation/ledger-root-builder.js +30 -8
  14. package/dist/js/navigation/ledger-root-builder.js.map +1 -1
  15. package/dist/js/navigation/ledger-root-builder.mjs +30 -8
  16. package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
  17. package/dist/navigation/__test__/findNode.authedRedirect.test.d.ts +2 -0
  18. package/dist/navigation/__test__/findNode.authedRedirect.test.d.ts.map +1 -0
  19. package/dist/navigation/__test__/findNode.authedRedirect.test.js +184 -0
  20. package/dist/navigation/__test__/findNode.authedRedirect.test.js.map +1 -0
  21. package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.d.ts +2 -0
  22. package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.d.ts.map +1 -0
  23. package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.js +85 -0
  24. package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.js.map +1 -0
  25. package/dist/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.d.ts +2 -0
  26. package/dist/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.d.ts.map +1 -0
  27. package/dist/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.js +210 -0
  28. package/dist/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.js.map +1 -0
  29. package/dist/navigation/__test__/ledger-root-builder.variantSharedSegments.test.d.ts +2 -0
  30. package/dist/navigation/__test__/ledger-root-builder.variantSharedSegments.test.d.ts.map +1 -0
  31. package/dist/navigation/__test__/ledger-root-builder.variantSharedSegments.test.js +262 -0
  32. package/dist/navigation/__test__/ledger-root-builder.variantSharedSegments.test.js.map +1 -0
  33. package/dist/navigation/ledger-root-builder.d.ts +5 -1
  34. package/dist/navigation/ledger-root-builder.d.ts.map +1 -1
  35. package/dist/navigation/ledger-root-builder.js +45 -16
  36. package/dist/navigation/ledger-root-builder.js.map +1 -1
  37. package/dist/navigation/utils/findNode.d.ts +1 -0
  38. package/dist/navigation/utils/findNode.d.ts.map +1 -1
  39. package/dist/navigation/utils/findNode.js +3 -11
  40. package/dist/navigation/utils/findNode.js.map +1 -1
  41. package/dist/navigation/utils/followRedirect.d.ts.map +1 -1
  42. package/dist/navigation/utils/followRedirect.js +2 -0
  43. package/dist/navigation/utils/followRedirect.js.map +1 -1
  44. package/dist/tsconfig.tsbuildinfo +1 -1
  45. package/dist/types/navigation/__test__/findNode.authedRedirect.test.d.ts +2 -0
  46. package/dist/types/navigation/__test__/findNode.authedRedirect.test.d.ts.map +1 -0
  47. package/dist/types/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.d.ts +2 -0
  48. package/dist/types/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.d.ts.map +1 -0
  49. package/dist/types/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.d.ts +2 -0
  50. package/dist/types/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.d.ts.map +1 -0
  51. package/dist/types/navigation/__test__/ledger-root-builder.variantSharedSegments.test.d.ts +2 -0
  52. package/dist/types/navigation/__test__/ledger-root-builder.variantSharedSegments.test.d.ts.map +1 -0
  53. package/dist/types/navigation/ledger-root-builder.d.ts +5 -1
  54. package/dist/types/navigation/ledger-root-builder.d.ts.map +1 -1
  55. package/dist/types/navigation/utils/findNode.d.ts +1 -0
  56. package/dist/types/navigation/utils/findNode.d.ts.map +1 -1
  57. package/dist/types/navigation/utils/followRedirect.d.ts.map +1 -1
  58. package/package.json +1 -1
package/dist/js/index.js CHANGED
@@ -19534,12 +19534,6 @@ function findNode(root, slug) {
19534
19534
  }
19535
19535
  }
19536
19536
  }
19537
- if (!foundProductNode && isProductGroupNode(root.child) && root.child.landingPage != null) {
19538
- const landingPageSlug = root.child.landingPage.slug;
19539
- if (slug === landingPageSlug) {
19540
- return { type: "redirect", redirect: landingPageSlug };
19541
- }
19542
- }
19543
19537
  return {
19544
19538
  type: "notFound",
19545
19539
  // External product links don't have pointsTo, only internal products and versions do
@@ -19646,15 +19640,15 @@ function findNode(root, slug) {
19646
19640
  };
19647
19641
  }
19648
19642
  if (root.type === "root" && root.slug === slug && root.pointsTo != null) {
19649
- return { type: "redirect", redirect: root.pointsTo };
19643
+ return { type: "redirect", redirect: root.pointsTo, authed: root.authed };
19650
19644
  }
19651
19645
  if (navigation_exports.hasRedirect(found.node) && found.node.pointsTo != null) {
19652
- return { type: "redirect", redirect: found.node.pointsTo };
19646
+ return { type: "redirect", redirect: found.node.pointsTo, authed: found.node.authed };
19653
19647
  }
19654
19648
  if (found.node.type === "variant" && (found.node.pointsTo == null || found.node.pointsTo === void 0)) {
19655
19649
  const firstPage = findFirstPageInNode(found.node);
19656
19650
  if (firstPage != null) {
19657
- return { type: "redirect", redirect: firstPage };
19651
+ return { type: "redirect", redirect: firstPage, authed: found.node.authed };
19658
19652
  }
19659
19653
  }
19660
19654
  return {
@@ -19756,6 +19750,7 @@ function followRedirect2(nodeToFollow) {
19756
19750
  * Versioned and ProductGroup nodes are special in that they have a default child.
19757
19751
  */
19758
19752
  case "productgroup":
19753
+ return followRedirect2(nodeToFollow.landingPage ?? void 0) ?? followRedirects2([...nodeToFollow.children].sort(defaultFirst));
19759
19754
  case "versioned":
19760
19755
  return followRedirects2([...nodeToFollow.children].sort(defaultFirst));
19761
19756
  case "apiReference":