@redocly/openapi-docs 3.11.0-next.10 → 3.11.0-next.2

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/bin.js +4 -0
  3. package/dist/redocly-openapi-docs.min.js +10997 -11986
  4. package/lib/components/ApiInfo/ApiInfo.d.ts +1 -1
  5. package/lib/components/ApiInfo/ApiInfo.js +2 -1
  6. package/lib/components/ApiInfo/Metadata.d.ts +1 -1
  7. package/lib/components/ApiInfo/Metadata.js +2 -1
  8. package/lib/components/ApiInfo/index.d.ts +1 -1
  9. package/lib/components/ApiInfo/index.js +2 -1
  10. package/lib/components/ApiInfo/styled.d.ts +4 -4
  11. package/lib/components/ApiInfo/styled.js +9 -8
  12. package/lib/components/CallbackSamples/CallbackSamples.js +5 -4
  13. package/lib/components/CallbackSamples/index.d.ts +1 -1
  14. package/lib/components/CallbackSamples/index.js +2 -1
  15. package/lib/components/Callbacks/CallbackDetails.d.ts +1 -1
  16. package/lib/components/Callbacks/CallbackDetails.js +4 -3
  17. package/lib/components/Callbacks/CallbackOperation.d.ts +1 -1
  18. package/lib/components/Callbacks/CallbackOperation.js +4 -3
  19. package/lib/components/Callbacks/CallbackSummary.d.ts +1 -1
  20. package/lib/components/Callbacks/CallbackSummary.js +4 -3
  21. package/lib/components/Callbacks/CallbacksList.d.ts +1 -1
  22. package/lib/components/Callbacks/CallbacksList.js +2 -1
  23. package/lib/components/Callbacks/index.d.ts +3 -3
  24. package/lib/components/Callbacks/index.js +2 -1
  25. package/lib/components/Callbacks/styled.d.ts +3 -1
  26. package/lib/components/Callbacks/styled.js +3 -2
  27. package/lib/components/Content/Content.d.ts +1 -1
  28. package/lib/components/Content/Content.js +2 -1
  29. package/lib/components/Content/index.d.ts +1 -1
  30. package/lib/components/Content/index.js +2 -1
  31. package/lib/components/Content/useAutoScroll.js +2 -1
  32. package/lib/components/ContentItem/ContentItem.d.ts +1 -1
  33. package/lib/components/ContentItem/ContentItem.js +2 -1
  34. package/lib/components/ContentItem/index.d.ts +1 -1
  35. package/lib/components/ContentItem/index.js +2 -1
  36. package/lib/components/ContentItem/useIsExpanded.d.ts +1 -1
  37. package/lib/components/ContentItem/useIsExpanded.js +2 -1
  38. package/lib/components/ContentItems/ContentItems.d.ts +1 -1
  39. package/lib/components/ContentItems/ContentItems.js +2 -1
  40. package/lib/components/ContentItems/Items.js +2 -1
  41. package/lib/components/ContentItems/VirtualList.d.ts +1 -1
  42. package/lib/components/ContentItems/VirtualList.js +2 -1
  43. package/lib/components/ContentItems/helpers.d.ts +3 -3
  44. package/lib/components/ContentItems/helpers.js +2 -1
  45. package/lib/components/ContentItems/index.d.ts +1 -1
  46. package/lib/components/ContentItems/index.js +2 -1
  47. package/lib/components/ContentItems/useScrollOnRender.d.ts +1 -1
  48. package/lib/components/ContentItems/useScrollOnRender.js +2 -1
  49. package/lib/components/Discriminator/Discriminator.d.ts +1 -1
  50. package/lib/components/Discriminator/Discriminator.js +3 -2
  51. package/lib/components/Discriminator/index.d.ts +1 -1
  52. package/lib/components/Discriminator/index.js +2 -1
  53. package/lib/components/Download/DownloadSpecification.js +5 -4
  54. package/lib/components/Download/index.d.ts +1 -1
  55. package/lib/components/Download/index.js +2 -1
  56. package/lib/components/Download/types.js +2 -0
  57. package/lib/components/Download/useDownloadInfo.d.ts +1 -1
  58. package/lib/components/Download/useDownloadInfo.js +2 -1
  59. package/lib/components/ErrorBoundary/ErrorBoundary.js +3 -2
  60. package/lib/components/ErrorBoundary/index.d.ts +1 -1
  61. package/lib/components/ErrorBoundary/index.js +2 -1
  62. package/lib/components/ExpandAllButton/ExpandAllButton.js +3 -2
  63. package/lib/components/ExpandAllButton/index.d.ts +1 -1
  64. package/lib/components/ExpandAllButton/index.js +2 -1
  65. package/lib/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
  66. package/lib/components/ExternalDocumentation/ExternalDocumentation.js +5 -4
  67. package/lib/components/ExternalDocumentation/index.d.ts +1 -1
  68. package/lib/components/ExternalDocumentation/index.js +2 -1
  69. package/lib/components/Language/LanguageDropdown.d.ts +1 -1
  70. package/lib/components/Language/LanguageDropdown.js +2 -1
  71. package/lib/components/Language/LanguageItem.d.ts +1 -1
  72. package/lib/components/Language/LanguageItem.js +2 -1
  73. package/lib/components/Language/LanguageList.d.ts +1 -1
  74. package/lib/components/Language/LanguageList.js +2 -1
  75. package/lib/components/Language/_tests_/LanguageDropdown.test.js +2 -1
  76. package/lib/components/Language/constants.js +2 -1
  77. package/lib/components/Language/index.d.ts +3 -3
  78. package/lib/components/Language/index.js +2 -1
  79. package/lib/components/Language/styled.d.ts +31 -8
  80. package/lib/components/Language/styled.js +12 -11
  81. package/lib/components/Markdown/Markdown.d.ts +1 -1
  82. package/lib/components/Markdown/Markdown.js +2 -1
  83. package/lib/components/Markdown/index.d.ts +2 -2
  84. package/lib/components/Markdown/index.js +2 -1
  85. package/lib/components/Markdown/types.js +2 -0
  86. package/lib/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +2 -2
  87. package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +2 -1
  88. package/lib/components/MediaTypeSwitch/index.d.ts +1 -1
  89. package/lib/components/MediaTypeSwitch/index.js +2 -1
  90. package/lib/components/OperationItem/Description.d.ts +1 -1
  91. package/lib/components/OperationItem/Description.js +2 -1
  92. package/lib/components/OperationItem/OperationItem.d.ts +3 -1
  93. package/lib/components/OperationItem/OperationItem.js +6 -5
  94. package/lib/components/OperationItem/_tests_/OperationItem.test.js +2 -1
  95. package/lib/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.js +2 -1
  96. package/lib/components/OperationItem/index.d.ts +2 -2
  97. package/lib/components/OperationItem/index.js +2 -1
  98. package/lib/components/OperationItem/types.d.ts +1 -1
  99. package/lib/components/OperationItem/types.js +2 -0
  100. package/lib/components/Overlay.d.ts +1 -1
  101. package/lib/components/Overlay.js +4 -3
  102. package/lib/components/Overview/Overview.d.ts +1 -1
  103. package/lib/components/Overview/Overview.js +2 -1
  104. package/lib/components/Overview/index.d.ts +1 -1
  105. package/lib/components/Overview/index.js +2 -1
  106. package/lib/components/PageFooter/PageFooter.js +2 -1
  107. package/lib/components/PageFooter/index.d.ts +1 -1
  108. package/lib/components/PageFooter/index.js +2 -1
  109. package/lib/components/Panel/ResponsePanel.d.ts +3 -2
  110. package/lib/components/Panel/ResponsePanel.js +7 -6
  111. package/lib/components/Panel/Trigger.d.ts +1 -1
  112. package/lib/components/Panel/Trigger.js +3 -2
  113. package/lib/components/Panel/index.d.ts +2 -2
  114. package/lib/components/Panel/index.js +2 -1
  115. package/lib/components/PanelItem/PanelItem.js +2 -1
  116. package/lib/components/PanelItem/index.d.ts +2 -2
  117. package/lib/components/PanelItem/index.js +2 -1
  118. package/lib/components/PanelItem/styled.d.ts +16 -8
  119. package/lib/components/PanelItem/styled.js +10 -9
  120. package/lib/components/PayloadSamples/Example.d.ts +1 -1
  121. package/lib/components/PayloadSamples/Example.js +2 -1
  122. package/lib/components/PayloadSamples/ExampleValue.d.ts +1 -1
  123. package/lib/components/PayloadSamples/ExampleValue.js +2 -1
  124. package/lib/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
  125. package/lib/components/PayloadSamples/MediaTypeSamples.js +3 -2
  126. package/lib/components/PayloadSamples/PayloadSamples.d.ts +1 -1
  127. package/lib/components/PayloadSamples/PayloadSamples.js +2 -1
  128. package/lib/components/PayloadSamples/index.d.ts +5 -6
  129. package/lib/components/PayloadSamples/index.js +2 -1
  130. package/lib/components/PayloadSamples/styled.d.ts +4 -3
  131. package/lib/components/PayloadSamples/styled.js +5 -4
  132. package/lib/components/PayloadSamples/types.d.ts +3 -3
  133. package/lib/components/PayloadSamples/types.js +2 -0
  134. package/lib/components/PropertyDetails/DescriptionEnums.d.ts +1 -1
  135. package/lib/components/PropertyDetails/DescriptionEnums.js +4 -3
  136. package/lib/components/PropertyDetails/EnumValues.d.ts +1 -1
  137. package/lib/components/PropertyDetails/EnumValues.js +2 -1
  138. package/lib/components/PropertyDetails/Examples.d.ts +1 -1
  139. package/lib/components/PropertyDetails/Examples.js +2 -1
  140. package/lib/components/PropertyDetails/Extensions.d.ts +1 -1
  141. package/lib/components/PropertyDetails/Extensions.js +3 -2
  142. package/lib/components/PropertyDetails/FieldDetail.js +3 -2
  143. package/lib/components/PropertyDetails/FieldDetails.d.ts +1 -1
  144. package/lib/components/PropertyDetails/FieldDetails.js +7 -6
  145. package/lib/components/PropertyDetails/Pattern.js +2 -1
  146. package/lib/components/PropertyDetails/PlusCircleIcon.js +5 -4
  147. package/lib/components/PropertyDetails/PropertyDetails.d.ts +1 -1
  148. package/lib/components/PropertyDetails/PropertyDetails.js +3 -2
  149. package/lib/components/PropertyDetails/SchemaTypeInfo.js +3 -2
  150. package/lib/components/PropertyDetails/SimpleEnums.d.ts +1 -1
  151. package/lib/components/PropertyDetails/SimpleEnums.js +3 -2
  152. package/lib/components/PropertyDetails/cycleColorsByLevel.js +2 -1
  153. package/lib/components/PropertyDetails/index.d.ts +3 -3
  154. package/lib/components/PropertyDetails/index.js +2 -1
  155. package/lib/components/PropertyDetails/styled.d.ts +6 -6
  156. package/lib/components/PropertyDetails/styled.js +8 -7
  157. package/lib/components/PropertyDetails/types.d.ts +2 -3
  158. package/lib/components/PropertyDetails/types.js +2 -0
  159. package/lib/components/RedoclyOpenAPIDocs/Providers.d.ts +3 -2
  160. package/lib/components/RedoclyOpenAPIDocs/Providers.js +2 -1
  161. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +3 -2
  162. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +2 -1
  163. package/lib/components/RedoclyOpenAPIDocs/index.d.ts +4 -4
  164. package/lib/components/RedoclyOpenAPIDocs/index.js +2 -1
  165. package/lib/components/RedoclyOpenAPIDocs/styled.d.ts +1 -1
  166. package/lib/components/RedoclyOpenAPIDocs/styled.js +3 -2
  167. package/lib/components/RedoclyOpenAPIDocs/types.d.ts +3 -3
  168. package/lib/components/RedoclyOpenAPIDocs/types.js +2 -0
  169. package/lib/components/RedoclyOpenAPIDocs/utils.d.ts +4 -1
  170. package/lib/components/RedoclyOpenAPIDocs/utils.js +2 -1
  171. package/lib/components/RenderHook/RenderHook.d.ts +2 -2
  172. package/lib/components/RenderHook/RenderHook.js +2 -1
  173. package/lib/components/RenderHook/index.d.ts +1 -1
  174. package/lib/components/RenderHook/index.js +2 -1
  175. package/lib/components/Replay/EmbeddedReplay.d.ts +1 -1
  176. package/lib/components/Replay/EmbeddedReplay.js +4 -3
  177. package/lib/components/Replay/Replay.d.ts +1 -1
  178. package/lib/components/Replay/Replay.js +2 -1
  179. package/lib/components/Replay/index.d.ts +2 -2
  180. package/lib/components/Replay/index.js +2 -1
  181. package/lib/components/Replay/utils.d.ts +4 -4
  182. package/lib/components/Replay/utils.js +2 -1
  183. package/lib/components/Request/RequestDetails.d.ts +1 -1
  184. package/lib/components/Request/RequestDetails.js +3 -2
  185. package/lib/components/Request/types.js +2 -0
  186. package/lib/components/RequestParameters/Body.d.ts +1 -1
  187. package/lib/components/RequestParameters/Body.js +2 -1
  188. package/lib/components/RequestParameters/ParametersGroup.d.ts +1 -1
  189. package/lib/components/RequestParameters/ParametersGroup.js +5 -4
  190. package/lib/components/RequestParameters/RequestParameters.d.ts +1 -1
  191. package/lib/components/RequestParameters/RequestParameters.js +2 -1
  192. package/lib/components/RequestParameters/index.d.ts +2 -3
  193. package/lib/components/RequestParameters/index.js +2 -1
  194. package/lib/components/RequestSamples/CodeSample.d.ts +3 -3
  195. package/lib/components/RequestSamples/CodeSample.js +3 -2
  196. package/lib/components/RequestSamples/Example.d.ts +1 -1
  197. package/lib/components/RequestSamples/Example.js +2 -1
  198. package/lib/components/RequestSamples/RequestSamples.d.ts +2 -2
  199. package/lib/components/RequestSamples/RequestSamples.js +6 -5
  200. package/lib/components/RequestSamples/index.d.ts +2 -2
  201. package/lib/components/RequestSamples/index.js +2 -1
  202. package/lib/components/RequestSamples/useCodeSamples.d.ts +3 -3
  203. package/lib/components/RequestSamples/useCodeSamples.js +2 -1
  204. package/lib/components/ResponseSamples/ResponseSamples.d.ts +2 -2
  205. package/lib/components/ResponseSamples/ResponseSamples.js +2 -1
  206. package/lib/components/ResponseSamples/Summary.js +2 -1
  207. package/lib/components/ResponseSamples/index.d.ts +1 -1
  208. package/lib/components/ResponseSamples/index.js +2 -1
  209. package/lib/components/Responses/OperationResponseList.d.ts +3 -3
  210. package/lib/components/Responses/OperationResponseList.js +3 -2
  211. package/lib/components/Responses/ResponseDetails.d.ts +1 -1
  212. package/lib/components/Responses/ResponseDetails.js +2 -1
  213. package/lib/components/Responses/ResponseHeaders.d.ts +1 -1
  214. package/lib/components/Responses/ResponseHeaders.js +2 -1
  215. package/lib/components/Responses/index.d.ts +3 -5
  216. package/lib/components/Responses/index.js +2 -1
  217. package/lib/components/Responses/styled.d.ts +5 -5
  218. package/lib/components/Responses/styled.js +7 -6
  219. package/lib/components/Responses/types.d.ts +1 -1
  220. package/lib/components/Responses/types.js +2 -0
  221. package/lib/components/RightPanel/RightPanel.d.ts +1 -1
  222. package/lib/components/RightPanel/RightPanel.js +2 -1
  223. package/lib/components/RightPanel/index.d.ts +1 -1
  224. package/lib/components/RightPanel/index.js +2 -1
  225. package/lib/components/Samples/ExampleSwitch.d.ts +1 -1
  226. package/lib/components/Samples/ExampleSwitch.js +2 -1
  227. package/lib/components/Samples/index.d.ts +2 -2
  228. package/lib/components/Samples/index.js +2 -1
  229. package/lib/components/Samples/use-example-key.d.ts +1 -1
  230. package/lib/components/Samples/use-example-key.js +2 -1
  231. package/lib/components/Schema/ArraySchema.d.ts +1 -1
  232. package/lib/components/Schema/ArraySchema.js +2 -1
  233. package/lib/components/Schema/ObjectSchema.d.ts +1 -1
  234. package/lib/components/Schema/ObjectSchema.js +2 -1
  235. package/lib/components/Schema/OneOfSchema.d.ts +2 -11
  236. package/lib/components/Schema/OneOfSchema.js +4 -3
  237. package/lib/components/Schema/RecursiveSchema.d.ts +1 -1
  238. package/lib/components/Schema/RecursiveSchema.js +2 -1
  239. package/lib/components/Schema/Schema.d.ts +1 -1
  240. package/lib/components/Schema/Schema.js +3 -2
  241. package/lib/components/Schema/SubSchema.js +2 -1
  242. package/lib/components/Schema/helpers.d.ts +1 -1
  243. package/lib/components/Schema/helpers.js +2 -1
  244. package/lib/components/Schema/index.d.ts +5 -5
  245. package/lib/components/Schema/index.js +2 -1
  246. package/lib/components/Schema/types.d.ts +1 -7
  247. package/lib/components/Schema/types.js +2 -0
  248. package/lib/components/Schema/useOneOfLocationIdx.d.ts +1 -1
  249. package/lib/components/Schema/useOneOfLocationIdx.js +2 -1
  250. package/lib/components/SchemaDefinition/SchemaDefinition.js +3 -2
  251. package/lib/components/SchemaDefinition/index.d.ts +1 -1
  252. package/lib/components/SchemaDefinition/index.js +2 -1
  253. package/lib/components/SectionContent/SectionContent.d.ts +10 -3
  254. package/lib/components/SectionContent/SectionContent.js +7 -6
  255. package/lib/components/SectionContent/index.d.ts +1 -1
  256. package/lib/components/SectionContent/index.js +2 -1
  257. package/lib/components/SectionItem/SectionItem.d.ts +1 -1
  258. package/lib/components/SectionItem/SectionItem.js +2 -1
  259. package/lib/components/SectionItem/index.d.ts +1 -1
  260. package/lib/components/SectionItem/index.js +2 -1
  261. package/lib/components/Security/Divider.js +3 -2
  262. package/lib/components/Security/OAuthFlow.d.ts +1 -1
  263. package/lib/components/Security/OAuthFlow.js +2 -1
  264. package/lib/components/Security/OAuthScopes.d.ts +2 -2
  265. package/lib/components/Security/OAuthScopes.js +10 -9
  266. package/lib/components/Security/Security.d.ts +1 -1
  267. package/lib/components/Security/Security.js +2 -1
  268. package/lib/components/Security/SecurityButton.d.ts +1 -1
  269. package/lib/components/Security/SecurityButton.js +8 -7
  270. package/lib/components/Security/SecurityFlow.d.ts +1 -1
  271. package/lib/components/Security/SecurityFlow.js +5 -4
  272. package/lib/components/Security/SecurityModal.d.ts +1 -1
  273. package/lib/components/Security/SecurityModal.js +6 -5
  274. package/lib/components/Security/SecuritySchemeItem.js +5 -4
  275. package/lib/components/Security/helper.d.ts +1 -1
  276. package/lib/components/Security/helper.js +2 -1
  277. package/lib/components/Security/index.d.ts +1 -10
  278. package/lib/components/Security/index.js +2 -1
  279. package/lib/components/Security/styled.d.ts +2 -2
  280. package/lib/components/Security/styled.js +4 -3
  281. package/lib/components/SelectOrLabel/SelectOrLabel.d.ts +1 -1
  282. package/lib/components/SelectOrLabel/SelectOrLabel.js +3 -2
  283. package/lib/components/SelectOrLabel/index.d.ts +1 -1
  284. package/lib/components/SelectOrLabel/index.js +2 -1
  285. package/lib/components/ServerList/ServerList.d.ts +1 -1
  286. package/lib/components/ServerList/ServerList.js +11 -10
  287. package/lib/components/ServerList/index.d.ts +1 -1
  288. package/lib/components/ServerList/index.js +2 -1
  289. package/lib/components/ServerList/types.d.ts +1 -1
  290. package/lib/components/ServerList/types.js +2 -0
  291. package/lib/components/ServerListDropdown/ServerListDropdown.d.ts +1 -1
  292. package/lib/components/ServerListDropdown/ServerListDropdown.js +2 -1
  293. package/lib/components/ServerListDropdown/index.d.ts +1 -1
  294. package/lib/components/ServerListDropdown/index.js +2 -1
  295. package/lib/components/ServerListDropdown/styled.d.ts +5 -4
  296. package/lib/components/ServerListDropdown/styled.js +7 -6
  297. package/lib/components/SideMenu/SideMenu.d.ts +2 -2
  298. package/lib/components/SideMenu/SideMenu.js +3 -2
  299. package/lib/components/SideMenu/hooks/useMenuItems.d.ts +2 -2
  300. package/lib/components/SideMenu/hooks/useMenuItems.js +2 -1
  301. package/lib/components/SideMenu/index.d.ts +1 -1
  302. package/lib/components/SideMenu/index.js +2 -1
  303. package/lib/components/SideMenu/types.d.ts +1 -1
  304. package/lib/components/SideMenu/types.js +2 -0
  305. package/lib/components/StickySidebar/SidebarActions.js +3 -2
  306. package/lib/components/StickySidebar/StickyResponsiveSidebar.js +4 -3
  307. package/lib/components/StickySidebar/index.d.ts +1 -1
  308. package/lib/components/StickySidebar/index.js +2 -1
  309. package/lib/components/Tabs/Tabs.d.ts +1 -1
  310. package/lib/components/Tabs/Tabs.js +6 -5
  311. package/lib/components/Tabs/index.d.ts +2 -2
  312. package/lib/components/Tabs/index.js +2 -1
  313. package/lib/components/Tabs/useTabsState.d.ts +1 -1
  314. package/lib/components/Tabs/useTabsState.js +2 -1
  315. package/lib/components/TagItem/OperationNavigationItems.d.ts +1 -1
  316. package/lib/components/TagItem/OperationNavigationItems.js +5 -4
  317. package/lib/components/TagItem/OperationsNavigation.d.ts +1 -1
  318. package/lib/components/TagItem/OperationsNavigation.js +3 -2
  319. package/lib/components/TagItem/TagItem.d.ts +1 -1
  320. package/lib/components/TagItem/TagItem.js +8 -7
  321. package/lib/components/TagItem/index.d.ts +1 -1
  322. package/lib/components/TagItem/index.js +2 -1
  323. package/lib/components/TagItem/styled.d.ts +1 -1
  324. package/lib/components/TagItem/styled.js +3 -2
  325. package/lib/components/TagItem/types.d.ts +1 -1
  326. package/lib/components/TagItem/types.js +2 -0
  327. package/lib/components/ViewNested/ViewNested.js +8 -7
  328. package/lib/components/ViewNested/index.d.ts +1 -1
  329. package/lib/components/ViewNested/index.js +2 -1
  330. package/lib/components/common/Badges.d.ts +7 -3
  331. package/lib/components/common/Badges.js +5 -4
  332. package/lib/components/common/BodyContent/BodyContent.d.ts +1 -1
  333. package/lib/components/common/BodyContent/BodyContent.js +5 -4
  334. package/lib/components/common/BodyContent/index.d.ts +1 -1
  335. package/lib/components/common/BodyContent/index.js +2 -1
  336. package/lib/components/common/ClearButton/ClearButton.d.ts +1 -1
  337. package/lib/components/common/ClearButton/ClearButton.js +2 -1
  338. package/lib/components/common/ClearButton/index.d.ts +2 -2
  339. package/lib/components/common/ClearButton/index.js +2 -1
  340. package/lib/components/common/ClearButton/styled.d.ts +1 -1
  341. package/lib/components/common/ClearButton/styled.js +3 -2
  342. package/lib/components/common/ClearButton/types.js +2 -0
  343. package/lib/components/common/CodeBlockPanel.d.ts +2 -1
  344. package/lib/components/common/CodeBlockPanel.js +4 -3
  345. package/lib/components/common/ConstraintsView.js +3 -2
  346. package/lib/components/common/Dropdown/Dropdown.js +5 -4
  347. package/lib/components/common/Dropdown/index.d.ts +2 -2
  348. package/lib/components/common/Dropdown/index.js +2 -1
  349. package/lib/components/common/ExpandableExample/ExpandableExample.js +4 -3
  350. package/lib/components/common/ExpandableExample/index.d.ts +1 -1
  351. package/lib/components/common/ExpandableExample/index.js +2 -1
  352. package/lib/components/common/Extensions.js +3 -2
  353. package/lib/components/common/Fields/fields-layout.d.ts +14 -8
  354. package/lib/components/common/Fields/fields-layout.js +50 -57
  355. package/lib/components/common/Fields/fields.d.ts +38 -17
  356. package/lib/components/common/Fields/fields.js +18 -17
  357. package/lib/components/common/Fields/index.d.ts +2 -2
  358. package/lib/components/common/Fields/index.js +2 -1
  359. package/lib/components/common/LinkToField.d.ts +5 -2
  360. package/lib/components/common/LinkToField.js +7 -6
  361. package/lib/components/common/OperationItemTitle.d.ts +2 -2
  362. package/lib/components/common/OperationItemTitle.js +6 -5
  363. package/lib/components/common/SchemaSelection/SchemaSelection.d.ts +1 -1
  364. package/lib/components/common/SchemaSelection/SchemaSelection.js +2 -1
  365. package/lib/components/common/SchemaSelection/index.d.ts +1 -1
  366. package/lib/components/common/SchemaSelection/index.js +2 -1
  367. package/lib/components/common/Select/Select.d.ts +1 -1
  368. package/lib/components/common/Select/Select.js +2 -1
  369. package/lib/components/common/Select/index.d.ts +2 -2
  370. package/lib/components/common/Select/index.js +2 -1
  371. package/lib/components/common/Select/styled.d.ts +22 -4
  372. package/lib/components/common/Select/styled.js +13 -12
  373. package/lib/components/common/Select/types.js +2 -0
  374. package/lib/components/common/Skeleton/LanguageListSkeleton.js +7 -6
  375. package/lib/components/common/Skeleton/Skeleton.d.ts +3 -1
  376. package/lib/components/common/Skeleton/Skeleton.js +6 -5
  377. package/lib/components/common/Skeleton/index.d.ts +1 -2
  378. package/lib/components/common/Skeleton/index.js +2 -1
  379. package/lib/components/common/headers.d.ts +1 -1
  380. package/lib/components/common/headers.js +3 -2
  381. package/lib/components/common/index.d.ts +14 -14
  382. package/lib/components/common/index.js +2 -1
  383. package/lib/components/common/linkify.d.ts +1 -1
  384. package/lib/components/common/linkify.js +5 -4
  385. package/lib/components/common/mixins.js +3 -2
  386. package/lib/components/common/panels.d.ts +17 -4
  387. package/lib/components/common/panels.js +28 -27
  388. package/lib/components/common/schema.d.ts +7 -4
  389. package/lib/components/common/schema.js +9 -8
  390. package/lib/components/common/styled.d.ts +7 -6
  391. package/lib/components/common/styled.js +8 -7
  392. package/lib/components/index.d.ts +23 -23
  393. package/lib/components/index.js +2 -1
  394. package/lib/components/pluggable/RedocExample.d.ts +1 -1
  395. package/lib/components/pluggable/RedocExample.js +2 -1
  396. package/lib/components/pluggable/RedocSchema.d.ts +2 -4
  397. package/lib/components/pluggable/RedocSchema.js +2 -1
  398. package/lib/components/pluggable/index.d.ts +2 -2
  399. package/lib/components/pluggable/index.js +2 -1
  400. package/lib/components/pluggable/styled.components.d.ts +7 -3
  401. package/lib/components/pluggable/styled.components.js +5 -4
  402. package/lib/constants.js +2 -1
  403. package/lib/empty.d.ts +2 -5
  404. package/lib/empty.js +2 -1
  405. package/lib/events/codeSampleCopy.d.ts +1 -1
  406. package/lib/events/codeSampleCopy.js +2 -1
  407. package/lib/events/creator.d.ts +1 -1
  408. package/lib/events/creator.js +2 -1
  409. package/lib/events/index.d.ts +8 -8
  410. package/lib/events/index.js +2 -1
  411. package/lib/events/languageSwitch.d.ts +1 -1
  412. package/lib/events/languageSwitch.js +2 -1
  413. package/lib/events/panelToggle.d.ts +1 -1
  414. package/lib/events/panelToggle.js +2 -1
  415. package/lib/events/serverSwitch.d.ts +1 -1
  416. package/lib/events/serverSwitch.js +2 -1
  417. package/lib/events/tryItOpen.d.ts +1 -1
  418. package/lib/events/tryItOpen.js +2 -1
  419. package/lib/events/tryItSent.d.ts +1 -1
  420. package/lib/events/tryItSent.js +2 -1
  421. package/lib/events/types.d.ts +1 -1
  422. package/lib/events/types.js +2 -1
  423. package/lib/hoc/types.d.ts +3 -3
  424. package/lib/hoc/types.js +2 -0
  425. package/lib/hoc/utils.js +2 -1
  426. package/lib/hoc/withRouter.d.ts +1 -1
  427. package/lib/hoc/withRouter.js +2 -1
  428. package/lib/hoc/withStore.d.ts +1 -1
  429. package/lib/hoc/withStore.js +2 -1
  430. package/lib/hooks/index.d.ts +8 -8
  431. package/lib/hooks/index.js +2 -1
  432. package/lib/hooks/useActivateExample.d.ts +1 -1
  433. package/lib/hooks/useActivateExample.js +2 -1
  434. package/lib/hooks/useActiveWithFallback.js +2 -1
  435. package/lib/hooks/useContentItems.d.ts +2 -2
  436. package/lib/hooks/useContentItems.js +2 -1
  437. package/lib/hooks/useLicense.d.ts +1 -1
  438. package/lib/hooks/useLicense.js +2 -1
  439. package/lib/hooks/usePerformanceMetrics.js +2 -1
  440. package/lib/hooks/useRouter.d.ts +1 -1
  441. package/lib/hooks/useRouter.js +2 -1
  442. package/lib/hooks/useTelemetry.js +2 -1
  443. package/lib/hooks/useTranslate.js +2 -1
  444. package/lib/hooks/useUppercase2LowercaseRedirect.js +2 -1
  445. package/lib/icons/CSharpIcon/CSharpIcon.d.ts +3 -1
  446. package/lib/icons/CSharpIcon/CSharpIcon.js +2 -1
  447. package/lib/icons/CSharpIcon/index.d.ts +1 -1
  448. package/lib/icons/CSharpIcon/index.js +2 -1
  449. package/lib/icons/CurlIcon/CurlIcon.d.ts +3 -1
  450. package/lib/icons/CurlIcon/CurlIcon.js +3 -2
  451. package/lib/icons/CurlIcon/index.d.ts +1 -1
  452. package/lib/icons/CurlIcon/index.js +2 -1
  453. package/lib/icons/GOIcon/GOIcon.d.ts +3 -1
  454. package/lib/icons/GOIcon/GOIcon.js +2 -1
  455. package/lib/icons/GOIcon/index.d.ts +1 -1
  456. package/lib/icons/GOIcon/index.js +2 -1
  457. package/lib/icons/JavaIcon/JavaIcon.d.ts +3 -1
  458. package/lib/icons/JavaIcon/JavaIcon.js +2 -1
  459. package/lib/icons/JavaIcon/index.d.ts +1 -1
  460. package/lib/icons/JavaIcon/index.js +2 -1
  461. package/lib/icons/JavaScriptIcon/JavaScriptIcon.d.ts +3 -1
  462. package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +2 -1
  463. package/lib/icons/JavaScriptIcon/index.d.ts +1 -1
  464. package/lib/icons/JavaScriptIcon/index.js +2 -1
  465. package/lib/icons/NodeJSIcon/NodeJSIcon.d.ts +3 -1
  466. package/lib/icons/NodeJSIcon/NodeJSIcon.js +2 -1
  467. package/lib/icons/NodeJSIcon/index.d.ts +1 -1
  468. package/lib/icons/NodeJSIcon/index.js +2 -1
  469. package/lib/icons/PHPIcon/PHPIcon.d.ts +3 -1
  470. package/lib/icons/PHPIcon/PHPIcon.js +2 -1
  471. package/lib/icons/PHPIcon/index.d.ts +1 -1
  472. package/lib/icons/PHPIcon/index.js +2 -1
  473. package/lib/icons/PayloadIcon/PayloadIcon.d.ts +3 -1
  474. package/lib/icons/PayloadIcon/PayloadIcon.js +2 -1
  475. package/lib/icons/PayloadIcon/index.d.ts +1 -1
  476. package/lib/icons/PayloadIcon/index.js +2 -1
  477. package/lib/icons/PythonIcon/PythonIcon.d.ts +3 -1
  478. package/lib/icons/PythonIcon/PythonIcon.js +2 -1
  479. package/lib/icons/PythonIcon/index.d.ts +1 -1
  480. package/lib/icons/PythonIcon/index.js +2 -1
  481. package/lib/icons/RIcon/RIcon.d.ts +3 -1
  482. package/lib/icons/RIcon/RIcon.js +2 -1
  483. package/lib/icons/RIcon/index.d.ts +1 -1
  484. package/lib/icons/RIcon/index.js +2 -1
  485. package/lib/icons/RubyIcon/RubyIcon.d.ts +3 -1
  486. package/lib/icons/RubyIcon/RubyIcon.js +2 -1
  487. package/lib/icons/RubyIcon/index.d.ts +1 -1
  488. package/lib/icons/RubyIcon/index.js +2 -1
  489. package/lib/index.d.ts +43 -52
  490. package/lib/index.js +2 -1
  491. package/lib/jotai/app.d.ts +2 -2
  492. package/lib/jotai/app.js +2 -1
  493. package/lib/jotai/operation.js +2 -1
  494. package/lib/jotai/replay.d.ts +1 -1
  495. package/lib/jotai/replay.js +2 -1
  496. package/lib/jotai/store.d.ts +1 -1
  497. package/lib/jotai/store.js +2 -1
  498. package/lib/jotai/use-write-atom.js +2 -1
  499. package/lib/models/callback.d.ts +3 -3
  500. package/lib/models/callback.js +2 -1
  501. package/lib/models/code-sample-options.d.ts +2 -2
  502. package/lib/models/code-sample-options.js +2 -0
  503. package/lib/models/example.d.ts +3 -3
  504. package/lib/models/example.js +2 -1
  505. package/lib/models/field.d.ts +3 -3
  506. package/lib/models/field.js +2 -1
  507. package/lib/models/group.d.ts +3 -3
  508. package/lib/models/group.js +2 -1
  509. package/lib/models/index.d.ts +15 -15
  510. package/lib/models/index.js +2 -1
  511. package/lib/models/mediaContent.d.ts +2 -2
  512. package/lib/models/mediaContent.js +2 -1
  513. package/lib/models/mediaType.d.ts +3 -3
  514. package/lib/models/mediaType.js +2 -1
  515. package/lib/models/operation.d.ts +3 -3
  516. package/lib/models/operation.js +2 -1
  517. package/lib/models/request.d.ts +3 -3
  518. package/lib/models/request.js +2 -1
  519. package/lib/models/response.d.ts +3 -3
  520. package/lib/models/response.js +2 -1
  521. package/lib/models/schema.d.ts +3 -3
  522. package/lib/models/schema.js +2 -2
  523. package/lib/models/security.d.ts +3 -3
  524. package/lib/models/security.js +2 -1
  525. package/lib/models/tab.js +2 -0
  526. package/lib/models/types.d.ts +4 -4
  527. package/lib/models/types.js +2 -0
  528. package/lib/services/OpenAPIParser.d.ts +3 -3
  529. package/lib/services/OpenAPIParser.js +2 -1
  530. package/lib/services/check.js +2 -1
  531. package/lib/services/code-samples/constants.d.ts +1 -1
  532. package/lib/services/code-samples/constants.js +2 -1
  533. package/lib/services/code-samples/generator.d.ts +3 -3
  534. package/lib/services/code-samples/generator.js +2 -1
  535. package/lib/services/code-samples/httpsnippet/helpers/code-builder.d.ts +2 -2
  536. package/lib/services/code-samples/httpsnippet/helpers/code-builder.js +2 -3
  537. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
  538. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +2 -2
  539. package/lib/services/code-samples/httpsnippet/helpers/constants.js +2 -1
  540. package/lib/services/code-samples/httpsnippet/helpers/lodash-int.js +2 -1
  541. package/lib/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.js +2 -37
  542. package/lib/services/code-samples/httpsnippet/helpers/reducer.js +2 -1
  543. package/lib/services/code-samples/httpsnippet/helpers/shell.js +2 -1
  544. package/lib/services/code-samples/httpsnippet/helpers/string-utility.js +2 -1
  545. package/lib/services/code-samples/httpsnippet/index.d.ts +6 -12
  546. package/lib/services/code-samples/httpsnippet/index.js +2 -1
  547. package/lib/services/code-samples/httpsnippet/targets/__mocks__/mock.js +2 -146
  548. package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +2 -2
  549. package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.js +2 -2
  550. package/lib/services/code-samples/httpsnippet/targets/csharp/index.d.ts +1 -1
  551. package/lib/services/code-samples/httpsnippet/targets/csharp/index.js +2 -1
  552. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.d.ts +2 -2
  553. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.js +2 -2
  554. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.d.ts +1 -1
  555. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.js +2 -1
  556. package/lib/services/code-samples/httpsnippet/targets/go/index.d.ts +1 -1
  557. package/lib/services/code-samples/httpsnippet/targets/go/index.js +2 -1
  558. package/lib/services/code-samples/httpsnippet/targets/go/native.d.ts +2 -2
  559. package/lib/services/code-samples/httpsnippet/targets/go/native.js +2 -3
  560. package/lib/services/code-samples/httpsnippet/targets/index.d.ts +12 -12
  561. package/lib/services/code-samples/httpsnippet/targets/index.js +2 -1
  562. package/lib/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +2 -2
  563. package/lib/services/code-samples/httpsnippet/targets/java/httpclient.js +2 -3
  564. package/lib/services/code-samples/httpsnippet/targets/java/index.d.ts +1 -1
  565. package/lib/services/code-samples/httpsnippet/targets/java/index.js +2 -1
  566. package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +2 -2
  567. package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.js +2 -2
  568. package/lib/services/code-samples/httpsnippet/targets/java8/index.d.ts +1 -1
  569. package/lib/services/code-samples/httpsnippet/targets/java8/index.js +2 -1
  570. package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +2 -2
  571. package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.js +2 -1
  572. package/lib/services/code-samples/httpsnippet/targets/javascript/index.d.ts +1 -1
  573. package/lib/services/code-samples/httpsnippet/targets/javascript/index.js +2 -1
  574. package/lib/services/code-samples/httpsnippet/targets/node/fetch.d.ts +2 -2
  575. package/lib/services/code-samples/httpsnippet/targets/node/fetch.js +2 -1
  576. package/lib/services/code-samples/httpsnippet/targets/node/index.d.ts +1 -1
  577. package/lib/services/code-samples/httpsnippet/targets/node/index.js +2 -1
  578. package/lib/services/code-samples/httpsnippet/targets/php/curl.d.ts +2 -2
  579. package/lib/services/code-samples/httpsnippet/targets/php/curl.js +2 -5
  580. package/lib/services/code-samples/httpsnippet/targets/php/index.d.ts +1 -1
  581. package/lib/services/code-samples/httpsnippet/targets/php/index.js +2 -1
  582. package/lib/services/code-samples/httpsnippet/targets/php/types.js +2 -0
  583. package/lib/services/code-samples/httpsnippet/targets/php/utils.d.ts +1 -1
  584. package/lib/services/code-samples/httpsnippet/targets/php/utils.js +2 -5
  585. package/lib/services/code-samples/httpsnippet/targets/python/index.d.ts +1 -1
  586. package/lib/services/code-samples/httpsnippet/targets/python/index.js +2 -1
  587. package/lib/services/code-samples/httpsnippet/targets/python/requests.d.ts +2 -2
  588. package/lib/services/code-samples/httpsnippet/targets/python/requests.js +2 -6
  589. package/lib/services/code-samples/httpsnippet/targets/r/httr.d.ts +2 -2
  590. package/lib/services/code-samples/httpsnippet/targets/r/httr.js +2 -1
  591. package/lib/services/code-samples/httpsnippet/targets/r/index.d.ts +1 -1
  592. package/lib/services/code-samples/httpsnippet/targets/r/index.js +2 -1
  593. package/lib/services/code-samples/httpsnippet/targets/r/utils.d.ts +3 -3
  594. package/lib/services/code-samples/httpsnippet/targets/r/utils.js +2 -6
  595. package/lib/services/code-samples/httpsnippet/targets/ruby/index.d.ts +1 -1
  596. package/lib/services/code-samples/httpsnippet/targets/ruby/index.js +2 -1
  597. package/lib/services/code-samples/httpsnippet/targets/ruby/native.d.ts +2 -2
  598. package/lib/services/code-samples/httpsnippet/targets/ruby/native.js +2 -1
  599. package/lib/services/code-samples/httpsnippet/targets/shell/curl.d.ts +2 -2
  600. package/lib/services/code-samples/httpsnippet/targets/shell/curl.js +2 -6
  601. package/lib/services/code-samples/httpsnippet/targets/shell/index.d.ts +1 -1
  602. package/lib/services/code-samples/httpsnippet/targets/shell/index.js +2 -1
  603. package/lib/services/code-samples/index.d.ts +2 -2
  604. package/lib/services/code-samples/index.js +2 -1
  605. package/lib/services/code-samples/types.js +2 -0
  606. package/lib/services/config-options/helpers.js +2 -1
  607. package/lib/services/config-options/index.d.ts +2 -2
  608. package/lib/services/config-options/index.js +2 -1
  609. package/lib/services/config-options/normalizeOptions.d.ts +1 -1
  610. package/lib/services/config-options/normalizeOptions.js +2 -1
  611. package/lib/services/config-options/types.d.ts +5 -5
  612. package/lib/services/config-options/types.js +2 -0
  613. package/lib/services/history/helpers.d.ts +1 -1
  614. package/lib/services/history/helpers.js +2 -1
  615. package/lib/services/history/index.d.ts +1 -1
  616. package/lib/services/history/index.js +2 -1
  617. package/lib/services/index.d.ts +8 -8
  618. package/lib/services/index.js +2 -1
  619. package/lib/services/menu/builder.d.ts +3 -3
  620. package/lib/services/menu/builder.js +2 -1
  621. package/lib/services/menu/index.d.ts +1 -1
  622. package/lib/services/menu/index.js +2 -1
  623. package/lib/services/menu/markdown.d.ts +1 -1
  624. package/lib/services/menu/markdown.js +2 -1
  625. package/lib/services/menu/operation.d.ts +2 -2
  626. package/lib/services/menu/operation.js +2 -1
  627. package/lib/services/menu/tags.d.ts +5 -5
  628. package/lib/services/menu/tags.js +2 -1
  629. package/lib/services/types.d.ts +1 -1
  630. package/lib/services/types.js +2 -0
  631. package/lib/services/utils.js +2 -1
  632. package/lib/standalone.d.ts +19 -4
  633. package/lib/standalone.js +2 -1
  634. package/lib/types/app.js +2 -0
  635. package/lib/types/index.d.ts +3 -3
  636. package/lib/types/index.js +2 -1
  637. package/lib/types/open-api.js +2 -0
  638. package/lib/types/security.js +2 -0
  639. package/lib/utils/JsonPointer.js +2 -1
  640. package/lib/utils/areArraysEqual.js +2 -1
  641. package/lib/utils/argValuesHelpers.js +2 -1
  642. package/lib/utils/compose.js +2 -1
  643. package/lib/utils/configure-helpers.d.ts +1 -1
  644. package/lib/utils/configure-helpers.js +2 -1
  645. package/lib/utils/cookies.js +2 -1
  646. package/lib/utils/createParsedDocument.d.ts +2 -0
  647. package/lib/utils/createParsedDocument.js +2 -0
  648. package/lib/utils/debounce.js +2 -1
  649. package/lib/utils/debug.js +2 -1
  650. package/lib/utils/dom.js +2 -1
  651. package/lib/utils/environments.d.ts +1 -1
  652. package/lib/utils/environments.js +2 -1
  653. package/lib/utils/helpers.js +2 -12
  654. package/lib/utils/index.d.ts +23 -23
  655. package/lib/utils/index.js +2 -1
  656. package/lib/utils/isMobile.js +2 -1
  657. package/lib/utils/loadAndBundleSpec.d.ts +3 -2
  658. package/lib/utils/loadAndBundleSpec.js +2 -1
  659. package/lib/utils/local-storage.js +2 -1
  660. package/lib/utils/object.js +2 -1
  661. package/lib/utils/openapi.d.ts +4 -4
  662. package/lib/utils/openapi.js +2 -1
  663. package/lib/utils/parameters.js +2 -1
  664. package/lib/utils/path.js +2 -1
  665. package/lib/utils/queryString.js +2 -1
  666. package/lib/utils/replaceVariables.d.ts +1 -1
  667. package/lib/utils/replaceVariables.js +2 -1
  668. package/lib/utils/saveTextBeforeHeading.js +2 -1
  669. package/lib/utils/security-details.d.ts +1 -1
  670. package/lib/utils/security-details.js +2 -1
  671. package/lib/utils/session-storage.js +2 -1
  672. package/lib/utils/simplifyAstStructure.js +2 -1
  673. package/lib/utils/sort.js +2 -1
  674. package/lib/utils/string.js +2 -1
  675. package/lib/utils/test-utils.js +2 -1
  676. package/lib/utils/theme-helpers.js +4 -3
  677. package/lib-esm/components/ApiInfo/ApiInfo.d.ts +7 -0
  678. package/lib-esm/components/ApiInfo/ApiInfo.js +2 -0
  679. package/lib-esm/components/ApiInfo/Metadata.d.ts +9 -0
  680. package/lib-esm/components/ApiInfo/Metadata.js +2 -0
  681. package/lib-esm/components/ApiInfo/index.d.ts +1 -0
  682. package/lib-esm/components/ApiInfo/index.js +2 -0
  683. package/lib-esm/components/ApiInfo/styled.d.ts +4 -0
  684. package/lib-esm/components/ApiInfo/styled.js +27 -0
  685. package/lib-esm/components/CallbackSamples/CallbackSamples.d.ts +7 -0
  686. package/lib-esm/components/CallbackSamples/CallbackSamples.js +16 -0
  687. package/lib-esm/components/CallbackSamples/index.d.ts +1 -0
  688. package/lib-esm/components/CallbackSamples/index.js +2 -0
  689. package/lib-esm/components/Callbacks/CallbackDetails.d.ts +7 -0
  690. package/lib-esm/components/Callbacks/CallbackDetails.js +20 -0
  691. package/lib-esm/components/Callbacks/CallbackOperation.d.ts +8 -0
  692. package/lib-esm/components/Callbacks/CallbackOperation.js +15 -0
  693. package/lib-esm/components/Callbacks/CallbackSummary.d.ts +8 -0
  694. package/lib-esm/components/Callbacks/CallbackSummary.js +19 -0
  695. package/lib-esm/components/Callbacks/CallbacksList.d.ts +7 -0
  696. package/lib-esm/components/Callbacks/CallbacksList.js +2 -0
  697. package/lib-esm/components/Callbacks/index.d.ts +3 -0
  698. package/lib-esm/components/Callbacks/index.js +2 -0
  699. package/lib-esm/components/Callbacks/styled.d.ts +3 -0
  700. package/lib-esm/components/Callbacks/styled.js +8 -0
  701. package/lib-esm/components/Content/Content.d.ts +7 -0
  702. package/lib-esm/components/Content/Content.js +2 -0
  703. package/lib-esm/components/Content/index.d.ts +1 -0
  704. package/lib-esm/components/Content/index.js +2 -0
  705. package/lib-esm/components/Content/useAutoScroll.d.ts +3 -0
  706. package/lib-esm/components/Content/useAutoScroll.js +2 -0
  707. package/lib-esm/components/ContentItem/ContentItem.d.ts +11 -0
  708. package/lib-esm/components/ContentItem/ContentItem.js +2 -0
  709. package/lib-esm/components/ContentItem/index.d.ts +1 -0
  710. package/lib-esm/components/ContentItem/index.js +2 -0
  711. package/lib-esm/components/ContentItem/useIsExpanded.d.ts +5 -0
  712. package/lib-esm/components/ContentItem/useIsExpanded.js +2 -0
  713. package/lib-esm/components/ContentItems/ContentItems.d.ts +8 -0
  714. package/lib-esm/components/ContentItems/ContentItems.js +2 -0
  715. package/lib-esm/components/ContentItems/Items.d.ts +7 -0
  716. package/lib-esm/components/ContentItems/Items.js +2 -0
  717. package/lib-esm/components/ContentItems/VirtualList.d.ts +7 -0
  718. package/lib-esm/components/ContentItems/VirtualList.js +2 -0
  719. package/lib-esm/components/ContentItems/helpers.d.ts +10 -0
  720. package/lib-esm/components/ContentItems/helpers.js +2 -0
  721. package/lib-esm/components/ContentItems/index.d.ts +1 -0
  722. package/lib-esm/components/ContentItems/index.js +2 -0
  723. package/lib-esm/components/ContentItems/useScrollOnRender.d.ts +3 -0
  724. package/lib-esm/components/ContentItems/useScrollOnRender.js +2 -0
  725. package/lib-esm/components/Discriminator/Discriminator.d.ts +10 -0
  726. package/lib-esm/components/Discriminator/Discriminator.js +6 -0
  727. package/lib-esm/components/Discriminator/index.d.ts +1 -0
  728. package/lib-esm/components/Discriminator/index.js +2 -0
  729. package/lib-esm/components/Download/DownloadSpecification.d.ts +4 -0
  730. package/lib-esm/components/Download/DownloadSpecification.js +40 -0
  731. package/lib-esm/components/Download/index.d.ts +1 -0
  732. package/lib-esm/components/Download/index.js +2 -0
  733. package/lib-esm/components/Download/types.d.ts +15 -0
  734. package/lib-esm/components/Download/types.js +2 -0
  735. package/lib-esm/components/Download/useDownloadInfo.d.ts +2 -0
  736. package/lib-esm/components/Download/useDownloadInfo.js +2 -0
  737. package/lib-esm/components/ErrorBoundary/ErrorBoundary.d.ts +9 -0
  738. package/lib-esm/components/ErrorBoundary/ErrorBoundary.js +5 -0
  739. package/lib-esm/components/ErrorBoundary/index.d.ts +1 -0
  740. package/lib-esm/components/ErrorBoundary/index.js +2 -0
  741. package/lib-esm/components/ExpandAllButton/ExpandAllButton.d.ts +8 -0
  742. package/lib-esm/components/ExpandAllButton/ExpandAllButton.js +4 -0
  743. package/lib-esm/components/ExpandAllButton/index.d.ts +1 -0
  744. package/lib-esm/components/ExpandAllButton/index.js +2 -0
  745. package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.d.ts +7 -0
  746. package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.js +5 -0
  747. package/lib-esm/components/ExternalDocumentation/index.d.ts +1 -0
  748. package/lib-esm/components/ExternalDocumentation/index.js +2 -0
  749. package/lib-esm/components/Language/LanguageDropdown.d.ts +15 -0
  750. package/lib-esm/components/Language/LanguageDropdown.js +2 -0
  751. package/lib-esm/components/Language/LanguageItem.d.ts +11 -0
  752. package/lib-esm/components/Language/LanguageItem.js +2 -0
  753. package/lib-esm/components/Language/LanguageList.d.ts +10 -0
  754. package/lib-esm/components/Language/LanguageList.js +2 -0
  755. package/lib-esm/components/Language/_tests_/LanguageDropdown.test.d.ts +1 -0
  756. package/lib-esm/components/Language/_tests_/LanguageDropdown.test.js +2 -0
  757. package/lib-esm/components/Language/constants.d.ts +2 -0
  758. package/lib-esm/components/Language/constants.js +2 -0
  759. package/lib-esm/components/Language/index.d.ts +3 -0
  760. package/lib-esm/components/Language/index.js +2 -0
  761. package/lib-esm/components/Language/styled.d.ts +31 -0
  762. package/lib-esm/components/Language/styled.js +82 -0
  763. package/lib-esm/components/Markdown/Markdown.d.ts +3 -0
  764. package/lib-esm/components/Markdown/Markdown.js +2 -0
  765. package/lib-esm/components/Markdown/index.d.ts +2 -0
  766. package/lib-esm/components/Markdown/index.js +2 -0
  767. package/lib-esm/components/Markdown/types.d.ts +10 -0
  768. package/lib-esm/components/Markdown/types.js +2 -0
  769. package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +11 -0
  770. package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.js +2 -0
  771. package/lib-esm/components/MediaTypeSwitch/index.d.ts +1 -0
  772. package/lib-esm/components/MediaTypeSwitch/index.js +2 -0
  773. package/lib-esm/components/OperationItem/Description.d.ts +10 -0
  774. package/lib-esm/components/OperationItem/Description.js +2 -0
  775. package/lib-esm/components/OperationItem/OperationItem.d.ts +5 -0
  776. package/lib-esm/components/OperationItem/OperationItem.js +22 -0
  777. package/lib-esm/components/OperationItem/_tests_/OperationItem.test.d.ts +1 -0
  778. package/lib-esm/components/OperationItem/_tests_/OperationItem.test.js +2 -0
  779. package/lib-esm/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.d.ts +15 -0
  780. package/lib-esm/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.js +2 -0
  781. package/lib-esm/components/OperationItem/index.d.ts +2 -0
  782. package/lib-esm/components/OperationItem/index.js +2 -0
  783. package/lib-esm/components/OperationItem/types.d.ts +4 -0
  784. package/lib-esm/components/OperationItem/types.js +2 -0
  785. package/lib-esm/components/Overlay.d.ts +6 -0
  786. package/lib-esm/components/Overlay.js +43 -0
  787. package/lib-esm/components/Overview/Overview.d.ts +9 -0
  788. package/lib-esm/components/Overview/Overview.js +2 -0
  789. package/lib-esm/components/Overview/index.d.ts +1 -0
  790. package/lib-esm/components/Overview/index.js +2 -0
  791. package/lib-esm/components/PageFooter/PageFooter.d.ts +2 -0
  792. package/lib-esm/components/PageFooter/PageFooter.js +2 -0
  793. package/lib-esm/components/PageFooter/index.d.ts +1 -0
  794. package/lib-esm/components/PageFooter/index.js +2 -0
  795. package/lib-esm/components/Panel/ResponsePanel.d.ts +3 -0
  796. package/lib-esm/components/Panel/ResponsePanel.js +25 -0
  797. package/lib-esm/components/Panel/Trigger.d.ts +1 -0
  798. package/lib-esm/components/Panel/Trigger.js +8 -0
  799. package/lib-esm/components/Panel/index.d.ts +2 -0
  800. package/lib-esm/components/Panel/index.js +2 -0
  801. package/lib-esm/components/PanelItem/PanelItem.d.ts +9 -0
  802. package/lib-esm/components/PanelItem/PanelItem.js +2 -0
  803. package/lib-esm/components/PanelItem/index.d.ts +2 -0
  804. package/lib-esm/components/PanelItem/index.js +2 -0
  805. package/lib-esm/components/PanelItem/styled.d.ts +16 -0
  806. package/lib-esm/components/PanelItem/styled.js +53 -0
  807. package/lib-esm/components/PayloadSamples/Example.d.ts +3 -0
  808. package/lib-esm/components/PayloadSamples/Example.js +2 -0
  809. package/lib-esm/components/PayloadSamples/ExampleValue.d.ts +2 -0
  810. package/lib-esm/components/PayloadSamples/ExampleValue.js +2 -0
  811. package/lib-esm/components/PayloadSamples/MediaTypeSamples.d.ts +2 -0
  812. package/lib-esm/components/PayloadSamples/MediaTypeSamples.js +4 -0
  813. package/lib-esm/components/PayloadSamples/PayloadSamples.d.ts +2 -0
  814. package/lib-esm/components/PayloadSamples/PayloadSamples.js +2 -0
  815. package/lib-esm/components/PayloadSamples/index.d.ts +5 -0
  816. package/lib-esm/components/PayloadSamples/index.js +2 -0
  817. package/lib-esm/components/PayloadSamples/styled.d.ts +4 -0
  818. package/lib-esm/components/PayloadSamples/styled.js +22 -0
  819. package/lib-esm/components/PayloadSamples/types.d.ts +25 -0
  820. package/lib-esm/components/PayloadSamples/types.js +2 -0
  821. package/lib-esm/components/PropertyDetails/DescriptionEnums.d.ts +4 -0
  822. package/lib-esm/components/PropertyDetails/DescriptionEnums.js +10 -0
  823. package/lib-esm/components/PropertyDetails/EnumValues.d.ts +2 -0
  824. package/lib-esm/components/PropertyDetails/EnumValues.js +2 -0
  825. package/lib-esm/components/PropertyDetails/Examples.d.ts +5 -0
  826. package/lib-esm/components/PropertyDetails/Examples.js +2 -0
  827. package/lib-esm/components/PropertyDetails/Extensions.d.ts +2 -0
  828. package/lib-esm/components/PropertyDetails/Extensions.js +4 -0
  829. package/lib-esm/components/PropertyDetails/FieldDetail.d.ts +7 -0
  830. package/lib-esm/components/PropertyDetails/FieldDetail.js +8 -0
  831. package/lib-esm/components/PropertyDetails/FieldDetails.d.ts +2 -0
  832. package/lib-esm/components/PropertyDetails/FieldDetails.js +40 -0
  833. package/lib-esm/components/PropertyDetails/Pattern.d.ts +6 -0
  834. package/lib-esm/components/PropertyDetails/Pattern.js +2 -0
  835. package/lib-esm/components/PropertyDetails/PlusCircleIcon.d.ts +7 -0
  836. package/lib-esm/components/PropertyDetails/PlusCircleIcon.js +11 -0
  837. package/lib-esm/components/PropertyDetails/PropertyDetails.d.ts +2 -0
  838. package/lib-esm/components/PropertyDetails/PropertyDetails.js +18 -0
  839. package/lib-esm/components/PropertyDetails/SchemaTypeInfo.d.ts +6 -0
  840. package/lib-esm/components/PropertyDetails/SchemaTypeInfo.js +16 -0
  841. package/lib-esm/components/PropertyDetails/SimpleEnums.d.ts +4 -0
  842. package/lib-esm/components/PropertyDetails/SimpleEnums.js +8 -0
  843. package/lib-esm/components/PropertyDetails/cycleColorsByLevel.d.ts +1 -0
  844. package/lib-esm/components/PropertyDetails/cycleColorsByLevel.js +2 -0
  845. package/lib-esm/components/PropertyDetails/index.d.ts +3 -0
  846. package/lib-esm/components/PropertyDetails/index.js +2 -0
  847. package/lib-esm/components/PropertyDetails/styled.d.ts +6 -0
  848. package/lib-esm/components/PropertyDetails/styled.js +23 -0
  849. package/lib-esm/components/PropertyDetails/types.d.ts +47 -0
  850. package/lib-esm/components/PropertyDetails/types.js +2 -0
  851. package/lib-esm/components/RedoclyOpenAPIDocs/Providers.d.ts +4 -0
  852. package/lib-esm/components/RedoclyOpenAPIDocs/Providers.js +2 -0
  853. package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +4 -0
  854. package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +2 -0
  855. package/lib-esm/components/RedoclyOpenAPIDocs/index.d.ts +4 -0
  856. package/lib-esm/components/RedoclyOpenAPIDocs/index.js +2 -0
  857. package/lib-esm/components/RedoclyOpenAPIDocs/styled.d.ts +1 -0
  858. package/lib-esm/components/RedoclyOpenAPIDocs/styled.js +22 -0
  859. package/lib-esm/components/RedoclyOpenAPIDocs/types.d.ts +47 -0
  860. package/lib-esm/components/RedoclyOpenAPIDocs/types.js +2 -0
  861. package/lib-esm/components/RedoclyOpenAPIDocs/utils.d.ts +8 -0
  862. package/lib-esm/components/RedoclyOpenAPIDocs/utils.js +2 -0
  863. package/lib-esm/components/RenderHook/RenderHook.d.ts +8 -0
  864. package/lib-esm/components/RenderHook/RenderHook.js +2 -0
  865. package/lib-esm/components/RenderHook/index.d.ts +1 -0
  866. package/lib-esm/components/RenderHook/index.js +2 -0
  867. package/lib-esm/components/Replay/EmbeddedReplay.d.ts +9 -0
  868. package/lib-esm/components/Replay/EmbeddedReplay.js +11 -0
  869. package/lib-esm/components/Replay/Replay.d.ts +9 -0
  870. package/lib-esm/components/Replay/Replay.js +2 -0
  871. package/lib-esm/components/Replay/index.d.ts +2 -0
  872. package/lib-esm/components/Replay/index.js +2 -0
  873. package/lib-esm/components/Replay/utils.d.ts +42 -0
  874. package/lib-esm/components/Replay/utils.js +2 -0
  875. package/lib-esm/components/Request/RequestDetails.d.ts +2 -0
  876. package/lib-esm/components/Request/RequestDetails.js +4 -0
  877. package/lib-esm/components/Request/types.d.ts +10 -0
  878. package/lib-esm/components/Request/types.js +2 -0
  879. package/lib-esm/components/RequestParameters/Body.d.ts +9 -0
  880. package/lib-esm/components/RequestParameters/Body.js +2 -0
  881. package/lib-esm/components/RequestParameters/ParametersGroup.d.ts +8 -0
  882. package/lib-esm/components/RequestParameters/ParametersGroup.js +21 -0
  883. package/lib-esm/components/RequestParameters/RequestParameters.d.ts +9 -0
  884. package/lib-esm/components/RequestParameters/RequestParameters.js +2 -0
  885. package/lib-esm/components/RequestParameters/index.d.ts +2 -0
  886. package/lib-esm/components/RequestParameters/index.js +2 -0
  887. package/lib-esm/components/RequestSamples/CodeSample.d.ts +16 -0
  888. package/lib-esm/components/RequestSamples/CodeSample.js +10 -0
  889. package/lib-esm/components/RequestSamples/Example.d.ts +9 -0
  890. package/lib-esm/components/RequestSamples/Example.js +2 -0
  891. package/lib-esm/components/RequestSamples/RequestSamples.d.ts +10 -0
  892. package/lib-esm/components/RequestSamples/RequestSamples.js +13 -0
  893. package/lib-esm/components/RequestSamples/index.d.ts +2 -0
  894. package/lib-esm/components/RequestSamples/index.js +2 -0
  895. package/lib-esm/components/RequestSamples/useCodeSamples.d.ts +10 -0
  896. package/lib-esm/components/RequestSamples/useCodeSamples.js +2 -0
  897. package/lib-esm/components/ResponseSamples/ResponseSamples.d.ts +12 -0
  898. package/lib-esm/components/ResponseSamples/ResponseSamples.js +2 -0
  899. package/lib-esm/components/ResponseSamples/Summary.d.ts +5 -0
  900. package/lib-esm/components/ResponseSamples/Summary.js +2 -0
  901. package/lib-esm/components/ResponseSamples/index.d.ts +1 -0
  902. package/lib-esm/components/ResponseSamples/index.js +2 -0
  903. package/lib-esm/components/Responses/OperationResponseList.d.ts +16 -0
  904. package/lib-esm/components/Responses/OperationResponseList.js +5 -0
  905. package/lib-esm/components/Responses/ResponseDetails.d.ts +2 -0
  906. package/lib-esm/components/Responses/ResponseDetails.js +2 -0
  907. package/lib-esm/components/Responses/ResponseHeaders.d.ts +2 -0
  908. package/lib-esm/components/Responses/ResponseHeaders.js +2 -0
  909. package/lib-esm/components/Responses/index.d.ts +3 -0
  910. package/lib-esm/components/Responses/index.js +2 -0
  911. package/lib-esm/components/Responses/styled.d.ts +5 -0
  912. package/lib-esm/components/Responses/styled.js +23 -0
  913. package/lib-esm/components/Responses/types.d.ts +13 -0
  914. package/lib-esm/components/Responses/types.js +2 -0
  915. package/lib-esm/components/RightPanel/RightPanel.d.ts +5 -0
  916. package/lib-esm/components/RightPanel/RightPanel.js +2 -0
  917. package/lib-esm/components/RightPanel/index.d.ts +1 -0
  918. package/lib-esm/components/RightPanel/index.js +2 -0
  919. package/lib-esm/components/Samples/ExampleSwitch.d.ts +14 -0
  920. package/lib-esm/components/Samples/ExampleSwitch.js +2 -0
  921. package/lib-esm/components/Samples/index.d.ts +2 -0
  922. package/lib-esm/components/Samples/index.js +2 -0
  923. package/lib-esm/components/Samples/use-example-key.d.ts +6 -0
  924. package/lib-esm/components/Samples/use-example-key.js +2 -0
  925. package/lib-esm/components/Schema/ArraySchema.d.ts +2 -0
  926. package/lib-esm/components/Schema/ArraySchema.js +2 -0
  927. package/lib-esm/components/Schema/ObjectSchema.d.ts +2 -0
  928. package/lib-esm/components/Schema/ObjectSchema.js +2 -0
  929. package/lib-esm/components/Schema/OneOfSchema.d.ts +2 -0
  930. package/lib-esm/components/Schema/OneOfSchema.js +11 -0
  931. package/lib-esm/components/Schema/RecursiveSchema.d.ts +2 -0
  932. package/lib-esm/components/Schema/RecursiveSchema.js +2 -0
  933. package/lib-esm/components/Schema/Schema.d.ts +2 -0
  934. package/lib-esm/components/Schema/Schema.js +6 -0
  935. package/lib-esm/components/Schema/SubSchema.d.ts +14 -0
  936. package/lib-esm/components/Schema/SubSchema.js +2 -0
  937. package/lib-esm/components/Schema/helpers.d.ts +5 -0
  938. package/lib-esm/components/Schema/helpers.js +2 -0
  939. package/lib-esm/components/Schema/index.d.ts +5 -0
  940. package/lib-esm/components/Schema/index.js +2 -0
  941. package/lib-esm/components/Schema/types.d.ts +38 -0
  942. package/lib-esm/components/Schema/types.js +2 -0
  943. package/lib-esm/components/Schema/useOneOfLocationIdx.d.ts +2 -0
  944. package/lib-esm/components/Schema/useOneOfLocationIdx.js +2 -0
  945. package/lib-esm/components/SchemaDefinition/SchemaDefinition.d.ts +8 -0
  946. package/lib-esm/components/SchemaDefinition/SchemaDefinition.js +4 -0
  947. package/lib-esm/components/SchemaDefinition/index.d.ts +1 -0
  948. package/lib-esm/components/SchemaDefinition/index.js +2 -0
  949. package/lib-esm/components/SectionContent/SectionContent.d.ts +17 -0
  950. package/lib-esm/components/SectionContent/SectionContent.js +14 -0
  951. package/lib-esm/components/SectionContent/index.d.ts +1 -0
  952. package/lib-esm/components/SectionContent/index.js +2 -0
  953. package/lib-esm/components/SectionItem/SectionItem.d.ts +7 -0
  954. package/lib-esm/components/SectionItem/SectionItem.js +2 -0
  955. package/lib-esm/components/SectionItem/index.d.ts +1 -0
  956. package/lib-esm/components/SectionItem/index.js +2 -0
  957. package/lib-esm/components/Security/Divider.d.ts +3 -0
  958. package/lib-esm/components/Security/Divider.js +15 -0
  959. package/lib-esm/components/Security/OAuthFlow.d.ts +6 -0
  960. package/lib-esm/components/Security/OAuthFlow.js +2 -0
  961. package/lib-esm/components/Security/OAuthScopes.d.ts +13 -0
  962. package/lib-esm/components/Security/OAuthScopes.js +34 -0
  963. package/lib-esm/components/Security/Security.d.ts +7 -0
  964. package/lib-esm/components/Security/Security.js +2 -0
  965. package/lib-esm/components/Security/SecurityButton.d.ts +10 -0
  966. package/lib-esm/components/Security/SecurityButton.js +31 -0
  967. package/lib-esm/components/Security/SecurityFlow.d.ts +5 -0
  968. package/lib-esm/components/Security/SecurityFlow.js +17 -0
  969. package/lib-esm/components/Security/SecurityModal.d.ts +8 -0
  970. package/lib-esm/components/Security/SecurityModal.js +45 -0
  971. package/lib-esm/components/Security/SecuritySchemeItem.d.ts +7 -0
  972. package/lib-esm/components/Security/SecuritySchemeItem.js +21 -0
  973. package/lib-esm/components/Security/helper.d.ts +2 -0
  974. package/lib-esm/components/Security/helper.js +2 -0
  975. package/lib-esm/components/Security/index.d.ts +1 -0
  976. package/lib-esm/components/Security/index.js +2 -0
  977. package/lib-esm/components/Security/styled.d.ts +2 -0
  978. package/lib-esm/components/Security/styled.js +14 -0
  979. package/lib-esm/components/SelectOrLabel/SelectOrLabel.d.ts +7 -0
  980. package/lib-esm/components/SelectOrLabel/SelectOrLabel.js +8 -0
  981. package/lib-esm/components/SelectOrLabel/index.d.ts +1 -0
  982. package/lib-esm/components/SelectOrLabel/index.js +2 -0
  983. package/lib-esm/components/ServerList/ServerList.d.ts +3 -0
  984. package/lib-esm/components/ServerList/ServerList.js +60 -0
  985. package/lib-esm/components/ServerList/index.d.ts +1 -0
  986. package/lib-esm/components/ServerList/index.js +2 -0
  987. package/lib-esm/components/ServerList/types.d.ts +5 -0
  988. package/lib-esm/components/ServerList/types.js +2 -0
  989. package/lib-esm/components/ServerListDropdown/ServerListDropdown.d.ts +7 -0
  990. package/lib-esm/components/ServerListDropdown/ServerListDropdown.js +2 -0
  991. package/lib-esm/components/ServerListDropdown/index.d.ts +1 -0
  992. package/lib-esm/components/ServerListDropdown/index.js +2 -0
  993. package/lib-esm/components/ServerListDropdown/styled.d.ts +5 -0
  994. package/lib-esm/components/ServerListDropdown/styled.js +23 -0
  995. package/lib-esm/components/SideMenu/SideMenu.d.ts +8 -0
  996. package/lib-esm/components/SideMenu/SideMenu.js +4 -0
  997. package/lib-esm/components/SideMenu/hooks/useMenuItems.d.ts +7 -0
  998. package/lib-esm/components/SideMenu/hooks/useMenuItems.js +2 -0
  999. package/lib-esm/components/SideMenu/index.d.ts +1 -0
  1000. package/lib-esm/components/SideMenu/index.js +2 -0
  1001. package/lib-esm/components/SideMenu/types.d.ts +16 -0
  1002. package/lib-esm/components/SideMenu/types.js +2 -0
  1003. package/lib-esm/components/StickySidebar/SidebarActions.d.ts +1 -0
  1004. package/lib-esm/components/StickySidebar/SidebarActions.js +6 -0
  1005. package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.d.ts +9 -0
  1006. package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.js +25 -0
  1007. package/lib-esm/components/StickySidebar/index.d.ts +1 -0
  1008. package/lib-esm/components/StickySidebar/index.js +2 -0
  1009. package/lib-esm/components/Tabs/Tabs.d.ts +8 -0
  1010. package/lib-esm/components/Tabs/Tabs.js +35 -0
  1011. package/lib-esm/components/Tabs/index.d.ts +2 -0
  1012. package/lib-esm/components/Tabs/index.js +2 -0
  1013. package/lib-esm/components/Tabs/useTabsState.d.ts +11 -0
  1014. package/lib-esm/components/Tabs/useTabsState.js +2 -0
  1015. package/lib-esm/components/TagItem/OperationNavigationItems.d.ts +9 -0
  1016. package/lib-esm/components/TagItem/OperationNavigationItems.js +37 -0
  1017. package/lib-esm/components/TagItem/OperationsNavigation.d.ts +3 -0
  1018. package/lib-esm/components/TagItem/OperationsNavigation.js +7 -0
  1019. package/lib-esm/components/TagItem/TagItem.d.ts +9 -0
  1020. package/lib-esm/components/TagItem/TagItem.js +23 -0
  1021. package/lib-esm/components/TagItem/index.d.ts +1 -0
  1022. package/lib-esm/components/TagItem/index.js +2 -0
  1023. package/lib-esm/components/TagItem/styled.d.ts +1 -0
  1024. package/lib-esm/components/TagItem/styled.js +6 -0
  1025. package/lib-esm/components/TagItem/types.d.ts +5 -0
  1026. package/lib-esm/components/TagItem/types.js +2 -0
  1027. package/lib-esm/components/ViewNested/ViewNested.d.ts +13 -0
  1028. package/lib-esm/components/ViewNested/ViewNested.js +35 -0
  1029. package/lib-esm/components/ViewNested/index.d.ts +1 -0
  1030. package/lib-esm/components/ViewNested/index.js +2 -0
  1031. package/lib-esm/components/common/Badges.d.ts +13 -0
  1032. package/lib-esm/components/common/Badges.js +19 -0
  1033. package/lib-esm/components/common/BodyContent/BodyContent.d.ts +11 -0
  1034. package/lib-esm/components/common/BodyContent/BodyContent.js +28 -0
  1035. package/lib-esm/components/common/BodyContent/index.d.ts +1 -0
  1036. package/lib-esm/components/common/BodyContent/index.js +2 -0
  1037. package/lib-esm/components/common/ClearButton/ClearButton.d.ts +2 -0
  1038. package/lib-esm/components/common/ClearButton/ClearButton.js +2 -0
  1039. package/lib-esm/components/common/ClearButton/index.d.ts +2 -0
  1040. package/lib-esm/components/common/ClearButton/index.js +2 -0
  1041. package/lib-esm/components/common/ClearButton/styled.d.ts +1 -0
  1042. package/lib-esm/components/common/ClearButton/styled.js +16 -0
  1043. package/lib-esm/components/common/ClearButton/types.d.ts +6 -0
  1044. package/lib-esm/components/common/ClearButton/types.js +2 -0
  1045. package/lib-esm/components/common/CodeBlockPanel.d.ts +2 -0
  1046. package/lib-esm/components/common/CodeBlockPanel.js +6 -0
  1047. package/lib-esm/components/common/ConstraintsView.d.ts +4 -0
  1048. package/lib-esm/components/common/ConstraintsView.js +4 -0
  1049. package/lib-esm/components/common/Dropdown/Dropdown.d.ts +12 -0
  1050. package/lib-esm/components/common/Dropdown/Dropdown.js +27 -0
  1051. package/lib-esm/components/common/Dropdown/index.d.ts +2 -0
  1052. package/lib-esm/components/common/Dropdown/index.js +2 -0
  1053. package/lib-esm/components/common/ExpandableExample/ExpandableExample.d.ts +5 -0
  1054. package/lib-esm/components/common/ExpandableExample/ExpandableExample.js +10 -0
  1055. package/lib-esm/components/common/ExpandableExample/index.d.ts +1 -0
  1056. package/lib-esm/components/common/ExpandableExample/index.js +2 -0
  1057. package/lib-esm/components/common/Extensions.d.ts +6 -0
  1058. package/lib-esm/components/common/Extensions.js +4 -0
  1059. package/lib-esm/components/common/Fields/fields-layout.d.ts +15 -0
  1060. package/lib-esm/components/common/Fields/fields-layout.js +223 -0
  1061. package/lib-esm/components/common/Fields/fields.d.ts +38 -0
  1062. package/lib-esm/components/common/Fields/fields.js +93 -0
  1063. package/lib-esm/components/common/Fields/index.d.ts +2 -0
  1064. package/lib-esm/components/common/Fields/index.js +2 -0
  1065. package/lib-esm/components/common/LinkToField.d.ts +13 -0
  1066. package/lib-esm/components/common/LinkToField.js +20 -0
  1067. package/lib-esm/components/common/OperationItemTitle.d.ts +2 -0
  1068. package/lib-esm/components/common/OperationItemTitle.js +33 -0
  1069. package/lib-esm/components/common/SchemaSelection/SchemaSelection.d.ts +12 -0
  1070. package/lib-esm/components/common/SchemaSelection/SchemaSelection.js +2 -0
  1071. package/lib-esm/components/common/SchemaSelection/index.d.ts +1 -0
  1072. package/lib-esm/components/common/SchemaSelection/index.js +2 -0
  1073. package/lib-esm/components/common/Select/Select.d.ts +2 -0
  1074. package/lib-esm/components/common/Select/Select.js +2 -0
  1075. package/lib-esm/components/common/Select/index.d.ts +2 -0
  1076. package/lib-esm/components/common/Select/index.js +2 -0
  1077. package/lib-esm/components/common/Select/styled.d.ts +22 -0
  1078. package/lib-esm/components/common/Select/styled.js +111 -0
  1079. package/lib-esm/components/common/Select/types.d.ts +20 -0
  1080. package/lib-esm/components/common/Select/types.js +2 -0
  1081. package/lib-esm/components/common/Skeleton/LanguageListSkeleton.d.ts +4 -0
  1082. package/lib-esm/components/common/Skeleton/LanguageListSkeleton.js +23 -0
  1083. package/lib-esm/components/common/Skeleton/Skeleton.d.ts +5 -0
  1084. package/lib-esm/components/common/Skeleton/Skeleton.js +33 -0
  1085. package/lib-esm/components/common/Skeleton/index.d.ts +1 -0
  1086. package/lib-esm/components/common/Skeleton/index.js +2 -0
  1087. package/lib-esm/components/common/headers.d.ts +1 -0
  1088. package/lib-esm/components/common/headers.js +8 -0
  1089. package/lib-esm/components/common/index.d.ts +14 -0
  1090. package/lib-esm/components/common/index.js +2 -0
  1091. package/lib-esm/components/common/linkify.d.ts +10 -0
  1092. package/lib-esm/components/common/linkify.js +21 -0
  1093. package/lib-esm/components/common/mixins.d.ts +1 -0
  1094. package/lib-esm/components/common/mixins.js +5 -0
  1095. package/lib-esm/components/common/panels.d.ts +17 -0
  1096. package/lib-esm/components/common/panels.js +123 -0
  1097. package/lib-esm/components/common/schema.d.ts +7 -0
  1098. package/lib-esm/components/common/schema.js +74 -0
  1099. package/lib-esm/components/common/styled.d.ts +7 -0
  1100. package/lib-esm/components/common/styled.js +59 -0
  1101. package/lib-esm/components/index.d.ts +23 -0
  1102. package/lib-esm/components/index.js +2 -0
  1103. package/lib-esm/components/pluggable/RedocExample.d.ts +11 -0
  1104. package/lib-esm/components/pluggable/RedocExample.js +2 -0
  1105. package/lib-esm/components/pluggable/RedocSchema.d.ts +10 -0
  1106. package/lib-esm/components/pluggable/RedocSchema.js +2 -0
  1107. package/lib-esm/components/pluggable/index.d.ts +2 -0
  1108. package/lib-esm/components/pluggable/index.js +2 -0
  1109. package/lib-esm/components/pluggable/styled.components.d.ts +7 -0
  1110. package/lib-esm/components/pluggable/styled.components.js +13 -0
  1111. package/lib-esm/constants.d.ts +25 -0
  1112. package/lib-esm/constants.js +2 -0
  1113. package/lib-esm/empty.d.ts +2 -0
  1114. package/lib-esm/empty.js +2 -0
  1115. package/lib-esm/events/codeSampleCopy.d.ts +2 -0
  1116. package/lib-esm/events/codeSampleCopy.js +2 -0
  1117. package/lib-esm/events/creator.d.ts +2 -0
  1118. package/lib-esm/events/creator.js +2 -0
  1119. package/lib-esm/events/index.d.ts +8 -0
  1120. package/lib-esm/events/index.js +2 -0
  1121. package/lib-esm/events/languageSwitch.d.ts +2 -0
  1122. package/lib-esm/events/languageSwitch.js +2 -0
  1123. package/lib-esm/events/panelToggle.d.ts +2 -0
  1124. package/lib-esm/events/panelToggle.js +2 -0
  1125. package/lib-esm/events/serverSwitch.d.ts +2 -0
  1126. package/lib-esm/events/serverSwitch.js +2 -0
  1127. package/lib-esm/events/tryItOpen.d.ts +2 -0
  1128. package/lib-esm/events/tryItOpen.js +2 -0
  1129. package/lib-esm/events/tryItSent.d.ts +2 -0
  1130. package/lib-esm/events/tryItSent.js +2 -0
  1131. package/lib-esm/events/types.d.ts +83 -0
  1132. package/lib-esm/events/types.js +2 -0
  1133. package/lib-esm/hoc/types.d.ts +51 -0
  1134. package/lib-esm/hoc/types.js +2 -0
  1135. package/lib-esm/hoc/utils.d.ts +2 -0
  1136. package/lib-esm/hoc/utils.js +2 -0
  1137. package/lib-esm/hoc/withRouter.d.ts +3 -0
  1138. package/lib-esm/hoc/withRouter.js +2 -0
  1139. package/lib-esm/hoc/withStore.d.ts +3 -0
  1140. package/lib-esm/hoc/withStore.js +2 -0
  1141. package/lib-esm/hooks/index.d.ts +8 -0
  1142. package/lib-esm/hooks/index.js +2 -0
  1143. package/lib-esm/hooks/useActivateExample.d.ts +2 -0
  1144. package/lib-esm/hooks/useActivateExample.js +2 -0
  1145. package/lib-esm/hooks/useActiveWithFallback.d.ts +3 -0
  1146. package/lib-esm/hooks/useActiveWithFallback.js +2 -0
  1147. package/lib-esm/hooks/useContentItems.d.ts +12 -0
  1148. package/lib-esm/hooks/useContentItems.js +2 -0
  1149. package/lib-esm/hooks/useLicense.d.ts +5 -0
  1150. package/lib-esm/hooks/useLicense.js +2 -0
  1151. package/lib-esm/hooks/usePerformanceMetrics.d.ts +5 -0
  1152. package/lib-esm/hooks/usePerformanceMetrics.js +2 -0
  1153. package/lib-esm/hooks/useRouter.d.ts +13 -0
  1154. package/lib-esm/hooks/useRouter.js +2 -0
  1155. package/lib-esm/hooks/useTelemetry.d.ts +2 -0
  1156. package/lib-esm/hooks/useTelemetry.js +2 -0
  1157. package/lib-esm/hooks/useTranslate.d.ts +2 -0
  1158. package/lib-esm/hooks/useTranslate.js +2 -0
  1159. package/lib-esm/hooks/useUppercase2LowercaseRedirect.d.ts +1 -0
  1160. package/lib-esm/hooks/useUppercase2LowercaseRedirect.js +2 -0
  1161. package/lib-esm/icons/CSharpIcon/CSharpIcon.d.ts +4 -0
  1162. package/lib-esm/icons/CSharpIcon/CSharpIcon.js +2 -0
  1163. package/lib-esm/icons/CSharpIcon/index.d.ts +1 -0
  1164. package/lib-esm/icons/CSharpIcon/index.js +2 -0
  1165. package/lib-esm/icons/CurlIcon/CurlIcon.d.ts +6 -0
  1166. package/lib-esm/icons/CurlIcon/CurlIcon.js +15 -0
  1167. package/lib-esm/icons/CurlIcon/index.d.ts +1 -0
  1168. package/lib-esm/icons/CurlIcon/index.js +2 -0
  1169. package/lib-esm/icons/GOIcon/GOIcon.d.ts +4 -0
  1170. package/lib-esm/icons/GOIcon/GOIcon.js +2 -0
  1171. package/lib-esm/icons/GOIcon/index.d.ts +1 -0
  1172. package/lib-esm/icons/GOIcon/index.js +2 -0
  1173. package/lib-esm/icons/JavaIcon/JavaIcon.d.ts +4 -0
  1174. package/lib-esm/icons/JavaIcon/JavaIcon.js +2 -0
  1175. package/lib-esm/icons/JavaIcon/index.d.ts +1 -0
  1176. package/lib-esm/icons/JavaIcon/index.js +2 -0
  1177. package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.d.ts +4 -0
  1178. package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.js +2 -0
  1179. package/lib-esm/icons/JavaScriptIcon/index.d.ts +1 -0
  1180. package/lib-esm/icons/JavaScriptIcon/index.js +2 -0
  1181. package/lib-esm/icons/NodeJSIcon/NodeJSIcon.d.ts +4 -0
  1182. package/lib-esm/icons/NodeJSIcon/NodeJSIcon.js +2 -0
  1183. package/lib-esm/icons/NodeJSIcon/index.d.ts +1 -0
  1184. package/lib-esm/icons/NodeJSIcon/index.js +2 -0
  1185. package/lib-esm/icons/PHPIcon/PHPIcon.d.ts +4 -0
  1186. package/lib-esm/icons/PHPIcon/PHPIcon.js +2 -0
  1187. package/lib-esm/icons/PHPIcon/index.d.ts +1 -0
  1188. package/lib-esm/icons/PHPIcon/index.js +2 -0
  1189. package/lib-esm/icons/PayloadIcon/PayloadIcon.d.ts +4 -0
  1190. package/lib-esm/icons/PayloadIcon/PayloadIcon.js +2 -0
  1191. package/lib-esm/icons/PayloadIcon/index.d.ts +1 -0
  1192. package/lib-esm/icons/PayloadIcon/index.js +2 -0
  1193. package/lib-esm/icons/PythonIcon/PythonIcon.d.ts +4 -0
  1194. package/lib-esm/icons/PythonIcon/PythonIcon.js +2 -0
  1195. package/lib-esm/icons/PythonIcon/index.d.ts +1 -0
  1196. package/lib-esm/icons/PythonIcon/index.js +2 -0
  1197. package/lib-esm/icons/RIcon/RIcon.d.ts +4 -0
  1198. package/lib-esm/icons/RIcon/RIcon.js +2 -0
  1199. package/lib-esm/icons/RIcon/index.d.ts +1 -0
  1200. package/lib-esm/icons/RIcon/index.js +2 -0
  1201. package/lib-esm/icons/RubyIcon/RubyIcon.d.ts +4 -0
  1202. package/lib-esm/icons/RubyIcon/RubyIcon.js +2 -0
  1203. package/lib-esm/icons/RubyIcon/index.d.ts +1 -0
  1204. package/lib-esm/icons/RubyIcon/index.js +2 -0
  1205. package/lib-esm/index.d.ts +44 -0
  1206. package/lib-esm/index.js +2 -0
  1207. package/lib-esm/jotai/app.d.ts +51 -0
  1208. package/lib-esm/jotai/app.js +2 -0
  1209. package/lib-esm/jotai/operation.d.ts +37 -0
  1210. package/lib-esm/jotai/operation.js +2 -0
  1211. package/lib-esm/jotai/replay.d.ts +7 -0
  1212. package/lib-esm/jotai/replay.js +2 -0
  1213. package/lib-esm/jotai/store.d.ts +16 -0
  1214. package/lib-esm/jotai/store.js +2 -0
  1215. package/lib-esm/jotai/use-write-atom.d.ts +1 -0
  1216. package/lib-esm/jotai/use-write-atom.js +2 -0
  1217. package/lib-esm/models/callback.d.ts +5 -0
  1218. package/lib-esm/models/callback.js +2 -0
  1219. package/lib-esm/models/code-sample-options.d.ts +8 -0
  1220. package/lib-esm/models/code-sample-options.js +2 -0
  1221. package/lib-esm/models/example.d.ts +9 -0
  1222. package/lib-esm/models/example.js +2 -0
  1223. package/lib-esm/models/field.d.ts +7 -0
  1224. package/lib-esm/models/field.js +2 -0
  1225. package/lib-esm/models/group.d.ts +4 -0
  1226. package/lib-esm/models/group.js +2 -0
  1227. package/lib-esm/models/index.d.ts +15 -0
  1228. package/lib-esm/models/index.js +2 -0
  1229. package/lib-esm/models/mediaContent.d.ts +7 -0
  1230. package/lib-esm/models/mediaContent.js +2 -0
  1231. package/lib-esm/models/mediaType.d.ts +19 -0
  1232. package/lib-esm/models/mediaType.js +2 -0
  1233. package/lib-esm/models/operation.d.ts +20 -0
  1234. package/lib-esm/models/operation.js +2 -0
  1235. package/lib-esm/models/request.d.ts +12 -0
  1236. package/lib-esm/models/request.js +2 -0
  1237. package/lib-esm/models/response.d.ts +14 -0
  1238. package/lib-esm/models/response.js +2 -0
  1239. package/lib-esm/models/schema.d.ts +13 -0
  1240. package/lib-esm/models/schema.js +2 -0
  1241. package/lib-esm/models/security.d.ts +8 -0
  1242. package/lib-esm/models/security.js +2 -0
  1243. package/lib-esm/models/tab.d.ts +4 -0
  1244. package/lib-esm/models/tab.js +2 -0
  1245. package/lib-esm/models/types.d.ts +265 -0
  1246. package/lib-esm/models/types.js +2 -0
  1247. package/lib-esm/services/OpenAPIParser.d.ts +52 -0
  1248. package/lib-esm/services/OpenAPIParser.js +2 -0
  1249. package/lib-esm/services/check.d.ts +13 -0
  1250. package/lib-esm/services/check.js +2 -0
  1251. package/lib-esm/services/code-samples/constants.d.ts +2 -0
  1252. package/lib-esm/services/code-samples/constants.js +2 -0
  1253. package/lib-esm/services/code-samples/generator.d.ts +29 -0
  1254. package/lib-esm/services/code-samples/generator.js +2 -0
  1255. package/lib-esm/services/code-samples/httpsnippet/helpers/code-builder.d.ts +83 -0
  1256. package/lib-esm/services/code-samples/httpsnippet/helpers/code-builder.js +2 -0
  1257. package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +28 -0
  1258. package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.js +2 -0
  1259. package/lib-esm/services/code-samples/httpsnippet/helpers/constants.d.ts +24 -0
  1260. package/lib-esm/services/code-samples/httpsnippet/helpers/constants.js +2 -0
  1261. package/lib-esm/services/code-samples/httpsnippet/helpers/lodash-int.d.ts +5 -0
  1262. package/lib-esm/services/code-samples/httpsnippet/helpers/lodash-int.js +2 -0
  1263. package/lib-esm/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.d.ts +30 -0
  1264. package/lib-esm/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.js +2 -0
  1265. package/lib-esm/services/code-samples/httpsnippet/helpers/reducer.d.ts +1 -0
  1266. package/lib-esm/services/code-samples/httpsnippet/helpers/reducer.js +2 -0
  1267. package/lib-esm/services/code-samples/httpsnippet/helpers/shell.d.ts +10 -0
  1268. package/lib-esm/services/code-samples/httpsnippet/helpers/shell.js +2 -0
  1269. package/lib-esm/services/code-samples/httpsnippet/helpers/string-utility.d.ts +7 -0
  1270. package/lib-esm/services/code-samples/httpsnippet/helpers/string-utility.js +2 -0
  1271. package/lib-esm/services/code-samples/httpsnippet/index.d.ts +47 -0
  1272. package/lib-esm/services/code-samples/httpsnippet/index.js +2 -0
  1273. package/lib-esm/services/code-samples/httpsnippet/targets/__mocks__/mock.d.ts +3565 -0
  1274. package/lib-esm/services/code-samples/httpsnippet/targets/__mocks__/mock.js +2 -0
  1275. package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +10 -0
  1276. package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.js +2 -0
  1277. package/lib-esm/services/code-samples/httpsnippet/targets/csharp/index.d.ts +10 -0
  1278. package/lib-esm/services/code-samples/httpsnippet/targets/csharp/index.js +2 -0
  1279. package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.d.ts +10 -0
  1280. package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.js +2 -0
  1281. package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.d.ts +10 -0
  1282. package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.js +2 -0
  1283. package/lib-esm/services/code-samples/httpsnippet/targets/go/index.d.ts +10 -0
  1284. package/lib-esm/services/code-samples/httpsnippet/targets/go/index.js +2 -0
  1285. package/lib-esm/services/code-samples/httpsnippet/targets/go/native.d.ts +10 -0
  1286. package/lib-esm/services/code-samples/httpsnippet/targets/go/native.js +2 -0
  1287. package/lib-esm/services/code-samples/httpsnippet/targets/index.d.ts +115 -0
  1288. package/lib-esm/services/code-samples/httpsnippet/targets/index.js +2 -0
  1289. package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +10 -0
  1290. package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.js +2 -0
  1291. package/lib-esm/services/code-samples/httpsnippet/targets/java/index.d.ts +10 -0
  1292. package/lib-esm/services/code-samples/httpsnippet/targets/java/index.js +2 -0
  1293. package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +10 -0
  1294. package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.js +2 -0
  1295. package/lib-esm/services/code-samples/httpsnippet/targets/java8/index.d.ts +10 -0
  1296. package/lib-esm/services/code-samples/httpsnippet/targets/java8/index.js +2 -0
  1297. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +10 -0
  1298. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.js +2 -0
  1299. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/index.d.ts +12 -0
  1300. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/index.js +2 -0
  1301. package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.d.ts +10 -0
  1302. package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.js +2 -0
  1303. package/lib-esm/services/code-samples/httpsnippet/targets/node/index.d.ts +10 -0
  1304. package/lib-esm/services/code-samples/httpsnippet/targets/node/index.js +2 -0
  1305. package/lib-esm/services/code-samples/httpsnippet/targets/php/curl.d.ts +10 -0
  1306. package/lib-esm/services/code-samples/httpsnippet/targets/php/curl.js +2 -0
  1307. package/lib-esm/services/code-samples/httpsnippet/targets/php/index.d.ts +10 -0
  1308. package/lib-esm/services/code-samples/httpsnippet/targets/php/index.js +2 -0
  1309. package/lib-esm/services/code-samples/httpsnippet/targets/php/types.d.ts +11 -0
  1310. package/lib-esm/services/code-samples/httpsnippet/targets/php/types.js +2 -0
  1311. package/lib-esm/services/code-samples/httpsnippet/targets/php/utils.d.ts +2 -0
  1312. package/lib-esm/services/code-samples/httpsnippet/targets/php/utils.js +2 -0
  1313. package/lib-esm/services/code-samples/httpsnippet/targets/python/index.d.ts +10 -0
  1314. package/lib-esm/services/code-samples/httpsnippet/targets/python/index.js +2 -0
  1315. package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.d.ts +4 -0
  1316. package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.js +2 -0
  1317. package/lib-esm/services/code-samples/httpsnippet/targets/r/httr.d.ts +4 -0
  1318. package/lib-esm/services/code-samples/httpsnippet/targets/r/httr.js +2 -0
  1319. package/lib-esm/services/code-samples/httpsnippet/targets/r/index.d.ts +10 -0
  1320. package/lib-esm/services/code-samples/httpsnippet/targets/r/index.js +2 -0
  1321. package/lib-esm/services/code-samples/httpsnippet/targets/r/utils.d.ts +5 -0
  1322. package/lib-esm/services/code-samples/httpsnippet/targets/r/utils.js +2 -0
  1323. package/lib-esm/services/code-samples/httpsnippet/targets/ruby/index.d.ts +10 -0
  1324. package/lib-esm/services/code-samples/httpsnippet/targets/ruby/index.js +2 -0
  1325. package/lib-esm/services/code-samples/httpsnippet/targets/ruby/native.d.ts +10 -0
  1326. package/lib-esm/services/code-samples/httpsnippet/targets/ruby/native.js +2 -0
  1327. package/lib-esm/services/code-samples/httpsnippet/targets/shell/curl.d.ts +10 -0
  1328. package/lib-esm/services/code-samples/httpsnippet/targets/shell/curl.js +2 -0
  1329. package/lib-esm/services/code-samples/httpsnippet/targets/shell/index.d.ts +12 -0
  1330. package/lib-esm/services/code-samples/httpsnippet/targets/shell/index.js +2 -0
  1331. package/lib-esm/services/code-samples/index.d.ts +2 -0
  1332. package/lib-esm/services/code-samples/index.js +2 -0
  1333. package/lib-esm/services/code-samples/types.d.ts +72 -0
  1334. package/lib-esm/services/code-samples/types.js +2 -0
  1335. package/lib-esm/services/config-options/helpers.d.ts +3 -0
  1336. package/lib-esm/services/config-options/helpers.js +2 -0
  1337. package/lib-esm/services/config-options/index.d.ts +2 -0
  1338. package/lib-esm/services/config-options/index.js +2 -0
  1339. package/lib-esm/services/config-options/normalizeOptions.d.ts +3 -0
  1340. package/lib-esm/services/config-options/normalizeOptions.js +2 -0
  1341. package/lib-esm/services/config-options/types.d.ts +55 -0
  1342. package/lib-esm/services/config-options/types.js +2 -0
  1343. package/lib-esm/services/history/helpers.d.ts +5 -0
  1344. package/lib-esm/services/history/helpers.js +2 -0
  1345. package/lib-esm/services/history/index.d.ts +1 -0
  1346. package/lib-esm/services/history/index.js +2 -0
  1347. package/lib-esm/services/index.d.ts +8 -0
  1348. package/lib-esm/services/index.js +2 -0
  1349. package/lib-esm/services/menu/builder.d.ts +8 -0
  1350. package/lib-esm/services/menu/builder.js +2 -0
  1351. package/lib-esm/services/menu/index.d.ts +1 -0
  1352. package/lib-esm/services/menu/index.js +2 -0
  1353. package/lib-esm/services/menu/markdown.d.ts +8 -0
  1354. package/lib-esm/services/menu/markdown.js +2 -0
  1355. package/lib-esm/services/menu/operation.d.ts +10 -0
  1356. package/lib-esm/services/menu/operation.js +2 -0
  1357. package/lib-esm/services/menu/tags.d.ts +27 -0
  1358. package/lib-esm/services/menu/tags.js +2 -0
  1359. package/lib-esm/services/types.d.ts +123 -0
  1360. package/lib-esm/services/types.js +2 -0
  1361. package/lib-esm/services/utils.d.ts +18 -0
  1362. package/lib-esm/services/utils.js +2 -0
  1363. package/lib-esm/standalone.d.ts +24 -0
  1364. package/lib-esm/standalone.js +2 -0
  1365. package/lib-esm/types/app.d.ts +6 -0
  1366. package/lib-esm/types/app.js +2 -0
  1367. package/lib-esm/types/index.d.ts +3 -0
  1368. package/lib-esm/types/index.js +2 -0
  1369. package/lib-esm/types/open-api.d.ts +368 -0
  1370. package/lib-esm/types/open-api.js +2 -0
  1371. package/lib-esm/types/security.d.ts +11 -0
  1372. package/lib-esm/types/security.js +2 -0
  1373. package/lib-esm/utils/JsonPointer.d.ts +51 -0
  1374. package/lib-esm/utils/JsonPointer.js +2 -0
  1375. package/lib-esm/utils/areArraysEqual.d.ts +1 -0
  1376. package/lib-esm/utils/areArraysEqual.js +2 -0
  1377. package/lib-esm/utils/argValuesHelpers.d.ts +4 -0
  1378. package/lib-esm/utils/argValuesHelpers.js +2 -0
  1379. package/lib-esm/utils/compose.d.ts +1 -0
  1380. package/lib-esm/utils/compose.js +2 -0
  1381. package/lib-esm/utils/configure-helpers.d.ts +11 -0
  1382. package/lib-esm/utils/configure-helpers.js +2 -0
  1383. package/lib-esm/utils/cookies.d.ts +7 -0
  1384. package/lib-esm/utils/cookies.js +2 -0
  1385. package/lib-esm/utils/createParsedDocument.d.ts +2 -0
  1386. package/lib-esm/utils/createParsedDocument.js +2 -0
  1387. package/lib-esm/utils/debounce.d.ts +1 -0
  1388. package/lib-esm/utils/debounce.js +2 -0
  1389. package/lib-esm/utils/debug.d.ts +2 -0
  1390. package/lib-esm/utils/debug.js +2 -0
  1391. package/lib-esm/utils/dom.d.ts +7 -0
  1392. package/lib-esm/utils/dom.js +2 -0
  1393. package/lib-esm/utils/environments.d.ts +4 -0
  1394. package/lib-esm/utils/environments.js +2 -0
  1395. package/lib-esm/utils/helpers.d.ts +46 -0
  1396. package/lib-esm/utils/helpers.js +2 -0
  1397. package/lib-esm/utils/index.d.ts +23 -0
  1398. package/lib-esm/utils/index.js +2 -0
  1399. package/lib-esm/utils/isMobile.d.ts +5 -0
  1400. package/lib-esm/utils/isMobile.js +2 -0
  1401. package/lib-esm/utils/loadAndBundleSpec.d.ts +3 -0
  1402. package/lib-esm/utils/loadAndBundleSpec.js +2 -0
  1403. package/lib-esm/utils/local-storage.d.ts +2 -0
  1404. package/lib-esm/utils/local-storage.js +2 -0
  1405. package/lib-esm/utils/object.d.ts +3 -0
  1406. package/lib-esm/utils/object.js +2 -0
  1407. package/lib-esm/utils/openapi.d.ts +43 -0
  1408. package/lib-esm/utils/openapi.js +2 -0
  1409. package/lib-esm/utils/parameters.d.ts +2 -0
  1410. package/lib-esm/utils/parameters.js +2 -0
  1411. package/lib-esm/utils/path.d.ts +4 -0
  1412. package/lib-esm/utils/path.js +2 -0
  1413. package/lib-esm/utils/queryString.d.ts +9 -0
  1414. package/lib-esm/utils/queryString.js +2 -0
  1415. package/lib-esm/utils/replaceVariables.d.ts +2 -0
  1416. package/lib-esm/utils/replaceVariables.js +2 -0
  1417. package/lib-esm/utils/saveTextBeforeHeading.d.ts +7 -0
  1418. package/lib-esm/utils/saveTextBeforeHeading.js +2 -0
  1419. package/lib-esm/utils/security-details.d.ts +9 -0
  1420. package/lib-esm/utils/security-details.js +2 -0
  1421. package/lib-esm/utils/session-storage.d.ts +2 -0
  1422. package/lib-esm/utils/session-storage.js +2 -0
  1423. package/lib-esm/utils/simplifyAstStructure.d.ts +2 -0
  1424. package/lib-esm/utils/simplifyAstStructure.js +2 -0
  1425. package/lib-esm/utils/sort.d.ts +6 -0
  1426. package/lib-esm/utils/sort.js +2 -0
  1427. package/lib-esm/utils/string.d.ts +13 -0
  1428. package/lib-esm/utils/string.js +2 -0
  1429. package/lib-esm/utils/test-utils.d.ts +1 -0
  1430. package/lib-esm/utils/test-utils.js +2 -0
  1431. package/lib-esm/utils/theme-helpers.d.ts +3 -0
  1432. package/lib-esm/utils/theme-helpers.js +4 -0
  1433. package/package.json +47 -25
  1434. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.d.ts +0 -8
  1435. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js +0 -1
  1436. package/lib/styled-components.d.ts +0 -1
  1437. package/lib/styled-components.js +0 -1
  1438. package/lib/utils/convertSwagger2OpenAPI.d.ts +0 -2
  1439. package/lib/utils/convertSwagger2OpenAPI.js +0 -1
  1440. package/lib/utils/url.d.ts +0 -2
  1441. package/lib/utils/url.js +0 -1
