@fern-api/fdr-sdk 1.2.72-6ca348664d → 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.
package/dist/js/index.mjs CHANGED
@@ -18477,6 +18477,30 @@ var NodeCollector = class _NodeCollector {
18477
18477
  getNodesInOrder = () => {
18478
18478
  return this.nodesInOrder;
18479
18479
  };
18480
+ /**
18481
+ * The distinct RBAC roles referenced anywhere in the navigation, collected from every node's
18482
+ * `viewers`. This is the authoritative source of "which roles gate content on this site" — the
18483
+ * top-level `root.roles` is not populated by the nav builders, and docs.yml's declared `roles`
18484
+ * list is not serialized into the docs definition, so the roles that actually exist are the ones
18485
+ * appearing in node `viewers` (e.g. the implicit `everyone` plus any custom roles like `beta`).
18486
+ *
18487
+ * NOTE: this is a faithful collection of every role in `viewers` — it INCLUDES the implicit
18488
+ * `everyone` role when present (kept deliberately, so callers can e.g. detect whether a site uses
18489
+ * RBAC at all). Consumers that want only masquerade-able custom roles MUST filter `everyone`
18490
+ * themselves (the preview widget does this via `EVERYONE_ROLE`).
18491
+ */
18492
+ getRoles = once(() => {
18493
+ const roles = /* @__PURE__ */ new Set();
18494
+ for (const node of this.nodesInOrder) {
18495
+ const viewers = node.viewers;
18496
+ if (viewers != null) {
18497
+ for (const role of viewers) {
18498
+ roles.add(role);
18499
+ }
18500
+ }
18501
+ }
18502
+ return Array.from(roles);
18503
+ });
18480
18504
  };
18481
18505
  var MAX_CHANGELOG_ENTRIES_MINIMUM = 15;
18482
18506
  var CHANGELOG_RECENCY_MONTHS = 6;