@fern-api/fdr-sdk 1.2.39-dc3805e7f9 → 1.2.39-ef1dbb46ea

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.
Files changed (1361) hide show
  1. package/package.json +1 -1
  2. package/dist/__test__/SdkSnippetHolder.test.d.ts +0 -2
  3. package/dist/__test__/SdkSnippetHolder.test.d.ts.map +0 -1
  4. package/dist/__test__/SdkSnippetHolder.test.js +0 -58
  5. package/dist/__test__/SdkSnippetHolder.test.js.map +0 -1
  6. package/dist/__test__/fixtures.test.d.ts +0 -2
  7. package/dist/__test__/fixtures.test.d.ts.map +0 -1
  8. package/dist/__test__/fixtures.test.js +0 -128
  9. package/dist/__test__/fixtures.test.js.map +0 -1
  10. package/dist/__test__/hume.test.d.ts +0 -2
  11. package/dist/__test__/hume.test.d.ts.map +0 -1
  12. package/dist/__test__/hume.test.js +0 -18
  13. package/dist/__test__/hume.test.js.map +0 -1
  14. package/dist/__test__/no-version-no-tabs.test.d.ts +0 -2
  15. package/dist/__test__/no-version-no-tabs.test.d.ts.map +0 -1
  16. package/dist/__test__/no-version-no-tabs.test.js +0 -17
  17. package/dist/__test__/no-version-no-tabs.test.js.map +0 -1
  18. package/dist/__test__/no-version-yes-tabs.test.d.ts +0 -2
  19. package/dist/__test__/no-version-yes-tabs.test.d.ts.map +0 -1
  20. package/dist/__test__/no-version-yes-tabs.test.js +0 -24
  21. package/dist/__test__/no-version-yes-tabs.test.js.map +0 -1
  22. package/dist/__test__/octoai.test.d.ts +0 -2
  23. package/dist/__test__/octoai.test.d.ts.map +0 -1
  24. package/dist/__test__/octoai.test.js +0 -24
  25. package/dist/__test__/octoai.test.js.map +0 -1
  26. package/dist/__test__/polytomic.test.d.ts +0 -2
  27. package/dist/__test__/polytomic.test.d.ts.map +0 -1
  28. package/dist/__test__/polytomic.test.js +0 -22
  29. package/dist/__test__/polytomic.test.js.map +0 -1
  30. package/dist/__test__/primer.test.d.ts +0 -2
  31. package/dist/__test__/primer.test.d.ts.map +0 -1
  32. package/dist/__test__/primer.test.js +0 -20
  33. package/dist/__test__/primer.test.js.map +0 -1
  34. package/dist/__test__/readFixtures.d.ts +0 -3
  35. package/dist/__test__/readFixtures.d.ts.map +0 -1
  36. package/dist/__test__/readFixtures.js +0 -8
  37. package/dist/__test__/readFixtures.js.map +0 -1
  38. package/dist/__test__/testGetAllUrlsFromDocsConfig.d.ts +0 -3
  39. package/dist/__test__/testGetAllUrlsFromDocsConfig.d.ts.map +0 -1
  40. package/dist/__test__/testGetAllUrlsFromDocsConfig.js +0 -10
  41. package/dist/__test__/testGetAllUrlsFromDocsConfig.js.map +0 -1
  42. package/dist/__test__/testGetNavigationRoot.d.ts +0 -3
  43. package/dist/__test__/testGetNavigationRoot.d.ts.map +0 -1
  44. package/dist/__test__/testGetNavigationRoot.js +0 -16
  45. package/dist/__test__/testGetNavigationRoot.js.map +0 -1
  46. package/dist/__test__/uploadcare.test.d.ts +0 -2
  47. package/dist/__test__/uploadcare.test.d.ts.map +0 -1
  48. package/dist/__test__/uploadcare.test.js +0 -25
  49. package/dist/__test__/uploadcare.test.js.map +0 -1
  50. package/dist/__test__/yes-version-no-tabs.test.d.ts +0 -2
  51. package/dist/__test__/yes-version-no-tabs.test.d.ts.map +0 -1
  52. package/dist/__test__/yes-version-no-tabs.test.js +0 -27
  53. package/dist/__test__/yes-version-no-tabs.test.js.map +0 -1
  54. package/dist/__test__/yes-version-yes-tabs.test.d.ts +0 -2
  55. package/dist/__test__/yes-version-yes-tabs.test.d.ts.map +0 -1
  56. package/dist/__test__/yes-version-yes-tabs.test.js +0 -26
  57. package/dist/__test__/yes-version-yes-tabs.test.js.map +0 -1
  58. package/dist/api-definition/__test__/availability.test.d.ts +0 -2
  59. package/dist/api-definition/__test__/availability.test.d.ts.map +0 -1
  60. package/dist/api-definition/__test__/availability.test.js +0 -15
  61. package/dist/api-definition/__test__/availability.test.js.map +0 -1
  62. package/dist/api-definition/__test__/collect-type-tree.test.d.ts +0 -2
  63. package/dist/api-definition/__test__/collect-type-tree.test.d.ts.map +0 -1
  64. package/dist/api-definition/__test__/collect-type-tree.test.js +0 -124
  65. package/dist/api-definition/__test__/collect-type-tree.test.js.map +0 -1
  66. package/dist/api-definition/__test__/join.test.d.ts +0 -2
  67. package/dist/api-definition/__test__/join.test.d.ts.map +0 -1
  68. package/dist/api-definition/__test__/join.test.js +0 -325
  69. package/dist/api-definition/__test__/join.test.js.map +0 -1
  70. package/dist/api-definition/__test__/prune.test.d.ts +0 -2
  71. package/dist/api-definition/__test__/prune.test.d.ts.map +0 -1
  72. package/dist/api-definition/__test__/prune.test.js +0 -271
  73. package/dist/api-definition/__test__/prune.test.js.map +0 -1
  74. package/dist/api-definition/__test__/schemaless-pipeline.test.d.ts +0 -2
  75. package/dist/api-definition/__test__/schemaless-pipeline.test.d.ts.map +0 -1
  76. package/dist/api-definition/__test__/schemaless-pipeline.test.js +0 -258
  77. package/dist/api-definition/__test__/schemaless-pipeline.test.js.map +0 -1
  78. package/dist/api-definition/__test__/unwrap.test.d.ts +0 -2
  79. package/dist/api-definition/__test__/unwrap.test.d.ts.map +0 -1
  80. package/dist/api-definition/__test__/unwrap.test.js +0 -669
  81. package/dist/api-definition/__test__/unwrap.test.js.map +0 -1
  82. package/dist/api-definition/__test__/v1ToV2.test.d.ts +0 -2
  83. package/dist/api-definition/__test__/v1ToV2.test.d.ts.map +0 -1
  84. package/dist/api-definition/__test__/v1ToV2.test.js +0 -1288
  85. package/dist/api-definition/__test__/v1ToV2.test.js.map +0 -1
  86. package/dist/api-definition/availability.d.ts +0 -18
  87. package/dist/api-definition/availability.d.ts.map +0 -1
  88. package/dist/api-definition/availability.js +0 -30
  89. package/dist/api-definition/availability.js.map +0 -1
  90. package/dist/api-definition/collect-referenced-types.d.ts +0 -29
  91. package/dist/api-definition/collect-referenced-types.d.ts.map +0 -1
  92. package/dist/api-definition/collect-referenced-types.js +0 -133
  93. package/dist/api-definition/collect-referenced-types.js.map +0 -1
  94. package/dist/api-definition/collect-type-tree.d.ts +0 -62
  95. package/dist/api-definition/collect-type-tree.d.ts.map +0 -1
  96. package/dist/api-definition/collect-type-tree.js +0 -234
  97. package/dist/api-definition/collect-type-tree.js.map +0 -1
  98. package/dist/api-definition/const.d.ts +0 -11
  99. package/dist/api-definition/const.d.ts.map +0 -1
  100. package/dist/api-definition/const.js +0 -11
  101. package/dist/api-definition/const.js.map +0 -1
  102. package/dist/api-definition/endpoint-context.d.ts +0 -56
  103. package/dist/api-definition/endpoint-context.d.ts.map +0 -1
  104. package/dist/api-definition/endpoint-context.js +0 -250
  105. package/dist/api-definition/endpoint-context.js.map +0 -1
  106. package/dist/api-definition/endpoint-path-literal.d.ts +0 -11
  107. package/dist/api-definition/endpoint-path-literal.d.ts.map +0 -1
  108. package/dist/api-definition/endpoint-path-literal.js +0 -14
  109. package/dist/api-definition/endpoint-path-literal.js.map +0 -1
  110. package/dist/api-definition/index.d.ts +0 -17
  111. package/dist/api-definition/index.d.ts.map +0 -1
  112. package/dist/api-definition/index.js +0 -17
  113. package/dist/api-definition/index.js.map +0 -1
  114. package/dist/api-definition/join.d.ts +0 -11
  115. package/dist/api-definition/join.d.ts.map +0 -1
  116. package/dist/api-definition/join.js +0 -80
  117. package/dist/api-definition/join.js.map +0 -1
  118. package/dist/api-definition/lang.d.ts +0 -2
  119. package/dist/api-definition/lang.d.ts.map +0 -1
  120. package/dist/api-definition/lang.js +0 -17
  121. package/dist/api-definition/lang.js.map +0 -1
  122. package/dist/api-definition/latest.d.ts +0 -54
  123. package/dist/api-definition/latest.d.ts.map +0 -1
  124. package/dist/api-definition/latest.js +0 -7
  125. package/dist/api-definition/latest.js.map +0 -1
  126. package/dist/api-definition/migrators/v1ToV2.d.ts +0 -866
  127. package/dist/api-definition/migrators/v1ToV2.d.ts.map +0 -1
  128. package/dist/api-definition/migrators/v1ToV2.js +0 -839
  129. package/dist/api-definition/migrators/v1ToV2.js.map +0 -1
  130. package/dist/api-definition/prune.d.ts +0 -20
  131. package/dist/api-definition/prune.d.ts.map +0 -1
  132. package/dist/api-definition/prune.js +0 -146
  133. package/dist/api-definition/prune.js.map +0 -1
  134. package/dist/api-definition/snippets/HttpSnippetConverter.d.ts +0 -18
  135. package/dist/api-definition/snippets/HttpSnippetConverter.d.ts.map +0 -1
  136. package/dist/api-definition/snippets/HttpSnippetConverter.js +0 -228
  137. package/dist/api-definition/snippets/HttpSnippetConverter.js.map +0 -1
  138. package/dist/api-definition/snippets/HttpSnippetConverter.test.d.ts +0 -2
  139. package/dist/api-definition/snippets/HttpSnippetConverter.test.d.ts.map +0 -1
  140. package/dist/api-definition/snippets/HttpSnippetConverter.test.js +0 -290
  141. package/dist/api-definition/snippets/HttpSnippetConverter.test.js.map +0 -1
  142. package/dist/api-definition/snippets/SnippetHttpRequest.d.ts +0 -44
  143. package/dist/api-definition/snippets/SnippetHttpRequest.d.ts.map +0 -1
  144. package/dist/api-definition/snippets/SnippetHttpRequest.js +0 -140
  145. package/dist/api-definition/snippets/SnippetHttpRequest.js.map +0 -1
  146. package/dist/api-definition/snippets/auth-scheme.d.ts +0 -41
  147. package/dist/api-definition/snippets/auth-scheme.d.ts.map +0 -1
  148. package/dist/api-definition/snippets/auth-scheme.js +0 -128
  149. package/dist/api-definition/snippets/auth-scheme.js.map +0 -1
  150. package/dist/api-definition/snippets/auth-scheme.test.d.ts +0 -2
  151. package/dist/api-definition/snippets/auth-scheme.test.d.ts.map +0 -1
  152. package/dist/api-definition/snippets/auth-scheme.test.js +0 -166
  153. package/dist/api-definition/snippets/auth-scheme.test.js.map +0 -1
  154. package/dist/api-definition/snippets/backfill.d.ts +0 -18
  155. package/dist/api-definition/snippets/backfill.d.ts.map +0 -1
  156. package/dist/api-definition/snippets/backfill.js +0 -110
  157. package/dist/api-definition/snippets/backfill.js.map +0 -1
  158. package/dist/api-definition/snippets/backfill.test.d.ts +0 -2
  159. package/dist/api-definition/snippets/backfill.test.d.ts.map +0 -1
  160. package/dist/api-definition/snippets/backfill.test.js +0 -2618
  161. package/dist/api-definition/snippets/backfill.test.js.map +0 -1
  162. package/dist/api-definition/snippets/constants.d.ts +0 -7
  163. package/dist/api-definition/snippets/constants.d.ts.map +0 -1
  164. package/dist/api-definition/snippets/constants.js +0 -15
  165. package/dist/api-definition/snippets/constants.js.map +0 -1
  166. package/dist/api-definition/snippets/curl.d.ts +0 -4
  167. package/dist/api-definition/snippets/curl.d.ts.map +0 -1
  168. package/dist/api-definition/snippets/curl.js +0 -194
  169. package/dist/api-definition/snippets/curl.js.map +0 -1
  170. package/dist/api-definition/snippets/curl.test.d.ts +0 -2
  171. package/dist/api-definition/snippets/curl.test.d.ts.map +0 -1
  172. package/dist/api-definition/snippets/curl.test.js +0 -552
  173. package/dist/api-definition/snippets/curl.test.js.map +0 -1
  174. package/dist/api-definition/snippets/generators.d.ts +0 -14
  175. package/dist/api-definition/snippets/generators.d.ts.map +0 -1
  176. package/dist/api-definition/snippets/generators.js +0 -85
  177. package/dist/api-definition/snippets/generators.js.map +0 -1
  178. package/dist/api-definition/snippets/get-har-request.d.ts +0 -11
  179. package/dist/api-definition/snippets/get-har-request.d.ts.map +0 -1
  180. package/dist/api-definition/snippets/get-har-request.js +0 -172
  181. package/dist/api-definition/snippets/get-har-request.js.map +0 -1
  182. package/dist/api-definition/snippets/get-har-request.test.d.ts +0 -2
  183. package/dist/api-definition/snippets/get-har-request.test.d.ts.map +0 -1
  184. package/dist/api-definition/snippets/get-har-request.test.js +0 -282
  185. package/dist/api-definition/snippets/get-har-request.test.js.map +0 -1
  186. package/dist/api-definition/snippets/graphql-snippets.d.ts +0 -22
  187. package/dist/api-definition/snippets/graphql-snippets.d.ts.map +0 -1
  188. package/dist/api-definition/snippets/graphql-snippets.js +0 -492
  189. package/dist/api-definition/snippets/graphql-snippets.js.map +0 -1
  190. package/dist/api-definition/snippets/graphql-snippets.test.d.ts +0 -2
  191. package/dist/api-definition/snippets/graphql-snippets.test.d.ts.map +0 -1
  192. package/dist/api-definition/snippets/graphql-snippets.test.js +0 -973
  193. package/dist/api-definition/snippets/graphql-snippets.test.js.map +0 -1
  194. package/dist/api-definition/snippets/http-snippets.d.ts +0 -26
  195. package/dist/api-definition/snippets/http-snippets.d.ts.map +0 -1
  196. package/dist/api-definition/snippets/http-snippets.js +0 -96
  197. package/dist/api-definition/snippets/http-snippets.js.map +0 -1
  198. package/dist/api-definition/snippets/index.d.ts +0 -12
  199. package/dist/api-definition/snippets/index.d.ts.map +0 -1
  200. package/dist/api-definition/snippets/index.js +0 -19
  201. package/dist/api-definition/snippets/index.js.map +0 -1
  202. package/dist/api-definition/snippets/multipart-filename-placeholder.d.ts +0 -16
  203. package/dist/api-definition/snippets/multipart-filename-placeholder.d.ts.map +0 -1
  204. package/dist/api-definition/snippets/multipart-filename-placeholder.js +0 -32
  205. package/dist/api-definition/snippets/multipart-filename-placeholder.js.map +0 -1
  206. package/dist/api-definition/snippets/multipart-filename-placeholder.test.d.ts +0 -2
  207. package/dist/api-definition/snippets/multipart-filename-placeholder.test.d.ts.map +0 -1
  208. package/dist/api-definition/snippets/multipart-filename-placeholder.test.js +0 -33
  209. package/dist/api-definition/snippets/multipart-filename-placeholder.test.js.map +0 -1
  210. package/dist/api-definition/snippets/sdk-snippets.d.ts +0 -16
  211. package/dist/api-definition/snippets/sdk-snippets.d.ts.map +0 -1
  212. package/dist/api-definition/snippets/sdk-snippets.js +0 -139
  213. package/dist/api-definition/snippets/sdk-snippets.js.map +0 -1
  214. package/dist/api-definition/snippets/sdk-snippets.test.d.ts +0 -2
  215. package/dist/api-definition/snippets/sdk-snippets.test.d.ts.map +0 -1
  216. package/dist/api-definition/snippets/sdk-snippets.test.js +0 -132
  217. package/dist/api-definition/snippets/sdk-snippets.test.js.map +0 -1
  218. package/dist/api-definition/snippets/server.d.ts +0 -16
  219. package/dist/api-definition/snippets/server.d.ts.map +0 -1
  220. package/dist/api-definition/snippets/server.js +0 -16
  221. package/dist/api-definition/snippets/server.js.map +0 -1
  222. package/dist/api-definition/snippets/types.d.ts +0 -43
  223. package/dist/api-definition/snippets/types.d.ts.map +0 -1
  224. package/dist/api-definition/snippets/types.js +0 -11
  225. package/dist/api-definition/snippets/types.js.map +0 -1
  226. package/dist/api-definition/sort-keys.d.ts +0 -5
  227. package/dist/api-definition/sort-keys.d.ts.map +0 -1
  228. package/dist/api-definition/sort-keys.js +0 -103
  229. package/dist/api-definition/sort-keys.js.map +0 -1
  230. package/dist/api-definition/status-message.d.ts +0 -9
  231. package/dist/api-definition/status-message.d.ts.map +0 -1
  232. package/dist/api-definition/status-message.js +0 -111
  233. package/dist/api-definition/status-message.js.map +0 -1
  234. package/dist/api-definition/transformer.d.ts +0 -68
  235. package/dist/api-definition/transformer.d.ts.map +0 -1
  236. package/dist/api-definition/transformer.js +0 -370
  237. package/dist/api-definition/transformer.js.map +0 -1
  238. package/dist/api-definition/typeid-visitor.d.ts +0 -16
  239. package/dist/api-definition/typeid-visitor.d.ts.map +0 -1
  240. package/dist/api-definition/typeid-visitor.js +0 -136
  241. package/dist/api-definition/typeid-visitor.js.map +0 -1
  242. package/dist/api-definition/types.d.ts +0 -7
  243. package/dist/api-definition/types.d.ts.map +0 -1
  244. package/dist/api-definition/types.js +0 -2
  245. package/dist/api-definition/types.js.map +0 -1
  246. package/dist/api-definition/unwrap.d.ts +0 -48
  247. package/dist/api-definition/unwrap.d.ts.map +0 -1
  248. package/dist/api-definition/unwrap.js +0 -294
  249. package/dist/api-definition/unwrap.js.map +0 -1
  250. package/dist/api-definition/url.d.ts +0 -22
  251. package/dist/api-definition/url.d.ts.map +0 -1
  252. package/dist/api-definition/url.js +0 -89
  253. package/dist/api-definition/url.js.map +0 -1
  254. package/dist/api-definition/wrapOpenRPCRequest.d.ts +0 -14
  255. package/dist/api-definition/wrapOpenRPCRequest.d.ts.map +0 -1
  256. package/dist/api-definition/wrapOpenRPCRequest.js +0 -20
  257. package/dist/api-definition/wrapOpenRPCRequest.js.map +0 -1
  258. package/dist/api-definition-lite/index.d.ts +0 -17
  259. package/dist/api-definition-lite/index.d.ts.map +0 -1
  260. package/dist/api-definition-lite/index.js +0 -17
  261. package/dist/api-definition-lite/index.js.map +0 -1
  262. package/dist/client/APIV1Db.d.ts +0 -5
  263. package/dist/client/APIV1Db.d.ts.map +0 -1
  264. package/dist/client/APIV1Db.js +0 -7
  265. package/dist/client/APIV1Db.js.map +0 -1
  266. package/dist/client/APIV1Read.d.ts +0 -16
  267. package/dist/client/APIV1Read.d.ts.map +0 -1
  268. package/dist/client/APIV1Read.js +0 -15
  269. package/dist/client/APIV1Read.js.map +0 -1
  270. package/dist/client/APIV1Write.d.ts +0 -5
  271. package/dist/client/APIV1Write.d.ts.map +0 -1
  272. package/dist/client/APIV1Write.js +0 -7
  273. package/dist/client/APIV1Write.js.map +0 -1
  274. package/dist/client/ApiLatestEndpoint.d.ts +0 -2
  275. package/dist/client/ApiLatestEndpoint.d.ts.map +0 -1
  276. package/dist/client/ApiLatestEndpoint.js +0 -2
  277. package/dist/client/ApiLatestEndpoint.js.map +0 -1
  278. package/dist/client/ApiLatestWebhook.d.ts +0 -2
  279. package/dist/client/ApiLatestWebhook.d.ts.map +0 -1
  280. package/dist/client/ApiLatestWebhook.js +0 -2
  281. package/dist/client/ApiLatestWebhook.js.map +0 -1
  282. package/dist/client/ApiLatestWebsocket.d.ts +0 -2
  283. package/dist/client/ApiLatestWebsocket.d.ts.map +0 -1
  284. package/dist/client/ApiLatestWebsocket.js +0 -2
  285. package/dist/client/ApiLatestWebsocket.js.map +0 -1
  286. package/dist/client/ApiLatestWithSubs.d.ts +0 -5
  287. package/dist/client/ApiLatestWithSubs.d.ts.map +0 -1
  288. package/dist/client/ApiLatestWithSubs.js +0 -5
  289. package/dist/client/ApiLatestWithSubs.js.map +0 -1
  290. package/dist/client/DocsLatest.d.ts +0 -2
  291. package/dist/client/DocsLatest.d.ts.map +0 -1
  292. package/dist/client/DocsLatest.js +0 -2
  293. package/dist/client/DocsLatest.js.map +0 -1
  294. package/dist/client/DocsV1Commons.d.ts +0 -2
  295. package/dist/client/DocsV1Commons.d.ts.map +0 -1
  296. package/dist/client/DocsV1Commons.js +0 -2
  297. package/dist/client/DocsV1Commons.js.map +0 -1
  298. package/dist/client/DocsV1Db.d.ts +0 -2
  299. package/dist/client/DocsV1Db.d.ts.map +0 -1
  300. package/dist/client/DocsV1Db.js +0 -2
  301. package/dist/client/DocsV1Db.js.map +0 -1
  302. package/dist/client/DocsV1Read.d.ts +0 -2
  303. package/dist/client/DocsV1Read.d.ts.map +0 -1
  304. package/dist/client/DocsV1Read.js +0 -2
  305. package/dist/client/DocsV1Read.js.map +0 -1
  306. package/dist/client/DocsV1Write.d.ts +0 -2
  307. package/dist/client/DocsV1Write.d.ts.map +0 -1
  308. package/dist/client/DocsV1Write.js +0 -2
  309. package/dist/client/DocsV1Write.js.map +0 -1
  310. package/dist/client/FdrAPI.d.ts +0 -71
  311. package/dist/client/FdrAPI.d.ts.map +0 -1
  312. package/dist/client/FdrAPI.js +0 -59
  313. package/dist/client/FdrAPI.js.map +0 -1
  314. package/dist/client/FdrClient.d.ts +0 -881
  315. package/dist/client/FdrClient.d.ts.map +0 -1
  316. package/dist/client/FdrClient.js +0 -57
  317. package/dist/client/FdrClient.js.map +0 -1
  318. package/dist/client/Sdks.d.ts +0 -2
  319. package/dist/client/Sdks.d.ts.map +0 -1
  320. package/dist/client/Sdks.js +0 -2
  321. package/dist/client/Sdks.js.map +0 -1
  322. package/dist/client/docs-types/__test__/collapsed.test.d.ts +0 -2
  323. package/dist/client/docs-types/__test__/collapsed.test.d.ts.map +0 -1
  324. package/dist/client/docs-types/__test__/collapsed.test.js +0 -72
  325. package/dist/client/docs-types/__test__/collapsed.test.js.map +0 -1
  326. package/dist/client/docs-types/db-commons.d.ts +0 -3
  327. package/dist/client/docs-types/db-commons.d.ts.map +0 -1
  328. package/dist/client/docs-types/db-commons.js +0 -2
  329. package/dist/client/docs-types/db-commons.js.map +0 -1
  330. package/dist/client/docs-types/db-docsCommons.d.ts +0 -3
  331. package/dist/client/docs-types/db-docsCommons.d.ts.map +0 -1
  332. package/dist/client/docs-types/db-docsCommons.js +0 -2
  333. package/dist/client/docs-types/db-docsCommons.js.map +0 -1
  334. package/dist/client/docs-types/db-docsRead.d.ts +0 -4671
  335. package/dist/client/docs-types/db-docsRead.d.ts.map +0 -1
  336. package/dist/client/docs-types/db-docsRead.js +0 -40
  337. package/dist/client/docs-types/db-docsRead.js.map +0 -1
  338. package/dist/client/docs-types/db.d.ts +0 -68568
  339. package/dist/client/docs-types/db.d.ts.map +0 -1
  340. package/dist/client/docs-types/db.js +0 -202
  341. package/dist/client/docs-types/db.js.map +0 -1
  342. package/dist/client/docs-types/latest.d.ts +0 -2421
  343. package/dist/client/docs-types/latest.d.ts.map +0 -1
  344. package/dist/client/docs-types/latest.js +0 -90
  345. package/dist/client/docs-types/latest.js.map +0 -1
  346. package/dist/client/docs-types/read-commons.d.ts +0 -9
  347. package/dist/client/docs-types/read-commons.d.ts.map +0 -1
  348. package/dist/client/docs-types/read-commons.js +0 -7
  349. package/dist/client/docs-types/read-commons.js.map +0 -1
  350. package/dist/client/docs-types/read.d.ts +0 -37090
  351. package/dist/client/docs-types/read.d.ts.map +0 -1
  352. package/dist/client/docs-types/read.js +0 -190
  353. package/dist/client/docs-types/read.js.map +0 -1
  354. package/dist/client/docs-types/shared.d.ts +0 -4139
  355. package/dist/client/docs-types/shared.d.ts.map +0 -1
  356. package/dist/client/docs-types/shared.js +0 -611
  357. package/dist/client/docs-types/shared.js.map +0 -1
  358. package/dist/client/docs-types/write-commons.d.ts +0 -9
  359. package/dist/client/docs-types/write-commons.d.ts.map +0 -1
  360. package/dist/client/docs-types/write-commons.js +0 -7
  361. package/dist/client/docs-types/write-commons.js.map +0 -1
  362. package/dist/client/docs-types/write.d.ts +0 -27765
  363. package/dist/client/docs-types/write.d.ts.map +0 -1
  364. package/dist/client/docs-types/write.js +0 -316
  365. package/dist/client/docs-types/write.js.map +0 -1
  366. package/dist/client/index.d.ts +0 -7
  367. package/dist/client/index.d.ts.map +0 -1
  368. package/dist/client/index.js +0 -7
  369. package/dist/client/index.js.map +0 -1
  370. package/dist/client/libraryDocs.d.ts +0 -381
  371. package/dist/client/libraryDocs.d.ts.map +0 -1
  372. package/dist/client/libraryDocs.js +0 -23
  373. package/dist/client/libraryDocs.js.map +0 -1
  374. package/dist/client/types.d.ts +0 -24
  375. package/dist/client/types.d.ts.map +0 -1
  376. package/dist/client/types.js +0 -11
  377. package/dist/client/types.js.map +0 -1
  378. package/dist/client/visitDbNavigationConfig.d.ts +0 -13
  379. package/dist/client/visitDbNavigationConfig.d.ts.map +0 -1
  380. package/dist/client/visitDbNavigationConfig.js +0 -24
  381. package/dist/client/visitDbNavigationConfig.js.map +0 -1
  382. package/dist/client/visitNavigationTab.d.ts +0 -13
  383. package/dist/client/visitNavigationTab.d.ts.map +0 -1
  384. package/dist/client/visitNavigationTab.js +0 -20
  385. package/dist/client/visitNavigationTab.js.map +0 -1
  386. package/dist/client/visitReadNavigationConfig.d.ts +0 -13
  387. package/dist/client/visitReadNavigationConfig.d.ts.map +0 -1
  388. package/dist/client/visitReadNavigationConfig.js +0 -23
  389. package/dist/client/visitReadNavigationConfig.js.map +0 -1
  390. package/dist/client/visitWriteNavigationConfig.d.ts +0 -13
  391. package/dist/client/visitWriteNavigationConfig.d.ts.map +0 -1
  392. package/dist/client/visitWriteNavigationConfig.js +0 -24
  393. package/dist/client/visitWriteNavigationConfig.js.map +0 -1
  394. package/dist/converters/__test__/subtitle-round-trip.test.d.ts +0 -2
  395. package/dist/converters/__test__/subtitle-round-trip.test.d.ts.map +0 -1
  396. package/dist/converters/__test__/subtitle-round-trip.test.js +0 -53
  397. package/dist/converters/__test__/subtitle-round-trip.test.js.map +0 -1
  398. package/dist/converters/db/convertAPIDefinitionToDb.d.ts +0 -9
  399. package/dist/converters/db/convertAPIDefinitionToDb.d.ts.map +0 -1
  400. package/dist/converters/db/convertAPIDefinitionToDb.js +0 -617
  401. package/dist/converters/db/convertAPIDefinitionToDb.js.map +0 -1
  402. package/dist/converters/db/convertDocsDefinitionToDb.d.ts +0 -25
  403. package/dist/converters/db/convertDocsDefinitionToDb.d.ts.map +0 -1
  404. package/dist/converters/db/convertDocsDefinitionToDb.js +0 -505
  405. package/dist/converters/db/convertDocsDefinitionToDb.js.map +0 -1
  406. package/dist/converters/db/examples/generateEndpointExampleCall.d.ts +0 -21
  407. package/dist/converters/db/examples/generateEndpointExampleCall.d.ts.map +0 -1
  408. package/dist/converters/db/examples/generateEndpointExampleCall.js +0 -171
  409. package/dist/converters/db/examples/generateEndpointExampleCall.js.map +0 -1
  410. package/dist/converters/db/examples/generateEndpointExampleCall.test.d.ts +0 -2
  411. package/dist/converters/db/examples/generateEndpointExampleCall.test.d.ts.map +0 -1
  412. package/dist/converters/db/examples/generateEndpointExampleCall.test.js +0 -102
  413. package/dist/converters/db/examples/generateEndpointExampleCall.test.js.map +0 -1
  414. package/dist/converters/db/examples/generateHttpBodyExample.d.ts +0 -9
  415. package/dist/converters/db/examples/generateHttpBodyExample.d.ts.map +0 -1
  416. package/dist/converters/db/examples/generateHttpBodyExample.js +0 -344
  417. package/dist/converters/db/examples/generateHttpBodyExample.js.map +0 -1
  418. package/dist/converters/db/examples/generateWebhookExample.d.ts +0 -6
  419. package/dist/converters/db/examples/generateWebhookExample.d.ts.map +0 -1
  420. package/dist/converters/db/examples/generateWebhookExample.js +0 -11
  421. package/dist/converters/db/examples/generateWebhookExample.js.map +0 -1
  422. package/dist/converters/db/snippets/SDKSnippetHolder.d.ts +0 -82
  423. package/dist/converters/db/snippets/SDKSnippetHolder.d.ts.map +0 -1
  424. package/dist/converters/db/snippets/SDKSnippetHolder.js +0 -125
  425. package/dist/converters/db/snippets/SDKSnippetHolder.js.map +0 -1
  426. package/dist/converters/db/upgrade/migrateDocsDbDefinition.d.ts +0 -3
  427. package/dist/converters/db/upgrade/migrateDocsDbDefinition.d.ts.map +0 -1
  428. package/dist/converters/db/upgrade/migrateDocsDbDefinition.js +0 -22
  429. package/dist/converters/db/upgrade/migrateDocsDbDefinition.js.map +0 -1
  430. package/dist/converters/db/upgrade/upgradeV1ToV2.d.ts +0 -3
  431. package/dist/converters/db/upgrade/upgradeV1ToV2.d.ts.map +0 -1
  432. package/dist/converters/db/upgrade/upgradeV1ToV2.js +0 -4
  433. package/dist/converters/db/upgrade/upgradeV1ToV2.js.map +0 -1
  434. package/dist/converters/db/upgrade/upgradeV2ToV3.d.ts +0 -3
  435. package/dist/converters/db/upgrade/upgradeV2ToV3.d.ts.map +0 -1
  436. package/dist/converters/db/upgrade/upgradeV2ToV3.js +0 -15
  437. package/dist/converters/db/upgrade/upgradeV2ToV3.js.map +0 -1
  438. package/dist/converters/index.d.ts +0 -8
  439. package/dist/converters/index.d.ts.map +0 -1
  440. package/dist/converters/index.js +0 -8
  441. package/dist/converters/index.js.map +0 -1
  442. package/dist/converters/read/convertDbAPIDefinitionToRead.d.ts +0 -2582
  443. package/dist/converters/read/convertDbAPIDefinitionToRead.d.ts.map +0 -1
  444. package/dist/converters/read/convertDbAPIDefinitionToRead.js +0 -200
  445. package/dist/converters/read/convertDbAPIDefinitionToRead.js.map +0 -1
  446. package/dist/converters/read/convertDbDocsConfigToRead.d.ts +0 -11
  447. package/dist/converters/read/convertDbDocsConfigToRead.d.ts.map +0 -1
  448. package/dist/converters/read/convertDbDocsConfigToRead.js +0 -380
  449. package/dist/converters/read/convertDbDocsConfigToRead.js.map +0 -1
  450. package/dist/converters/read/convertDocsDefinitionToRead.d.ts +0 -10
  451. package/dist/converters/read/convertDocsDefinitionToRead.d.ts.map +0 -1
  452. package/dist/converters/read/convertDocsDefinitionToRead.js +0 -19
  453. package/dist/converters/read/convertDocsDefinitionToRead.js.map +0 -1
  454. package/dist/converters/utils/colors.d.ts +0 -4
  455. package/dist/converters/utils/colors.d.ts.map +0 -1
  456. package/dist/converters/utils/colors.js +0 -13
  457. package/dist/converters/utils/colors.js.map +0 -1
  458. package/dist/docs/frontmatter.d.ts +0 -3
  459. package/dist/docs/frontmatter.d.ts.map +0 -1
  460. package/dist/docs/frontmatter.js +0 -44
  461. package/dist/docs/frontmatter.js.map +0 -1
  462. package/dist/docs/index.d.ts +0 -4
  463. package/dist/docs/index.d.ts.map +0 -1
  464. package/dist/docs/index.js +0 -4
  465. package/dist/docs/index.js.map +0 -1
  466. package/dist/docs/s3-docs-definition.d.ts +0 -7
  467. package/dist/docs/s3-docs-definition.d.ts.map +0 -1
  468. package/dist/docs/s3-docs-definition.js +0 -15
  469. package/dist/docs/s3-docs-definition.js.map +0 -1
  470. package/dist/docs/s3-docs-definition.test.d.ts +0 -2
  471. package/dist/docs/s3-docs-definition.test.d.ts.map +0 -1
  472. package/dist/docs/s3-docs-definition.test.js +0 -29
  473. package/dist/docs/s3-docs-definition.test.js.map +0 -1
  474. package/dist/index.d.ts +0 -7
  475. package/dist/index.d.ts.map +0 -1
  476. package/dist/index.js +0 -7
  477. package/dist/index.js.map +0 -1
  478. package/dist/navigation/ApiDefinitionHolder.d.ts +0 -18
  479. package/dist/navigation/ApiDefinitionHolder.d.ts.map +0 -1
  480. package/dist/navigation/ApiDefinitionHolder.js +0 -59
  481. package/dist/navigation/ApiDefinitionHolder.js.map +0 -1
  482. package/dist/navigation/ApiDefinitionPruner.d.ts +0 -17
  483. package/dist/navigation/ApiDefinitionPruner.d.ts.map +0 -1
  484. package/dist/navigation/ApiDefinitionPruner.js +0 -137
  485. package/dist/navigation/ApiDefinitionPruner.js.map +0 -1
  486. package/dist/navigation/ApiTypeIdVisitor.d.ts +0 -17
  487. package/dist/navigation/ApiTypeIdVisitor.d.ts.map +0 -1
  488. package/dist/navigation/ApiTypeIdVisitor.js +0 -133
  489. package/dist/navigation/ApiTypeIdVisitor.js.map +0 -1
  490. package/dist/navigation/NodeCollector.d.ts +0 -55
  491. package/dist/navigation/NodeCollector.d.ts.map +0 -1
  492. package/dist/navigation/NodeCollector.js +0 -365
  493. package/dist/navigation/NodeCollector.js.map +0 -1
  494. package/dist/navigation/__test__/NodeCollector.canonicalSlug.test.d.ts +0 -2
  495. package/dist/navigation/__test__/NodeCollector.canonicalSlug.test.d.ts.map +0 -1
  496. package/dist/navigation/__test__/NodeCollector.canonicalSlug.test.js +0 -109
  497. package/dist/navigation/__test__/NodeCollector.canonicalSlug.test.js.map +0 -1
  498. package/dist/navigation/__test__/NodeCollector.revalidationPageSlugs.test.d.ts +0 -2
  499. package/dist/navigation/__test__/NodeCollector.revalidationPageSlugs.test.d.ts.map +0 -1
  500. package/dist/navigation/__test__/NodeCollector.revalidationPageSlugs.test.js +0 -593
  501. package/dist/navigation/__test__/NodeCollector.revalidationPageSlugs.test.js.map +0 -1
  502. package/dist/navigation/__test__/collectLinkRedirects.test.d.ts +0 -2
  503. package/dist/navigation/__test__/collectLinkRedirects.test.d.ts.map +0 -1
  504. package/dist/navigation/__test__/collectLinkRedirects.test.js +0 -157
  505. package/dist/navigation/__test__/collectLinkRedirects.test.js.map +0 -1
  506. package/dist/navigation/__test__/ledger-root-builder.apiReferenceChildren.test.d.ts +0 -2
  507. package/dist/navigation/__test__/ledger-root-builder.apiReferenceChildren.test.d.ts.map +0 -1
  508. package/dist/navigation/__test__/ledger-root-builder.apiReferenceChildren.test.js +0 -85
  509. package/dist/navigation/__test__/ledger-root-builder.apiReferenceChildren.test.js.map +0 -1
  510. package/dist/navigation/__test__/ledger-root-builder.changelogSlug.test.d.ts +0 -2
  511. package/dist/navigation/__test__/ledger-root-builder.changelogSlug.test.d.ts.map +0 -1
  512. package/dist/navigation/__test__/ledger-root-builder.changelogSlug.test.js +0 -154
  513. package/dist/navigation/__test__/ledger-root-builder.changelogSlug.test.js.map +0 -1
  514. package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.d.ts +0 -2
  515. package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.d.ts.map +0 -1
  516. package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.js +0 -85
  517. package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.js.map +0 -1
  518. package/dist/navigation/__test__/ledger-root-builder.defaultVersionElision.test.d.ts +0 -2
  519. package/dist/navigation/__test__/ledger-root-builder.defaultVersionElision.test.d.ts.map +0 -1
  520. package/dist/navigation/__test__/ledger-root-builder.defaultVersionElision.test.js +0 -267
  521. package/dist/navigation/__test__/ledger-root-builder.defaultVersionElision.test.js.map +0 -1
  522. package/dist/navigation/__test__/ledger-root-builder.landingPage.test.d.ts +0 -2
  523. package/dist/navigation/__test__/ledger-root-builder.landingPage.test.d.ts.map +0 -1
  524. package/dist/navigation/__test__/ledger-root-builder.landingPage.test.js +0 -82
  525. package/dist/navigation/__test__/ledger-root-builder.landingPage.test.js.map +0 -1
  526. package/dist/navigation/__test__/ledger-root-builder.linkRepro.test.d.ts +0 -2
  527. package/dist/navigation/__test__/ledger-root-builder.linkRepro.test.d.ts.map +0 -1
  528. package/dist/navigation/__test__/ledger-root-builder.linkRepro.test.js +0 -164
  529. package/dist/navigation/__test__/ledger-root-builder.linkRepro.test.js.map +0 -1
  530. package/dist/navigation/__test__/ledger-root-builder.mergeEndpointPairs.test.d.ts +0 -2
  531. package/dist/navigation/__test__/ledger-root-builder.mergeEndpointPairs.test.d.ts.map +0 -1
  532. package/dist/navigation/__test__/ledger-root-builder.mergeEndpointPairs.test.js +0 -72
  533. package/dist/navigation/__test__/ledger-root-builder.mergeEndpointPairs.test.js.map +0 -1
  534. package/dist/navigation/__test__/ledger-root-builder.metadataPreservation.test.d.ts +0 -2
  535. package/dist/navigation/__test__/ledger-root-builder.metadataPreservation.test.d.ts.map +0 -1
  536. package/dist/navigation/__test__/ledger-root-builder.metadataPreservation.test.js +0 -1031
  537. package/dist/navigation/__test__/ledger-root-builder.metadataPreservation.test.js.map +0 -1
  538. package/dist/navigation/__test__/ledger-root-builder.pointsTo.test.d.ts +0 -2
  539. package/dist/navigation/__test__/ledger-root-builder.pointsTo.test.d.ts.map +0 -1
  540. package/dist/navigation/__test__/ledger-root-builder.pointsTo.test.js +0 -94
  541. package/dist/navigation/__test__/ledger-root-builder.pointsTo.test.js.map +0 -1
  542. package/dist/navigation/__test__/ledger-root-builder.productId.test.d.ts +0 -2
  543. package/dist/navigation/__test__/ledger-root-builder.productId.test.d.ts.map +0 -1
  544. package/dist/navigation/__test__/ledger-root-builder.productId.test.js +0 -102
  545. package/dist/navigation/__test__/ledger-root-builder.productId.test.js.map +0 -1
  546. package/dist/navigation/__test__/ledger-root-builder.rootChildOrder.test.d.ts +0 -2
  547. package/dist/navigation/__test__/ledger-root-builder.rootChildOrder.test.d.ts.map +0 -1
  548. package/dist/navigation/__test__/ledger-root-builder.rootChildOrder.test.js +0 -205
  549. package/dist/navigation/__test__/ledger-root-builder.rootChildOrder.test.js.map +0 -1
  550. package/dist/navigation/__test__/ledger-root-builder.rootSectionSlug.test.d.ts +0 -2
  551. package/dist/navigation/__test__/ledger-root-builder.rootSectionSlug.test.d.ts.map +0 -1
  552. package/dist/navigation/__test__/ledger-root-builder.rootSectionSlug.test.js +0 -439
  553. package/dist/navigation/__test__/ledger-root-builder.rootSectionSlug.test.js.map +0 -1
  554. package/dist/navigation/__test__/ledger-root-builder.rootSlug.test.d.ts +0 -2
  555. package/dist/navigation/__test__/ledger-root-builder.rootSlug.test.d.ts.map +0 -1
  556. package/dist/navigation/__test__/ledger-root-builder.rootSlug.test.js +0 -47
  557. package/dist/navigation/__test__/ledger-root-builder.rootSlug.test.js.map +0 -1
  558. package/dist/navigation/__test__/ledger-root-builder.skipSlugTabs.test.d.ts +0 -2
  559. package/dist/navigation/__test__/ledger-root-builder.skipSlugTabs.test.d.ts.map +0 -1
  560. package/dist/navigation/__test__/ledger-root-builder.skipSlugTabs.test.js +0 -284
  561. package/dist/navigation/__test__/ledger-root-builder.skipSlugTabs.test.js.map +0 -1
  562. package/dist/navigation/__test__/ledger-root-builder.tabSlug.test.d.ts +0 -2
  563. package/dist/navigation/__test__/ledger-root-builder.tabSlug.test.d.ts.map +0 -1
  564. package/dist/navigation/__test__/ledger-root-builder.tabSlug.test.js +0 -308
  565. package/dist/navigation/__test__/ledger-root-builder.tabSlug.test.js.map +0 -1
  566. package/dist/navigation/__test__/ledger-root-builder.unversionedPointsTo.test.d.ts +0 -2
  567. package/dist/navigation/__test__/ledger-root-builder.unversionedPointsTo.test.d.ts.map +0 -1
  568. package/dist/navigation/__test__/ledger-root-builder.unversionedPointsTo.test.js +0 -150
  569. package/dist/navigation/__test__/ledger-root-builder.unversionedPointsTo.test.js.map +0 -1
  570. package/dist/navigation/__test__/ledger-root-builder.variantSharedSegments.test.d.ts +0 -2
  571. package/dist/navigation/__test__/ledger-root-builder.variantSharedSegments.test.d.ts.map +0 -1
  572. package/dist/navigation/__test__/ledger-root-builder.variantSharedSegments.test.js +0 -262
  573. package/dist/navigation/__test__/ledger-root-builder.variantSharedSegments.test.js.map +0 -1
  574. package/dist/navigation/consts.d.ts +0 -2
  575. package/dist/navigation/consts.d.ts.map +0 -1
  576. package/dist/navigation/consts.js +0 -2
  577. package/dist/navigation/consts.js.map +0 -1
  578. package/dist/navigation/index.d.ts +0 -13
  579. package/dist/navigation/index.d.ts.map +0 -1
  580. package/dist/navigation/index.js +0 -13
  581. package/dist/navigation/index.js.map +0 -1
  582. package/dist/navigation/ledger-root-builder.d.ts +0 -120
  583. package/dist/navigation/ledger-root-builder.d.ts.map +0 -1
  584. package/dist/navigation/ledger-root-builder.js +0 -1904
  585. package/dist/navigation/ledger-root-builder.js.map +0 -1
  586. package/dist/navigation/migrators/__test__/collapsed.test.d.ts +0 -2
  587. package/dist/navigation/migrators/__test__/collapsed.test.d.ts.map +0 -1
  588. package/dist/navigation/migrators/__test__/collapsed.test.js +0 -100
  589. package/dist/navigation/migrators/__test__/collapsed.test.js.map +0 -1
  590. package/dist/navigation/migrators/index.d.ts +0 -2
  591. package/dist/navigation/migrators/index.d.ts.map +0 -1
  592. package/dist/navigation/migrators/index.js +0 -2
  593. package/dist/navigation/migrators/index.js.map +0 -1
  594. package/dist/navigation/migrators/v1ToV2.d.ts +0 -42
  595. package/dist/navigation/migrators/v1ToV2.d.ts.map +0 -1
  596. package/dist/navigation/migrators/v1ToV2.js +0 -846
  597. package/dist/navigation/migrators/v1ToV2.js.map +0 -1
  598. package/dist/navigation/types/latest.d.ts +0 -268
  599. package/dist/navigation/types/latest.d.ts.map +0 -1
  600. package/dist/navigation/types/latest.js +0 -16
  601. package/dist/navigation/types/latest.js.map +0 -1
  602. package/dist/navigation/types/v1.d.ts +0 -255
  603. package/dist/navigation/types/v1.d.ts.map +0 -1
  604. package/dist/navigation/types/v1.js +0 -27
  605. package/dist/navigation/types/v1.js.map +0 -1
  606. package/dist/navigation/utils/__test__/canonicalSlugKey.test.d.ts +0 -2
  607. package/dist/navigation/utils/__test__/canonicalSlugKey.test.d.ts.map +0 -1
  608. package/dist/navigation/utils/__test__/canonicalSlugKey.test.js +0 -41
  609. package/dist/navigation/utils/__test__/canonicalSlugKey.test.js.map +0 -1
  610. package/dist/navigation/utils/__test__/followRedirects.test.d.ts +0 -2
  611. package/dist/navigation/utils/__test__/followRedirects.test.d.ts.map +0 -1
  612. package/dist/navigation/utils/__test__/followRedirects.test.js +0 -134
  613. package/dist/navigation/utils/__test__/followRedirects.test.js.map +0 -1
  614. package/dist/navigation/utils/__test__/pruneNavigationTree.test.d.ts +0 -2
  615. package/dist/navigation/utils/__test__/pruneNavigationTree.test.d.ts.map +0 -1
  616. package/dist/navigation/utils/__test__/pruneNavigationTree.test.js +0 -841
  617. package/dist/navigation/utils/__test__/pruneNavigationTree.test.js.map +0 -1
  618. package/dist/navigation/utils/__test__/skip-slug-tab-pointsto.test.d.ts +0 -2
  619. package/dist/navigation/utils/__test__/skip-slug-tab-pointsto.test.d.ts.map +0 -1
  620. package/dist/navigation/utils/__test__/skip-slug-tab-pointsto.test.js +0 -265
  621. package/dist/navigation/utils/__test__/skip-slug-tab-pointsto.test.js.map +0 -1
  622. package/dist/navigation/utils/__test__/toUnversionedSlug.test.d.ts +0 -2
  623. package/dist/navigation/utils/__test__/toUnversionedSlug.test.d.ts.map +0 -1
  624. package/dist/navigation/utils/__test__/toUnversionedSlug.test.js +0 -17
  625. package/dist/navigation/utils/__test__/toUnversionedSlug.test.js.map +0 -1
  626. package/dist/navigation/utils/buildPageIdToSlugMap.d.ts +0 -14
  627. package/dist/navigation/utils/buildPageIdToSlugMap.d.ts.map +0 -1
  628. package/dist/navigation/utils/buildPageIdToSlugMap.js +0 -39
  629. package/dist/navigation/utils/buildPageIdToSlugMap.js.map +0 -1
  630. package/dist/navigation/utils/canonicalSlugKey.d.ts +0 -22
  631. package/dist/navigation/utils/canonicalSlugKey.d.ts.map +0 -1
  632. package/dist/navigation/utils/canonicalSlugKey.js +0 -29
  633. package/dist/navigation/utils/canonicalSlugKey.js.map +0 -1
  634. package/dist/navigation/utils/collectApiReferences.d.ts +0 -3
  635. package/dist/navigation/utils/collectApiReferences.d.ts.map +0 -1
  636. package/dist/navigation/utils/collectApiReferences.js +0 -13
  637. package/dist/navigation/utils/collectApiReferences.js.map +0 -1
  638. package/dist/navigation/utils/collectLinkRedirects.d.ts +0 -20
  639. package/dist/navigation/utils/collectLinkRedirects.d.ts.map +0 -1
  640. package/dist/navigation/utils/collectLinkRedirects.js +0 -47
  641. package/dist/navigation/utils/collectLinkRedirects.js.map +0 -1
  642. package/dist/navigation/utils/collectPageIds.d.ts +0 -3
  643. package/dist/navigation/utils/collectPageIds.d.ts.map +0 -1
  644. package/dist/navigation/utils/collectPageIds.js +0 -15
  645. package/dist/navigation/utils/collectPageIds.js.map +0 -1
  646. package/dist/navigation/utils/createBreadcrumb.d.ts +0 -3
  647. package/dist/navigation/utils/createBreadcrumb.d.ts.map +0 -1
  648. package/dist/navigation/utils/createBreadcrumb.js +0 -59
  649. package/dist/navigation/utils/createBreadcrumb.js.map +0 -1
  650. package/dist/navigation/utils/deleteChild.d.ts +0 -9
  651. package/dist/navigation/utils/deleteChild.d.ts.map +0 -1
  652. package/dist/navigation/utils/deleteChild.js +0 -111
  653. package/dist/navigation/utils/deleteChild.js.map +0 -1
  654. package/dist/navigation/utils/findNode.d.ts +0 -55
  655. package/dist/navigation/utils/findNode.d.ts.map +0 -1
  656. package/dist/navigation/utils/findNode.js +0 -201
  657. package/dist/navigation/utils/findNode.js.map +0 -1
  658. package/dist/navigation/utils/followRedirect.d.ts +0 -4
  659. package/dist/navigation/utils/followRedirect.d.ts.map +0 -1
  660. package/dist/navigation/utils/followRedirect.js +0 -67
  661. package/dist/navigation/utils/followRedirect.js.map +0 -1
  662. package/dist/navigation/utils/getApiReferenceId.d.ts +0 -3
  663. package/dist/navigation/utils/getApiReferenceId.d.ts.map +0 -1
  664. package/dist/navigation/utils/getApiReferenceId.js +0 -42
  665. package/dist/navigation/utils/getApiReferenceId.js.map +0 -1
  666. package/dist/navigation/utils/getFrontmatter.d.ts +0 -6
  667. package/dist/navigation/utils/getFrontmatter.d.ts.map +0 -1
  668. package/dist/navigation/utils/getFrontmatter.js +0 -12
  669. package/dist/navigation/utils/getFrontmatter.js.map +0 -1
  670. package/dist/navigation/utils/getNoIndexFromFrontmatter.d.ts +0 -5
  671. package/dist/navigation/utils/getNoIndexFromFrontmatter.d.ts.map +0 -1
  672. package/dist/navigation/utils/getNoIndexFromFrontmatter.js +0 -13
  673. package/dist/navigation/utils/getNoIndexFromFrontmatter.js.map +0 -1
  674. package/dist/navigation/utils/index.d.ts +0 -15
  675. package/dist/navigation/utils/index.d.ts.map +0 -1
  676. package/dist/navigation/utils/index.js +0 -15
  677. package/dist/navigation/utils/index.js.map +0 -1
  678. package/dist/navigation/utils/isSubpackage.d.ts +0 -3
  679. package/dist/navigation/utils/isSubpackage.d.ts.map +0 -1
  680. package/dist/navigation/utils/isSubpackage.js +0 -4
  681. package/dist/navigation/utils/isSubpackage.js.map +0 -1
  682. package/dist/navigation/utils/pruneNavigationTree.d.ts +0 -21
  683. package/dist/navigation/utils/pruneNavigationTree.d.ts.map +0 -1
  684. package/dist/navigation/utils/pruneNavigationTree.js +0 -79
  685. package/dist/navigation/utils/pruneNavigationTree.js.map +0 -1
  686. package/dist/navigation/utils/pruneVersionNode.d.ts +0 -4
  687. package/dist/navigation/utils/pruneVersionNode.d.ts.map +0 -1
  688. package/dist/navigation/utils/pruneVersionNode.js +0 -23
  689. package/dist/navigation/utils/pruneVersionNode.js.map +0 -1
  690. package/dist/navigation/utils/stringifyEndpointPathParts.d.ts +0 -3
  691. package/dist/navigation/utils/stringifyEndpointPathParts.d.ts.map +0 -1
  692. package/dist/navigation/utils/stringifyEndpointPathParts.js +0 -5
  693. package/dist/navigation/utils/stringifyEndpointPathParts.js.map +0 -1
  694. package/dist/navigation/utils/toApis.d.ts +0 -314
  695. package/dist/navigation/utils/toApis.d.ts.map +0 -1
  696. package/dist/navigation/utils/toApis.js +0 -6
  697. package/dist/navigation/utils/toApis.js.map +0 -1
  698. package/dist/navigation/utils/toPages.d.ts +0 -3
  699. package/dist/navigation/utils/toPages.d.ts.map +0 -1
  700. package/dist/navigation/utils/toPages.js +0 -5
  701. package/dist/navigation/utils/toPages.js.map +0 -1
  702. package/dist/navigation/utils/toRootNode.d.ts +0 -3
  703. package/dist/navigation/utils/toRootNode.d.ts.map +0 -1
  704. package/dist/navigation/utils/toRootNode.js +0 -11
  705. package/dist/navigation/utils/toRootNode.js.map +0 -1
  706. package/dist/navigation/utils/toUnversionedSlug.d.ts +0 -8
  707. package/dist/navigation/utils/toUnversionedSlug.d.ts.map +0 -1
  708. package/dist/navigation/utils/toUnversionedSlug.js +0 -11
  709. package/dist/navigation/utils/toUnversionedSlug.js.map +0 -1
  710. package/dist/navigation/utils/updatePointsTo.d.ts +0 -8
  711. package/dist/navigation/utils/updatePointsTo.d.ts.map +0 -1
  712. package/dist/navigation/utils/updatePointsTo.js +0 -48
  713. package/dist/navigation/utils/updatePointsTo.js.map +0 -1
  714. package/dist/navigation/versions/index.d.ts +0 -3
  715. package/dist/navigation/versions/index.d.ts.map +0 -1
  716. package/dist/navigation/versions/index.js +0 -3
  717. package/dist/navigation/versions/index.js.map +0 -1
  718. package/dist/navigation/versions/latest/NavigationNode.d.ts +0 -6
  719. package/dist/navigation/versions/latest/NavigationNode.d.ts.map +0 -1
  720. package/dist/navigation/versions/latest/NavigationNode.js +0 -2
  721. package/dist/navigation/versions/latest/NavigationNode.js.map +0 -1
  722. package/dist/navigation/versions/latest/NavigationNodeApiLeaf.d.ts +0 -8
  723. package/dist/navigation/versions/latest/NavigationNodeApiLeaf.d.ts.map +0 -1
  724. package/dist/navigation/versions/latest/NavigationNodeApiLeaf.js +0 -9
  725. package/dist/navigation/versions/latest/NavigationNodeApiLeaf.js.map +0 -1
  726. package/dist/navigation/versions/latest/NavigationNodeLeaf.d.ts +0 -10
  727. package/dist/navigation/versions/latest/NavigationNodeLeaf.d.ts.map +0 -1
  728. package/dist/navigation/versions/latest/NavigationNodeLeaf.js +0 -6
  729. package/dist/navigation/versions/latest/NavigationNodeLeaf.js.map +0 -1
  730. package/dist/navigation/versions/latest/NavigationNodeMarkdown.d.ts +0 -9
  731. package/dist/navigation/versions/latest/NavigationNodeMarkdown.d.ts.map +0 -1
  732. package/dist/navigation/versions/latest/NavigationNodeMarkdown.js +0 -6
  733. package/dist/navigation/versions/latest/NavigationNodeMarkdown.js.map +0 -1
  734. package/dist/navigation/versions/latest/NavigationNodeNeighbor.d.ts +0 -7
  735. package/dist/navigation/versions/latest/NavigationNodeNeighbor.d.ts.map +0 -1
  736. package/dist/navigation/versions/latest/NavigationNodeNeighbor.js +0 -10
  737. package/dist/navigation/versions/latest/NavigationNodeNeighbor.js.map +0 -1
  738. package/dist/navigation/versions/latest/NavigationNodePage.d.ts +0 -10
  739. package/dist/navigation/versions/latest/NavigationNodePage.d.ts.map +0 -1
  740. package/dist/navigation/versions/latest/NavigationNodePage.js +0 -13
  741. package/dist/navigation/versions/latest/NavigationNodePage.js.map +0 -1
  742. package/dist/navigation/versions/latest/NavigationNodePageLeaf.d.ts +0 -8
  743. package/dist/navigation/versions/latest/NavigationNodePageLeaf.d.ts.map +0 -1
  744. package/dist/navigation/versions/latest/NavigationNodePageLeaf.js +0 -4
  745. package/dist/navigation/versions/latest/NavigationNodePageLeaf.js.map +0 -1
  746. package/dist/navigation/versions/latest/NavigationNodeParent.d.ts +0 -4
  747. package/dist/navigation/versions/latest/NavigationNodeParent.d.ts.map +0 -1
  748. package/dist/navigation/versions/latest/NavigationNodeParent.js +0 -2
  749. package/dist/navigation/versions/latest/NavigationNodeParent.js.map +0 -1
  750. package/dist/navigation/versions/latest/NavigationNodeSection.d.ts +0 -8
  751. package/dist/navigation/versions/latest/NavigationNodeSection.d.ts.map +0 -1
  752. package/dist/navigation/versions/latest/NavigationNodeSection.js +0 -7
  753. package/dist/navigation/versions/latest/NavigationNodeSection.js.map +0 -1
  754. package/dist/navigation/versions/latest/NavigationNodeSectionOverview.d.ts +0 -13
  755. package/dist/navigation/versions/latest/NavigationNodeSectionOverview.d.ts.map +0 -1
  756. package/dist/navigation/versions/latest/NavigationNodeSectionOverview.js +0 -5
  757. package/dist/navigation/versions/latest/NavigationNodeSectionOverview.js.map +0 -1
  758. package/dist/navigation/versions/latest/NavigationNodeWithMetadata.d.ts +0 -8
  759. package/dist/navigation/versions/latest/NavigationNodeWithMetadata.d.ts.map +0 -1
  760. package/dist/navigation/versions/latest/NavigationNodeWithMetadata.js +0 -5
  761. package/dist/navigation/versions/latest/NavigationNodeWithMetadata.js.map +0 -1
  762. package/dist/navigation/versions/latest/NavigationNodeWithRedirect.d.ts +0 -14
  763. package/dist/navigation/versions/latest/NavigationNodeWithRedirect.d.ts.map +0 -1
  764. package/dist/navigation/versions/latest/NavigationNodeWithRedirect.js +0 -19
  765. package/dist/navigation/versions/latest/NavigationNodeWithRedirect.js.map +0 -1
  766. package/dist/navigation/versions/latest/NavigationNodeWithSlug.d.ts +0 -10
  767. package/dist/navigation/versions/latest/NavigationNodeWithSlug.d.ts.map +0 -1
  768. package/dist/navigation/versions/latest/NavigationNodeWithSlug.js +0 -4
  769. package/dist/navigation/versions/latest/NavigationNodeWithSlug.js.map +0 -1
  770. package/dist/navigation/versions/latest/__test__/GraphQlTypeNode.test.d.ts +0 -2
  771. package/dist/navigation/versions/latest/__test__/GraphQlTypeNode.test.d.ts.map +0 -1
  772. package/dist/navigation/versions/latest/__test__/GraphQlTypeNode.test.js +0 -56
  773. package/dist/navigation/versions/latest/__test__/GraphQlTypeNode.test.js.map +0 -1
  774. package/dist/navigation/versions/latest/__test__/slugjoin.test.d.ts +0 -2
  775. package/dist/navigation/versions/latest/__test__/slugjoin.test.d.ts.map +0 -1
  776. package/dist/navigation/versions/latest/__test__/slugjoin.test.js +0 -22
  777. package/dist/navigation/versions/latest/__test__/slugjoin.test.js.map +0 -1
  778. package/dist/navigation/versions/latest/getChildren.d.ts +0 -3
  779. package/dist/navigation/versions/latest/getChildren.d.ts.map +0 -1
  780. package/dist/navigation/versions/latest/getChildren.js +0 -40
  781. package/dist/navigation/versions/latest/getChildren.js.map +0 -1
  782. package/dist/navigation/versions/latest/getPageId.d.ts +0 -3
  783. package/dist/navigation/versions/latest/getPageId.d.ts.map +0 -1
  784. package/dist/navigation/versions/latest/getPageId.js +0 -25
  785. package/dist/navigation/versions/latest/getPageId.js.map +0 -1
  786. package/dist/navigation/versions/latest/index.d.ts +0 -34
  787. package/dist/navigation/versions/latest/index.d.ts.map +0 -1
  788. package/dist/navigation/versions/latest/index.js +0 -34
  789. package/dist/navigation/versions/latest/index.js.map +0 -1
  790. package/dist/navigation/versions/latest/isApiReferenceNode.d.ts +0 -3
  791. package/dist/navigation/versions/latest/isApiReferenceNode.d.ts.map +0 -1
  792. package/dist/navigation/versions/latest/isApiReferenceNode.js +0 -4
  793. package/dist/navigation/versions/latest/isApiReferenceNode.js.map +0 -1
  794. package/dist/navigation/versions/latest/isExternalProductNode.d.ts +0 -3
  795. package/dist/navigation/versions/latest/isExternalProductNode.d.ts.map +0 -1
  796. package/dist/navigation/versions/latest/isExternalProductNode.js +0 -4
  797. package/dist/navigation/versions/latest/isExternalProductNode.js.map +0 -1
  798. package/dist/navigation/versions/latest/isInternalProductNode.d.ts +0 -3
  799. package/dist/navigation/versions/latest/isInternalProductNode.d.ts.map +0 -1
  800. package/dist/navigation/versions/latest/isInternalProductNode.js +0 -4
  801. package/dist/navigation/versions/latest/isInternalProductNode.js.map +0 -1
  802. package/dist/navigation/versions/latest/isProductGroupNode.d.ts +0 -3
  803. package/dist/navigation/versions/latest/isProductGroupNode.d.ts.map +0 -1
  804. package/dist/navigation/versions/latest/isProductGroupNode.js +0 -4
  805. package/dist/navigation/versions/latest/isProductGroupNode.js.map +0 -1
  806. package/dist/navigation/versions/latest/isProductNode.d.ts +0 -3
  807. package/dist/navigation/versions/latest/isProductNode.d.ts.map +0 -1
  808. package/dist/navigation/versions/latest/isProductNode.js +0 -4
  809. package/dist/navigation/versions/latest/isProductNode.js.map +0 -1
  810. package/dist/navigation/versions/latest/isSidebarRootNode.d.ts +0 -3
  811. package/dist/navigation/versions/latest/isSidebarRootNode.d.ts.map +0 -1
  812. package/dist/navigation/versions/latest/isSidebarRootNode.js +0 -4
  813. package/dist/navigation/versions/latest/isSidebarRootNode.js.map +0 -1
  814. package/dist/navigation/versions/latest/isTabbedNode.d.ts +0 -3
  815. package/dist/navigation/versions/latest/isTabbedNode.d.ts.map +0 -1
  816. package/dist/navigation/versions/latest/isTabbedNode.js +0 -4
  817. package/dist/navigation/versions/latest/isTabbedNode.js.map +0 -1
  818. package/dist/navigation/versions/latest/isUnversionedNode.d.ts +0 -3
  819. package/dist/navigation/versions/latest/isUnversionedNode.d.ts.map +0 -1
  820. package/dist/navigation/versions/latest/isUnversionedNode.js +0 -4
  821. package/dist/navigation/versions/latest/isUnversionedNode.js.map +0 -1
  822. package/dist/navigation/versions/latest/isVariantNode.d.ts +0 -3
  823. package/dist/navigation/versions/latest/isVariantNode.d.ts.map +0 -1
  824. package/dist/navigation/versions/latest/isVariantNode.js +0 -4
  825. package/dist/navigation/versions/latest/isVariantNode.js.map +0 -1
  826. package/dist/navigation/versions/latest/isVariantedNode.d.ts +0 -3
  827. package/dist/navigation/versions/latest/isVariantedNode.d.ts.map +0 -1
  828. package/dist/navigation/versions/latest/isVariantedNode.js +0 -4
  829. package/dist/navigation/versions/latest/isVariantedNode.js.map +0 -1
  830. package/dist/navigation/versions/latest/isVersionNode.d.ts +0 -3
  831. package/dist/navigation/versions/latest/isVersionNode.d.ts.map +0 -1
  832. package/dist/navigation/versions/latest/isVersionNode.js +0 -4
  833. package/dist/navigation/versions/latest/isVersionNode.js.map +0 -1
  834. package/dist/navigation/versions/latest/slugjoin.d.ts +0 -3
  835. package/dist/navigation/versions/latest/slugjoin.d.ts.map +0 -1
  836. package/dist/navigation/versions/latest/slugjoin.js +0 -17
  837. package/dist/navigation/versions/latest/slugjoin.js.map +0 -1
  838. package/dist/navigation/versions/latest/toDefaultSlug.d.ts +0 -9
  839. package/dist/navigation/versions/latest/toDefaultSlug.d.ts.map +0 -1
  840. package/dist/navigation/versions/latest/toDefaultSlug.js +0 -12
  841. package/dist/navigation/versions/latest/toDefaultSlug.js.map +0 -1
  842. package/dist/navigation/versions/latest/traverseBF.d.ts +0 -8
  843. package/dist/navigation/versions/latest/traverseBF.d.ts.map +0 -1
  844. package/dist/navigation/versions/latest/traverseBF.js +0 -9
  845. package/dist/navigation/versions/latest/traverseBF.js.map +0 -1
  846. package/dist/navigation/versions/latest/traverseDF.d.ts +0 -8
  847. package/dist/navigation/versions/latest/traverseDF.d.ts.map +0 -1
  848. package/dist/navigation/versions/latest/traverseDF.js +0 -9
  849. package/dist/navigation/versions/latest/traverseDF.js.map +0 -1
  850. package/dist/navigation/versions/v1/NavigationNode.d.ts +0 -6
  851. package/dist/navigation/versions/v1/NavigationNode.d.ts.map +0 -1
  852. package/dist/navigation/versions/v1/NavigationNode.js +0 -2
  853. package/dist/navigation/versions/v1/NavigationNode.js.map +0 -1
  854. package/dist/navigation/versions/v1/NavigationNodeApiLeaf.d.ts +0 -8
  855. package/dist/navigation/versions/v1/NavigationNodeApiLeaf.d.ts.map +0 -1
  856. package/dist/navigation/versions/v1/NavigationNodeApiLeaf.js +0 -8
  857. package/dist/navigation/versions/v1/NavigationNodeApiLeaf.js.map +0 -1
  858. package/dist/navigation/versions/v1/NavigationNodeLeaf.d.ts +0 -10
  859. package/dist/navigation/versions/v1/NavigationNodeLeaf.d.ts.map +0 -1
  860. package/dist/navigation/versions/v1/NavigationNodeLeaf.js +0 -6
  861. package/dist/navigation/versions/v1/NavigationNodeLeaf.js.map +0 -1
  862. package/dist/navigation/versions/v1/NavigationNodeMarkdown.d.ts +0 -9
  863. package/dist/navigation/versions/v1/NavigationNodeMarkdown.d.ts.map +0 -1
  864. package/dist/navigation/versions/v1/NavigationNodeMarkdown.js +0 -6
  865. package/dist/navigation/versions/v1/NavigationNodeMarkdown.js.map +0 -1
  866. package/dist/navigation/versions/v1/NavigationNodeNeighbor.d.ts +0 -7
  867. package/dist/navigation/versions/v1/NavigationNodeNeighbor.d.ts.map +0 -1
  868. package/dist/navigation/versions/v1/NavigationNodeNeighbor.js +0 -10
  869. package/dist/navigation/versions/v1/NavigationNodeNeighbor.js.map +0 -1
  870. package/dist/navigation/versions/v1/NavigationNodePage.d.ts +0 -10
  871. package/dist/navigation/versions/v1/NavigationNodePage.d.ts.map +0 -1
  872. package/dist/navigation/versions/v1/NavigationNodePage.js +0 -11
  873. package/dist/navigation/versions/v1/NavigationNodePage.js.map +0 -1
  874. package/dist/navigation/versions/v1/NavigationNodePageLeaf.d.ts +0 -8
  875. package/dist/navigation/versions/v1/NavigationNodePageLeaf.d.ts.map +0 -1
  876. package/dist/navigation/versions/v1/NavigationNodePageLeaf.js +0 -4
  877. package/dist/navigation/versions/v1/NavigationNodePageLeaf.js.map +0 -1
  878. package/dist/navigation/versions/v1/NavigationNodeSection.d.ts +0 -8
  879. package/dist/navigation/versions/v1/NavigationNodeSection.d.ts.map +0 -1
  880. package/dist/navigation/versions/v1/NavigationNodeSection.js +0 -7
  881. package/dist/navigation/versions/v1/NavigationNodeSection.js.map +0 -1
  882. package/dist/navigation/versions/v1/NavigationNodeSectionOverview.d.ts +0 -13
  883. package/dist/navigation/versions/v1/NavigationNodeSectionOverview.d.ts.map +0 -1
  884. package/dist/navigation/versions/v1/NavigationNodeSectionOverview.js +0 -5
  885. package/dist/navigation/versions/v1/NavigationNodeSectionOverview.js.map +0 -1
  886. package/dist/navigation/versions/v1/NavigationNodeWithMetadata.d.ts +0 -8
  887. package/dist/navigation/versions/v1/NavigationNodeWithMetadata.d.ts.map +0 -1
  888. package/dist/navigation/versions/v1/NavigationNodeWithMetadata.js +0 -5
  889. package/dist/navigation/versions/v1/NavigationNodeWithMetadata.js.map +0 -1
  890. package/dist/navigation/versions/v1/NavigationNodeWithRedirect.d.ts +0 -8
  891. package/dist/navigation/versions/v1/NavigationNodeWithRedirect.d.ts.map +0 -1
  892. package/dist/navigation/versions/v1/NavigationNodeWithRedirect.js +0 -4
  893. package/dist/navigation/versions/v1/NavigationNodeWithRedirect.js.map +0 -1
  894. package/dist/navigation/versions/v1/__test__/slugjoin.test.d.ts +0 -2
  895. package/dist/navigation/versions/v1/__test__/slugjoin.test.d.ts.map +0 -1
  896. package/dist/navigation/versions/v1/__test__/slugjoin.test.js +0 -14
  897. package/dist/navigation/versions/v1/__test__/slugjoin.test.js.map +0 -1
  898. package/dist/navigation/versions/v1/convertAvailability.d.ts +0 -4
  899. package/dist/navigation/versions/v1/convertAvailability.d.ts.map +0 -1
  900. package/dist/navigation/versions/v1/convertAvailability.js +0 -31
  901. package/dist/navigation/versions/v1/convertAvailability.js.map +0 -1
  902. package/dist/navigation/versions/v1/converters/ApiReferenceNavigationConverter.d.ts +0 -30
  903. package/dist/navigation/versions/v1/converters/ApiReferenceNavigationConverter.d.ts.map +0 -1
  904. package/dist/navigation/versions/v1/converters/ApiReferenceNavigationConverter.js +0 -566
  905. package/dist/navigation/versions/v1/converters/ApiReferenceNavigationConverter.js.map +0 -1
  906. package/dist/navigation/versions/v1/converters/ChangelogConverter.d.ts +0 -19
  907. package/dist/navigation/versions/v1/converters/ChangelogConverter.d.ts.map +0 -1
  908. package/dist/navigation/versions/v1/converters/ChangelogConverter.js +0 -147
  909. package/dist/navigation/versions/v1/converters/ChangelogConverter.js.map +0 -1
  910. package/dist/navigation/versions/v1/converters/NavigationConfigConverter.d.ts +0 -22
  911. package/dist/navigation/versions/v1/converters/NavigationConfigConverter.d.ts.map +0 -1
  912. package/dist/navigation/versions/v1/converters/NavigationConfigConverter.js +0 -345
  913. package/dist/navigation/versions/v1/converters/NavigationConfigConverter.js.map +0 -1
  914. package/dist/navigation/versions/v1/converters/NodeIdGenerator.d.ts +0 -6
  915. package/dist/navigation/versions/v1/converters/NodeIdGenerator.d.ts.map +0 -1
  916. package/dist/navigation/versions/v1/converters/NodeIdGenerator.js +0 -23
  917. package/dist/navigation/versions/v1/converters/NodeIdGenerator.js.map +0 -1
  918. package/dist/navigation/versions/v1/converters/SlugGenerator.d.ts +0 -20
  919. package/dist/navigation/versions/v1/converters/SlugGenerator.d.ts.map +0 -1
  920. package/dist/navigation/versions/v1/converters/SlugGenerator.js +0 -132
  921. package/dist/navigation/versions/v1/converters/SlugGenerator.js.map +0 -1
  922. package/dist/navigation/versions/v1/converters/__test__/ApiReferenceNavigationConverter.graphql.test.d.ts +0 -2
  923. package/dist/navigation/versions/v1/converters/__test__/ApiReferenceNavigationConverter.graphql.test.d.ts.map +0 -1
  924. package/dist/navigation/versions/v1/converters/__test__/ApiReferenceNavigationConverter.graphql.test.js +0 -180
  925. package/dist/navigation/versions/v1/converters/__test__/ApiReferenceNavigationConverter.graphql.test.js.map +0 -1
  926. package/dist/navigation/versions/v1/converters/__test__/ApiReferenceNavigationConverter.titleCase.test.d.ts +0 -2
  927. package/dist/navigation/versions/v1/converters/__test__/ApiReferenceNavigationConverter.titleCase.test.d.ts.map +0 -1
  928. package/dist/navigation/versions/v1/converters/__test__/ApiReferenceNavigationConverter.titleCase.test.js +0 -115
  929. package/dist/navigation/versions/v1/converters/__test__/ApiReferenceNavigationConverter.titleCase.test.js.map +0 -1
  930. package/dist/navigation/versions/v1/converters/__test__/SlugGenerator.test.d.ts +0 -2
  931. package/dist/navigation/versions/v1/converters/__test__/SlugGenerator.test.d.ts.map +0 -1
  932. package/dist/navigation/versions/v1/converters/__test__/SlugGenerator.test.js +0 -126
  933. package/dist/navigation/versions/v1/converters/__test__/SlugGenerator.test.js.map +0 -1
  934. package/dist/navigation/versions/v1/converters/__test__/getFullSlugFromFrontmatter.test.d.ts +0 -2
  935. package/dist/navigation/versions/v1/converters/__test__/getFullSlugFromFrontmatter.test.d.ts.map +0 -1
  936. package/dist/navigation/versions/v1/converters/__test__/getFullSlugFromFrontmatter.test.js +0 -42
  937. package/dist/navigation/versions/v1/converters/__test__/getFullSlugFromFrontmatter.test.js.map +0 -1
  938. package/dist/navigation/versions/v1/converters/__test__/getNoIndexFromFrontmatter.test.d.ts +0 -2
  939. package/dist/navigation/versions/v1/converters/__test__/getNoIndexFromFrontmatter.test.d.ts.map +0 -1
  940. package/dist/navigation/versions/v1/converters/__test__/getNoIndexFromFrontmatter.test.js +0 -44
  941. package/dist/navigation/versions/v1/converters/__test__/getNoIndexFromFrontmatter.test.js.map +0 -1
  942. package/dist/navigation/versions/v1/converters/__test__/groupByTime.test.d.ts +0 -2
  943. package/dist/navigation/versions/v1/converters/__test__/groupByTime.test.d.ts.map +0 -1
  944. package/dist/navigation/versions/v1/converters/__test__/groupByTime.test.js +0 -103
  945. package/dist/navigation/versions/v1/converters/__test__/groupByTime.test.js.map +0 -1
  946. package/dist/navigation/versions/v1/converters/__test__/pruneVersionNode.test.d.ts +0 -2
  947. package/dist/navigation/versions/v1/converters/__test__/pruneVersionNode.test.d.ts.map +0 -1
  948. package/dist/navigation/versions/v1/converters/__test__/pruneVersionNode.test.js +0 -10
  949. package/dist/navigation/versions/v1/converters/__test__/pruneVersionNode.test.js.map +0 -1
  950. package/dist/navigation/versions/v1/converters/getFullSlugFromFrontmatter.d.ts +0 -7
  951. package/dist/navigation/versions/v1/converters/getFullSlugFromFrontmatter.d.ts.map +0 -1
  952. package/dist/navigation/versions/v1/converters/getFullSlugFromFrontmatter.js +0 -13
  953. package/dist/navigation/versions/v1/converters/getFullSlugFromFrontmatter.js.map +0 -1
  954. package/dist/navigation/versions/v1/converters/toRootNode.d.ts +0 -4
  955. package/dist/navigation/versions/v1/converters/toRootNode.d.ts.map +0 -1
  956. package/dist/navigation/versions/v1/converters/toRootNode.js +0 -93
  957. package/dist/navigation/versions/v1/converters/toRootNode.js.map +0 -1
  958. package/dist/navigation/versions/v1/followRedirect.d.ts +0 -4
  959. package/dist/navigation/versions/v1/followRedirect.d.ts.map +0 -1
  960. package/dist/navigation/versions/v1/followRedirect.js +0 -55
  961. package/dist/navigation/versions/v1/followRedirect.js.map +0 -1
  962. package/dist/navigation/versions/v1/getChildren.d.ts +0 -3
  963. package/dist/navigation/versions/v1/getChildren.d.ts.map +0 -1
  964. package/dist/navigation/versions/v1/getChildren.js +0 -39
  965. package/dist/navigation/versions/v1/getChildren.js.map +0 -1
  966. package/dist/navigation/versions/v1/getPageId.d.ts +0 -3
  967. package/dist/navigation/versions/v1/getPageId.d.ts.map +0 -1
  968. package/dist/navigation/versions/v1/getPageId.js +0 -24
  969. package/dist/navigation/versions/v1/getPageId.js.map +0 -1
  970. package/dist/navigation/versions/v1/index.d.ts +0 -24
  971. package/dist/navigation/versions/v1/index.d.ts.map +0 -1
  972. package/dist/navigation/versions/v1/index.js +0 -24
  973. package/dist/navigation/versions/v1/index.js.map +0 -1
  974. package/dist/navigation/versions/v1/slugjoin.d.ts +0 -3
  975. package/dist/navigation/versions/v1/slugjoin.d.ts.map +0 -1
  976. package/dist/navigation/versions/v1/slugjoin.js +0 -10
  977. package/dist/navigation/versions/v1/slugjoin.js.map +0 -1
  978. package/dist/navigation/versions/v1/toDefaultSlug.d.ts +0 -9
  979. package/dist/navigation/versions/v1/toDefaultSlug.d.ts.map +0 -1
  980. package/dist/navigation/versions/v1/toDefaultSlug.js +0 -12
  981. package/dist/navigation/versions/v1/toDefaultSlug.js.map +0 -1
  982. package/dist/navigation/versions/v1/traverseDF.d.ts +0 -4
  983. package/dist/navigation/versions/v1/traverseDF.d.ts.map +0 -1
  984. package/dist/navigation/versions/v1/traverseDF.js +0 -6
  985. package/dist/navigation/versions/v1/traverseDF.js.map +0 -1
  986. package/dist/orpc-client/api/client.d.ts +0 -59
  987. package/dist/orpc-client/api/client.d.ts.map +0 -1
  988. package/dist/orpc-client/api/client.js +0 -103
  989. package/dist/orpc-client/api/client.js.map +0 -1
  990. package/dist/orpc-client/api/contract-db.d.ts +0 -75043
  991. package/dist/orpc-client/api/contract-db.d.ts.map +0 -1
  992. package/dist/orpc-client/api/contract-db.js +0 -84
  993. package/dist/orpc-client/api/contract-db.js.map +0 -1
  994. package/dist/orpc-client/api/contract-latest.d.ts +0 -6523
  995. package/dist/orpc-client/api/contract-latest.d.ts.map +0 -1
  996. package/dist/orpc-client/api/contract-latest.js +0 -483
  997. package/dist/orpc-client/api/contract-latest.js.map +0 -1
  998. package/dist/orpc-client/api/contract-read.d.ts +0 -90206
  999. package/dist/orpc-client/api/contract-read.d.ts.map +0 -1
  1000. package/dist/orpc-client/api/contract-read.js +0 -262
  1001. package/dist/orpc-client/api/contract-read.js.map +0 -1
  1002. package/dist/orpc-client/api/contract-register.d.ts +0 -76878
  1003. package/dist/orpc-client/api/contract-register.d.ts.map +0 -1
  1004. package/dist/orpc-client/api/contract-register.js +0 -304
  1005. package/dist/orpc-client/api/contract-register.js.map +0 -1
  1006. package/dist/orpc-client/api/index.d.ts +0 -7
  1007. package/dist/orpc-client/api/index.d.ts.map +0 -1
  1008. package/dist/orpc-client/api/index.js +0 -7
  1009. package/dist/orpc-client/api/index.js.map +0 -1
  1010. package/dist/orpc-client/api/shared.d.ts +0 -3249
  1011. package/dist/orpc-client/api/shared.d.ts.map +0 -1
  1012. package/dist/orpc-client/api/shared.js +0 -537
  1013. package/dist/orpc-client/api/shared.js.map +0 -1
  1014. package/dist/orpc-client/client.d.ts +0 -53
  1015. package/dist/orpc-client/client.d.ts.map +0 -1
  1016. package/dist/orpc-client/client.js +0 -51
  1017. package/dist/orpc-client/client.js.map +0 -1
  1018. package/dist/orpc-client/dashboard/client.d.ts +0 -13
  1019. package/dist/orpc-client/dashboard/client.d.ts.map +0 -1
  1020. package/dist/orpc-client/dashboard/client.js +0 -15
  1021. package/dist/orpc-client/dashboard/client.js.map +0 -1
  1022. package/dist/orpc-client/dashboard/contract.d.ts +0 -282
  1023. package/dist/orpc-client/dashboard/contract.d.ts.map +0 -1
  1024. package/dist/orpc-client/dashboard/contract.js +0 -49
  1025. package/dist/orpc-client/dashboard/contract.js.map +0 -1
  1026. package/dist/orpc-client/dashboard/index.d.ts +0 -3
  1027. package/dist/orpc-client/dashboard/index.d.ts.map +0 -1
  1028. package/dist/orpc-client/dashboard/index.js +0 -3
  1029. package/dist/orpc-client/dashboard/index.js.map +0 -1
  1030. package/dist/orpc-client/docs/client.d.ts +0 -27
  1031. package/dist/orpc-client/docs/client.d.ts.map +0 -1
  1032. package/dist/orpc-client/docs/client.js +0 -21
  1033. package/dist/orpc-client/docs/client.js.map +0 -1
  1034. package/dist/orpc-client/docs/index.d.ts +0 -4
  1035. package/dist/orpc-client/docs/index.d.ts.map +0 -1
  1036. package/dist/orpc-client/docs/index.js +0 -4
  1037. package/dist/orpc-client/docs/index.js.map +0 -1
  1038. package/dist/orpc-client/docs/v1/index.d.ts +0 -3
  1039. package/dist/orpc-client/docs/v1/index.d.ts.map +0 -1
  1040. package/dist/orpc-client/docs/v1/index.js +0 -3
  1041. package/dist/orpc-client/docs/v1/index.js.map +0 -1
  1042. package/dist/orpc-client/docs/v1/read/client.d.ts +0 -13
  1043. package/dist/orpc-client/docs/v1/read/client.d.ts.map +0 -1
  1044. package/dist/orpc-client/docs/v1/read/client.js +0 -15
  1045. package/dist/orpc-client/docs/v1/read/client.js.map +0 -1
  1046. package/dist/orpc-client/docs/v1/read/contract.d.ts +0 -19496
  1047. package/dist/orpc-client/docs/v1/read/contract.d.ts.map +0 -1
  1048. package/dist/orpc-client/docs/v1/read/contract.js +0 -21
  1049. package/dist/orpc-client/docs/v1/read/contract.js.map +0 -1
  1050. package/dist/orpc-client/docs/v1/read/index.d.ts +0 -3
  1051. package/dist/orpc-client/docs/v1/read/index.d.ts.map +0 -1
  1052. package/dist/orpc-client/docs/v1/read/index.js +0 -3
  1053. package/dist/orpc-client/docs/v1/read/index.js.map +0 -1
  1054. package/dist/orpc-client/docs/v1/write/client.d.ts +0 -13
  1055. package/dist/orpc-client/docs/v1/write/client.d.ts.map +0 -1
  1056. package/dist/orpc-client/docs/v1/write/client.js +0 -15
  1057. package/dist/orpc-client/docs/v1/write/client.js.map +0 -1
  1058. package/dist/orpc-client/docs/v1/write/contract.d.ts +0 -4905
  1059. package/dist/orpc-client/docs/v1/write/contract.d.ts.map +0 -1
  1060. package/dist/orpc-client/docs/v1/write/contract.js +0 -29
  1061. package/dist/orpc-client/docs/v1/write/contract.js.map +0 -1
  1062. package/dist/orpc-client/docs/v1/write/index.d.ts +0 -3
  1063. package/dist/orpc-client/docs/v1/write/index.d.ts.map +0 -1
  1064. package/dist/orpc-client/docs/v1/write/index.js +0 -3
  1065. package/dist/orpc-client/docs/v1/write/index.js.map +0 -1
  1066. package/dist/orpc-client/docs/v2/index.d.ts +0 -5
  1067. package/dist/orpc-client/docs/v2/index.d.ts.map +0 -1
  1068. package/dist/orpc-client/docs/v2/index.js +0 -5
  1069. package/dist/orpc-client/docs/v2/index.js.map +0 -1
  1070. package/dist/orpc-client/docs/v2/library-docs/__test__/contract.test.d.ts +0 -2
  1071. package/dist/orpc-client/docs/v2/library-docs/__test__/contract.test.d.ts.map +0 -1
  1072. package/dist/orpc-client/docs/v2/library-docs/__test__/contract.test.js +0 -49
  1073. package/dist/orpc-client/docs/v2/library-docs/__test__/contract.test.js.map +0 -1
  1074. package/dist/orpc-client/docs/v2/library-docs/client.d.ts +0 -13
  1075. package/dist/orpc-client/docs/v2/library-docs/client.d.ts.map +0 -1
  1076. package/dist/orpc-client/docs/v2/library-docs/client.js +0 -15
  1077. package/dist/orpc-client/docs/v2/library-docs/client.js.map +0 -1
  1078. package/dist/orpc-client/docs/v2/library-docs/contract.d.ts +0 -361
  1079. package/dist/orpc-client/docs/v2/library-docs/contract.d.ts.map +0 -1
  1080. package/dist/orpc-client/docs/v2/library-docs/contract.js +0 -106
  1081. package/dist/orpc-client/docs/v2/library-docs/contract.js.map +0 -1
  1082. package/dist/orpc-client/docs/v2/library-docs/index.d.ts +0 -3
  1083. package/dist/orpc-client/docs/v2/library-docs/index.d.ts.map +0 -1
  1084. package/dist/orpc-client/docs/v2/library-docs/index.js +0 -3
  1085. package/dist/orpc-client/docs/v2/library-docs/index.js.map +0 -1
  1086. package/dist/orpc-client/docs/v2/organization/client.d.ts +0 -13
  1087. package/dist/orpc-client/docs/v2/organization/client.d.ts.map +0 -1
  1088. package/dist/orpc-client/docs/v2/organization/client.js +0 -15
  1089. package/dist/orpc-client/docs/v2/organization/client.js.map +0 -1
  1090. package/dist/orpc-client/docs/v2/organization/contract.d.ts +0 -18
  1091. package/dist/orpc-client/docs/v2/organization/contract.d.ts.map +0 -1
  1092. package/dist/orpc-client/docs/v2/organization/contract.js +0 -12
  1093. package/dist/orpc-client/docs/v2/organization/contract.js.map +0 -1
  1094. package/dist/orpc-client/docs/v2/organization/index.d.ts +0 -3
  1095. package/dist/orpc-client/docs/v2/organization/index.d.ts.map +0 -1
  1096. package/dist/orpc-client/docs/v2/organization/index.js +0 -3
  1097. package/dist/orpc-client/docs/v2/organization/index.js.map +0 -1
  1098. package/dist/orpc-client/docs/v2/read/client.d.ts +0 -13
  1099. package/dist/orpc-client/docs/v2/read/client.d.ts.map +0 -1
  1100. package/dist/orpc-client/docs/v2/read/client.js +0 -15
  1101. package/dist/orpc-client/docs/v2/read/client.js.map +0 -1
  1102. package/dist/orpc-client/docs/v2/read/contract.d.ts +0 -43524
  1103. package/dist/orpc-client/docs/v2/read/contract.d.ts.map +0 -1
  1104. package/dist/orpc-client/docs/v2/read/contract.js +0 -92
  1105. package/dist/orpc-client/docs/v2/read/contract.js.map +0 -1
  1106. package/dist/orpc-client/docs/v2/read/index.d.ts +0 -3
  1107. package/dist/orpc-client/docs/v2/read/index.d.ts.map +0 -1
  1108. package/dist/orpc-client/docs/v2/read/index.js +0 -3
  1109. package/dist/orpc-client/docs/v2/read/index.js.map +0 -1
  1110. package/dist/orpc-client/docs/v2/write/client.d.ts +0 -13
  1111. package/dist/orpc-client/docs/v2/write/client.d.ts.map +0 -1
  1112. package/dist/orpc-client/docs/v2/write/client.js +0 -15
  1113. package/dist/orpc-client/docs/v2/write/client.js.map +0 -1
  1114. package/dist/orpc-client/docs/v2/write/contract.d.ts +0 -10407
  1115. package/dist/orpc-client/docs/v2/write/contract.d.ts.map +0 -1
  1116. package/dist/orpc-client/docs/v2/write/contract.js +0 -163
  1117. package/dist/orpc-client/docs/v2/write/contract.js.map +0 -1
  1118. package/dist/orpc-client/docs/v2/write/index.d.ts +0 -3
  1119. package/dist/orpc-client/docs/v2/write/index.d.ts.map +0 -1
  1120. package/dist/orpc-client/docs/v2/write/index.js +0 -3
  1121. package/dist/orpc-client/docs/v2/write/index.js.map +0 -1
  1122. package/dist/orpc-client/docs-cache/client.d.ts +0 -13
  1123. package/dist/orpc-client/docs-cache/client.d.ts.map +0 -1
  1124. package/dist/orpc-client/docs-cache/client.js +0 -15
  1125. package/dist/orpc-client/docs-cache/client.js.map +0 -1
  1126. package/dist/orpc-client/docs-cache/contract.d.ts +0 -19
  1127. package/dist/orpc-client/docs-cache/contract.d.ts.map +0 -1
  1128. package/dist/orpc-client/docs-cache/contract.js +0 -12
  1129. package/dist/orpc-client/docs-cache/contract.js.map +0 -1
  1130. package/dist/orpc-client/docs-cache/index.d.ts +0 -3
  1131. package/dist/orpc-client/docs-cache/index.d.ts.map +0 -1
  1132. package/dist/orpc-client/docs-cache/index.js +0 -3
  1133. package/dist/orpc-client/docs-cache/index.js.map +0 -1
  1134. package/dist/orpc-client/docs-deployment/client.d.ts +0 -13
  1135. package/dist/orpc-client/docs-deployment/client.d.ts.map +0 -1
  1136. package/dist/orpc-client/docs-deployment/client.js +0 -15
  1137. package/dist/orpc-client/docs-deployment/client.js.map +0 -1
  1138. package/dist/orpc-client/docs-deployment/contract.d.ts +0 -988
  1139. package/dist/orpc-client/docs-deployment/contract.d.ts.map +0 -1
  1140. package/dist/orpc-client/docs-deployment/contract.js +0 -215
  1141. package/dist/orpc-client/docs-deployment/contract.js.map +0 -1
  1142. package/dist/orpc-client/docs-deployment/index.d.ts +0 -3
  1143. package/dist/orpc-client/docs-deployment/index.d.ts.map +0 -1
  1144. package/dist/orpc-client/docs-deployment/index.js +0 -3
  1145. package/dist/orpc-client/docs-deployment/index.js.map +0 -1
  1146. package/dist/orpc-client/docs-ledger/__test__/contract.test.d.ts +0 -2
  1147. package/dist/orpc-client/docs-ledger/__test__/contract.test.d.ts.map +0 -1
  1148. package/dist/orpc-client/docs-ledger/__test__/contract.test.js +0 -64
  1149. package/dist/orpc-client/docs-ledger/__test__/contract.test.js.map +0 -1
  1150. package/dist/orpc-client/docs-ledger/client.d.ts +0 -13
  1151. package/dist/orpc-client/docs-ledger/client.d.ts.map +0 -1
  1152. package/dist/orpc-client/docs-ledger/client.js +0 -16
  1153. package/dist/orpc-client/docs-ledger/client.js.map +0 -1
  1154. package/dist/orpc-client/docs-ledger/config-files.d.ts +0 -16
  1155. package/dist/orpc-client/docs-ledger/config-files.d.ts.map +0 -1
  1156. package/dist/orpc-client/docs-ledger/config-files.js +0 -130
  1157. package/dist/orpc-client/docs-ledger/config-files.js.map +0 -1
  1158. package/dist/orpc-client/docs-ledger/contract.d.ts +0 -92817
  1159. package/dist/orpc-client/docs-ledger/contract.d.ts.map +0 -1
  1160. package/dist/orpc-client/docs-ledger/contract.js +0 -1097
  1161. package/dist/orpc-client/docs-ledger/contract.js.map +0 -1
  1162. package/dist/orpc-client/docs-ledger/index.d.ts +0 -6
  1163. package/dist/orpc-client/docs-ledger/index.d.ts.map +0 -1
  1164. package/dist/orpc-client/docs-ledger/index.js +0 -6
  1165. package/dist/orpc-client/docs-ledger/index.js.map +0 -1
  1166. package/dist/orpc-client/docs-ledger/ledger-manifest.d.ts +0 -40360
  1167. package/dist/orpc-client/docs-ledger/ledger-manifest.d.ts.map +0 -1
  1168. package/dist/orpc-client/docs-ledger/ledger-manifest.js +0 -309
  1169. package/dist/orpc-client/docs-ledger/ledger-manifest.js.map +0 -1
  1170. package/dist/orpc-client/docs-ledger/stable-stringify.d.ts +0 -18
  1171. package/dist/orpc-client/docs-ledger/stable-stringify.d.ts.map +0 -1
  1172. package/dist/orpc-client/docs-ledger/stable-stringify.js +0 -25
  1173. package/dist/orpc-client/docs-ledger/stable-stringify.js.map +0 -1
  1174. package/dist/orpc-client/editor-snapshot/client.d.ts +0 -13
  1175. package/dist/orpc-client/editor-snapshot/client.d.ts.map +0 -1
  1176. package/dist/orpc-client/editor-snapshot/client.js +0 -15
  1177. package/dist/orpc-client/editor-snapshot/client.js.map +0 -1
  1178. package/dist/orpc-client/editor-snapshot/contract.d.ts +0 -207
  1179. package/dist/orpc-client/editor-snapshot/contract.d.ts.map +0 -1
  1180. package/dist/orpc-client/editor-snapshot/contract.js +0 -42
  1181. package/dist/orpc-client/editor-snapshot/contract.js.map +0 -1
  1182. package/dist/orpc-client/editor-snapshot/index.d.ts +0 -3
  1183. package/dist/orpc-client/editor-snapshot/index.d.ts.map +0 -1
  1184. package/dist/orpc-client/editor-snapshot/index.js +0 -3
  1185. package/dist/orpc-client/editor-snapshot/index.js.map +0 -1
  1186. package/dist/orpc-client/files/contract.d.ts +0 -142
  1187. package/dist/orpc-client/files/contract.d.ts.map +0 -1
  1188. package/dist/orpc-client/files/contract.js +0 -60
  1189. package/dist/orpc-client/files/contract.js.map +0 -1
  1190. package/dist/orpc-client/files/index.d.ts +0 -2
  1191. package/dist/orpc-client/files/index.d.ts.map +0 -1
  1192. package/dist/orpc-client/files/index.js +0 -2
  1193. package/dist/orpc-client/files/index.js.map +0 -1
  1194. package/dist/orpc-client/generators/cli/client.d.ts +0 -13
  1195. package/dist/orpc-client/generators/cli/client.d.ts.map +0 -1
  1196. package/dist/orpc-client/generators/cli/client.js +0 -15
  1197. package/dist/orpc-client/generators/cli/client.js.map +0 -1
  1198. package/dist/orpc-client/generators/cli/index.d.ts +0 -2
  1199. package/dist/orpc-client/generators/cli/index.d.ts.map +0 -1
  1200. package/dist/orpc-client/generators/cli/index.js +0 -2
  1201. package/dist/orpc-client/generators/cli/index.js.map +0 -1
  1202. package/dist/orpc-client/generators/client.d.ts +0 -13
  1203. package/dist/orpc-client/generators/client.d.ts.map +0 -1
  1204. package/dist/orpc-client/generators/client.js +0 -15
  1205. package/dist/orpc-client/generators/client.js.map +0 -1
  1206. package/dist/orpc-client/generators/contract.d.ts +0 -3396
  1207. package/dist/orpc-client/generators/contract.d.ts.map +0 -1
  1208. package/dist/orpc-client/generators/contract.js +0 -246
  1209. package/dist/orpc-client/generators/contract.js.map +0 -1
  1210. package/dist/orpc-client/generators/index.d.ts +0 -5
  1211. package/dist/orpc-client/generators/index.d.ts.map +0 -1
  1212. package/dist/orpc-client/generators/index.js +0 -5
  1213. package/dist/orpc-client/generators/index.js.map +0 -1
  1214. package/dist/orpc-client/generators/versions/client.d.ts +0 -13
  1215. package/dist/orpc-client/generators/versions/client.d.ts.map +0 -1
  1216. package/dist/orpc-client/generators/versions/client.js +0 -15
  1217. package/dist/orpc-client/generators/versions/client.js.map +0 -1
  1218. package/dist/orpc-client/generators/versions/index.d.ts +0 -2
  1219. package/dist/orpc-client/generators/versions/index.d.ts.map +0 -1
  1220. package/dist/orpc-client/generators/versions/index.js +0 -2
  1221. package/dist/orpc-client/generators/versions/index.js.map +0 -1
  1222. package/dist/orpc-client/git/client.d.ts +0 -13
  1223. package/dist/orpc-client/git/client.d.ts.map +0 -1
  1224. package/dist/orpc-client/git/client.js +0 -15
  1225. package/dist/orpc-client/git/client.js.map +0 -1
  1226. package/dist/orpc-client/git/contract.d.ts +0 -2914
  1227. package/dist/orpc-client/git/contract.d.ts.map +0 -1
  1228. package/dist/orpc-client/git/contract.js +0 -145
  1229. package/dist/orpc-client/git/contract.js.map +0 -1
  1230. package/dist/orpc-client/git/index.d.ts +0 -3
  1231. package/dist/orpc-client/git/index.d.ts.map +0 -1
  1232. package/dist/orpc-client/git/index.js +0 -3
  1233. package/dist/orpc-client/git/index.js.map +0 -1
  1234. package/dist/orpc-client/index.d.ts +0 -21
  1235. package/dist/orpc-client/index.d.ts.map +0 -1
  1236. package/dist/orpc-client/index.js +0 -21
  1237. package/dist/orpc-client/index.js.map +0 -1
  1238. package/dist/orpc-client/pdf-export/client.d.ts +0 -13
  1239. package/dist/orpc-client/pdf-export/client.d.ts.map +0 -1
  1240. package/dist/orpc-client/pdf-export/client.js +0 -15
  1241. package/dist/orpc-client/pdf-export/client.js.map +0 -1
  1242. package/dist/orpc-client/pdf-export/contract.d.ts +0 -1344
  1243. package/dist/orpc-client/pdf-export/contract.d.ts.map +0 -1
  1244. package/dist/orpc-client/pdf-export/contract.js +0 -104
  1245. package/dist/orpc-client/pdf-export/contract.js.map +0 -1
  1246. package/dist/orpc-client/pdf-export/index.d.ts +0 -3
  1247. package/dist/orpc-client/pdf-export/index.d.ts.map +0 -1
  1248. package/dist/orpc-client/pdf-export/index.js +0 -3
  1249. package/dist/orpc-client/pdf-export/index.js.map +0 -1
  1250. package/dist/orpc-client/sdks/client.d.ts +0 -13
  1251. package/dist/orpc-client/sdks/client.d.ts.map +0 -1
  1252. package/dist/orpc-client/sdks/client.js +0 -15
  1253. package/dist/orpc-client/sdks/client.js.map +0 -1
  1254. package/dist/orpc-client/sdks/contract.d.ts +0 -55
  1255. package/dist/orpc-client/sdks/contract.d.ts.map +0 -1
  1256. package/dist/orpc-client/sdks/contract.js +0 -33
  1257. package/dist/orpc-client/sdks/contract.js.map +0 -1
  1258. package/dist/orpc-client/sdks/index.d.ts +0 -3
  1259. package/dist/orpc-client/sdks/index.d.ts.map +0 -1
  1260. package/dist/orpc-client/sdks/index.js +0 -3
  1261. package/dist/orpc-client/sdks/index.js.map +0 -1
  1262. package/dist/orpc-client/shared.d.ts +0 -327
  1263. package/dist/orpc-client/shared.d.ts.map +0 -1
  1264. package/dist/orpc-client/shared.js +0 -140
  1265. package/dist/orpc-client/shared.js.map +0 -1
  1266. package/dist/orpc-client/slugs/client.d.ts +0 -13
  1267. package/dist/orpc-client/slugs/client.d.ts.map +0 -1
  1268. package/dist/orpc-client/slugs/client.js +0 -15
  1269. package/dist/orpc-client/slugs/client.js.map +0 -1
  1270. package/dist/orpc-client/slugs/contract.d.ts +0 -251
  1271. package/dist/orpc-client/slugs/contract.d.ts.map +0 -1
  1272. package/dist/orpc-client/slugs/contract.js +0 -41
  1273. package/dist/orpc-client/slugs/contract.js.map +0 -1
  1274. package/dist/orpc-client/slugs/index.d.ts +0 -3
  1275. package/dist/orpc-client/slugs/index.d.ts.map +0 -1
  1276. package/dist/orpc-client/slugs/index.js +0 -3
  1277. package/dist/orpc-client/slugs/index.js.map +0 -1
  1278. package/dist/orpc-client/snippets/client.d.ts +0 -15
  1279. package/dist/orpc-client/snippets/client.d.ts.map +0 -1
  1280. package/dist/orpc-client/snippets/client.js +0 -26
  1281. package/dist/orpc-client/snippets/client.js.map +0 -1
  1282. package/dist/orpc-client/snippets/contract.d.ts +0 -1680
  1283. package/dist/orpc-client/snippets/contract.d.ts.map +0 -1
  1284. package/dist/orpc-client/snippets/contract.js +0 -98
  1285. package/dist/orpc-client/snippets/contract.js.map +0 -1
  1286. package/dist/orpc-client/snippets/index.d.ts +0 -3
  1287. package/dist/orpc-client/snippets/index.d.ts.map +0 -1
  1288. package/dist/orpc-client/snippets/index.js +0 -3
  1289. package/dist/orpc-client/snippets/index.js.map +0 -1
  1290. package/dist/orpc-client/templates/client.d.ts +0 -13
  1291. package/dist/orpc-client/templates/client.d.ts.map +0 -1
  1292. package/dist/orpc-client/templates/client.js +0 -16
  1293. package/dist/orpc-client/templates/client.js.map +0 -1
  1294. package/dist/orpc-client/templates/contract.d.ts +0 -1601
  1295. package/dist/orpc-client/templates/contract.d.ts.map +0 -1
  1296. package/dist/orpc-client/templates/contract.js +0 -52
  1297. package/dist/orpc-client/templates/contract.js.map +0 -1
  1298. package/dist/orpc-client/templates/index.d.ts +0 -3
  1299. package/dist/orpc-client/templates/index.d.ts.map +0 -1
  1300. package/dist/orpc-client/templates/index.js +0 -3
  1301. package/dist/orpc-client/templates/index.js.map +0 -1
  1302. package/dist/orpc-client/themes/contract.d.ts +0 -111
  1303. package/dist/orpc-client/themes/contract.d.ts.map +0 -1
  1304. package/dist/orpc-client/themes/contract.js +0 -66
  1305. package/dist/orpc-client/themes/contract.js.map +0 -1
  1306. package/dist/orpc-client/themes/index.d.ts +0 -2
  1307. package/dist/orpc-client/themes/index.d.ts.map +0 -1
  1308. package/dist/orpc-client/themes/index.js +0 -2
  1309. package/dist/orpc-client/themes/index.js.map +0 -1
  1310. package/dist/orpc-client/tokens/client.d.ts +0 -13
  1311. package/dist/orpc-client/tokens/client.d.ts.map +0 -1
  1312. package/dist/orpc-client/tokens/client.js +0 -15
  1313. package/dist/orpc-client/tokens/client.js.map +0 -1
  1314. package/dist/orpc-client/tokens/contract.d.ts +0 -66
  1315. package/dist/orpc-client/tokens/contract.d.ts.map +0 -1
  1316. package/dist/orpc-client/tokens/contract.js +0 -25
  1317. package/dist/orpc-client/tokens/contract.js.map +0 -1
  1318. package/dist/orpc-client/tokens/index.d.ts +0 -3
  1319. package/dist/orpc-client/tokens/index.d.ts.map +0 -1
  1320. package/dist/orpc-client/tokens/index.js +0 -3
  1321. package/dist/orpc-client/tokens/index.js.map +0 -1
  1322. package/dist/utils/obfuscate-secret.d.ts +0 -2
  1323. package/dist/utils/obfuscate-secret.d.ts.map +0 -1
  1324. package/dist/utils/obfuscate-secret.js +0 -10
  1325. package/dist/utils/obfuscate-secret.js.map +0 -1
  1326. package/dist/utils/traversers/__test__/bfs.test.d.ts +0 -2
  1327. package/dist/utils/traversers/__test__/bfs.test.d.ts.map +0 -1
  1328. package/dist/utils/traversers/__test__/bfs.test.js +0 -51
  1329. package/dist/utils/traversers/__test__/bfs.test.js.map +0 -1
  1330. package/dist/utils/traversers/__test__/dfs.test.d.ts +0 -2
  1331. package/dist/utils/traversers/__test__/dfs.test.d.ts.map +0 -1
  1332. package/dist/utils/traversers/__test__/dfs.test.js +0 -51
  1333. package/dist/utils/traversers/__test__/dfs.test.js.map +0 -1
  1334. package/dist/utils/traversers/__test__/fixture.d.ts +0 -6
  1335. package/dist/utils/traversers/__test__/fixture.d.ts.map +0 -1
  1336. package/dist/utils/traversers/__test__/fixture.js +0 -38
  1337. package/dist/utils/traversers/__test__/fixture.js.map +0 -1
  1338. package/dist/utils/traversers/__test__/prunetree.test.d.ts +0 -2
  1339. package/dist/utils/traversers/__test__/prunetree.test.d.ts.map +0 -1
  1340. package/dist/utils/traversers/__test__/prunetree.test.js +0 -79
  1341. package/dist/utils/traversers/__test__/prunetree.test.js.map +0 -1
  1342. package/dist/utils/traversers/bfs.d.ts +0 -3
  1343. package/dist/utils/traversers/bfs.d.ts.map +0 -1
  1344. package/dist/utils/traversers/bfs.js +0 -23
  1345. package/dist/utils/traversers/bfs.js.map +0 -1
  1346. package/dist/utils/traversers/dfs.d.ts +0 -3
  1347. package/dist/utils/traversers/dfs.d.ts.map +0 -1
  1348. package/dist/utils/traversers/dfs.js +0 -23
  1349. package/dist/utils/traversers/dfs.js.map +0 -1
  1350. package/dist/utils/traversers/index.d.ts +0 -4
  1351. package/dist/utils/traversers/index.d.ts.map +0 -1
  1352. package/dist/utils/traversers/index.js +0 -4
  1353. package/dist/utils/traversers/index.js.map +0 -1
  1354. package/dist/utils/traversers/prunetree.d.ts +0 -26
  1355. package/dist/utils/traversers/prunetree.d.ts.map +0 -1
  1356. package/dist/utils/traversers/prunetree.js +0 -39
  1357. package/dist/utils/traversers/prunetree.js.map +0 -1
  1358. package/dist/utils/traversers/types.d.ts +0 -8
  1359. package/dist/utils/traversers/types.d.ts.map +0 -1
  1360. package/dist/utils/traversers/types.js +0 -4
  1361. package/dist/utils/traversers/types.js.map +0 -1
