@digi-frontend/dgate-api-documentation 1.0.1 → 1.0.4

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 (479) hide show
  1. package/.editorconfig +12 -12
  2. package/.prettierignore +7 -7
  3. package/.prettierrc +15 -15
  4. package/dist/{2e10bbdb265df50e.svg → 43595976d1fdccbf.svg} +4 -4
  5. package/dist/{8789eb84283ea95b.svg → 56dc416b683db280.svg} +5 -5
  6. package/dist/{bb8b87cace25e052.svg → 64efc2716808c4a4.svg} +3 -3
  7. package/dist/{d32ce84bbd78babd.svg → 72db3b05a96dd600.svg} +3 -3
  8. package/dist/{d501922060662842.svg → 844eba3f2e42a9eb.svg} +3 -3
  9. package/dist/_virtual/index10.js +1 -1
  10. package/dist/_virtual/index21.js +2 -0
  11. package/dist/_virtual/index21.js.map +1 -0
  12. package/dist/_virtual/index3.js +1 -1
  13. package/dist/_virtual/index4.js +1 -1
  14. package/dist/_virtual/index6.js +1 -1
  15. package/dist/_virtual/index7.js +1 -1
  16. package/dist/_virtual/index8.js +1 -1
  17. package/dist/_virtual/index9.js +1 -1
  18. package/dist/_virtual/node2.js +2 -0
  19. package/dist/_virtual/node2.js.map +1 -0
  20. package/dist/_virtual/node3.js +2 -0
  21. package/dist/_virtual/node3.js.map +1 -0
  22. package/dist/{070dc6ecd197bc80.svg → a7568b270e175038.svg} +8 -8
  23. package/dist/{9bdff13f8d8fa48a.svg → af16a554be8c4d69.svg} +3 -3
  24. package/dist/{7f54eeb0bb2d1150.svg → b82c7612e73342f3.svg} +3 -3
  25. package/dist/node_modules/digitinary-ui/dist/index.js +1 -1
  26. package/dist/node_modules/digitinary-ui/dist/index.js.map +1 -1
  27. package/dist/node_modules/domelementtype/lib/index.js +1 -1
  28. package/dist/node_modules/formik/dist/formik.esm.js +1 -1
  29. package/dist/node_modules/html-dom-parser/lib/index.js +1 -1
  30. package/dist/node_modules/html-dom-parser/lib/server/html-to-dom.js +1 -1
  31. package/dist/node_modules/html-dom-parser/lib/server/html-to-dom.js.map +1 -1
  32. package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/index.js +2 -0
  33. package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/index.js.map +1 -0
  34. package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/node.js +2 -0
  35. package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/node.js.map +1 -0
  36. package/dist/node_modules/html-react-parser/esm/index.mjs.js +1 -1
  37. package/dist/node_modules/html-react-parser/esm/index.mjs.js.map +1 -1
  38. package/dist/node_modules/html-react-parser/lib/index.js +1 -1
  39. package/dist/node_modules/html-react-parser/lib/index.js.map +1 -1
  40. package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/index.js +2 -0
  41. package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/index.js.map +1 -0
  42. package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/node.js +2 -0
  43. package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/node.js.map +1 -0
  44. package/dist/node_modules/htmlparser2/dist/commonjs/Parser.js +1 -1
  45. package/dist/node_modules/htmlparser2/dist/commonjs/Parser.js.map +1 -1
  46. package/dist/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +1 -1
  47. package/dist/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +1 -1
  48. package/dist/node_modules/htmlparser2/dist/commonjs/index.js +1 -1
  49. package/dist/node_modules/htmlparser2/dist/commonjs/index.js.map +1 -1
  50. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js +2 -0
  51. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js.map +1 -0
  52. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js +2 -0
  53. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js.map +1 -0
  54. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode.js +2 -0
  55. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode.js.map +1 -0
  56. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js +2 -0
  57. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js.map +1 -0
  58. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/encode.js +2 -0
  59. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/encode.js.map +1 -0
  60. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/escape.js +2 -0
  61. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/escape.js.map +1 -0
  62. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js +2 -0
  63. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
  64. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js +2 -0
  65. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
  66. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js +2 -0
  67. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js.map +1 -0
  68. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/index.js +2 -0
  69. package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/index.js.map +1 -0
  70. package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/index.js +2 -0
  71. package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/index.js.map +1 -0
  72. package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/node.js +2 -0
  73. package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/node.js.map +1 -0
  74. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js +2 -0
  75. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js.map +1 -0
  76. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js +2 -0
  77. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js.map +1 -0
  78. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/index.js +2 -0
  79. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/index.js.map +1 -0
  80. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js +2 -0
  81. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js.map +1 -0
  82. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js +2 -0
  83. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js.map +1 -0
  84. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/querying.js +2 -0
  85. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/querying.js.map +1 -0
  86. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js +2 -0
  87. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js.map +1 -0
  88. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js +2 -0
  89. package/dist/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js.map +1 -0
  90. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +2 -0
  91. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
  92. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +2 -0
  93. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +1 -0
  94. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +2 -0
  95. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
  96. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +2 -0
  97. package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
  98. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +1 -1
  99. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -1
  100. package/dist/node_modules/react-fast-compare/index.js +1 -1
  101. package/dist/node_modules/react-fast-compare/index.js.map +1 -1
  102. package/dist/node_modules/react-is/index.js +1 -1
  103. package/dist/node_modules/react-property/lib/index.js +1 -1
  104. package/dist/node_modules/react-property/lib/index.js.map +1 -1
  105. package/dist/node_modules/style-to-object/cjs/index.js +1 -1
  106. package/dist/node_modules/toposort/index.js +1 -1
  107. package/dist/node_modules/yup/index.esm.js +1 -1
  108. package/dist/node_modules/yup/index.esm.js.map +1 -1
  109. package/dist/src/assets/icons/AddRow.svg.js +1 -1
  110. package/dist/src/assets/icons/AddRow.svg.js.map +1 -1
  111. package/dist/src/assets/icons/CheckMarkSquare.svg.js +2 -0
  112. package/dist/src/assets/icons/CheckMarkSquare.svg.js.map +1 -0
  113. package/dist/src/assets/icons/CloseIcon.svg.js +1 -1
  114. package/dist/src/assets/icons/CloseIcon.svg.js.map +1 -1
  115. package/dist/src/assets/icons/DeleteIcon.svg.js +1 -1
  116. package/dist/src/assets/icons/DeleteIcon.svg.js.map +1 -1
  117. package/dist/src/assets/icons/DownArrow.svg.js +1 -1
  118. package/dist/src/assets/icons/DownArrow.svg.js.map +1 -1
  119. package/dist/src/assets/icons/EditIcon.svg.js +1 -1
  120. package/dist/src/assets/icons/EditIcon.svg.js.map +1 -1
  121. package/dist/src/assets/icons/UpArrow.svg.js +1 -1
  122. package/dist/src/assets/icons/UpArrow.svg.js.map +1 -1
  123. package/dist/src/assets/icons/deleteOutlinedIcon.svg.js +2 -0
  124. package/dist/src/assets/icons/deleteOutlinedIcon.svg.js.map +1 -0
  125. package/dist/src/components/Chips/Chips.js +2 -0
  126. package/dist/src/components/Chips/Chips.js.map +1 -0
  127. package/dist/src/components/InfoForm/InfoForm.js +1 -1
  128. package/dist/src/components/InfoForm/InfoForm.js.map +1 -1
  129. package/dist/src/components/LivePreview/LivePreview.js +1 -1
  130. package/dist/src/components/LivePreview/LivePreview.js.map +1 -1
  131. package/dist/src/components/MethodAccordion/MethodAccordion.js +1 -1
  132. package/dist/src/components/MethodAccordion/MethodAccordion.js.map +1 -1
  133. package/dist/src/components/SVGLoader/SVGLoader.js.map +1 -1
  134. package/dist/src/components/SectionHead/SectionHead.js.map +1 -1
  135. package/dist/src/components/SimpleLabelValue/SimpleLabelValue.js.map +1 -1
  136. package/dist/src/components/Tooltip/Tooltip.js.map +1 -1
  137. package/dist/src/components/dialog/index.js +1 -1
  138. package/dist/src/components/dialog/index.js.map +1 -1
  139. package/dist/src/components/table/table.js +1 -1
  140. package/dist/src/components/table/table.js.map +1 -1
  141. package/dist/src/constants/index.js +1 -1
  142. package/dist/src/constants/index.js.map +1 -1
  143. package/dist/src/constants/regex.js +1 -1
  144. package/dist/src/constants/regex.js.map +1 -1
  145. package/dist/src/helpers/layout.helper.js +1 -1
  146. package/dist/src/helpers/layout.helper.js.map +1 -1
  147. package/dist/src/helpers/methodAccordion.helper.js.map +1 -1
  148. package/dist/src/index.js +1 -1
  149. package/dist/src/layout/layout.js +1 -1
  150. package/dist/src/layout/layout.js.map +1 -1
  151. package/dist/src/layout/layout.module.css.js +1 -1
  152. package/dist/src/validator/form.scheme.js +1 -1
  153. package/dist/src/validator/form.scheme.js.map +1 -1
  154. package/dist/styles.css +500 -2036
  155. package/dist/types/assets/icons/index.d.ts +1 -17
  156. package/dist/types/components/InfoForm/InfoForm.d.ts +1 -3
  157. package/dist/types/components/LivePreview/LivePreview.d.ts +0 -1
  158. package/dist/types/components/MethodAccordion/MethodAccordion.d.ts +3 -7
  159. package/dist/types/components/Tooltip/Tooltip.d.ts +2 -2
  160. package/dist/types/components/dialog/dialog.d.ts +0 -6
  161. package/dist/types/components/dialog/index.d.ts +1 -1
  162. package/dist/types/components/table/table.d.ts +1 -2
  163. package/dist/types/constants/index.d.ts +4 -23
  164. package/dist/types/constants/regex.d.ts +0 -2
  165. package/dist/types/index.d.ts +0 -1
  166. package/dist/types/layout/layout.d.ts +1 -4
  167. package/dist/types/types/index.d.ts +16 -25
  168. package/dist/types/types/layout.type.d.ts +1 -11
  169. package/dist/types/types/openApi.d.ts +5 -18
  170. package/dist/types/validator/form.scheme.d.ts +3 -12
  171. package/package.json +42 -47
  172. package/rollup.config.js +35 -37
  173. package/src/assets/icons/AddRow.svg +3 -3
  174. package/src/assets/icons/CheckMarkSquare.svg +5 -5
  175. package/src/assets/icons/CloseIcon.svg +4 -4
  176. package/src/assets/icons/DeleteIcon.svg +3 -3
  177. package/src/assets/icons/DownArrow.svg +3 -3
  178. package/src/assets/icons/EditIcon.svg +3 -3
  179. package/src/assets/icons/UpArrow.svg +3 -3
  180. package/src/assets/icons/deleteOutlinedIcon.svg +8 -8
  181. package/src/assets/icons/index.ts +8 -24
  182. package/src/components/Chips/Chips.tsx +87 -87
  183. package/src/components/Chips/style.scss +147 -147
  184. package/src/components/InfoForm/InfoForm.module.scss +20 -165
  185. package/src/components/InfoForm/InfoForm.tsx +138 -424
  186. package/src/components/LivePreview/LivePreview.module.scss +5 -181
  187. package/src/components/LivePreview/LivePreview.tsx +80 -224
  188. package/src/components/MethodAccordion/MethodAccordion.module.scss +289 -399
  189. package/src/components/MethodAccordion/MethodAccordion.tsx +431 -1063
  190. package/src/components/SVGLoader/SVGLoader.tsx +94 -96
  191. package/src/components/SectionHead/SectionHead.scss +29 -29
  192. package/src/components/SectionHead/SectionHead.tsx +22 -22
  193. package/src/components/SimpleLabelValue/SimpleLabelValue.tsx +31 -31
  194. package/src/components/SimpleLabelValue/index.ts +1 -1
  195. package/src/components/SimpleLabelValue/style.scss +30 -30
  196. package/src/components/Tooltip/Tooltip.scss +130 -133
  197. package/src/components/Tooltip/Tooltip.tsx +86 -85
  198. package/src/components/_global.scss +337 -337
  199. package/src/components/dialog/dialog.ts +54 -61
  200. package/src/components/dialog/index.tsx +85 -88
  201. package/src/components/dialog/style.scss +104 -188
  202. package/src/components/table/style.scss +179 -223
  203. package/src/components/table/table.tsx +307 -490
  204. package/src/constants/index.ts +66 -95
  205. package/src/constants/regex.ts +5 -7
  206. package/src/global.d.ts +13 -13
  207. package/src/helpers/layout.helper.ts +118 -187
  208. package/src/helpers/methodAccordion.helper.ts +19 -19
  209. package/src/index.ts +1 -2
  210. package/src/layout/layout.module.css +38 -65
  211. package/src/layout/layout.tsx +75 -181
  212. package/src/types/index.ts +0 -28
  213. package/src/types/layout.type.ts +22 -32
  214. package/src/types/openApi.ts +95 -109
  215. package/src/types/transformedOpenApi.ts +52 -52
  216. package/src/validator/form.scheme.ts +70 -96
  217. package/tsconfig.json +33 -33
  218. package/dist/16702d92fd6d1730.svg +0 -6
  219. package/dist/2b546d6e9fdf604a.svg +0 -3
  220. package/dist/2c3c6c2c3b835504.svg +0 -5
  221. package/dist/55b5994c5781482b.svg +0 -5
  222. package/dist/60bef8083c55f46b.svg +0 -6
  223. package/dist/68c710e0583e19e6.svg +0 -5
  224. package/dist/731221b3f242672d.svg +0 -4
  225. package/dist/8520b6792278d9df.svg +0 -6
  226. package/dist/9506ef7a26a74147.svg +0 -12
  227. package/dist/9b7aee27757b5036.svg +0 -3
  228. package/dist/_virtual/core.js +0 -2
  229. package/dist/_virtual/core.js.map +0 -1
  230. package/dist/_virtual/core2.js +0 -2
  231. package/dist/_virtual/core2.js.map +0 -1
  232. package/dist/_virtual/format.js +0 -2
  233. package/dist/_virtual/format.js.map +0 -1
  234. package/dist/_virtual/json.js +0 -2
  235. package/dist/_virtual/json.js.map +0 -1
  236. package/dist/cceb1e5dc06b0b85.svg +0 -4
  237. package/dist/d140a601c85bac25.svg +0 -3
  238. package/dist/d6d0a98ec38e6b77.svg +0 -3
  239. package/dist/e04479ad425e7d58.svg +0 -4
  240. package/dist/f4452c3ebcf0d5da.svg +0 -4
  241. package/dist/f4a32992f02af522.svg +0 -5
  242. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -2
  243. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +0 -1
  244. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -2
  245. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js.map +0 -1
  246. package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -2
  247. package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +0 -1
  248. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -2
  249. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +0 -1
  250. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -2
  251. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +0 -1
  252. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -2
  253. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js.map +0 -1
  254. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -2
  255. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js.map +0 -1
  256. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -2
  257. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +0 -1
  258. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -2
  259. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js.map +0 -1
  260. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -2
  261. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +0 -1
  262. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -2
  263. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +0 -1
  264. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -2
  265. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js.map +0 -1
  266. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -2
  267. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +0 -1
  268. package/dist/node_modules/dom-serializer/lib/foreignNames.js +0 -2
  269. package/dist/node_modules/dom-serializer/lib/foreignNames.js.map +0 -1
  270. package/dist/node_modules/dom-serializer/lib/index.js +0 -2
  271. package/dist/node_modules/dom-serializer/lib/index.js.map +0 -1
  272. package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode.js +0 -2
  273. package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode.js.map +0 -1
  274. package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js +0 -2
  275. package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js.map +0 -1
  276. package/dist/node_modules/dom-serializer/node_modules/entities/lib/encode.js +0 -2
  277. package/dist/node_modules/dom-serializer/node_modules/entities/lib/encode.js.map +0 -1
  278. package/dist/node_modules/dom-serializer/node_modules/entities/lib/escape.js +0 -2
  279. package/dist/node_modules/dom-serializer/node_modules/entities/lib/escape.js.map +0 -1
  280. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js +0 -2
  281. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js.map +0 -1
  282. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js +0 -2
  283. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js.map +0 -1
  284. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js +0 -2
  285. package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js.map +0 -1
  286. package/dist/node_modules/dom-serializer/node_modules/entities/lib/index.js +0 -2
  287. package/dist/node_modules/dom-serializer/node_modules/entities/lib/index.js.map +0 -1
  288. package/dist/node_modules/domhandler/lib/index.js +0 -2
  289. package/dist/node_modules/domhandler/lib/index.js.map +0 -1
  290. package/dist/node_modules/domhandler/lib/node.js +0 -2
  291. package/dist/node_modules/domhandler/lib/node.js.map +0 -1
  292. package/dist/node_modules/domutils/lib/feeds.js +0 -2
  293. package/dist/node_modules/domutils/lib/feeds.js.map +0 -1
  294. package/dist/node_modules/domutils/lib/helpers.js +0 -2
  295. package/dist/node_modules/domutils/lib/helpers.js.map +0 -1
  296. package/dist/node_modules/domutils/lib/index.js +0 -2
  297. package/dist/node_modules/domutils/lib/index.js.map +0 -1
  298. package/dist/node_modules/domutils/lib/legacy.js +0 -2
  299. package/dist/node_modules/domutils/lib/legacy.js.map +0 -1
  300. package/dist/node_modules/domutils/lib/manipulation.js +0 -2
  301. package/dist/node_modules/domutils/lib/manipulation.js.map +0 -1
  302. package/dist/node_modules/domutils/lib/querying.js +0 -2
  303. package/dist/node_modules/domutils/lib/querying.js.map +0 -1
  304. package/dist/node_modules/domutils/lib/stringify.js +0 -2
  305. package/dist/node_modules/domutils/lib/stringify.js.map +0 -1
  306. package/dist/node_modules/domutils/lib/traversal.js +0 -2
  307. package/dist/node_modules/domutils/lib/traversal.js.map +0 -1
  308. package/dist/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -2
  309. package/dist/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
  310. package/dist/node_modules/entities/dist/commonjs/decode.js +0 -2
  311. package/dist/node_modules/entities/dist/commonjs/decode.js.map +0 -1
  312. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -2
  313. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
  314. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -2
  315. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
  316. package/dist/node_modules/fast-json-stable-stringify/index.js +0 -2
  317. package/dist/node_modules/fast-json-stable-stringify/index.js.map +0 -1
  318. package/dist/node_modules/fault/index.js +0 -2
  319. package/dist/node_modules/fault/index.js.map +0 -1
  320. package/dist/node_modules/format/format.js +0 -2
  321. package/dist/node_modules/format/format.js.map +0 -1
  322. package/dist/node_modules/highlight.js/lib/core.js +0 -2
  323. package/dist/node_modules/highlight.js/lib/core.js.map +0 -1
  324. package/dist/node_modules/highlight.js/lib/languages/json.js +0 -2
  325. package/dist/node_modules/highlight.js/lib/languages/json.js.map +0 -1
  326. package/dist/node_modules/js-yaml/dist/js-yaml.mjs.js +0 -3
  327. package/dist/node_modules/js-yaml/dist/js-yaml.mjs.js.map +0 -1
  328. package/dist/node_modules/lowlight/lib/core.js +0 -2
  329. package/dist/node_modules/lowlight/lib/core.js.map +0 -1
  330. package/dist/node_modules/nanoid/index.js +0 -2
  331. package/dist/node_modules/nanoid/index.js.map +0 -1
  332. package/dist/node_modules/nanoid/url-alphabet/index.js +0 -2
  333. package/dist/node_modules/nanoid/url-alphabet/index.js.map +0 -1
  334. package/dist/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js +0 -2
  335. package/dist/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js.map +0 -1
  336. package/dist/node_modules/react-syntax-highlighter/dist/esm/create-element.js +0 -2
  337. package/dist/node_modules/react-syntax-highlighter/dist/esm/create-element.js.map +0 -1
  338. package/dist/node_modules/react-syntax-highlighter/dist/esm/highlight.js +0 -2
  339. package/dist/node_modules/react-syntax-highlighter/dist/esm/highlight.js.map +0 -1
  340. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/hljs/json.js +0 -2
  341. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/hljs/json.js.map +0 -1
  342. package/dist/node_modules/react-syntax-highlighter/dist/esm/light.js +0 -2
  343. package/dist/node_modules/react-syntax-highlighter/dist/esm/light.js.map +0 -1
  344. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-dark.js +0 -2
  345. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-dark.js.map +0 -1
  346. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-light.js +0 -2
  347. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-light.js.map +0 -1
  348. package/dist/src/assets/icons/ApiIcon.svg.js +0 -2
  349. package/dist/src/assets/icons/ApiIcon.svg.js.map +0 -1
  350. package/dist/src/assets/icons/ArrowBack.svg.js +0 -2
  351. package/dist/src/assets/icons/ArrowBack.svg.js.map +0 -1
  352. package/dist/src/assets/icons/BookIcon.svg.js +0 -2
  353. package/dist/src/assets/icons/BookIcon.svg.js.map +0 -1
  354. package/dist/src/assets/icons/CopySticker.svg.js +0 -2
  355. package/dist/src/assets/icons/CopySticker.svg.js.map +0 -1
  356. package/dist/src/assets/icons/DeleteOutlinedIcon.svg.js +0 -2
  357. package/dist/src/assets/icons/DeleteOutlinedIcon.svg.js.map +0 -1
  358. package/dist/src/assets/icons/FilterIcon.svg.js +0 -2
  359. package/dist/src/assets/icons/FilterIcon.svg.js.map +0 -1
  360. package/dist/src/assets/icons/Plus.svg.js +0 -2
  361. package/dist/src/assets/icons/Plus.svg.js.map +0 -1
  362. package/dist/src/assets/icons/PlusSquare.svg.js +0 -2
  363. package/dist/src/assets/icons/PlusSquare.svg.js.map +0 -1
  364. package/dist/src/assets/icons/RequestOption.svg.js +0 -2
  365. package/dist/src/assets/icons/RequestOption.svg.js.map +0 -1
  366. package/dist/src/assets/icons/arrowDownGray.svg.js +0 -2
  367. package/dist/src/assets/icons/arrowDownGray.svg.js.map +0 -1
  368. package/dist/src/assets/icons/arrowRightGray.svg.js +0 -2
  369. package/dist/src/assets/icons/arrowRightGray.svg.js.map +0 -1
  370. package/dist/src/assets/icons/close-circle.svg.js +0 -2
  371. package/dist/src/assets/icons/close-circle.svg.js.map +0 -1
  372. package/dist/src/assets/icons/copy.svg.js +0 -2
  373. package/dist/src/assets/icons/copy.svg.js.map +0 -1
  374. package/dist/src/assets/icons/document.svg.js +0 -2
  375. package/dist/src/assets/icons/document.svg.js.map +0 -1
  376. package/dist/src/assets/icons/eye.svg.js +0 -2
  377. package/dist/src/assets/icons/eye.svg.js.map +0 -1
  378. package/dist/src/assets/icons/infoIcon.svg.js +0 -2
  379. package/dist/src/assets/icons/infoIcon.svg.js.map +0 -1
  380. package/dist/src/assets/icons/searchIcon.svg.js +0 -2
  381. package/dist/src/assets/icons/searchIcon.svg.js.map +0 -1
  382. package/dist/src/components/JsonInput/JsonInput.js +0 -2
  383. package/dist/src/components/JsonInput/JsonInput.js.map +0 -1
  384. package/dist/src/components/JsonInput/style.module.scss.js +0 -2
  385. package/dist/src/components/JsonInput/style.module.scss.js.map +0 -1
  386. package/dist/src/components/table/tags-table.js +0 -2
  387. package/dist/src/components/table/tags-table.js.map +0 -1
  388. package/dist/src/constants/methods.constant.js +0 -2
  389. package/dist/src/constants/methods.constant.js.map +0 -1
  390. package/dist/src/context/SectionToggleContext.js +0 -2
  391. package/dist/src/context/SectionToggleContext.js.map +0 -1
  392. package/dist/src/helpers/docs.helper.js +0 -2
  393. package/dist/src/helpers/docs.helper.js.map +0 -1
  394. package/dist/src/layout/docsComponents/Codebox/Codebox.js +0 -2
  395. package/dist/src/layout/docsComponents/Codebox/Codebox.js.map +0 -1
  396. package/dist/src/layout/docsComponents/Codebox/style.module.scss.js +0 -2
  397. package/dist/src/layout/docsComponents/Codebox/style.module.scss.js.map +0 -1
  398. package/dist/src/layout/docsComponents/DocsAside/DocsAside.js +0 -2
  399. package/dist/src/layout/docsComponents/DocsAside/DocsAside.js.map +0 -1
  400. package/dist/src/layout/docsComponents/DocsAside/style.module.scss.js +0 -2
  401. package/dist/src/layout/docsComponents/DocsAside/style.module.scss.js.map +0 -1
  402. package/dist/src/layout/docsComponents/DocsContent/DocsContent.js +0 -2
  403. package/dist/src/layout/docsComponents/DocsContent/DocsContent.js.map +0 -1
  404. package/dist/src/layout/docsComponents/DocsContent/EndpointPage/index.js +0 -2
  405. package/dist/src/layout/docsComponents/DocsContent/EndpointPage/index.js.map +0 -1
  406. package/dist/src/layout/docsComponents/DocsContent/OverviewPage/index.js +0 -2
  407. package/dist/src/layout/docsComponents/DocsContent/OverviewPage/index.js.map +0 -1
  408. package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js +0 -2
  409. package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js.map +0 -1
  410. package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss.js +0 -2
  411. package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss.js.map +0 -1
  412. package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js +0 -2
  413. package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js.map +0 -1
  414. package/dist/src/layout/docsComponents/index.js +0 -2
  415. package/dist/src/layout/docsComponents/index.js.map +0 -1
  416. package/dist/src/layout/docsLayout.js +0 -2
  417. package/dist/src/layout/docsLayout.js.map +0 -1
  418. package/dist/src/utils/index.js +0 -2
  419. package/dist/src/utils/index.js.map +0 -1
  420. package/dist/types/components/JsonInput/JsonInput.d.ts +0 -14
  421. package/dist/types/components/table/tags-table.d.ts +0 -11
  422. package/dist/types/constants/methods.constant.d.ts +0 -16
  423. package/dist/types/context/SectionToggleContext.d.ts +0 -37
  424. package/dist/types/helpers/docs.helper.d.ts +0 -3
  425. package/dist/types/layout/docsComponents/Codebox/Codebox.d.ts +0 -4
  426. package/dist/types/layout/docsComponents/DocsAside/DocsAside.d.ts +0 -5
  427. package/dist/types/layout/docsComponents/DocsContent/DocsContent.d.ts +0 -12
  428. package/dist/types/layout/docsComponents/DocsContent/EndpointPage/index.d.ts +0 -7
  429. package/dist/types/layout/docsComponents/DocsContent/OverviewPage/index.d.ts +0 -9
  430. package/dist/types/layout/docsComponents/DocsHeader/DocsHeader.d.ts +0 -6
  431. package/dist/types/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.d.ts +0 -18
  432. package/dist/types/layout/docsComponents/index.d.ts +0 -17
  433. package/dist/types/layout/docsLayout.d.ts +0 -31
  434. package/dist/types/types/docsLayout.type.d.ts +0 -7
  435. package/dist/types/utils/index.d.ts +0 -2
  436. package/src/assets/icons/ApiIcon.svg +0 -12
  437. package/src/assets/icons/ArrowBack.svg +0 -3
  438. package/src/assets/icons/BookIcon.svg +0 -6
  439. package/src/assets/icons/CopySticker.svg +0 -6
  440. package/src/assets/icons/DeleteOutlinedIcon.svg +0 -8
  441. package/src/assets/icons/FilterIcon.svg +0 -4
  442. package/src/assets/icons/Plus.svg +0 -5
  443. package/src/assets/icons/PlusSquare.svg +0 -3
  444. package/src/assets/icons/RequestOption.svg +0 -5
  445. package/src/assets/icons/arrowDownGray.svg +0 -3
  446. package/src/assets/icons/arrowRightGray.svg +0 -3
  447. package/src/assets/icons/close-circle.svg +0 -5
  448. package/src/assets/icons/copy.svg +0 -4
  449. package/src/assets/icons/document.svg +0 -6
  450. package/src/assets/icons/eye.svg +0 -4
  451. package/src/assets/icons/infoIcon.svg +0 -5
  452. package/src/assets/icons/searchIcon.svg +0 -4
  453. package/src/components/JsonInput/JsonInput.tsx +0 -149
  454. package/src/components/JsonInput/style.module.scss +0 -133
  455. package/src/components/table/tags-table.tsx +0 -348
  456. package/src/constants/methods.constant.ts +0 -26
  457. package/src/context/SectionToggleContext.tsx +0 -121
  458. package/src/helpers/docs.helper.ts +0 -42
  459. package/src/layout/docsComponents/Codebox/Codebox.tsx +0 -61
  460. package/src/layout/docsComponents/Codebox/style.module.scss +0 -43
  461. package/src/layout/docsComponents/DocsAside/DocsAside.tsx +0 -93
  462. package/src/layout/docsComponents/DocsAside/style.module.scss +0 -113
  463. package/src/layout/docsComponents/DocsContent/DocsContent.tsx +0 -51
  464. package/src/layout/docsComponents/DocsContent/EndpointPage/index.tsx +0 -236
  465. package/src/layout/docsComponents/DocsContent/EndpointPage/style.scss +0 -309
  466. package/src/layout/docsComponents/DocsContent/OverviewPage/index.tsx +0 -192
  467. package/src/layout/docsComponents/DocsContent/OverviewPage/style.scss +0 -284
  468. package/src/layout/docsComponents/DocsContent/style.scss +0 -0
  469. package/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss +0 -270
  470. package/src/layout/docsComponents/DocsHeader/DocsHeader.tsx +0 -187
  471. package/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.tsx +0 -229
  472. package/src/layout/docsComponents/DocsSideMenuTree/style.scss +0 -195
  473. package/src/layout/docsComponents/index.scss +0 -49
  474. package/src/layout/docsComponents/index.tsx +0 -28
  475. package/src/layout/docsLayout.tsx +0 -120
  476. package/src/types/docsLayout.type.ts +0 -7
  477. package/src/utils/index.ts +0 -12
  478. package/the_npm_commands.sh +0 -12
  479. package/variables.txt +0 -4
