@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.
- package/dist/js/navigation/ledger-root-builder.js +131 -12
- package/dist/js/navigation/ledger-root-builder.js.map +1 -1
- package/dist/js/navigation/ledger-root-builder.mjs +131 -12
- package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/navigation/ledger-root-builder.d.ts +15 -21
- package/dist/types/navigation/ledger-root-builder.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
37
|
-
* children
|
|
38
|
-
*
|
|
39
|
-
*
|
|
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.
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
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
|
|
64
|
-
*
|
|
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.
|
|
76
|
-
*
|
|
77
|
-
* (
|
|
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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,KAAK,OAAO,GAAG,uBAAuB,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,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"}
|