@fern-api/fdr-sdk 1.2.72-c5de911f8d → 1.2.73-c1680dd0b8

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.
@@ -14736,6 +14736,30 @@ var NodeCollector = class _NodeCollector {
14736
14736
  getNodesInOrder = () => {
14737
14737
  return this.nodesInOrder;
14738
14738
  };
14739
+ /**
14740
+ * The distinct RBAC roles referenced anywhere in the navigation, collected from every node's
14741
+ * `viewers`. This is the authoritative source of "which roles gate content on this site" — the
14742
+ * top-level `root.roles` is not populated by the nav builders, and docs.yml's declared `roles`
14743
+ * list is not serialized into the docs definition, so the roles that actually exist are the ones
14744
+ * appearing in node `viewers` (e.g. the implicit `everyone` plus any custom roles like `beta`).
14745
+ *
14746
+ * NOTE: this is a faithful collection of every role in `viewers` — it INCLUDES the implicit
14747
+ * `everyone` role when present (kept deliberately, so callers can e.g. detect whether a site uses
14748
+ * RBAC at all). Consumers that want only masquerade-able custom roles MUST filter `everyone`
14749
+ * themselves (the preview widget does this via `EVERYONE_ROLE`).
14750
+ */
14751
+ getRoles = once(() => {
14752
+ const roles = /* @__PURE__ */ new Set();
14753
+ for (const node of this.nodesInOrder) {
14754
+ const viewers = node.viewers;
14755
+ if (viewers != null) {
14756
+ for (const role of viewers) {
14757
+ roles.add(role);
14758
+ }
14759
+ }
14760
+ }
14761
+ return Array.from(roles);
14762
+ });
14739
14763
  };
14740
14764
  var MAX_CHANGELOG_ENTRIES_MINIMUM = 15;
14741
14765
  var CHANGELOG_RECENCY_MONTHS = 6;