@fern-api/fdr-sdk 1.2.45-932269c163 → 1.2.45-9cc0fe9249

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.
@@ -1306,7 +1306,7 @@ function mergeChildrenByPosition(ctx, nav, sectionChildren) {
1306
1306
  function sectionNode(ctx, scoped, sectionChildren, scopePrefix) {
1307
1307
  const { seg, nav } = scoped;
1308
1308
  const overview = overviewRoute(nav) ?? overviewRouteFromSegmentMeta(seg, nav);
1309
- const overviewPageId = overview != null ? metaStr(overview.metadata, "pageId") : void 0;
1309
+ const overviewPageId = metaStr(seg.metadata, "overviewPageId");
1310
1310
  const relSection = stripLeadingScopePrefix(seg.section, scopePrefix);
1311
1311
  let slug = structuralNodeSlug(ctx, overview?.fullPath, relSection, scopePrefix);
1312
1312
  if (relSection === "" && overview?.fullPath == null) {
@@ -1319,7 +1319,6 @@ function sectionNode(ctx, scoped, sectionChildren, scopePrefix) {
1319
1319
  }
1320
1320
  }
1321
1321
  }
1322
- const metaPointsTo = metaStr(seg.metadata, "pointsTo");
1323
1322
  const defaults = withMetadataDefaults({
1324
1323
  id: ctx.nodeId(`section:${slug}`),
1325
1324
  title: metaStr(seg.metadata, "title") ?? "",
@@ -1340,7 +1339,10 @@ function sectionNode(ctx, scoped, sectionChildren, scopePrefix) {
1340
1339
  collapsible: metaBool(seg.metadata, "collapsible") ?? (metaCollapsed(seg.metadata) === true ? true : void 0),
1341
1340
  collapsedByDefault: metaBool(seg.metadata, "collapsedByDefault") ?? (metaCollapsed(seg.metadata) === true ? true : void 0),
1342
1341
  availability: metaAvailability(seg.metadata),
1343
- pointsTo: metaPointsTo != null ? pointsToSlug(metaPointsTo) : void 0,
1342
+ // Don't read pointsTo from metadata for sections; let
1343
+ // mutableUpdatePointsTo compute it via followRedirect so that
1344
+ // self-referencing redirects are cleared, matching v2 behavior.
1345
+ pointsTo: void 0,
1344
1346
  children: mergeChildrenByPosition(ctx, nav, sectionChildren)
1345
1347
  };
1346
1348
  }
@@ -1981,13 +1983,19 @@ function buildFullRootFromSegments(options) {
1981
1983
  }
1982
1984
  let rootPointsTo;
1983
1985
  if (child.type === "productgroup") {
1984
- const defaultProduct = child.children.find((p) => p.default) ?? child.children[0];
1985
- rootPointsTo = defaultProduct?.type === "product" ? defaultProduct.pointsTo : void 0;
1986
+ if (child.landingPage != null && !child.landingPage.hidden) {
1987
+ rootPointsTo = child.landingPage.slug;
1988
+ } else {
1989
+ const defaultProduct = child.children.find((p) => p.default) ?? child.children[0];
1990
+ rootPointsTo = defaultProduct?.type === "product" ? defaultProduct.pointsTo : void 0;
1991
+ }
1986
1992
  } else if (child.type === "versioned") {
1987
1993
  const defaultVersion = child.children.find((v) => v.default) ?? child.children[0];
1988
1994
  rootPointsTo = defaultVersion?.pointsTo;
1989
1995
  } else if (child.type === "unversioned") {
1990
- if (tabs.length > 0) {
1996
+ if (child.landingPage != null && !child.landingPage.hidden) {
1997
+ rootPointsTo = child.landingPage.slug;
1998
+ } else if (tabs.length > 0) {
1991
1999
  const firstTab = tabs[0];
1992
2000
  const pt = firstTab != null ? metaStr(firstTab.metadata, "pointsTo") : void 0;
1993
2001
  rootPointsTo = pt != null ? pointsToSlug(pt) : void 0;