@@ -1,1904 +0,0 @@
1
- import * as FernNavigation from "./index.js";
2
- /** @internal Exported for testing only. */
3
- export function createBuildContext(basePath) {
4
- // Tracks how many times each id key has been handed out, so collisions get
5
- // a deterministic `-N` suffix. NodeIds only need to be unique within a
6
- // single tree; keying them off content (slug/scope) instead of a running
7
- // counter makes them stable across builds — so client state keyed by
8
- // node.id (e.g. playground form state in localStorage) survives republish
9
- // as long as the node's slug/position is unchanged.
10
- const seen = new Map();
11
- // Nav `fullPath`s are stored relative to the docs root (no basepath);
12
- // FernNavigation slugs include the basepath prefix, so content node slugs
13
- // are joined onto this prefix.
14
- const basePrefix = basePath.replace(/^\/+|\/+$/g, "");
15
- return {
16
- nodeId: (key) => {
17
- const count = seen.get(key) ?? 0;
18
- seen.set(key, count + 1);
19
- return FernNavigation.NodeId(count === 0 ? key : `${key}-${count}`);
20
- },
21
- contentSlug: (relativePath) => {
22
- const clean = relativePath.replace(/^\/+|\/+$/g, "");
23
- return basePrefix === "" ? FernNavigation.Slug(clean) : FernNavigation.slugjoin(basePrefix, clean);
24
- }
25
- };
26
- }
27
- function asSlug(path) {
28
- return FernNavigation.Slug(path.replace(/^\/+|\/+$/g, ""));
29
- }
30
- /**
31
- * Resolve a product/version/tab `metadata.pointsTo` value to a node slug.
32
- *
33
- * `pointsTo` is written basepath-ABSOLUTE: it is a V1 accumulated slug, rooted
34
- * at the deployment basepath (`root.slug`), exactly like the `routes` dict
35
- * keys, the `routing` table, and `versionFirstRoute`. Only sidebar `fullPath`s
36
- * are stored basepath-RELATIVE and re-prefixed via {@link BuildContext.contentSlug}.
37
- *
38
- * Passing `pointsTo` through `contentSlug` would prepend the basepath a SECOND
39
- * time (`docs/runtime/overview` → `docs/docs/runtime/overview`), so the bare
40
- * product/version landing redirect targets a non-existent route and 404s on any
41
- * non-root (`/docs`) site. Treat it as already-absolute — only normalise slashes.
42
- */
43
- function pointsToSlug(metaPointsTo) {
44
- return asSlug(metaPointsTo);
45
- }
46
- /** Read a string field off an unknown metadata blob. */
47
- function metaStr(metadata, key) {
48
- if (metadata != null && typeof metadata === "object" && key in metadata) {
49
- const v = metadata[key];
50
- return typeof v === "string" ? v : undefined;
51
- }
52
- return undefined;
53
- }
54
- function metaBool(metadata, key) {
55
- if (metadata != null && typeof metadata === "object" && key in metadata) {
56
- const v = metadata[key];
57
- return typeof v === "boolean" ? v : undefined;
58
- }
59
- return undefined;
60
- }
61
- function metaNum(metadata, key) {
62
- if (metadata != null && typeof metadata === "object" && key in metadata) {
63
- const v = metadata[key];
64
- return typeof v === "number" ? v : undefined;
65
- }
66
- return undefined;
67
- }
68
- /** Read the `collapsed` field which can be boolean or "open-by-default". */
69
- function metaCollapsed(metadata) {
70
- if (metadata != null && typeof metadata === "object" && "collapsed" in metadata) {
71
- const v = metadata.collapsed;
72
- if (typeof v === "boolean") {
73
- return v;
74
- }
75
- if (v === "open-by-default") {
76
- return "open-by-default";
77
- }
78
- }
79
- return undefined;
80
- }
81
- /** Extract a string array from a metadata blob (e.g. page-level `viewers`). */
82
- function metaStrArr(metadata, key) {
83
- if (metadata != null && typeof metadata === "object" && key in metadata) {
84
- const v = metadata[key];
85
- if (Array.isArray(v)) {
86
- return v.filter((x) => typeof x === "string");
87
- }
88
- }
89
- return undefined;
90
- }
91
- function metaFeatureFlags(metadata) {
92
- if (metadata != null && typeof metadata === "object" && "featureFlags" in metadata) {
93
- const v = metadata.featureFlags;
94
- return Array.isArray(v) && v.length > 0 ? v : undefined;
95
- }
96
- return undefined;
97
- }
98
- /** Map raw viewer role strings to branded RoleIds, or undefined when empty. */
99
- function toViewers(viewers) {
100
- if (viewers == null || viewers.length === 0) {
101
- return undefined;
102
- }
103
- return viewers.map((v) => FernNavigation.RoleId(v));
104
- }
105
- /**
106
- * Merge segment-level viewers with the owning variant's viewers so that
107
- * variant-level RBAC restrictions propagate into section/apiReference/changelog
108
- * nodes. Without this, removing the variant filter from `inScope` would allow
109
- * cross-variant prev/next links to disclose restricted content.
110
- */
111
- function mergeVariantViewers(seg) {
112
- const segViewers = seg.metadata.type === "section" ||
113
- seg.metadata.type === "apiReference" ||
114
- seg.metadata.type === "apiPackage" ||
115
- seg.metadata.type === "changelog"
116
- ? seg.metadata.viewers
117
- : undefined;
118
- const variantViewers = seg.variant?.viewers;
119
- if ((segViewers == null || segViewers.length === 0) && (variantViewers == null || variantViewers.length === 0)) {
120
- return undefined;
121
- }
122
- const merged = new Set();
123
- if (segViewers != null) {
124
- for (const v of segViewers) {
125
- merged.add(v);
126
- }
127
- }
128
- if (variantViewers != null) {
129
- for (const v of variantViewers) {
130
- merged.add(v);
131
- }
132
- }
133
- return merged.size > 0 ? [...merged].map((v) => FernNavigation.RoleId(v)) : undefined;
134
- }
135
- function detailSlug(detail) {
136
- return detail.metadata?.slug ?? "";
137
- }
138
- function detailIsDefault(detail) {
139
- return detail.metadata?.default ?? false;
140
- }
141
- // ── scope grouping ───────────────────────────────────────────────────────
142
- /** Stable identity for a (product, version, variant, tab) scope. */
143
- function scopeKey(seg) {
144
- return [seg.product?.id ?? "", seg.version?.id ?? "", seg.variant?.id ?? "", seg.tab?.id ?? ""].join("|");
145
- }
146
- // ── artifact → node conversion ─────────────────────────────────────────────
147
- function withMetadataDefaults(base) {
148
- const { viewers, featureFlags, ...rest } = base;
149
- return {
150
- ...rest,
151
- canonicalSlug: undefined,
152
- authed: base.authed === true ? true : undefined,
153
- collapsed: undefined,
154
- // Normalise empty arrays to undefined so unrestricted nodes don't add
155
- // filter-level noise; a non-empty array engages the RBAC view gate.
156
- viewers: viewers != null && viewers.length > 0 ? viewers : undefined,
157
- orphaned: base.orphaned === true ? true : undefined,
158
- featureFlags: featureFlags != null && featureFlags.length > 0 ? featureFlags : undefined
159
- };
160
- }
161
- /**
162
- * Convert one sidebar nav artifact into a leaf navigation node. Returns
163
- * undefined for artifacts that don't become standalone sidebar nodes here
164
- * (endpoints live under paginated apiReferences; overview pages are folded
165
- * into their owning section).
166
- */
167
- function artifactToNode(ctx, route) {
168
- const md = route.metadata;
169
- const title = metaStr(md, "title") ?? "";
170
- const icon = metaStr(md, "icon");
171
- const viewers = toViewers(metaStrArr(md, "viewers"));
172
- const slug = ctx.contentSlug(route.fullPath ?? "");
173
- switch (route.type) {
174
- case "markdown": {
175
- // Overview pages are represented on their section, not as a sibling.
176
- if (metaBool(md, "isOverview")) {
177
- return undefined;
178
- }
179
- const pageId = metaStr(md, "pageId") ?? "";
180
- const node = {
181
- type: "page",
182
- ...withMetadataDefaults({
183
- id: ctx.nodeId(`page:${slug}`),
184
- title,
185
- slug,
186
- icon,
187
- hidden: route.hidden,
188
- authed: metaBool(md, "authed"),
189
- viewers,
190
- orphaned: metaBool(md, "orphaned"),
191
- featureFlags: metaFeatureFlags(md)
192
- }),
193
- pageId: FernNavigation.PageId(pageId),
194
- noindex: metaBool(md, "noindex"),
195
- availability: undefined
196
- };
197
- return node;
198
- }
199
- case "link": {
200
- const node = {
201
- type: "link",
202
- id: ctx.nodeId(`link:${metaStr(md, "url") ?? route.fullPath ?? ""}`),
203
- collapsed: undefined,
204
- title,
205
- icon,
206
- url: FernNavigation.Url(metaStr(md, "url") ?? ""),
207
- target: metaStr(md, "target")
208
- };
209
- return node;
210
- }
211
- // API leaf types are handled by apiReferenceNode (which calls
212
- // apiLeafNodeFromNavRouteInternal), not by section-level artifact
213
- // conversion. Returning undefined here prevents them from appearing
214
- // as duplicate siblings alongside the apiReference node.
215
- case "rest":
216
- case "asyncapi":
217
- case "webhook":
218
- case "grpc":
219
- case "graphql":
220
- return undefined;
221
- default:
222
- return undefined;
223
- }
224
- }
225
- /**
226
- * Convert one API-leaf nav route into its navigation node, or undefined when
227
- * the route is not an API leaf carrying the required identifiers.
228
- *
229
- * @internal Exported for the ledger loader's scoped explorer methods.
230
- */
231
- export function apiLeafNodeFromNavRoute(route, basePath, segmentApiDefinitionId) {
232
- const ctx = createBuildContext(basePath);
233
- return apiLeafNodeFromNavRouteInternal(ctx, route, segmentApiDefinitionId);
234
- }
235
- function apiLeafNodeFromNavRouteInternal(ctx, route, segmentApiDefinitionId) {
236
- const md = route.metadata;
237
- const apiDefinitionId = FernNavigation.ApiDefinitionId(metaStr(md, "apiDefinitionId") ?? segmentApiDefinitionId);
238
- const slug = ctx.contentSlug(route.fullPath ?? "");
239
- const title = metaStr(md, "title") ?? "";
240
- const icon = metaStr(md, "icon");
241
- const viewers = toViewers(metaStrArr(md, "viewers"));
242
- const meta = withMetadataDefaults({
243
- id: ctx.nodeId(`api-leaf:${slug}`),
244
- title,
245
- slug,
246
- icon,
247
- hidden: route.hidden,
248
- authed: metaBool(md, "authed"),
249
- viewers,
250
- orphaned: metaBool(md, "orphaned"),
251
- featureFlags: metaFeatureFlags(md)
252
- });
253
- if (route.type === "rest") {
254
- const endpointId = metaStr(md, "endpointId");
255
- const method = metaStr(md, "method");
256
- if (endpointId == null || method == null) {
257
- return undefined;
258
- }
259
- return {
260
- type: "endpoint",
261
- ...meta,
262
- method: method,
263
- endpointId: FernNavigation.EndpointId(endpointId),
264
- apiDefinitionId,
265
- isResponseStream: metaBool(md, "isResponseStream"),
266
- availability: metaStr(md, "availability"),
267
- playground: undefined
268
- };
269
- }
270
- if (route.type === "webhook") {
271
- const webhookId = metaStr(md, "webhookId");
272
- const method = metaStr(md, "method");
273
- if (webhookId == null || method == null) {
274
- return undefined;
275
- }
276
- return {
277
- type: "webhook",
278
- ...meta,
279
- method: method,
280
- webhookId: FernNavigation.WebhookId(webhookId),
281
- apiDefinitionId,
282
- availability: metaStr(md, "availability")
283
- };
284
- }
285
- if (route.type === "asyncapi") {
286
- const webSocketId = metaStr(md, "webSocketId");
287
- if (webSocketId == null) {
288
- return undefined;
289
- }
290
- return {
291
- type: "webSocket",
292
- ...meta,
293
- webSocketId: FernNavigation.WebSocketId(webSocketId),
294
- apiDefinitionId,
295
- availability: metaStr(md, "availability"),
296
- playground: undefined
297
- };
298
- }
299
- if (route.type === "grpc") {
300
- const grpcId = metaStr(md, "grpcId");
301
- const method = metaStr(md, "method");
302
- if (grpcId == null || method == null) {
303
- return undefined;
304
- }
305
- return {
306
- type: "grpc",
307
- ...meta,
308
- method: method,
309
- grpcId: FernNavigation.GrpcId(grpcId),
310
- apiDefinitionId,
311
- availability: metaStr(md, "availability")
312
- };
313
- }
314
- if (route.type === "graphql") {
315
- const graphqlOperationId = metaStr(md, "graphqlOperationId");
316
- const operationType = metaStr(md, "operationType");
317
- if (graphqlOperationId == null || operationType == null) {
318
- return undefined;
319
- }
320
- return {
321
- type: "graphql",
322
- ...meta,
323
- operationType: operationType,
324
- graphqlOperationId: FernNavigation.GraphQlOperationId(graphqlOperationId),
325
- graphqlOperationIds: undefined,
326
- apiDefinitionId,
327
- availability: metaStr(md, "availability"),
328
- playground: undefined
329
- };
330
- }
331
- return undefined;
332
- }
333
- function apiLeafPositionKey(node) {
334
- switch (node.type) {
335
- case "endpoint":
336
- return `endpoint:${node.endpointId}`;
337
- case "webhook":
338
- return `webhook:${node.webhookId}`;
339
- case "webSocket":
340
- return `webSocket:${node.webSocketId}`;
341
- case "grpc":
342
- return `grpc:${node.grpcId}`;
343
- case "graphql":
344
- return `graphql:${node.graphqlOperationId}`;
345
- }
346
- }
347
- function apiChildPositionKey(node) {
348
- switch (node.type) {
349
- case "endpoint":
350
- case "webhook":
351
- case "webSocket":
352
- case "grpc":
353
- case "graphql":
354
- return apiLeafPositionKey(node);
355
- default:
356
- return undefined;
357
- }
358
- }
359
- function positionedApiLeafChildren(ctx, nav, apiDefinitionId) {
360
- const rawLeafNodes = [];
361
- const leafPositions = new Map();
362
- const nonApiLeafNodes = [];
363
- for (let i = 0; i < nav.length; i++) {
364
- const route = nav[i];
365
- const pos = route.displaySortOrder ?? i;
366
- const apiLeaf = apiLeafNodeFromNavRouteInternal(ctx, route, apiDefinitionId);
367
- if (apiLeaf != null) {
368
- rawLeafNodes.push(apiLeaf);
369
- const key = apiLeafPositionKey(apiLeaf);
370
- leafPositions.set(key, Math.min(leafPositions.get(key) ?? pos, pos));
371
- continue;
372
- }
373
- const node = artifactToNode(ctx, route);
374
- if (node?.type === "page" || node?.type === "link") {
375
- nonApiLeafNodes.push({ node, pos });
376
- }
377
- }
378
- const apiLeafNodes = mergeEndpointPairs(ctx, rawLeafNodes, nav);
379
- const positionedApiLeafNodes = apiLeafNodes.map((node, index) => {
380
- if (node.type === "endpointPair") {
381
- const streamPos = leafPositions.get(apiLeafPositionKey(node.stream)) ?? index;
382
- const nonStreamPos = leafPositions.get(apiLeafPositionKey(node.nonStream)) ?? index;
383
- return { node, pos: Math.min(streamPos, nonStreamPos) };
384
- }
385
- const key = apiChildPositionKey(node);
386
- return { node, pos: key != null ? (leafPositions.get(key) ?? index) : index };
387
- });
388
- return [...positionedApiLeafNodes, ...nonApiLeafNodes];
389
- }
390
- /**
391
- * Collect every endpoint/webhook navigation node from a single API segment's
392
- * nav routes. The root builder now populates apiReference children directly,
393
- * but this helper is still used by the ledger loader's per-apiDefinitionId
394
- * explorer methods (getApiLeafNodes) which scope to a single API definition.
395
- *
396
- * @internal Exported for the ledger loader's scoped explorer methods.
397
- */
398
- export function collectApiLeafNodesFromNav(routes, basePath, segmentApiDefinitionId) {
399
- const ctx = createBuildContext(basePath);
400
- return routes
401
- .map((route) => apiLeafNodeFromNavRouteInternal(ctx, route, segmentApiDefinitionId))
402
- .filter((node) => node != null);
403
- }
404
- /** Read the apiDefinitionId off a segment's metadata, or undefined. */
405
- export function segmentApiDefinitionId(metadata) {
406
- switch (metadata.type) {
407
- case "apiReference":
408
- case "apiPackage":
409
- case "changelog":
410
- return metadata.apiDefinitionId;
411
- default:
412
- return undefined;
413
- }
414
- }
415
- /** Find the overview artifact (isOverview) within a segment's nav, if any. */
416
- function overviewRoute(nav) {
417
- return nav.find((r) => r.type === "markdown" && metaBool(r.metadata, "isOverview"));
418
- }
419
- /**
420
- * Find the overview page for a section using the segment's own
421
- * `metadata.overviewPageId` when `overviewRoute` (isOverview flag on nav
422
- * routes) fails. This handles sections where the CLI stored the overview
423
- * reference on the segment metadata but didn't set `isOverview` on the page.
424
- *
425
- * Legacy compat: older CLI versions wrote `overviewPageId` on the segment
426
- * metadata but omitted the `isOverview` flag on the nav route itself. This
427
- * fallback keeps those segments working. Once all published sites have been
428
- * re-published with a CLI that sets `isOverview`, this path can be removed.
429
- */
430
- function overviewRouteFromSegmentMeta(seg, nav) {
431
- const overviewPageId = metaStr(seg.metadata, "overviewPageId");
432
- if (overviewPageId == null) {
433
- return undefined;
434
- }
435
- return nav.find((r) => metaStr(r.metadata, "pageId") === overviewPageId);
436
- }
437
- /**
438
- * Infer the section slug for a root section (`seg.section === ""`) from its
439
- * child pages' fullPaths. When the section path is empty and there is no
440
- * overview page, we look at the first routable page whose content slug
441
- * extends beyond the scope prefix. The first path segment past the scope
442
- * prefix is the section's implicit slug segment (e.g. `overview` in
443
- * `{scope}/overview/introduction`).
444
- *
445
- * Limitations:
446
- * - Assumes the first routable child's path structure matches the section
447
- * slug. Heterogeneous child path prefixes (rare) would infer incorrectly.
448
- * - Sections with only single-segment children (path = `{scope}/pagename`)
449
- * cannot be distinguished from bare pages, so inference falls through to
450
- * the bare scope prefix. This is acceptable — the section effectively
451
- * has no URL-visible slug of its own.
452
- */
453
- function inferSectionSlugFromNav(ctx, nav, scopePrefix) {
454
- const scopeStr = String(scopePrefix);
455
- const prefix = scopeStr !== "" ? scopeStr + "/" : "";
456
- for (const r of nav) {
457
- if (r.fullPath == null) {
458
- continue;
459
- }
460
- if (r.type !== "markdown" && r.type !== "page") {
461
- continue;
462
- }
463
- const contentSlug = String(ctx.contentSlug(r.fullPath));
464
- const rel = prefix !== "" ? (contentSlug.startsWith(prefix) ? contentSlug.slice(prefix.length) : null) : contentSlug;
465
- if (rel == null) {
466
- continue;
467
- }
468
- const parts = rel.split("/");
469
- // Need at least 2 parts (section-slug / page-name) to distinguish
470
- // a section slug from a bare page slug.
471
- if (parts.length >= 2 && parts[0] !== "") {
472
- return FernNavigation.slugjoin(scopePrefix, parts[0]);
473
- }
474
- }
475
- // No child had a multi-segment path past the scope prefix — fall back
476
- // to the caller's default (bare scope prefix).
477
- return undefined;
478
- }
479
- /**
480
- * Derive the slug for a structural section / apiReference node.
481
- *
482
- * When the section has its own routable overview page, that page's `fullPath`
483
- * (basepath-relative) is the canonical slug — re-prefix the basepath via
484
- * {@link BuildContext.contentSlug}. When it does NOT (a pure sidebar grouping
485
- * with no own route), the node still needs a slug for the tree, but
486
- * `seg.section` is only a structural path string (`release-information`,
487
- * `develop-with-the-cli/run-airflow-locally`) that does NOT carry the scope
488
- * prefix.
489
- *
490
- * The fallback MUST be rooted at the enclosing scope (`{basepath}/{product}/
491
- * {version}/…`) rather than just `{basepath}/{section}`. `NodeCollector`'s
492
- * default-version pruning (`pruneVersionNode` → `toDefaultSlug`) walks the
493
- * default version subtree and SKIPS a node — and all its descendants — whose
494
- * slug does not start with the version slug (it assumes such a node was already
495
- * pruned). A structural section slugged `{basepath}/{section}` does not start
496
- * with the version slug, so its child pages (e.g. `…/v-1-42/release-notes`)
497
- * would never be pruned into their clean default-version alias, and the clean
498
- * URL 404s with `page-not-in-nav` on basepath sites. Rooting the structural
499
- * slug at the scope prefix keeps the subtree inside the prune window.
500
- * (ADR-0014 #6.)
501
- */
502
- function structuralNodeSlug(ctx, overviewFullPath, section, scopePrefix) {
503
- if (overviewFullPath != null) {
504
- return ctx.contentSlug(overviewFullPath);
505
- }
506
- // No own route: derive a structural slug rooted at the enclosing scope so it
507
- // stays within the default-version prune window. `scopePrefix` is already
508
- // basepath-absolute (it is the version/product/tab node's slug), so join it
509
- // directly rather than going through `contentSlug` (which would re-prefix
510
- // the basepath).
511
- return section !== "" ? FernNavigation.slugjoin(scopePrefix, section) : scopePrefix;
512
- }
513
- function stripLeadingScopePrefix(section, scopePrefix) {
514
- const prefix = scopePrefix;
515
- if (prefix === "") {
516
- return section;
517
- }
518
- if (section === prefix) {
519
- return "";
520
- }
521
- if (section.startsWith(prefix + "/")) {
522
- return section.slice(prefix.length + 1);
523
- }
524
- return section;
525
- }
526
- /**
527
- * Merge leaf children and section children by their original V1 tree position.
528
- * Leaves carry position via `displaySortOrder` (stored in nav routes), sections
529
- * carry position via `childIndex` in segment metadata. When both have positions,
530
- * we interleave them in ascending order. When positions are absent (old
531
- * deployments without childIndex), falls back to `[...leaves, ...sections]`.
532
- */
533
- function mergeChildrenByPosition(ctx, nav, sectionChildren) {
534
- const leafNodes = [];
535
- for (let i = 0; i < nav.length; i++) {
536
- const route = nav[i];
537
- const node = artifactToNode(ctx, route);
538
- if (node != null) {
539
- leafNodes.push({ node, pos: route.displaySortOrder ?? i });
540
- }
541
- }
542
- const hasChildIndex = sectionChildren.some((s) => s.childIndex != null);
543
- if (!hasChildIndex) {
544
- return [...leafNodes.map((l) => l.node), ...sectionChildren.map((s) => s.node)];
545
- }
546
- const positioned = [...leafNodes];
547
- for (const s of sectionChildren) {
548
- positioned.push({ node: s.node, pos: s.childIndex ?? Number.MAX_SAFE_INTEGER });
549
- }
550
- positioned.sort((a, b) => a.pos - b.pos);
551
- return positioned.map((p) => p.node);
552
- }
553
- function sectionNode(ctx, scoped, sectionChildren, scopePrefix) {
554
- const { seg, nav } = scoped;
555
- const overview = overviewRoute(nav) ?? overviewRouteFromSegmentMeta(seg, nav);
556
- const overviewPageId = overview != null ? metaStr(overview.metadata, "pageId") : undefined;
557
- // Strip the leading scope prefix to prevent double-prefixing when the
558
- // section path already includes the scope (e.g. section="2026-02-09"
559
- // with scopePrefix="2026-02-09" would produce "2026-02-09/2026-02-09").
560
- const relSection = stripLeadingScopePrefix(seg.section, scopePrefix);
561
- let slug = structuralNodeSlug(ctx, overview?.fullPath, relSection, scopePrefix);
562
- // When the section path is empty and there is no overview page, the
563
- // structural slug collapses to the bare scope prefix (the tab slug),
564
- // losing the section segment that v2 derives from the overview page or
565
- // the config's urlSlug. Infer it from child page fullPaths instead.
566
- if (relSection === "" && overview?.fullPath == null) {
567
- slug = inferSectionSlugFromNav(ctx, nav, scopePrefix) ?? slug;
568
- }
569
- const metaPointsTo = metaStr(seg.metadata, "pointsTo");
570
- const defaults = withMetadataDefaults({
571
- id: ctx.nodeId(`section:${slug}`),
572
- title: metaStr(seg.metadata, "title") ?? "",
573
- slug,
574
- icon: metaStr(seg.metadata, "icon"),
575
- hidden: seg.hidden,
576
- authed: metaBool(seg.metadata, "authed"),
577
- viewers: mergeVariantViewers(seg),
578
- orphaned: metaBool(seg.metadata, "orphaned"),
579
- featureFlags: metaFeatureFlags(seg.metadata)
580
- });
581
- return {
582
- type: "section",
583
- ...defaults,
584
- collapsed: metaCollapsed(seg.metadata) ?? defaults.collapsed,
585
- overviewPageId: overviewPageId != null ? FernNavigation.PageId(overviewPageId) : undefined,
586
- noindex: metaBool(overview?.metadata, "noindex") ?? metaBool(seg.metadata, "noindex"),
587
- collapsible: metaBool(seg.metadata, "collapsible") ?? (metaCollapsed(seg.metadata) === true ? true : undefined),
588
- collapsedByDefault: metaBool(seg.metadata, "collapsedByDefault") ?? (metaCollapsed(seg.metadata) === true ? true : undefined),
589
- availability: metaStr(seg.metadata, "availability"),
590
- pointsTo: metaPointsTo != null ? pointsToSlug(metaPointsTo) : undefined,
591
- children: mergeChildrenByPosition(ctx, nav, sectionChildren)
592
- };
593
- }
594
- /**
595
- * Find direct child apiPackage segments of `parentSection`. A direct child has
596
- * `parentSectionPath(seg.section) === parentSection`, or is an orphaned segment
597
- * whose nearest existing ancestor is `parentSection`.
598
- */
599
- function directChildApiPackages(parentSection, scopeSegs) {
600
- const sectionPaths = new Set(scopeSegs.map((s) => s.seg.section));
601
- return scopeSegs
602
- .filter((s) => {
603
- if (metaStr(s.seg.metadata, "type") !== "apiPackage") {
604
- return false;
605
- }
606
- const parent = parentSectionPath(s.seg.section);
607
- if (parent === parentSection) {
608
- return true;
609
- }
610
- // Orphaned: parent doesn't exist, adopt if nearest ancestor is parentSection.
611
- if (!sectionPaths.has(parent)) {
612
- return nearestExistingAncestor(s.seg.section, sectionPaths) === parentSection;
613
- }
614
- return false;
615
- })
616
- .sort((a, b) => a.seg.sortOrder - b.seg.sortOrder);
617
- }
618
- /**
619
- * Build the children of an API section (apiReference or apiPackage) by combining
620
- * the segment's own leaf nodes with nested apiPackage children.
621
- */
622
- function buildApiChildren(ctx, scoped, scopeSegs, apiDefinitionId, scopePrefix) {
623
- const { seg, nav } = scoped;
624
- // Build leaf nodes from this segment's own nav routes (not descendants).
625
- // API references can contain normal docs pages and links in addition to
626
- // endpoint leaves, so include markdown/link artifacts here instead of only
627
- // API leaf types.
628
- const leafNodes = positionedApiLeafChildren(ctx, nav, apiDefinitionId);
629
- // Build nested ApiPackageNodes from direct child apiPackage segments.
630
- const childPackages = directChildApiPackages(seg.section, scopeSegs);
631
- const packageNodes = childPackages.map((child) => ({
632
- node: apiPackageChildNode(ctx, child, scopeSegs, apiDefinitionId, scopePrefix),
633
- childIndex: metaNum(child.seg.metadata, "childIndex")
634
- }));
635
- // Interleave by position when childIndex metadata is available
636
- const hasChildIndex = packageNodes.some((p) => p.childIndex != null);
637
- if (!hasChildIndex) {
638
- return [...leafNodes, ...packageNodes.map((p) => ({ node: p.node, pos: Number.MAX_SAFE_INTEGER }))]
639
- .sort((a, b) => a.pos - b.pos)
640
- .map((p) => p.node);
641
- }
642
- const positioned = [];
643
- positioned.push(...leafNodes);
644
- for (const p of packageNodes) {
645
- positioned.push({ node: p.node, pos: p.childIndex ?? Number.MAX_SAFE_INTEGER });
646
- }
647
- positioned.sort((a, b) => a.pos - b.pos);
648
- return positioned.map((p) => p.node);
649
- }
650
- /**
651
- * Build an ApiPackageNode from an apiPackage segment, recursively nesting any
652
- * deeper sub-packages.
653
- */
654
- function apiPackageChildNode(ctx, scoped, scopeSegs, parentApiDefinitionId, scopePrefix) {
655
- const { seg, nav } = scoped;
656
- const overview = overviewRoute(nav);
657
- const overviewPageId = overview != null ? metaStr(overview.metadata, "pageId") : undefined;
658
- const apiDefinitionId = metaStr(seg.metadata, "apiDefinitionId") ?? parentApiDefinitionId;
659
- // Use structuralNodeSlug so the package gets its own slug (matching V2)
660
- // rather than inheriting the first endpoint's path.
661
- const slug = structuralNodeSlug(ctx, overview?.fullPath, stripLeadingScopePrefix(seg.section, scopePrefix), scopePrefix);
662
- const metaPointsTo = metaStr(seg.metadata, "pointsTo");
663
- const children = buildApiChildren(ctx, scoped, scopeSegs, apiDefinitionId, scopePrefix);
664
- return {
665
- type: "apiPackage",
666
- ...withMetadataDefaults({
667
- id: ctx.nodeId(`api-pkg:${slug}`),
668
- title: metaStr(seg.metadata, "title") ?? "",
669
- slug,
670
- icon: metaStr(seg.metadata, "icon"),
671
- hidden: seg.hidden,
672
- authed: metaBool(seg.metadata, "authed"),
673
- viewers: toViewers(metaStrArr(seg.metadata, "viewers")),
674
- orphaned: metaBool(seg.metadata, "orphaned"),
675
- featureFlags: metaFeatureFlags(seg.metadata)
676
- }),
677
- apiDefinitionId: FernNavigation.ApiDefinitionId(apiDefinitionId),
678
- availability: metaStr(seg.metadata, "availability"),
679
- overviewPageId: overviewPageId != null ? FernNavigation.PageId(overviewPageId) : undefined,
680
- noindex: metaBool(overview?.metadata, "noindex") ?? metaBool(seg.metadata, "noindex"),
681
- pointsTo: metaPointsTo != null ? pointsToSlug(metaPointsTo) : undefined,
682
- children,
683
- playground: undefined
684
- };
685
- }
686
- /**
687
- * Merge endpoint nodes that were originally part of an `endpointPair` in the V1
688
- * tree. The publish transform stamps both artifacts with a shared
689
- * `endpointPairKey` in their route metadata; this function groups endpoints by
690
- * that key and reconstructs `EndpointPairNode`s — matching the v2 nav tree
691
- * structure where stream/non-stream variants share a single page with a toggle.
692
- */
693
- /** @internal Exported for testing only. */
694
- export function mergeEndpointPairs(ctx, leafNodes, allNav) {
695
- // Build a lookup from endpointId → endpointPairKey using route metadata.
696
- // Only REST routes carry `endpointPairKey`.
697
- const endpointIdToPairKey = new Map();
698
- for (const route of allNav) {
699
- if (route.type !== "rest") {
700
- continue;
701
- }
702
- const pairKey = metaStr(route.metadata, "endpointPairKey");
703
- const endpointId = metaStr(route.metadata, "endpointId");
704
- if (pairKey != null && endpointId != null) {
705
- endpointIdToPairKey.set(endpointId, pairKey);
706
- }
707
- }
708
- // If no pair keys exist (pre-existing data without the key), return as-is.
709
- if (endpointIdToPairKey.size === 0) {
710
- return leafNodes;
711
- }
712
- const result = [];
713
- // Track which pair keys we've already merged so we only emit the pair once.
714
- const mergedPairKeys = new Map();
715
- for (const node of leafNodes) {
716
- if (node.type !== "endpoint") {
717
- result.push(node);
718
- continue;
719
- }
720
- const pairKey = endpointIdToPairKey.get(String(node.endpointId));
721
- if (pairKey == null) {
722
- result.push(node);
723
- continue;
724
- }
725
- const existingIdx = mergedPairKeys.get(pairKey);
726
- if (existingIdx == null) {
727
- // First endpoint of the pair — push it and record its position.
728
- mergedPairKeys.set(pairKey, result.length);
729
- result.push(node);
730
- }
731
- else {
732
- // Second endpoint — merge with the first into an EndpointPairNode.
733
- const first = result[existingIdx];
734
- if (first == null || first.type !== "endpoint") {
735
- result.push(node);
736
- continue;
737
- }
738
- // Determine which is stream and which is non-stream.
739
- const stream = node.isResponseStream ? node : first;
740
- const nonStream = node.isResponseStream ? first : node;
741
- // Point the stream endpoint's canonicalSlug to the non-stream slug
742
- // so the sitemap deduplicates them (matching v2 behavior where the
743
- // v1→latest migrator's title-disambiguation cache achieves the same).
744
- stream.canonicalSlug = nonStream.slug;
745
- const pairNode = {
746
- id: ctx.nodeId(`endpoint-pair:${pairKey}`),
747
- type: "endpointPair",
748
- collapsed: undefined,
749
- stream,
750
- nonStream
751
- };
752
- result[existingIdx] = pairNode;
753
- }
754
- }
755
- return result;
756
- }
757
- function apiReferenceNode(ctx, scoped, scopeSegs, scopePrefix) {
758
- const { seg, nav } = scoped;
759
- const overview = overviewRoute(nav);
760
- const overviewPageId = overview != null ? metaStr(overview.metadata, "pageId") : undefined;
761
- const apiDefinitionId = metaStr(seg.metadata, "apiDefinitionId") ?? "";
762
- // Slug: prefer the overview route, else a structural slug rooted at the
763
- // enclosing scope (so the subtree stays inside the default-version prune
764
- // window — see {@link structuralNodeSlug}).
765
- // NOTE: do NOT fall back to nav[0]?.fullPath here. When the apiReference
766
- // has direct endpoint children (no sub-packages), that would set the
767
- // apiReference's slug to the first endpoint's slug. Then
768
- // mutableUpdatePointsTo clears pointsTo (slug === redirect target),
769
- // breaking the breadcrumb link.
770
- const slug = structuralNodeSlug(ctx, overview?.fullPath, stripLeadingScopePrefix(seg.section, scopePrefix), scopePrefix);
771
- const metaPointsTo = metaStr(seg.metadata, "pointsTo");
772
- const children = buildApiChildren(ctx, scoped, scopeSegs, apiDefinitionId, scopePrefix);
773
- const changelog = attachedApiChangelogNode(ctx, scoped, scopeSegs, apiDefinitionId, scopePrefix);
774
- return {
775
- type: "apiReference",
776
- ...withMetadataDefaults({
777
- id: ctx.nodeId(`api:${slug}`),
778
- title: metaStr(seg.metadata, "title") ?? "",
779
- slug,
780
- icon: metaStr(seg.metadata, "icon"),
781
- hidden: seg.hidden,
782
- authed: metaBool(seg.metadata, "authed"),
783
- viewers: mergeVariantViewers(seg),
784
- orphaned: metaBool(seg.metadata, "orphaned"),
785
- featureFlags: metaFeatureFlags(seg.metadata)
786
- }),
787
- apiDefinitionId: FernNavigation.ApiDefinitionId(apiDefinitionId),
788
- availability: metaStr(seg.metadata, "availability"),
789
- overviewPageId: overviewPageId != null ? FernNavigation.PageId(overviewPageId) : undefined,
790
- noindex: metaBool(overview?.metadata, "noindex") ?? metaBool(seg.metadata, "noindex"),
791
- paginated: true,
792
- showErrors: metaBool(seg.metadata, "showErrors"),
793
- hideTitle: metaBool(seg.metadata, "hideTitle"),
794
- pointsTo: metaPointsTo != null ? pointsToSlug(metaPointsTo) : undefined,
795
- children,
796
- changelog,
797
- playground: undefined,
798
- postmanCollectionUrl: undefined
799
- };
800
- }
801
- function attachedApiChangelogNode(ctx, scoped, scopeSegs, apiDefinitionId, scopePrefix) {
802
- const { seg } = scoped;
803
- const candidates = scopeSegs.filter((candidate) => {
804
- if (metaStr(candidate.seg.metadata, "type") !== "changelog") {
805
- return false;
806
- }
807
- return metaStr(candidate.seg.metadata, "apiDefinitionId") === apiDefinitionId;
808
- });
809
- const changelogSeg = candidates.find((candidate) => parentSectionPath(candidate.seg.section) === seg.section) ?? candidates[0];
810
- return changelogSeg != null ? changelogNode(ctx, changelogSeg, scopePrefix) : undefined;
811
- }
812
- function hasOwningApiReference(scoped, scopeSegs) {
813
- const apiDefinitionId = metaStr(scoped.seg.metadata, "apiDefinitionId");
814
- if (apiDefinitionId == null || metaStr(scoped.seg.metadata, "type") !== "changelog") {
815
- return false;
816
- }
817
- return scopeSegs.some((candidate) => {
818
- if (metaStr(candidate.seg.metadata, "type") !== "apiReference") {
819
- return false;
820
- }
821
- return metaStr(candidate.seg.metadata, "apiDefinitionId") === apiDefinitionId;
822
- });
823
- }
824
- function changelogNode(ctx, scoped, scopePrefix) {
825
- const { seg, nav } = scoped;
826
- const overview = overviewRoute(nav);
827
- const overviewPageId = overview != null ? metaStr(overview.metadata, "pageId") : undefined;
828
- // Group changelog entries by year → month. Entry dates are ISO strings.
829
- const entries = nav.filter((r) => r.type === "changelog");
830
- const byYear = new Map();
831
- for (const r of entries) {
832
- const dateStr = metaStr(r.metadata, "date");
833
- const date = dateStr != null ? new Date(dateStr) : new Date(0);
834
- const year = date.getUTCFullYear();
835
- const month = date.getUTCMonth() + 1;
836
- const entry = {
837
- type: "changelogEntry",
838
- ...withMetadataDefaults({
839
- id: ctx.nodeId(`cl-entry:${r.fullPath ?? metaStr(r.metadata, "pageId") ?? ""}`),
840
- title: metaStr(r.metadata, "title") ?? "",
841
- slug: ctx.contentSlug(r.fullPath ?? ""),
842
- icon: metaStr(r.metadata, "icon"),
843
- hidden: r.hidden,
844
- authed: metaBool(r.metadata, "authed"),
845
- viewers: toViewers(metaStrArr(r.metadata, "viewers")),
846
- orphaned: metaBool(r.metadata, "orphaned"),
847
- featureFlags: metaFeatureFlags(r.metadata)
848
- }),
849
- pageId: FernNavigation.PageId(metaStr(r.metadata, "pageId") ?? ""),
850
- noindex: metaBool(r.metadata, "noindex"),
851
- date: dateStr ?? "",
852
- tags: metaStrArr(r.metadata, "tags")
853
- };
854
- let months = byYear.get(year);
855
- if (months == null) {
856
- months = new Map();
857
- byYear.set(year, months);
858
- }
859
- const arr = months.get(month) ?? [];
860
- arr.push(entry);
861
- months.set(month, arr);
862
- }
863
- // The publish transform stores changelog section paths in two shapes:
864
- // • Changelog TABs: "home/changelog" (scope prefix baked in)
865
- // • Changelog sidebar children: "changelog" (relative to the tab)
866
- // `structuralNodeSlug` unconditionally joins `scopePrefix + section`, so
867
- // an already-scoped section gets double-prefixed ("home/home/changelog").
868
- // Strip the leading scope prefix when present so the join is idempotent.
869
- const relativeSection = stripLeadingScopePrefix(seg.section, scopePrefix);
870
- const baseSlug = structuralNodeSlug(ctx, overview?.fullPath, relativeSection, scopePrefix);
871
- const years = [...byYear.entries()]
872
- .sort((a, b) => b[0] - a[0])
873
- .map(([year, months]) => ({
874
- type: "changelogYear",
875
- ...withMetadataDefaults({
876
- id: ctx.nodeId(`cl-year:${baseSlug}/${year}`),
877
- title: String(year),
878
- slug: asSlug(`${baseSlug}/${year}`),
879
- icon: undefined,
880
- hidden: undefined
881
- }),
882
- year,
883
- children: [...months.entries()]
884
- .sort((a, b) => b[0] - a[0])
885
- .map(([month, children]) => ({
886
- type: "changelogMonth",
887
- ...withMetadataDefaults({
888
- id: ctx.nodeId(`cl-month:${baseSlug}/${year}/${month}`),
889
- title: String(month),
890
- slug: asSlug(`${baseSlug}/${year}/${month}`),
891
- icon: undefined,
892
- hidden: undefined
893
- }),
894
- month,
895
- children
896
- }))
897
- }));
898
- return {
899
- type: "changelog",
900
- ...withMetadataDefaults({
901
- id: ctx.nodeId(`changelog:${baseSlug}`),
902
- title: metaStr(seg.metadata, "title") ?? "",
903
- slug: baseSlug,
904
- icon: metaStr(seg.metadata, "icon"),
905
- hidden: seg.hidden,
906
- authed: metaBool(seg.metadata, "authed"),
907
- viewers: mergeVariantViewers(seg),
908
- orphaned: metaBool(seg.metadata, "orphaned"),
909
- featureFlags: metaFeatureFlags(seg.metadata)
910
- }),
911
- overviewPageId: overviewPageId != null ? FernNavigation.PageId(overviewPageId) : undefined,
912
- noindex: metaBool(overview?.metadata, "noindex") ?? metaBool(seg.metadata, "noindex"),
913
- children: years
914
- };
915
- }
916
- /** The immediate parent section path of a section path ("a/b/c" → "a/b", "a" → ""). */
917
- function parentSectionPath(sectionPath) {
918
- const idx = sectionPath.lastIndexOf("/");
919
- return idx === -1 ? "" : sectionPath.slice(0, idx);
920
- }
921
- /** Walk up the section path hierarchy to find the nearest ancestor that exists in the set. */
922
- function nearestExistingAncestor(sectionPath, existing) {
923
- let current = parentSectionPath(sectionPath);
924
- while (current !== "") {
925
- if (existing.has(current)) {
926
- return current;
927
- }
928
- current = parentSectionPath(current);
929
- }
930
- return "";
931
- }
932
- /**
933
- * Build the section/api/changelog nodes whose immediate parent is `parentPath`,
934
- * recursing into nested sections. Also picks up orphaned segments whose parent
935
- * section doesn't exist but whose nearest existing ancestor is `parentPath`.
936
- */
937
- function buildSectionTree(ctx, scopeSegs, parentPath, scopePrefix, changelogScopePrefix) {
938
- const sectionPaths = new Set(scopeSegs.map((s) => s.seg.section));
939
- const direct = scopeSegs
940
- .filter((s) => {
941
- const sec = s.seg.section;
942
- const type = metaStr(s.seg.metadata, "type");
943
- if (sec === "" || type === "tabRoot") {
944
- return false;
945
- }
946
- if (hasOwningApiReference(s, scopeSegs)) {
947
- return false;
948
- }
949
- const parent = parentSectionPath(sec);
950
- if (parent === parentPath) {
951
- return true;
952
- }
953
- // Orphaned segment: parent doesn't exist, walk up to find nearest
954
- // existing ancestor. If it's parentPath, adopt this segment.
955
- if (!sectionPaths.has(parent)) {
956
- return nearestExistingAncestor(sec, sectionPaths) === parentPath;
957
- }
958
- return false;
959
- })
960
- .sort((a, b) => a.seg.sortOrder - b.seg.sortOrder);
961
- return direct.map((s) => {
962
- const type = metaStr(s.seg.metadata, "type");
963
- const childIndex = metaNum(s.seg.metadata, "childIndex");
964
- let node;
965
- if (type === "apiReference" || type === "apiPackage") {
966
- node = apiReferenceNode(ctx, s, scopeSegs, scopePrefix);
967
- }
968
- else if (type === "changelog") {
969
- node = changelogNode(ctx, s, changelogScopePrefix ?? scopePrefix);
970
- }
971
- else {
972
- // section (or unrecognised) → recurse for nested sections.
973
- node = sectionNode(ctx, s, buildSectionTree(ctx, scopeSegs, s.seg.section, scopePrefix, changelogScopePrefix), scopePrefix);
974
- }
975
- return { node, childIndex };
976
- });
977
- }
978
- // ── build a sidebarRoot for a single scope ─────────────────────────────────
979
- /**
980
- * When multiple root-level sections share the same section path (common for
981
- * versioned docs where all tab-level sections receive the version slug as
982
- * their path), we need to scope buildSectionTree so each section only adopts
983
- * the child segments that physically belong to it.
984
- *
985
- * Ownership is determined by sortOrder ranges: a section owns segments whose
986
- * sortOrder falls between its own and the next sibling section's sortOrder.
987
- * Returns a map only for sections that have duplicates; unique sections won't
988
- * appear (and should pass unfiltered scopeSegs to buildSectionTree).
989
- */
990
- function computeSiblingSortBoundaries(ordered) {
991
- const result = new Map();
992
- // Collect root-level sections grouped by their section path.
993
- const sectionPaths = new Set(ordered.map((s) => s.seg.section));
994
- const rootSections = [];
995
- for (const s of ordered) {
996
- const type = metaStr(s.seg.metadata, "type");
997
- const sec = s.seg.section;
998
- if (type !== "section" || sec === "") {
999
- continue;
1000
- }
1001
- const parent = parentSectionPath(sec);
1002
- const isRootLevel = parent === "" || (!sectionPaths.has(parent) && nearestExistingAncestor(sec, sectionPaths) === "");
1003
- if (isRootLevel) {
1004
- rootSections.push(s);
1005
- }
1006
- }
1007
- // Group by section path — only paths with >1 section need boundaries.
1008
- const byPath = new Map();
1009
- for (const s of rootSections) {
1010
- const group = byPath.get(s.seg.section) ?? [];
1011
- group.push(s);
1012
- byPath.set(s.seg.section, group);
1013
- }
1014
- for (const [, siblings] of byPath) {
1015
- if (siblings.length <= 1) {
1016
- continue;
1017
- }
1018
- // Siblings are already in sortOrder (from `ordered`).
1019
- for (let i = 0; i < siblings.length; i++) {
1020
- const lo = siblings[i].seg.sortOrder;
1021
- const hi = i + 1 < siblings.length ? siblings[i + 1].seg.sortOrder : Number.MAX_SAFE_INTEGER;
1022
- result.set(siblings[i], { lo, hi });
1023
- }
1024
- }
1025
- return result;
1026
- }
1027
- /**
1028
- * Assemble the children of a scope's sidebar root in cross-segment order.
1029
- * `tabRoot` segments contribute their page/link artifacts inline at their
1030
- * sort position; depth-0 `section`/`apiReference`/`changelog` segments become
1031
- * their own nodes (with nested sections attached recursively).
1032
- *
1033
- * Segments whose parent section path doesn't correspond to any existing
1034
- * segment are "orphaned" and emitted at the top level. This happens when
1035
- * the publish transform skips segment creation for an apiReference with no
1036
- * direct artifacts (e.g. no overview page), leaving only apiPackage children
1037
- * like `rest-api/store` with no `rest-api` parent segment.
1038
- */
1039
- function buildSidebarRootChildren(ctx, scopeSegs, scopePrefix, changelogScopePrefix) {
1040
- const ordered = [...scopeSegs].sort((a, b) => a.seg.sortOrder - b.seg.sortOrder);
1041
- const sectionPaths = new Set(ordered.map((s) => s.seg.section));
1042
- // `pos` is the original V1 child position when known — `displaySortOrder`
1043
- // for root-level loose artifacts, `metadata.childIndex` for depth-0
1044
- // segments. Both index into the SAME child list at write time, so they
1045
- // interleave directly (e.g. [page 0, page 1, section 2…15, page 16, 17]).
1046
- const annotated = [];
1047
- // ── Root-section adoption flow ──────────────────────────────────────
1048
- //
1049
- // A scope may contain a "root section" — a segment with type "section"
1050
- // and section path "". When present, it acts as a structural wrapper:
1051
- //
1052
- // hasRootSection = true
1053
- // │
1054
- // ├─ (A) tabRoot / loose artifacts (sec=="", type!="section")
1055
- // │ → emit pages/links inline at their displaySortOrder
1056
- // │
1057
- // ├─ (B) the root section itself (sec=="", type=="section")
1058
- // │ → buildSectionTree adopts ALL depth-0 children as its own
1059
- // │ → emit one sectionNode wrapping the whole subtree
1060
- // │
1061
- // └─ (C) depth-0 sections (parentSectionPath=="")
1062
- // → SKIP — already adopted by (B) via buildSectionTree
1063
- //
1064
- // Without a root section, depth-0 sections are emitted directly.
1065
- const hasRootSection = ordered.some((s) => metaStr(s.seg.metadata, "type") === "section" && s.seg.section === "");
1066
- // ── Sibling section ownership ────────────────────────────────────────
1067
- //
1068
- // Multiple root-level sections can share the same section path (e.g.
1069
- // three sections all with path equal to the version slug). When this
1070
- // happens, buildSectionTree would incorrectly give ALL child subsections
1071
- // to each sibling. We resolve ownership via sortOrder: a section owns
1072
- // segments whose sortOrder falls between its own and the next sibling's.
1073
- const siblingBoundaries = computeSiblingSortBoundaries(ordered);
1074
- for (const s of ordered) {
1075
- const type = metaStr(s.seg.metadata, "type");
1076
- const sec = s.seg.section;
1077
- if (hasOwningApiReference(s, scopeSegs)) {
1078
- continue;
1079
- }
1080
- if (type === "tabRoot" && metaBool(s.seg.metadata, "landingPage") === true) {
1081
- continue;
1082
- }
1083
- // (A) Loose artifacts: tabRoot or non-section segments at section path "".
1084
- if (type === "tabRoot" || (sec === "" && type !== "section")) {
1085
- for (const r of s.nav) {
1086
- const node = artifactToNode(ctx, r);
1087
- if (node != null) {
1088
- annotated.push({ node, pos: r.displaySortOrder ?? undefined, isLeaf: true });
1089
- }
1090
- }
1091
- continue;
1092
- }
1093
- // (B) Root section wrapper — adopts depth-0 children via buildSectionTree.
1094
- if (type === "section" && sec === "") {
1095
- const sectionChildren = buildSectionTree(ctx, scopeSegs, "", scopePrefix);
1096
- const node = sectionNode(ctx, s, sectionChildren, scopePrefix);
1097
- annotated.push({ node, pos: metaNum(s.seg.metadata, "childIndex"), isLeaf: false });
1098
- continue;
1099
- }
1100
- // (C) Depth-0 or orphaned sections — emit at root unless already
1101
- // adopted by a root section (B).
1102
- const parent = parentSectionPath(sec);
1103
- const isRootLevel = parent === "" || (!sectionPaths.has(parent) && nearestExistingAncestor(sec, sectionPaths) === "");
1104
- if (isRootLevel && hasRootSection) {
1105
- continue;
1106
- }
1107
- if (isRootLevel) {
1108
- let node;
1109
- if (type === "apiReference" || type === "apiPackage") {
1110
- node = apiReferenceNode(ctx, s, scopeSegs, scopePrefix);
1111
- }
1112
- else if (type === "changelog") {
1113
- node = changelogNode(ctx, s, changelogScopePrefix ?? scopePrefix);
1114
- }
1115
- else {
1116
- // Scope child segments to this section's sortOrder range when
1117
- // sibling sections share the same path.
1118
- const bounds = siblingBoundaries.get(s);
1119
- const ownedSegs = bounds != null
1120
- ? scopeSegs.filter((seg) => seg.seg.sortOrder >= bounds.lo && seg.seg.sortOrder < bounds.hi)
1121
- : scopeSegs;
1122
- node = sectionNode(ctx, s, buildSectionTree(ctx, ownedSegs, sec, scopePrefix, changelogScopePrefix), scopePrefix);
1123
- }
1124
- // Shared/merged sections (paths not rooted in scopePrefix) must not
1125
- // carry childIndex — their source-version positions would sort them
1126
- // ahead of native sections. Only applies when sibling sections exist
1127
- // (multiple sections sharing same path), indicating a versioned site
1128
- // where shared sections were merged from a sibling version.
1129
- const isSharedSection = siblingBoundaries.size > 0 && scopePrefix !== "" && sec !== "" && !sec.startsWith(scopePrefix);
1130
- annotated.push({
1131
- node,
1132
- pos: isSharedSection ? undefined : metaNum(s.seg.metadata, "childIndex"),
1133
- isLeaf: false
1134
- });
1135
- }
1136
- }
1137
- // Interleave by V1 position only when BOTH leaves and segments carry one.
1138
- // Manifests written before displaySortOrder was carried through have
1139
- // position-less leaves; reordering on childIndex alone would move every
1140
- // loose page behind its sibling sections, so those keep the legacy
1141
- // (segment-sortOrder) order. The seq tiebreak preserves legacy order for
1142
- // equal or missing positions.
1143
- const hasLeafPos = annotated.some((a) => a.isLeaf && a.pos != null);
1144
- const hasSegmentPos = annotated.some((a) => !a.isLeaf && a.pos != null);
1145
- const flat = hasLeafPos && hasSegmentPos
1146
- ? annotated
1147
- .map((a, seq) => ({ ...a, seq }))
1148
- .sort((x, y) => (x.pos ?? Number.MAX_SAFE_INTEGER) - (y.pos ?? Number.MAX_SAFE_INTEGER) || x.seq - y.seq)
1149
- .map((a) => a.node)
1150
- : annotated.map((a) => a.node);
1151
- return groupSidebarRootChildren(ctx, flat);
1152
- }
1153
- /**
1154
- * `SidebarRootChild` only permits SidebarGroupNode / ApiReferenceNode /
1155
- * SectionNode / VariantedNode. Sections, apiReferences, and varianted nodes
1156
- * pass through as direct root children (rendered as static headings via
1157
- * SidebarRootSectionNode / SidebarRootApiPackageNode — always expanded, no
1158
- * toggle). Pages, links, and changelogs are wrapped into a SidebarGroupNode
1159
- * so they render via SidebarNavigationChild (mirroring the V1 tree structure
1160
- * where sections are always direct SidebarRootChildren).
1161
- */
1162
- function groupSidebarRootChildren(ctx, children) {
1163
- const out = [];
1164
- let run = [];
1165
- const flushRun = () => {
1166
- if (run.length > 0) {
1167
- // Key off the first child's (already-stable) id so the group id is
1168
- // stable across builds and unique per run.
1169
- out.push({
1170
- type: "sidebarGroup",
1171
- id: ctx.nodeId(`sidebar-group:${run[0]?.id ?? ""}`),
1172
- collapsed: undefined,
1173
- children: run
1174
- });
1175
- run = [];
1176
- }
1177
- };
1178
- for (const child of children) {
1179
- if (child.type === "apiReference" || child.type === "varianted") {
1180
- flushRun();
1181
- out.push(child);
1182
- }
1183
- else if (child.type === "section" && !child.collapsible) {
1184
- // Match V2 NavigationConfigConverter.groupSidebarRootChildren:
1185
- // all non-collapsible sections become direct SidebarRootChildren
1186
- // (rendered via SidebarRootSectionNode — always-expanded heading).
1187
- // Only sections with explicit `collapsible: true` stay in a
1188
- // sidebarGroup.
1189
- flushRun();
1190
- out.push(child);
1191
- }
1192
- else if (child.type === "changelog") {
1193
- flushRun();
1194
- run.push(child);
1195
- flushRun();
1196
- }
1197
- else {
1198
- run.push(child);
1199
- }
1200
- }
1201
- flushRun();
1202
- return out;
1203
- }
1204
- function buildSidebarRoot(ctx, scopeSegs, scopePrefix, changelogScopePrefix) {
1205
- const first = scopeSegs[0];
1206
- return {
1207
- type: "sidebarRoot",
1208
- id: ctx.nodeId(`sidebar:${first != null ? scopeKey(first.seg) : "root"}`),
1209
- collapsed: undefined,
1210
- children: buildSidebarRootChildren(ctx, scopeSegs, scopePrefix, changelogScopePrefix)
1211
- };
1212
- }
1213
- // ── public entrypoint ───────────────────────────────────────────────────────
1214
- /**
1215
- * Build a full (un-pruned) `RootNode` from the decomposed ledger model.
1216
- */
1217
- export function buildFullRootFromSegments(options) {
1218
- const { basePath, rootSlug: sourceRootSlug, title, segments, navBySegment, skipSharedSectionMerge } = options;
1219
- // Per-call state — never shared across concurrent builds.
1220
- const ctx = createBuildContext(basePath);
1221
- const scoped = segments
1222
- // Infrastructure segments (files/redirects) are filtered server-side,
1223
- // but guard here too.
1224
- .filter((seg) => {
1225
- const t = metaStr(seg.metadata, "type");
1226
- return t !== "files" && t !== "redirects";
1227
- })
1228
- .map((seg) => ({ seg, nav: navBySegment.get(seg.segmentHash) ?? [] }));
1229
- const rootSlug = asSlug(sourceRootSlug ?? basePath);
1230
- // Group by scope identity.
1231
- const scopesByKey = new Map();
1232
- for (const s of scoped) {
1233
- const key = scopeKey(s.seg);
1234
- const arr = scopesByKey.get(key) ?? [];
1235
- arr.push(s);
1236
- scopesByKey.set(key, arr);
1237
- }
1238
- const products = uniqueDetails(scoped, "product");
1239
- const versions = uniqueDetails(scoped, "version");
1240
- const tabs = uniqueDetails(scoped, "tab");
1241
- let child;
1242
- if (products.length > 0) {
1243
- child = buildProductGroup(ctx, products, scoped, rootSlug, skipSharedSectionMerge);
1244
- }
1245
- else if (versions.length > 0) {
1246
- child = buildVersioned(ctx, versions, scoped, rootSlug, undefined, skipSharedSectionMerge);
1247
- }
1248
- else {
1249
- child = buildUnversioned(ctx, scoped, rootSlug, tabs.length > 0);
1250
- }
1251
- // Derive root.pointsTo from the default child's metadata so root-slug
1252
- // visits redirect correctly even when mutableUpdatePointsTo is skipped
1253
- // (structure-only roots). On the full root mutableUpdatePointsTo
1254
- // recomputes this via tree traversal; this seed value is only visible
1255
- // on structure-only roots where the traversal is intentionally skipped.
1256
- let rootPointsTo;
1257
- if (child.type === "productgroup") {
1258
- const defaultProduct = child.children.find((p) => p.default) ?? child.children[0];
1259
- rootPointsTo = defaultProduct?.type === "product" ? defaultProduct.pointsTo : undefined;
1260
- }
1261
- else if (child.type === "versioned") {
1262
- const defaultVersion = child.children.find((v) => v.default) ?? child.children[0];
1263
- rootPointsTo = defaultVersion?.pointsTo;
1264
- }
1265
- else if (child.type === "unversioned") {
1266
- // Unversioned sites have no product/version metadata to seed pointsTo.
1267
- // Derive from the first tab's or first section segment's metadata.
1268
- if (tabs.length > 0) {
1269
- const firstTab = tabs[0];
1270
- const pt = firstTab != null ? metaStr(firstTab.metadata, "pointsTo") : undefined;
1271
- rootPointsTo = pt != null ? pointsToSlug(pt) : undefined;
1272
- }
1273
- else {
1274
- const sorted = [...scoped].sort((a, b) => a.seg.sortOrder - b.seg.sortOrder);
1275
- for (const s of sorted) {
1276
- if (s.seg.hidden) {
1277
- continue;
1278
- }
1279
- const pt = metaStr(s.seg.metadata, "pointsTo");
1280
- if (pt != null) {
1281
- rootPointsTo = pointsToSlug(pt);
1282
- break;
1283
- }
1284
- }
1285
- }
1286
- }
1287
- const root = {
1288
- type: "root",
1289
- version: "v2",
1290
- ...withMetadataDefaults({ id: ctx.nodeId("root"), title, slug: rootSlug, icon: undefined, hidden: undefined }),
1291
- roles: undefined,
1292
- pointsTo: rootPointsTo,
1293
- child
1294
- };
1295
- return root;
1296
- }
1297
- // ── scaffolding builders ────────────────────────────────────────────────────
1298
- /**
1299
- * Collapse segment details by identity.
1300
- *
1301
- * Primary key is the detail's slug when non-empty — this deduplicates
1302
- * stale rows from old publishes that share the same slug but have
1303
- * different DB ids. When the slug is empty (skip-slug items) we fall
1304
- * back to `detail.id` so that distinct skip-slug tabs/products aren't
1305
- * collapsed into a single entry.
1306
- *
1307
- * Tabs always key by `d.id` because skip-slug tabs inherit their
1308
- * parent's slug (e.g. the version slug "v-2"), so multiple distinct
1309
- * tabs share the same slug — keying by slug would collapse them.
1310
- *
1311
- * Among duplicates at the same key we prefer the one whose metadata
1312
- * carries a `pointsTo` value (richer / more recent publish).
1313
- */
1314
- function uniqueDetails(scoped, dim) {
1315
- const byKey = new Map();
1316
- for (const s of scoped) {
1317
- const d = s.seg[dim];
1318
- if (d == null) {
1319
- continue;
1320
- }
1321
- const slug = detailSlug(d);
1322
- // Tabs always key by id: skip-slug tabs share the parent slug
1323
- // (e.g. "v-2") and would otherwise collapse into one entry.
1324
- const key = dim === "tab" ? d.id : slug !== "" ? slug : d.id;
1325
- const existing = byKey.get(key);
1326
- if (existing == null) {
1327
- byKey.set(key, d);
1328
- }
1329
- else if (metaStr(d.metadata, "pointsTo") != null && metaStr(existing.metadata, "pointsTo") == null) {
1330
- byKey.set(key, d);
1331
- }
1332
- }
1333
- return [...byKey.values()].sort((a, b) => a.sortOrder - b.sortOrder);
1334
- }
1335
- function scopeSlugPrefix(rootSlug, ...details) {
1336
- const parts = [rootSlug];
1337
- for (const d of details) {
1338
- if (d != null && !detailIsDefault(d)) {
1339
- const s = detailSlug(d);
1340
- if (s !== "") {
1341
- parts.push(s);
1342
- }
1343
- }
1344
- }
1345
- return FernNavigation.slugjoin(...parts);
1346
- }
1347
- /**
1348
- * Build a VariantedNode from variant details, grouping segments by variant
1349
- * so each variant gets its own scoped sidebar children.
1350
- */
1351
- function buildVariantedNode(ctx, variants, scopeSegs, scopePrefix) {
1352
- const variantChildren = variants.map((variant) => {
1353
- const variantSegs = scopeSegs.filter((s) => s.seg.variant?.id === variant.id);
1354
- // V2 never elides variant slugs — they always appear in the URL
1355
- // (unlike product/version defaults which ARE elided). Use the
1356
- // variant's individual slug directly instead of scopeSlugPrefix
1357
- // which skips default details.
1358
- const variantIndividualSlug = detailSlug(variant);
1359
- const variantSlug = variantIndividualSlug !== ""
1360
- ? asSlug(FernNavigation.slugjoin(scopePrefix, variantIndividualSlug))
1361
- : scopePrefix;
1362
- const metaPointsTo = metaStr(variant.metadata, "pointsTo");
1363
- const children = buildSidebarRootChildren(ctx, variantSegs, scopePrefix);
1364
- return {
1365
- type: "variant",
1366
- ...withMetadataDefaults({
1367
- id: ctx.nodeId(`variant:${variantSlug}`),
1368
- title: variant.displayName,
1369
- slug: variantSlug,
1370
- icon: variant.icon ?? undefined,
1371
- hidden: variant.hidden,
1372
- viewers: toViewers(variant.viewers)
1373
- }),
1374
- default: detailIsDefault(variant),
1375
- variantId: FernNavigation.VariantId(String(variant.id)),
1376
- subtitle: metaStr(variant.metadata, "subtitle") ?? undefined,
1377
- image: metaStr(variant.metadata, "image") != null
1378
- ? FernNavigation.FileId(metaStr(variant.metadata, "image"))
1379
- : undefined,
1380
- pointsTo: metaPointsTo != null ? pointsToSlug(metaPointsTo) : undefined,
1381
- children: children
1382
- };
1383
- });
1384
- return {
1385
- type: "varianted",
1386
- id: ctx.nodeId(`varianted:${scopeSegs[0] != null ? scopeKey(scopeSegs[0].seg) : "root"}`),
1387
- collapsed: undefined,
1388
- children: variantChildren
1389
- };
1390
- }
1391
- /**
1392
- * Build a sidebar root, wrapping content in a VariantedNode when variants exist.
1393
- * Without this, all variant segments merge into one flat sidebar — causing the
1394
- * "double sidebar" where both variants' nav entries render simultaneously.
1395
- */
1396
- function buildSidebarRootWithVariants(ctx, scopeSegs, scopePrefix, changelogScopePrefix) {
1397
- const variants = uniqueDetails(scopeSegs, "variant");
1398
- if (variants.length <= 1) {
1399
- return buildSidebarRoot(ctx, scopeSegs, scopePrefix, changelogScopePrefix);
1400
- }
1401
- const sharedSegs = scopeSegs.filter((s) => s.seg.variant == null);
1402
- const variantedNode = buildVariantedNode(ctx, variants, scopeSegs, scopePrefix);
1403
- const sharedChildren = sharedSegs.length > 0 ? buildSidebarRootChildren(ctx, sharedSegs, scopePrefix, changelogScopePrefix) : [];
1404
- const first = scopeSegs[0];
1405
- return {
1406
- type: "sidebarRoot",
1407
- id: ctx.nodeId(`sidebar:${first != null ? scopeKey(first.seg) : "root"}`),
1408
- collapsed: undefined,
1409
- children: [...sharedChildren, variantedNode]
1410
- };
1411
- }
1412
- function buildTabbedOrSidebar(ctx, scopeSegs, tabsPresent, scopePrefix) {
1413
- if (!tabsPresent) {
1414
- // When no tabs exist but variants do, wrap variant-scoped segments
1415
- // in a VariantedNode and include non-variant segments alongside it.
1416
- const variants = uniqueDetails(scopeSegs, "variant");
1417
- if (variants.length > 1) {
1418
- const sharedSegs = scopeSegs.filter((s) => s.seg.variant == null);
1419
- const variantedNode = buildVariantedNode(ctx, variants, scopeSegs, scopePrefix);
1420
- if (sharedSegs.length > 0) {
1421
- const sharedChildren = buildSidebarRootChildren(ctx, sharedSegs, scopePrefix);
1422
- const first = scopeSegs[0];
1423
- return {
1424
- type: "sidebarRoot",
1425
- id: ctx.nodeId(`sidebar:${first != null ? scopeKey(first.seg) : "root"}`),
1426
- collapsed: undefined,
1427
- children: [...sharedChildren, variantedNode]
1428
- };
1429
- }
1430
- return variantedNode;
1431
- }
1432
- return buildSidebarRoot(ctx, scopeSegs, scopePrefix);
1433
- }
1434
- // Group this scope's segments by tab.
1435
- const tabDetails = uniqueDetails(scopeSegs, "tab");
1436
- const children = tabDetails.map((tab) => {
1437
- const tabType = metaStr(tab.metadata, "tab_type");
1438
- // The tab slug ACCUMULATES the enclosing scope prefix (basepath/product/
1439
- // version) and appends the tab segment, mirroring the canonical V1->V2
1440
- // converter (`SlugGenerator.apply`, which appends the tab onto the
1441
- // version/product slug). Rooting at the empty slug instead would drop
1442
- // the product/version prefix, breaking parity with v2's tab/breadcrumb
1443
- // slugs AND breaking default-version elision: the tab node's slug would
1444
- // not start with the version slug, so `toDefaultSlug` (the prune window)
1445
- // would skip it. Because `scopePrefix` already carries the FULL version
1446
- // segment, `{...}/{version}/{tab}` still starts with the version slug and
1447
- // stays inside the prune window (see {@link structuralNodeSlug}).
1448
- // V2's SlugGenerator.set() treats a tab slug that starts with the
1449
- // version slug as a fullSlug (absolute path) and uses it as-is.
1450
- // Without this check, scopeSlugPrefix joins version + tab producing
1451
- // a doubled prefix (e.g. "2026-02-09/2026-02-09").
1452
- const rawTabSlug = detailSlug(tab);
1453
- const versionDetail = scopeSegs[0]?.seg.version;
1454
- const versionSlugStr = versionDetail != null ? detailSlug(versionDetail) : undefined;
1455
- const tabSlug = versionSlugStr != null &&
1456
- rawTabSlug !== "" &&
1457
- (rawTabSlug === versionSlugStr || rawTabSlug.startsWith(versionSlugStr + "/"))
1458
- ? asSlug(rawTabSlug)
1459
- : asSlug(scopeSlugPrefix(scopePrefix, tab));
1460
- if (tabType === "link") {
1461
- return {
1462
- type: "link",
1463
- id: ctx.nodeId(`link:${metaStr(tab.metadata, "url") ?? tabSlug}`),
1464
- collapsed: undefined,
1465
- title: tab.displayName,
1466
- icon: tab.icon ?? undefined,
1467
- url: FernNavigation.Url(metaStr(tab.metadata, "url") ?? ""),
1468
- target: metaStr(tab.metadata, "target")
1469
- };
1470
- }
1471
- if (tabType === "changelog") {
1472
- const tabSegs = scopeSegs.filter((s) => s.seg.tab?.id === tab.id);
1473
- const changelogSeg = tabSegs.find((s) => metaStr(s.seg.metadata, "type") === "changelog");
1474
- if (changelogSeg != null) {
1475
- // Root the changelog content at the SCOPE prefix (not `tabSlug`).
1476
- // For a changelog tab the tab's own segment IS the changelog
1477
- // section, and `changelogNode` -> `structuralNodeSlug` already
1478
- // appends that section onto the prefix. So passing `scopePrefix`
1479
- // yields `{...}/{changelog}` — the same accumulated slug as
1480
- // `tabSlug` (and as v2). Passing `tabSlug` here would append the
1481
- // changelog segment twice (`{...}/changelog/changelog`).
1482
- return changelogNode(ctx, changelogSeg, scopePrefix);
1483
- }
1484
- // Fallback: empty changelog node for the tab
1485
- return {
1486
- type: "changelog",
1487
- ...withMetadataDefaults({
1488
- id: ctx.nodeId(`changelog:${tabSlug}`),
1489
- title: tab.displayName,
1490
- slug: tabSlug,
1491
- icon: tab.icon ?? undefined,
1492
- hidden: tab.hidden,
1493
- viewers: toViewers(tab.viewers)
1494
- }),
1495
- overviewPageId: undefined,
1496
- noindex: undefined,
1497
- children: []
1498
- };
1499
- }
1500
- // Default: regular tab
1501
- const tabSegs = scopeSegs.filter((s) => s.seg.tab?.id === tab.id);
1502
- const metaPointsTo = metaStr(tab.metadata, "pointsTo");
1503
- return {
1504
- type: "tab",
1505
- ...withMetadataDefaults({
1506
- id: ctx.nodeId(`tab:${tabSlug}`),
1507
- title: tab.displayName,
1508
- slug: tabSlug,
1509
- icon: tab.icon ?? undefined,
1510
- hidden: tab.hidden,
1511
- viewers: toViewers(tab.viewers)
1512
- }),
1513
- pointsTo: metaPointsTo != null ? pointsToSlug(metaPointsTo) : undefined,
1514
- // Structural sections under this tab are rooted at the TAB slug
1515
- // (`{...}/{version}/{tab}`) so their slugs nest under the tab
1516
- // (matching v2) while still starting with the version slug, keeping
1517
- // the subtree inside the default-version prune window (see
1518
- // {@link structuralNodeSlug}).
1519
- // Changelog sidebar children use the product/version prefix — v2
1520
- // roots changelogs at the scope level, not under the tab.
1521
- child: buildSidebarRootWithVariants(ctx, tabSegs, tabSlug, scopePrefix)
1522
- };
1523
- });
1524
- const first = scopeSegs[0];
1525
- return {
1526
- type: "tabbed",
1527
- id: ctx.nodeId(`tabbed:${first != null ? scopeKey(first.seg) : "root"}`),
1528
- collapsed: undefined,
1529
- children
1530
- };
1531
- }
1532
- function buildUnversioned(ctx, scopeSegs, scopePrefix, tabsPresent) {
1533
- const first = scopeSegs[0];
1534
- return {
1535
- type: "unversioned",
1536
- id: ctx.nodeId(`unversioned:${first?.seg.product?.id ?? "root"}`),
1537
- collapsed: undefined,
1538
- landingPage: buildLandingPage(ctx, scopeSegs),
1539
- // The enclosing scope prefix (product slug, or rootSlug at the top
1540
- // level) roots structural sections so they share the scope's slug
1541
- // namespace.
1542
- child: buildTabbedOrSidebar(ctx, scopeSegs, tabsPresent, scopePrefix)
1543
- };
1544
- }
1545
- /**
1546
- * Merge shared (tab-level) sections from sibling versions into the default
1547
- * version's segment list. A section is considered "shared" when its section
1548
- * path does NOT start with any version slug — indicating it was authored at
1549
- * the tab level and the publish transform assigned it to only one version.
1550
- */
1551
- function mergeSharedSections(defaultSegs, allScoped, defaultVersion, versionSlugs) {
1552
- // Build a map of the default version's tabs by displayName for
1553
- // cross-version matching. Tab slugs can't be used because the "default"
1554
- // tab's slug equals the version slug (e.g. "2026-02-09" vs "2025-04-21"
1555
- // for the same logical "Documentation" tab across versions).
1556
- const defaultTabsByName = new Map();
1557
- for (const s of defaultSegs) {
1558
- if (s.seg.tab != null) {
1559
- const tabName = s.seg.tab.displayName;
1560
- if (!defaultTabsByName.has(tabName)) {
1561
- defaultTabsByName.set(tabName, s.seg.tab);
1562
- }
1563
- }
1564
- }
1565
- // Collect section paths already present in the default version.
1566
- const existingSections = new Set(defaultSegs.filter((s) => metaStr(s.seg.metadata, "type") === "section").map((s) => s.seg.section));
1567
- // Merged sections must sort AFTER all native default segments so they
1568
- // appear in a trailing sidebarGroup (after non-collapsible sections like
1569
- // "Getting Started", "Dev Tools", "Capabilities") matching v2 ordering.
1570
- const maxSortOrder = defaultSegs.reduce((max, s) => Math.max(max, s.seg.sortOrder), 0);
1571
- let nextSortOrder = maxSortOrder + 1;
1572
- const merged = [...defaultSegs];
1573
- for (const s of allScoped) {
1574
- if (s.seg.version?.id === defaultVersion.id) {
1575
- continue;
1576
- }
1577
- const type = metaStr(s.seg.metadata, "type");
1578
- if (type !== "section") {
1579
- continue;
1580
- }
1581
- const sectionPath = s.seg.section;
1582
- // Skip version-specific sections (path starts with a version slug).
1583
- if (versionSlugs.some((vs) => sectionPath === vs || sectionPath.startsWith(vs + "/"))) {
1584
- continue;
1585
- }
1586
- // Skip if the default version already has this section.
1587
- if (existingSections.has(sectionPath)) {
1588
- continue;
1589
- }
1590
- // Match the source tab to the default version's corresponding tab
1591
- // by displayName (tab slugs differ across versions for the default tab).
1592
- const sourceTabName = s.seg.tab?.displayName ?? "";
1593
- const targetTab = defaultTabsByName.get(sourceTabName);
1594
- if (targetTab == null) {
1595
- continue;
1596
- }
1597
- // Re-map the segment's tab and version to the default version's.
1598
- // Strip childIndex from metadata so merged sections don't sort before
1599
- // native sections in the annotated interleave step, and assign a
1600
- // sortOrder after all native segments to place them in the trailing
1601
- // sidebarGroup.
1602
- const metadata = s.seg.metadata != null ? { ...s.seg.metadata, childIndex: undefined } : s.seg.metadata;
1603
- merged.push({
1604
- seg: {
1605
- ...s.seg,
1606
- tab: targetTab,
1607
- version: defaultVersion,
1608
- sortOrder: nextSortOrder++,
1609
- metadata
1610
- },
1611
- nav: s.nav
1612
- });
1613
- existingSections.add(sectionPath);
1614
- }
1615
- return merged;
1616
- }
1617
- function buildVersioned(ctx, versions, scoped, rootSlug, productPrefix, skipSharedSectionMerge) {
1618
- // Collect version slugs for detecting version-prefixed section paths.
1619
- const versionSlugs = versions.map((v) => detailSlug(v)).filter((s) => s !== "");
1620
- const children = versions.map((version) => {
1621
- let versionSegs = scoped.filter((s) => s.seg.version?.id === version.id);
1622
- // Merge shared tab-level sections from sibling versions into the
1623
- // default version. The publish transform may assign tab-level content
1624
- // (sections without a version-prefixed path) to a single version;
1625
- // v2's monolith root includes them in every version's sidebar.
1626
- // Skipped for scoped roots: the scoped root only loads nav for a
1627
- // single route's scope, so merged sections carry the source version's
1628
- // fullPaths into the default tree, creating duplicate slugs that
1629
- // orphan the real version's pages in NodeCollector.
1630
- if (detailIsDefault(version) && !skipSharedSectionMerge) {
1631
- versionSegs = mergeSharedSections(versionSegs, scoped, version, versionSlugs);
1632
- }
1633
- const tabsPresent = uniqueDetails(versionSegs, "tab").length > 0;
1634
- const prefix = productPrefix != null ? productPrefix : rootSlug;
1635
- // The version node always carries its FULL versioned slug
1636
- // (`{basepath}/{product}/{version}`), even when it is the default
1637
- // version. This matches the canonical V1→V2 converter
1638
- // (`SlugGenerator.setVersionSlug`, which never elides the version
1639
- // segment) and is REQUIRED for default-version elision: `NodeCollector`
1640
- // prunes the default version by passing `node.slug` to
1641
- // `toDefaultSlug(pageSlug, productSlug, versionSlug)`, which strips the
1642
- // version segment from each page slug to produce the clean alias
1643
- // (`docs/astro/cli/v-1-42/overview` → `docs/astro/cli/overview`). If the
1644
- // default version's slug were collapsed to the product prefix
1645
- // (`versionSlug === productSlug`), `toDefaultSlug` would be a no-op and
1646
- // the elided slug would never enter the slugMap — so the clean URL 404s
1647
- // with `page-not-in-nav` on basepath (`/docs`) sites. (ADR-0014 #6.)
1648
- //
1649
- // `scopeSlugPrefix(rootSlug, version)` is NOT used here because it joins
1650
- // only the rootSlug + version segment (dropping the product prefix);
1651
- // joining the resolved `prefix` (product prefix, or rootSlug when
1652
- // version-less) with the version's own slug segment yields the correct
1653
- // fully-qualified slug.
1654
- const versionSegment = detailSlug(version);
1655
- const slug = versionSegment !== "" ? FernNavigation.slugjoin(asSlug(prefix), versionSegment) : asSlug(prefix);
1656
- const node = {
1657
- type: "version",
1658
- ...withMetadataDefaults({
1659
- id: ctx.nodeId(`version:${slug}`),
1660
- title: version.displayName,
1661
- slug: asSlug(slug),
1662
- icon: version.icon ?? undefined,
1663
- hidden: version.hidden,
1664
- viewers: toViewers(version.viewers)
1665
- }),
1666
- default: detailIsDefault(version),
1667
- versionId: FernNavigation.VersionId(version.id),
1668
- availability: undefined,
1669
- landingPage: buildLandingPage(ctx, versionSegs),
1670
- announcement: undefined,
1671
- pointsTo: metaStr(version.metadata, "pointsTo") != null
1672
- ? pointsToSlug(metaStr(version.metadata, "pointsTo"))
1673
- : undefined,
1674
- // The version's full slug roots structural sections so the whole
1675
- // version subtree stays inside the default-version prune window.
1676
- child: buildTabbedOrSidebar(ctx, versionSegs, tabsPresent, asSlug(slug))
1677
- };
1678
- if (node.default) {
1679
- markDefaultVersionCanonicalSlugs(node, productPrefix != null ? asSlug(productPrefix) : rootSlug, node.slug);
1680
- }
1681
- return node;
1682
- });
1683
- // Cross-version canonical slug deduplication (V2 parity).
1684
- // V2's migrator deduplicates pages across versions using a title-based
1685
- // disambiguation key. Without this, non-default version pages that have
1686
- // a title-equivalent in the default version appear as separate sitemap
1687
- // entries (e.g. `/2024-12-23/evaluation/overview` alongside the default
1688
- // `/evaluation/overview`).
1689
- markCrossVersionCanonicalSlugs(children);
1690
- return {
1691
- type: "versioned",
1692
- id: ctx.nodeId(`versioned:${productPrefix ?? "root"}`),
1693
- collapsed: undefined,
1694
- children
1695
- };
1696
- }
1697
- function markDefaultVersionCanonicalSlugs(node, pruneSlug, versionSlug) {
1698
- FernNavigation.traverseDF(node, (child) => {
1699
- if (FernNavigation.hasMetadata(child)) {
1700
- const canonicalSlug = FernNavigation.toDefaultSlug(child.canonicalSlug ?? child.slug, pruneSlug, versionSlug);
1701
- if (canonicalSlug !== child.slug) {
1702
- child.canonicalSlug = canonicalSlug;
1703
- }
1704
- }
1705
- if (FernNavigation.hasRedirect(child)) {
1706
- child.pointsTo = FernNavigation.toDefaultSlug(child.pointsTo, pruneSlug, versionSlug);
1707
- }
1708
- return;
1709
- });
1710
- }
1711
- /**
1712
- * Find parents after the innermost version node (unversioned ancestors).
1713
- */
1714
- function unversionedParents(parents) {
1715
- let versionIdx = -1;
1716
- for (let i = parents.length - 1; i >= 0; i--) {
1717
- if (parents[i].type === "version") {
1718
- versionIdx = i;
1719
- break;
1720
- }
1721
- }
1722
- return versionIdx >= 0 ? parents.slice(versionIdx + 1) : parents;
1723
- }
1724
- /**
1725
- * Build dedup keys for a page node, mirroring V2's `#getAndSetCanonicalSlug`.
1726
- * V2 uses multiple keys per node so ANY match deduplicates:
1727
- * - `pageId` / `overviewPageId` — content-addressable, same across versions
1728
- * - API-specific key (`api:endpoint:METHOD:ID`) — for API leaf nodes
1729
- * - title disambiguation key — structural fallback using parent titles
1730
- */
1731
- function crossVersionDedupKeys(node, parents) {
1732
- const keys = [];
1733
- const uParents = unversionedParents(parents);
1734
- // 1. Content-ID key (pageId or overviewPageId)
1735
- const pid = FernNavigation.getPageId(node);
1736
- if (pid != null) {
1737
- keys.push(`pid:${pid}`);
1738
- }
1739
- // 2. API-specific key for endpoints/websockets/webhooks/grpc/graphql
1740
- if (node.type === "endpoint" ||
1741
- node.type === "webSocket" ||
1742
- node.type === "webhook" ||
1743
- node.type === "grpc" ||
1744
- node.type === "graphql") {
1745
- const apiParentTitles = uParents
1746
- .filter((p) => p.type === "apiReference")
1747
- .map((p) => p.title.replaceAll(" ", ""));
1748
- const apiPrefix = apiParentTitles.join(":");
1749
- if (node.type === "endpoint") {
1750
- keys.push(`${apiPrefix}:api:endpoint:${node.method}:${node.endpointId}`);
1751
- }
1752
- else if (node.type === "webSocket") {
1753
- keys.push(`${apiPrefix}:api:websocket:${node.webSocketId}`);
1754
- }
1755
- else if (node.type === "webhook") {
1756
- keys.push(`${apiPrefix}:api:webhook:${node.method}:${node.webhookId}`);
1757
- }
1758
- else if (node.type === "grpc") {
1759
- keys.push(`${apiPrefix}:api:grpc:${node.method}:${node.grpcId}`);
1760
- }
1761
- else if (node.type === "graphql") {
1762
- keys.push(`${apiPrefix}:api:graphql:${node.id}`);
1763
- }
1764
- }
1765
- // 3. Title disambiguation key (structural fallback)
1766
- const parentTitles = [];
1767
- for (const p of uParents) {
1768
- if (FernNavigation.hasMetadata(p)) {
1769
- parentTitles.push(p.title);
1770
- }
1771
- }
1772
- keys.push([...parentTitles, node.title].join("###"));
1773
- return keys;
1774
- }
1775
- function routeToLandingPage(ctx, route) {
1776
- if (route == null || route.type !== "markdown" || route.fullPath == null) {
1777
- return undefined;
1778
- }
1779
- const md = route.metadata;
1780
- const pageId = metaStr(md, "pageId");
1781
- if (pageId == null) {
1782
- return undefined;
1783
- }
1784
- const slug = ctx.contentSlug(route.fullPath);
1785
- return {
1786
- type: "landingPage",
1787
- ...withMetadataDefaults({
1788
- id: ctx.nodeId(`landing:${slug}`),
1789
- title: metaStr(md, "title") ?? "",
1790
- slug,
1791
- icon: metaStr(md, "icon"),
1792
- hidden: route.hidden,
1793
- authed: metaBool(md, "authed"),
1794
- viewers: toViewers(metaStrArr(md, "viewers")),
1795
- orphaned: metaBool(md, "orphaned"),
1796
- featureFlags: metaFeatureFlags(md)
1797
- }),
1798
- pageId: FernNavigation.PageId(pageId),
1799
- noindex: metaBool(md, "noindex")
1800
- };
1801
- }
1802
- /**
1803
- * Build a LandingPageNode from the explicit landing-page segment emitted by
1804
- * the publish transform. This avoids confusing ordinary loose tabRoot pages
1805
- * with root/product/version landing pages.
1806
- */
1807
- function buildLandingPage(ctx, scopeSegs) {
1808
- const landingSegment = scopeSegs.find((s) => metaStr(s.seg.metadata, "type") === "tabRoot" && metaBool(s.seg.metadata, "landingPage") === true);
1809
- return routeToLandingPage(ctx, landingSegment?.nav.find((route) => route.type === "markdown"));
1810
- }
1811
- /**
1812
- * After default-version canonical slugs are marked, propagate them across
1813
- * ALL versions using a global first-come-first-served approach (matching V2).
1814
- * V2's migrator uses a single `#canonicalSlugs` map across the entire tree,
1815
- * so the first version to register a key wins. This deduplicates pages both
1816
- * default→non-default AND across non-default versions (e.g. v2025-04-21
1817
- * and v2024-12-23 sharing the same pageId).
1818
- */
1819
- function markCrossVersionCanonicalSlugs(versionNodes) {
1820
- const keyToCanonical = new Map();
1821
- // Process versions in order (default first, then non-default in tree order).
1822
- // The first version to register a key wins — matching V2's DFS traversal
1823
- // which processes the default version before others.
1824
- const sorted = [...versionNodes].sort((a, b) => {
1825
- if (a.default !== b.default) {
1826
- return a.default ? -1 : 1;
1827
- }
1828
- return 0;
1829
- });
1830
- for (const version of sorted) {
1831
- FernNavigation.traverseDF(version, (child, parents) => {
1832
- if (FernNavigation.hasMetadata(child) && FernNavigation.isPage(child)) {
1833
- const keys = crossVersionDedupKeys(child, parents);
1834
- let matched = false;
1835
- for (const key of keys) {
1836
- const canonical = keyToCanonical.get(key);
1837
- if (canonical != null && !version.default) {
1838
- child.canonicalSlug = canonical;
1839
- matched = true;
1840
- break;
1841
- }
1842
- }
1843
- if (!matched) {
1844
- const canonical = child.canonicalSlug ?? child.slug;
1845
- for (const key of keys) {
1846
- if (!keyToCanonical.has(key)) {
1847
- keyToCanonical.set(key, canonical);
1848
- }
1849
- }
1850
- }
1851
- }
1852
- });
1853
- }
1854
- }
1855
- function buildProductGroup(ctx, products, scoped, rootSlug, skipSharedSectionMerge) {
1856
- const children = products.map((product) => {
1857
- const productSegs = scoped.filter((s) => s.seg.product?.id === product.id);
1858
- const versions = uniqueDetails(productSegs, "version");
1859
- const tabsPresent = uniqueDetails(productSegs, "tab").length > 0;
1860
- const productPrefix = scopeSlugPrefix(rootSlug, product);
1861
- // ProductChild is VersionedNode | UnversionedNode — a version-less
1862
- // product wraps its sidebar/tabs in an UnversionedNode.
1863
- const productChild = versions.length > 0
1864
- ? buildVersioned(ctx, versions, productSegs, rootSlug, productPrefix, skipSharedSectionMerge)
1865
- : buildUnversioned(ctx, productSegs, asSlug(productPrefix), tabsPresent);
1866
- const node = {
1867
- type: "product",
1868
- ...withMetadataDefaults({
1869
- id: ctx.nodeId(`product:${productPrefix}`),
1870
- title: product.displayName,
1871
- slug: asSlug(detailIsDefault(product) ? rootSlug : productPrefix),
1872
- icon: product.icon ?? undefined,
1873
- hidden: product.hidden,
1874
- viewers: toViewers(product.viewers)
1875
- }),
1876
- default: detailIsDefault(product),
1877
- // `product.id` is the content-addressed STORAGE hash (the segment
1878
- // key). `productId` is the SEMANTIC identifier search/UI key off
1879
- // (the product-scoped search filter does `product.title:${productId}`,
1880
- // so it must equal the product title). v2 carries the display name
1881
- // here; sourcing it from the hash makes that filter match nothing.
1882
- productId: FernNavigation.ProductId(product.displayName),
1883
- subtitle: metaStr(product.metadata, "subtitle") ?? "",
1884
- image: metaStr(product.metadata, "image") != null
1885
- ? FernNavigation.FileId(metaStr(product.metadata, "image"))
1886
- : undefined,
1887
- announcement: undefined,
1888
- pointsTo: metaStr(product.metadata, "pointsTo") != null
1889
- ? pointsToSlug(metaStr(product.metadata, "pointsTo"))
1890
- : undefined,
1891
- child: productChild
1892
- };
1893
- return node;
1894
- });
1895
- return {
1896
- type: "productgroup",
1897
- id: ctx.nodeId("productgroup"),
1898
- collapsed: undefined,
1899
- landingPage: buildLandingPage(ctx, scoped.filter((s) => s.seg.product == null)),
1900
- children
1901
- };
1902
- }
1903
- // (root keeps the bare "root" id; it is the single tree root.)
1904
- //# sourceMappingURL=ledger-root-builder.js.map