@fern-api/fdr-sdk 1.2.49-63a843fe7d → 1.2.49-752ada32f5

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.
@@ -921,6 +921,10 @@ var AVAILABILITY_LOOKUP = {
921
921
  Preview: Availability.Preview,
922
922
  Legacy: Availability.Legacy
923
923
  };
924
+ function metaAnnouncement(metadata) {
925
+ const text = metaStr(metadata, "announcementText");
926
+ return text != null ? { text } : void 0;
927
+ }
924
928
  function metaAvailability(metadata) {
925
929
  const raw = metaStr(metadata, "availability");
926
930
  if (raw == null) {
@@ -2323,9 +2327,9 @@ function buildVersioned(ctx, versions, scoped, rootSlug, productPrefix, skipShar
2323
2327
  }),
2324
2328
  default: detailIsDefault(version),
2325
2329
  versionId: VersionId(version.id),
2326
- availability: void 0,
2330
+ availability: metaAvailability(version.metadata),
2327
2331
  landingPage: buildLandingPage(ctx, versionSegs),
2328
- announcement: void 0,
2332
+ announcement: metaAnnouncement(version.metadata),
2329
2333
  pointsTo: metaStr(version.metadata, "pointsTo") != null ? pointsToSlug(metaStr(version.metadata, "pointsTo")) : void 0,
2330
2334
  // The version's full slug roots structural sections so the whole
2331
2335
  // version subtree stays inside the default-version prune window.
@@ -2508,6 +2512,27 @@ function markCrossVersionCanonicalSlugs(versionNodes) {
2508
2512
  }
2509
2513
  function buildProductGroup(ctx, products, scoped, rootSlug, skipSharedSectionMerge) {
2510
2514
  const children = products.map((product) => {
2515
+ const href = metaStr(product.metadata, "href");
2516
+ if (href != null) {
2517
+ return {
2518
+ type: "productLink",
2519
+ id: ctx.nodeId(`productLink:${href}`),
2520
+ collapsed: void 0,
2521
+ default: detailIsDefault(product),
2522
+ productId: ProductId(product.displayName),
2523
+ title: product.displayName,
2524
+ href: Url(href),
2525
+ target: metaStr(product.metadata, "target") ?? void 0,
2526
+ subtitle: metaStr(product.metadata, "subtitle") ?? "",
2527
+ icon: product.icon ?? void 0,
2528
+ image: metaStr(product.metadata, "image") != null ? FileId(metaStr(product.metadata, "image")) : void 0,
2529
+ hidden: product.hidden,
2530
+ authed: void 0,
2531
+ viewers: toViewers(product.viewers),
2532
+ orphaned: product.orphaned,
2533
+ featureFlags: void 0
2534
+ };
2535
+ }
2511
2536
  const productSegs = scoped.filter((s) => s.seg.product?.id === product.id);
2512
2537
  const versions = uniqueDetails(productSegs, "version");
2513
2538
  const tabsPresent = uniqueDetails(productSegs, "tab").length > 0;
@@ -2532,7 +2557,7 @@ function buildProductGroup(ctx, products, scoped, rootSlug, skipSharedSectionMer
2532
2557
  productId: ProductId(product.displayName),
2533
2558
  subtitle: metaStr(product.metadata, "subtitle") ?? "",
2534
2559
  image: metaStr(product.metadata, "image") != null ? FileId(metaStr(product.metadata, "image")) : void 0,
2535
- announcement: void 0,
2560
+ announcement: metaAnnouncement(product.metadata),
2536
2561
  pointsTo: metaStr(product.metadata, "pointsTo") != null ? pointsToSlug(metaStr(product.metadata, "pointsTo")) : void 0,
2537
2562
  child: productChild
2538
2563
  };