@redocly/openapi-docs 3.11.0-rc.2 → 3.11.0

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 (1441) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/redocly-openapi-docs.min.js +11849 -10869
  3. package/lib/components/ApiInfo/ApiInfo.d.ts +1 -1
  4. package/lib/components/ApiInfo/ApiInfo.js +1 -2
  5. package/lib/components/ApiInfo/Metadata.d.ts +1 -1
  6. package/lib/components/ApiInfo/Metadata.js +1 -2
  7. package/lib/components/ApiInfo/index.d.ts +1 -1
  8. package/lib/components/ApiInfo/index.js +1 -2
  9. package/lib/components/ApiInfo/styled.d.ts +4 -4
  10. package/lib/components/ApiInfo/styled.js +8 -9
  11. package/lib/components/CallbackSamples/CallbackSamples.js +4 -5
  12. package/lib/components/CallbackSamples/index.d.ts +1 -1
  13. package/lib/components/CallbackSamples/index.js +1 -2
  14. package/lib/components/Callbacks/CallbackDetails.d.ts +1 -1
  15. package/lib/components/Callbacks/CallbackDetails.js +3 -4
  16. package/lib/components/Callbacks/CallbackOperation.d.ts +1 -1
  17. package/lib/components/Callbacks/CallbackOperation.js +3 -4
  18. package/lib/components/Callbacks/CallbackSummary.d.ts +1 -1
  19. package/lib/components/Callbacks/CallbackSummary.js +3 -4
  20. package/lib/components/Callbacks/CallbacksList.d.ts +1 -1
  21. package/lib/components/Callbacks/CallbacksList.js +1 -2
  22. package/lib/components/Callbacks/index.d.ts +3 -3
  23. package/lib/components/Callbacks/index.js +1 -2
  24. package/lib/components/Callbacks/styled.d.ts +1 -3
  25. package/lib/components/Callbacks/styled.js +2 -3
  26. package/lib/components/Content/Content.d.ts +1 -1
  27. package/lib/components/Content/Content.js +1 -2
  28. package/lib/components/Content/index.d.ts +1 -1
  29. package/lib/components/Content/index.js +1 -2
  30. package/lib/components/Content/useAutoScroll.js +1 -2
  31. package/lib/components/ContentItem/ContentItem.d.ts +1 -1
  32. package/lib/components/ContentItem/ContentItem.js +1 -2
  33. package/lib/components/ContentItem/index.d.ts +1 -1
  34. package/lib/components/ContentItem/index.js +1 -2
  35. package/lib/components/ContentItem/useIsExpanded.d.ts +1 -1
  36. package/lib/components/ContentItem/useIsExpanded.js +1 -2
  37. package/lib/components/ContentItems/ContentItems.d.ts +1 -1
  38. package/lib/components/ContentItems/ContentItems.js +1 -2
  39. package/lib/components/ContentItems/Items.js +1 -2
  40. package/lib/components/ContentItems/VirtualList.d.ts +1 -1
  41. package/lib/components/ContentItems/VirtualList.js +1 -2
  42. package/lib/components/ContentItems/helpers.d.ts +3 -3
  43. package/lib/components/ContentItems/helpers.js +1 -2
  44. package/lib/components/ContentItems/index.d.ts +1 -1
  45. package/lib/components/ContentItems/index.js +1 -2
  46. package/lib/components/ContentItems/useScrollOnRender.d.ts +1 -1
  47. package/lib/components/ContentItems/useScrollOnRender.js +1 -2
  48. package/lib/components/Discriminator/Discriminator.d.ts +1 -1
  49. package/lib/components/Discriminator/Discriminator.js +2 -3
  50. package/lib/components/Discriminator/index.d.ts +1 -1
  51. package/lib/components/Discriminator/index.js +1 -2
  52. package/lib/components/Download/DownloadSpecification.js +4 -5
  53. package/lib/components/Download/index.d.ts +1 -1
  54. package/lib/components/Download/index.js +1 -2
  55. package/lib/components/Download/types.js +0 -2
  56. package/lib/components/Download/useDownloadInfo.d.ts +1 -1
  57. package/lib/components/Download/useDownloadInfo.js +1 -2
  58. package/lib/components/ErrorBoundary/ErrorBoundary.js +2 -3
  59. package/lib/components/ErrorBoundary/index.d.ts +1 -1
  60. package/lib/components/ErrorBoundary/index.js +1 -2
  61. package/lib/components/ExpandAllButton/ExpandAllButton.js +2 -3
  62. package/lib/components/ExpandAllButton/index.d.ts +1 -1
  63. package/lib/components/ExpandAllButton/index.js +1 -2
  64. package/lib/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
  65. package/lib/components/ExternalDocumentation/ExternalDocumentation.js +4 -5
  66. package/lib/components/ExternalDocumentation/index.d.ts +1 -1
  67. package/lib/components/ExternalDocumentation/index.js +1 -2
  68. package/lib/components/Language/LanguageDropdown.d.ts +1 -1
  69. package/lib/components/Language/LanguageDropdown.js +1 -2
  70. package/lib/components/Language/LanguageItem.d.ts +1 -1
  71. package/lib/components/Language/LanguageItem.js +1 -2
  72. package/lib/components/Language/LanguageList.d.ts +1 -1
  73. package/lib/components/Language/LanguageList.js +1 -2
  74. package/lib/components/Language/_tests_/LanguageDropdown.test.js +1 -2
  75. package/lib/components/Language/constants.js +1 -2
  76. package/lib/components/Language/index.d.ts +3 -3
  77. package/lib/components/Language/index.js +1 -2
  78. package/lib/components/Language/styled.d.ts +8 -31
  79. package/lib/components/Language/styled.js +11 -12
  80. package/lib/components/Markdown/Markdown.d.ts +1 -1
  81. package/lib/components/Markdown/Markdown.js +1 -2
  82. package/lib/components/Markdown/index.d.ts +2 -2
  83. package/lib/components/Markdown/index.js +1 -2
  84. package/lib/components/Markdown/types.js +0 -2
  85. package/lib/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +2 -2
  86. package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -2
  87. package/lib/components/MediaTypeSwitch/index.d.ts +1 -1
  88. package/lib/components/MediaTypeSwitch/index.js +1 -2
  89. package/lib/components/OperationItem/Description.d.ts +1 -1
  90. package/lib/components/OperationItem/Description.js +1 -2
  91. package/lib/components/OperationItem/OperationItem.d.ts +1 -3
  92. package/lib/components/OperationItem/OperationItem.js +5 -6
  93. package/lib/components/OperationItem/_tests_/OperationItem.test.js +1 -2
  94. package/lib/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.js +1 -2
  95. package/lib/components/OperationItem/index.d.ts +2 -2
  96. package/lib/components/OperationItem/index.js +1 -2
  97. package/lib/components/OperationItem/types.d.ts +1 -1
  98. package/lib/components/OperationItem/types.js +0 -2
  99. package/lib/components/Overlay.d.ts +1 -1
  100. package/lib/components/Overlay.js +3 -4
  101. package/lib/components/Overview/Overview.d.ts +1 -1
  102. package/lib/components/Overview/Overview.js +1 -2
  103. package/lib/components/Overview/index.d.ts +1 -1
  104. package/lib/components/Overview/index.js +1 -2
  105. package/lib/components/PageFooter/PageFooter.js +1 -2
  106. package/lib/components/PageFooter/index.d.ts +1 -1
  107. package/lib/components/PageFooter/index.js +1 -2
  108. package/lib/components/Panel/ResponsePanel.d.ts +2 -3
  109. package/lib/components/Panel/ResponsePanel.js +6 -7
  110. package/lib/components/Panel/Trigger.d.ts +1 -1
  111. package/lib/components/Panel/Trigger.js +2 -3
  112. package/lib/components/Panel/index.d.ts +2 -2
  113. package/lib/components/Panel/index.js +1 -2
  114. package/lib/components/PanelItem/PanelItem.js +1 -2
  115. package/lib/components/PanelItem/index.d.ts +2 -2
  116. package/lib/components/PanelItem/index.js +1 -2
  117. package/lib/components/PanelItem/styled.d.ts +8 -16
  118. package/lib/components/PanelItem/styled.js +9 -10
  119. package/lib/components/PayloadSamples/Example.d.ts +1 -1
  120. package/lib/components/PayloadSamples/Example.js +1 -2
  121. package/lib/components/PayloadSamples/ExampleValue.d.ts +1 -1
  122. package/lib/components/PayloadSamples/ExampleValue.js +1 -2
  123. package/lib/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
  124. package/lib/components/PayloadSamples/MediaTypeSamples.js +2 -3
  125. package/lib/components/PayloadSamples/PayloadSamples.d.ts +1 -1
  126. package/lib/components/PayloadSamples/PayloadSamples.js +1 -2
  127. package/lib/components/PayloadSamples/index.d.ts +6 -5
  128. package/lib/components/PayloadSamples/index.js +1 -2
  129. package/lib/components/PayloadSamples/styled.d.ts +3 -4
  130. package/lib/components/PayloadSamples/styled.js +4 -5
  131. package/lib/components/PayloadSamples/types.d.ts +3 -3
  132. package/lib/components/PayloadSamples/types.js +0 -2
  133. package/lib/components/PropertyDetails/DescriptionEnums.d.ts +1 -1
  134. package/lib/components/PropertyDetails/DescriptionEnums.js +3 -4
  135. package/lib/components/PropertyDetails/EnumValues.d.ts +1 -1
  136. package/lib/components/PropertyDetails/EnumValues.js +1 -2
  137. package/lib/components/PropertyDetails/Examples.d.ts +1 -1
  138. package/lib/components/PropertyDetails/Examples.js +1 -2
  139. package/lib/components/PropertyDetails/Extensions.d.ts +1 -1
  140. package/lib/components/PropertyDetails/Extensions.js +2 -3
  141. package/lib/components/PropertyDetails/FieldDetail.js +2 -3
  142. package/lib/components/PropertyDetails/FieldDetails.d.ts +1 -1
  143. package/lib/components/PropertyDetails/FieldDetails.js +6 -7
  144. package/lib/components/PropertyDetails/Pattern.js +1 -2
  145. package/lib/components/PropertyDetails/PlusCircleIcon.js +4 -5
  146. package/lib/components/PropertyDetails/PropertyDetails.d.ts +1 -1
  147. package/lib/components/PropertyDetails/PropertyDetails.js +2 -3
  148. package/lib/components/PropertyDetails/SchemaTypeInfo.js +2 -3
  149. package/lib/components/PropertyDetails/SimpleEnums.d.ts +1 -1
  150. package/lib/components/PropertyDetails/SimpleEnums.js +2 -3
  151. package/lib/components/PropertyDetails/cycleColorsByLevel.js +1 -2
  152. package/lib/components/PropertyDetails/index.d.ts +3 -3
  153. package/lib/components/PropertyDetails/index.js +1 -2
  154. package/lib/components/PropertyDetails/styled.d.ts +6 -6
  155. package/lib/components/PropertyDetails/styled.js +7 -8
  156. package/lib/components/PropertyDetails/types.d.ts +3 -2
  157. package/lib/components/PropertyDetails/types.js +0 -2
  158. package/lib/components/RedoclyOpenAPIDocs/Providers.d.ts +2 -3
  159. package/lib/components/RedoclyOpenAPIDocs/Providers.js +1 -2
  160. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +2 -3
  161. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -2
  162. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.d.ts +8 -0
  163. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js +1 -0
  164. package/lib/components/RedoclyOpenAPIDocs/index.d.ts +4 -4
  165. package/lib/components/RedoclyOpenAPIDocs/index.js +1 -2
  166. package/lib/components/RedoclyOpenAPIDocs/styled.d.ts +1 -1
  167. package/lib/components/RedoclyOpenAPIDocs/styled.js +2 -3
  168. package/lib/components/RedoclyOpenAPIDocs/types.d.ts +3 -3
  169. package/lib/components/RedoclyOpenAPIDocs/types.js +0 -2
  170. package/lib/components/RedoclyOpenAPIDocs/utils.d.ts +1 -4
  171. package/lib/components/RedoclyOpenAPIDocs/utils.js +1 -2
  172. package/lib/components/RenderHook/RenderHook.d.ts +2 -2
  173. package/lib/components/RenderHook/RenderHook.js +1 -2
  174. package/lib/components/RenderHook/index.d.ts +1 -1
  175. package/lib/components/RenderHook/index.js +1 -2
  176. package/lib/components/Replay/EmbeddedReplay.d.ts +1 -1
  177. package/lib/components/Replay/EmbeddedReplay.js +3 -4
  178. package/lib/components/Replay/Replay.d.ts +1 -1
  179. package/lib/components/Replay/Replay.js +1 -2
  180. package/lib/components/Replay/index.d.ts +2 -2
  181. package/lib/components/Replay/index.js +1 -2
  182. package/lib/components/Replay/utils.d.ts +4 -4
  183. package/lib/components/Replay/utils.js +1 -2
  184. package/lib/components/Request/RequestDetails.d.ts +1 -1
  185. package/lib/components/Request/RequestDetails.js +2 -3
  186. package/lib/components/Request/types.js +0 -2
  187. package/lib/components/RequestParameters/Body.d.ts +1 -1
  188. package/lib/components/RequestParameters/Body.js +1 -2
  189. package/lib/components/RequestParameters/ParametersGroup.d.ts +1 -1
  190. package/lib/components/RequestParameters/ParametersGroup.js +4 -5
  191. package/lib/components/RequestParameters/RequestParameters.d.ts +1 -1
  192. package/lib/components/RequestParameters/RequestParameters.js +1 -2
  193. package/lib/components/RequestParameters/index.d.ts +3 -2
  194. package/lib/components/RequestParameters/index.js +1 -2
  195. package/lib/components/RequestSamples/CodeSample.d.ts +3 -3
  196. package/lib/components/RequestSamples/CodeSample.js +2 -3
  197. package/lib/components/RequestSamples/Example.d.ts +1 -1
  198. package/lib/components/RequestSamples/Example.js +1 -2
  199. package/lib/components/RequestSamples/RequestSamples.d.ts +2 -2
  200. package/lib/components/RequestSamples/RequestSamples.js +5 -6
  201. package/lib/components/RequestSamples/index.d.ts +2 -2
  202. package/lib/components/RequestSamples/index.js +1 -2
  203. package/lib/components/RequestSamples/useCodeSamples.d.ts +3 -3
  204. package/lib/components/RequestSamples/useCodeSamples.js +1 -2
  205. package/lib/components/ResponseSamples/ResponseSamples.d.ts +2 -2
  206. package/lib/components/ResponseSamples/ResponseSamples.js +1 -2
  207. package/lib/components/ResponseSamples/Summary.js +1 -2
  208. package/lib/components/ResponseSamples/index.d.ts +1 -1
  209. package/lib/components/ResponseSamples/index.js +1 -2
  210. package/lib/components/Responses/OperationResponseList.d.ts +3 -3
  211. package/lib/components/Responses/OperationResponseList.js +2 -3
  212. package/lib/components/Responses/ResponseDetails.d.ts +1 -1
  213. package/lib/components/Responses/ResponseDetails.js +1 -2
  214. package/lib/components/Responses/ResponseHeaders.d.ts +1 -1
  215. package/lib/components/Responses/ResponseHeaders.js +1 -2
  216. package/lib/components/Responses/index.d.ts +5 -3
  217. package/lib/components/Responses/index.js +1 -2
  218. package/lib/components/Responses/styled.d.ts +5 -5
  219. package/lib/components/Responses/styled.js +6 -7
  220. package/lib/components/Responses/types.d.ts +1 -1
  221. package/lib/components/Responses/types.js +0 -2
  222. package/lib/components/RightPanel/RightPanel.d.ts +1 -1
  223. package/lib/components/RightPanel/RightPanel.js +1 -2
  224. package/lib/components/RightPanel/index.d.ts +1 -1
  225. package/lib/components/RightPanel/index.js +1 -2
  226. package/lib/components/Samples/ExampleSwitch.d.ts +1 -1
  227. package/lib/components/Samples/ExampleSwitch.js +1 -2
  228. package/lib/components/Samples/index.d.ts +2 -2
  229. package/lib/components/Samples/index.js +1 -2
  230. package/lib/components/Samples/use-example-key.d.ts +1 -1
  231. package/lib/components/Samples/use-example-key.js +1 -2
  232. package/lib/components/Schema/ArraySchema.d.ts +1 -1
  233. package/lib/components/Schema/ArraySchema.js +1 -2
  234. package/lib/components/Schema/ObjectSchema.d.ts +1 -1
  235. package/lib/components/Schema/ObjectSchema.js +1 -2
  236. package/lib/components/Schema/OneOfSchema.d.ts +11 -2
  237. package/lib/components/Schema/OneOfSchema.js +3 -4
  238. package/lib/components/Schema/RecursiveSchema.d.ts +1 -1
  239. package/lib/components/Schema/RecursiveSchema.js +1 -2
  240. package/lib/components/Schema/Schema.d.ts +1 -1
  241. package/lib/components/Schema/Schema.js +2 -3
  242. package/lib/components/Schema/SubSchema.js +1 -2
  243. package/lib/components/Schema/helpers.d.ts +1 -1
  244. package/lib/components/Schema/helpers.js +1 -2
  245. package/lib/components/Schema/index.d.ts +5 -5
  246. package/lib/components/Schema/index.js +1 -2
  247. package/lib/components/Schema/types.d.ts +7 -1
  248. package/lib/components/Schema/types.js +0 -2
  249. package/lib/components/Schema/useOneOfLocationIdx.d.ts +1 -1
  250. package/lib/components/Schema/useOneOfLocationIdx.js +1 -2
  251. package/lib/components/SchemaDefinition/SchemaDefinition.js +2 -3
  252. package/lib/components/SchemaDefinition/index.d.ts +1 -1
  253. package/lib/components/SchemaDefinition/index.js +1 -2
  254. package/lib/components/SectionContent/SectionContent.d.ts +3 -10
  255. package/lib/components/SectionContent/SectionContent.js +6 -7
  256. package/lib/components/SectionContent/index.d.ts +1 -1
  257. package/lib/components/SectionContent/index.js +1 -2
  258. package/lib/components/SectionItem/SectionItem.d.ts +1 -1
  259. package/lib/components/SectionItem/SectionItem.js +1 -2
  260. package/lib/components/SectionItem/index.d.ts +1 -1
  261. package/lib/components/SectionItem/index.js +1 -2
  262. package/lib/components/Security/Divider.js +2 -3
  263. package/lib/components/Security/OAuthFlow.d.ts +1 -1
  264. package/lib/components/Security/OAuthFlow.js +1 -2
  265. package/lib/components/Security/OAuthScopes.d.ts +2 -2
  266. package/lib/components/Security/OAuthScopes.js +9 -10
  267. package/lib/components/Security/Security.d.ts +1 -1
  268. package/lib/components/Security/Security.js +1 -2
  269. package/lib/components/Security/SecurityButton.d.ts +1 -1
  270. package/lib/components/Security/SecurityButton.js +7 -8
  271. package/lib/components/Security/SecurityFlow.d.ts +1 -1
  272. package/lib/components/Security/SecurityFlow.js +4 -5
  273. package/lib/components/Security/SecurityModal.d.ts +1 -1
  274. package/lib/components/Security/SecurityModal.js +5 -6
  275. package/lib/components/Security/SecuritySchemeItem.js +4 -5
  276. package/lib/components/Security/helper.d.ts +1 -1
  277. package/lib/components/Security/helper.js +1 -2
  278. package/lib/components/Security/index.d.ts +10 -1
  279. package/lib/components/Security/index.js +1 -2
  280. package/lib/components/Security/styled.d.ts +2 -2
  281. package/lib/components/Security/styled.js +3 -4
  282. package/lib/components/SelectOrLabel/SelectOrLabel.d.ts +1 -1
  283. package/lib/components/SelectOrLabel/SelectOrLabel.js +2 -3
  284. package/lib/components/SelectOrLabel/index.d.ts +1 -1
  285. package/lib/components/SelectOrLabel/index.js +1 -2
  286. package/lib/components/ServerList/ServerList.d.ts +1 -1
  287. package/lib/components/ServerList/ServerList.js +10 -11
  288. package/lib/components/ServerList/index.d.ts +1 -1
  289. package/lib/components/ServerList/index.js +1 -2
  290. package/lib/components/ServerList/types.d.ts +1 -1
  291. package/lib/components/ServerList/types.js +0 -2
  292. package/lib/components/ServerListDropdown/ServerListDropdown.d.ts +1 -1
  293. package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -2
  294. package/lib/components/ServerListDropdown/index.d.ts +1 -1
  295. package/lib/components/ServerListDropdown/index.js +1 -2
  296. package/lib/components/ServerListDropdown/styled.d.ts +4 -5
  297. package/lib/components/ServerListDropdown/styled.js +6 -7
  298. package/lib/components/SideMenu/SideMenu.d.ts +2 -2
  299. package/lib/components/SideMenu/SideMenu.js +2 -3
  300. package/lib/components/SideMenu/hooks/useMenuItems.d.ts +2 -2
  301. package/lib/components/SideMenu/hooks/useMenuItems.js +1 -2
  302. package/lib/components/SideMenu/index.d.ts +1 -1
  303. package/lib/components/SideMenu/index.js +1 -2
  304. package/lib/components/SideMenu/types.d.ts +1 -1
  305. package/lib/components/SideMenu/types.js +0 -2
  306. package/lib/components/StickySidebar/SidebarActions.js +2 -3
  307. package/lib/components/StickySidebar/StickyResponsiveSidebar.js +3 -4
  308. package/lib/components/StickySidebar/index.d.ts +1 -1
  309. package/lib/components/StickySidebar/index.js +1 -2
  310. package/lib/components/Tabs/Tabs.d.ts +1 -1
  311. package/lib/components/Tabs/Tabs.js +5 -6
  312. package/lib/components/Tabs/index.d.ts +2 -2
  313. package/lib/components/Tabs/index.js +1 -2
  314. package/lib/components/Tabs/useTabsState.d.ts +1 -1
  315. package/lib/components/Tabs/useTabsState.js +1 -2
  316. package/lib/components/TagItem/OperationNavigationItems.d.ts +1 -1
  317. package/lib/components/TagItem/OperationNavigationItems.js +4 -5
  318. package/lib/components/TagItem/OperationsNavigation.d.ts +1 -1
  319. package/lib/components/TagItem/OperationsNavigation.js +2 -3
  320. package/lib/components/TagItem/TagItem.d.ts +1 -1
  321. package/lib/components/TagItem/TagItem.js +7 -9
  322. package/lib/components/TagItem/index.d.ts +1 -1
  323. package/lib/components/TagItem/index.js +1 -2
  324. package/lib/components/TagItem/styled.d.ts +1 -1
  325. package/lib/components/TagItem/styled.js +2 -3
  326. package/lib/components/TagItem/types.d.ts +1 -1
  327. package/lib/components/TagItem/types.js +0 -2
  328. package/lib/components/ViewNested/ViewNested.js +7 -8
  329. package/lib/components/ViewNested/index.d.ts +1 -1
  330. package/lib/components/ViewNested/index.js +1 -2
  331. package/lib/components/common/Badges.d.ts +3 -7
  332. package/lib/components/common/Badges.js +4 -5
  333. package/lib/components/common/BodyContent/BodyContent.d.ts +1 -1
  334. package/lib/components/common/BodyContent/BodyContent.js +4 -5
  335. package/lib/components/common/BodyContent/index.d.ts +1 -1
  336. package/lib/components/common/BodyContent/index.js +1 -2
  337. package/lib/components/common/ClearButton/ClearButton.d.ts +1 -1
  338. package/lib/components/common/ClearButton/ClearButton.js +1 -2
  339. package/lib/components/common/ClearButton/index.d.ts +2 -2
  340. package/lib/components/common/ClearButton/index.js +1 -2
  341. package/lib/components/common/ClearButton/styled.d.ts +1 -1
  342. package/lib/components/common/ClearButton/styled.js +2 -3
  343. package/lib/components/common/ClearButton/types.js +0 -2
  344. package/lib/components/common/CodeBlockPanel.d.ts +1 -2
  345. package/lib/components/common/CodeBlockPanel.js +3 -4
  346. package/lib/components/common/ConstraintsView.js +2 -3
  347. package/lib/components/common/Dropdown/Dropdown.js +4 -5
  348. package/lib/components/common/Dropdown/index.d.ts +2 -2
  349. package/lib/components/common/Dropdown/index.js +1 -2
  350. package/lib/components/common/ExpandableExample/ExpandableExample.js +3 -4
  351. package/lib/components/common/ExpandableExample/index.d.ts +1 -1
  352. package/lib/components/common/ExpandableExample/index.js +1 -2
  353. package/lib/components/common/Extensions.js +2 -3
  354. package/lib/components/common/Fields/fields-layout.d.ts +8 -14
  355. package/lib/components/common/Fields/fields-layout.js +57 -50
  356. package/lib/components/common/Fields/fields.d.ts +17 -38
  357. package/lib/components/common/Fields/fields.js +17 -18
  358. package/lib/components/common/Fields/index.d.ts +2 -2
  359. package/lib/components/common/Fields/index.js +1 -2
  360. package/lib/components/common/LinkToField.d.ts +2 -5
  361. package/lib/components/common/LinkToField.js +6 -7
  362. package/lib/components/common/OperationItemTitle.d.ts +2 -2
  363. package/lib/components/common/OperationItemTitle.js +5 -6
  364. package/lib/components/common/SchemaSelection/SchemaSelection.d.ts +1 -1
  365. package/lib/components/common/SchemaSelection/SchemaSelection.js +1 -2
  366. package/lib/components/common/SchemaSelection/index.d.ts +1 -1
  367. package/lib/components/common/SchemaSelection/index.js +1 -2
  368. package/lib/components/common/Select/Select.d.ts +1 -1
  369. package/lib/components/common/Select/Select.js +1 -2
  370. package/lib/components/common/Select/index.d.ts +2 -2
  371. package/lib/components/common/Select/index.js +1 -2
  372. package/lib/components/common/Select/styled.d.ts +4 -22
  373. package/lib/components/common/Select/styled.js +12 -13
  374. package/lib/components/common/Select/types.js +0 -2
  375. package/lib/components/common/Skeleton/LanguageListSkeleton.js +6 -7
  376. package/lib/components/common/Skeleton/Skeleton.d.ts +1 -3
  377. package/lib/components/common/Skeleton/Skeleton.js +5 -6
  378. package/lib/components/common/Skeleton/index.d.ts +2 -1
  379. package/lib/components/common/Skeleton/index.js +1 -2
  380. package/lib/components/common/headers.d.ts +1 -1
  381. package/lib/components/common/headers.js +2 -3
  382. package/lib/components/common/index.d.ts +14 -14
  383. package/lib/components/common/index.js +1 -2
  384. package/lib/components/common/linkify.d.ts +1 -1
  385. package/lib/components/common/linkify.js +4 -5
  386. package/lib/components/common/mixins.js +2 -3
  387. package/lib/components/common/panels.d.ts +4 -17
  388. package/lib/components/common/panels.js +27 -28
  389. package/lib/components/common/schema.d.ts +4 -7
  390. package/lib/components/common/schema.js +8 -9
  391. package/lib/components/common/styled.d.ts +6 -7
  392. package/lib/components/common/styled.js +7 -8
  393. package/lib/components/index.d.ts +23 -23
  394. package/lib/components/index.js +1 -2
  395. package/lib/components/pluggable/RedocExample.d.ts +1 -1
  396. package/lib/components/pluggable/RedocExample.js +1 -2
  397. package/lib/components/pluggable/RedocSchema.d.ts +4 -2
  398. package/lib/components/pluggable/RedocSchema.js +1 -2
  399. package/lib/components/pluggable/index.d.ts +2 -2
  400. package/lib/components/pluggable/index.js +1 -2
  401. package/lib/components/pluggable/styled.components.d.ts +3 -7
  402. package/lib/components/pluggable/styled.components.js +4 -5
  403. package/lib/constants.js +1 -2
  404. package/lib/empty.d.ts +5 -2
  405. package/lib/empty.js +1 -2
  406. package/lib/events/codeSampleCopy.d.ts +1 -1
  407. package/lib/events/codeSampleCopy.js +1 -2
  408. package/lib/events/creator.d.ts +1 -1
  409. package/lib/events/creator.js +1 -2
  410. package/lib/events/index.d.ts +8 -8
  411. package/lib/events/index.js +1 -2
  412. package/lib/events/languageSwitch.d.ts +1 -1
  413. package/lib/events/languageSwitch.js +1 -2
  414. package/lib/events/panelToggle.d.ts +1 -1
  415. package/lib/events/panelToggle.js +1 -2
  416. package/lib/events/serverSwitch.d.ts +1 -1
  417. package/lib/events/serverSwitch.js +1 -2
  418. package/lib/events/tryItOpen.d.ts +1 -1
  419. package/lib/events/tryItOpen.js +1 -2
  420. package/lib/events/tryItSent.d.ts +1 -1
  421. package/lib/events/tryItSent.js +1 -2
  422. package/lib/events/types.d.ts +1 -1
  423. package/lib/events/types.js +1 -2
  424. package/lib/hoc/types.d.ts +3 -3
  425. package/lib/hoc/types.js +0 -2
  426. package/lib/hoc/utils.js +1 -2
  427. package/lib/hoc/withRouter.d.ts +1 -1
  428. package/lib/hoc/withRouter.js +1 -2
  429. package/lib/hoc/withStore.d.ts +1 -1
  430. package/lib/hoc/withStore.js +1 -2
  431. package/lib/hooks/index.d.ts +8 -8
  432. package/lib/hooks/index.js +1 -2
  433. package/lib/hooks/useActivateExample.d.ts +1 -1
  434. package/lib/hooks/useActivateExample.js +1 -2
  435. package/lib/hooks/useActiveWithFallback.js +1 -2
  436. package/lib/hooks/useContentItems.d.ts +2 -2
  437. package/lib/hooks/useContentItems.js +1 -2
  438. package/lib/hooks/useLicense.d.ts +1 -1
  439. package/lib/hooks/useLicense.js +1 -2
  440. package/lib/hooks/usePerformanceMetrics.js +1 -2
  441. package/lib/hooks/useRouter.d.ts +1 -1
  442. package/lib/hooks/useRouter.js +1 -2
  443. package/lib/hooks/useTelemetry.js +1 -2
  444. package/lib/hooks/useTranslate.js +1 -2
  445. package/lib/hooks/useUppercase2LowercaseRedirect.js +1 -2
  446. package/lib/icons/CSharpIcon/CSharpIcon.d.ts +1 -3
  447. package/lib/icons/CSharpIcon/CSharpIcon.js +1 -2
  448. package/lib/icons/CSharpIcon/index.d.ts +1 -1
  449. package/lib/icons/CSharpIcon/index.js +1 -2
  450. package/lib/icons/CurlIcon/CurlIcon.d.ts +1 -3
  451. package/lib/icons/CurlIcon/CurlIcon.js +2 -3
  452. package/lib/icons/CurlIcon/index.d.ts +1 -1
  453. package/lib/icons/CurlIcon/index.js +1 -2
  454. package/lib/icons/GOIcon/GOIcon.d.ts +1 -3
  455. package/lib/icons/GOIcon/GOIcon.js +1 -2
  456. package/lib/icons/GOIcon/index.d.ts +1 -1
  457. package/lib/icons/GOIcon/index.js +1 -2
  458. package/lib/icons/JavaIcon/JavaIcon.d.ts +1 -3
  459. package/lib/icons/JavaIcon/JavaIcon.js +1 -2
  460. package/lib/icons/JavaIcon/index.d.ts +1 -1
  461. package/lib/icons/JavaIcon/index.js +1 -2
  462. package/lib/icons/JavaScriptIcon/JavaScriptIcon.d.ts +1 -3
  463. package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +1 -2
  464. package/lib/icons/JavaScriptIcon/index.d.ts +1 -1
  465. package/lib/icons/JavaScriptIcon/index.js +1 -2
  466. package/lib/icons/NodeJSIcon/NodeJSIcon.d.ts +1 -3
  467. package/lib/icons/NodeJSIcon/NodeJSIcon.js +1 -2
  468. package/lib/icons/NodeJSIcon/index.d.ts +1 -1
  469. package/lib/icons/NodeJSIcon/index.js +1 -2
  470. package/lib/icons/PHPIcon/PHPIcon.d.ts +1 -3
  471. package/lib/icons/PHPIcon/PHPIcon.js +1 -2
  472. package/lib/icons/PHPIcon/index.d.ts +1 -1
  473. package/lib/icons/PHPIcon/index.js +1 -2
  474. package/lib/icons/PayloadIcon/PayloadIcon.d.ts +1 -3
  475. package/lib/icons/PayloadIcon/PayloadIcon.js +1 -2
  476. package/lib/icons/PayloadIcon/index.d.ts +1 -1
  477. package/lib/icons/PayloadIcon/index.js +1 -2
  478. package/lib/icons/PythonIcon/PythonIcon.d.ts +1 -3
  479. package/lib/icons/PythonIcon/PythonIcon.js +1 -2
  480. package/lib/icons/PythonIcon/index.d.ts +1 -1
  481. package/lib/icons/PythonIcon/index.js +1 -2
  482. package/lib/icons/RIcon/RIcon.d.ts +1 -3
  483. package/lib/icons/RIcon/RIcon.js +1 -2
  484. package/lib/icons/RIcon/index.d.ts +1 -1
  485. package/lib/icons/RIcon/index.js +1 -2
  486. package/lib/icons/RubyIcon/RubyIcon.d.ts +1 -3
  487. package/lib/icons/RubyIcon/RubyIcon.js +1 -2
  488. package/lib/icons/RubyIcon/index.d.ts +1 -1
  489. package/lib/icons/RubyIcon/index.js +1 -2
  490. package/lib/index.d.ts +52 -43
  491. package/lib/index.js +1 -2
  492. package/lib/jotai/app.d.ts +2 -2
  493. package/lib/jotai/app.js +1 -2
  494. package/lib/jotai/operation.js +1 -2
  495. package/lib/jotai/replay.d.ts +1 -1
  496. package/lib/jotai/replay.js +1 -2
  497. package/lib/jotai/store.d.ts +1 -1
  498. package/lib/jotai/store.js +1 -2
  499. package/lib/jotai/use-write-atom.js +1 -2
  500. package/lib/models/callback.d.ts +3 -3
  501. package/lib/models/callback.js +1 -2
  502. package/lib/models/code-sample-options.d.ts +2 -2
  503. package/lib/models/code-sample-options.js +0 -2
  504. package/lib/models/example.d.ts +3 -3
  505. package/lib/models/example.js +1 -2
  506. package/lib/models/field.d.ts +3 -3
  507. package/lib/models/field.js +1 -2
  508. package/lib/models/group.d.ts +3 -3
  509. package/lib/models/group.js +1 -2
  510. package/lib/models/index.d.ts +15 -15
  511. package/lib/models/index.js +1 -2
  512. package/lib/models/mediaContent.d.ts +2 -2
  513. package/lib/models/mediaContent.js +1 -2
  514. package/lib/models/mediaType.d.ts +3 -3
  515. package/lib/models/mediaType.js +1 -2
  516. package/lib/models/operation.d.ts +3 -3
  517. package/lib/models/operation.js +1 -2
  518. package/lib/models/request.d.ts +3 -3
  519. package/lib/models/request.js +1 -2
  520. package/lib/models/response.d.ts +3 -3
  521. package/lib/models/response.js +1 -2
  522. package/lib/models/schema.d.ts +3 -3
  523. package/lib/models/schema.js +2 -2
  524. package/lib/models/security.d.ts +3 -3
  525. package/lib/models/security.js +1 -2
  526. package/lib/models/tab.js +0 -2
  527. package/lib/models/types.d.ts +4 -4
  528. package/lib/models/types.js +0 -2
  529. package/lib/services/OpenAPIParser.d.ts +3 -3
  530. package/lib/services/OpenAPIParser.js +1 -2
  531. package/lib/services/check.js +1 -2
  532. package/lib/services/code-samples/constants.d.ts +1 -1
  533. package/lib/services/code-samples/constants.js +1 -2
  534. package/lib/services/code-samples/generator.d.ts +3 -3
  535. package/lib/services/code-samples/generator.js +1 -2
  536. package/lib/services/code-samples/httpsnippet/helpers/code-builder.d.ts +2 -2
  537. package/lib/services/code-samples/httpsnippet/helpers/code-builder.js +3 -2
  538. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
  539. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +2 -2
  540. package/lib/services/code-samples/httpsnippet/helpers/constants.js +1 -2
  541. package/lib/services/code-samples/httpsnippet/helpers/lodash-int.js +1 -2
  542. package/lib/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.js +37 -2
  543. package/lib/services/code-samples/httpsnippet/helpers/reducer.js +1 -2
  544. package/lib/services/code-samples/httpsnippet/helpers/shell.js +1 -2
  545. package/lib/services/code-samples/httpsnippet/helpers/string-utility.js +1 -2
  546. package/lib/services/code-samples/httpsnippet/index.d.ts +12 -6
  547. package/lib/services/code-samples/httpsnippet/index.js +1 -2
  548. package/lib/services/code-samples/httpsnippet/targets/__mocks__/mock.js +146 -2
  549. package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +2 -2
  550. package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.js +2 -2
  551. package/lib/services/code-samples/httpsnippet/targets/csharp/index.d.ts +1 -1
  552. package/lib/services/code-samples/httpsnippet/targets/csharp/index.js +1 -2
  553. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.d.ts +2 -2
  554. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.js +2 -2
  555. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.d.ts +1 -1
  556. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.js +1 -2
  557. package/lib/services/code-samples/httpsnippet/targets/go/index.d.ts +1 -1
  558. package/lib/services/code-samples/httpsnippet/targets/go/index.js +1 -2
  559. package/lib/services/code-samples/httpsnippet/targets/go/native.d.ts +2 -2
  560. package/lib/services/code-samples/httpsnippet/targets/go/native.js +3 -2
  561. package/lib/services/code-samples/httpsnippet/targets/index.d.ts +12 -12
  562. package/lib/services/code-samples/httpsnippet/targets/index.js +1 -2
  563. package/lib/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +2 -2
  564. package/lib/services/code-samples/httpsnippet/targets/java/httpclient.js +3 -2
  565. package/lib/services/code-samples/httpsnippet/targets/java/index.d.ts +1 -1
  566. package/lib/services/code-samples/httpsnippet/targets/java/index.js +1 -2
  567. package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +2 -2
  568. package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.js +2 -2
  569. package/lib/services/code-samples/httpsnippet/targets/java8/index.d.ts +1 -1
  570. package/lib/services/code-samples/httpsnippet/targets/java8/index.js +1 -2
  571. package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +2 -2
  572. package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.js +1 -2
  573. package/lib/services/code-samples/httpsnippet/targets/javascript/index.d.ts +1 -1
  574. package/lib/services/code-samples/httpsnippet/targets/javascript/index.js +1 -2
  575. package/lib/services/code-samples/httpsnippet/targets/node/fetch.d.ts +2 -2
  576. package/lib/services/code-samples/httpsnippet/targets/node/fetch.js +1 -2
  577. package/lib/services/code-samples/httpsnippet/targets/node/index.d.ts +1 -1
  578. package/lib/services/code-samples/httpsnippet/targets/node/index.js +1 -2
  579. package/lib/services/code-samples/httpsnippet/targets/php/curl.d.ts +2 -2
  580. package/lib/services/code-samples/httpsnippet/targets/php/curl.js +5 -2
  581. package/lib/services/code-samples/httpsnippet/targets/php/index.d.ts +1 -1
  582. package/lib/services/code-samples/httpsnippet/targets/php/index.js +1 -2
  583. package/lib/services/code-samples/httpsnippet/targets/php/types.js +0 -2
  584. package/lib/services/code-samples/httpsnippet/targets/php/utils.d.ts +1 -1
  585. package/lib/services/code-samples/httpsnippet/targets/php/utils.js +5 -2
  586. package/lib/services/code-samples/httpsnippet/targets/python/index.d.ts +1 -1
  587. package/lib/services/code-samples/httpsnippet/targets/python/index.js +1 -2
  588. package/lib/services/code-samples/httpsnippet/targets/python/requests.d.ts +2 -2
  589. package/lib/services/code-samples/httpsnippet/targets/python/requests.js +6 -2
  590. package/lib/services/code-samples/httpsnippet/targets/r/httr.d.ts +2 -2
  591. package/lib/services/code-samples/httpsnippet/targets/r/httr.js +1 -2
  592. package/lib/services/code-samples/httpsnippet/targets/r/index.d.ts +1 -1
  593. package/lib/services/code-samples/httpsnippet/targets/r/index.js +1 -2
  594. package/lib/services/code-samples/httpsnippet/targets/r/utils.d.ts +3 -3
  595. package/lib/services/code-samples/httpsnippet/targets/r/utils.js +6 -2
  596. package/lib/services/code-samples/httpsnippet/targets/ruby/index.d.ts +1 -1
  597. package/lib/services/code-samples/httpsnippet/targets/ruby/index.js +1 -2
  598. package/lib/services/code-samples/httpsnippet/targets/ruby/native.d.ts +2 -2
  599. package/lib/services/code-samples/httpsnippet/targets/ruby/native.js +1 -2
  600. package/lib/services/code-samples/httpsnippet/targets/shell/curl.d.ts +2 -2
  601. package/lib/services/code-samples/httpsnippet/targets/shell/curl.js +6 -2
  602. package/lib/services/code-samples/httpsnippet/targets/shell/index.d.ts +1 -1
  603. package/lib/services/code-samples/httpsnippet/targets/shell/index.js +1 -2
  604. package/lib/services/code-samples/index.d.ts +2 -2
  605. package/lib/services/code-samples/index.js +1 -2
  606. package/lib/services/code-samples/types.js +0 -2
  607. package/lib/services/config-options/helpers.js +1 -2
  608. package/lib/services/config-options/index.d.ts +2 -2
  609. package/lib/services/config-options/index.js +1 -2
  610. package/lib/services/config-options/normalizeOptions.d.ts +1 -1
  611. package/lib/services/config-options/normalizeOptions.js +1 -2
  612. package/lib/services/config-options/types.d.ts +5 -5
  613. package/lib/services/config-options/types.js +0 -2
  614. package/lib/services/history/helpers.d.ts +1 -1
  615. package/lib/services/history/helpers.js +1 -2
  616. package/lib/services/history/index.d.ts +1 -1
  617. package/lib/services/history/index.js +1 -2
  618. package/lib/services/index.d.ts +8 -8
  619. package/lib/services/index.js +1 -2
  620. package/lib/services/menu/builder.d.ts +3 -3
  621. package/lib/services/menu/builder.js +1 -2
  622. package/lib/services/menu/index.d.ts +1 -1
  623. package/lib/services/menu/index.js +1 -2
  624. package/lib/services/menu/markdown.d.ts +1 -1
  625. package/lib/services/menu/markdown.js +1 -2
  626. package/lib/services/menu/operation.d.ts +2 -2
  627. package/lib/services/menu/operation.js +1 -2
  628. package/lib/services/menu/tags.d.ts +5 -5
  629. package/lib/services/menu/tags.js +1 -2
  630. package/lib/services/types.d.ts +1 -4
  631. package/lib/services/types.js +0 -2
  632. package/lib/services/utils.js +1 -2
  633. package/lib/standalone.d.ts +4 -19
  634. package/lib/standalone.js +1 -2
  635. package/lib/styled-components.d.ts +1 -0
  636. package/lib/styled-components.js +1 -0
  637. package/lib/types/app.js +0 -2
  638. package/lib/types/index.d.ts +3 -3
  639. package/lib/types/index.js +1 -2
  640. package/lib/types/open-api.js +0 -2
  641. package/lib/types/security.js +0 -2
  642. package/lib/utils/JsonPointer.js +1 -2
  643. package/lib/utils/areArraysEqual.js +1 -2
  644. package/lib/utils/argValuesHelpers.js +1 -2
  645. package/lib/utils/compose.js +1 -2
  646. package/lib/utils/configure-helpers.d.ts +1 -1
  647. package/lib/utils/configure-helpers.js +1 -2
  648. package/lib/utils/convertSwagger2OpenAPI.d.ts +2 -0
  649. package/lib/utils/convertSwagger2OpenAPI.js +1 -0
  650. package/lib/utils/cookies.js +1 -2
  651. package/lib/utils/debounce.js +1 -2
  652. package/lib/utils/debug.js +1 -2
  653. package/lib/utils/dom.js +1 -2
  654. package/lib/utils/environments.d.ts +1 -1
  655. package/lib/utils/environments.js +1 -2
  656. package/lib/utils/helpers.js +12 -2
  657. package/lib/utils/index.d.ts +23 -23
  658. package/lib/utils/index.js +1 -2
  659. package/lib/utils/isMobile.js +1 -2
  660. package/lib/utils/loadAndBundleSpec.d.ts +2 -3
  661. package/lib/utils/loadAndBundleSpec.js +1 -2
  662. package/lib/utils/local-storage.js +1 -2
  663. package/lib/utils/object.js +1 -2
  664. package/lib/utils/openapi.d.ts +4 -4
  665. package/lib/utils/openapi.js +1 -2
  666. package/lib/utils/parameters.js +1 -2
  667. package/lib/utils/path.js +1 -2
  668. package/lib/utils/queryString.js +1 -2
  669. package/lib/utils/replaceVariables.d.ts +1 -1
  670. package/lib/utils/replaceVariables.js +1 -2
  671. package/lib/utils/saveTextBeforeHeading.js +1 -2
  672. package/lib/utils/security-details.d.ts +1 -1
  673. package/lib/utils/security-details.js +1 -2
  674. package/lib/utils/session-storage.js +1 -2
  675. package/lib/utils/simplifyAstStructure.js +1 -2
  676. package/lib/utils/sort.js +1 -2
  677. package/lib/utils/string.js +1 -2
  678. package/lib/utils/test-utils.js +1 -2
  679. package/lib/utils/theme-helpers.js +3 -4
  680. package/lib/utils/url.d.ts +2 -0
  681. package/lib/utils/url.js +1 -0
  682. package/package.json +26 -48
  683. package/bin.js +0 -4
  684. package/lib/utils/createParsedDocument.d.ts +0 -2
  685. package/lib/utils/createParsedDocument.js +0 -2
  686. package/lib-esm/components/ApiInfo/ApiInfo.d.ts +0 -7
  687. package/lib-esm/components/ApiInfo/ApiInfo.js +0 -2
  688. package/lib-esm/components/ApiInfo/Metadata.d.ts +0 -9
  689. package/lib-esm/components/ApiInfo/Metadata.js +0 -2
  690. package/lib-esm/components/ApiInfo/index.d.ts +0 -1
  691. package/lib-esm/components/ApiInfo/index.js +0 -2
  692. package/lib-esm/components/ApiInfo/styled.d.ts +0 -4
  693. package/lib-esm/components/ApiInfo/styled.js +0 -27
  694. package/lib-esm/components/CallbackSamples/CallbackSamples.d.ts +0 -7
  695. package/lib-esm/components/CallbackSamples/CallbackSamples.js +0 -16
  696. package/lib-esm/components/CallbackSamples/index.d.ts +0 -1
  697. package/lib-esm/components/CallbackSamples/index.js +0 -2
  698. package/lib-esm/components/Callbacks/CallbackDetails.d.ts +0 -7
  699. package/lib-esm/components/Callbacks/CallbackDetails.js +0 -20
  700. package/lib-esm/components/Callbacks/CallbackOperation.d.ts +0 -8
  701. package/lib-esm/components/Callbacks/CallbackOperation.js +0 -15
  702. package/lib-esm/components/Callbacks/CallbackSummary.d.ts +0 -8
  703. package/lib-esm/components/Callbacks/CallbackSummary.js +0 -19
  704. package/lib-esm/components/Callbacks/CallbacksList.d.ts +0 -7
  705. package/lib-esm/components/Callbacks/CallbacksList.js +0 -2
  706. package/lib-esm/components/Callbacks/index.d.ts +0 -3
  707. package/lib-esm/components/Callbacks/index.js +0 -2
  708. package/lib-esm/components/Callbacks/styled.d.ts +0 -3
  709. package/lib-esm/components/Callbacks/styled.js +0 -8
  710. package/lib-esm/components/Content/Content.d.ts +0 -7
  711. package/lib-esm/components/Content/Content.js +0 -2
  712. package/lib-esm/components/Content/index.d.ts +0 -1
  713. package/lib-esm/components/Content/index.js +0 -2
  714. package/lib-esm/components/Content/useAutoScroll.d.ts +0 -3
  715. package/lib-esm/components/Content/useAutoScroll.js +0 -2
  716. package/lib-esm/components/ContentItem/ContentItem.d.ts +0 -11
  717. package/lib-esm/components/ContentItem/ContentItem.js +0 -2
  718. package/lib-esm/components/ContentItem/index.d.ts +0 -1
  719. package/lib-esm/components/ContentItem/index.js +0 -2
  720. package/lib-esm/components/ContentItem/useIsExpanded.d.ts +0 -5
  721. package/lib-esm/components/ContentItem/useIsExpanded.js +0 -2
  722. package/lib-esm/components/ContentItems/ContentItems.d.ts +0 -8
  723. package/lib-esm/components/ContentItems/ContentItems.js +0 -2
  724. package/lib-esm/components/ContentItems/Items.d.ts +0 -7
  725. package/lib-esm/components/ContentItems/Items.js +0 -2
  726. package/lib-esm/components/ContentItems/VirtualList.d.ts +0 -7
  727. package/lib-esm/components/ContentItems/VirtualList.js +0 -2
  728. package/lib-esm/components/ContentItems/helpers.d.ts +0 -10
  729. package/lib-esm/components/ContentItems/helpers.js +0 -2
  730. package/lib-esm/components/ContentItems/index.d.ts +0 -1
  731. package/lib-esm/components/ContentItems/index.js +0 -2
  732. package/lib-esm/components/ContentItems/useScrollOnRender.d.ts +0 -3
  733. package/lib-esm/components/ContentItems/useScrollOnRender.js +0 -2
  734. package/lib-esm/components/Discriminator/Discriminator.d.ts +0 -10
  735. package/lib-esm/components/Discriminator/Discriminator.js +0 -6
  736. package/lib-esm/components/Discriminator/index.d.ts +0 -1
  737. package/lib-esm/components/Discriminator/index.js +0 -2
  738. package/lib-esm/components/Download/DownloadSpecification.d.ts +0 -4
  739. package/lib-esm/components/Download/DownloadSpecification.js +0 -40
  740. package/lib-esm/components/Download/index.d.ts +0 -1
  741. package/lib-esm/components/Download/index.js +0 -2
  742. package/lib-esm/components/Download/types.d.ts +0 -15
  743. package/lib-esm/components/Download/types.js +0 -2
  744. package/lib-esm/components/Download/useDownloadInfo.d.ts +0 -2
  745. package/lib-esm/components/Download/useDownloadInfo.js +0 -2
  746. package/lib-esm/components/ErrorBoundary/ErrorBoundary.d.ts +0 -9
  747. package/lib-esm/components/ErrorBoundary/ErrorBoundary.js +0 -5
  748. package/lib-esm/components/ErrorBoundary/index.d.ts +0 -1
  749. package/lib-esm/components/ErrorBoundary/index.js +0 -2
  750. package/lib-esm/components/ExpandAllButton/ExpandAllButton.d.ts +0 -8
  751. package/lib-esm/components/ExpandAllButton/ExpandAllButton.js +0 -4
  752. package/lib-esm/components/ExpandAllButton/index.d.ts +0 -1
  753. package/lib-esm/components/ExpandAllButton/index.js +0 -2
  754. package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.d.ts +0 -7
  755. package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.js +0 -5
  756. package/lib-esm/components/ExternalDocumentation/index.d.ts +0 -1
  757. package/lib-esm/components/ExternalDocumentation/index.js +0 -2
  758. package/lib-esm/components/Language/LanguageDropdown.d.ts +0 -15
  759. package/lib-esm/components/Language/LanguageDropdown.js +0 -2
  760. package/lib-esm/components/Language/LanguageItem.d.ts +0 -11
  761. package/lib-esm/components/Language/LanguageItem.js +0 -2
  762. package/lib-esm/components/Language/LanguageList.d.ts +0 -10
  763. package/lib-esm/components/Language/LanguageList.js +0 -2
  764. package/lib-esm/components/Language/_tests_/LanguageDropdown.test.d.ts +0 -1
  765. package/lib-esm/components/Language/_tests_/LanguageDropdown.test.js +0 -2
  766. package/lib-esm/components/Language/constants.d.ts +0 -2
  767. package/lib-esm/components/Language/constants.js +0 -2
  768. package/lib-esm/components/Language/index.d.ts +0 -3
  769. package/lib-esm/components/Language/index.js +0 -2
  770. package/lib-esm/components/Language/styled.d.ts +0 -31
  771. package/lib-esm/components/Language/styled.js +0 -82
  772. package/lib-esm/components/Markdown/Markdown.d.ts +0 -3
  773. package/lib-esm/components/Markdown/Markdown.js +0 -2
  774. package/lib-esm/components/Markdown/index.d.ts +0 -2
  775. package/lib-esm/components/Markdown/index.js +0 -2
  776. package/lib-esm/components/Markdown/types.d.ts +0 -10
  777. package/lib-esm/components/Markdown/types.js +0 -2
  778. package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +0 -11
  779. package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.js +0 -2
  780. package/lib-esm/components/MediaTypeSwitch/index.d.ts +0 -1
  781. package/lib-esm/components/MediaTypeSwitch/index.js +0 -2
  782. package/lib-esm/components/OperationItem/Description.d.ts +0 -10
  783. package/lib-esm/components/OperationItem/Description.js +0 -2
  784. package/lib-esm/components/OperationItem/OperationItem.d.ts +0 -5
  785. package/lib-esm/components/OperationItem/OperationItem.js +0 -22
  786. package/lib-esm/components/OperationItem/_tests_/OperationItem.test.d.ts +0 -1
  787. package/lib-esm/components/OperationItem/_tests_/OperationItem.test.js +0 -2
  788. package/lib-esm/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.d.ts +0 -15
  789. package/lib-esm/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.js +0 -2
  790. package/lib-esm/components/OperationItem/index.d.ts +0 -2
  791. package/lib-esm/components/OperationItem/index.js +0 -2
  792. package/lib-esm/components/OperationItem/types.d.ts +0 -4
  793. package/lib-esm/components/OperationItem/types.js +0 -2
  794. package/lib-esm/components/Overlay.d.ts +0 -6
  795. package/lib-esm/components/Overlay.js +0 -43
  796. package/lib-esm/components/Overview/Overview.d.ts +0 -9
  797. package/lib-esm/components/Overview/Overview.js +0 -2
  798. package/lib-esm/components/Overview/index.d.ts +0 -1
  799. package/lib-esm/components/Overview/index.js +0 -2
  800. package/lib-esm/components/PageFooter/PageFooter.d.ts +0 -2
  801. package/lib-esm/components/PageFooter/PageFooter.js +0 -2
  802. package/lib-esm/components/PageFooter/index.d.ts +0 -1
  803. package/lib-esm/components/PageFooter/index.js +0 -2
  804. package/lib-esm/components/Panel/ResponsePanel.d.ts +0 -3
  805. package/lib-esm/components/Panel/ResponsePanel.js +0 -25
  806. package/lib-esm/components/Panel/Trigger.d.ts +0 -1
  807. package/lib-esm/components/Panel/Trigger.js +0 -8
  808. package/lib-esm/components/Panel/index.d.ts +0 -2
  809. package/lib-esm/components/Panel/index.js +0 -2
  810. package/lib-esm/components/PanelItem/PanelItem.d.ts +0 -9
  811. package/lib-esm/components/PanelItem/PanelItem.js +0 -2
  812. package/lib-esm/components/PanelItem/index.d.ts +0 -2
  813. package/lib-esm/components/PanelItem/index.js +0 -2
  814. package/lib-esm/components/PanelItem/styled.d.ts +0 -16
  815. package/lib-esm/components/PanelItem/styled.js +0 -53
  816. package/lib-esm/components/PayloadSamples/Example.d.ts +0 -3
  817. package/lib-esm/components/PayloadSamples/Example.js +0 -2
  818. package/lib-esm/components/PayloadSamples/ExampleValue.d.ts +0 -2
  819. package/lib-esm/components/PayloadSamples/ExampleValue.js +0 -2
  820. package/lib-esm/components/PayloadSamples/MediaTypeSamples.d.ts +0 -2
  821. package/lib-esm/components/PayloadSamples/MediaTypeSamples.js +0 -4
  822. package/lib-esm/components/PayloadSamples/PayloadSamples.d.ts +0 -2
  823. package/lib-esm/components/PayloadSamples/PayloadSamples.js +0 -2
  824. package/lib-esm/components/PayloadSamples/index.d.ts +0 -5
  825. package/lib-esm/components/PayloadSamples/index.js +0 -2
  826. package/lib-esm/components/PayloadSamples/styled.d.ts +0 -4
  827. package/lib-esm/components/PayloadSamples/styled.js +0 -22
  828. package/lib-esm/components/PayloadSamples/types.d.ts +0 -25
  829. package/lib-esm/components/PayloadSamples/types.js +0 -2
  830. package/lib-esm/components/PropertyDetails/DescriptionEnums.d.ts +0 -4
  831. package/lib-esm/components/PropertyDetails/DescriptionEnums.js +0 -10
  832. package/lib-esm/components/PropertyDetails/EnumValues.d.ts +0 -2
  833. package/lib-esm/components/PropertyDetails/EnumValues.js +0 -2
  834. package/lib-esm/components/PropertyDetails/Examples.d.ts +0 -5
  835. package/lib-esm/components/PropertyDetails/Examples.js +0 -2
  836. package/lib-esm/components/PropertyDetails/Extensions.d.ts +0 -2
  837. package/lib-esm/components/PropertyDetails/Extensions.js +0 -4
  838. package/lib-esm/components/PropertyDetails/FieldDetail.d.ts +0 -7
  839. package/lib-esm/components/PropertyDetails/FieldDetail.js +0 -8
  840. package/lib-esm/components/PropertyDetails/FieldDetails.d.ts +0 -2
  841. package/lib-esm/components/PropertyDetails/FieldDetails.js +0 -40
  842. package/lib-esm/components/PropertyDetails/Pattern.d.ts +0 -6
  843. package/lib-esm/components/PropertyDetails/Pattern.js +0 -2
  844. package/lib-esm/components/PropertyDetails/PlusCircleIcon.d.ts +0 -7
  845. package/lib-esm/components/PropertyDetails/PlusCircleIcon.js +0 -11
  846. package/lib-esm/components/PropertyDetails/PropertyDetails.d.ts +0 -2
  847. package/lib-esm/components/PropertyDetails/PropertyDetails.js +0 -18
  848. package/lib-esm/components/PropertyDetails/SchemaTypeInfo.d.ts +0 -6
  849. package/lib-esm/components/PropertyDetails/SchemaTypeInfo.js +0 -16
  850. package/lib-esm/components/PropertyDetails/SimpleEnums.d.ts +0 -4
  851. package/lib-esm/components/PropertyDetails/SimpleEnums.js +0 -8
  852. package/lib-esm/components/PropertyDetails/cycleColorsByLevel.d.ts +0 -1
  853. package/lib-esm/components/PropertyDetails/cycleColorsByLevel.js +0 -2
  854. package/lib-esm/components/PropertyDetails/index.d.ts +0 -3
  855. package/lib-esm/components/PropertyDetails/index.js +0 -2
  856. package/lib-esm/components/PropertyDetails/styled.d.ts +0 -6
  857. package/lib-esm/components/PropertyDetails/styled.js +0 -23
  858. package/lib-esm/components/PropertyDetails/types.d.ts +0 -47
  859. package/lib-esm/components/PropertyDetails/types.js +0 -2
  860. package/lib-esm/components/RedoclyOpenAPIDocs/Providers.d.ts +0 -4
  861. package/lib-esm/components/RedoclyOpenAPIDocs/Providers.js +0 -2
  862. package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +0 -4
  863. package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +0 -2
  864. package/lib-esm/components/RedoclyOpenAPIDocs/index.d.ts +0 -4
  865. package/lib-esm/components/RedoclyOpenAPIDocs/index.js +0 -2
  866. package/lib-esm/components/RedoclyOpenAPIDocs/styled.d.ts +0 -1
  867. package/lib-esm/components/RedoclyOpenAPIDocs/styled.js +0 -22
  868. package/lib-esm/components/RedoclyOpenAPIDocs/types.d.ts +0 -47
  869. package/lib-esm/components/RedoclyOpenAPIDocs/types.js +0 -2
  870. package/lib-esm/components/RedoclyOpenAPIDocs/utils.d.ts +0 -8
  871. package/lib-esm/components/RedoclyOpenAPIDocs/utils.js +0 -2
  872. package/lib-esm/components/RenderHook/RenderHook.d.ts +0 -8
  873. package/lib-esm/components/RenderHook/RenderHook.js +0 -2
  874. package/lib-esm/components/RenderHook/index.d.ts +0 -1
  875. package/lib-esm/components/RenderHook/index.js +0 -2
  876. package/lib-esm/components/Replay/EmbeddedReplay.d.ts +0 -9
  877. package/lib-esm/components/Replay/EmbeddedReplay.js +0 -11
  878. package/lib-esm/components/Replay/Replay.d.ts +0 -9
  879. package/lib-esm/components/Replay/Replay.js +0 -2
  880. package/lib-esm/components/Replay/index.d.ts +0 -2
  881. package/lib-esm/components/Replay/index.js +0 -2
  882. package/lib-esm/components/Replay/utils.d.ts +0 -42
  883. package/lib-esm/components/Replay/utils.js +0 -2
  884. package/lib-esm/components/Request/RequestDetails.d.ts +0 -2
  885. package/lib-esm/components/Request/RequestDetails.js +0 -4
  886. package/lib-esm/components/Request/types.d.ts +0 -10
  887. package/lib-esm/components/Request/types.js +0 -2
  888. package/lib-esm/components/RequestParameters/Body.d.ts +0 -9
  889. package/lib-esm/components/RequestParameters/Body.js +0 -2
  890. package/lib-esm/components/RequestParameters/ParametersGroup.d.ts +0 -8
  891. package/lib-esm/components/RequestParameters/ParametersGroup.js +0 -21
  892. package/lib-esm/components/RequestParameters/RequestParameters.d.ts +0 -9
  893. package/lib-esm/components/RequestParameters/RequestParameters.js +0 -2
  894. package/lib-esm/components/RequestParameters/index.d.ts +0 -2
  895. package/lib-esm/components/RequestParameters/index.js +0 -2
  896. package/lib-esm/components/RequestSamples/CodeSample.d.ts +0 -16
  897. package/lib-esm/components/RequestSamples/CodeSample.js +0 -10
  898. package/lib-esm/components/RequestSamples/Example.d.ts +0 -9
  899. package/lib-esm/components/RequestSamples/Example.js +0 -2
  900. package/lib-esm/components/RequestSamples/RequestSamples.d.ts +0 -10
  901. package/lib-esm/components/RequestSamples/RequestSamples.js +0 -13
  902. package/lib-esm/components/RequestSamples/index.d.ts +0 -2
  903. package/lib-esm/components/RequestSamples/index.js +0 -2
  904. package/lib-esm/components/RequestSamples/useCodeSamples.d.ts +0 -10
  905. package/lib-esm/components/RequestSamples/useCodeSamples.js +0 -2
  906. package/lib-esm/components/ResponseSamples/ResponseSamples.d.ts +0 -12
  907. package/lib-esm/components/ResponseSamples/ResponseSamples.js +0 -2
  908. package/lib-esm/components/ResponseSamples/Summary.d.ts +0 -5
  909. package/lib-esm/components/ResponseSamples/Summary.js +0 -2
  910. package/lib-esm/components/ResponseSamples/index.d.ts +0 -1
  911. package/lib-esm/components/ResponseSamples/index.js +0 -2
  912. package/lib-esm/components/Responses/OperationResponseList.d.ts +0 -16
  913. package/lib-esm/components/Responses/OperationResponseList.js +0 -5
  914. package/lib-esm/components/Responses/ResponseDetails.d.ts +0 -2
  915. package/lib-esm/components/Responses/ResponseDetails.js +0 -2
  916. package/lib-esm/components/Responses/ResponseHeaders.d.ts +0 -2
  917. package/lib-esm/components/Responses/ResponseHeaders.js +0 -2
  918. package/lib-esm/components/Responses/index.d.ts +0 -3
  919. package/lib-esm/components/Responses/index.js +0 -2
  920. package/lib-esm/components/Responses/styled.d.ts +0 -5
  921. package/lib-esm/components/Responses/styled.js +0 -23
  922. package/lib-esm/components/Responses/types.d.ts +0 -13
  923. package/lib-esm/components/Responses/types.js +0 -2
  924. package/lib-esm/components/RightPanel/RightPanel.d.ts +0 -5
  925. package/lib-esm/components/RightPanel/RightPanel.js +0 -2
  926. package/lib-esm/components/RightPanel/index.d.ts +0 -1
  927. package/lib-esm/components/RightPanel/index.js +0 -2
  928. package/lib-esm/components/Samples/ExampleSwitch.d.ts +0 -14
  929. package/lib-esm/components/Samples/ExampleSwitch.js +0 -2
  930. package/lib-esm/components/Samples/index.d.ts +0 -2
  931. package/lib-esm/components/Samples/index.js +0 -2
  932. package/lib-esm/components/Samples/use-example-key.d.ts +0 -6
  933. package/lib-esm/components/Samples/use-example-key.js +0 -2
  934. package/lib-esm/components/Schema/ArraySchema.d.ts +0 -2
  935. package/lib-esm/components/Schema/ArraySchema.js +0 -2
  936. package/lib-esm/components/Schema/ObjectSchema.d.ts +0 -2
  937. package/lib-esm/components/Schema/ObjectSchema.js +0 -2
  938. package/lib-esm/components/Schema/OneOfSchema.d.ts +0 -2
  939. package/lib-esm/components/Schema/OneOfSchema.js +0 -11
  940. package/lib-esm/components/Schema/RecursiveSchema.d.ts +0 -2
  941. package/lib-esm/components/Schema/RecursiveSchema.js +0 -2
  942. package/lib-esm/components/Schema/Schema.d.ts +0 -2
  943. package/lib-esm/components/Schema/Schema.js +0 -6
  944. package/lib-esm/components/Schema/SubSchema.d.ts +0 -14
  945. package/lib-esm/components/Schema/SubSchema.js +0 -2
  946. package/lib-esm/components/Schema/helpers.d.ts +0 -5
  947. package/lib-esm/components/Schema/helpers.js +0 -2
  948. package/lib-esm/components/Schema/index.d.ts +0 -5
  949. package/lib-esm/components/Schema/index.js +0 -2
  950. package/lib-esm/components/Schema/types.d.ts +0 -38
  951. package/lib-esm/components/Schema/types.js +0 -2
  952. package/lib-esm/components/Schema/useOneOfLocationIdx.d.ts +0 -2
  953. package/lib-esm/components/Schema/useOneOfLocationIdx.js +0 -2
  954. package/lib-esm/components/SchemaDefinition/SchemaDefinition.d.ts +0 -8
  955. package/lib-esm/components/SchemaDefinition/SchemaDefinition.js +0 -4
  956. package/lib-esm/components/SchemaDefinition/index.d.ts +0 -1
  957. package/lib-esm/components/SchemaDefinition/index.js +0 -2
  958. package/lib-esm/components/SectionContent/SectionContent.d.ts +0 -17
  959. package/lib-esm/components/SectionContent/SectionContent.js +0 -14
  960. package/lib-esm/components/SectionContent/index.d.ts +0 -1
  961. package/lib-esm/components/SectionContent/index.js +0 -2
  962. package/lib-esm/components/SectionItem/SectionItem.d.ts +0 -7
  963. package/lib-esm/components/SectionItem/SectionItem.js +0 -2
  964. package/lib-esm/components/SectionItem/index.d.ts +0 -1
  965. package/lib-esm/components/SectionItem/index.js +0 -2
  966. package/lib-esm/components/Security/Divider.d.ts +0 -3
  967. package/lib-esm/components/Security/Divider.js +0 -15
  968. package/lib-esm/components/Security/OAuthFlow.d.ts +0 -6
  969. package/lib-esm/components/Security/OAuthFlow.js +0 -2
  970. package/lib-esm/components/Security/OAuthScopes.d.ts +0 -13
  971. package/lib-esm/components/Security/OAuthScopes.js +0 -34
  972. package/lib-esm/components/Security/Security.d.ts +0 -7
  973. package/lib-esm/components/Security/Security.js +0 -2
  974. package/lib-esm/components/Security/SecurityButton.d.ts +0 -10
  975. package/lib-esm/components/Security/SecurityButton.js +0 -31
  976. package/lib-esm/components/Security/SecurityFlow.d.ts +0 -5
  977. package/lib-esm/components/Security/SecurityFlow.js +0 -17
  978. package/lib-esm/components/Security/SecurityModal.d.ts +0 -8
  979. package/lib-esm/components/Security/SecurityModal.js +0 -45
  980. package/lib-esm/components/Security/SecuritySchemeItem.d.ts +0 -7
  981. package/lib-esm/components/Security/SecuritySchemeItem.js +0 -21
  982. package/lib-esm/components/Security/helper.d.ts +0 -2
  983. package/lib-esm/components/Security/helper.js +0 -2
  984. package/lib-esm/components/Security/index.d.ts +0 -1
  985. package/lib-esm/components/Security/index.js +0 -2
  986. package/lib-esm/components/Security/styled.d.ts +0 -2
  987. package/lib-esm/components/Security/styled.js +0 -14
  988. package/lib-esm/components/SelectOrLabel/SelectOrLabel.d.ts +0 -7
  989. package/lib-esm/components/SelectOrLabel/SelectOrLabel.js +0 -8
  990. package/lib-esm/components/SelectOrLabel/index.d.ts +0 -1
  991. package/lib-esm/components/SelectOrLabel/index.js +0 -2
  992. package/lib-esm/components/ServerList/ServerList.d.ts +0 -3
  993. package/lib-esm/components/ServerList/ServerList.js +0 -60
  994. package/lib-esm/components/ServerList/index.d.ts +0 -1
  995. package/lib-esm/components/ServerList/index.js +0 -2
  996. package/lib-esm/components/ServerList/types.d.ts +0 -5
  997. package/lib-esm/components/ServerList/types.js +0 -2
  998. package/lib-esm/components/ServerListDropdown/ServerListDropdown.d.ts +0 -7
  999. package/lib-esm/components/ServerListDropdown/ServerListDropdown.js +0 -2
  1000. package/lib-esm/components/ServerListDropdown/index.d.ts +0 -1
  1001. package/lib-esm/components/ServerListDropdown/index.js +0 -2
  1002. package/lib-esm/components/ServerListDropdown/styled.d.ts +0 -5
  1003. package/lib-esm/components/ServerListDropdown/styled.js +0 -23
  1004. package/lib-esm/components/SideMenu/SideMenu.d.ts +0 -8
  1005. package/lib-esm/components/SideMenu/SideMenu.js +0 -4
  1006. package/lib-esm/components/SideMenu/hooks/useMenuItems.d.ts +0 -7
  1007. package/lib-esm/components/SideMenu/hooks/useMenuItems.js +0 -2
  1008. package/lib-esm/components/SideMenu/index.d.ts +0 -1
  1009. package/lib-esm/components/SideMenu/index.js +0 -2
  1010. package/lib-esm/components/SideMenu/types.d.ts +0 -16
  1011. package/lib-esm/components/SideMenu/types.js +0 -2
  1012. package/lib-esm/components/StickySidebar/SidebarActions.d.ts +0 -1
  1013. package/lib-esm/components/StickySidebar/SidebarActions.js +0 -6
  1014. package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.d.ts +0 -9
  1015. package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.js +0 -25
  1016. package/lib-esm/components/StickySidebar/index.d.ts +0 -1
  1017. package/lib-esm/components/StickySidebar/index.js +0 -2
  1018. package/lib-esm/components/Tabs/Tabs.d.ts +0 -8
  1019. package/lib-esm/components/Tabs/Tabs.js +0 -35
  1020. package/lib-esm/components/Tabs/index.d.ts +0 -2
  1021. package/lib-esm/components/Tabs/index.js +0 -2
  1022. package/lib-esm/components/Tabs/useTabsState.d.ts +0 -11
  1023. package/lib-esm/components/Tabs/useTabsState.js +0 -2
  1024. package/lib-esm/components/TagItem/OperationNavigationItems.d.ts +0 -9
  1025. package/lib-esm/components/TagItem/OperationNavigationItems.js +0 -37
  1026. package/lib-esm/components/TagItem/OperationsNavigation.d.ts +0 -3
  1027. package/lib-esm/components/TagItem/OperationsNavigation.js +0 -7
  1028. package/lib-esm/components/TagItem/TagItem.d.ts +0 -9
  1029. package/lib-esm/components/TagItem/TagItem.js +0 -24
  1030. package/lib-esm/components/TagItem/index.d.ts +0 -1
  1031. package/lib-esm/components/TagItem/index.js +0 -2
  1032. package/lib-esm/components/TagItem/styled.d.ts +0 -1
  1033. package/lib-esm/components/TagItem/styled.js +0 -6
  1034. package/lib-esm/components/TagItem/types.d.ts +0 -5
  1035. package/lib-esm/components/TagItem/types.js +0 -2
  1036. package/lib-esm/components/ViewNested/ViewNested.d.ts +0 -13
  1037. package/lib-esm/components/ViewNested/ViewNested.js +0 -35
  1038. package/lib-esm/components/ViewNested/index.d.ts +0 -1
  1039. package/lib-esm/components/ViewNested/index.js +0 -2
  1040. package/lib-esm/components/common/Badges.d.ts +0 -13
  1041. package/lib-esm/components/common/Badges.js +0 -19
  1042. package/lib-esm/components/common/BodyContent/BodyContent.d.ts +0 -11
  1043. package/lib-esm/components/common/BodyContent/BodyContent.js +0 -28
  1044. package/lib-esm/components/common/BodyContent/index.d.ts +0 -1
  1045. package/lib-esm/components/common/BodyContent/index.js +0 -2
  1046. package/lib-esm/components/common/ClearButton/ClearButton.d.ts +0 -2
  1047. package/lib-esm/components/common/ClearButton/ClearButton.js +0 -2
  1048. package/lib-esm/components/common/ClearButton/index.d.ts +0 -2
  1049. package/lib-esm/components/common/ClearButton/index.js +0 -2
  1050. package/lib-esm/components/common/ClearButton/styled.d.ts +0 -1
  1051. package/lib-esm/components/common/ClearButton/styled.js +0 -16
  1052. package/lib-esm/components/common/ClearButton/types.d.ts +0 -6
  1053. package/lib-esm/components/common/ClearButton/types.js +0 -2
  1054. package/lib-esm/components/common/CodeBlockPanel.d.ts +0 -2
  1055. package/lib-esm/components/common/CodeBlockPanel.js +0 -6
  1056. package/lib-esm/components/common/ConstraintsView.d.ts +0 -4
  1057. package/lib-esm/components/common/ConstraintsView.js +0 -4
  1058. package/lib-esm/components/common/Dropdown/Dropdown.d.ts +0 -12
  1059. package/lib-esm/components/common/Dropdown/Dropdown.js +0 -27
  1060. package/lib-esm/components/common/Dropdown/index.d.ts +0 -2
  1061. package/lib-esm/components/common/Dropdown/index.js +0 -2
  1062. package/lib-esm/components/common/ExpandableExample/ExpandableExample.d.ts +0 -5
  1063. package/lib-esm/components/common/ExpandableExample/ExpandableExample.js +0 -10
  1064. package/lib-esm/components/common/ExpandableExample/index.d.ts +0 -1
  1065. package/lib-esm/components/common/ExpandableExample/index.js +0 -2
  1066. package/lib-esm/components/common/Extensions.d.ts +0 -6
  1067. package/lib-esm/components/common/Extensions.js +0 -4
  1068. package/lib-esm/components/common/Fields/fields-layout.d.ts +0 -15
  1069. package/lib-esm/components/common/Fields/fields-layout.js +0 -223
  1070. package/lib-esm/components/common/Fields/fields.d.ts +0 -38
  1071. package/lib-esm/components/common/Fields/fields.js +0 -93
  1072. package/lib-esm/components/common/Fields/index.d.ts +0 -2
  1073. package/lib-esm/components/common/Fields/index.js +0 -2
  1074. package/lib-esm/components/common/LinkToField.d.ts +0 -13
  1075. package/lib-esm/components/common/LinkToField.js +0 -20
  1076. package/lib-esm/components/common/OperationItemTitle.d.ts +0 -2
  1077. package/lib-esm/components/common/OperationItemTitle.js +0 -33
  1078. package/lib-esm/components/common/SchemaSelection/SchemaSelection.d.ts +0 -12
  1079. package/lib-esm/components/common/SchemaSelection/SchemaSelection.js +0 -2
  1080. package/lib-esm/components/common/SchemaSelection/index.d.ts +0 -1
  1081. package/lib-esm/components/common/SchemaSelection/index.js +0 -2
  1082. package/lib-esm/components/common/Select/Select.d.ts +0 -2
  1083. package/lib-esm/components/common/Select/Select.js +0 -2
  1084. package/lib-esm/components/common/Select/index.d.ts +0 -2
  1085. package/lib-esm/components/common/Select/index.js +0 -2
  1086. package/lib-esm/components/common/Select/styled.d.ts +0 -22
  1087. package/lib-esm/components/common/Select/styled.js +0 -111
  1088. package/lib-esm/components/common/Select/types.d.ts +0 -20
  1089. package/lib-esm/components/common/Select/types.js +0 -2
  1090. package/lib-esm/components/common/Skeleton/LanguageListSkeleton.d.ts +0 -4
  1091. package/lib-esm/components/common/Skeleton/LanguageListSkeleton.js +0 -23
  1092. package/lib-esm/components/common/Skeleton/Skeleton.d.ts +0 -5
  1093. package/lib-esm/components/common/Skeleton/Skeleton.js +0 -33
  1094. package/lib-esm/components/common/Skeleton/index.d.ts +0 -1
  1095. package/lib-esm/components/common/Skeleton/index.js +0 -2
  1096. package/lib-esm/components/common/headers.d.ts +0 -1
  1097. package/lib-esm/components/common/headers.js +0 -8
  1098. package/lib-esm/components/common/index.d.ts +0 -14
  1099. package/lib-esm/components/common/index.js +0 -2
  1100. package/lib-esm/components/common/linkify.d.ts +0 -10
  1101. package/lib-esm/components/common/linkify.js +0 -21
  1102. package/lib-esm/components/common/mixins.d.ts +0 -1
  1103. package/lib-esm/components/common/mixins.js +0 -5
  1104. package/lib-esm/components/common/panels.d.ts +0 -17
  1105. package/lib-esm/components/common/panels.js +0 -123
  1106. package/lib-esm/components/common/schema.d.ts +0 -7
  1107. package/lib-esm/components/common/schema.js +0 -74
  1108. package/lib-esm/components/common/styled.d.ts +0 -7
  1109. package/lib-esm/components/common/styled.js +0 -59
  1110. package/lib-esm/components/index.d.ts +0 -23
  1111. package/lib-esm/components/index.js +0 -2
  1112. package/lib-esm/components/pluggable/RedocExample.d.ts +0 -11
  1113. package/lib-esm/components/pluggable/RedocExample.js +0 -2
  1114. package/lib-esm/components/pluggable/RedocSchema.d.ts +0 -10
  1115. package/lib-esm/components/pluggable/RedocSchema.js +0 -2
  1116. package/lib-esm/components/pluggable/index.d.ts +0 -2
  1117. package/lib-esm/components/pluggable/index.js +0 -2
  1118. package/lib-esm/components/pluggable/styled.components.d.ts +0 -7
  1119. package/lib-esm/components/pluggable/styled.components.js +0 -13
  1120. package/lib-esm/constants.d.ts +0 -25
  1121. package/lib-esm/constants.js +0 -2
  1122. package/lib-esm/empty.d.ts +0 -2
  1123. package/lib-esm/empty.js +0 -2
  1124. package/lib-esm/events/codeSampleCopy.d.ts +0 -2
  1125. package/lib-esm/events/codeSampleCopy.js +0 -2
  1126. package/lib-esm/events/creator.d.ts +0 -2
  1127. package/lib-esm/events/creator.js +0 -2
  1128. package/lib-esm/events/index.d.ts +0 -8
  1129. package/lib-esm/events/index.js +0 -2
  1130. package/lib-esm/events/languageSwitch.d.ts +0 -2
  1131. package/lib-esm/events/languageSwitch.js +0 -2
  1132. package/lib-esm/events/panelToggle.d.ts +0 -2
  1133. package/lib-esm/events/panelToggle.js +0 -2
  1134. package/lib-esm/events/serverSwitch.d.ts +0 -2
  1135. package/lib-esm/events/serverSwitch.js +0 -2
  1136. package/lib-esm/events/tryItOpen.d.ts +0 -2
  1137. package/lib-esm/events/tryItOpen.js +0 -2
  1138. package/lib-esm/events/tryItSent.d.ts +0 -2
  1139. package/lib-esm/events/tryItSent.js +0 -2
  1140. package/lib-esm/events/types.d.ts +0 -83
  1141. package/lib-esm/events/types.js +0 -2
  1142. package/lib-esm/hoc/types.d.ts +0 -51
  1143. package/lib-esm/hoc/types.js +0 -2
  1144. package/lib-esm/hoc/utils.d.ts +0 -2
  1145. package/lib-esm/hoc/utils.js +0 -2
  1146. package/lib-esm/hoc/withRouter.d.ts +0 -3
  1147. package/lib-esm/hoc/withRouter.js +0 -2
  1148. package/lib-esm/hoc/withStore.d.ts +0 -3
  1149. package/lib-esm/hoc/withStore.js +0 -2
  1150. package/lib-esm/hooks/index.d.ts +0 -8
  1151. package/lib-esm/hooks/index.js +0 -2
  1152. package/lib-esm/hooks/useActivateExample.d.ts +0 -2
  1153. package/lib-esm/hooks/useActivateExample.js +0 -2
  1154. package/lib-esm/hooks/useActiveWithFallback.d.ts +0 -3
  1155. package/lib-esm/hooks/useActiveWithFallback.js +0 -2
  1156. package/lib-esm/hooks/useContentItems.d.ts +0 -12
  1157. package/lib-esm/hooks/useContentItems.js +0 -2
  1158. package/lib-esm/hooks/useLicense.d.ts +0 -5
  1159. package/lib-esm/hooks/useLicense.js +0 -2
  1160. package/lib-esm/hooks/usePerformanceMetrics.d.ts +0 -5
  1161. package/lib-esm/hooks/usePerformanceMetrics.js +0 -2
  1162. package/lib-esm/hooks/useRouter.d.ts +0 -13
  1163. package/lib-esm/hooks/useRouter.js +0 -2
  1164. package/lib-esm/hooks/useTelemetry.d.ts +0 -2
  1165. package/lib-esm/hooks/useTelemetry.js +0 -2
  1166. package/lib-esm/hooks/useTranslate.d.ts +0 -2
  1167. package/lib-esm/hooks/useTranslate.js +0 -2
  1168. package/lib-esm/hooks/useUppercase2LowercaseRedirect.d.ts +0 -1
  1169. package/lib-esm/hooks/useUppercase2LowercaseRedirect.js +0 -2
  1170. package/lib-esm/icons/CSharpIcon/CSharpIcon.d.ts +0 -4
  1171. package/lib-esm/icons/CSharpIcon/CSharpIcon.js +0 -2
  1172. package/lib-esm/icons/CSharpIcon/index.d.ts +0 -1
  1173. package/lib-esm/icons/CSharpIcon/index.js +0 -2
  1174. package/lib-esm/icons/CurlIcon/CurlIcon.d.ts +0 -6
  1175. package/lib-esm/icons/CurlIcon/CurlIcon.js +0 -15
  1176. package/lib-esm/icons/CurlIcon/index.d.ts +0 -1
  1177. package/lib-esm/icons/CurlIcon/index.js +0 -2
  1178. package/lib-esm/icons/GOIcon/GOIcon.d.ts +0 -4
  1179. package/lib-esm/icons/GOIcon/GOIcon.js +0 -2
  1180. package/lib-esm/icons/GOIcon/index.d.ts +0 -1
  1181. package/lib-esm/icons/GOIcon/index.js +0 -2
  1182. package/lib-esm/icons/JavaIcon/JavaIcon.d.ts +0 -4
  1183. package/lib-esm/icons/JavaIcon/JavaIcon.js +0 -2
  1184. package/lib-esm/icons/JavaIcon/index.d.ts +0 -1
  1185. package/lib-esm/icons/JavaIcon/index.js +0 -2
  1186. package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.d.ts +0 -4
  1187. package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.js +0 -2
  1188. package/lib-esm/icons/JavaScriptIcon/index.d.ts +0 -1
  1189. package/lib-esm/icons/JavaScriptIcon/index.js +0 -2
  1190. package/lib-esm/icons/NodeJSIcon/NodeJSIcon.d.ts +0 -4
  1191. package/lib-esm/icons/NodeJSIcon/NodeJSIcon.js +0 -2
  1192. package/lib-esm/icons/NodeJSIcon/index.d.ts +0 -1
  1193. package/lib-esm/icons/NodeJSIcon/index.js +0 -2
  1194. package/lib-esm/icons/PHPIcon/PHPIcon.d.ts +0 -4
  1195. package/lib-esm/icons/PHPIcon/PHPIcon.js +0 -2
  1196. package/lib-esm/icons/PHPIcon/index.d.ts +0 -1
  1197. package/lib-esm/icons/PHPIcon/index.js +0 -2
  1198. package/lib-esm/icons/PayloadIcon/PayloadIcon.d.ts +0 -4
  1199. package/lib-esm/icons/PayloadIcon/PayloadIcon.js +0 -2
  1200. package/lib-esm/icons/PayloadIcon/index.d.ts +0 -1
  1201. package/lib-esm/icons/PayloadIcon/index.js +0 -2
  1202. package/lib-esm/icons/PythonIcon/PythonIcon.d.ts +0 -4
  1203. package/lib-esm/icons/PythonIcon/PythonIcon.js +0 -2
  1204. package/lib-esm/icons/PythonIcon/index.d.ts +0 -1
  1205. package/lib-esm/icons/PythonIcon/index.js +0 -2
  1206. package/lib-esm/icons/RIcon/RIcon.d.ts +0 -4
  1207. package/lib-esm/icons/RIcon/RIcon.js +0 -2
  1208. package/lib-esm/icons/RIcon/index.d.ts +0 -1
  1209. package/lib-esm/icons/RIcon/index.js +0 -2
  1210. package/lib-esm/icons/RubyIcon/RubyIcon.d.ts +0 -4
  1211. package/lib-esm/icons/RubyIcon/RubyIcon.js +0 -2
  1212. package/lib-esm/icons/RubyIcon/index.d.ts +0 -1
  1213. package/lib-esm/icons/RubyIcon/index.js +0 -2
  1214. package/lib-esm/index.d.ts +0 -44
  1215. package/lib-esm/index.js +0 -2
  1216. package/lib-esm/jotai/app.d.ts +0 -51
  1217. package/lib-esm/jotai/app.js +0 -2
  1218. package/lib-esm/jotai/operation.d.ts +0 -37
  1219. package/lib-esm/jotai/operation.js +0 -2
  1220. package/lib-esm/jotai/replay.d.ts +0 -7
  1221. package/lib-esm/jotai/replay.js +0 -2
  1222. package/lib-esm/jotai/store.d.ts +0 -16
  1223. package/lib-esm/jotai/store.js +0 -2
  1224. package/lib-esm/jotai/use-write-atom.d.ts +0 -1
  1225. package/lib-esm/jotai/use-write-atom.js +0 -2
  1226. package/lib-esm/models/callback.d.ts +0 -5
  1227. package/lib-esm/models/callback.js +0 -2
  1228. package/lib-esm/models/code-sample-options.d.ts +0 -8
  1229. package/lib-esm/models/code-sample-options.js +0 -2
  1230. package/lib-esm/models/example.d.ts +0 -9
  1231. package/lib-esm/models/example.js +0 -2
  1232. package/lib-esm/models/field.d.ts +0 -7
  1233. package/lib-esm/models/field.js +0 -2
  1234. package/lib-esm/models/group.d.ts +0 -4
  1235. package/lib-esm/models/group.js +0 -2
  1236. package/lib-esm/models/index.d.ts +0 -15
  1237. package/lib-esm/models/index.js +0 -2
  1238. package/lib-esm/models/mediaContent.d.ts +0 -7
  1239. package/lib-esm/models/mediaContent.js +0 -2
  1240. package/lib-esm/models/mediaType.d.ts +0 -19
  1241. package/lib-esm/models/mediaType.js +0 -2
  1242. package/lib-esm/models/operation.d.ts +0 -20
  1243. package/lib-esm/models/operation.js +0 -2
  1244. package/lib-esm/models/request.d.ts +0 -12
  1245. package/lib-esm/models/request.js +0 -2
  1246. package/lib-esm/models/response.d.ts +0 -14
  1247. package/lib-esm/models/response.js +0 -2
  1248. package/lib-esm/models/schema.d.ts +0 -13
  1249. package/lib-esm/models/schema.js +0 -2
  1250. package/lib-esm/models/security.d.ts +0 -8
  1251. package/lib-esm/models/security.js +0 -2
  1252. package/lib-esm/models/tab.d.ts +0 -4
  1253. package/lib-esm/models/tab.js +0 -2
  1254. package/lib-esm/models/types.d.ts +0 -265
  1255. package/lib-esm/models/types.js +0 -2
  1256. package/lib-esm/services/OpenAPIParser.d.ts +0 -52
  1257. package/lib-esm/services/OpenAPIParser.js +0 -2
  1258. package/lib-esm/services/check.d.ts +0 -13
  1259. package/lib-esm/services/check.js +0 -2
  1260. package/lib-esm/services/code-samples/constants.d.ts +0 -2
  1261. package/lib-esm/services/code-samples/constants.js +0 -2
  1262. package/lib-esm/services/code-samples/generator.d.ts +0 -29
  1263. package/lib-esm/services/code-samples/generator.js +0 -2
  1264. package/lib-esm/services/code-samples/httpsnippet/helpers/code-builder.d.ts +0 -83
  1265. package/lib-esm/services/code-samples/httpsnippet/helpers/code-builder.js +0 -2
  1266. package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +0 -28
  1267. package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.js +0 -2
  1268. package/lib-esm/services/code-samples/httpsnippet/helpers/constants.d.ts +0 -24
  1269. package/lib-esm/services/code-samples/httpsnippet/helpers/constants.js +0 -2
  1270. package/lib-esm/services/code-samples/httpsnippet/helpers/lodash-int.d.ts +0 -5
  1271. package/lib-esm/services/code-samples/httpsnippet/helpers/lodash-int.js +0 -2
  1272. package/lib-esm/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.d.ts +0 -30
  1273. package/lib-esm/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.js +0 -2
  1274. package/lib-esm/services/code-samples/httpsnippet/helpers/reducer.d.ts +0 -1
  1275. package/lib-esm/services/code-samples/httpsnippet/helpers/reducer.js +0 -2
  1276. package/lib-esm/services/code-samples/httpsnippet/helpers/shell.d.ts +0 -10
  1277. package/lib-esm/services/code-samples/httpsnippet/helpers/shell.js +0 -2
  1278. package/lib-esm/services/code-samples/httpsnippet/helpers/string-utility.d.ts +0 -7
  1279. package/lib-esm/services/code-samples/httpsnippet/helpers/string-utility.js +0 -2
  1280. package/lib-esm/services/code-samples/httpsnippet/index.d.ts +0 -47
  1281. package/lib-esm/services/code-samples/httpsnippet/index.js +0 -2
  1282. package/lib-esm/services/code-samples/httpsnippet/targets/__mocks__/mock.d.ts +0 -3565
  1283. package/lib-esm/services/code-samples/httpsnippet/targets/__mocks__/mock.js +0 -2
  1284. package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +0 -10
  1285. package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.js +0 -2
  1286. package/lib-esm/services/code-samples/httpsnippet/targets/csharp/index.d.ts +0 -10
  1287. package/lib-esm/services/code-samples/httpsnippet/targets/csharp/index.js +0 -2
  1288. package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.d.ts +0 -10
  1289. package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.js +0 -2
  1290. package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.d.ts +0 -10
  1291. package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.js +0 -2
  1292. package/lib-esm/services/code-samples/httpsnippet/targets/go/index.d.ts +0 -10
  1293. package/lib-esm/services/code-samples/httpsnippet/targets/go/index.js +0 -2
  1294. package/lib-esm/services/code-samples/httpsnippet/targets/go/native.d.ts +0 -10
  1295. package/lib-esm/services/code-samples/httpsnippet/targets/go/native.js +0 -2
  1296. package/lib-esm/services/code-samples/httpsnippet/targets/index.d.ts +0 -115
  1297. package/lib-esm/services/code-samples/httpsnippet/targets/index.js +0 -2
  1298. package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +0 -10
  1299. package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.js +0 -2
  1300. package/lib-esm/services/code-samples/httpsnippet/targets/java/index.d.ts +0 -10
  1301. package/lib-esm/services/code-samples/httpsnippet/targets/java/index.js +0 -2
  1302. package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +0 -10
  1303. package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.js +0 -2
  1304. package/lib-esm/services/code-samples/httpsnippet/targets/java8/index.d.ts +0 -10
  1305. package/lib-esm/services/code-samples/httpsnippet/targets/java8/index.js +0 -2
  1306. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +0 -10
  1307. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.js +0 -2
  1308. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/index.d.ts +0 -12
  1309. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/index.js +0 -2
  1310. package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.d.ts +0 -10
  1311. package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.js +0 -2
  1312. package/lib-esm/services/code-samples/httpsnippet/targets/node/index.d.ts +0 -10
  1313. package/lib-esm/services/code-samples/httpsnippet/targets/node/index.js +0 -2
  1314. package/lib-esm/services/code-samples/httpsnippet/targets/php/curl.d.ts +0 -10
  1315. package/lib-esm/services/code-samples/httpsnippet/targets/php/curl.js +0 -2
  1316. package/lib-esm/services/code-samples/httpsnippet/targets/php/index.d.ts +0 -10
  1317. package/lib-esm/services/code-samples/httpsnippet/targets/php/index.js +0 -2
  1318. package/lib-esm/services/code-samples/httpsnippet/targets/php/types.d.ts +0 -11
  1319. package/lib-esm/services/code-samples/httpsnippet/targets/php/types.js +0 -2
  1320. package/lib-esm/services/code-samples/httpsnippet/targets/php/utils.d.ts +0 -2
  1321. package/lib-esm/services/code-samples/httpsnippet/targets/php/utils.js +0 -2
  1322. package/lib-esm/services/code-samples/httpsnippet/targets/python/index.d.ts +0 -10
  1323. package/lib-esm/services/code-samples/httpsnippet/targets/python/index.js +0 -2
  1324. package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.d.ts +0 -4
  1325. package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.js +0 -2
  1326. package/lib-esm/services/code-samples/httpsnippet/targets/r/httr.d.ts +0 -4
  1327. package/lib-esm/services/code-samples/httpsnippet/targets/r/httr.js +0 -2
  1328. package/lib-esm/services/code-samples/httpsnippet/targets/r/index.d.ts +0 -10
  1329. package/lib-esm/services/code-samples/httpsnippet/targets/r/index.js +0 -2
  1330. package/lib-esm/services/code-samples/httpsnippet/targets/r/utils.d.ts +0 -5
  1331. package/lib-esm/services/code-samples/httpsnippet/targets/r/utils.js +0 -2
  1332. package/lib-esm/services/code-samples/httpsnippet/targets/ruby/index.d.ts +0 -10
  1333. package/lib-esm/services/code-samples/httpsnippet/targets/ruby/index.js +0 -2
  1334. package/lib-esm/services/code-samples/httpsnippet/targets/ruby/native.d.ts +0 -10
  1335. package/lib-esm/services/code-samples/httpsnippet/targets/ruby/native.js +0 -2
  1336. package/lib-esm/services/code-samples/httpsnippet/targets/shell/curl.d.ts +0 -10
  1337. package/lib-esm/services/code-samples/httpsnippet/targets/shell/curl.js +0 -2
  1338. package/lib-esm/services/code-samples/httpsnippet/targets/shell/index.d.ts +0 -12
  1339. package/lib-esm/services/code-samples/httpsnippet/targets/shell/index.js +0 -2
  1340. package/lib-esm/services/code-samples/index.d.ts +0 -2
  1341. package/lib-esm/services/code-samples/index.js +0 -2
  1342. package/lib-esm/services/code-samples/types.d.ts +0 -72
  1343. package/lib-esm/services/code-samples/types.js +0 -2
  1344. package/lib-esm/services/config-options/helpers.d.ts +0 -3
  1345. package/lib-esm/services/config-options/helpers.js +0 -2
  1346. package/lib-esm/services/config-options/index.d.ts +0 -2
  1347. package/lib-esm/services/config-options/index.js +0 -2
  1348. package/lib-esm/services/config-options/normalizeOptions.d.ts +0 -3
  1349. package/lib-esm/services/config-options/normalizeOptions.js +0 -2
  1350. package/lib-esm/services/config-options/types.d.ts +0 -55
  1351. package/lib-esm/services/config-options/types.js +0 -2
  1352. package/lib-esm/services/history/helpers.d.ts +0 -5
  1353. package/lib-esm/services/history/helpers.js +0 -2
  1354. package/lib-esm/services/history/index.d.ts +0 -1
  1355. package/lib-esm/services/history/index.js +0 -2
  1356. package/lib-esm/services/index.d.ts +0 -8
  1357. package/lib-esm/services/index.js +0 -2
  1358. package/lib-esm/services/menu/builder.d.ts +0 -8
  1359. package/lib-esm/services/menu/builder.js +0 -2
  1360. package/lib-esm/services/menu/index.d.ts +0 -1
  1361. package/lib-esm/services/menu/index.js +0 -2
  1362. package/lib-esm/services/menu/markdown.d.ts +0 -8
  1363. package/lib-esm/services/menu/markdown.js +0 -2
  1364. package/lib-esm/services/menu/operation.d.ts +0 -10
  1365. package/lib-esm/services/menu/operation.js +0 -2
  1366. package/lib-esm/services/menu/tags.d.ts +0 -27
  1367. package/lib-esm/services/menu/tags.js +0 -2
  1368. package/lib-esm/services/types.d.ts +0 -126
  1369. package/lib-esm/services/types.js +0 -2
  1370. package/lib-esm/services/utils.d.ts +0 -18
  1371. package/lib-esm/services/utils.js +0 -2
  1372. package/lib-esm/standalone.d.ts +0 -24
  1373. package/lib-esm/standalone.js +0 -2
  1374. package/lib-esm/types/app.d.ts +0 -6
  1375. package/lib-esm/types/app.js +0 -2
  1376. package/lib-esm/types/index.d.ts +0 -3
  1377. package/lib-esm/types/index.js +0 -2
  1378. package/lib-esm/types/open-api.d.ts +0 -368
  1379. package/lib-esm/types/open-api.js +0 -2
  1380. package/lib-esm/types/security.d.ts +0 -11
  1381. package/lib-esm/types/security.js +0 -2
  1382. package/lib-esm/utils/JsonPointer.d.ts +0 -51
  1383. package/lib-esm/utils/JsonPointer.js +0 -2
  1384. package/lib-esm/utils/areArraysEqual.d.ts +0 -1
  1385. package/lib-esm/utils/areArraysEqual.js +0 -2
  1386. package/lib-esm/utils/argValuesHelpers.d.ts +0 -4
  1387. package/lib-esm/utils/argValuesHelpers.js +0 -2
  1388. package/lib-esm/utils/compose.d.ts +0 -1
  1389. package/lib-esm/utils/compose.js +0 -2
  1390. package/lib-esm/utils/configure-helpers.d.ts +0 -11
  1391. package/lib-esm/utils/configure-helpers.js +0 -2
  1392. package/lib-esm/utils/cookies.d.ts +0 -7
  1393. package/lib-esm/utils/cookies.js +0 -2
  1394. package/lib-esm/utils/createParsedDocument.d.ts +0 -2
  1395. package/lib-esm/utils/createParsedDocument.js +0 -2
  1396. package/lib-esm/utils/debounce.d.ts +0 -1
  1397. package/lib-esm/utils/debounce.js +0 -2
  1398. package/lib-esm/utils/debug.d.ts +0 -2
  1399. package/lib-esm/utils/debug.js +0 -2
  1400. package/lib-esm/utils/dom.d.ts +0 -7
  1401. package/lib-esm/utils/dom.js +0 -2
  1402. package/lib-esm/utils/environments.d.ts +0 -4
  1403. package/lib-esm/utils/environments.js +0 -2
  1404. package/lib-esm/utils/helpers.d.ts +0 -46
  1405. package/lib-esm/utils/helpers.js +0 -2
  1406. package/lib-esm/utils/index.d.ts +0 -23
  1407. package/lib-esm/utils/index.js +0 -2
  1408. package/lib-esm/utils/isMobile.d.ts +0 -5
  1409. package/lib-esm/utils/isMobile.js +0 -2
  1410. package/lib-esm/utils/loadAndBundleSpec.d.ts +0 -3
  1411. package/lib-esm/utils/loadAndBundleSpec.js +0 -2
  1412. package/lib-esm/utils/local-storage.d.ts +0 -2
  1413. package/lib-esm/utils/local-storage.js +0 -2
  1414. package/lib-esm/utils/object.d.ts +0 -3
  1415. package/lib-esm/utils/object.js +0 -2
  1416. package/lib-esm/utils/openapi.d.ts +0 -43
  1417. package/lib-esm/utils/openapi.js +0 -2
  1418. package/lib-esm/utils/parameters.d.ts +0 -2
  1419. package/lib-esm/utils/parameters.js +0 -2
  1420. package/lib-esm/utils/path.d.ts +0 -4
  1421. package/lib-esm/utils/path.js +0 -2
  1422. package/lib-esm/utils/queryString.d.ts +0 -9
  1423. package/lib-esm/utils/queryString.js +0 -2
  1424. package/lib-esm/utils/replaceVariables.d.ts +0 -2
  1425. package/lib-esm/utils/replaceVariables.js +0 -2
  1426. package/lib-esm/utils/saveTextBeforeHeading.d.ts +0 -7
  1427. package/lib-esm/utils/saveTextBeforeHeading.js +0 -2
  1428. package/lib-esm/utils/security-details.d.ts +0 -9
  1429. package/lib-esm/utils/security-details.js +0 -2
  1430. package/lib-esm/utils/session-storage.d.ts +0 -2
  1431. package/lib-esm/utils/session-storage.js +0 -2
  1432. package/lib-esm/utils/simplifyAstStructure.d.ts +0 -2
  1433. package/lib-esm/utils/simplifyAstStructure.js +0 -2
  1434. package/lib-esm/utils/sort.d.ts +0 -6
  1435. package/lib-esm/utils/sort.js +0 -2
  1436. package/lib-esm/utils/string.d.ts +0 -13
  1437. package/lib-esm/utils/string.js +0 -2
  1438. package/lib-esm/utils/test-utils.d.ts +0 -1
  1439. package/lib-esm/utils/test-utils.js +0 -2
  1440. package/lib-esm/utils/theme-helpers.d.ts +0 -3
  1441. package/lib-esm/utils/theme-helpers.js +0 -4