@@ -1,95 +1,66 @@
1
- export const methodColorMapping = {
2
- get: {
3
- label: 'Get',
4
- color: '#3A6CD1',
5
- order: 1,
6
- },
7
- post: {
8
- label: 'Post',
9
- color: '#3AAA35',
10
- order: 2,
11
- },
12
- put: {
13
- label: 'Put',
14
- color: '#FAAD14',
15
- order: 3,
16
- },
17
- delete: {
18
- label: 'Delete',
19
- color: '#DA3F3F',
20
- order: 4,
21
- },
22
- patch: {
23
- label: 'Patch',
24
- color: '#58E2C2',
25
- order: 5,
26
- },
27
- options: {
28
- label: 'Options',
29
- color: '#495D97',
30
- order: 6,
31
- },
32
- trace: {
33
- label: 'Trace',
34
- color: '#FFA28F',
35
- order: 7,
36
- },
37
- head: {
38
- label: 'Head',
39
- color: '#9461C9',
40
- order: 8,
41
- },
42
- }
43
-
44
- export const tagsTableHeaders = [
45
- {
46
- id: 'tagName',
47
- label: 'Tag Name',
48
- sortable: false,
49
- classes: 'requiredParam',
50
- },
51
- {
52
- id: 'description',
53
- label: 'Description',
54
- sortable: false,
55
- },
56
- {
57
- id: 'externalDocs',
58
- label: 'External Docs',
59
- sortable: false,
60
- },
61
- ]
62
-
63
- export const paramsTableHeaders = [
64
- {
65
- id: 'paramName',
66
- label: 'Parameter Name',
67
- sortable: false,
68
- required: true,
69
- classes: 'requiredParam',
70
- },
71
- { id: 'paramType', label: 'In', sortable: false, classes: 'requiredParam' },
72
- { id: 'schemaType', label: 'Schema-Type', sortable: false, classes: 'requiredParam' },
73
- // { id: 'arraySchemaType', label: 'Array Schema Type', sortable: false },
74
- { id: 'enum', label: 'Enum', sortable: false },
75
- { id: 'required', label: 'Required', sortable: false, classes: 'requiredParam' },
76
- { id: 'description', label: 'Description', sortable: false },
77
- ]
78
-
79
- export const httpStatusCodes = [
80
- // 1xx: Informational responses
81
- 100, 101, 102, 103,
82
-
83
- // 2xx: Success
84
- 200, 201, 202, 203, 204, 205, 206, 207, 208, 226,
85
-
86
- // 3xx: Redirection
87
- 300, 301, 302, 303, 304, 305, 306, 307, 308,
88
-
89
- // 4xx: Client errors
90
- 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
91
- 421, 422, 423, 424, 425, 426, 428, 429, 431, 451,
92
-
93
- // 5xx: Server errors
94
- 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511,
95
- ]
1
+ export const methodColorMapping = {
2
+ get: {
3
+ label: 'Get',
4
+ color: '#3A6CD1',
5
+ },
6
+ post: {
7
+ label: 'Post',
8
+ color: '#3AAA35',
9
+ },
10
+ put: {
11
+ label: 'Put',
12
+ color: '#FAAD14',
13
+ },
14
+ delete: {
15
+ label: 'Delete',
16
+ color: '#DA3F3F',
17
+ },
18
+ PATCH: {
19
+ label: 'Patch',
20
+ color: '#FAAD14',
21
+ },
22
+ OPTIONS: {
23
+ label: 'Options',
24
+ color: '#FAAD14',
25
+ },
26
+ TRACE: {
27
+ label: 'Trace',
28
+ color: '#FAAD14',
29
+ },
30
+ HEAD: {
31
+ label: 'Head',
32
+ color: '#FAAD14',
33
+ },
34
+ }
35
+
36
+ export const paramsTableHeaders = [
37
+ {
38
+ id: 'paramName',
39
+ label: 'Parameter Name',
40
+ sortable: false,
41
+ required: true,
42
+ classes: 'requiredParam',
43
+ },
44
+ { id: 'paramType', label: 'In', sortable: false, classes: 'requiredParam' },
45
+ { id: 'schemaType', label: 'Schema-Type', sortable: false, classes: 'requiredParam' },
46
+ { id: 'required', label: 'Required', sortable: false, classes: 'requiredParam' },
47
+ { id: 'description', label: 'Description', sortable: false },
48
+ ]
49
+
50
+ export const httpStatusCodes = [
51
+ // 1xx: Informational responses
52
+ 100, 101, 102, 103,
53
+
54
+ // 2xx: Success
55
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 226,
56
+
57
+ // 3xx: Redirection
58
+ 300, 301, 302, 303, 304, 305, 306, 307, 308,
59
+
60
+ // 4xx: Client errors
61
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
62
+ 421, 422, 423, 424, 425, 426, 428, 429, 431, 451,
63
+
64
+ // 5xx: Server errors
65
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511,
66
+ ]
@@ -1,7 +1,5 @@
1
- const regex = {
2
- basic: /[^a-zA-Z0-9-_ ]/, // not (alphanumeric + underscore + dash + space)
3
- restrictNone: /^$/, // restrict nothing
4
- ASCII: /^[\x00-\x7F]+$/,
5
- urlRegex: /^(https?:\/\/|www\.)[a-zA-Z0-9-]+(\.[a-zA-Z]{2,})+(\/[^\s]*)?$/,
6
- }
7
- export default regex
1
+ const regex = {
2
+ basic: /[^a-zA-Z0-9-_ ]/, // not (alphanumeric + underscore + dash + space)
3
+ restrictNone: /^$/, // restrict nothing
4
+ }
5
+ export default regex
package/src/global.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- declare module '*.module.css' {
2
- const classes: { [key: string]: string }
3
- export default classes
4
- }
5
- declare module '*.module.scss' {
6
- const classes: { [key: string]: string }
7
- export default classes
8
- }
9
-
10
- declare module '*.svg' {
11
- const src: string
12
- export default src
13
- }
1
+ declare module '*.module.css' {
2
+ const classes: { [key: string]: string }
3
+ export default classes
4
+ }
5
+ declare module '*.module.scss' {
6
+ const classes: { [key: string]: string }
7
+ export default classes
8
+ }
9
+
10
+ declare module '*.svg' {
11
+ const src: string
12
+ export default src
13
+ }
@@ -1,187 +1,118 @@
1
- import { TransformedPathsArray } from '@entities/layout.type'
2
- import { OpenAPIFile, SecurityScheme } from '@entities/openApi'
3
- import { TransformedOpenApi } from '@entities/transformedOpenApi'
4
-
5
- export const transformOpenApiObject = (openApiJson: OpenAPIFile): TransformedOpenApi => {
6
- if (openApiJson.components && openApiJson.components.securitySchemes) {
7
- const authKey = Object.keys(openApiJson.components.securitySchemes)?.at(0)
8
- if (authKey) {
9
- openApiJson.components.securitySchemes[authKey].type = openApiJson?.components
10
- ?.securitySchemes?.[authKey]?.type as SecurityScheme['type']
11
- }
12
- } else {
13
- openApiJson.components = {
14
- securitySchemes: {
15
- Public: {
16
- type: 'http',
17
- scheme: 'public',
18
- },
19
- },
20
- }
21
- }
22
-
23
- if (!openApiJson.tags) {
24
- openApiJson.tags = []
25
- }
26
-
27
- return {
28
- ...openApiJson,
29
- paths: transformPathsToArray(openApiJson.paths),
30
- } as TransformedOpenApi
31
- }
32
-
33
- export const transformOpenApiObjectToOrigin = (values: TransformedOpenApi): OpenAPIFile => {
34
- const object = {
35
- ...values,
36
- paths: transformPathsArrayToOrigin(values.paths),
37
- }
38
- if (object.components && object.components.securitySchemes) {
39
- const authKey = Object.keys(object.components.securitySchemes)?.at(0)
40
- if (authKey) {
41
- if (object.components.securitySchemes[authKey].type.toLowerCase() == 'APIKEY'.toLowerCase()) {
42
- object.components.securitySchemes[authKey].in = object.components.securitySchemes[authKey]
43
- .in as SecurityScheme['in']
44
- }
45
- object.components.securitySchemes[authKey].type = object?.components?.securitySchemes?.[
46
- authKey
47
- ]?.type as SecurityScheme['type']
48
- }
49
- }
50
- return object
51
- }
52
-
53
- export const transformPathsToArray = (paths: OpenAPIFile['paths']): TransformedPathsArray | any => {
54
- const transformedPaths = Object.entries(paths).map(([path, methods]) => ({
55
- path,
56
- methods: Object.entries(methods).map(([method, methodProps]) => {
57
- const obj: any = {
58
- ...methodProps,
59
- type: method,
60
- tags: methodProps.tags || [],
61
- summary: methodProps.summary || '',
62
- responses: Object.entries(methodProps.responses).map(([code, codeProps]) => {
63
- const contentType = Object.keys(codeProps.content || {})[0]
64
- const headers = !codeProps?.headers ? {} : codeProps.headers
65
- return {
66
- code,
67
- headers,
68
- content: {
69
- contentType,
70
- schema: {
71
- ...codeProps.content?.[contentType]?.schema,
72
- properties: JSON.stringify(codeProps.content?.[contentType]?.schema?.properties),
73
- },
74
- },
75
- }
76
- }),
77
- }
78
- // Add parameters if it does not exist in the original JSON
79
- if (!methodProps?.parameters) {
80
- obj.parameters = []
81
- }
82
-
83
- // load response headers parameters
84
-
85
- if (method.toLowerCase() != 'get') {
86
- const contentType = Object.keys(methodProps?.requestBody?.content || {})[0]
87
- const reqSchema = methodProps?.requestBody?.content?.schema
88
- const requestBodyData = methodProps?.requestBody?.content?.schema?.properties
89
- ? {
90
- content: {
91
- contentType,
92
- schema: {
93
- ...reqSchema,
94
- properties: reqSchema?.properties ? JSON.stringify(reqSchema?.properties) : '{}',
95
- },
96
- },
97
- }
98
- : {
99
- content: {
100
- contentType: 'application/json',
101
- schema: {
102
- properties: '{}',
103
- type: 'object',
104
- },
105
- },
106
- }
107
-
108
- obj['requestBody'] = requestBodyData
109
- }
110
- return obj
111
- }),
112
- }))
113
-
114
- return transformedPaths
115
- }
116
-
117
- const validateBodyForResponse = (content, method) => {
118
- if (!(content?.schema as any) || !(content?.schema as any)?.properties) {
119
- return {}
120
- }
121
- let _content = JSON.parse((content?.schema as any)?.properties as string)
122
-
123
- return _content
124
- }
125
-
126
- export const transformPathsArrayToOrigin = (paths: TransformedPathsArray): OpenAPIFile['paths'] => {
127
- return paths.reduce((acc, { path, methods }) => {
128
- acc[path] = methods.reduce(
129
- (methodAcc, { type, tags, responses, summary, requestBody, ...rest }) => {
130
- // Initialize the method object
131
- methodAcc[type] = {
132
- ...rest,
133
- tags,
134
- summary,
135
- responses: responses.reduce((respAcc, { code, content, headers }) => {
136
- const formattedHeaders: Record<string, any> = {}
137
- if (headers) {
138
- for (const [key, value] of Object.entries(headers)) {
139
- formattedHeaders[key] = {
140
- description: value.description || '',
141
- required: value.required || false,
142
- schema: value.schema || {},
143
- }
144
- }
145
- }
146
- respAcc[code] = {
147
- description: 'Success', // Assuming this is static from the original data
148
- content: content.contentType
149
- ? {
150
- [content.contentType]: {
151
- schema: {
152
- ...(content.schema as object),
153
- properties: validateBodyForResponse(content, type),
154
- },
155
- },
156
- }
157
- : {},
158
- headers: formattedHeaders,
159
- }
160
- return respAcc
161
- }, {} as Record<string, any>),
162
- }
163
-
164
- const parsedRequestBodyProps =
165
- type !== 'get' ? JSON.parse(requestBody.content.schema.properties) : {}
166
- // Add requestBody for non-GET methods
167
- if (type !== 'get') {
168
- methodAcc[type].requestBody = {
169
- content: {
170
- [requestBody.content.contentType]: {
171
- schema: {
172
- ...requestBody.content.schema,
173
- properties: parsedRequestBodyProps,
174
- },
175
- },
176
- },
177
- }
178
- }
179
-
180
- return methodAcc
181
- },
182
- {} as Record<string, any>
183
- )
184
-
185
- return acc
186
- }, {} as OpenAPIFile['paths'])
187
- }
1
+ import { TransformedPathsArray } from '@entities/layout.type'
2
+ import { OpenAPIFile } from '@entities/openApi'
3
+ import { TransformedOpenApi } from '@entities/transformedOpenApi'
4
+
5
+ export const transformOpenApiObject = (openApiJson: OpenAPIFile): TransformedOpenApi => {
6
+ if (openApiJson.components && openApiJson.components.securitySchemes) {
7
+ const authKey = Object.keys(openApiJson.components.securitySchemes)
8
+ if (authKey && authKey.length) {
9
+ openApiJson.components.securitySchemes[authKey[0]].type =
10
+ openApiJson?.components?.securitySchemes?.[authKey[0]]?.type?.toUpperCase()
11
+ }
12
+ }
13
+ return {
14
+ ...openApiJson,
15
+ paths: transformPathsToArray(openApiJson.paths),
16
+ } as TransformedOpenApi
17
+ }
18
+
19
+ export const transformOpenApiObjectToOrigin = (values: TransformedOpenApi): OpenAPIFile => {
20
+ const object = {
21
+ ...values,
22
+ paths: transformPathsArrayToOrigin(values.paths),
23
+ }
24
+ if (object.components && object.components.securitySchemes) {
25
+ const authKey = Object.keys(object.components.securitySchemes)
26
+ if (authKey && authKey.length) {
27
+ if (
28
+ object.components.securitySchemes[authKey[0]].type.toLowerCase() == 'APIKEY'.toLowerCase()
29
+ ) {
30
+ object.components.securitySchemes[authKey[0]].in =
31
+ object.components.securitySchemes[authKey[0]].in.toUpperCase()
32
+ }
33
+ object.components.securitySchemes[authKey[0]].type =
34
+ object?.components?.securitySchemes?.[authKey[0]]?.type?.toUpperCase()
35
+ }
36
+ }
37
+ return object
38
+ }
39
+
40
+ export const transformPathsToArray = (paths: OpenAPIFile['paths']): TransformedPathsArray | any => {
41
+ const transformedPaths = Object.entries(paths).map(([path, methods]) => ({
42
+ path,
43
+ methods: Object.entries(methods).map(([method, methodProps]) => {
44
+ const obj: any = {
45
+ ...methodProps,
46
+ type: method,
47
+ tags: methodProps.tags,
48
+ responses: Object.entries(methodProps.responses).map(([code, codeProps]) => {
49
+ const contentType = Object.keys(codeProps.content || {})[0]
50
+ return {
51
+ code,
52
+ content: {
53
+ contentType,
54
+ schema: codeProps.content?.[contentType]?.schema,
55
+ },
56
+ }
57
+ }),
58
+ }
59
+ if (method.toLowerCase() != 'get') {
60
+ obj['requestBody'] = methodProps.requestBody
61
+ ? Object.entries(methodProps.responses).map(([_, codeProps]) => {
62
+ const contentType = Object.keys(codeProps.content || {})[0]
63
+ return {
64
+ content: {
65
+ contentType,
66
+ schema: codeProps.content?.[contentType]?.schema,
67
+ },
68
+ }
69
+ })
70
+ : {}
71
+ }
72
+ return obj
73
+ }),
74
+ }))
75
+ return transformedPaths
76
+ }
77
+
78
+ export const transformPathsArrayToOrigin = (paths: TransformedPathsArray): OpenAPIFile['paths'] => {
79
+ return paths.reduce((acc, { path, methods }) => {
80
+ acc[path] = methods.reduce((methodAcc, { type, tags, responses, requestBody, ...rest }) => {
81
+ // Initialize the method object
82
+ methodAcc[type] = {
83
+ ...rest,
84
+ tags,
85
+ responses: responses.reduce((respAcc, { code, content }) => {
86
+ respAcc[code] = {
87
+ description: 'Success', // Assuming this is static from the original data
88
+ content: content.contentType
89
+ ? { [content.contentType]: { schema: content.schema } }
90
+ : {},
91
+ }
92
+ return respAcc
93
+ }, {} as Record<string, any>),
94
+ }
95
+
96
+ // Add requestBody for non-GET methods
97
+ if (type !== 'get' && requestBody?.length > 0) {
98
+ methodAcc[type].requestBody = {
99
+ content: {
100
+ [requestBody[0].content.contentType]: {
101
+ schema: {
102
+ ...requestBody[0].content.schema,
103
+ properties:
104
+ typeof requestBody[0].content.schema.properties === 'string'
105
+ ? JSON.parse(requestBody[0].content.schema.properties)
106
+ : requestBody[0].content.schema.properties,
107
+ },
108
+ },
109
+ },
110
+ }
111
+ }
112
+
113
+ return methodAcc
114
+ }, {} as Record<string, any>)
115
+
116
+ return acc
117
+ }, {} as OpenAPIFile['paths'])
118
+ }
@@ -1,20 +1,20 @@
1
- export const handleStatusColor = (code: number): string => {
2
- if (code >= 200 && code < 300) {
3
- return 'green' // 2xx codes
4
- } else if (code >= 400 && code < 500) {
5
- return 'red' // 4xx codes
6
- } else if (code >= 500 && code < 600) {
7
- return 'red' // 5xx codes
8
- } else if (code >= 100 && code < 200) {
9
- return 'blue' // 1xx codes (Informational)
10
- } else if (code >= 300 && code < 400) {
11
- return 'orange' // 3xx codes (Redirection)
12
- } else {
13
- return 'gray' // Default or invalid status codes
14
- }
15
- }
16
-
17
- export const capitalize = (str)=> {
18
- if (!str) return "";
19
- return str.charAt(0).toUpperCase() + str.slice(1);
1
+ export const handleStatusColor = (code: number): string => {
2
+ if (code >= 200 && code < 300) {
3
+ return 'green' // 2xx codes
4
+ } else if (code >= 400 && code < 500) {
5
+ return 'red' // 4xx codes
6
+ } else if (code >= 500 && code < 600) {
7
+ return 'red' // 5xx codes
8
+ } else if (code >= 100 && code < 200) {
9
+ return 'blue' // 1xx codes (Informational)
10
+ } else if (code >= 300 && code < 400) {
11
+ return 'orange' // 3xx codes (Redirection)
12
+ } else {
13
+ return 'gray' // Default or invalid status codes
14
+ }
15
+ }
16
+
17
+ export const capitalize = (str)=> {
18
+ if (!str) return "";
19
+ return str.charAt(0).toUpperCase() + str.slice(1);
20
20
  }
package/src/index.ts CHANGED
@@ -1,2 +1 @@
1
- export { default as Layout } from './layout/layout'
2
- export { default as DocsLayout } from './layout/docsLayout'
1
+ export { default as Layout } from './layout/layout'
@@ -1,65 +1,38 @@
1
- .docsLayout {
2
- display: flex;
3
- flex-direction: column;
4
- overflow: hidden;
5
- height: 100vh;
6
- max-height: 100%;
7
-
8
- .apiDocAlert {
9
- border-radius: 0;
10
- z-index: 3;
11
- }
12
-
13
- .layoutContainer {
14
- display: grid;
15
- grid-template-columns: 60% 40%;
16
- width: 100%;
17
- height: 100%;
18
- max-width: 100%;
19
- max-height: 100%;
20
- overflow: hidden;
21
-
22
- .editorSide {
23
- background-color: #fff;
24
- padding-bottom: 1.25rem;
25
- .editorSectionHead_title {
26
- position: sticky;
27
- top: 0;
28
- z-index: 1399 !important;
29
- }
30
- .editorSectionHead,
31
- .editorSectionHead_title {
32
- span {
33
- width: 100%;
34
- }
35
-
36
- .editorSectionHead_content {
37
- display: flex;
38
- justify-content: space-between;
39
- align-items: center;
40
-
41
- button {
42
- width: 6.25rem;
43
- }
44
- }
45
- }
46
- }
47
-
48
- .livePreviewSide {
49
- background-color: #f8f9fb;
50
- padding: 1.25rem 1.875rem;
51
- }
52
-
53
- .docSide {
54
- max-height: 100%;
55
- overflow-y: overlay;
56
- overflow-x: clip;
57
- scroll-behavior: smooth;
58
- }
59
- }
60
-
61
- :global(.textArea .inputField),
62
- :global(.inputContainer .inputWrapper .innerInputContainer .input) {
63
- padding-inline-end: 2.5rem;
64
- }
65
- }
1
+ .docsLayout {
2
+ display: flex;
3
+ flex-direction: column;
4
+ overflow: hidden;
5
+ height: 100vh;
6
+ max-height: 100%;
7
+
8
+ .apiDocAlert {
9
+ border-radius: 0;
10
+ }
11
+
12
+ .layoutContainer {
13
+ display: grid;
14
+ grid-template-columns: 60% 40%;
15
+ width: 100%;
16
+ height: 100%;
17
+ max-width: 100%;
18
+ max-height: 100%;
19
+ overflow: hidden;
20
+
21
+ .editorSide {
22
+ background-color: #fff;
23
+ padding-bottom: 1.25rem;
24
+ }
25
+
26
+ .livePreviewSide {
27
+ background-color: #f8f9fb;
28
+ padding: 1.875rem;
29
+ }
30
+
31
+ .docSide {
32
+ max-height: 100%;
33
+ overflow-y: overlay;
34
+ overflow-x: clip;
35
+ scroll-behavior: smooth;
36
+ }
37
+ }
38
+ }