@@ -1,2 +1,2 @@
1
- import{isObject as d}from"@redocly/theme";import{CodeBuilder as T}from"../../helpers/code-builder.js";import{HTTPSnippet as w}from"../../index.js";import{buildUrlExpression as S,printUrlVariablesDeclarations as E}from"../../helpers/code-helpers.js";import{isEmptyObject as A,normalizeMimeType as m}from"../../../../utils.js";import{capitalizeFirst as O}from"../../../generator.js";import{Lang as k}from"../../helpers/constants.js";import{MediaTypes as i}from"../../../../../constants.js";import{isLastInArray as H,isLastProperty as j}from"../../../../../utils/index.js";const x=function(s,c,{target:C,client:D}){const r=Object.assign({indent:" ",withWrapper:!0},c),t=new T({indentation:r.indent,variablesPrefix:r.variablesPrefix,capitalize:!0,lang:k.CSHARP}),b=L(s.method);if(r.withComments&&P(t),r.withWrapper&&(t.push("using System;"),t.push("using System.Net.Http;"),t.push("using System.Threading.Tasks;"),(h(i.JSON)||h(i.XML)||s.basicAuth)&&t.push("using System.Text;"),(h(i.URL_ENCODED)||s.securityOAuth2ExtraCalls?.length)&&t.push("using System.Collections.Generic;"),(h(i.JSON)||s.securityOAuth2ExtraCalls?.length)&&t.push("using System.Text.Json;"),l()&&t.push("using System.IO;"),(l()||s.basicAuth)&&t.push("using System.Net.Http.Headers;"),t.blank(),t.push("public class Program"),t.push("{"),t.push(1,"public static async Task Main()"),t.push(1,"{")),s.securityOAuth2ExtraCalls?.length){const e=new w(s.securityOAuth2ExtraCalls?.[0]).convert(C,D,{...r,withImports:!1,withWrapper:!1,withComments:!1,variablesPrefix:"oauth2"});t.push(e),t.push(2,"var oauth2Response = await oauth2Request.Content.ReadAsStringAsync();"),t.push(2,"JObject inputJObject = JObject.Parse(oauth2Response);"),t.push(2,'var accessToken = inputJObject["access_token"].ToString();'),t.blank()}const f=Object.keys(s.allHeaders).filter(e=>{switch(e.toLowerCase()){case"content-type":case"content-length":case"accept-encoding":return!1;default:return!0}});if(f.length?(t.push(2,"System.Net.Http.HttpClient client = new()"),t.push(2,"{"),t.push(3,"DefaultRequestHeaders ="),t.push(3,"{"),f.forEach(e=>{t.push(4,'{"%s", %s},',e,s.securityOAuth2ExtraCalls?.length?'"Bearer " + accessToken':`"${s.allHeaders[e]}"`)}),t.push(3,"}"),t.push(2,"};")):t.push(2,"System.Net.Http.HttpClient client = new();"),t.blank(),s.basicAuth){const{username:e,password:a}=s.basicAuth;t.push(2,`string base64String = Convert.ToBase64String(Encoding.ASCII.GetBytes("${e}:${a}"));`),t.push(2,'client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(@"Basic", base64String);'),t.blank()}if(s.postData)switch(m(s.postData.mimeType)){case i.URL_ENCODED:s.postData.params&&(t.blank(),t.push(2,"List<KeyValuePair<string, string>> postData = new List<KeyValuePair<string, string>>();"),s.postData.params.forEach(e=>{t.push(2,'postData.Add(new KeyValuePair<string, string>("%s", "%s"));',e.name,e.value)}),t.blank());break;case i.MULTIPART:s.postData.params&&(t.blank(),t.push(2,"MultipartFormDataContent postData = new MultipartFormDataContent();"),s.postData.params.forEach(e=>{t.push(2,'postData.Add(new StringContent("%s"), "%s");',e.value,e.name)}));break;case i.JSON:s.postData.jsonObj&&(t.push(2,"string json = JsonSerializer.Serialize(new"),t.push(2,"{"),u(s.postData.jsonObj,3),t.push(2,"});"),t.blank(),t.push(2,'using StringContent postData = new(json, Encoding.UTF8, "%s");',s.postData.mimeType));break;case i.XML:s.postData.text&&(s.postData.text.trim().split(`
2
- `).forEach((e,a)=>{const n=(a===0?'string xml = @"':"")+e.replace(/"/g,'""');t.push(a===0?2:3,n)}),t.push(2,'";'),t.push(2,'using StringContent postData = new StringContent(xml, Encoding.UTF8, "%s");',s.postData.mimeType));break}else l()&&(t.push(2,"var ms = new MemoryStream();"),t.push(2,"var postData = new StreamContent(ms);"),t.push(2,'postData.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");'));return E(s,t,3),t.push(2,"using HttpResponseMessage %s = await client.%sAsync(%s%s);",t.var("request"),b,S(s,t),r.withImports?M(s.method)?m(s.postData&&s.postData.mimeType)===i.URL_ENCODED?", new FormUrlEncodedContent(postData)":s.method==="delete"?"":s.postData&&s.postData.params||l()?", postData":", null":"":", new FormUrlEncodedContent(postData)"),r.withWrapper&&(t.push(2,"string response = await request.Content.ReadAsStringAsync();"),t.blank(),t.push(2,"Console.WriteLine(response);"),t.push(1,"}"),t.push("}")),t.join();function h(e){return s.postData&&m(s.postData.mimeType)===e}function l(){return s.headersObj&&s.headersObj["Content-Type"]===i.OCTET_STREAM}function g(e,a){e.forEach((n,p)=>{const o=!H(e,p);Array.isArray(n)?g(n,a+1):d(n)?(t.push(a+1,"new {"),u(n,a+2),t.push(a+1,"}%s",o?",":"")):t.push(a+1,'"%s"%s',n,o?",":"")}),t.push(a,"},")}function u(e,a){for(const[n,p]of Object.entries(e)){const o=!j(e,n);if(Array.isArray(p))t.push(a,"%s = new[] {",n),g(p,a);else if(d(p)){const y=A(p);t.push(a,"%s = new %s",n,y?"{},":"{"),y||(u(p,a+1),t.push(a,"}%s",o?",":""))}else t.push(a,'%s = "%s"%s',n,p,o?",":"")}}},V={key:"httpclient",title:"HttpClient",link:"https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient",description:".NET Standard HTTP Client"};var B=x;function P(s){s.push("// Requires >= .NET 5"),s.blank()}function L(s){return O(s.toLowerCase())}function M(s){return s&&["POST","PUT","DELETE","PATCH"].includes(s.toUpperCase())}export{B as default,V as info};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const theme_1=require("@redocly/theme"),code_builder_1=require("../../helpers/code-builder"),__1=require("../.."),code_helpers_1=require("../../helpers/code-helpers"),utils_1=require("../../../../utils"),generator_1=require("../../../generator"),constants_1=require("../../helpers/constants"),constants_2=require("../../../../../constants"),utils_2=require("../../../../../utils"),handler=function(t,e,{target:s,client:a}){var n,i,r,o;const p=Object.assign({indent:" ",withWrapper:!0},e),u=new code_builder_1.CodeBuilder({indentation:p.indent,variablesPrefix:p.variablesPrefix,capitalize:!0,lang:constants_1.Lang.CSHARP}),l=formatHttpMethod(t.method);if(p.withComments&&addComments(u),p.withWrapper&&(u.push("using System;"),u.push("using System.Net.Http;"),u.push("using System.Threading.Tasks;"),(h(constants_2.MediaTypes.JSON)||h(constants_2.MediaTypes.XML)||t.basicAuth)&&u.push("using System.Text;"),(h(constants_2.MediaTypes.URL_ENCODED)||(null===(n=t.securityOAuth2ExtraCalls)||void 0===n?void 0:n.length))&&u.push("using System.Collections.Generic;"),(h(constants_2.MediaTypes.JSON)||(null===(i=t.securityOAuth2ExtraCalls)||void 0===i?void 0:i.length))&&u.push("using System.Text.Json;"),d()&&u.push("using System.IO;"),(d()||t.basicAuth)&&u.push("using System.Net.Http.Headers;"),u.blank(),u.push("public class Program"),u.push("{"),u.push(1,"public static async Task Main()"),u.push(1,"{")),null===(r=t.securityOAuth2ExtraCalls)||void 0===r?void 0:r.length){const e=new __1.HTTPSnippet(null===(o=t.securityOAuth2ExtraCalls)||void 0===o?void 0:o[0]).convert(s,a,Object.assign(Object.assign({},p),{withImports:!1,withWrapper:!1,withComments:!1,variablesPrefix:"oauth2"}));u.push(e),u.push(2,"var oauth2Response = await oauth2Request.Content.ReadAsStringAsync();"),u.push(2,"JObject inputJObject = JObject.Parse(oauth2Response);"),u.push(2,'var accessToken = inputJObject["access_token"].ToString();'),u.blank()}const c=Object.keys(t.allHeaders).filter((t=>{switch(t.toLowerCase()){case"content-type":case"content-length":case"accept-encoding":return!1;default:return!0}}));if(c.length?(u.push(2,"System.Net.Http.HttpClient client = new()"),u.push(2,"{"),u.push(3,"DefaultRequestHeaders ="),u.push(3,"{"),c.forEach((e=>{var s;u.push(4,'{"%s", %s},',e,(null===(s=t.securityOAuth2ExtraCalls)||void 0===s?void 0:s.length)?'"Bearer " + accessToken':`"${t.allHeaders[e]}"`)})),u.push(3,"}"),u.push(2,"};")):u.push(2,"System.Net.Http.HttpClient client = new();"),u.blank(),t.basicAuth){const{username:e,password:s}=t.basicAuth;u.push(2,`string base64String = Convert.ToBase64String(Encoding.ASCII.GetBytes("${e}:${s}"));`),u.push(2,'client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(@"Basic", base64String);'),u.blank()}if(t.postData)switch((0,utils_1.normalizeMimeType)(t.postData.mimeType)){case constants_2.MediaTypes.URL_ENCODED:t.postData.params&&(u.blank(),u.push(2,"List<KeyValuePair<string, string>> postData = new List<KeyValuePair<string, string>>();"),t.postData.params.forEach((t=>{u.push(2,'postData.Add(new KeyValuePair<string, string>("%s", "%s"));',t.name,t.value)})),u.blank());break;case constants_2.MediaTypes.MULTIPART:t.postData.params&&(u.blank(),u.push(2,"MultipartFormDataContent postData = new MultipartFormDataContent();"),t.postData.params.forEach((t=>{u.push(2,'postData.Add(new StringContent("%s"), "%s");',t.value,t.name)})));break;case constants_2.MediaTypes.JSON:t.postData.jsonObj&&(u.push(2,"string json = JsonSerializer.Serialize(new"),u.push(2,"{"),y(t.postData.jsonObj,3),u.push(2,"});"),u.blank(),u.push(2,'using StringContent postData = new(json, Encoding.UTF8, "%s");',t.postData.mimeType));break;case constants_2.MediaTypes.XML:t.postData.text&&(t.postData.text.trim().split("\n").forEach(((t,e)=>{const s=(0===e?'string xml = @"':"")+t.replace(/"/g,'""');u.push(0===e?2:3,s)})),u.push(2,'";'),u.push(2,'using StringContent postData = new StringContent(xml, Encoding.UTF8, "%s");',t.postData.mimeType))}else d()&&(u.push(2,"var ms = new MemoryStream();"),u.push(2,"var postData = new StreamContent(ms);"),u.push(2,'postData.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");'));return(0,code_helpers_1.printUrlVariablesDeclarations)(t,u,3),u.push(2,"using HttpResponseMessage %s = await client.%sAsync(%s%s);",u.var("request"),l,(0,code_helpers_1.buildUrlExpression)(t,u),p.withImports?isDataMethod(t.method)?(0,utils_1.normalizeMimeType)(t.postData&&t.postData.mimeType)===constants_2.MediaTypes.URL_ENCODED?", new FormUrlEncodedContent(postData)":"delete"===t.method?"":t.postData&&t.postData.params||d()?", postData":", null":"":", new FormUrlEncodedContent(postData)"),p.withWrapper&&(u.push(2,"string response = await request.Content.ReadAsStringAsync();"),u.blank(),u.push(2,"Console.WriteLine(response);"),u.push(1,"}"),u.push("}")),u.join();function h(e){return t.postData&&(0,utils_1.normalizeMimeType)(t.postData.mimeType)===e}function d(){return t.headersObj&&t.headersObj["Content-Type"]===constants_2.MediaTypes.OCTET_STREAM}function m(t,e){t.forEach(((s,a)=>{const n=!(0,utils_2.isLastInArray)(t,a);Array.isArray(s)?m(s,e+1):(0,theme_1.isObject)(s)?(u.push(e+1,"new {"),y(s,e+2),u.push(e+1,"}%s",n?",":"")):u.push(e+1,'"%s"%s',s,n?",":"")})),u.push(e,"},")}function y(t,e){for(const[s,a]of Object.entries(t)){const n=!(0,utils_2.isLastProperty)(t,s);if(Array.isArray(a))u.push(e,"%s = new[] {",s),m(a,e);else if((0,theme_1.isObject)(a)){const t=(0,utils_1.isEmptyObject)(a);u.push(e,"%s = new %s",s,t?"{},":"{"),t||(y(a,e+1),u.push(e,"}%s",n?",":""))}else u.push(e,'%s = "%s"%s',s,a,n?",":"")}}};function addComments(t){t.push("// Requires >= .NET 5"),t.blank()}function formatHttpMethod(t){return(0,generator_1.capitalizeFirst)(t.toLowerCase())}function isDataMethod(t){return t&&["POST","PUT","DELETE","PATCH"].includes(t.toUpperCase())}exports.info={key:"httpclient",title:"HttpClient",link:"https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient",description:".NET Standard HTTP Client"},exports.default=handler;
2
+ //# sourceMappingURL=httpclient.js.map
@@ -5,6 +5,6 @@ declare const _default: {
5
5
  extname: string;
6
6
  default: string;
7
7
  };
8
- httpclient: import("../../index.js").LanguageHandler<import("../../../types.js").BasicLanguageOptions | undefined>;
8
+ httpclient: import("../..").LanguageHandler<import("../../..").BasicLanguageOptions | undefined>;
9
9
  };
10
10
  export default _default;
@@ -1 +1,2 @@
1
- import t from"./httpclient.js";var p={info:{key:"csharp",title:"CSharp",extname:".cs",default:"httpclient"},httpclient:t};export{p as default};
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const httpclient_1=__importDefault(require("./httpclient"));exports.default={info:{key:"csharp",title:"CSharp",extname:".cs",default:"httpclient"},httpclient:httpclient_1.default};
2
+ //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import type { LanguageHandler } from '../../index.js';
2
- import type { CSharpNewtonsoftCodeSampleConfig } from '../../../types.js';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { CSharpNewtonsoftCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<CSharpNewtonsoftCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,2 +1,2 @@
1
- import f from"stringify-object";import{CodeBuilder as g}from"../../helpers/code-builder.js";import{HTTPSnippet as C}from"../../index.js";import{addIndentation as D,buildUrlExpression as y,printUrlVariablesDeclarations as T}from"../../helpers/code-helpers.js";import{normalizeMimeType as o}from"../../../../utils.js";import{capitalizeFirst as b}from"../../../generator.js";import{Lang as w}from"../../helpers/constants.js";import{MediaTypes as s}from"../../../../../constants.js";const S=function(t,h,{target:u,client:m}){const n=Object.assign({indent:" ",withWrapper:!0},h),e=new g({indentation:n.indent,variablesPrefix:n.variablesPrefix,capitalize:!0,lang:w.CSHARPNEWTONSOFT}),c=E(t.method);if(n.withComments&&O(e),n.withWrapper&&(e.push("using System;"),e.push("using System.Net.Http;"),e.push("using System.Threading.Tasks;"),(i(s.JSON)||i(s.XML)||t.basicAuth)&&e.push("using System.Text;"),(i(s.URL_ENCODED)||t.securityOAuth2ExtraCalls?.length)&&e.push("using System.Collections.Generic;"),(i(s.JSON)||t.securityOAuth2ExtraCalls?.length)&&e.push("using Newtonsoft.Json.Linq;"),p()&&e.push("using System.IO;"),(p()||t.basicAuth)&&e.push("using System.Net.Http.Headers;"),e.blank(),e.push("public class Program"),e.push("{"),e.push(1,"private readonly IHttpClientFactory _httpClientFactory;"),e.push(1,"public static async Task Main(string[] args)"),e.push(1,"{"),e.push(2,"var client = _httpClientFactory.CreateClient();")),t.securityOAuth2ExtraCalls?.length){const a=new C(t.securityOAuth2ExtraCalls?.[0]).convert(u,m,{...n,withImports:!1,withWrapper:!1,withComments:!1,variablesPrefix:"oauth2"});e.push(a),e.push(2,"var oauth2Response = await oauth2Request.Content.ReadAsStringAsync();"),e.push(2,"JObject inputJObject = JObject.Parse(oauth2Response);"),e.push(2,'var accessToken = inputJObject["access_token"].ToString();'),e.blank()}const l=Object.keys(t.allHeaders).filter(a=>{switch(a.toLowerCase()){case"content-type":case"content-length":case"accept-encoding":return!1;default:return!0}});if(l.length&&l.forEach(a=>{e.push(2,'client.DefaultRequestHeaders.Add("%s", %s);',a,t.securityOAuth2ExtraCalls?.length?'"Bearer " + accessToken':`"${t.allHeaders[a]}"`)}),t.basicAuth){const{username:a,password:r}=t.basicAuth;e.push(2,`var base64String = Convert.ToBase64String(Encoding.ASCII.GetBytes("${a}:${r}"));`),e.push(2,'client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(@"Basic", base64String);')}if(t.postData)switch(o(t.postData.mimeType)){case s.URL_ENCODED:t.postData.params&&(e.blank(),e.push(2,"List<KeyValuePair<string, string>> postData = new List<KeyValuePair<string, string>>();"),t.postData.params.forEach(a=>{e.push(2,'postData.Add(new KeyValuePair<string, string>("%s", "%s"));',a.name,a.value)}),e.blank());break;case s.MULTIPART:t.postData.params&&(e.blank(),e.push(2,"MultipartFormDataContent postData = new MultipartFormDataContent();"),t.postData.params.forEach(a=>{e.push(2,'postData.Add(new StringContent("%s"), "%s");',a.value,a.name)}));break;case s.JSON:t.postData.jsonObj&&(e.push(2,`JObject json = JObject.Parse(@"${D(f(t.postData.jsonObj,{indent:n.indent,inlineCharacterLimit:25}).replace(/"/g,'""'),{level:3,firstLine:!1})}");`),e.push(2,'var postData = new StringContent(json.ToString(), Encoding.UTF8, "%s");',t.postData.mimeType));break;case s.XML:t.postData.text&&(t.postData.text.trim().split(`
2
- `).forEach((a,r)=>{const d=(r===0?'string xml = @"':"")+a.replace(/"/g,'""');e.push(r===0?3:4,d)}),e.push(2,'";'),e.push(2,'var postData = new StringContent(xml, Encoding.UTF8, "%s");',t.postData.mimeType));break}else p()&&(e.push(2,"var ms = new MemoryStream();"),e.push(2,"var postData = new StreamContent(ms);"),e.push(2,'postData.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");'));return T(t,e,3),e.push(2,"var %s = await client.%sAsync(%s%s);",e.var("request"),c,y(t,e),n.withImports?A(t.method)?o(t.postData&&t.postData.mimeType)===s.URL_ENCODED?", new FormUrlEncodedContent(postData)":t.method==="delete"?"":t.postData&&t.postData.params||p()?", postData":", null":"":", new FormUrlEncodedContent(postData)"),n.withWrapper&&(e.push(2,"var response = await request.Content.ReadAsStringAsync();"),e.blank(),e.push(2,"Console.WriteLine(response);"),e.push(1,"}"),e.push("}")),e.join();function i(a){return t.postData&&o(t.postData.mimeType)===a}function p(){return t.headersObj&&t.headersObj["Content-Type"]===s.OCTET_STREAM}},M={key:"httpclient",title:"HttpClient",link:"https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient",description:".NET Standard HTTP Client"};var N=S;function O(t){t.push("/*"),t.push(" * Requires >= .NET 5"),t.push(" *"),t.push(' * Requires package "Newtonsoft.Json" >= 9.01'),t.push(" * See here for installation details:"),t.push(" * https://www.newtonsoft.com/json"),t.push(" */"),t.blank()}function E(t){return b(t.toLowerCase())}function A(t){return t&&["POST","PUT","DELETE","PATCH"].includes(t.toUpperCase())}export{N as default,M as info};
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const stringify_object_1=__importDefault(require("stringify-object")),code_builder_1=require("../../helpers/code-builder"),__1=require("../.."),code_helpers_1=require("../../helpers/code-helpers"),utils_1=require("../../../../utils"),generator_1=require("../../../generator"),constants_1=require("../../helpers/constants"),constants_2=require("../../../../../constants"),handler=function(t,e,{target:s,client:a}){var n,i,r,o;const p=Object.assign({indent:" ",withWrapper:!0},e),u=new code_builder_1.CodeBuilder({indentation:p.indent,variablesPrefix:p.variablesPrefix,capitalize:!0,lang:constants_1.Lang.CSHARPNEWTONSOFT}),l=formatHttpMethod(t.method);if(p.withComments&&addComments(u),p.withWrapper&&(u.push("using System;"),u.push("using System.Net.Http;"),u.push("using System.Threading.Tasks;"),(h(constants_2.MediaTypes.JSON)||h(constants_2.MediaTypes.XML)||t.basicAuth)&&u.push("using System.Text;"),(h(constants_2.MediaTypes.URL_ENCODED)||(null===(n=t.securityOAuth2ExtraCalls)||void 0===n?void 0:n.length))&&u.push("using System.Collections.Generic;"),(h(constants_2.MediaTypes.JSON)||(null===(i=t.securityOAuth2ExtraCalls)||void 0===i?void 0:i.length))&&u.push("using Newtonsoft.Json.Linq;"),d()&&u.push("using System.IO;"),(d()||t.basicAuth)&&u.push("using System.Net.Http.Headers;"),u.blank(),u.push("public class Program"),u.push("{"),u.push(1,"private readonly IHttpClientFactory _httpClientFactory;"),u.push(1,"public static async Task Main(string[] args)"),u.push(1,"{"),u.push(2,"var client = _httpClientFactory.CreateClient();")),null===(r=t.securityOAuth2ExtraCalls)||void 0===r?void 0:r.length){const e=new __1.HTTPSnippet(null===(o=t.securityOAuth2ExtraCalls)||void 0===o?void 0:o[0]).convert(s,a,Object.assign(Object.assign({},p),{withImports:!1,withWrapper:!1,withComments:!1,variablesPrefix:"oauth2"}));u.push(e),u.push(2,"var oauth2Response = await oauth2Request.Content.ReadAsStringAsync();"),u.push(2,"JObject inputJObject = JObject.Parse(oauth2Response);"),u.push(2,'var accessToken = inputJObject["access_token"].ToString();'),u.blank()}const c=Object.keys(t.allHeaders).filter((t=>{switch(t.toLowerCase()){case"content-type":case"content-length":case"accept-encoding":return!1;default:return!0}}));if(c.length&&c.forEach((e=>{var s;u.push(2,'client.DefaultRequestHeaders.Add("%s", %s);',e,(null===(s=t.securityOAuth2ExtraCalls)||void 0===s?void 0:s.length)?'"Bearer " + accessToken':`"${t.allHeaders[e]}"`)})),t.basicAuth){const{username:e,password:s}=t.basicAuth;u.push(2,`var base64String = Convert.ToBase64String(Encoding.ASCII.GetBytes("${e}:${s}"));`),u.push(2,'client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(@"Basic", base64String);')}if(t.postData)switch((0,utils_1.normalizeMimeType)(t.postData.mimeType)){case constants_2.MediaTypes.URL_ENCODED:t.postData.params&&(u.blank(),u.push(2,"List<KeyValuePair<string, string>> postData = new List<KeyValuePair<string, string>>();"),t.postData.params.forEach((t=>{u.push(2,'postData.Add(new KeyValuePair<string, string>("%s", "%s"));',t.name,t.value)})),u.blank());break;case constants_2.MediaTypes.MULTIPART:t.postData.params&&(u.blank(),u.push(2,"MultipartFormDataContent postData = new MultipartFormDataContent();"),t.postData.params.forEach((t=>{u.push(2,'postData.Add(new StringContent("%s"), "%s");',t.value,t.name)})));break;case constants_2.MediaTypes.JSON:t.postData.jsonObj&&(u.push(2,`JObject json = JObject.Parse(@"${(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(t.postData.jsonObj,{indent:p.indent,inlineCharacterLimit:25}).replace(/"/g,'""'),{level:3,firstLine:!1})}");`),u.push(2,'var postData = new StringContent(json.ToString(), Encoding.UTF8, "%s");',t.postData.mimeType));break;case constants_2.MediaTypes.XML:t.postData.text&&(t.postData.text.trim().split("\n").forEach(((t,e)=>{const s=(0===e?'string xml = @"':"")+t.replace(/"/g,'""');u.push(0===e?3:4,s)})),u.push(2,'";'),u.push(2,'var postData = new StringContent(xml, Encoding.UTF8, "%s");',t.postData.mimeType))}else d()&&(u.push(2,"var ms = new MemoryStream();"),u.push(2,"var postData = new StreamContent(ms);"),u.push(2,'postData.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");'));return(0,code_helpers_1.printUrlVariablesDeclarations)(t,u,3),u.push(2,"var %s = await client.%sAsync(%s%s);",u.var("request"),l,(0,code_helpers_1.buildUrlExpression)(t,u),p.withImports?isDataMethod(t.method)?(0,utils_1.normalizeMimeType)(t.postData&&t.postData.mimeType)===constants_2.MediaTypes.URL_ENCODED?", new FormUrlEncodedContent(postData)":"delete"===t.method?"":t.postData&&t.postData.params||d()?", postData":", null":"":", new FormUrlEncodedContent(postData)"),p.withWrapper&&(u.push(2,"var response = await request.Content.ReadAsStringAsync();"),u.blank(),u.push(2,"Console.WriteLine(response);"),u.push(1,"}"),u.push("}")),u.join();function h(e){return t.postData&&(0,utils_1.normalizeMimeType)(t.postData.mimeType)===e}function d(){return t.headersObj&&t.headersObj["Content-Type"]===constants_2.MediaTypes.OCTET_STREAM}};function addComments(t){t.push("/*"),t.push(" * Requires >= .NET 5"),t.push(" *"),t.push(' * Requires package "Newtonsoft.Json" >= 9.01'),t.push(" * See here for installation details:"),t.push(" * https://www.newtonsoft.com/json"),t.push(" */"),t.blank()}function formatHttpMethod(t){return(0,generator_1.capitalizeFirst)(t.toLowerCase())}function isDataMethod(t){return t&&["POST","PUT","DELETE","PATCH"].includes(t.toUpperCase())}exports.info={key:"httpclient",title:"HttpClient",link:"https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient",description:".NET Standard HTTP Client"},exports.default=handler;
2
+ //# sourceMappingURL=httpclient.js.map
@@ -5,6 +5,6 @@ declare const _default: {
5
5
  extname: string;
6
6
  default: string;
7
7
  };
8
- httpclient: import("../../index.js").LanguageHandler<import("../../../types.js").BasicLanguageOptions | undefined>;
8
+ httpclient: import("../..").LanguageHandler<import("../../..").BasicLanguageOptions | undefined>;
9
9
  };
10
10
  export default _default;
@@ -1 +1,2 @@
1
- import t from"./httpclient.js";var o={info:{key:"csharpNewtonsoft",title:"CSharpNewtonsoft",extname:".cs",default:"httpclient"},httpclient:t};export{o as default};
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const httpclient_1=__importDefault(require("./httpclient"));exports.default={info:{key:"csharpNewtonsoft",title:"CSharpNewtonsoft",extname:".cs",default:"httpclient"},httpclient:httpclient_1.default};
2
+ //# sourceMappingURL=index.js.map
@@ -5,6 +5,6 @@ declare const _default: {
5
5
  extname: string;
6
6
  default: string;
7
7
  };
8
- native: import("../../index.js").LanguageHandler<import("../../../types.js").BasicLanguageOptions | undefined>;
8
+ native: import("../..").LanguageHandler<import("../../..").BasicLanguageOptions | undefined>;
9
9
  };
10
10
  export default _default;
@@ -1 +1,2 @@
1
- import e from"./native.js";var o={info:{key:"go",title:"Go",extname:".go",default:"native"},native:e};export{o as default};
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const native_1=__importDefault(require("./native"));exports.default={info:{key:"go",title:"Go",extname:".go",default:"native"},native:native_1.default};
2
+ //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import type { LanguageHandler } from '../../index.js';
2
- import type { GoCodeSampleConfig } from '../../../types.js';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { GoCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<GoCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,3 +1,2 @@
1
- import{CodeBuilder as b}from"../../helpers/code-builder.js";import{HTTPSnippet as q}from"../../index.js";import{Lang as w}from"../../helpers/constants.js";import{buildUrlExpression as $,printUrlVariablesDeclarations as g}from"../../helpers/code-helpers.js";import{normalizeMimeType as m}from"../../../../utils.js";import{MediaTypes as p}from"../../../../../constants.js";const t=1;function l(s={},y){return m(s.mimeType)===y}const D=function(s,y,{target:c,client:d}){const i={capitalize:!0,showBoilerplate:!0,checkErrors:!0,printBody:!0,timeout:-1,indent:" ",...y},f=s.securityOAuth2ExtraCalls?.[0],n=i.checkErrors?"err":"_",h=s.method.toUpperCase(),e=new b({indentation:i.indent,variablesPrefix:i.variablesPrefix,capitalize:i.capitalize,lang:w.GO}),o=()=>{i.checkErrors&&e.push(t,"if err != nil {").push(t+1,"panic(err)").push(t,"}")};if(i.showBoilerplate&&(e.push("package main").blank().push("import (").push(t,'"fmt"'),i.timeout>0&&e.push(t,'"time"'),f&&e.push(t,'"encoding/json"'),l(s.postData,p.MULTIPART)&&(e.push(t,'"mime/multipart"'),e.push(t,'"io"'),e.push(t,'"bytes"')),(l(s.postData,p.URL_ENCODED)||l(s.securityOAuth2ExtraCalls?.[0]?.postData,p.URL_ENCODED))&&(e.push(t,'"net/url"'),e.push(t,'"strconv"')),(l(s.postData,p.JSON)||l(s.securityOAuth2ExtraCalls?.[0]?.postData,p.JSON))&&e.push(t,'"bytes"'),(s.postData&&!l(s.postData,p.JSON)||f)&&e.push(t,'"strings"'),e.push(t,'"net/http"'),i.printBody&&e.push(t,'"io/ioutil"'),e.push(")").blank().push("func main() {")),Object.keys(s.allHeaders).length&&Object.keys(s.allHeaders).forEach(r=>{s.allHeaders[r]=`"${s.allHeaders[r]}"`}),f){const r="oAuth2",a=i.checkErrors?`${n} := `:"",u=i.capitalize?"Res":"res",v=new q(f).convert(c,d,{...i,printBody:!1,variablesPrefix:r,showBoilerplate:!1});e.push(v).blank().push(t,`var ${r}${u}Body struct {`).push(t+1,"Access_token string").push(t,"}").push(t,`${a}json.NewDecoder(${r}${u}.Body).Decode(&${r}${u}Body)`).blank(),o(),s.allHeaders.Authorization=`"Bearer " + ${r}${u}Body.Access_token`}if(g(s,e,t),i.timeout>0&&(d=e.var("client"),e.push(t,"%s := http.Client{",d).push(t+1,"Timeout: time.Duration(%s * time.Second),",i.timeout).push(t,"}").blank()),e.push(t,`${e.var("reqUrl")} := ${$(s,e)}`),s.postData){let r;switch(m(s.postData.mimeType)){case p.URL_ENCODED:e.push(t,"%s := url.Values{}",e.var("data")),s.postData.params.forEach(a=>{e.push(t,'%s.Set("%s", "%s")',e.var("data"),a.name,a.value)}),e.push(t,'%s, %s := http.NewRequest("%s", %s, strings.NewReader(%s.Encode()))',e.var("req"),n,h,e.var("reqUrl"),e.var("data")),s.allHeaders["Content-Length"]=`strconv.Itoa(len(${e.var("data")}.Encode()))`;break;case p.JSON:r=JSON.stringify(s.postData.jsonObj,null,2).split(`
2
- `).map(a=>i.indent+a).join(`
3
- `).trim(),e.push(t,`var ${e.var("data")} = []byte(\`${r}\`)`),e.push(t,'%s, %s := http.NewRequest("%s", %s, bytes.NewBuffer(%s))',e.var("req"),n,h,e.var("reqUrl"),e.var("data"));break;case p.MULTIPART:e.push(t,"%s := &bytes.Buffer{}",e.var("data")).push(t,"writer := multipart.NewWriter(%s)",e.var("data")),s.postData.params.forEach(a=>{if(!a.fileName&&!a.contentType){e.push(t,'%s, _ := writer.CreateFormField("%s")',e.var(`${a.name}Fw`),a.name).push(t,'_, %s = io.Copy(%s, strings.NewReader("%s"))',n,e.var(`${a.name}Fw`),a.value),o();return}a.fileName&&(e.push(t,'%s, %s = writer.CreateFormFile("%s", "%s")',e.var(`${a.name}Fw`),n,a.name,a.fileName),o())}),e.push(t,"writer.Close()").blank().push(t,"%s := bytes.NewReader(%s.Bytes())",e.var("payload"),e.var("data")).push(t,'%s, %s := http.NewRequest("%s", %s, %s)',e.var("req"),n,h,e.var("reqUrl"),e.var("payload")),s.allHeaders["Content-Type"]="writer.FormDataContentType()";break;default:s.postData.text&&e.push(t,"%s := strings.NewReader(%s)",e.var("payload"),JSON.stringify(s.postData?.text)).push(t,'%s, %s := http.NewRequest("%s", %s, %s)',e.var("req"),n,h,e.var("reqUrl"),e.var("payload"))}}else e.push(t,'%s, %s := http.NewRequest("%s", %s, nil)',e.var("req"),n,h,e.var("reqUrl"));if(Object.getOwnPropertyNames(s.queryObj).length){e.blank().push(t,`${e.var("query")} := ${e.var("req")}.URL.Query()`);for(const r in s.queryObj){const a=s.queryObj[r],v=typeof a=="string"&&/^\[.*\]$/.test(a)?`\`${a}\``:`"${a}"`;e.push(t,`${e.var("query")}.Add("${r}", ${v})`)}e.push(t,`${e.var("req")}.URL.RawQuery = ${e.var("query")}.Encode()`).blank()}if(o(),s.basicAuth){const{username:r,password:a}=s.basicAuth;e.push(t,`%s.SetBasicAuth("${r}", "${a}")`,e.var("req"))}return Object.keys(s.allHeaders).length&&Object.keys(s.allHeaders).forEach(r=>{e.push(t,'%s.Header.Add("%s", %s)',e.var("req"),r,s.allHeaders[r])}),e.push(t,"%s, %s := %s.Do(%s)",e.var("res"),n,d,e.var("req")),o(),i.printBody&&(e.push(t,"defer %s.Body.Close()",e.var("res")).push(t,"%s, %s := ioutil.ReadAll(%s.Body)",e.var("body"),n,e.var("res")),o()),e.blank().push(t,"fmt.Println(%s)",e.var("res")),i.printBody&&e.push(t,"fmt.Println(string(%s))",e.var("body")),i.showBoilerplate&&e.push("}"),e.join()},A={key:"native",title:"NewRequest",link:"http://golang.org/pkg/net/http/#NewRequest",description:"Golang HTTP client request"};var T=D;export{T as default,A as info};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const code_builder_1=require("../../helpers/code-builder"),__1=require("../.."),constants_1=require("../../helpers/constants"),code_helpers_1=require("../../helpers/code-helpers"),utils_1=require("../../../../utils"),constants_2=require("../../../../../constants"),indent=1;function hasMimeType(e={},s){return(0,utils_1.normalizeMimeType)(e.mimeType)===s}const handler=function(e,s,{target:t,client:a}){var r,i,n,o,p,l;const u=Object.assign({capitalize:!0,showBoilerplate:!0,checkErrors:!0,printBody:!0,timeout:-1,indent:" "},s),h=null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r[0],d=u.checkErrors?"err":"_",c=e.method.toUpperCase(),v=new code_builder_1.CodeBuilder({indentation:u.indent,variablesPrefix:u.variablesPrefix,capitalize:u.capitalize,lang:constants_1.Lang.GO}),y=()=>{u.checkErrors&&v.push(1,"if err != nil {").push(2,"panic(err)").push(1,"}")};if(u.showBoilerplate&&(v.push("package main").blank().push("import (").push(1,'"fmt"'),u.timeout>0&&v.push(1,'"time"'),h&&v.push(1,'"encoding/json"'),hasMimeType(e.postData,constants_2.MediaTypes.MULTIPART)&&(v.push(1,'"mime/multipart"'),v.push(1,'"io"'),v.push(1,'"bytes"')),(hasMimeType(e.postData,constants_2.MediaTypes.URL_ENCODED)||hasMimeType(null===(n=null===(i=e.securityOAuth2ExtraCalls)||void 0===i?void 0:i[0])||void 0===n?void 0:n.postData,constants_2.MediaTypes.URL_ENCODED))&&(v.push(1,'"net/url"'),v.push(1,'"strconv"')),(hasMimeType(e.postData,constants_2.MediaTypes.JSON)||hasMimeType(null===(p=null===(o=e.securityOAuth2ExtraCalls)||void 0===o?void 0:o[0])||void 0===p?void 0:p.postData,constants_2.MediaTypes.JSON))&&v.push(1,'"bytes"'),(e.postData&&!hasMimeType(e.postData,constants_2.MediaTypes.JSON)||h)&&v.push(1,'"strings"'),v.push(1,'"net/http"'),u.printBody&&v.push(1,'"io/ioutil"'),v.push(")").blank().push("func main() {")),Object.keys(e.allHeaders).length&&Object.keys(e.allHeaders).forEach((s=>{e.allHeaders[s]=`"${e.allHeaders[s]}"`})),h){const s="oAuth2",r=u.checkErrors?`${d} := `:"",i=u.capitalize?"Res":"res",n=new __1.HTTPSnippet(h).convert(t,a,Object.assign(Object.assign({},u),{printBody:!1,variablesPrefix:s,showBoilerplate:!1}));v.push(n).blank().push(1,`var ${s}${i}Body struct {`).push(2,"Access_token string").push(1,"}").push(1,`${r}json.NewDecoder(${s}${i}.Body).Decode(&${s}${i}Body)`).blank(),y(),e.allHeaders.Authorization=`"Bearer " + ${s}${i}Body.Access_token`}if((0,code_helpers_1.printUrlVariablesDeclarations)(e,v,1),u.timeout>0&&(a=v.var("client"),v.push(1,"%s := http.Client{",a).push(2,"Timeout: time.Duration(%s * time.Second),",u.timeout).push(1,"}").blank()),v.push(1,`${v.var("reqUrl")} := ${(0,code_helpers_1.buildUrlExpression)(e,v)}`),e.postData){let s;switch((0,utils_1.normalizeMimeType)(e.postData.mimeType)){case constants_2.MediaTypes.URL_ENCODED:v.push(1,"%s := url.Values{}",v.var("data")),e.postData.params.forEach((e=>{v.push(1,'%s.Set("%s", "%s")',v.var("data"),e.name,e.value)})),v.push(1,'%s, %s := http.NewRequest("%s", %s, strings.NewReader(%s.Encode()))',v.var("req"),d,c,v.var("reqUrl"),v.var("data")),e.allHeaders["Content-Length"]=`strconv.Itoa(len(${v.var("data")}.Encode()))`;break;case constants_2.MediaTypes.JSON:s=JSON.stringify(e.postData.jsonObj,null,2).split("\n").map((e=>u.indent+e)).join("\n").trim(),v.push(1,`var ${v.var("data")} = []byte(\`${s}\`)`),v.push(1,'%s, %s := http.NewRequest("%s", %s, bytes.NewBuffer(%s))',v.var("req"),d,c,v.var("reqUrl"),v.var("data"));break;case constants_2.MediaTypes.MULTIPART:v.push(1,"%s := &bytes.Buffer{}",v.var("data")).push(1,"writer := multipart.NewWriter(%s)",v.var("data")),e.postData.params.forEach((e=>{if(!e.fileName&&!e.contentType)return v.push(1,'%s, _ := writer.CreateFormField("%s")',v.var(`${e.name}Fw`),e.name).push(1,'_, %s = io.Copy(%s, strings.NewReader("%s"))',d,v.var(`${e.name}Fw`),e.value),void y();e.fileName&&(v.push(1,'%s, %s = writer.CreateFormFile("%s", "%s")',v.var(`${e.name}Fw`),d,e.name,e.fileName),y())})),v.push(1,"writer.Close()").blank().push(1,"%s := bytes.NewReader(%s.Bytes())",v.var("payload"),v.var("data")).push(1,'%s, %s := http.NewRequest("%s", %s, %s)',v.var("req"),d,c,v.var("reqUrl"),v.var("payload")),e.allHeaders["Content-Type"]="writer.FormDataContentType()";break;default:e.postData.text&&v.push(1,"%s := strings.NewReader(%s)",v.var("payload"),JSON.stringify(null===(l=e.postData)||void 0===l?void 0:l.text)).push(1,'%s, %s := http.NewRequest("%s", %s, %s)',v.var("req"),d,c,v.var("reqUrl"),v.var("payload"))}}else v.push(1,'%s, %s := http.NewRequest("%s", %s, nil)',v.var("req"),d,c,v.var("reqUrl"));if(Object.getOwnPropertyNames(e.queryObj).length){v.blank().push(1,`${v.var("query")} := ${v.var("req")}.URL.Query()`);for(const s in e.queryObj){const t=e.queryObj[s],a="string"==typeof t&&/^\[.*\]$/.test(t)?`\`${t}\``:`"${t}"`;v.push(1,`${v.var("query")}.Add("${s}", ${a})`)}v.push(1,`${v.var("req")}.URL.RawQuery = ${v.var("query")}.Encode()`).blank()}if(y(),e.basicAuth){const{username:s,password:t}=e.basicAuth;v.push(1,`%s.SetBasicAuth("${s}", "${t}")`,v.var("req"))}return Object.keys(e.allHeaders).length&&Object.keys(e.allHeaders).forEach((s=>{v.push(1,'%s.Header.Add("%s", %s)',v.var("req"),s,e.allHeaders[s])})),v.push(1,"%s, %s := %s.Do(%s)",v.var("res"),d,a,v.var("req")),y(),u.printBody&&(v.push(1,"defer %s.Body.Close()",v.var("res")).push(1,"%s, %s := ioutil.ReadAll(%s.Body)",v.var("body"),d,v.var("res")),y()),v.blank().push(1,"fmt.Println(%s)",v.var("res")),u.printBody&&v.push(1,"fmt.Println(string(%s))",v.var("body")),u.showBoilerplate&&v.push("}"),v.join()};exports.info={key:"native",title:"NewRequest",link:"http://golang.org/pkg/net/http/#NewRequest",description:"Golang HTTP client request"},exports.default=handler;
2
+ //# sourceMappingURL=native.js.map
@@ -6,7 +6,7 @@ declare const targets: {
6
6
  extname: string;
7
7
  default: string;
8
8
  };
9
- fetch: import("../index.js").LanguageHandler<(import("../../types.js").BasicLanguageOptions & {
9
+ fetch: import("..").LanguageHandler<(import("../..").BasicLanguageOptions & {
10
10
  credentials?: "omit" | "same-origin" | "include";
11
11
  }) | undefined>;
12
12
  };
@@ -17,7 +17,7 @@ declare const targets: {
17
17
  extname: string;
18
18
  default: string;
19
19
  };
20
- fetch: import("../index.js").LanguageHandler<import("../../types.js").BasicLanguageOptions | undefined>;
20
+ fetch: import("..").LanguageHandler<import("../..").BasicLanguageOptions | undefined>;
21
21
  };
22
22
  python: {
23
23
  info: {
@@ -26,7 +26,7 @@ declare const targets: {
26
26
  extname: string;
27
27
  default: string;
28
28
  };
29
- requests: import("../index.js").LanguageHandler<import("../../types.js").BasicLanguageOptions | undefined>;
29
+ requests: import("..").LanguageHandler<import("../..").BasicLanguageOptions | undefined>;
30
30
  };
31
31
  shell: {
32
32
  info: {
@@ -35,7 +35,7 @@ declare const targets: {
35
35
  extname: string;
36
36
  default: string;
37
37
  };
38
- curl: import("../index.js").LanguageHandler<(import("../../types.js").BasicLanguageOptions & {
38
+ curl: import("..").LanguageHandler<(import("../..").BasicLanguageOptions & {
39
39
  binary?: boolean;
40
40
  }) | undefined>;
41
41
  };
@@ -46,7 +46,7 @@ declare const targets: {
46
46
  extname: string;
47
47
  default: string;
48
48
  };
49
- apachehttp: import("../index.js").LanguageHandler<import("../../types.js").BasicLanguageOptions | undefined>;
49
+ apachehttp: import("..").LanguageHandler<import("../..").BasicLanguageOptions | undefined>;
50
50
  };
51
51
  java: {
52
52
  info: {
@@ -55,7 +55,7 @@ declare const targets: {
55
55
  extname: string;
56
56
  default: string;
57
57
  };
58
- httpclient: import("../index.js").LanguageHandler<import("../../types.js").BasicLanguageOptions | undefined>;
58
+ httpclient: import("..").LanguageHandler<import("../..").BasicLanguageOptions | undefined>;
59
59
  };
60
60
  csharp: {
61
61
  info: {
@@ -64,7 +64,7 @@ declare const targets: {
64
64
  extname: string;
65
65
  default: string;
66
66
  };
67
- httpclient: import("../index.js").LanguageHandler<import("../../types.js").BasicLanguageOptions | undefined>;
67
+ httpclient: import("..").LanguageHandler<import("../..").BasicLanguageOptions | undefined>;
68
68
  };
69
69
  csharpNewtonsoft: {
70
70
  info: {
@@ -73,7 +73,7 @@ declare const targets: {
73
73
  extname: string;
74
74
  default: string;
75
75
  };
76
- httpclient: import("../index.js").LanguageHandler<import("../../types.js").BasicLanguageOptions | undefined>;
76
+ httpclient: import("..").LanguageHandler<import("../..").BasicLanguageOptions | undefined>;
77
77
  };
78
78
  go: {
79
79
  info: {
@@ -82,7 +82,7 @@ declare const targets: {
82
82
  extname: string;
83
83
  default: string;
84
84
  };
85
- native: import("../index.js").LanguageHandler<import("../../types.js").BasicLanguageOptions | undefined>;
85
+ native: import("..").LanguageHandler<import("../..").BasicLanguageOptions | undefined>;
86
86
  };
87
87
  php: {
88
88
  info: {
@@ -91,7 +91,7 @@ declare const targets: {
91
91
  extname: string;
92
92
  default: string;
93
93
  };
94
- curl: import("../index.js").LanguageHandler<import("../../types.js").BasicLanguageOptions | undefined>;
94
+ curl: import("..").LanguageHandler<import("../..").BasicLanguageOptions | undefined>;
95
95
  };
96
96
  ruby: {
97
97
  info: {
@@ -100,7 +100,7 @@ declare const targets: {
100
100
  extname: string;
101
101
  default: string;
102
102
  };
103
- native: import("../index.js").LanguageHandler<import("../../types.js").BasicLanguageOptions | undefined>;
103
+ native: import("..").LanguageHandler<import("../..").BasicLanguageOptions | undefined>;
104
104
  };
105
105
  r: {
106
106
  info: {
@@ -109,7 +109,7 @@ declare const targets: {
109
109
  extname: string;
110
110
  default: string;
111
111
  };
112
- httr: import("../index.js").LanguageHandler<import("../../types.js").BasicLanguageOptions | undefined>;
112
+ httr: import("..").LanguageHandler<import("../..").BasicLanguageOptions | undefined>;
113
113
  };
114
114
  };
115
115
  export default targets;
@@ -1 +1,2 @@
1
- import o from"./javascript/index.js";import r from"./node/index.js";import m from"./python/index.js";import t from"./shell/index.js";import p from"./java8/index.js";import f from"./java/index.js";import i from"./csharp/index.js";import a from"./csharpNewtonsoft/index.js";import s from"./go/index.js";import e from"./php/index.js";import h from"./ruby/index.js";import c from"./r/index.js";const n={javascript:o,node:r,python:m,shell:t,java8:p,java:f,csharp:i,csharpNewtonsoft:a,go:s,php:e,ruby:h,r:c};var q=n;export{q as default};
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const javascript_1=__importDefault(require("./javascript")),node_1=__importDefault(require("./node")),python_1=__importDefault(require("./python")),shell_1=__importDefault(require("./shell")),java8_1=__importDefault(require("./java8")),java_1=__importDefault(require("./java")),csharp_1=__importDefault(require("./csharp")),csharpNewtonsoft_1=__importDefault(require("./csharpNewtonsoft")),go_1=__importDefault(require("./go")),php_1=__importDefault(require("./php")),ruby_1=__importDefault(require("./ruby")),r_1=__importDefault(require("./r")),targets={javascript:javascript_1.default,node:node_1.default,python:python_1.default,shell:shell_1.default,java8:java8_1.default,java:java_1.default,csharp:csharp_1.default,csharpNewtonsoft:csharpNewtonsoft_1.default,go:go_1.default,php:php_1.default,ruby:ruby_1.default,r:r_1.default};exports.default=targets;
2
+ //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import type { JavaCodeSampleConfig } from '../../../types.js';
2
- import type { LanguageHandler } from '../../index.js';
1
+ import type { JavaCodeSampleConfig } from '../../../types';
2
+ import type { LanguageHandler } from '../..';
3
3
  declare const handler: LanguageHandler<JavaCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,3 +1,2 @@
1
- import{CodeBuilder as f}from"../../helpers/code-builder.js";import{HTTPSnippet as b}from"../../index.js";import{normalizeMimeType as l}from"../../../../utils.js";import{addIndentation as y,buildUrlExpression as g,printUrlVariablesDeclarations as v}from"../../helpers/code-helpers.js";import{Lang as j}from"../../helpers/constants.js";import{MediaTypes as i}from"../../../../../constants.js";const r=t=>!!(t.uriObj.query&&Object.keys(t.uriObj.query).length),o=t=>t.postData&&t.postData.mimeType===i.URL_ENCODED?"HttpRequest.BodyPublishers.ofString(form)":t.postData?"HttpRequest.BodyPublishers.ofString(payload)":["POST","PUT","PATCH"].includes(t.method.toUpperCase())?'HttpRequest.BodyPublishers.ofString("some body text")':"",C=function(t,s,{target:u,client:m}){const p=Object.assign({indent:" ",withWrapper:!0},s),a=new f({indentation:p.indent,variablesPrefix:p.variablesPrefix,capitalize:!0,lang:j.JAVA});if(p.withComments&&k(a,t),p.withImports&&c(a,t),p.withWrapper&&(a.push("public class App {"),a.push(1,"public static void main(String[] args) throws Exception {"),a.push(2,"var httpClient = HttpClient.newBuilder().build();"),a.blank()),t.securityOAuth2ExtraCalls?.length){const e=new b(t.securityOAuth2ExtraCalls?.[0]).convert(u,m,{...p,withImports:!1,withWrapper:!1,withComments:!1,variablesPrefix:"oauth2"});a.push(e),a.blank(),a.push(2,"var oauth2Response = httpClient.send(oauth2Request, HttpResponse.BodyHandlers.ofString());"),a.push(2,'var accessToken = new JSONObject(oauth2Response.body()).getString("access_token");'),a.blank()}if(t.postData)switch(l(t.postData.mimeType)){case i.URL_ENCODED:t.postData.params&&(a.push(2,"HashMap<String, String> params = new HashMap<>();"),t.postData.params.forEach(e=>{a.push(2,'params.put("%s", "%s");',e.name,e.value)}),a.blank(),a.push(2,"var form = params.keySet().stream()"),a.push(3,'.map(key -> key + "=" + URLEncoder.encode(params.get(key), StandardCharsets.UTF_8))'),a.push(3,'.collect(Collectors.joining("&"));'),a.blank());break;case i.JSON:t.postData.jsonObj&&(a.push(2,`var payload = String.join("\\n"
2
- ${y(JSON.stringify(t.postData.jsonObj,null,1).replace(/"/g,'\\"').replace(/^/gm,', "').replace(/$/gm,'"'),{level:3,indent:p.indent,firstLine:!1})}`),a.push(2,");"),a.blank());break;case i.XML:t.postData.text&&(a.push(2,'var payload = String.join("\\n"'),t.postData.text.trim().split(`
3
- `).forEach(e=>{const n=e.replace(/"/g,'\\"');a.push(3,`"${n}", `)}),a.push(2,");"),a.blank());break;case i.MULTIPART:t.postData.params&&(a.push(2,"var multipartBody = MultipartBodyPublisher.newBuilder();"),t.postData.params&&t.postData.params.forEach(e=>{a.push(2,'multipartBody.append("%s", "%s");',e.name,e.value)}),a.push(2,"var body = multipartBody.build();"),a.blank());break}if(r(t)){a.push(2,"HashMap<String, String> params = new HashMap<>();");for(const[e,n]of Object.entries(t.uriObj.query))a.push(2,'params.put("%s", "%s");',e,n);a.blank(),a.push(2,"var query = params.keySet().stream()"),a.push(3,'.map(key -> key + "=" + URLEncoder.encode(params.get(key), StandardCharsets.UTF_8))'),a.push(3,'.collect(Collectors.joining("&"));'),a.blank()}a.push(2,`var ${a.var("host")} = "%s";`,t.uriObj.protocol+"//"+t.uriObj.host),v(t,a,2);const d={...t,pathname:t.uriObj.pathname};a.push(2,`var ${a.var("pathname")} = %s;`,g(d,a)),a.push(2,`var ${a.var("request")} = HttpRequest.newBuilder()`),t.method.toUpperCase()==="PATCH"?a.push(3,'.method("PATCH", %s)',o(t)):a.push(3,".%s(%s)",t.method.toUpperCase(),o(t)),a.push(3,`.uri(URI.create(${a.var("host")} + ${a.var("pathname")} %s))`,r(t)?"+ '?' + query":""),t.securityOAuth2ExtraCalls?.length&&(t.allHeaders.Authorization='"Bearer " + accessToken');const h=Object.keys(t.allHeaders);if(h.length&&h.forEach(e=>{a.push(3,'.header("%s", %s)',e,e==="Authorization"&&t.securityOAuth2ExtraCalls?.length?t.allHeaders[e]:`"${t.allHeaders[e]}"`)}),t.basicAuth){const{username:e,password:n}=t.basicAuth;a.push(3,`.header("Authorization", "Basic " + Base64.getEncoder().encodeToString(("${e}:${n}").getBytes()))`)}return a.push(3,".build();"),p.withWrapper&&(a.blank(),a.push(2,"var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());"),a.blank(),a.push(2,"System.out.println(response.body());"),a.push(1,"}"),a.push("}")),a.join()},w={key:"httpclient",title:"HttpClient",link:"https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.html",description:"HttpClient (Java SE 11 & JDK 11 )"};var R=C;function k(t,s){t.push("/**"),t.push(" * Requires JDK >= 11"),s.securityOAuth2ExtraCalls?.length&&(t.push(" *"),t.push(' * Requires package "org.json" >= 20201115'),t.push(" * See here for installation details:"),t.push(" * https://search.maven.org/artifact/org.json/json")),t.push(" */"),t.blank()}function c(t,s){t.push("import java.net.*;"),t.push("import java.net.http.*;"),t.push("import java.util.*;"),(l(s.postData?.mimeType)===i.URL_ENCODED&&s.postData?.params||s.securityOAuth2ExtraCalls?.length||r(s))&&(t.push("import java.nio.charset.StandardCharsets;"),t.push("import java.util.stream.Collectors;")),s.securityOAuth2ExtraCalls?.length&&t.push("import org.json.JSONObject;"),t.blank()}export{R as default,w as info};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const code_builder_1=require("../../helpers/code-builder"),__1=require("../.."),utils_1=require("../../../../utils"),code_helpers_1=require("../../helpers/code-helpers"),constants_1=require("../../helpers/constants"),constants_2=require("../../../../../constants"),hasQueryParams=e=>!(!e.uriObj.query||!Object.keys(e.uriObj.query).length),getBody=e=>e.postData&&e.postData.mimeType===constants_2.MediaTypes.URL_ENCODED?"HttpRequest.BodyPublishers.ofString(form)":e.postData?"HttpRequest.BodyPublishers.ofString(payload)":["POST","PUT","PATCH"].includes(e.method.toUpperCase())?'HttpRequest.BodyPublishers.ofString("some body text")':"",handler=function(e,t,{target:a,client:s}){var r,n,o;const p=Object.assign({indent:" ",withWrapper:!0},t),i=new code_builder_1.CodeBuilder({indentation:p.indent,variablesPrefix:p.variablesPrefix,capitalize:!0,lang:constants_1.Lang.JAVA});if(p.withComments&&addComments(i,e),p.withImports&&addImports(i,e),p.withWrapper&&(i.push("public class App {"),i.push(1,"public static void main(String[] args) throws Exception {"),i.push(2,"var httpClient = HttpClient.newBuilder().build();"),i.blank()),null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r.length){const t=new __1.HTTPSnippet(null===(n=e.securityOAuth2ExtraCalls)||void 0===n?void 0:n[0]).convert(a,s,Object.assign(Object.assign({},p),{withImports:!1,withWrapper:!1,withComments:!1,variablesPrefix:"oauth2"}));i.push(t),i.blank(),i.push(2,"var oauth2Response = httpClient.send(oauth2Request, HttpResponse.BodyHandlers.ofString());"),i.push(2,'var accessToken = new JSONObject(oauth2Response.body()).getString("access_token");'),i.blank()}if(e.postData)switch((0,utils_1.normalizeMimeType)(e.postData.mimeType)){case constants_2.MediaTypes.URL_ENCODED:e.postData.params&&(i.push(2,"HashMap<String, String> params = new HashMap<>();"),e.postData.params.forEach((e=>{i.push(2,'params.put("%s", "%s");',e.name,e.value)})),i.blank(),i.push(2,"var form = params.keySet().stream()"),i.push(3,'.map(key -> key + "=" + URLEncoder.encode(params.get(key), StandardCharsets.UTF_8))'),i.push(3,'.collect(Collectors.joining("&"));'),i.blank());break;case constants_2.MediaTypes.JSON:e.postData.jsonObj&&(i.push(2,`var payload = String.join("\\n"\n ${(0,code_helpers_1.addIndentation)(JSON.stringify(e.postData.jsonObj,null,1).replace(/"/g,'\\"').replace(/^/gm,', "').replace(/$/gm,'"'),{level:3,indent:p.indent,firstLine:!1})}`),i.push(2,");"),i.blank());break;case constants_2.MediaTypes.XML:e.postData.text&&(i.push(2,'var payload = String.join("\\n"'),e.postData.text.trim().split("\n").forEach((e=>{const t=e.replace(/"/g,'\\"');i.push(3,`"${t}", `)})),i.push(2,");"),i.blank());break;case constants_2.MediaTypes.MULTIPART:e.postData.params&&(i.push(2,"var multipartBody = MultipartBodyPublisher.newBuilder();"),e.postData.params&&e.postData.params.forEach((e=>{i.push(2,'multipartBody.append("%s", "%s");',e.name,e.value)})),i.push(2,"var body = multipartBody.build();"),i.blank())}if(hasQueryParams(e)){i.push(2,"HashMap<String, String> params = new HashMap<>();");for(const[t,a]of Object.entries(e.uriObj.query))i.push(2,'params.put("%s", "%s");',t,a);i.blank(),i.push(2,"var query = params.keySet().stream()"),i.push(3,'.map(key -> key + "=" + URLEncoder.encode(params.get(key), StandardCharsets.UTF_8))'),i.push(3,'.collect(Collectors.joining("&"));'),i.blank()}i.push(2,`var ${i.var("host")} = "%s";`,e.uriObj.protocol+"//"+e.uriObj.host),(0,code_helpers_1.printUrlVariablesDeclarations)(e,i,2);const l=Object.assign(Object.assign({},e),{pathname:e.uriObj.pathname});i.push(2,`var ${i.var("pathname")} = %s;`,(0,code_helpers_1.buildUrlExpression)(l,i)),i.push(2,`var ${i.var("request")} = HttpRequest.newBuilder()`),"PATCH"===e.method.toUpperCase()?i.push(3,'.method("PATCH", %s)',getBody(e)):i.push(3,".%s(%s)",e.method.toUpperCase(),getBody(e)),i.push(3,`.uri(URI.create(${i.var("host")} + ${i.var("pathname")} %s))`,hasQueryParams(e)?"+ '?' + query":""),(null===(o=e.securityOAuth2ExtraCalls)||void 0===o?void 0:o.length)&&(e.allHeaders.Authorization='"Bearer " + accessToken');const u=Object.keys(e.allHeaders);if(u.length&&u.forEach((t=>{var a;i.push(3,'.header("%s", %s)',t,"Authorization"===t&&(null===(a=e.securityOAuth2ExtraCalls)||void 0===a?void 0:a.length)?e.allHeaders[t]:`"${e.allHeaders[t]}"`)})),e.basicAuth){const{username:t,password:a}=e.basicAuth;i.push(3,`.header("Authorization", "Basic " + Base64.getEncoder().encodeToString(("${t}:${a}").getBytes()))`)}return i.push(3,".build();"),p.withWrapper&&(i.blank(),i.push(2,"var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());"),i.blank(),i.push(2,"System.out.println(response.body());"),i.push(1,"}"),i.push("}")),i.join()};function addComments(e,t){var a;e.push("/**"),e.push(" * Requires JDK >= 11"),(null===(a=t.securityOAuth2ExtraCalls)||void 0===a?void 0:a.length)&&(e.push(" *"),e.push(' * Requires package "org.json" >= 20201115'),e.push(" * See here for installation details:"),e.push(" * https://search.maven.org/artifact/org.json/json")),e.push(" */"),e.blank()}function addImports(e,t){var a,s,r,n;e.push("import java.net.*;"),e.push("import java.net.http.*;"),e.push("import java.util.*;"),((0,utils_1.normalizeMimeType)(null===(a=t.postData)||void 0===a?void 0:a.mimeType)===constants_2.MediaTypes.URL_ENCODED&&(null===(s=t.postData)||void 0===s?void 0:s.params)||(null===(r=t.securityOAuth2ExtraCalls)||void 0===r?void 0:r.length)||hasQueryParams(t))&&(e.push("import java.nio.charset.StandardCharsets;"),e.push("import java.util.stream.Collectors;")),(null===(n=t.securityOAuth2ExtraCalls)||void 0===n?void 0:n.length)&&e.push("import org.json.JSONObject;"),e.blank()}exports.info={key:"httpclient",title:"HttpClient",link:"https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.html",description:"HttpClient (Java SE 11 & JDK 11 )"},exports.default=handler;
2
+ //# sourceMappingURL=httpclient.js.map
@@ -5,6 +5,6 @@ declare const _default: {
5
5
  extname: string;
6
6
  default: string;
7
7
  };
8
- httpclient: import("../../index.js").LanguageHandler<import("../../../types.js").BasicLanguageOptions | undefined>;
8
+ httpclient: import("../..").LanguageHandler<import("../../..").BasicLanguageOptions | undefined>;
9
9
  };
10
10
  export default _default;
@@ -1 +1,2 @@
1
- import t from"./httpclient.js";var e={info:{key:"java",title:"Java",extname:".java",default:"httpclient"},httpclient:t};export{e as default};
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const httpclient_1=__importDefault(require("./httpclient"));exports.default={info:{key:"java",title:"Java",extname:".java",default:"httpclient"},httpclient:httpclient_1.default};
2
+ //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import type { Java8CodeSampleConfig } from '../../../types.js';
2
- import type { LanguageHandler } from '../../index.js';
1
+ import type { Java8CodeSampleConfig } from '../../../types';
2
+ import type { LanguageHandler } from '../..';
3
3
  declare const handler: LanguageHandler<Java8CodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,2 +1,2 @@
1
- import{CodeBuilder as j}from"../../helpers/code-builder.js";import{HTTPSnippet as d}from"../../index.js";import{isEmptyObject as y,normalizeMimeType as w}from"../../../../utils.js";import{capitalizeFirst as A}from"../../../generator.js";import{Lang as C}from"../../helpers/constants.js";import{buildUrlExpression as v,printUrlVariablesDeclarations as k}from"../../helpers/code-helpers.js";import{MediaTypes as n}from"../../../../../constants.js";const N=function(t,i,{target:h,client:E}){const p=Object.assign({indent:" ",withWrapper:!0},i),e=new j({indentation:p.indent,variablesPrefix:p.variablesPrefix,capitalize:!0,lang:C.JAVA8}),c=b(t.method);if(p.withComments&&x(e),p.withImports&&q(e,t),p.withWrapper&&(e.push("public class App {"),e.push(1,"public static void main(String[] args ) throws java.io.IOException {"),e.push(2,"HttpClient httpClient = HttpClientBuilder.create().build();"),e.blank()),t.securityOAuth2ExtraCalls?.length){const a=new d(t.securityOAuth2ExtraCalls?.[0]).convert(h,E,{...p,withImports:!1,withWrapper:!1,withComments:!1,variablesPrefix:"oauth2"});e.push(a),e.push(2,"JSONObject %s = new JSONObject(EntityUtils.toString(httpClient.execute(%s).getEntity()));","oauth2Response","oauth2Request"),e.push(2,'String accessToken = %s.getString("access_token");',"oauth2Response"),e.blank()}k(t,e,2);const S=v(t,e);e.push(2,`%s ${e.var("request")} = new %s(%s);`,c,c,S);const f=Object.keys(t.allHeaders);if(f.length&&!(t.postData&&t.postData.mimeType==n.MULTIPART)&&f.forEach(a=>{e.push(2,'%s.setHeader("%s", %s);',e.var("request"),a,t.securityOAuth2ExtraCalls?.length?'"Bearer " + accessToken':`"${t.allHeaders[a]}"`)}),t.basicAuth){const{username:a,password:s}=t.basicAuth;e.push(2,`String encodedString = Base64.getEncoder().encodeToString("${a}:${s}".getBytes());`),e.push(2,'%s.setHeader("%s", "%s"+encodedString);',e.var("request"),"Authorization","Basic ")}if(t.postData)switch(w(t.postData.mimeType)){case n.URL_ENCODED:t.postData.params&&(e.blank(),e.push(2,"List<NameValuePair> params = new ArrayList<NameValuePair>();"),t.postData.params.forEach(a=>{e.push(2,'params.add(new BasicNameValuePair("%s", "%s"));',a.name,a.value)}),e.push(2,"%s.setEntity(new UrlEncodedFormEntity(params));",e.var("request")),e.blank());break;case n.MULTIPART:t.postData.params&&(e.push(2,"MultipartEntity reqEntity = new MultipartEntity();"),t.postData.params.forEach(a=>{e.push(2,'reqEntity.addPart("%s", %s);',a.name,O(a.value)?`new StringBody("${a.value}")`:a.value)}),e.push(2,"%s.setEntity(reqEntity);",e.var("request")));break;case n.JSON:if(t.postData.jsonObj){e.push(2,"JSONObject payload = new JSONObject();");for(const[a,s]of Object.entries(t.postData.jsonObj))Array.isArray(s)?(e.push(2,'payload.put("%s", new JSONArray()',a),s.forEach(r=>{l(r)?(e.push(3,".put(new JSONObject()"),o(r,4),e.push(3,")")):e.push(3,".put(%s)",m(r))}),e.push(2,");")):l(s)?(e.push(2,'payload.put("%s", new JSONObject()%s',a,y(s)?");":""),o(s,3),y(s)||e.push(2,");")):e.push(2,'payload.put("%s", %s);',a,m(s));e.push(2,"%s.setEntity(new StringEntity(payload.toString()));",e.var("request"))}break;case n.XML:t.postData.text&&(e.push(2,'String payload = String.join("\\n"'),t.postData.text.trim().split(`
2
- `).forEach(a=>{const s=a.replace(/"/g,'\\"');e.push(3,`"${s}", `)}),e.push(2,");"),e.push(2,"%s.setEntity(new StringEntity(payload));",e.var("request")));break}return p.withWrapper&&(e.push(2,`String ${e.var("response")} = EntityUtils.toString(httpClient.execute(request).getEntity());`),e.blank(),e.push(2,"System.out.println(response);"),e.push(1,"}"),e.push("}")),e.join();function o(a,s){for(const[r,u]of Object.entries(a))l(u)?(e.push(s,'.put("%s", new JSONObject()',r),o(u,s+1),e.push(s,")")):e.push(s,'.put("%s", %s)',r,m(u))}},U={key:"apachehttp",title:"Apache http",link:"https://hc.apache.org/httpcomponents-client-4.5.x/",description:"Apache HttpClient"};var R=N;function x(t){t.push("/**"),t.push(" * Requires JDK >= 8"),t.push(" *"),t.push(" * Requires Apache HttpComponents Client >= 4.3.5"),t.push(" * See here for installation details:"),t.push(" * https://search.maven.org/artifact/org.apache.httpcomponents/httpcomponents-client"),t.push(" *"),t.push(' * Requires package "junit4"'),t.push(" * See here for installation details:"),t.push(" * https://junit.org/junit4"),t.push(" *"),t.push(' * Requires package "org.json" >= 20180130'),t.push(" * See here for installation details:"),t.push(" * https://search.maven.org/artifact/org.json/json"),t.push(" */"),t.blank()}function q(t,i){t.push("import org.apache.http.util.EntityUtils;"),t.push("import org.apache.http.NameValuePair;"),t.push("import org.apache.http.client.HttpClient;"),t.push("import org.apache.http.client.entity.UrlEncodedFormEntity;"),i.method&&g(t,i.method),i.securityOAuth2ExtraCalls?.length&&i.securityOAuth2ExtraCalls?.[0].method.toLowerCase()!==i.method.toLowerCase()&&g(t,i.securityOAuth2ExtraCalls?.[0].method),t.push("import org.apache.http.impl.client.HttpClientBuilder;"),t.push("import org.apache.http.message.BasicNameValuePair;"),t.push("import org.apache.http.entity.StringEntity;"),t.push("import org.json.JSONObject;"),t.push("import org.json.JSONArray;"),t.push("import java.util.ArrayList;"),t.push("import java.util.List;"),t.push("import org.apache.http.entity.mime.MultipartEntity;"),t.push("import org.apache.http.entity.mime.content.StringBody;"),i.basicAuth&&t.push("import java.util.Base64;"),t.blank()}function g(t,i){const h=b(i);t.push(`import org.apache.http.client.methods.${h};`)}function b(t){return"Http"+A(t.toLowerCase())}function O(t){return Object.prototype.toString.call(t)==="[object String]"}function l(t){const i=typeof t;return i==="function"||i==="object"&&!!t}function m(t){return O(t)?JSON.stringify(t):t??"JSONObject.NULL"}export{R as default,U as info};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const code_builder_1=require("../../helpers/code-builder"),index_1=require("../../index"),utils_1=require("../../../../utils"),generator_1=require("../../../generator"),constants_1=require("../../helpers/constants"),code_helpers_1=require("../../helpers/code-helpers"),constants_2=require("../../../../../constants"),handler=function(t,e,{target:s,client:a}){var r,i;const n=Object.assign({indent:" ",withWrapper:!0},e),p=new code_builder_1.CodeBuilder({indentation:n.indent,variablesPrefix:n.variablesPrefix,capitalize:!0,lang:constants_1.Lang.JAVA8}),o=formatHttpMethod(t.method);if(n.withComments&&addComments(p),n.withImports&&addImports(p,t),n.withWrapper&&(p.push("public class App {"),p.push(1,"public static void main(String[] args ) throws java.io.IOException {"),p.push(2,"HttpClient httpClient = HttpClientBuilder.create().build();"),p.blank()),null===(r=t.securityOAuth2ExtraCalls)||void 0===r?void 0:r.length){const e=new index_1.HTTPSnippet(null===(i=t.securityOAuth2ExtraCalls)||void 0===i?void 0:i[0]).convert(s,a,Object.assign(Object.assign({},n),{withImports:!1,withWrapper:!1,withComments:!1,variablesPrefix:"oauth2"}));p.push(e),p.push(2,"JSONObject %s = new JSONObject(EntityUtils.toString(httpClient.execute(%s).getEntity()));","oauth2Response","oauth2Request"),p.push(2,'String accessToken = %s.getString("access_token");',"oauth2Response"),p.blank()}(0,code_helpers_1.printUrlVariablesDeclarations)(t,p,2);const u=(0,code_helpers_1.buildUrlExpression)(t,p);p.push(2,`%s ${p.var("request")} = new %s(%s);`,o,o,u);const h=Object.keys(t.allHeaders);if(!h.length||t.postData&&t.postData.mimeType==constants_2.MediaTypes.MULTIPART||h.forEach((e=>{var s;p.push(2,'%s.setHeader("%s", %s);',p.var("request"),e,(null===(s=t.securityOAuth2ExtraCalls)||void 0===s?void 0:s.length)?'"Bearer " + accessToken':`"${t.allHeaders[e]}"`)})),t.basicAuth){const{username:e,password:s}=t.basicAuth;p.push(2,`String encodedString = Base64.getEncoder().encodeToString("${e}:${s}".getBytes());`),p.push(2,'%s.setHeader("%s", "%s"+encodedString);',p.var("request"),"Authorization","Basic ")}if(t.postData)switch((0,utils_1.normalizeMimeType)(t.postData.mimeType)){case constants_2.MediaTypes.URL_ENCODED:t.postData.params&&(p.blank(),p.push(2,"List<NameValuePair> params = new ArrayList<NameValuePair>();"),t.postData.params.forEach((t=>{p.push(2,'params.add(new BasicNameValuePair("%s", "%s"));',t.name,t.value)})),p.push(2,"%s.setEntity(new UrlEncodedFormEntity(params));",p.var("request")),p.blank());break;case constants_2.MediaTypes.MULTIPART:t.postData.params&&(p.push(2,"MultipartEntity reqEntity = new MultipartEntity();"),t.postData.params.forEach((t=>{p.push(2,'reqEntity.addPart("%s", %s);',t.name,isString(t.value)?`new StringBody("${t.value}")`:t.value)})),p.push(2,"%s.setEntity(reqEntity);",p.var("request")));break;case constants_2.MediaTypes.JSON:if(t.postData.jsonObj){p.push(2,"JSONObject payload = new JSONObject();");for(const[e,s]of Object.entries(t.postData.jsonObj))Array.isArray(s)?(p.push(2,'payload.put("%s", new JSONArray()',e),s.forEach((t=>{isObject(t)?(p.push(3,".put(new JSONObject()"),c(t,4),p.push(3,")")):p.push(3,".put(%s)",formatValue(t))})),p.push(2,");")):isObject(s)?(p.push(2,'payload.put("%s", new JSONObject()%s',e,(0,utils_1.isEmptyObject)(s)?");":""),c(s,3),(0,utils_1.isEmptyObject)(s)||p.push(2,");")):p.push(2,'payload.put("%s", %s);',e,formatValue(s));p.push(2,"%s.setEntity(new StringEntity(payload.toString()));",p.var("request"))}break;case constants_2.MediaTypes.XML:t.postData.text&&(p.push(2,'String payload = String.join("\\n"'),t.postData.text.trim().split("\n").forEach((t=>{const e=t.replace(/"/g,'\\"');p.push(3,`"${e}", `)})),p.push(2,");"),p.push(2,"%s.setEntity(new StringEntity(payload));",p.var("request")))}return n.withWrapper&&(p.push(2,`String ${p.var("response")} = EntityUtils.toString(httpClient.execute(request).getEntity());`),p.blank(),p.push(2,"System.out.println(response);"),p.push(1,"}"),p.push("}")),p.join();function c(t,e){for(const[s,a]of Object.entries(t))isObject(a)?(p.push(e,'.put("%s", new JSONObject()',s),c(a,e+1),p.push(e,")")):p.push(e,'.put("%s", %s)',s,formatValue(a))}};function addComments(t){t.push("/**"),t.push(" * Requires JDK >= 8"),t.push(" *"),t.push(" * Requires Apache HttpComponents Client >= 4.3.5"),t.push(" * See here for installation details:"),t.push(" * https://search.maven.org/artifact/org.apache.httpcomponents/httpcomponents-client"),t.push(" *"),t.push(' * Requires package "junit4"'),t.push(" * See here for installation details:"),t.push(" * https://junit.org/junit4"),t.push(" *"),t.push(' * Requires package "org.json" >= 20180130'),t.push(" * See here for installation details:"),t.push(" * https://search.maven.org/artifact/org.json/json"),t.push(" */"),t.blank()}function addImports(t,e){var s,a,r;t.push("import org.apache.http.util.EntityUtils;"),t.push("import org.apache.http.NameValuePair;"),t.push("import org.apache.http.client.HttpClient;"),t.push("import org.apache.http.client.entity.UrlEncodedFormEntity;"),e.method&&addHttpMethodImport(t,e.method),(null===(s=e.securityOAuth2ExtraCalls)||void 0===s?void 0:s.length)&&(null===(a=e.securityOAuth2ExtraCalls)||void 0===a?void 0:a[0].method.toLowerCase())!==e.method.toLowerCase()&&addHttpMethodImport(t,null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r[0].method),t.push("import org.apache.http.impl.client.HttpClientBuilder;"),t.push("import org.apache.http.message.BasicNameValuePair;"),t.push("import org.apache.http.entity.StringEntity;"),t.push("import org.json.JSONObject;"),t.push("import org.json.JSONArray;"),t.push("import java.util.ArrayList;"),t.push("import java.util.List;"),t.push("import org.apache.http.entity.mime.MultipartEntity;"),t.push("import org.apache.http.entity.mime.content.StringBody;"),e.basicAuth&&t.push("import java.util.Base64;"),t.blank()}function addHttpMethodImport(t,e){const s=formatHttpMethod(e);t.push(`import org.apache.http.client.methods.${s};`)}function formatHttpMethod(t){return"Http"+(0,generator_1.capitalizeFirst)(t.toLowerCase())}function isString(t){return"[object String]"===Object.prototype.toString.call(t)}function isObject(t){const e=typeof t;return"function"===e||"object"===e&&!!t}function formatValue(t){return isString(t)?JSON.stringify(t):null==t?"JSONObject.NULL":t}exports.info={key:"apachehttp",title:"Apache http",link:"https://hc.apache.org/httpcomponents-client-4.5.x/",description:"Apache HttpClient"},exports.default=handler;
2
+ //# sourceMappingURL=apachehttp.js.map
@@ -5,6 +5,6 @@ declare const _default: {
5
5
  extname: string;
6
6
  default: string;
7
7
  };
8
- apachehttp: import("../../index.js").LanguageHandler<import("../../../types.js").BasicLanguageOptions | undefined>;
8
+ apachehttp: import("../..").LanguageHandler<import("../../..").BasicLanguageOptions | undefined>;
9
9
  };
10
10
  export default _default;
@@ -1 +1,2 @@
1
- import a from"./apachehttp.js";var e={info:{key:"java8",title:"Java8+Apache",extname:".java",default:"apachehttp"},apachehttp:a};export{e as default};
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const apachehttp_1=__importDefault(require("./apachehttp"));exports.default={info:{key:"java8",title:"Java8+Apache",extname:".java",default:"apachehttp"},apachehttp:apachehttp_1.default};
2
+ //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import type { LanguageHandler } from '../../index.js';
2
- import type { JavaScriptCodeSampleConfig } from '../../../types.js';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { JavaScriptCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<JavaScriptCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1 +1,2 @@
1
- import r from"stringify-object";import{CodeBuilder as v}from"../../helpers/code-builder.js";import{addIndentation as o,getPreserveTransformer as y,buildUrlExpression as O,printUrlVariablesDeclarations as $}from"../../helpers/code-helpers.js";import{normalizeMimeType as p}from"../../../../utils.js";import{HTTPSnippet as g}from"../../index.js";import{Lang as D}from"../../helpers/constants.js";import{MediaTypes as i}from"../../../../../constants.js";const A=function(e,f,{target:m,client:c}){const n={indent:" ",credentials:null,...f},t=new v({indentation:n.indent,variablesPrefix:n.variablesPrefix,capitalize:!0,lang:D.JAVASCRIPT}),a={method:e.method.toUpperCase()};Object.keys(e.headersObj).length&&(a.headers=e.headersObj);let l=!1;if(n.withComments&&j(t),e.securityOAuth2ExtraCalls?.length){const s=new g(e.securityOAuth2ExtraCalls?.[0]).convert(m,c,{...n,withImports:!1,withComments:!1,variablesPrefix:"oAuth2"});t.push(s),t.blank(),a.headers=a.headers||{},a.headers.Authorization="'Bearer ' + oAuth2Data.access_token",l=!0}n.credentials!==null&&(a.credentials=n.credentials);const h=Object.getOwnPropertyNames(e.queryObj).length;if(h&&t.push(`const ${t.var("query")} = new URLSearchParams(${r(e.queryObj,{indent:n.indent,inlineCharacterLimit:25})}).toString();`).blank(),e.postData)switch(p(e.postData.mimeType)){case i.URL_ENCODED:a.body=e.postData.paramsObj?`new URLSearchParams(${t.var("formData")}).toString()`:e.postData.text,e.postData.paramsObj&&t.push(`const ${t.var("formData")} = ${o(r(e.postData.paramsObj,{indent:n.indent,inlineCharacterLimit:25}),{level:0,firstLine:!1})};`).blank();break;case i.JSON:e.postData.jsonObj&&(a.body=`JSON.stringify(${o(r(e.postData.jsonObj,{indent:n.indent,inlineCharacterLimit:25}),{level:1,firstLine:!1})})`);break;case i.MULTIPART:t.push(`const ${t.var("form")} = new FormData();`),delete a?.headers?.["Content-Type"],e.postData.params.forEach(function(s){t.push(`${t.var("form")}.append(%s, %s);`,JSON.stringify(s.name),JSON.stringify(s.value||s.fileName||""))}),a.body=t.var("form"),t.blank();break;default:e.postData.text&&(a.body=`\`${o(e.postData.text,{level:2,indent:n.indent,firstLine:!1}).trim()}\``)}const d=a.headers&&a.headers.Accept&&p(a.headers.Accept)===i.JSON||p(e.postData?.mimeType)===i.JSON;if(e.basicAuth){const{username:s,password:b}=e.basicAuth;a.headers=a.headers||{},a.headers.Authorization=`'Basic ' + btoa('${s}:${b}')`,l=!0}$(e,t);const u=O(e,t);return t.push(`const ${t.var("resp")} = await fetch(`).push(1,"`"+u+(h?"?${"+t.var("query")+"}":"")+"`,").push(o(r(a,{indent:n.indent,inlineCharacterLimit:25,transform:y({body:!0,authorizationHeader:l})}),{level:1,indent:n.indent})).push(");").blank(),e.allResponseCodes?.includes("204")?(t.push("if (resp.status === 204) {").push(1,"console.log('success');").push("} else {"),t.push(1,`const ${t.var("data")} = await ${t.var("resp")}.${d?"json()":"text()"};`).push(1,`console.log(${t.var("data")});`).push("}")):t.push(`const ${t.var("data")} = await ${t.var("resp")}.${d?"json()":"text()"};`).push(`console.log(${t.var("data")});`),t.join()};function j(e){e.push("/**"),e.push(" * Requires ES8-compatible browser: https://caniuse.com/async-functions"),e.push(" */"),e.blank()}const T={key:"fetch",title:"fetch",link:"https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch",description:"Perform asynchronous HTTP requests with the Fetch API"};var N=A;export{N as default,T as info};
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const stringify_object_1=__importDefault(require("stringify-object")),code_builder_1=require("../../helpers/code-builder"),code_helpers_1=require("../../helpers/code-helpers"),utils_1=require("../../../../utils"),__1=require("../.."),constants_1=require("../../helpers/constants"),constants_2=require("../../../../../constants"),handler=function(e,t,{target:s,client:a}){var n,r,i,o,l;const d=Object.assign({indent:" ",credentials:null},t),c=new code_builder_1.CodeBuilder({indentation:d.indent,variablesPrefix:d.variablesPrefix,capitalize:!0,lang:constants_1.Lang.JAVASCRIPT}),p={method:e.method.toUpperCase()};Object.keys(e.headersObj).length&&(p.headers=e.headersObj);let u=!1;if(d.withComments&&addComments(c),null===(n=e.securityOAuth2ExtraCalls)||void 0===n?void 0:n.length){const t=new __1.HTTPSnippet(null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r[0]).convert(s,a,Object.assign(Object.assign({},d),{withImports:!1,withComments:!1,variablesPrefix:"oAuth2"}));c.push(t),c.blank(),p.headers=p.headers||{},p.headers.Authorization="'Bearer ' + oAuth2Data.access_token",u=!0}null!==d.credentials&&(p.credentials=d.credentials);const h=Object.getOwnPropertyNames(e.queryObj).length;if(h&&c.push(`const ${c.var("query")} = new URLSearchParams(${(0,stringify_object_1.default)(e.queryObj,{indent:d.indent,inlineCharacterLimit:25})}).toString();`).blank(),e.postData)switch((0,utils_1.normalizeMimeType)(e.postData.mimeType)){case constants_2.MediaTypes.URL_ENCODED:p.body=e.postData.paramsObj?`new URLSearchParams(${c.var("formData")}).toString()`:e.postData.text,e.postData.paramsObj&&c.push(`const ${c.var("formData")} = ${(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(e.postData.paramsObj,{indent:d.indent,inlineCharacterLimit:25}),{level:0,firstLine:!1})};`).blank();break;case constants_2.MediaTypes.JSON:e.postData.jsonObj&&(p.body=`JSON.stringify(${(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(e.postData.jsonObj,{indent:d.indent,inlineCharacterLimit:25}),{level:1,firstLine:!1})})`);break;case constants_2.MediaTypes.MULTIPART:c.push(`const ${c.var("form")} = new FormData();`),null===(i=null==p?void 0:p.headers)||void 0===i||delete i["Content-Type"],e.postData.params.forEach((function(e){c.push(`${c.var("form")}.append(%s, %s);`,JSON.stringify(e.name),JSON.stringify(e.value||e.fileName||""))})),p.body=c.var("form"),c.blank();break;default:e.postData.text&&(p.body=`\`${(0,code_helpers_1.addIndentation)(e.postData.text,{level:2,indent:d.indent,firstLine:!1}).trim()}\``)}const _=p.headers&&p.headers.Accept&&(0,utils_1.normalizeMimeType)(p.headers.Accept)===constants_2.MediaTypes.JSON||(0,utils_1.normalizeMimeType)(null===(o=e.postData)||void 0===o?void 0:o.mimeType)===constants_2.MediaTypes.JSON;if(e.basicAuth){const{username:t,password:s}=e.basicAuth;p.headers=p.headers||{},p.headers.Authorization=`'Basic ' + btoa('${t}:${s}')`,u=!0}(0,code_helpers_1.printUrlVariablesDeclarations)(e,c);const m=(0,code_helpers_1.buildUrlExpression)(e,c);return c.push(`const ${c.var("resp")} = await fetch(`).push(1,"`"+m+(h?"?${"+c.var("query")+"}":"")+"`,").push((0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(p,{indent:d.indent,inlineCharacterLimit:25,transform:(0,code_helpers_1.getPreserveTransformer)({body:!0,authorizationHeader:u})}),{level:1,indent:d.indent})).push(");").blank(),(null===(l=e.allResponseCodes)||void 0===l?void 0:l.includes("204"))?(c.push("if (resp.status === 204) {").push(1,"console.log('success');").push("} else {"),c.push(1,`const ${c.var("data")} = await ${c.var("resp")}.${_?"json()":"text()"};`).push(1,`console.log(${c.var("data")});`).push("}")):c.push(`const ${c.var("data")} = await ${c.var("resp")}.${_?"json()":"text()"};`).push(`console.log(${c.var("data")});`),c.join()};function addComments(e){e.push("/**"),e.push(" * Requires ES8-compatible browser: https://caniuse.com/async-functions"),e.push(" */"),e.blank()}exports.info={key:"fetch",title:"fetch",link:"https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch",description:"Perform asynchronous HTTP requests with the Fetch API"},exports.default=handler;
2
+ //# sourceMappingURL=fetch.js.map
@@ -5,7 +5,7 @@ declare const _default: {
5
5
  extname: string;
6
6
  default: string;
7
7
  };
8
- fetch: import("../../index.js").LanguageHandler<(import("../../../types.js").BasicLanguageOptions & {
8
+ fetch: import("../..").LanguageHandler<(import("../../..").BasicLanguageOptions & {
9
9
  credentials?: "omit" | "same-origin" | "include";
10
10
  }) | undefined>;
11
11
  };
@@ -1 +1,2 @@
1
- import t from"./fetch.js";var a={info:{key:"javascript",title:"JavaScript",extname:".js",default:"fetch"},fetch:t};export{a as default};
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const fetch_1=__importDefault(require("./fetch"));exports.default={info:{key:"javascript",title:"JavaScript",extname:".js",default:"fetch"},fetch:fetch_1.default};
2
+ //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import type { LanguageHandler } from '../../index.js';
2
- import type { NodeJsCodeSampleConfig } from '../../../types.js';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { NodeJsCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<NodeJsCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1 +1,2 @@
1
- import h from"stringify-object";import{CodeBuilder as w}from"../../helpers/code-builder.js";import{addIndentation as r,getPreserveTransformer as y,buildUrlExpression as $,printUrlVariablesDeclarations as k}from"../../helpers/code-helpers.js";import{Lang as D}from"../../helpers/constants.js";import{normalizeMimeType as f}from"../../../../utils.js";import{HTTPSnippet as g}from"../../index.js";import{MediaTypes as o}from"../../../../../constants.js";const j=function(t,c,{target:b,client:v}){const n=Object.assign({indent:" ",showBoilerplate:!0,level:1},c),{level:a}=n;let m=!1;const e=new w({indentation:n.indent,variablesPrefix:n.variablesPrefix,capitalize:!0,lang:D.NODEJS});n.withComments&&S(e),n.withImports&&(e.push("import fetch from 'node-fetch';"),e.blank()),n.showBoilerplate&&e.push("async function run() {");const i={method:t.method.toUpperCase()};Object.keys(t.headersObj).length&&(i.headers=t.headersObj);let l=!1;if(t.securityOAuth2ExtraCalls?.length){const s=new g(t.securityOAuth2ExtraCalls?.[0]).convert(b,v,{...n,withImports:!1,withComments:!1,variablesPrefix:"oAuth2",showBoilerplate:!1,level:1});e.push(s),e.blank(),i.headers=i.headers||{},i.headers.Authorization="'Bearer ' + oAuth2Data.access_token",l=!0}const d=Object.getOwnPropertyNames(t.queryObj).length;if(d&&e.push(a,`const ${e.var("query")} = new URLSearchParams(${r(h(t.queryObj,{indent:n.indent,inlineCharacterLimit:25}),{level:a,indent:n.indent,firstLine:!1})}).toString();`).blank(),t.postData)switch(f(t.postData.mimeType)){case o.URL_ENCODED:i.body=t.postData.paramsObj?`new URLSearchParams(${e.var("formData")}).toString()`:t.postData.text,t.postData.paramsObj&&e.push(a,`const ${e.var("formData")} = ${r(h(t.postData.paramsObj,{indent:n.indent,inlineCharacterLimit:25}),{level:a,firstLine:!1})};`).blank();break;case o.JSON:t.postData.jsonObj&&(i.body=`JSON.stringify(${r(h(t.postData.jsonObj,{indent:n.indent,inlineCharacterLimit:25}),{level:a,firstLine:!1})})`);break;case o.MULTIPART:delete i?.headers?.["Content-Type"],n.withImports&&e.unshift("import FormData from 'form-data';"),e.push(a,`const ${e.var("form")} = new FormData();`),t.postData.params.forEach(function(s){if(!s.fileName&&!s.fileName&&!s.contentType){e.push(a,"form.append('"+s.name+"','"+s.value+"');");return}s.fileName&&(m=!0,e.blank(),e.push(a,`${e.var("form")}.append('" + param.name + "', fs.createReadStream('" + param.fileName + "'));`))}),i.body=e.var("form"),e.blank();break;default:t.postData.text&&(i.body=`\`${r(t.postData.text,{level:a+1,indent:n.indent,firstLine:!1}).trim()}\``)}if(t.cookies.length){let s="";t.cookies.forEach(function(p){s=s+encodeURIComponent(p.name)+"="+encodeURIComponent(p.value)+"; "}),s=s.trim(),i.headers||(i.headers={}),i.headers.cookie=s}if(t.basicAuth){const{username:s,password:p}=t.basicAuth;i.headers=i.headers||{},i.headers.Authorization=`'Basic ' + Buffer.from('${s}:${p}').toString('base64')`,l=!0}m&&n.withImports&&e.unshift("import fs from 'fs';");const u=i.headers&&i.headers.Accept&&f(i.headers.Accept)===o.JSON||f(t.postData?.mimeType)===o.JSON;k(t,e,a);const O=$(t,e);return e.push(a,`const ${e.var("resp")} = await fetch(`).push(a+1,"`"+O+(d?"?${"+e.var("query")+"}":"")+"`,").push(a+1,r(h(i,{indent:n.indent,inlineCharacterLimit:25,transform:y({body:!0,authorizationHeader:l})}),{level:a+1,indent:n.indent,firstLine:!1})).push(a,");").blank(),t.allResponseCodes?.includes("204")?(e.push(a,"if (resp.status === 204) {").push(a+1,"console.log('success');").push(a,"} else {"),e.push(a+1,`const ${e.var("data")} = await ${e.var("resp")}.${u?"json()":"text()"};`).push(a+1,`console.log(${e.var("data")});`).push(a,"}")):e.push(a,`const ${e.var("data")} = await ${e.var("resp")}.${u?"json()":"text()"};`).push(a,`console.log(${e.var("data")});`),n.showBoilerplate&&e.push("}").blank().push("run();"),e.join().replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/,'fs.createReadStream("$1")')};function S(t){t.push("/**"),t.push(" * Requires Node.js >= 14"),t.push(" *"),t.push(' * Requires module "node-fetch" >= 2.6.1'),t.push(" * See here for installation details:"),t.push(" * https://www.npmjs.com/package/node-fetch"),t.push(" */"),t.blank()}const P={key:"fetch",title:"Fetch",link:"https://github.com/bitinn/node-fetch",description:"Simplified HTTP node-fetch client"};var U=j;export{U as default,P as info};
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const stringify_object_1=__importDefault(require("stringify-object")),code_builder_1=require("../../helpers/code-builder"),code_helpers_1=require("../../helpers/code-helpers"),constants_1=require("../../helpers/constants"),utils_1=require("../../../../utils"),__1=require("../.."),constants_2=require("../../../../../constants"),handler=function(e,t,{target:a,client:s}){var n,r,i,o,l;const d=Object.assign({indent:" ",showBoilerplate:!0,level:1},t),{level:p}=d;let c=!1;const h=new code_builder_1.CodeBuilder({indentation:d.indent,variablesPrefix:d.variablesPrefix,capitalize:!0,lang:constants_1.Lang.NODEJS});d.withComments&&addComments(h),d.withImports&&(h.push("import fetch from 'node-fetch';"),h.blank()),d.showBoilerplate&&h.push("async function run() {");const u={method:e.method.toUpperCase()};Object.keys(e.headersObj).length&&(u.headers=e.headersObj);let m=!1;if(null===(n=e.securityOAuth2ExtraCalls)||void 0===n?void 0:n.length){const t=new __1.HTTPSnippet(null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r[0]).convert(a,s,Object.assign(Object.assign({},d),{withImports:!1,withComments:!1,variablesPrefix:"oAuth2",showBoilerplate:!1,level:1}));h.push(t),h.blank(),u.headers=u.headers||{},u.headers.Authorization="'Bearer ' + oAuth2Data.access_token",m=!0}const f=Object.getOwnPropertyNames(e.queryObj).length;if(f&&h.push(p,`const ${h.var("query")} = new URLSearchParams(${(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(e.queryObj,{indent:d.indent,inlineCharacterLimit:25}),{level:p,indent:d.indent,firstLine:!1})}).toString();`).blank(),e.postData)switch((0,utils_1.normalizeMimeType)(e.postData.mimeType)){case constants_2.MediaTypes.URL_ENCODED:u.body=e.postData.paramsObj?`new URLSearchParams(${h.var("formData")}).toString()`:e.postData.text,e.postData.paramsObj&&h.push(p,`const ${h.var("formData")} = ${(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(e.postData.paramsObj,{indent:d.indent,inlineCharacterLimit:25}),{level:p,firstLine:!1})};`).blank();break;case constants_2.MediaTypes.JSON:e.postData.jsonObj&&(u.body=`JSON.stringify(${(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(e.postData.jsonObj,{indent:d.indent,inlineCharacterLimit:25}),{level:p,firstLine:!1})})`);break;case constants_2.MediaTypes.MULTIPART:null===(i=null==u?void 0:u.headers)||void 0===i||delete i["Content-Type"],d.withImports&&h.unshift("import FormData from 'form-data';"),h.push(p,`const ${h.var("form")} = new FormData();`),e.postData.params.forEach((function(e){e.fileName||e.fileName||e.contentType?e.fileName&&(c=!0,h.blank(),h.push(p,`${h.var("form")}.append('" + param.name + "', fs.createReadStream('" + param.fileName + "'));`)):h.push(p,"form.append('"+e.name+"','"+e.value+"');")})),u.body=h.var("form"),h.blank();break;default:e.postData.text&&(u.body=`\`${(0,code_helpers_1.addIndentation)(e.postData.text,{level:p+1,indent:d.indent,firstLine:!1}).trim()}\``)}if(e.cookies.length){let t="";e.cookies.forEach((function(e){t=t+encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)+"; "})),t=t.trim(),u.headers||(u.headers={}),u.headers.cookie=t}if(e.basicAuth){const{username:t,password:a}=e.basicAuth;u.headers=u.headers||{},u.headers.Authorization=`'Basic ' + Buffer.from('${t}:${a}').toString('base64')`,m=!0}c&&d.withImports&&h.unshift("import fs from 'fs';");const _=u.headers&&u.headers.Accept&&(0,utils_1.normalizeMimeType)(u.headers.Accept)===constants_2.MediaTypes.JSON||(0,utils_1.normalizeMimeType)(null===(o=e.postData)||void 0===o?void 0:o.mimeType)===constants_2.MediaTypes.JSON;(0,code_helpers_1.printUrlVariablesDeclarations)(e,h,p);const b=(0,code_helpers_1.buildUrlExpression)(e,h);return h.push(p,`const ${h.var("resp")} = await fetch(`).push(p+1,"`"+b+(f?"?${"+h.var("query")+"}":"")+"`,").push(p+1,(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(u,{indent:d.indent,inlineCharacterLimit:25,transform:(0,code_helpers_1.getPreserveTransformer)({body:!0,authorizationHeader:m})}),{level:p+1,indent:d.indent,firstLine:!1})).push(p,");").blank(),(null===(l=e.allResponseCodes)||void 0===l?void 0:l.includes("204"))?(h.push(p,"if (resp.status === 204) {").push(p+1,"console.log('success');").push(p,"} else {"),h.push(p+1,`const ${h.var("data")} = await ${h.var("resp")}.${_?"json()":"text()"};`).push(p+1,`console.log(${h.var("data")});`).push(p,"}")):h.push(p,`const ${h.var("data")} = await ${h.var("resp")}.${_?"json()":"text()"};`).push(p,`console.log(${h.var("data")});`),d.showBoilerplate&&h.push("}").blank().push("run();"),h.join().replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/,'fs.createReadStream("$1")')};function addComments(e){e.push("/**"),e.push(" * Requires Node.js >= 14"),e.push(" *"),e.push(' * Requires module "node-fetch" >= 2.6.1'),e.push(" * See here for installation details:"),e.push(" * https://www.npmjs.com/package/node-fetch"),e.push(" */"),e.blank()}exports.info={key:"fetch",title:"Fetch",link:"https://github.com/bitinn/node-fetch",description:"Simplified HTTP node-fetch client"},exports.default=handler;
2
+ //# sourceMappingURL=fetch.js.map
@@ -5,6 +5,6 @@ declare const _default: {
5
5
  extname: string;
6
6
  default: string;
7
7
  };
8
- fetch: import("../../index.js").LanguageHandler<import("../../../types.js").BasicLanguageOptions | undefined>;
8
+ fetch: import("../..").LanguageHandler<import("../../..").BasicLanguageOptions | undefined>;
9
9
  };
10
10
  export default _default;
@@ -1 +1,2 @@
1
- import e from"./fetch.js";var f={info:{key:"node",title:"Node.js",extname:".js",default:"fetch"},fetch:e};export{f as default};
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const fetch_1=__importDefault(require("./fetch"));exports.default={info:{key:"node",title:"Node.js",extname:".js",default:"fetch"},fetch:fetch_1.default};
2
+ //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import type { LanguageHandler } from '../../index.js';
2
- import type { PHPCodeSampleConfig } from '../../../types.js';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { PHPCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<PHPCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;