@fern-api/fdr-sdk 1.2.19-2cc97d8bd7 → 1.2.19-72be327283

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.
@@ -33,10 +33,11 @@ import * as FernNavigation from "./index.js";
33
33
  * (products / versions / sections without an overview) derive a slug via
34
34
  * {@link FernNavigation.slugjoin} from the scope prefix.
35
35
  *
36
- * API reference segments are emitted as `paginated` ApiReferenceNodes with no
37
- * children — endpoint nodes are resolved on demand from the API definition and
38
- * routed via the ledger `routeContext` / `pageContent` reads, matching the
39
- * existing loader behaviour (every apiReference is marked paginated).
36
+ * API reference segments are emitted as `paginated` ApiReferenceNodes whose
37
+ * children are populated from the segment's nav routes (endpoint/webhook stubs
38
+ * built via {@link apiLeafNodeFromNavRouteInternal}). This mirrors V2 parity:
39
+ * `findNode` and the slug map locate endpoint pages via the tree, while the
40
+ * full API definition content is still loaded on demand at render time.
40
41
  */
41
42
  type Segment = VersionMetadataResponse["segments"][number];
42
43
  type NavRoute = NavResponse["routes"][number];
@@ -52,31 +53,24 @@ export interface BuildRootOptions {
52
53
  }
53
54
  /**
54
55
  * The HTTP-method-bearing nav route types emitted by the publish transform for
55
- * API leaves. Endpoint slugs/ids live on these rows (not in the persisted
56
- * apiReference children, which are intentionally empty `paginated: true`), so
57
- * the route/segment-first explorer reads resolve endpoint/webhook navigation
58
- * nodes straight from a single API segment's `nav` rather than walking the full
59
- * reconstructed root. See ADR 0013 §API-explorer methods.
56
+ * API leaves. Used by both the root builder (to populate apiReference children)
57
+ * and the route/segment-first explorer reads (to resolve endpoint/webhook
58
+ * navigation nodes from a single API segment's nav without walking the full
59
+ * reconstructed root). See ADR 0013 §API-explorer methods.
60
60
  */
61
- type ApiLeafNode = FernNavigation.EndpointNode | FernNavigation.WebhookNode;
61
+ export type ApiLeafNode = FernNavigation.EndpointNode | FernNavigation.WebhookNode | FernNavigation.WebSocketNode | FernNavigation.GrpcNode | FernNavigation.GraphQlNode;
62
62
  /**
63
- * Convert one API-leaf nav route (a `rest`/`webhook` artifact) into its
64
- * navigation node, or undefined when the route is not an API leaf carrying the
65
- * required identifiers. `apiDefinitionId` falls back to the segment-level value
66
- * because the per-route metadata always carries it (see
67
- * `makeApiArtifact`/`makeEndpointArtifact` in docsPublishTransform), but the
68
- * segment value is a safe default.
63
+ * Convert one API-leaf nav route into its navigation node, or undefined when
64
+ * the route is not an API leaf carrying the required identifiers.
69
65
  *
70
66
  * @internal Exported for the ledger loader's scoped explorer methods.
71
67
  */
72
68
  export declare function apiLeafNodeFromNavRoute(route: NavRoute, basePath: string, segmentApiDefinitionId: string): ApiLeafNode | undefined;
73
69
  /**
74
70
  * Collect every endpoint/webhook navigation node from a single API segment's
75
- * nav routes. This is the route/segment-first replacement for walking the full
76
- * root to enumerate endpoint nodes: the caller resolves the owning segment
77
- * (`segment.metadata.apiDefinitionId`), fetches ONLY that segment's `nav`, and
78
- * builds the leaf nodes here — so paginated apiReferences (whose persisted
79
- * children are empty) still yield endpoint nodes. See ADR 0013.
71
+ * nav routes. The root builder now populates apiReference children directly,
72
+ * but this helper is still used by the ledger loader's per-apiDefinitionId
73
+ * explorer methods (getApiLeafNodes) which scope to a single API definition.
80
74
  *
81
75
  * @internal Exported for the ledger loader's scoped explorer methods.
82
76
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ledger-root-builder.d.ts","sourceRoot":"","sources":["../../../src/navigation/ledger-root-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACnG,OAAO,KAAK,cAAc,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,KAAK,OAAO,GAAG,uBAAuB,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AA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CAAC,MAAM,CAAC,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC7B,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,6DAA6D;IAC7D,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;CACzC;AAsMD;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACjB,cAAc,CAAC,YAAY,GAC3B,cAAc,CAAC,WAAW,GAC1B,cAAc,CAAC,aAAa,GAC5B,cAAc,CAAC,QAAQ,GACvB,cAAc,CAAC,WAAW,CAAC;AAEjC;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,MAAM,EAChB,sBAAsB,EAAE,MAAM,GAC/B,WAAW,GAAG,SAAS,CAGzB;AA2GD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACtC,MAAM,EAAE,QAAQ,EAAE,EAClB,QAAQ,EAAE,MAAM,EAChB,sBAAsB,EAAE,MAAM,GAC/B,WAAW,EAAE,CAKf;AAED,uEAAuE;AACvE,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE5E;AAoXD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,gBAAgB,GAAG,cAAc,CAAC,QAAQ,CAkD5F"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fern-api/fdr-sdk",
3
- "version": "1.2.19-2cc97d8bd7",
3
+ "version": "1.2.19-72be327283",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern-platform.git",