@fern-api/fdr-sdk 1.2.49-63a843fe7d → 1.2.49-b8c0ea618b

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.
@@ -880,6 +880,10 @@ var AVAILABILITY_LOOKUP = {
880
880
  Preview: Availability.Preview,
881
881
  Legacy: Availability.Legacy
882
882
  };
883
+ function metaAnnouncement(metadata) {
884
+ const text = metaStr(metadata, "announcementText");
885
+ return text != null ? { text } : void 0;
886
+ }
883
887
  function metaAvailability(metadata) {
884
888
  const raw = metaStr(metadata, "availability");
885
889
  if (raw == null) {
@@ -2282,9 +2286,9 @@ function buildVersioned(ctx, versions, scoped, rootSlug, productPrefix, skipShar
2282
2286
  }),
2283
2287
  default: detailIsDefault(version),
2284
2288
  versionId: VersionId(version.id),
2285
- availability: void 0,
2289
+ availability: metaAvailability(version.metadata),
2286
2290
  landingPage: buildLandingPage(ctx, versionSegs),
2287
- announcement: void 0,
2291
+ announcement: metaAnnouncement(version.metadata),
2288
2292
  pointsTo: metaStr(version.metadata, "pointsTo") != null ? pointsToSlug(metaStr(version.metadata, "pointsTo")) : void 0,
2289
2293
  // The version's full slug roots structural sections so the whole
2290
2294
  // version subtree stays inside the default-version prune window.
@@ -2467,6 +2471,27 @@ function markCrossVersionCanonicalSlugs(versionNodes) {
2467
2471
  }
2468
2472
  function buildProductGroup(ctx, products, scoped, rootSlug, skipSharedSectionMerge) {
2469
2473
  const children = products.map((product) => {
2474
+ const href = metaStr(product.metadata, "href");
2475
+ if (href != null) {
2476
+ return {
2477
+ type: "productLink",
2478
+ id: ctx.nodeId(`productLink:${href}`),
2479
+ collapsed: void 0,
2480
+ default: detailIsDefault(product),
2481
+ productId: ProductId(product.displayName),
2482
+ title: product.displayName,
2483
+ href: Url(href),
2484
+ target: metaStr(product.metadata, "target") ?? void 0,
2485
+ subtitle: metaStr(product.metadata, "subtitle") ?? "",
2486
+ icon: product.icon ?? void 0,
2487
+ image: metaStr(product.metadata, "image") != null ? FileId(metaStr(product.metadata, "image")) : void 0,
2488
+ hidden: product.hidden,
2489
+ authed: void 0,
2490
+ viewers: toViewers(product.viewers),
2491
+ orphaned: product.orphaned,
2492
+ featureFlags: void 0
2493
+ };
2494
+ }
2470
2495
  const productSegs = scoped.filter((s) => s.seg.product?.id === product.id);
2471
2496
  const versions = uniqueDetails(productSegs, "version");
2472
2497
  const tabsPresent = uniqueDetails(productSegs, "tab").length > 0;
@@ -2491,7 +2516,7 @@ function buildProductGroup(ctx, products, scoped, rootSlug, skipSharedSectionMer
2491
2516
  productId: ProductId(product.displayName),
2492
2517
  subtitle: metaStr(product.metadata, "subtitle") ?? "",
2493
2518
  image: metaStr(product.metadata, "image") != null ? FileId(metaStr(product.metadata, "image")) : void 0,
2494
- announcement: void 0,
2519
+ announcement: metaAnnouncement(product.metadata),
2495
2520
  pointsTo: metaStr(product.metadata, "pointsTo") != null ? pointsToSlug(metaStr(product.metadata, "pointsTo")) : void 0,
2496
2521
  child: productChild
2497
2522
  };