@fern-api/fdr-sdk 1.2.72-c5de911f8d → 1.2.73-6e6ce5ee80

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.
@@ -14775,6 +14775,30 @@ var NodeCollector = class _NodeCollector {
14775
14775
  getNodesInOrder = () => {
14776
14776
  return this.nodesInOrder;
14777
14777
  };
14778
+ /**
14779
+ * The distinct RBAC roles referenced anywhere in the navigation, collected from every node's
14780
+ * `viewers`. This is the authoritative source of "which roles gate content on this site" — the
14781
+ * top-level `root.roles` is not populated by the nav builders, and docs.yml's declared `roles`
14782
+ * list is not serialized into the docs definition, so the roles that actually exist are the ones
14783
+ * appearing in node `viewers` (e.g. the implicit `everyone` plus any custom roles like `beta`).
14784
+ *
14785
+ * NOTE: this is a faithful collection of every role in `viewers` — it INCLUDES the implicit
14786
+ * `everyone` role when present (kept deliberately, so callers can e.g. detect whether a site uses
14787
+ * RBAC at all). Consumers that want only masquerade-able custom roles MUST filter `everyone`
14788
+ * themselves (the preview widget does this via `EVERYONE_ROLE`).
14789
+ */
14790
+ getRoles = (0, import_function.once)(() => {
14791
+ const roles = /* @__PURE__ */ new Set();
14792
+ for (const node of this.nodesInOrder) {
14793
+ const viewers = node.viewers;
14794
+ if (viewers != null) {
14795
+ for (const role of viewers) {
14796
+ roles.add(role);
14797
+ }
14798
+ }
14799
+ }
14800
+ return Array.from(roles);
14801
+ });
14778
14802
  };
14779
14803
  var MAX_CHANGELOG_ENTRIES_MINIMUM = 15;
14780
14804
  var CHANGELOG_RECENCY_MONTHS = 6;