@@ -1,6 +1,6 @@
1
- import type { OpenAPIRef, OpenAPIDefinition } from '../types';
2
- import type { MergedOpenAPISchema } from './types';
3
- import type { Options } from './config-options/types';
1
+ import type { OpenAPIRef, OpenAPIDefinition } from '../types/index.js';
2
+ import type { MergedOpenAPISchema } from './types.js';
3
+ import type { Options } from './config-options/types.js';
4
4
  /**
5
5
  * Loads and keeps spec. Provides raw spec operations
6
6
  */
@@ -1,2 +1 @@
1
- "use strict";var __rest=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OpenAPIParser=void 0,exports.pushRef=pushRef,exports.concatRefStacks=concatRefStacks;const theme_1=require("@redocly/theme"),utils_1=require("../utils"),JsonPointer_1=require("../utils/JsonPointer"),normalizeOptions_1=require("./config-options/normalizeOptions");function pushRef(e,t){return t&&e[e.length-1]!==t?[...e,t]:e}function concatRefStacks(e,t){return t?e.concat(t):e}class OpenAPIParser{constructor(e,t,r=(0,normalizeOptions_1.normalizeOptions)({})){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"definitionUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allowMergeRefs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"byRef",{enumerable:!0,configurable:!0,writable:!0,value:e=>{let t;if(this.definition){"#"!==e.charAt(0)&&(e="#"+e),e=(0,utils_1.tryDecodeURIComponent)(e);try{t=JsonPointer_1.JsonPointer.get(this.definition,e)}catch(e){}return t||{}}}}),this.definition=Object.assign({},e),this.validate(e),this.definition=e,this.allowMergeRefs=e.openapi.startsWith("3.1");const i=theme_1.IS_BROWSER?window.location.href:"";(0,theme_1.isString)(t)&&(this.definitionUrl=new URL(t,i).href)}validate(e){if((0,theme_1.isUndefined)(e.openapi))throw new Error("Document must be valid OpenAPI 3.0.0 definition")}isRef(e){return!!e&&(void 0!==e.$ref&&null!==e.$ref)}deref(e,t=[],r=!1,i=0){const n=null==e?void 0:e["x-refsStack"];if(t=concatRefStacks(t,n),i>5)return{resolved:Object.assign({},e,{"x-complex":!0}),refsStack:t};if(this.isRef(e)){const n=(0,utils_1.getDefinitionName)(e.$ref);if(n&&this.options.ignoreNamedSchemas.has(n))return{resolved:{type:"object",title:n},refsStack:t};let s=this.byRef(e.$ref);if(!s)throw new Error(`Failed to resolve $ref "${e.$ref}"`);if(t.includes(e.$ref))s=Object.assign({},s,{"x-circular-ref":!0});else if(this.isRef(s)){s=this.deref(s,t,r,i).resolved}return this.allowMergeRefs&&(s=this.mergeRefs(e,s,r)),{resolved:s,refsStack:pushRef(t,e.$ref)}}return{resolved:e,refsStack:concatRefStacks(t,n)}}mergeRefs(e,t,r){const{$ref:i}=e,n=__rest(e,["$ref"]),s=Object.keys(n);if(0===s.length)return t;if(r&&s.some((e=>!["description","title","externalDocs","x-refsStack","x-parentRefs","readOnly","writeOnly","x-complex"].includes(e)))){const e=n,{description:r,title:i,readOnly:s,writeOnly:o}=e;return{allOf:[{description:r,title:i,readOnly:s,writeOnly:o},t,__rest(e,["description","title","readOnly","writeOnly"])]}}return Object.assign(Object.assign({},t),n)}mergeAllOf(e,t,r,i="",n=0){var s;if(e["x-circular-ref"])return e;if(void 0===(e=this.hoistOneOfs(e)).allOf)return Object.assign({absolutePointer:i},e);let o=Object.assign(Object.assign({},e),{"x-parentRefs":[],absolutePointer:JsonPointer_1.JsonPointer.join(i,["allOf"]),allOf:void 0,title:0===n?e.title||(0,utils_1.getDefinitionName)(t):e.title});!(0,theme_1.isUndefined)(o.properties)&&(0,theme_1.isObject)(o.properties)&&(o.properties=Object.assign({},o.properties)),!(0,theme_1.isUndefined)(o.items)&&(0,theme_1.isObject)(o.items)&&(o.items=Object.assign({},o.items));const l=e.allOf.map(((e,t)=>{var s;const{resolved:l,refsStack:f}=this.deref(e,r,!0,n),a=e.$ref,c=a||JsonPointer_1.JsonPointer.join(i,[String(t)]);if(l["x-complex"])return{$ref:a,refsStack:pushRef(f,a),schema:{"x-complex":!0},absolutePointer:c};const p=this.mergeAllOf(l,a,f,c,n+1);return p["x-circular-ref"]&&p.allOf?void 0:(a&&(null===(s=o["x-parentRefs"])||void 0===s||s.push(...p["x-parentRefs"]||[],a)),{$ref:a,refsStack:pushRef(f,a),schema:p,absolutePointer:c})})).filter(Boolean);for(const[e,{schema:r,refsStack:i,absolutePointer:f}]of l.entries()){const l=r||{},{type:a,enum:c,properties:p,items:d,required:O,title:u,description:m,readOnly:h,writeOnly:y,oneOf:b,anyOf:_,"x-circular-ref":g,"x-complex":x}=l,j=__rest(l,["type","enum","properties","items","required","title","description","readOnly","writeOnly","oneOf","anyOf","x-circular-ref","x-complex"]);if(o.type===a||(0,theme_1.isUndefined)(o.type)||(0,theme_1.isUndefined)(a)||n){if((0,theme_1.isUndefined)(a)||(Array.isArray(a)&&Array.isArray(o.type)?o.type=[...a,...o.type]:o.type=a),(0,theme_1.isUndefined)(c)||(Array.isArray(c)&&Array.isArray(o.enum)?o.enum=Array.from(new Set([...c,...o.enum])):o.enum=c),!(0,theme_1.isUndefined)(p)&&(0,theme_1.isObject)(p)){o.properties=o.properties||{};for(const r in p){const l=concatRefStacks(i,null===(s=p[r])||void 0===s?void 0:s["x-refsStack"]);if(o.properties[r]){if(!g){const i=this.mergeAllOf({allOf:[o.properties[r],p[r]],"x-refsStack":l},t+"/properties/"+r,l,JsonPointer_1.JsonPointer.join(f,["allOf",String(e),"properties",r]),n+1);o.properties[r]=i}}else o.properties[r]=Object.assign(Object.assign({},p[r]),{absolutePointer:JsonPointer_1.JsonPointer.join(f,["properties",r]),"x-refsStack":l})}}if(!(0,theme_1.isUndefined)(d)&&!g&&!x){const e="boolean"==typeof o.items?{}:Object.assign({},o.items),s="boolean"==typeof r.items?{}:Object.assign({},r.items);o.items=this.mergeAllOf({allOf:[e,s]},t+"/items",i,"",n+1)}(0,theme_1.isUndefined)(b)||(o.oneOf=b),(0,theme_1.isUndefined)(_)||(o.anyOf=_),Array.isArray(O)&&(o.required=[...o.required||[],...O]),o=Object.assign(Object.assign(Object.assign({},o),{title:o.title||u,description:o.description||m,readOnly:(0,theme_1.isUndefined)(o.readOnly)?h:o.readOnly,writeOnly:(0,theme_1.isUndefined)(o.writeOnly)?y:o.writeOnly,"x-circular-ref":o["x-circular-ref"]||g,"x-complex":o["x-complex"]||x}),j)}}return o}findDerived(e){const t={},r=this.definition.components&&this.definition.components.schemas||{};for(const i in r){const{resolved:n}=this.deref(r[i]);!(0,theme_1.isUndefined)(n.allOf)&&n.allOf.find((t=>!(0,theme_1.isUndefined)(t.$ref)&&e.indexOf(t.$ref)>-1))&&(t["#/components/schemas/"+i]=[n["x-discriminator-value"]||i])}return t}hoistOneOfs(e){if((0,theme_1.isUndefined)(e.allOf))return e;const{allOf:t}=e,r=__rest(e,["allOf"]);for(let e=0;e<t.length;e++){const i=t[e],{oneOf:n}=i,s=__rest(i,["oneOf"]);if(n&&Array.isArray(n)){const i=t.slice(0,e),o=t.slice(e+1),l=Object.keys(s).length>0?[s]:[];return Object.assign(Object.assign({},r),{oneOf:n.map((e=>({allOf:[...i,...l,e,...o]})))})}}return e}}exports.OpenAPIParser=OpenAPIParser;
2
- //# sourceMappingURL=OpenAPIParser.js.map
1
+ import{IS_BROWSER as q,isObject as S,isString as E,isUndefined as o}from"@redocly/theme";import{tryDecodeURIComponent as B,getDefinitionName as v}from"../utils/index.js";import{JsonPointer as x}from"../utils/JsonPointer.js";import{normalizeOptions as W}from"./config-options/normalizeOptions.js";function A(m,e){return e&&m[m.length-1]!==e?[...m,e]:m}function R(m,e){return e?m.concat(e):m}class V{options;definitionUrl;definition;allowMergeRefs=!1;constructor(e,t,l=W({})){this.options=l,this.definition=Object.assign({},e),this.validate(e),this.definition=e,this.allowMergeRefs=e.openapi.startsWith("3.1");const n=q?window.location.href:"";E(t)&&(this.definitionUrl=new URL(t,n).href)}validate(e){if(o(e.openapi))throw new Error("Document must be valid OpenAPI 3.0.0 definition")}byRef=e=>{let t;if(this.definition){e.charAt(0)!=="#"&&(e="#"+e),e=B(e);try{t=x.get(this.definition,e)}catch{}return t||{}}};isRef(e){return e?(e=e,e.$ref!==void 0&&e.$ref!==null):!1}deref(e,t=[],l=!1,n=0){const i=e?.["x-refsStack"];if(t=R(t,i),n>5)return{resolved:Object.assign({},e,{"x-complex":!0}),refsStack:t};if(this.isRef(e)){const r=v(e.$ref);if(r&&this.options.ignoreNamedSchemas.has(r))return{resolved:{type:"object",title:r},refsStack:t};let s=this.byRef(e.$ref);if(!s)throw new Error(`Failed to resolve $ref "${e.$ref}"`);return t.includes(e.$ref)?s=Object.assign({},s,{"x-circular-ref":!0}):this.isRef(s)&&(s=this.deref(s,t,l,n).resolved),this.allowMergeRefs&&(s=this.mergeRefs(e,s,l)),{resolved:s,refsStack:A(t,e.$ref)}}return{resolved:e,refsStack:R(t,i)}}mergeRefs(e,t,l){const{$ref:n,...i}=e,r=Object.keys(i);if(r.length===0)return t;if(l&&r.some(s=>!["description","title","externalDocs","x-refsStack","x-parentRefs","readOnly","writeOnly","x-complex"].includes(s))){const{description:s,title:p,readOnly:u,writeOnly:d,...O}=i;return{allOf:[{description:s,title:p,readOnly:u,writeOnly:d},t,O]}}else return{...t,...i}}mergeAllOf(e,t,l,n="",i=0){if(e["x-circular-ref"])return e;if(e=this.hoistOneOfs(e),e.allOf===void 0)return{absolutePointer:n,...e};let r={...e,"x-parentRefs":[],absolutePointer:x.join(n,["allOf"]),allOf:void 0,title:i===0?e.title||v(t):e.title};!o(r.properties)&&S(r.properties)&&(r.properties={...r.properties}),!o(r.items)&&S(r.items)&&(r.items={...r.items});const s=e.allOf.map((p,u)=>{const{resolved:d,refsStack:O}=this.deref(p,l,!0,i),f=p.$ref,y=f||x.join(n,[String(u)]);if(d["x-complex"])return{$ref:f,refsStack:A(O,f),schema:{"x-complex":!0},absolutePointer:y};const a=this.mergeAllOf(d,f,O,y,i+1);if(!(a["x-circular-ref"]&&a.allOf))return f&&r["x-parentRefs"]?.push(...a["x-parentRefs"]||[],f),{$ref:f,refsStack:A(O,f),schema:a,absolutePointer:y}}).filter(Boolean);for(const[p,{schema:u,refsStack:d,absolutePointer:O}]of s.entries()){const{type:f,enum:y,properties:a,items:b,required:w,title:I,description:D,readOnly:C,writeOnly:M,oneOf:$,anyOf:k,"x-circular-ref":g,"x-complex":P,...N}=u||{};if(!(r.type!==f&&!o(r.type)&&!o(f)&&!i)){if(o(f)||(Array.isArray(f)&&Array.isArray(r.type)?r.type=[...f,...r.type]:r.type=f),o(y)||(Array.isArray(y)&&Array.isArray(r.enum)?r.enum=Array.from(new Set([...y,...r.enum])):r.enum=y),!o(a)&&S(a)){r.properties=r.properties||{};for(const c in a){const h=R(d,a[c]?.["x-refsStack"]);if(!r.properties[c])r.properties[c]={...a[c],absolutePointer:x.join(O,["properties",c]),"x-refsStack":h};else if(!g){const U=this.mergeAllOf({allOf:[r.properties[c],a[c]],"x-refsStack":h},t+"/properties/"+c,h,x.join(O,["allOf",String(p),"properties",c]),i+1);r.properties[c]=U}}}if(!o(b)&&!g&&!P){const c=typeof r.items=="boolean"?{}:Object.assign({},r.items),h=typeof u.items=="boolean"?{}:Object.assign({},u.items);r.items=this.mergeAllOf({allOf:[c,h]},t+"/items",d,"",i+1)}o($)||(r.oneOf=$),o(k)||(r.anyOf=k),Array.isArray(w)&&(r.required=[...r.required||[],...w]),r={...r,title:r.title||I,description:r.description||D,readOnly:o(r.readOnly)?C:r.readOnly,writeOnly:o(r.writeOnly)?M:r.writeOnly,"x-circular-ref":r["x-circular-ref"]||g,"x-complex":r["x-complex"]||P,...N}}}return r}findDerived(e){const t={},l=this.definition.components&&this.definition.components.schemas||{};for(const n in l){const{resolved:i}=this.deref(l[n]);!o(i.allOf)&&i.allOf.find(r=>!o(r.$ref)&&e.indexOf(r.$ref)>-1)&&(t["#/components/schemas/"+n]=[i["x-discriminator-value"]||n])}return t}hoistOneOfs(e){if(o(e.allOf))return e;const{allOf:t,...l}=e;for(let n=0;n<t.length;n++){const{oneOf:i,...r}=t[n];if(i&&Array.isArray(i)){const s=t.slice(0,n),p=t.slice(n+1),u=Object.keys(r).length>0?[r]:[];return{...l,oneOf:i.map(d=>({allOf:[...s,...u,d,...p]}))}}}return e}}export{V as OpenAPIParser,R as concatRefStacks,A as pushRef};
@@ -1,2 +1 @@
1
- "use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function s(t){try{a(o.next(t))}catch(t){r(t)}}function l(t){try{a(o.throw(t))}catch(t){r(t)}}function a(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,l)}a((o=o.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.isHostAllowed=isHostAllowed,exports.default=parse;const utils_1=require("./utils");function promisifyIECryptoRes(t){return"then"in t?t:new Promise((e=>{t.oncomplete=t=>{e(t.target.result)}}))}function str2ab(t){const e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let e=0,o=t.length;e<o;e++)n[e]=t.charCodeAt(e);return e}const getKey=()=>{const t=str2ab(atob("undefined"!=typeof REDOCLY_PUBLIC_KEY?REDOCLY_PUBLIC_KEY:"MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMHjNir5fXx/ZXoaEeXQ5XyxbNJ4YJYczoCRdSkL6NLzw1FHnng5Vfcgk5+bvox9QRYRbuk84mA4f2NhywDbXKECAwEAAQ=="));return promisifyIECryptoRes(null===utils_1.cryptoLib||void 0===utils_1.cryptoLib?void 0:utils_1.cryptoLib.subtle.importKey("spki",t,{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},!0,["verify"]))};function textEncode(t){if(window.TextEncoder)return(new TextEncoder).encode(t);const e=unescape(encodeURIComponent(t)),n=new Uint8Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return n}function verify(t,e){return __awaiter(this,void 0,void 0,(function*(){return promisifyIECryptoRes(null===utils_1.cryptoLib||void 0===utils_1.cryptoLib?void 0:utils_1.cryptoLib.subtle.verify({name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},yield getKey(),str2ab(atob(e)),textEncode(t)))}))}function isHostAllowed(t,e){return!0===e||!(!Array.isArray(e)||"undefined"==typeof window)&&(!("localhost"!==t&&"127.0.0.1"!==t&&!t.endsWith(".localhost")&&!e.find((e=>e===t||t.endsWith("."+e))))||!!e.find((e=>{if(e.indexOf("*")!==e.lastIndexOf("*"))return;const[n,o]=e.split("*");return o&&t.startsWith(n)&&t.endsWith(o)&&o.split(".").length>2})))}function parse(t){return __awaiter(this,void 0,void 0,(function*(){if("development"===process.env.NODE_ENV)return{valid:!0,allowed:!0};const e=window.location.hostname;if(!t)return"localhost"===e||"127.0.0.1"===e||e.endsWith(".localhost")?{local:!0}:{};const[n,o]=t.split(".");let i;try{if(!(yield verify(atob(n),o)))return{valid:!1};i=JSON.parse(atob(n))}catch(t){return{valid:!1,cryptoMissing:!0}}return i.valid=!0,(!i.e||Date.now()/1e3>i.e)&&(i.expired=!0),i.allowed=isHostAllowed(e,i.h),i}))}
2
- //# sourceMappingURL=check.js.map
1
+ import{cryptoLib as o}from"./utils.js";function u(e){return"then"in e?e:new Promise(t=>{e.oncomplete=r=>{t(r.target.result)}})}function l(e){const t=new ArrayBuffer(e.length),r=new Uint8Array(t);for(let i=0,n=e.length;i<n;i++)r[i]=e.charCodeAt(i);return t}const a=()=>{const e=l(atob(typeof REDOCLY_PUBLIC_KEY<"u"?REDOCLY_PUBLIC_KEY:"MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMHjNir5fXx/ZXoaEeXQ5XyxbNJ4YJYczoCRdSkL6NLzw1FHnng5Vfcgk5+bvox9QRYRbuk84mA4f2NhywDbXKECAwEAAQ=="));return u(o?.subtle.importKey("spki",e,{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},!0,["verify"]))};function f(e){if(window.TextEncoder)return new TextEncoder().encode(e);const t=unescape(encodeURIComponent(e)),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}async function c(e,t){return u(o?.subtle.verify({name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},await a(),l(atob(t)),f(e)))}function s(e,t){return t===!0?!0:Array.isArray(t)&&typeof window<"u"?e==="localhost"||e==="127.0.0.1"||e.endsWith(".localhost")||t.find(r=>r===e||e.endsWith("."+r))?!0:!!t.find(r=>{if(r.indexOf("*")!==r.lastIndexOf("*"))return;const[i,n]=r.split("*");return n&&e.startsWith(i)&&e.endsWith(n)&&n.split(".").length>2}):!1}async function d(e){if(process.env.NODE_ENV==="development")return{valid:!0,allowed:!0};const t=window.location.hostname;if(!e)return t==="localhost"||t==="127.0.0.1"||t.endsWith(".localhost")?{local:!0}:{};const[r,i]=e.split(".");let n;try{if(!await c(atob(r),i))return{valid:!1};n=JSON.parse(atob(r))}catch{return{valid:!1,cryptoMissing:!0}}return n.valid=!0,(!n.e||Date.now()/1e3>n.e)&&(n.expired=!0),n.allowed=s(t,n.h),n}export{d as default,s as isHostAllowed};
@@ -1,2 +1,2 @@
1
- import type { Languages as LanguagesType } from './types';
1
+ import type { Languages as LanguagesType } from './types.js';
2
2
  export declare const Languages: Record<string, LanguagesType | 'Payload'>;
@@ -1,2 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Languages=void 0,exports.Languages={curl:"curl",JavaScript:"JavaScript",NodeJs:"Node.js",Python:"Python",Java:"Java",CSharp:"C#",PHP:"PHP",Go:"Go",Ruby:"Ruby",R:"R",Payload:"Payload"};
2
- //# sourceMappingURL=constants.js.map
1
+ const a={curl:"curl",JavaScript:"JavaScript",NodeJs:"Node.js",Python:"Python",Java:"Java",CSharp:"C#",PHP:"PHP",Go:"Go",Ruby:"Ruby",R:"R",Payload:"Payload"};export{a as Languages};
@@ -1,6 +1,6 @@
1
- import type { OperationModel } from '../../models';
2
- import type * as HAR from './har';
3
- import type { Languages } from './types';
1
+ import type { OperationModel } from '../../models/index.js';
2
+ import type * as HAR from './har.js';
3
+ import type { Languages } from './types.js';
4
4
  import type { TFunction } from '@redocly/theme';
5
5
  export type CustomHAR = HAR.Request & {
6
6
  securityOAuth2ExtraCalls?: HAR.Request[];
@@ -1,2 +1 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,a,s){void 0===s&&(s=a);var r=Object.getOwnPropertyDescriptor(t,a);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,s,r)}:function(e,t,a,s){void 0===s&&(s=a),e[s]=t[a]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&__createBinding(t,e,a);return __setModuleDefault(t,e),t},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCodeSample=getCodeSample,exports.getDataRequest=getDataRequest,exports.isDefined=isDefined,exports.capitalizeFirst=capitalizeFirst;const Sampler=__importStar(require("openapi-sampler")),deepmerge_1=__importDefault(require("deepmerge")),theme_1=require("@redocly/theme"),utils_1=require("../../utils"),utils_2=require("../utils"),constants_1=require("../../constants"),httpsnippet_1=require("./httpsnippet"),mediaContent_1=require("../../models/mediaContent"),string_utility_1=__importDefault(require("./httpsnippet/helpers/string-utility"));function getSelectedSecurityScheme(e,t){return e.find((e=>{const a=e.schemes.map((e=>e.id));return(0,utils_1.areArraysEqual)(a,t||[])}))}function mapOperationToHAR(e,{exampleName:t="",skipOptionalParameters:a=!1,withOAuth2Call:s=!1,spec:r,generatedPayloadSamplesMaxDepth:i=8,pathParams:n={},properties:l={},activeMimeName:o=""},{environment:u,requestValues:c,activeSecuritySchemeIds:d}){var p,m,v,f,_,h,y,g;const O=u.server,S=e.servers.find((e=>e.url===O))||e.servers[0],b=getSelectedSecurityScheme(e.security,d),{securityHeaders:T,securityCookies:C,securityQueries:j,securityOAuth2ExtraCalls:k,basicAuth:x}=getSecurityData(b||(null===(p=e.security)||void 0===p?void 0:p[0]),s,u),E=(null===(m=null==e?void 0:e.requestBody)||void 0===m?void 0:m.content)&&(0,mediaContent_1.getActiveMediaType)(e.requestBody.content,o),D={skipNonRequired:a,skipReadOnly:!0,maxSampleDepth:i,quiet:!0},A=c;let w=!1;const P=e.parameters.filter((e=>"header"===e.in)).filter((e=>!(a&&!e.required))).map((e=>{var t,a,s;return{name:e.name,value:(null===(t=A.header)||void 0===t?void 0:t[e.name])||(0,utils_1.getParameterValue)("header",e.name)||(null===(s=null===(a=e.serverValues)||void 0===a?void 0:a[O])||void 0===s?void 0:s.example)||e.example||(0,utils_1.serializeParameterValue)(e,Sampler.sample(e.schema.rawSchema,D,r))}})).map((e=>((null==E?void 0:E.name)&&"content-type"===e.name.toLowerCase()&&(w=!0,e.value=E.name),e))).concat(T);!w&&(null==E?void 0:E.name)&&P.unshift({name:"Content-Type",value:null==E?void 0:E.name});const q=e.parameters.filter((e=>"cookie"===e.in)).filter((e=>!(a&&!e.required))).map((e=>{var t,a;return utils_1.queryString.parse((0,utils_1.serializeParameterValue)(e,(null===(a=null===(t=e.serverValues)||void 0===t?void 0:t[O])||void 0===a?void 0:a.example)||e.example||Sampler.sample(e.schema.rawSchema,D,r)))})).reduce(((e,t)=>{var a;for(const[s,r]of Object.entries(t))e.push({name:s,value:String((null===(a=A.cookie)||void 0===a?void 0:a[s])||r)});return e}),[]).concat(C),M=e.parameters.filter((e=>"query"===e.in)).filter((e=>!(a&&!e.required))).map((e=>{var t,a;return utils_1.queryString.parse((0,utils_1.serializeParameterValue)(e,(null===(a=null===(t=e.serverValues)||void 0===t?void 0:t[O])||void 0===a?void 0:a.example)||e.example||Sampler.sample(e.schema.rawSchema,D,r)))})).reduce(((e,t)=>{var a,s,r;for(const[i,n]of Object.entries(t))e.push({name:i,value:(0,utils_1.isArrayOfObjects)(null===(a=A.query)||void 0===a?void 0:a[i])&&JSON.stringify((0,utils_1.deleteEmptyArrayItem)(null===(s=A.query)||void 0===s?void 0:s[i]))||String((null===(r=A.query)||void 0===r?void 0:r[i])||n)});return e}),[]).concat(j),R=`${null==S?void 0:S.url.replace(/\/$/,"")}/${e.path.replace(/^\//,"")}`,N=e.parameters.filter((e=>"path"===e.in)).reduce(((e,t)=>{var a,s,r;const{in:i,name:l}=t;return e[l]=(null===(a=A.path)||void 0===a?void 0:a[l])||(null===(r=null===(s=t.serverValues)||void 0===s?void 0:s[O])||void 0===r?void 0:r.example)||t.example||n[l]||(0,utils_1.getParameterValue)(i,l),e}),{}),H=null==E?void 0:E.name.toLowerCase(),U=H===constants_1.MediaTypes.MULTIPART||H===constants_1.MediaTypes.URL_ENCODED,V=U?null===(v=null==E?void 0:E.formExamples)||void 0===v?void 0:v[t]:null===(f=null==E?void 0:E.examples)||void 0===f?void 0:f[t],I=U?(null==E?void 0:E.formExamples)||{}:(null==E?void 0:E.examples)||{},[L]=Object.values(I),$=(null===(h=null===(_=null==V?void 0:V.serverValues)||void 0===_?void 0:_[O])||void 0===h?void 0:h.value)||(null===(g=null===(y=null==L?void 0:L.serverValues)||void 0===y?void 0:y[O])||void 0===g?void 0:g.value),z=e=>{var t;return e&&"object"==typeof e&&(null===(t=null==E?void 0:E.schema)||void 0===t?void 0:t.rawSchema)?Sampler.sample(populateXmlSchemaFields(E.schema.rawSchema,e),Object.assign(Object.assign({},D),{format:"xml"}),r):null},B=(()=>{if(null==A?void 0:A.body)return A.body;if(H!==constants_1.MediaTypes.XML)return $||(null==V?void 0:V.value)||(null==L?void 0:L.value)||(null==E?void 0:E.schema)&&Sampler.sample(E.schema.rawSchema,Object.assign(Object.assign({},D),{format:"json"}),r);{const e=z($)||z(null==V?void 0:V.value)||z(null==L?void 0:L.value);if(e)return e;if(null==E?void 0:E.schema)return Sampler.sample(E.schema.rawSchema,Object.assign(Object.assign({},D),{format:"xml"}),r)}return""})();let J="",Y=[];switch((0,utils_2.normalizeMimeType)(H)){case constants_1.MediaTypes.JSON:J=JSON.stringify(getDataRequest(B,l));break;case constants_1.MediaTypes.XML:J=B;break;case constants_1.MediaTypes.URL_ENCODED:case constants_1.MediaTypes.MULTIPART:J=utils_1.queryString.stringify(getDataRequest(B,l)),Y=objectToHarParams(getDataRequest(B,l));break;default:J=String(B||"")}const F=J?{mimeType:(null==E?void 0:E.name)||constants_1.MediaTypes.OCTET_STREAM,text:J,params:Y}:void 0,K=e.responses.map((e=>e.code));return{method:e.httpVerb,url:R,httpVersion:"HTTP/1.1",cookies:q,headers:P,queryString:M,postData:F,headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:k,basicAuth:x,pathParameters:N,serverVariables:u,allResponseCodes:K}}const defaultOptions={withImports:!0,withComments:!1},langToSnippetConfig={curl:{code:"shell",defaultTarget:"curl",defaultOptions:Object.assign(Object.assign({},defaultOptions),{short:!0})},JavaScript:{code:"javascript",defaultTarget:"fetch",defaultOptions:Object.assign(Object.assign({},defaultOptions),{withImports:!1})},"Node.js":{code:"node",defaultTarget:"fetch",defaultOptions:Object.assign({},defaultOptions)},Python:{code:"python",defaultTarget:"requests",defaultOptions:Object.assign({},defaultOptions)},"Java8+Apache":{code:"java8",defaultTarget:"apachehttp",defaultOptions:Object.assign({},defaultOptions)},Java:{code:"java",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},"C#":{code:"csharp",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},"C#+Newtonsoft":{code:"csharpNewtonsoft",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},Go:{code:"go",defaultTarget:"http.DefaultClient",defaultOptions:Object.assign({},defaultOptions)},PHP:{code:"php",defaultTarget:"curl",defaultOptions:Object.assign({},defaultOptions)},Ruby:{code:"ruby",defaultTarget:"net::http",defaultOptions:Object.assign({},defaultOptions)},R:{code:"r",defaultTarget:"httr",defaultOptions:Object.assign({},defaultOptions)}};function getCodeSample({lang:e,operation:t,exampleName:a,pathParams:s,properties:r,options:i={},environment:n,translate:l}){try{const{skipOptionalParameters:o,withOAuth2Call:u,spec:c,generatedPayloadSamplesMaxDepth:d,store:p,activeMimeName:m}=i,v=mapOperationToHAR(t,{exampleName:a,pathParams:s,properties:r,skipOptionalParameters:o,withOAuth2Call:u,spec:c,generatedPayloadSamplesMaxDepth:d,activeMimeName:m},{environment:n,requestValues:p.requestValues,activeSecuritySchemeIds:p.activeSecuritySchemeIds}),f=new httpsnippet_1.HTTPSnippet(v);return langToSnippetConfig[e]?f.convert(langToSnippetConfig[e].code,langToSnippetConfig[e].defaultTarget,Object.assign(Object.assign({},langToSnippetConfig[e].defaultOptions),i)):l("openapi.unsupportedLanguage","Language is not supported.")}catch(e){return console.error(e),l("openapi.failedToGenerateCodeSample","Failed to generate code sample.")}}function getSecurityData(e,t,a){var s,r,i,n,l;const o={securityHeaders:[],securityCookies:[],securityQueries:[],securityOAuth2ExtraCalls:[],basicAuth:void 0},u=null==a?void 0:a.server;for(const c of(null==e?void 0:e.schemes)||[]){const e=(0,utils_1.getSecurityDetails)(c.id,a),d=u&&c.serverValues&&c.serverValues[u],p={access_token:(null==d?void 0:d["x-defaultAccessToken"])||c["x-defaultAccessToken"],token_type:(null==d?void 0:d["x-defaultTokenType"])||c["x-defaultTokenType"],client_id:(null==d?void 0:d["x-defaultClientId"])||c["x-defaultClientId"],client_secret:(null==d?void 0:d["x-defaultClientSecret"])||c["x-defaultClientSecret"]},m=(null==d?void 0:d["x-defaultUsername"])||c["x-defaultUsername"],v=(null==d?void 0:d["x-defaultPassword"])||c["x-defaultPassword"],f=d&&"scopes"in d?d.scopes||[]:c.scopes||[];switch(c.type){case"openIdConnect":null===(s=o.securityHeaders)||void 0===s||s.push({name:"Authorization",value:p.access_token?`${p.token_type||"Bearer"} ${p.access_token}`:e.token?`${p.token_type||e.token.token_type||"Bearer"} ${e.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>"});break;case"oauth2":{const a=p.access_token?`${p.token_type||"Bearer"} ${p.access_token}`:e.token?`${e.token.token_type||"Bearer"} ${e.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>";c.flows.clientCredentials&&t?o.securityOAuth2ExtraCalls.push(getOAuth2ClientCredsCallHar(c.flows.clientCredentials,f,Object.assign(Object.assign({},e),{client_id:p.client_id||e.client_id,client_secret:p.client_secret||e.client_secret}))):c.flows.password&&t&&o.securityOAuth2ExtraCalls.push(getOAuth2PasswordCallHar(c.flows.password,f,Object.assign(Object.assign({},e),{client_id:p.client_id||e.client_id,client_secret:p.client_secret||e.client_secret}))),null===(r=o.securityHeaders)||void 0===r||r.push({name:"Authorization",value:a});break}case"apiKey":{const t=p.access_token||e.raw||"YOUR_API_KEY_HERE";"header"===c.in&&(null===(i=o.securityHeaders)||void 0===i||i.push({name:c.name,value:t})),"cookie"===c.in&&o.securityCookies.push({name:c.name,value:t}),"query"===c.in&&o.securityQueries.push({name:c.name,value:t});break}case"http":if("basic"===c.scheme)o.basicAuth={username:m||e.username||`<${string_utility_1.default.toSnakeCase("Username")}>`,password:v||e.password||`<${string_utility_1.default.toSnakeCase("Password")}>`};else{const t=(null==p?void 0:p.access_token)||(null===(n=e.token)||void 0===n?void 0:n.access_token)||`<YOUR_${c.bearerFormat||"TOKEN"}_HERE>`;null===(l=o.securityHeaders)||void 0===l||l.push({name:"Authorization",value:`${capitalizeFirst(c.scheme||"bearer")} ${t}`})}}}return o}function getOAuth2PasswordCallHar(e,t,a){return{method:"POST",url:e.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:constants_1.MediaTypes.URL_ENCODED},{name:"Accept",value:constants_1.MediaTypes.JSON}],queryString:[],postData:{mimeType:constants_1.MediaTypes.URL_ENCODED,text:"",params:[{name:"grant_type",value:"password"},{name:"client_id",value:a.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:a.client_secret||"YOUR_CLIENT_SECRET"},{name:"username",value:a.username||"<username>"},{name:"password",value:a.password||"<password>"},t.length?{name:"scope",value:t.join(" ")}:void 0].filter(isDefined)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function getOAuth2ClientCredsCallHar(e,t,a){return{method:"POST",url:e.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:constants_1.MediaTypes.URL_ENCODED},{name:"Accept",value:constants_1.MediaTypes.JSON}],queryString:[],postData:{mimeType:constants_1.MediaTypes.URL_ENCODED,text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:a.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:a.client_secret||"YOUR_CLIENT_SECRET"},t.length?{name:"scope",value:t.join(" ")}:void 0].filter(isDefined)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function getDataRequest(e,t){if(e){if((0,theme_1.isObject)(e))return Object.keys(e).length>0&&0===Object.keys(t).length?e:(0,deepmerge_1.default)(e,t,{arrayMerge:utils_2.arrayMergeStrategy});try{return(0,deepmerge_1.default)(JSON.parse(e),t,{arrayMerge:utils_2.arrayMergeStrategy})}catch(e){return!1}}return!1}function objectToHarParams(e,t=""){const a=[];for(const[s,r]of Object.entries(e)){const i=t?`${t}[${s}]`:s;if("object"==typeof r&&null!==r)a.push(...objectToHarParams(r,i));else{const s=Array.isArray(e)&&"string"==typeof r&&t?t:i;a.push({name:s,value:String(r)})}}return a}function isDefined(e){return void 0!==e}function capitalizeFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}function populateXmlSchemaFields(e,t){if(!e||"object"!=typeof e||!t||"object"!=typeof t)return e;const a=JSON.parse(JSON.stringify(e));return function e(t,a){if(t&&a&&"object"==typeof t&&"object"==typeof a&&t.properties)for(const s in t.properties)if(void 0!==a[s]){const r=t.properties[s],i=a[s];if("object"!==r.type||"object"!=typeof i||Array.isArray(i))if("array"===r.type&&Array.isArray(i)&&i.length>0){const t=i[0];r.items&&r.items.properties&&e(r.items,t)}else r.example=i;else e(r,i)}}(a,t),a}
2
- //# sourceMappingURL=generator.js.map
1
+ import*as v from"openapi-sampler";import $ from"deepmerge";import{isObject as oe}from"@redocly/theme";import{areArraysEqual as ce,serializeParameterValue as P,getSecurityDetails as ie,getParameterValue as M,queryString as j,isArrayOfObjects as ue,deleteEmptyArrayItem as le}from"../../utils/index.js";import{normalizeMimeType as pe,arrayMergeStrategy as z}from"../utils.js";import{MediaTypes as m}from"../../constants.js";import{HTTPSnippet as me}from"./httpsnippet/index.js";import{getActiveMediaType as fe}from"../../models/mediaContent.js";import J from"./httpsnippet/helpers/string-utility.js";function de(t,a){return t.find(n=>{const u=n.schemes.map(c=>c.id);return ce(u,a||[])})}function ye(t,{exampleName:a="",skipOptionalParameters:n=!1,withOAuth2Call:u=!1,spec:c,generatedPayloadSamplesMaxDepth:r=8,pathParams:o={},properties:i={},activeMimeName:s=""},{environment:d,requestValues:k,activeSecuritySchemeIds:T}){const l=d.server,b=t.servers.find(e=>e.url===l)||t.servers[0],w=de(t.security,T),{securityHeaders:A,securityCookies:F,securityQueries:X,securityOAuth2ExtraCalls:K,basicAuth:Q}=he(w||t.security?.[0],u,d),p=t?.requestBody?.content&&fe(t.requestBody.content,s),O={skipNonRequired:n,skipReadOnly:!0,maxSampleDepth:r,quiet:!0},h=k;let q=!1;const H=t.parameters.filter(e=>e.in==="header").filter(e=>!(n&&!e.required)).map(e=>({name:e.name,value:h.header?.[e.name]||M("header",e.name)||e.serverValues?.[l]?.example||e.example||P(e,v.sample(e.schema.rawSchema,O,c))})).map(e=>(p?.name&&e.name.toLowerCase()==="content-type"&&(q=!0,e.value=p.name),e)).concat(A);!q&&p?.name&&H.unshift({name:"Content-Type",value:p?.name});const G=t.parameters.filter(e=>e.in==="cookie").filter(e=>!(n&&!e.required)).map(e=>j.parse(P(e,e.serverValues?.[l]?.example||e.example||v.sample(e.schema.rawSchema,O,c)))).reduce((e,_)=>{for(const[y,S]of Object.entries(_))e.push({name:y,value:String(h.cookie?.[y]||S)});return e},[]).concat(F),W=t.parameters.filter(e=>e.in==="query").filter(e=>!(n&&!e.required)).map(e=>j.parse(P(e,e.serverValues?.[l]?.example||e.example||v.sample(e.schema.rawSchema,O,c)))).reduce((e,_)=>{for(const[y,S]of Object.entries(_))e.push({name:y,value:ue(h.query?.[y])&&JSON.stringify(le(h.query?.[y]))||String(h.query?.[y]||S)});return e},[]).concat(X),Z=b?.url.replace(/\/$/,""),ee=t.path.replace(/^\//,""),te=`${Z}/${ee}`,re=t.parameters.filter(e=>e.in==="path").reduce((e,_)=>{const{in:y,name:S}=_;return e[S]=h.path?.[S]||_.serverValues?.[l]?.example||_.example||o[S]||M(y,S),e},{}),E=p?.name.toLowerCase(),I=E===m.MULTIPART||E===m.URL_ENCODED,R=I?p?.formExamples?.[a]:p?.examples?.[a],ae=I?p?.formExamples||{}:p?.examples||{},[U]=Object.values(ae),N=R?.serverValues?.[l]?.value||U?.serverValues?.[l]?.value,D=e=>!e||typeof e!="object"||!p?.schema?.rawSchema?null:v.sample(Oe(p.schema.rawSchema,e),{...O,format:"xml"},c),C=(()=>{if(h?.body)return h.body;if(E===m.XML){const e=D(N)||D(R?.value)||D(U?.value);if(e)return e;if(p?.schema)return v.sample(p.schema.rawSchema,{...O,format:"xml"},c)}else return N||R?.value||U?.value||p?.schema&&v.sample(p.schema.rawSchema,{...O,format:"json"},c);return""})();let g="",L=[];switch(pe(E)){case m.JSON:g=JSON.stringify(V(C,i));break;case m.XML:g=C;break;case m.URL_ENCODED:case m.MULTIPART:g=j.stringify(V(C,i)),L=Y(V(C,i));break;default:g=String(C||"")}const se=g?{mimeType:p?.name||m.OCTET_STREAM,text:g,params:L}:void 0,ne=t.responses.map(e=>e.code);return{method:t.httpVerb,url:te,httpVersion:"HTTP/1.1",cookies:G,headers:H,queryString:W,postData:se,headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:K,basicAuth:Q,pathParameters:re,serverVariables:d,allResponseCodes:ne}}const f={withImports:!0,withComments:!1},x={curl:{code:"shell",defaultTarget:"curl",defaultOptions:{...f,short:!0}},JavaScript:{code:"javascript",defaultTarget:"fetch",defaultOptions:{...f,withImports:!1}},"Node.js":{code:"node",defaultTarget:"fetch",defaultOptions:{...f}},Python:{code:"python",defaultTarget:"requests",defaultOptions:{...f}},"Java8+Apache":{code:"java8",defaultTarget:"apachehttp",defaultOptions:{...f}},Java:{code:"java",defaultTarget:"httpclient",defaultOptions:{...f}},"C#":{code:"csharp",defaultTarget:"httpclient",defaultOptions:{...f}},"C#+Newtonsoft":{code:"csharpNewtonsoft",defaultTarget:"httpclient",defaultOptions:{...f}},Go:{code:"go",defaultTarget:"http.DefaultClient",defaultOptions:{...f}},PHP:{code:"php",defaultTarget:"curl",defaultOptions:{...f}},Ruby:{code:"ruby",defaultTarget:"net::http",defaultOptions:{...f}},R:{code:"r",defaultTarget:"httr",defaultOptions:{...f}}};function Re({lang:t,operation:a,exampleName:n,pathParams:u,properties:c,options:r={},environment:o,translate:i}){try{const{skipOptionalParameters:s,withOAuth2Call:d,spec:k,generatedPayloadSamplesMaxDepth:T,store:l,activeMimeName:b}=r,w=ye(a,{exampleName:n,pathParams:u,properties:c,skipOptionalParameters:s,withOAuth2Call:d,spec:k,generatedPayloadSamplesMaxDepth:T,activeMimeName:b},{environment:o,requestValues:l.requestValues,activeSecuritySchemeIds:l.activeSecuritySchemeIds}),A=new me(w);return x[t]?A.convert(x[t].code,x[t].defaultTarget,{...x[t].defaultOptions,...r}):i("openapi.unsupportedLanguage","Language is not supported.")}catch(s){return console.error(s),i("openapi.failedToGenerateCodeSample","Failed to generate code sample.")}}function he(t,a,n){const u={securityHeaders:[],securityCookies:[],securityQueries:[],securityOAuth2ExtraCalls:[],basicAuth:void 0},c=n?.server;for(const r of t?.schemes||[]){const o=ie(r.id,n),i=c&&r.serverValues&&r.serverValues[c],s={access_token:i?.["x-defaultAccessToken"]||r["x-defaultAccessToken"],token_type:i?.["x-defaultTokenType"]||r["x-defaultTokenType"],client_id:i?.["x-defaultClientId"]||r["x-defaultClientId"],client_secret:i?.["x-defaultClientSecret"]||r["x-defaultClientSecret"]},d=i?.["x-defaultUsername"]||r["x-defaultUsername"],k=i?.["x-defaultPassword"]||r["x-defaultPassword"],T=i&&"scopes"in i?i.scopes||[]:r.scopes||[];switch(r.type){case"openIdConnect":u.securityHeaders?.push({name:"Authorization",value:s.access_token?`${s.token_type||"Bearer"} ${s.access_token}`:o.token?`${s.token_type||o.token.token_type||"Bearer"} ${o.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>"});break;case"oauth2":{const l=s.access_token?`${s.token_type||"Bearer"} ${s.access_token}`:o.token?`${o.token.token_type||"Bearer"} ${o.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>";r.flows.clientCredentials&&a?u.securityOAuth2ExtraCalls.push(_e(r.flows.clientCredentials,T,{...o,client_id:s.client_id||o.client_id,client_secret:s.client_secret||o.client_secret})):r.flows.password&&a&&u.securityOAuth2ExtraCalls.push(Se(r.flows.password,T,{...o,client_id:s.client_id||o.client_id,client_secret:s.client_secret||o.client_secret})),u.securityHeaders?.push({name:"Authorization",value:l});break}case"apiKey":{const l=s.access_token||o.raw||"YOUR_API_KEY_HERE";r.in==="header"&&u.securityHeaders?.push({name:r.name,value:l}),r.in==="cookie"&&u.securityCookies.push({name:r.name,value:l}),r.in==="query"&&u.securityQueries.push({name:r.name,value:l});break}case"http":if(r.scheme==="basic")u.basicAuth={username:d||o.username||`<${J.toSnakeCase("Username")}>`,password:k||o.password||`<${J.toSnakeCase("Password")}>`};else{const l=s?.access_token||o.token?.access_token||`<YOUR_${r.bearerFormat||"TOKEN"}_HERE>`;u.securityHeaders?.push({name:"Authorization",value:`${Te(r.scheme||"bearer")} ${l}`})}break}}return u}function Se(t,a,n){return{method:"POST",url:t.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:m.URL_ENCODED},{name:"Accept",value:m.JSON}],queryString:[],postData:{mimeType:m.URL_ENCODED,text:"",params:[{name:"grant_type",value:"password"},{name:"client_id",value:n.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:n.client_secret||"YOUR_CLIENT_SECRET"},{name:"username",value:n.username||"<username>"},{name:"password",value:n.password||"<password>"},a.length?{name:"scope",value:a.join(" ")}:void 0].filter(B)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function _e(t,a,n){return{method:"POST",url:t.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:m.URL_ENCODED},{name:"Accept",value:m.JSON}],queryString:[],postData:{mimeType:m.URL_ENCODED,text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:n.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:n.client_secret||"YOUR_CLIENT_SECRET"},a.length?{name:"scope",value:a.join(" ")}:void 0].filter(B)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function V(t,a){if(t){if(oe(t))return Object.keys(t).length>0&&Object.keys(a).length===0?t:$(t,a,{arrayMerge:z});try{return $(JSON.parse(t),a,{arrayMerge:z})}catch{return!1}}return!1}function Y(t,a=""){const n=[];for(const[u,c]of Object.entries(t)){const r=a?`${a}[${u}]`:u;if(typeof c=="object"&&c!==null)n.push(...Y(c,r));else{const o=Array.isArray(t)&&typeof c=="string"&&a?a:r;n.push({name:o,value:String(c)})}}return n}function B(t){return t!==void 0}function Te(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Oe(t,a){if(!t||typeof t!="object"||!a||typeof a!="object")return t;const n=JSON.parse(JSON.stringify(t));function u(c,r){if(!(!c||!r||typeof c!="object"||typeof r!="object")&&c.properties){for(const o in c.properties)if(r[o]!==void 0){const i=c.properties[o],s=r[o];if(i.type==="object"&&typeof s=="object"&&!Array.isArray(s))u(i,s);else if(i.type==="array"&&Array.isArray(s)&&s.length>0){const d=s[0];i.items&&i.items.properties&&u(i.items,d)}else i.example=s}}}return u(n,a),n}export{Te as capitalizeFirst,Re as getCodeSample,V as getDataRequest,B as isDefined};
@@ -1,5 +1,5 @@
1
- import type { OpenAPIServerVariable } from '../../../../types';
2
- import { VariableType } from './constants';
1
+ import type { OpenAPIServerVariable } from '../../../../types/index.js';
2
+ import { VariableType } from './constants.js';
3
3
  /**
4
4
  * Helper object to format and aggragate lines of code.
5
5
  * Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
@@ -1,2 +1,3 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(n,a,t,e){void 0===e&&(e=t);var i=Object.getOwnPropertyDescriptor(a,t);i&&!("get"in i?!a.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return a[t]}}),Object.defineProperty(n,e,i)}:function(n,a,t,e){void 0===e&&(e=t),n[e]=a[t]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(n,a){Object.defineProperty(n,"default",{enumerable:!0,value:a})}:function(n,a){n.default=a}),__importStar=this&&this.__importStar||function(n){if(n&&n.__esModule)return n;var a={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&__createBinding(a,n,t);return __setModuleDefault(a,n),a},__importDefault=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeBuilder=void 0;const util=__importStar(require("util")),constants_1=require("./constants"),string_utility_1=__importDefault(require("./string-utility")),langToVarNameConvention={[constants_1.Lang.NODEJS]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.JAVASCRIPT]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.PYTHON]:constants_1.NamingVariableConventions.UNDER_SCORES,[constants_1.Lang.JAVA8]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.JAVA]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.CSHARP]:constants_1.NamingVariableConventions.PASCAL_CASE,[constants_1.Lang.CSHARPNEWTONSOFT]:constants_1.NamingVariableConventions.PASCAL_CASE,[constants_1.Lang.CURL]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.GO]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.PHP]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.RUBY]:constants_1.NamingVariableConventions.UNDER_SCORES,[constants_1.Lang.R]:constants_1.NamingVariableConventions.UNDER_SCORES},langOptions={default:{joinSymbol:"",variableWrapperFn:n=>n,stringLiteral:n=>n,variableDeclaration:n=>n,urlFieldName:"url"},[constants_1.Lang.CSHARP]:{joinSymbol:" + ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`var ${n} = "%s";`,urlFieldName:"fullUrl"},[constants_1.Lang.CSHARPNEWTONSOFT]:{joinSymbol:" + ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`var ${n} = "%s";`,urlFieldName:"fullUrl"},[constants_1.Lang.GO]:{joinSymbol:" + ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`${n} := "%s";`},[constants_1.Lang.JAVA]:{joinSymbol:" + ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`var ${n} = "%s";`,urlFieldName:"pathname"},[constants_1.Lang.JAVA8]:{joinSymbol:" + ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`String ${n} = "%s";`,urlFieldName:"fullUrl"},[constants_1.Lang.JAVASCRIPT]:{variableWrapperFn:n=>"${"+n+"}",variableDeclaration:n=>`const ${n} = '%s';`},[constants_1.Lang.NODEJS]:{variableWrapperFn:n=>"${"+n+"}",variableDeclaration:n=>`const ${n} = '%s';`},[constants_1.Lang.PHP]:{joinSymbol:" . ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`const ${n} = "%s";`},[constants_1.Lang.PYTHON]:{stringLiteral:n=>`"${n}"`,joinSymbol:" + ",variableDeclaration:n=>`${n} = "%s"`},[constants_1.Lang.RUBY]:{joinSymbol:" + ",stringLiteral:n=>`'${n}'`,variableDeclaration:n=>`${n} = '%s'`},[constants_1.Lang.CURL]:{variableWrapperFn:(n,a)=>a||`{${n}}`,urlFieldName:"fullUrl",rawName:!0},[constants_1.Lang.R]:{joinSymbol:" %&% ",variableDeclaration:n=>`${n} = "%s"`,urlFieldName:"fullUrl",stringLiteral:n=>`"${n}"`,variableWrapperFn:n=>`${n}`}},reservedVariableNames=["response","request","requests","data","url","payload","main","accessToken","resp","Program","client","postData","App","httpClient","params","pathname","host","body","fetch","query"];class CodeBuilder{constructor({indentation:n,lineJoin:a="\n",variablesPrefix:t="",capitalize:e=!1,lang:i=constants_1.Lang.CURL}){Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"indentation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"variablesPrefix",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lineJoin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"capitalize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lang",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"langOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=[],this.indentation=n,this.variablesPrefix=t,this.lineJoin=a||"\n",this.capitalize=e,this.lang=i,this.langOptions=Object.assign(Object.assign({},langOptions.default),langOptions[i])}buildLine(n,a){let t="",e=2;if("string"==typeof n)e=1,a=n,n=0;else if(null===n)return null;for(;n;)t+=this.indentation,n--;const i=Array.prototype.slice.call(arguments,e,arguments.length);return i.unshift(t+a),util.format.apply(this,i)}unshift(...n){return this.code.unshift(this.buildLine.apply(this,n)),this}push(...n){return this.code.push(this.buildLine.apply(this,n)),this}blank(){return this.code.push(null),this}join(){return this.code.join(this.lineJoin)}clean(){this.code.splice(1)}var(n,a=constants_1.VariableType.CUSTOM){if(a===constants_1.VariableType.PATH){let a=this.variablesPrefix+n;switch(reservedVariableNames.includes(a)&&(a=`${a}_path`),langToVarNameConvention[this.lang]){case constants_1.NamingVariableConventions.UNDER_SCORES:a=string_utility_1.default.toSnakeCase(a);break;case constants_1.NamingVariableConventions.PASCAL_CASE:a=string_utility_1.default.toPascalCase(a);break;case constants_1.NamingVariableConventions.CAMEL_CASE:default:a=string_utility_1.default.toCamelCase(a)}return a}return this.variablesPrefix?this.variablesPrefix+(this.capitalize?string_utility_1.default.toPascalCase(n):n):n}}exports.CodeBuilder=CodeBuilder;
2
- //# sourceMappingURL=code-builder.js.map
1
+ import*as S from"util";import{Lang as i,NamingVariableConventions as l,VariableType as c}from"./constants.js";import o from"./string-utility.js";const p={[i.NODEJS]:l.CAMEL_CASE,[i.JAVASCRIPT]:l.CAMEL_CASE,[i.PYTHON]:l.UNDER_SCORES,[i.JAVA8]:l.CAMEL_CASE,[i.JAVA]:l.CAMEL_CASE,[i.CSHARP]:l.PASCAL_CASE,[i.CSHARPNEWTONSOFT]:l.PASCAL_CASE,[i.CURL]:l.CAMEL_CASE,[i.GO]:l.CAMEL_CASE,[i.PHP]:l.CAMEL_CASE,[i.RUBY]:l.UNDER_SCORES,[i.R]:l.UNDER_SCORES},u={default:{joinSymbol:"",variableWrapperFn:a=>a,stringLiteral:a=>a,variableDeclaration:a=>a,urlFieldName:"url"},[i.CSHARP]:{joinSymbol:" + ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`var ${a} = "%s";`,urlFieldName:"fullUrl"},[i.CSHARPNEWTONSOFT]:{joinSymbol:" + ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`var ${a} = "%s";`,urlFieldName:"fullUrl"},[i.GO]:{joinSymbol:" + ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`${a} := "%s";`},[i.JAVA]:{joinSymbol:" + ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`var ${a} = "%s";`,urlFieldName:"pathname"},[i.JAVA8]:{joinSymbol:" + ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`String ${a} = "%s";`,urlFieldName:"fullUrl"},[i.JAVASCRIPT]:{variableWrapperFn:a=>"${"+a+"}",variableDeclaration:a=>`const ${a} = '%s';`},[i.NODEJS]:{variableWrapperFn:a=>"${"+a+"}",variableDeclaration:a=>`const ${a} = '%s';`},[i.PHP]:{joinSymbol:" . ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`const ${a} = "%s";`},[i.PYTHON]:{stringLiteral:a=>`"${a}"`,joinSymbol:" + ",variableDeclaration:a=>`${a} = "%s"`},[i.RUBY]:{joinSymbol:" + ",stringLiteral:a=>`'${a}'`,variableDeclaration:a=>`${a} = '%s'`},[i.CURL]:{variableWrapperFn:(a,e)=>e||`{${a}}`,urlFieldName:"fullUrl",rawName:!0},[i.R]:{joinSymbol:" %&% ",variableDeclaration:a=>`${a} = "%s"`,urlFieldName:"fullUrl",stringLiteral:a=>`"${a}"`,variableWrapperFn:a=>`${a}`}},C=["response","request","requests","data","url","payload","main","accessToken","resp","Program","client","postData","App","httpClient","params","pathname","host","body","fetch","query"];class h{code;indentation;variablesPrefix;lineJoin;capitalize;lang;langOptions;constructor({indentation:e,lineJoin:t=`
2
+ `,variablesPrefix:r="",capitalize:n=!1,lang:s=i.CURL}){this.code=[],this.indentation=e,this.variablesPrefix=r,this.lineJoin=t||`
3
+ `,this.capitalize=n,this.lang=s,this.langOptions={...u.default,...u[s]}}buildLine(e,t){let r="",n=2;if(typeof e=="string")n=1,t=e,e=0;else if(e===null)return null;for(;e;)r+=this.indentation,e--;const s=Array.prototype.slice.call(arguments,n,arguments.length);return s.unshift(r+t),S.format.apply(this,s)}unshift(...e){return this.code.unshift(this.buildLine.apply(this,e)),this}push(...e){return this.code.push(this.buildLine.apply(this,e)),this}blank(){return this.code.push(null),this}join(){return this.code.join(this.lineJoin)}clean(){this.code.splice(1)}var(e,t=c.CUSTOM){if(t===c.PATH){let r=this.variablesPrefix+e;switch(C.includes(r)&&(r=`${r}_path`),p[this.lang]){case l.UNDER_SCORES:r=o.toSnakeCase(r);break;case l.PASCAL_CASE:r=o.toPascalCase(r);break;case l.CAMEL_CASE:default:r=o.toCamelCase(r);break}return r}return this.variablesPrefix?this.variablesPrefix+(this.capitalize?o.toPascalCase(e):e):e}}export{h as CodeBuilder};
@@ -1,5 +1,5 @@
1
- import type { SnippetRequest } from '../index';
2
- import type { CodeBuilder } from './code-builder';
1
+ import type { SnippetRequest } from '../index.js';
2
+ import type { CodeBuilder } from './code-builder.js';
3
3
  export declare function getPreserveTransformer({ body, authorizationHeader, }: {
4
4
  body?: boolean;
5
5
  authorizationHeader?: boolean;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPreserveTransformer=getPreserveTransformer,exports.addIndentation=addIndentation,exports.parseUrlIntoOperands=parseUrlIntoOperands,exports.buildUrlExpression=buildUrlExpression,exports.printUrlVariablesDeclarations=printUrlVariablesDeclarations;const constants_1=require("./constants");function getPreserveTransformer({body:e,authorizationHeader:r}){return function(n,t,a){return e&&"body"===t&&"string"==typeof n.body?n.body:r&&"Authorization"===t&&"string"==typeof n.Authorization?n.Authorization:a}}function addIndentation(e,{level:r=0,indent:n=" ",firstLine:t=!0}={}){const a=n.repeat(r),s=e.replace(/(\r\n|\n|\r)/gm,`\n${a}`);return t?a.concat(s):s}function parseUrlIntoOperands(e,r){const n=Object.keys(r).map((r=>({name:r,idx:e.indexOf(`{${r}}`)}))).filter((({idx:e})=>e>-1)).sort(((e,r)=>e.idx-r.idx)),t=[];let a=0;for(const{name:r,idx:s}of n)s>a&&t.push({type:"string",value:e.substring(a,s)}),t.push({type:"variable",name:r}),a=s+r.length+2;return a<e.length&&t.push({type:"string",value:e.substring(a)}),t}function buildUrlExpression(e,r){const{joinSymbol:n,variableWrapperFn:t,stringLiteral:a,urlFieldName:s,rawName:i}=r.langOptions,{pathParameters:o={},serverVariables:l={}}=e,p=Object.assign(Object.assign({},o),l);return parseUrlIntoOperands(e[s]||"",p).map((e=>{if("variable"===e.type){const n=p[e.name],a=i?e.name:r.var(e.name,constants_1.VariableType.PATH);return t(a,n)}return a(e.value)})).join(n)}function printUrlVariablesDeclarations({pathParameters:e={},serverVariables:r={}},n,t){Object.entries(Object.assign(Object.assign({},e),r)).forEach((([e,r])=>{if("server"===e)return;const a=r||`YOUR_${e}_PARAMETER`,s=n.var(e,constants_1.VariableType.PATH);void 0!==t?n.push(t,n.langOptions.variableDeclaration(s),a):n.push(n.langOptions.variableDeclaration(s),a)}))}
2
- //# sourceMappingURL=code-helpers.js.map
1
+ import{VariableType as p}from"./constants.js";function g({body:a,authorizationHeader:s}){return function(r,i,e){return a&&i==="body"&&typeof r.body=="string"?r.body:s&&i==="Authorization"&&typeof r.Authorization=="string"?r.Authorization:e}}function h(a,{level:s=0,indent:r=" ",firstLine:i=!0}={}){const e=r.repeat(s),n=a.replace(/(\r\n|\n|\r)/gm,`
2
+ ${e}`);return i?e.concat(n):n}function m(a,s){const i=Object.keys(s).map(t=>({name:t,idx:a.indexOf(`{${t}}`)})).filter(({idx:t})=>t>-1).sort((t,o)=>t.idx-o.idx),e=[];let n=0;for(const{name:t,idx:o}of i)o>n&&e.push({type:"string",value:a.substring(n,o)}),e.push({type:"variable",name:t}),n=o+t.length+2;return n<a.length&&e.push({type:"string",value:a.substring(n)}),e}function x(a,s){const{joinSymbol:r,variableWrapperFn:i,stringLiteral:e,urlFieldName:n,rawName:t}=s.langOptions,{pathParameters:o={},serverVariables:f={}}=a,u={...o,...f};return m(a[n]||"",u).map(l=>{if(l.type==="variable"){const b=u[l.name],c=t?l.name:s.var(l.name,p.PATH);return i(c,b)}else return e(l.value)}).join(r)}function d({pathParameters:a={},serverVariables:s={}},r,i){Object.entries({...a,...s}).forEach(([e,n])=>{if(e==="server")return;const t=n||`YOUR_${e}_PARAMETER`,o=r.var(e,p.PATH);i!==void 0?r.push(i,r.langOptions.variableDeclaration(o),t):r.push(r.langOptions.variableDeclaration(o),t)})}export{h as addIndentation,x as buildUrlExpression,g as getPreserveTransformer,m as parseUrlIntoOperands,d as printUrlVariablesDeclarations};
@@ -1,2 +1 @@
1
- "use strict";var Lang,NamingVariableConventions,VariableType;Object.defineProperty(exports,"__esModule",{value:!0}),exports.VariableType=exports.NamingVariableConventions=exports.Lang=void 0,function(a){a.NODEJS="Node.js",a.JAVASCRIPT="javascript",a.PYTHON="Python",a.JAVA8="Java8+Apache",a.JAVA="Java",a.CSHARP="C#",a.CSHARPNEWTONSOFT="C#+Newtonsoft",a.CURL="curl",a.GO="Go",a.PHP="PHP",a.RUBY="Ruby",a.R="R"}(Lang||(exports.Lang=Lang={})),function(a){a.UNDER_SCORES="under_scores",a.CAMEL_CASE="camelCase",a.PASCAL_CASE="PascalCase"}(NamingVariableConventions||(exports.NamingVariableConventions=NamingVariableConventions={})),function(a){a.IMPORT="import",a.CUSTOM="custom",a.PATH="path"}(VariableType||(exports.VariableType=VariableType={}));
2
- //# sourceMappingURL=constants.js.map
1
+ var C;(function(A){A.NODEJS="Node.js",A.JAVASCRIPT="javascript",A.PYTHON="Python",A.JAVA8="Java8+Apache",A.JAVA="Java",A.CSHARP="C#",A.CSHARPNEWTONSOFT="C#+Newtonsoft",A.CURL="curl",A.GO="Go",A.PHP="PHP",A.RUBY="Ruby",A.R="R"})(C||(C={}));var P;(function(A){A.UNDER_SCORES="under_scores",A.CAMEL_CASE="camelCase",A.PASCAL_CASE="PascalCase"})(P||(P={}));var o;(function(A){A.IMPORT="import",A.CUSTOM="custom",A.PATH="path"})(o||(o={}));export{C as Lang,P as NamingVariableConventions,o as VariableType};
@@ -1,2 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.startCase=exports.snakeCase=exports.lowerCase=exports.camelCase=void 0;const rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboMarksExtendedRange="\\u1ab0-\\u1aff",rsComboMarksSupplementRange="\\u1dc0-\\u1dff",rsComboRange="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff",rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+"\\u2000-\\u206f"+rsSpaceRange,reQuotes=/['\u2019]/g,rsApos="[']",rsBreak=`[${rsBreakRange}]`,rsCombo=`[${rsComboRange}]`,rsDigit="\\d",rsDingbat=`[${rsDingbatRange}]`,rsLower=`[${rsLowerRange}]`,rsMisc=`[^${rsAstralRange}${rsBreakRange+"\\d"+rsDingbatRange+rsLowerRange+rsUpperRange}]`,rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier=`(?:${rsCombo}|${rsFitz})`,rsNonAstral=`[^${rsAstralRange}]`,rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper=`[${rsUpperRange}]`,rsZWJ="\\u200d",rsMiscLower=`(?:${rsLower}|${rsMisc})`,rsMiscUpper=`(?:${rsUpper}|${rsMisc})`,rsOptContrLower="(?:['’](?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:['’](?:D|LL|M|RE|S|T|VE))?",reOptMod=`${rsModifier}?`,rsOptVar=`[${rsVarRange}]?`,rsOptJoin=`(?:${rsZWJ}(?:${[rsNonAstral,rsRegional,rsSurrPair].join("|")})${rsOptVar+reOptMod})*`,rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji=`(?:${[rsDingbat,rsRegional,rsSurrPair].join("|")})${rsSeq}`,reUnicodeWords=RegExp([`${rsUpper}?${rsLower}+${rsOptContrLower}(?=${[rsBreak,rsUpper,"$"].join("|")})`,`${rsMiscUpper}+${rsOptContrUpper}(?=${[rsBreak,rsUpper+rsMiscLower,"$"].join("|")})`,`${rsUpper}?${rsMiscLower}+${rsOptContrLower}`,`${rsUpper}+${rsOptContrUpper}`,rsOrdUpper,rsOrdLower,"\\d+",rsEmoji].join("|"),"g"),unicodeWords=r=>r.match(reUnicodeWords),reHasUnicode=RegExp(`[${rsZWJ+rsAstralRange+rsComboRange+rsVarRange}]`),hasUnicode=r=>reHasUnicode.test(r),rsAstral=`[${rsAstralRange}]`,rsNonAstralCombo=`${rsNonAstral}${rsCombo}?`,rsSymbol=`(?:${[rsNonAstralCombo,rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")})`,reUnicode=RegExp(`${rsFitz}(?=${rsFitz})|${rsSymbol+rsSeq}`,"g"),unicodeToArray=r=>r.match(reUnicode)||[],asciiToArray=r=>r.split(""),getTag=r=>{const e=Object.prototype.toString;return null==r?void 0===r?"[object Undefined]":"[object Null]":e.call(r)},isSymbol=r=>{const e=typeof r;return"symbol"==e||"object"===e&&null!=r&&"[object Symbol]"==getTag(r)},INFINITY=1/0,toString=r=>{if(null==r)return"";if("string"==typeof r)return r;if(Array.isArray(r))return`${r.map((r=>null==r?r:toString(r)))}`;if(isSymbol(r))return r.toString();const e=`${r}`;return"0"==e&&1/r==-Infinity?"-0":e},hasUnicodeWord=RegExp.prototype.test.bind(/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/),reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,asciiWords=r=>r.match(reAsciiWord),slice=(r,e,s)=>{let o=null==r?0:r.length;if(!o)return[];(e=null==e?0:e)<0&&(e=-e>o?0:o+e),(s=(s=void 0===s?o:s)>o?o:s)<0&&(s+=o),o=e>s?0:s-e>>>0,e>>>=0;let a=-1;const t=new Array(o);for(;++a<o;)t[a]=r[a+e];return t},words=r=>(hasUnicodeWord(r)?unicodeWords(r):asciiWords(r))||[],castSlice=(r,e)=>{const{length:s}=r;return!e&&s>=s?r:slice(r,e,s)},stringToArray=r=>hasUnicode(r)?unicodeToArray(r):asciiToArray(r),createCaseFirst=r=>e=>{if(!e)return"";const s=hasUnicode(e)?stringToArray(e):void 0,o=s?s[0]:e[0],a=s?castSlice(s,1).join(""):e.slice(1);return o[r]()+a},upperFirst=createCaseFirst("toUpperCase"),camelCase=r=>words(toString(r).replace(/['\u2019]/g,"")).reduce(((r,e,s)=>(e=e.toLowerCase(),r+(s?upperFirst(e):e))),"");exports.camelCase=camelCase;const lowerCase=r=>words(toString(r).replace(reQuotes,"")).reduce(((r,e,s)=>r+(s?" ":"")+e.toLowerCase()),"");exports.lowerCase=lowerCase;const snakeCase=r=>words(toString(r).replace(/['\u2019]/g,"")).reduce(((r,e,s)=>r+(s?"_":"")+e.toLowerCase()),"");exports.snakeCase=snakeCase;const startCase=r=>words(`${r}`.replace(/['\u2019]/g,"")).reduce(((r,e,s)=>r+(s?" ":"")+upperFirst(e)),"");exports.startCase=startCase;
2
- //# sourceMappingURL=lodash-int.js.map
1
+ const c="\\ud800-\\udfff",k="\\u0300-\\u036f",N="\\ufe20-\\ufe2f",D="\\u20d0-\\u20ff",W="\\u1ab0-\\u1aff",F="\\u1dc0-\\u1dff",l=k+N+D+W+F,x="\\u2700-\\u27bf",b="a-z\\xdf-\\xf6\\xf8-\\xff",H="\\xac\\xb1\\xd7\\xf7",I="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",V="\\u2000-\\u206f",_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",g="A-Z\\xc0-\\xd6\\xd8-\\xde",R="\\ufe0e\\ufe0f",m=H+I+V+_,B=/['\u2019]/g,C="['\u2019]",A=`[${m}]`,i=`[${l}]`,S="\\d",J=`[${x}]`,j=`[${b}]`,y=`[^${c}${m+S+x+b+g}]`,a="\\ud83c[\\udffb-\\udfff]",P=`(?:${i}|${a})`,U=`[^${c}]`,d="(?:\\ud83c[\\udde6-\\uddff]){2}",$="[\\ud800-\\udbff][\\udc00-\\udfff]",r=`[${g}]`,h="\\u200d",M=`(?:${j}|${y})`,q=`(?:${r}|${y})`,L=`(?:${C}(?:d|ll|m|re|s|t|ve))?`,w=`(?:${C}(?:D|LL|M|RE|S|T|VE))?`,O=`${P}?`,z=`[${R}]?`,Q=`(?:${h}(?:${[U,d,$].join("|")})${z+O})*`,Y="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",G="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",E=z+O+Q,K=`(?:${[J,d,$].join("|")})${E}`,X=RegExp([`${r}?${j}+${L}(?=${[A,r,"$"].join("|")})`,`${q}+${w}(?=${[A,r+M,"$"].join("|")})`,`${r}?${M}+${L}`,`${r}+${w}`,G,Y,`${S}+`,K].join("|"),"g"),v=o=>o.match(X),oo=RegExp(`[${h+c+l+R}]`),T=o=>oo.test(o),so=`[${c}]`,no=`${U}${i}?`,to=`(?:${[no,i,d,$,so].join("|")})`,ro=RegExp(`${a}(?=${a})|${to+E}`,"g"),eo=o=>o.match(ro)||[],co=o=>o.split(""),uo=o=>{const s=Object.prototype.toString;return o==null?o===void 0?"[object Undefined]":"[object Null]":s.call(o)},fo=o=>{const s=typeof o;return s=="symbol"||s==="object"&&o!=null&&uo(o)=="[object Symbol]"},io=1/0,u=o=>{if(o==null)return"";if(typeof o=="string")return o;if(Array.isArray(o))return`${o.map(n=>n==null?n:u(n))}`;if(fo(o))return o.toString();const s=`${o}`;return s=="0"&&1/o==-io?"-0":s},ao=RegExp.prototype.test.bind(/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/),$o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,po=o=>o.match($o),lo=(o,s,n)=>{let t=o==null?0:o.length;if(!t)return[];s=s??0,n=n===void 0?t:n,s<0&&(s=-s>t?0:t+s),n=n>t?t:n,n<0&&(n+=t),t=s>n?0:n-s>>>0,s>>>=0;let e=-1;const p=new Array(t);for(;++e<t;)p[e]=o[e+s];return p},f=o=>(ao(o)?v(o):po(o))||[],xo=(o,s)=>{const{length:n}=o,t=n;return!s&&t>=n?o:lo(o,s,t)},bo=o=>T(o)?eo(o):co(o),go=o=>s=>{if(!s)return"";const n=T(s)?bo(s):void 0,t=n?n[0]:s[0],e=n?xo(n,1).join(""):s.slice(1);return t[o]()+e},Z=go("toUpperCase"),Ro=o=>f(u(o).replace(/['\u2019]/g,"")).reduce((s,n,t)=>(n=n.toLowerCase(),s+(t?Z(n):n)),""),mo=o=>f(u(o).replace(B,"")).reduce((s,n,t)=>s+(t?" ":"")+n.toLowerCase(),""),Co=o=>f(u(o).replace(/['\u2019]/g,"")).reduce((s,n,t)=>s+(t?"_":"")+n.toLowerCase(),""),Ao=o=>f(`${o}`.replace(/['\u2019]/g,"")).reduce((s,n,t)=>s+(t?" ":"")+Z(n),"");export{Ro as camelCase,mo as lowerCase,Co as snakeCase,Ao as startCase};
@@ -1,2 +1,37 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildUrlExpressionData=exports.buildUrlExpressionCases=exports.printUrlVariablesDeclarationsOutput=exports.commonVariablesInput=void 0,exports.commonVariablesInput={pathParameters:{pathParam1:"pathParam1Value",pathParam2:"pathParam2Value"},serverVariables:{serverVariable1:"serverVariable1Value",serverVariable2:"serverVariable2Value"}},exports.printUrlVariablesDeclarationsOutput={"Node.js":"const variablesPrefixpathParam1 = 'pathParam1Value';\nconst variablesPrefixpathParam2 = 'pathParam2Value';\nconst variablesPrefixserverVariable1 = 'serverVariable1Value';\nconst variablesPrefixserverVariable2 = 'serverVariable2Value';",javascript:"const variablesPrefixpathParam1 = 'pathParam1Value';\nconst variablesPrefixpathParam2 = 'pathParam2Value';\nconst variablesPrefixserverVariable1 = 'serverVariable1Value';\nconst variablesPrefixserverVariable2 = 'serverVariable2Value';",Python:'variables_prefixpath_param_1 = "pathParam1Value"\nvariables_prefixpath_param_2 = "pathParam2Value"\nvariables_prefixserver_variable_1 = "serverVariable1Value"\nvariables_prefixserver_variable_2 = "serverVariable2Value"',"Java8+Apache":'String variablesPrefixpathParam1 = "pathParam1Value";\nString variablesPrefixpathParam2 = "pathParam2Value";\nString variablesPrefixserverVariable1 = "serverVariable1Value";\nString variablesPrefixserverVariable2 = "serverVariable2Value";',Java:'var variablesPrefixpathParam1 = "pathParam1Value";\nvar variablesPrefixpathParam2 = "pathParam2Value";\nvar variablesPrefixserverVariable1 = "serverVariable1Value";\nvar variablesPrefixserverVariable2 = "serverVariable2Value";',"C#":'var VariablesPrefixpathParam1 = "pathParam1Value";\nvar VariablesPrefixpathParam2 = "pathParam2Value";\nvar VariablesPrefixserverVariable1 = "serverVariable1Value";\nvar VariablesPrefixserverVariable2 = "serverVariable2Value";',"C#+Newtonsoft":'var VariablesPrefixpathParam1 = "pathParam1Value";\nvar VariablesPrefixpathParam2 = "pathParam2Value";\nvar VariablesPrefixserverVariable1 = "serverVariable1Value";\nvar VariablesPrefixserverVariable2 = "serverVariable2Value";',curl:"variablesPrefixpathParam1 pathParam1Value\nvariablesPrefixpathParam2 pathParam2Value\nvariablesPrefixserverVariable1 serverVariable1Value\nvariablesPrefixserverVariable2 serverVariable2Value",Go:'variablesPrefixpathParam1 := "pathParam1Value";\nvariablesPrefixpathParam2 := "pathParam2Value";\nvariablesPrefixserverVariable1 := "serverVariable1Value";\nvariablesPrefixserverVariable2 := "serverVariable2Value";',PHP:'const variablesPrefixpathParam1 = "pathParam1Value";\nconst variablesPrefixpathParam2 = "pathParam2Value";\nconst variablesPrefixserverVariable1 = "serverVariable1Value";\nconst variablesPrefixserverVariable2 = "serverVariable2Value";',Ruby:"variables_prefixpath_param_1 = 'pathParam1Value'\nvariables_prefixpath_param_2 = 'pathParam2Value'\nvariables_prefixserver_variable_1 = 'serverVariable1Value'\nvariables_prefixserver_variable_2 = 'serverVariable2Value'",R:'variables_prefixpath_param_1 = "pathParam1Value"\nvariables_prefixpath_param_2 = "pathParam2Value"\nvariables_prefixserver_variable_1 = "serverVariable1Value"\nvariables_prefixserver_variable_2 = "serverVariable2Value"'},exports.buildUrlExpressionCases={},exports.buildUrlExpressionData={"Node.js":"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",javascript:"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",Python:'"http://acme.com/" + variables_prefixpath_param_1 + "/" + variables_prefixpath_param_2 + "/" + variables_prefixserver_variable_1 + "/" + variables_prefixserver_variable_2',"Java8+Apache":'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',Java:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',"C#":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',"C#+Newtonsoft":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',curl:"http://acme.com/pathParam1Value/pathParam2Value/serverVariable1Value/serverVariable2Value",Go:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',PHP:'"http://acme.com/" . variablesPrefixpathParam1 . "/" . variablesPrefixpathParam2 . "/" . variablesPrefixserverVariable1 . "/" . variablesPrefixserverVariable2',Ruby:"'http://acme.com/' + variables_prefixpath_param_1 + '/' + variables_prefixpath_param_2 + '/' + variables_prefixserver_variable_1 + '/' + variables_prefixserver_variable_2",R:'"http://acme.com/" %&% variables_prefixpath_param_1 %&% "/" %&% variables_prefixpath_param_2 %&% "/" %&% variables_prefixserver_variable_1 %&% "/" %&% variables_prefixserver_variable_2'};
2
- //# sourceMappingURL=code-helpers-mock.js.map
1
+ const a={pathParameters:{pathParam1:"pathParam1Value",pathParam2:"pathParam2Value"},serverVariables:{serverVariable1:"serverVariable1Value",serverVariable2:"serverVariable2Value"}},r={"Node.js":`const variablesPrefixpathParam1 = 'pathParam1Value';
2
+ const variablesPrefixpathParam2 = 'pathParam2Value';
3
+ const variablesPrefixserverVariable1 = 'serverVariable1Value';
4
+ const variablesPrefixserverVariable2 = 'serverVariable2Value';`,javascript:`const variablesPrefixpathParam1 = 'pathParam1Value';
5
+ const variablesPrefixpathParam2 = 'pathParam2Value';
6
+ const variablesPrefixserverVariable1 = 'serverVariable1Value';
7
+ const variablesPrefixserverVariable2 = 'serverVariable2Value';`,Python:`variables_prefixpath_param_1 = "pathParam1Value"
8
+ variables_prefixpath_param_2 = "pathParam2Value"
9
+ variables_prefixserver_variable_1 = "serverVariable1Value"
10
+ variables_prefixserver_variable_2 = "serverVariable2Value"`,"Java8+Apache":`String variablesPrefixpathParam1 = "pathParam1Value";
11
+ String variablesPrefixpathParam2 = "pathParam2Value";
12
+ String variablesPrefixserverVariable1 = "serverVariable1Value";
13
+ String variablesPrefixserverVariable2 = "serverVariable2Value";`,Java:`var variablesPrefixpathParam1 = "pathParam1Value";
14
+ var variablesPrefixpathParam2 = "pathParam2Value";
15
+ var variablesPrefixserverVariable1 = "serverVariable1Value";
16
+ var variablesPrefixserverVariable2 = "serverVariable2Value";`,"C#":`var VariablesPrefixpathParam1 = "pathParam1Value";
17
+ var VariablesPrefixpathParam2 = "pathParam2Value";
18
+ var VariablesPrefixserverVariable1 = "serverVariable1Value";
19
+ var VariablesPrefixserverVariable2 = "serverVariable2Value";`,"C#+Newtonsoft":`var VariablesPrefixpathParam1 = "pathParam1Value";
20
+ var VariablesPrefixpathParam2 = "pathParam2Value";
21
+ var VariablesPrefixserverVariable1 = "serverVariable1Value";
22
+ var VariablesPrefixserverVariable2 = "serverVariable2Value";`,curl:`variablesPrefixpathParam1 pathParam1Value
23
+ variablesPrefixpathParam2 pathParam2Value
24
+ variablesPrefixserverVariable1 serverVariable1Value
25
+ variablesPrefixserverVariable2 serverVariable2Value`,Go:`variablesPrefixpathParam1 := "pathParam1Value";
26
+ variablesPrefixpathParam2 := "pathParam2Value";
27
+ variablesPrefixserverVariable1 := "serverVariable1Value";
28
+ variablesPrefixserverVariable2 := "serverVariable2Value";`,PHP:`const variablesPrefixpathParam1 = "pathParam1Value";
29
+ const variablesPrefixpathParam2 = "pathParam2Value";
30
+ const variablesPrefixserverVariable1 = "serverVariable1Value";
31
+ const variablesPrefixserverVariable2 = "serverVariable2Value";`,Ruby:`variables_prefixpath_param_1 = 'pathParam1Value'
32
+ variables_prefixpath_param_2 = 'pathParam2Value'
33
+ variables_prefixserver_variable_1 = 'serverVariable1Value'
34
+ variables_prefixserver_variable_2 = 'serverVariable2Value'`,R:`variables_prefixpath_param_1 = "pathParam1Value"
35
+ variables_prefixpath_param_2 = "pathParam2Value"
36
+ variables_prefixserver_variable_1 = "serverVariable1Value"
37
+ variables_prefixserver_variable_2 = "serverVariable2Value"`},e={},i={"Node.js":"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",javascript:"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",Python:'"http://acme.com/" + variables_prefixpath_param_1 + "/" + variables_prefixpath_param_2 + "/" + variables_prefixserver_variable_1 + "/" + variables_prefixserver_variable_2',"Java8+Apache":'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',Java:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',"C#":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',"C#+Newtonsoft":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',curl:"http://acme.com/pathParam1Value/pathParam2Value/serverVariable1Value/serverVariable2Value",Go:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',PHP:'"http://acme.com/" . variablesPrefixpathParam1 . "/" . variablesPrefixpathParam2 . "/" . variablesPrefixserverVariable1 . "/" . variablesPrefixserverVariable2',Ruby:"'http://acme.com/' + variables_prefixpath_param_1 + '/' + variables_prefixpath_param_2 + '/' + variables_prefixserver_variable_1 + '/' + variables_prefixserver_variable_2",R:'"http://acme.com/" %&% variables_prefixpath_param_1 %&% "/" %&% variables_prefixpath_param_2 %&% "/" %&% variables_prefixserver_variable_1 %&% "/" %&% variables_prefixserver_variable_2'};export{e as buildUrlExpressionCases,i as buildUrlExpressionData,a as commonVariablesInput,r as printUrlVariablesDeclarationsOutput};
@@ -1,2 +1 @@
1
- "use strict";function default_1(e,a){if(void 0===e[a.name])return e[a.name]=a.value,e;if(e[a.name]instanceof Array)return e[a.name].push(a.value),e;const n=[e[a.name],a.value];return e[a.name]=n,e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=default_1;
2
- //# sourceMappingURL=reducer.js.map
1
+ function t(e,n){if(e[n.name]===void 0)return e[n.name]=n.value,e;if(e[n.name]instanceof Array)return e[n.name].push(n.value),e;const u=[e[n.name],n.value];return e[n.name]=u,e}export{t as default};
@@ -1,2 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const util_1=require("util");exports.default={quote:function(e){return/^[a-z0-9-_/.@%^=:]+$/i.test(e)?e:(0,util_1.format)("'%s'",e.replace(/'/g,"'\\''"))},escape:function(e){return e.replace(/\r/g,"\\r").replace(/\n/g,"\\n")}};
2
- //# sourceMappingURL=shell.js.map
1
+ import{format as r}from"util";var f={quote:function(e){return/^[a-z0-9-_/.@%^=:]+$/i.test(e)?e:r("'%s'",e.replace(/'/g,"'\\''"))},escape:function(e){return e.replace(/\r/g,"\\r").replace(/\n/g,"\\n")}};export{f as default};
@@ -1,2 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const lodash_int_1=require("./lodash-int");class StringUtility{static toCamelCase(t){return(0,lodash_int_1.camelCase)(t)}static toTitleCase(t){return(0,lodash_int_1.startCase)((0,lodash_int_1.camelCase)(t))}static toPascalCase(t){return(0,lodash_int_1.startCase)((0,lodash_int_1.camelCase)(t)).replace(/ /g,"")}static toLowerCase(t){return(0,lodash_int_1.lowerCase)(t).replace(/ /g,"")}static toSnakeCase(t){return(0,lodash_int_1.snakeCase)(t)}}exports.default=StringUtility;
2
- //# sourceMappingURL=string-utility.js.map
1
+ import{camelCase as e,lowerCase as r,snakeCase as s,startCase as a}from"./lodash-int.js";class c{static toCamelCase(t){return e(t)}static toTitleCase(t){return a(e(t))}static toPascalCase(t){return a(e(t)).replace(/ /g,"")}static toLowerCase(t){return r(t).replace(/ /g,"")}static toSnakeCase(t){return s(t)}}export{c as default};
@@ -1,15 +1,21 @@
1
- import type { CustomHAR } from '..';
2
- import type { PostData } from '../har';
1
+ import type { CustomHAR } from '../index.js';
2
+ import type { PostData } from '../har.js';
3
3
  interface ParsedUrlQueryInput {
4
4
  [key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null;
5
5
  }
6
6
  export type KeyValueAreStrings = {
7
7
  [key in string]: string;
8
8
  };
9
+ type QueryObj = {
10
+ [key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null;
11
+ };
12
+ type UriObject = URL & {
13
+ path: string;
14
+ queryObj: QueryObj;
15
+ query: QueryObj;
16
+ };
9
17
  export interface SnippetRequest extends CustomHAR {
10
- queryObj?: {
11
- [key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null;
12
- };
18
+ queryObj?: QueryObj;
13
19
  headersObj: KeyValueAreStrings;
14
20
  cookiesObj?: KeyValueAreStrings;
15
21
  allHeaders: KeyValueAreStrings;
@@ -17,7 +23,7 @@ export interface SnippetRequest extends CustomHAR {
17
23
  jsonObj?: GenericObject;
18
24
  paramsObj?: ParsedUrlQueryInput;
19
25
  };
20
- uriObj?: any;
26
+ uriObj: UriObject;
21
27
  pathParameters: KeyValueAreStrings;
22
28
  serverVariables: Record<string, string>;
23
29
  fullUrl?: string;
@@ -1,2 +1 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,s)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.HTTPSnippet=void 0;const url=__importStar(require("url")),utils_1=require("../../utils"),constants_1=require("../../../constants"),targets_1=__importDefault(require("./targets")),reducer_1=__importDefault(require("./helpers/reducer")),utils_2=require("../../../utils");class HTTPSnippet{constructor(e){Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const t=Object.assign({},e);this.request=this.prepare(Object.assign(Object.assign({},t),{httpVersion:t.httpVersion||"HTTP/1.1",queryString:t.queryString||[],headers:t.headers||[],cookies:t.cookies||[],postData:t.postData?Object.assign(Object.assign({},t.postData),{jsonObj:void 0,paramsObj:void 0}):void 0,bodySize:0,headersSize:0,queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{},uriObj:{},fullUrl:"",pathParameters:t.pathParameters||{},serverVariables:t.serverVariables||{}}))}prepare(e){var t;if(e.queryString&&e.queryString.length&&(e.queryObj=e.queryString.reduce(reducer_1.default,{})),e.headers&&e.headers.length){const t=/^HTTP\/2/;e.headersObj=e.headers.reduce((function(r,a){let s=a.name;return e.httpVersion.match(t)&&(s=s.toLowerCase()),r[s]=a.value,r}),{})}e.cookies&&e.cookies.length&&(e.cookiesObj=e.cookies.reduceRight((function(e,t){return e[t.name]=t.value,e}),{}));const r=e.cookies.map((function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}));if(r.length&&(e.allHeaders.cookie=r.join("; ")),e.postData)switch((0,utils_1.normalizeMimeType)(e.postData.mimeType)){case"multipart/mixed":case"multipart/related":case constants_1.MediaTypes.MULTIPART:case"multipart/alternative":break;case constants_1.MediaTypes.URL_ENCODED:(null===(t=e.postData)||void 0===t?void 0:t.params)?(e.postData.paramsObj=e.postData.params.reduce(reducer_1.default,{}),e.postData.text=utils_2.queryString.stringify(e.postData.paramsObj)):e.postData.text="";break;case"text/json":case"text/x-json":case constants_1.MediaTypes.JSON:case"application/x-json":if(e.postData.text)try{e.postData.jsonObj=JSON.parse(e.postData.text)}catch(t){e.postData.mimeType="text/plain"}}return e.allHeaders=Object.assign(e.allHeaders,e.headersObj),e.uriObj=url.parse(e.url,!0,!0),e.queryObj=Object.assign(e.queryObj,e.uriObj.query),e.uriObj.query=null,e.uriObj.search=null,e.uriObj.path=e.uriObj.pathname=(0,utils_1.unescapeServerVariables)(e.uriObj.pathname),e.url=(0,utils_1.unescapeServerVariables)(url.format(e.uriObj)),e.uriObj.query=e.queryObj,e.uriObj.search=utils_2.queryString.stringify(e.queryObj),e.uriObj.search&&(e.uriObj.path=e.uriObj.pathname+"?"+e.uriObj.search),e.fullUrl=(0,utils_1.unescapeServerVariables)(url.format(e.uriObj)),e}convert(e,t,r){!r&&t&&(r=t);const a=this._matchTarget(e,t);if(a){const s=a(this.request,r,{target:e,client:t});return 1===s.length?s[0]:s}throw new Error("Cannot match target")}_matchTarget(e,t){return!!Object.prototype.hasOwnProperty.call(targets_1.default,e)&&("string"==typeof t&&"function"==typeof targets_1.default[e][t]?targets_1.default[e][t]:targets_1.default[e][targets_1.default[e].info.default])}}exports.HTTPSnippet=HTTPSnippet;
2
- //# sourceMappingURL=index.js.map
1
+ import{normalizeMimeType as m,unescapeServerVariables as p}from"../../utils.js";import{MediaTypes as s}from"../../../constants.js";import e from"./targets/index.js";import c from"./helpers/reducer.js";import{queryString as b}from"../../../utils/index.js";import{urlParse as h}from"../../../utils/url.js";class g{request;constructor(a){const r={...a};this.request=this.prepare({...r,httpVersion:r.httpVersion||"HTTP/1.1",queryString:r.queryString||[],headers:r.headers||[],cookies:r.cookies||[],postData:r.postData?{...r.postData,jsonObj:void 0,paramsObj:void 0}:void 0,bodySize:0,headersSize:0,queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{},uriObj:{},fullUrl:"",pathParameters:r.pathParameters||{},serverVariables:r.serverVariables||{}})}prepare(a){if(a.queryString&&a.queryString.length&&(a.queryObj=a.queryString.reduce(c,{})),a.headers&&a.headers.length){const i=/^HTTP\/2/;a.headersObj=a.headers.reduce(function(t,o){let n=o.name;return a.httpVersion.match(i)&&(n=n.toLowerCase()),t[n]=o.value,t},{})}a.cookies&&a.cookies.length&&(a.cookiesObj=a.cookies.reduceRight(function(i,t){return i[t.name]=t.value,i},{}));const r=a.cookies.map(function(i){return encodeURIComponent(i.name)+"="+encodeURIComponent(i.value)});if(r.length&&(a.allHeaders.cookie=r.join("; ")),a.postData)switch(m(a.postData.mimeType)){case"multipart/mixed":case"multipart/related":case s.MULTIPART:case"multipart/alternative":break;case s.URL_ENCODED:a.postData?.params?(a.postData.paramsObj=a.postData.params.reduce(c,{}),a.postData.text=b.stringify(a.postData.paramsObj)):a.postData.text="";break;case"text/json":case"text/x-json":case s.JSON:case"application/x-json":if(a.postData.text)try{a.postData.jsonObj=JSON.parse(a.postData.text)}catch{a.postData.mimeType="text/plain"}break}if(a.allHeaders=Object.assign(a.allHeaders,a.headersObj),a.uriObj=h(a.url,!0),!a.uriObj)return{...a,uriObj:{protocol:"",path:"",queryObj:{},query:{}}};if(a.queryObj)for(const[i,t]of Object.entries(a.queryObj))a.uriObj.searchParams.has(i,t)||a.uriObj.searchParams.set(i,t);return a.uriObj.query=Object.fromEntries(a.uriObj.searchParams.entries()),a.queryObj=a.uriObj.query,a.uriObj.path=a.uriObj.pathname=p(a.uriObj.pathname),a.url=p(a.uriObj.toString()),a.uriObj.search&&(a.uriObj.path=a.uriObj.pathname+"?"+a.uriObj.search),a.fullUrl=p(a.uriObj.toString()),a}convert(a,r,i){!i&&r&&(i=r);const t=this._matchTarget(a,r);if(t){const o=t(this.request,i,{target:a,client:r});return o.length===1?o[0]:o}throw new Error("Cannot match target")}_matchTarget(a,r){return Object.prototype.hasOwnProperty.call(e,a)?typeof r=="string"&&typeof e[a][r]=="function"?e[a][r]:e[a][e[a].info.default]:!1}}export{g as HTTPSnippet};