@scalar/api-client 1.3.4 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/assets/computer.ascii.js +34 -0
- package/dist/clientBus.js +5 -0
- package/dist/components/ApiClient/AddressBar.vue.d.ts +3 -3
- package/dist/components/ApiClient/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/AddressBar.vue.js +8 -0
- package/dist/components/ApiClient/AddressBar.vue2.js +158 -0
- package/dist/components/ApiClient/AddressBar.vue3.js +4 -0
- package/dist/components/ApiClient/AddressBar.vue4.js +4 -0
- package/dist/components/ApiClient/ApiClient.vue.d.ts +11 -11
- package/dist/components/ApiClient/ApiClient.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/ApiClient.vue.js +124 -0
- package/dist/components/ApiClient/ApiClient.vue2.js +4 -0
- package/dist/components/ApiClient/ApiClient.vue3.js +5 -0
- package/dist/components/ApiClient/Request/Request.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/Request.vue.js +79 -0
- package/dist/components/ApiClient/Request/Request.vue2.js +4 -0
- package/dist/components/ApiClient/Request/Request.vue3.js +5 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardForm.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/CardForm.vue.js +13 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardForm.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormButton.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormButton.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormButton.vue2.js +18 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormButton.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormGroup.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormGroup.vue.js +13 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormGroup.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormRows.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormRows.vue.js +13 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormRows.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormTextInput.vue.d.ts +8 -8
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormTextInput.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormTextInput.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormTextInput.vue2.js +37 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormTextInput.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/RequestAuthentication.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestAuthentication/RequestAuthentication.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/RequestAuthentication.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/RequestAuthentication.vue2.js +86 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/RequestAuthentication.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecurityScheme.vue.d.ts +6 -6
- package/dist/components/ApiClient/Request/RequestAuthentication/SecurityScheme.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/SecurityScheme.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecurityScheme.vue2.js +365 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecurityScheme.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue.d.ts +7 -7
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue2.js +97 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue2.js +64 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/index.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestBody.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestBody.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestBody.vue.js +39 -0
- package/dist/components/ApiClient/Request/RequestBody.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestCookies.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestCookies.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestCookies.vue.js +74 -0
- package/dist/components/ApiClient/Request/RequestCookies.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestCookies.vue3.js +5 -0
- package/dist/components/ApiClient/Request/RequestHeaders.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestHeaders.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestHeaders.vue.js +74 -0
- package/dist/components/ApiClient/Request/RequestHeaders.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestQuery.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestQuery.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestQuery.vue.js +75 -0
- package/dist/components/ApiClient/Request/RequestQuery.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestVariables.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestVariables.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestVariables.vue.js +69 -0
- package/dist/components/ApiClient/Request/RequestVariables.vue2.js +4 -0
- package/dist/components/ApiClient/Request/index.d.ts +1 -1
- package/dist/components/ApiClient/RequestHistory.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/RequestHistory.vue.js +27 -0
- package/dist/components/ApiClient/RequestHistory.vue2.js +4 -0
- package/dist/components/ApiClient/RequestHistory.vue3.js +5 -0
- package/dist/components/ApiClient/RequestHistoryItem.vue.d.ts +3 -3
- package/dist/components/ApiClient/RequestHistoryItem.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/RequestHistoryItem.vue.js +7 -0
- package/dist/components/ApiClient/RequestHistoryItem.vue2.js +49 -0
- package/dist/components/ApiClient/RequestHistoryItem.vue3.js +4 -0
- package/dist/components/ApiClient/RequestMethodSelect.vue.d.ts +11 -11
- package/dist/components/ApiClient/RequestMethodSelect.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/RequestMethodSelect.vue.js +7 -0
- package/dist/components/ApiClient/RequestMethodSelect.vue2.js +42 -0
- package/dist/components/ApiClient/RequestMethodSelect.vue3.js +4 -0
- package/dist/components/ApiClient/Response/Response.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Response/Response.vue.js +65 -0
- package/dist/components/ApiClient/Response/Response.vue2.js +4 -0
- package/dist/components/ApiClient/Response/Response.vue3.js +5 -0
- package/dist/components/ApiClient/Response/ResponseBody.vue.d.ts +3 -3
- package/dist/components/ApiClient/Response/ResponseBody.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Response/ResponseBody.vue.js +54 -0
- package/dist/components/ApiClient/Response/ResponseBody.vue2.js +4 -0
- package/dist/components/ApiClient/Response/ResponseHeaders.vue.d.ts +3 -3
- package/dist/components/ApiClient/Response/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Response/ResponseHeaders.vue.js +76 -0
- package/dist/components/ApiClient/Response/ResponseHeaders.vue2.js +4 -0
- package/dist/components/ApiClient/Response/ResponseMetaInformation.vue.d.ts +3 -3
- package/dist/components/ApiClient/Response/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Response/ResponseMetaInformation.vue.js +56 -0
- package/dist/components/ApiClient/Response/ResponseMetaInformation.vue2.js +4 -0
- package/dist/components/ApiClient/Response/index.d.ts +1 -1
- package/dist/components/ApiClient/index.d.ts +1 -1
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/CollapsibleSection/CollapsibleSection.vue.d.ts +11 -11
- package/dist/components/CollapsibleSection/CollapsibleSection.vue.d.ts.map +1 -1
- package/dist/components/CollapsibleSection/CollapsibleSection.vue.js +76 -0
- package/dist/components/CollapsibleSection/CollapsibleSection.vue2.js +4 -0
- package/dist/components/CollapsibleSection/CollapsibleSection.vue3.js +5 -0
- package/dist/components/CollapsibleSection/index.d.ts +1 -1
- package/dist/components/Grid/Grid.vue.d.ts +3 -3
- package/dist/components/Grid/Grid.vue.d.ts.map +1 -1
- package/dist/components/Grid/Grid.vue.js +7 -0
- package/dist/components/Grid/Grid.vue2.js +77 -0
- package/dist/components/Grid/Grid.vue3.js +4 -0
- package/dist/components/Grid/GridHeader.vue.d.ts +3 -3
- package/dist/components/Grid/GridHeader.vue.d.ts.map +1 -1
- package/dist/components/Grid/GridHeader.vue.js +7 -0
- package/dist/components/Grid/GridHeader.vue2.js +46 -0
- package/dist/components/Grid/GridHeader.vue3.js +4 -0
- package/dist/components/Grid/GridRow.vue.d.ts +8 -8
- package/dist/components/Grid/GridRow.vue.d.ts.map +1 -1
- package/dist/components/Grid/GridRow.vue.js +7 -0
- package/dist/components/Grid/GridRow.vue2.js +29 -0
- package/dist/components/Grid/GridRow.vue3.js +4 -0
- package/dist/components/Grid/GridRowEditable.vue.d.ts +3 -3
- package/dist/components/Grid/GridRowEditable.vue.d.ts.map +1 -1
- package/dist/components/Grid/GridRowEditable.vue.js +7 -0
- package/dist/components/Grid/GridRowEditable.vue2.js +105 -0
- package/dist/components/Grid/GridRowEditable.vue3.js +4 -0
- package/dist/components/Grid/GridRowGenerated.vue.d.ts +4 -4
- package/dist/components/Grid/GridRowGenerated.vue.d.ts.map +1 -1
- package/dist/components/Grid/GridRowGenerated.vue.js +7 -0
- package/dist/components/Grid/GridRowGenerated.vue2.js +37 -0
- package/dist/components/Grid/GridRowGenerated.vue3.js +4 -0
- package/dist/components/Grid/SimpleGrid.vue.d.ts +3 -3
- package/dist/components/Grid/SimpleGrid.vue.d.ts.map +1 -1
- package/dist/components/Grid/SimpleGrid.vue.js +7 -0
- package/dist/components/Grid/SimpleGrid.vue2.js +28 -0
- package/dist/components/Grid/SimpleGrid.vue3.js +4 -0
- package/dist/components/Grid/index.d.ts +2 -2
- package/dist/components/HelpfulLink.vue.d.ts +8 -8
- package/dist/components/HelpfulLink.vue.d.ts.map +1 -1
- package/dist/components/HelpfulLink.vue.js +7 -0
- package/dist/components/HelpfulLink.vue2.js +19 -0
- package/dist/components/HelpfulLink.vue3.js +4 -0
- package/dist/components/HttpMethod.vue.d.ts +9 -8
- package/dist/components/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod.vue.js +27 -0
- package/dist/components/HttpMethod.vue2.js +4 -0
- package/dist/components/ScalarAsciiArt.vue.d.ts +3 -3
- package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue.js +7 -0
- package/dist/components/ScalarAsciiArt.vue2.js +23 -0
- package/dist/components/ScalarAsciiArt.vue3.js +4 -0
- package/dist/components/SimpleTable/SimpleCell.vue.d.ts +13 -12
- package/dist/components/SimpleTable/SimpleCell.vue.d.ts.map +1 -1
- package/dist/components/SimpleTable/SimpleCell.vue.js +7 -0
- package/dist/components/SimpleTable/SimpleCell.vue2.js +28 -0
- package/dist/components/SimpleTable/SimpleCell.vue3.js +4 -0
- package/dist/components/SimpleTable/SimpleHeader.vue.d.ts.map +1 -1
- package/dist/components/SimpleTable/SimpleHeader.vue.js +7 -0
- package/dist/components/SimpleTable/SimpleHeader.vue2.js +19 -0
- package/dist/components/SimpleTable/SimpleHeader.vue3.js +4 -0
- package/dist/components/SimpleTable/SimpleRow.vue.d.ts.map +1 -1
- package/dist/components/SimpleTable/SimpleRow.vue.js +13 -0
- package/dist/components/SimpleTable/SimpleRow.vue2.js +4 -0
- package/dist/components/SimpleTable/SimpleTable.vue.d.ts.map +1 -1
- package/dist/components/SimpleTable/SimpleTable.vue.js +15 -0
- package/dist/components/SimpleTable/SimpleTable.vue2.js +4 -0
- package/dist/components/SimpleTable/index.d.ts +4 -4
- package/dist/fixtures/httpHeaders.js +529 -0
- package/dist/fixtures/httpRequestMethods.js +41 -0
- package/dist/fixtures/index.d.ts +2 -2
- package/dist/helpers/concatenateUrlAndPath.js +9 -0
- package/dist/helpers/createPlaceholderRequest.js +14 -0
- package/dist/helpers/encodeStringAsBase64.js +6 -0
- package/dist/helpers/findVariables.js +7 -0
- package/dist/helpers/getRequestFromAuthentication.d.ts.map +1 -1
- package/dist/helpers/getRequestFromAuthentication.js +83 -0
- package/dist/helpers/getUrlFromServerState.js +12 -0
- package/dist/helpers/humanDiff.js +21 -0
- package/dist/helpers/index.d.ts +16 -16
- package/dist/helpers/mapFromArray.js +9 -0
- package/dist/helpers/normalizeHeaders.js +6 -0
- package/dist/helpers/normalizePath.js +9 -0
- package/dist/helpers/normalizeRequestMethod.d.ts +2 -1
- package/dist/helpers/normalizeRequestMethod.d.ts.map +1 -1
- package/dist/helpers/normalizeRequestMethod.js +14 -0
- package/dist/helpers/normalizeUrl.js +13 -0
- package/dist/helpers/prepareClientRequestConfig.d.ts +0 -7
- package/dist/helpers/prepareClientRequestConfig.d.ts.map +1 -1
- package/dist/helpers/prepareClientRequestConfig.js +41 -0
- package/dist/helpers/redirectToProxy.js +7 -0
- package/dist/helpers/replaceVariables.js +10 -0
- package/dist/helpers/sendRequest.js +111 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +83 -33496
- package/dist/stores/index.d.ts +5 -5
- package/dist/stores/useApiClientStore.js +32 -0
- package/dist/stores/useAuthenticationStore.d.ts +1 -1
- package/dist/stores/useAuthenticationStore.d.ts.map +1 -1
- package/dist/stores/useAuthenticationStore.js +36 -0
- package/dist/stores/useOpenApiStore.d.ts +1 -1
- package/dist/stores/useOpenApiStore.js +24 -0
- package/dist/stores/useRequestStore.js +29 -0
- package/dist/stores/useServerStore.js +18 -0
- package/dist/style.css +1 -2567
- package/package.json +20 -19
- package/dist/Add-yNxGpRcH-B1LyqGlJ.js +0 -21
- package/dist/ArrowLeft-D7tW1xQo-BY1SMb43.js +0 -20
- package/dist/ArrowRight-DmO-sdb2-DYqgcTpu.js +0 -20
- package/dist/Background-CU9VIbfN-DvxzmwCx.js +0 -17
- package/dist/Brackets-CI207-BL-BBaUg7lM.js +0 -21
- package/dist/Branch-CXwj8YuG-IxKqRWkx.js +0 -34
- package/dist/CallToAction-XLYRSI1h-DkdGfSAS.js +0 -20
- package/dist/Checkmark-DhbrPM0P-Bnd3e6-4.js +0 -21
- package/dist/ChevronDown-Co7EAKAv-DHNwXUbS.js +0 -21
- package/dist/ChevronLeft-DYt0idAu-DAzCtmws.js +0 -21
- package/dist/ChevronRight-ylxToVWl-CDFDuBE1.js +0 -21
- package/dist/ChevronUp-xAnukIfj-CuKFLVD3.js +0 -21
- package/dist/Clipboard-CU_KxGEv-DWrQtWVi.js +0 -16
- package/dist/Close-xHiYwS8Q-CWI8mlaM.js +0 -21
- package/dist/CodeFolder-Cv_igzJE-CoWfaY0Z.js +0 -27
- package/dist/Cookie-CEHvXpqB-D960ImBy.js +0 -37
- package/dist/DarkMode-BMR457PH-CVcoMGeO.js +0 -16
- package/dist/Delete-BCZmxrDD-BHoCf_u4.js +0 -21
- package/dist/Discord-BHYOFBB2-NYBGYy-_.js +0 -16
- package/dist/DocsPage-Dwx7ZMU9-D3s0nKun.js +0 -27
- package/dist/Duplicate-DRWEv4R_-5xIOj7QF.js +0 -17
- package/dist/Edit-Br04RNYb-BhCyac4t.js +0 -19
- package/dist/Ellipses-Bo_X36Hx-CsJmKvlE.js +0 -16
- package/dist/Error-C5LiISnw-BIMzByff.js +0 -16
- package/dist/ExternalLink-DK8L-EH7-ANJEzoHO.js +0 -21
- package/dist/FilterList-CS8Il7NE-CagRN2wd.js +0 -21
- package/dist/Folder-CTvnVSEo-B2z_4abD.js +0 -16
- package/dist/GitHub-NdE6Zs9k-BAGzgXH_.js +0 -16
- package/dist/Hide-BgcCtErz-CAC_2jsk.js +0 -27
- package/dist/History-D9nmhNIn-BU9mR55a.js +0 -27
- package/dist/JsonObject-hGdHUQ4M-Cm1hXgAn.js +0 -21
- package/dist/Key-CWXJqX28-DdNUhB11.js +0 -21
- package/dist/Leave-K1J3uwoG-WgTmlwgs.js +0 -21
- package/dist/LightDarkModeToggle-De3vO47x-D3WCuqcH.js +0 -16
- package/dist/LightMode-BeoMphBY-CDedz2JM.js +0 -16
- package/dist/Link-Bzuc__Nc-Bvtx0HZG.js +0 -21
- package/dist/Lock-xhiH1mKz-Rrlr3fGv.js +0 -21
- package/dist/Logo-DwEDtgj--pmO6SPQX.js +0 -19
- package/dist/LogoAPI-CohCfL3L-CzbaXJLs.js +0 -19
- package/dist/LogoClient-Bq5O2QL2-Bw2epmD5.js +0 -16
- package/dist/LogoMarket-DwlApcab-_INRDSLs.js +0 -16
- package/dist/LogoSwagger-CH60H5qW-DFEpFXIU.js +0 -16
- package/dist/Magic-Dsi9_bEc-BYN42_eH.js +0 -21
- package/dist/Menu-CFK5cOsm-CqE9Tsgr.js +0 -21
- package/dist/Page-DA7CO5gc-DfccxJJv.js +0 -17
- package/dist/PaperAirplane-BC-4mGEB-BrV5fX8s.js +0 -21
- package/dist/Payment-hzcXP1Xb-B2G1p4-i.js +0 -21
- package/dist/Play-Cd4-o7Ji-xTTrC7nd.js +0 -16
- package/dist/Refresh-BHRzzQ8P-DMGXg62S.js +0 -27
- package/dist/Response-DsTlT4S--CGVlb2Cj.js +0 -20
- package/dist/Search-DqtlswRG-D-hprEk0.js +0 -19
- package/dist/Show-CbiiMLUa-G7jnye-t.js +0 -27
- package/dist/SideBarClosed-K53-CtXh-DmurFyoL.js +0 -17
- package/dist/SideBarOpen-C7UgT82P-BG6NE13Z.js +0 -21
- package/dist/Sort-CaVMT7jM-CseseOA9.js +0 -16
- package/dist/Terminal-DJ7x2McL-BUB3Qs0m.js +0 -27
- package/dist/ThumbsDown-BMgnsASL-B2YFxB8i.js +0 -21
- package/dist/ThumbsUp-C1j6zY2j-DKqh3z1D.js +0 -21
- package/dist/Trash-BpA3zWPD-BAjuQdys.js +0 -21
- package/dist/Unlock-HVYHMLxl-D89vmw_N.js +0 -16
- package/dist/Upload-D_pwqBDY-Bg4YHBfw.js +0 -16
- package/dist/User-BLGkPc5I-XzPjc0Gv.js +0 -16
- package/dist/prism-autoloader-Dlh8Vzlw-BR-Zk31i.js +0 -370
- package/dist/programming-framework-angular-DD4Vjgbk-Bzc9D9am.js +0 -16
- package/dist/programming-framework-astro-CLfrRt19-CfPlyy6T.js +0 -16
- package/dist/programming-framework-laravel-kAy2wVLy-Cty_4oXq.js +0 -21
- package/dist/programming-framework-nextdotjs-BKdd_DY_-DUTv-t1Q.js +0 -16
- package/dist/programming-framework-react-PDgmtZuN-DdUogL85.js +0 -16
- package/dist/programming-framework-vuedotjs-Cim7D5tw-COH3lflr.js +0 -17
- package/dist/programming-language-c-hPGu2Zvg-QG1pSdJG.js +0 -16
- package/dist/programming-language-clojure-uqYXn7U6-UAUP9oZz.js +0 -16
- package/dist/programming-language-csharp-CGxYkVA6-DkAhKOzF.js +0 -16
- package/dist/programming-language-css3-Dpp4Cr6b-Bf5XF7-p.js +0 -16
- package/dist/programming-language-go-CuKo8iD9-Dkewryvm.js +0 -16
- package/dist/programming-language-html5-DlqJK4EL-Bl9dTA-D.js +0 -16
- package/dist/programming-language-http-f3NXC-Ae-BY_awyxD.js +0 -16
- package/dist/programming-language-java-BBodetdf-BHELDLTj.js +0 -18
- package/dist/programming-language-javascript-VxLvi1QG-DFjYF_MP.js +0 -16
- package/dist/programming-language-json-Dq_K-q5f-BlovheYp.js +0 -17
- package/dist/programming-language-kotlin-eTASnmL3-D8AoUcB1.js +0 -16
- package/dist/programming-language-node-oucaVOgY-CzP8mlvs.js +0 -17
- package/dist/programming-language-objc-CPgQxmNi-DjsFgTok.js +0 -17
- package/dist/programming-language-ocaml-Q1-Jv5Q5-D2vDLKwp.js +0 -16
- package/dist/programming-language-php-GY38f8r4-DQ_8EMFH.js +0 -16
- package/dist/programming-language-powershell-xLOxAYP_-DAvJS1A9.js +0 -20
- package/dist/programming-language-python-Ct-_kNjo-BCrlyfv0.js +0 -16
- package/dist/programming-language-r-Ch3T1qiC-I_IE4uwz.js +0 -20
- package/dist/programming-language-ruby-DhdM4d7g-Dd3La6Kn.js +0 -16
- package/dist/programming-language-scala-BVg0dToJ-Bz_n-CNw.js +0 -16
- package/dist/programming-language-shell-uj1zoCVW-Bg0d3E28.js +0 -16
- package/dist/programming-language-swift-Dn72xPjg-BUvu5_SV.js +0 -16
- package/dist/programming-language-typescript-CdF-HuRi-CaDO02MW.js +0 -16
- package/dist/programming-script-code-CUHv6qR8-CzD7HjI2.js +0 -21
- package/dist/programming-tool-git-C-BMJCAo-BFJIU2--.js +0 -16
- package/dist/programming-tool-tailwindcss-xjXi0E6g-ky2wbsII.js +0 -16
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { defineComponent as J, computed as Q, openBlock as n, createBlock as w, withCtx as s, unref as u, createElementBlock as P, Fragment as C, createTextVNode as c, toDisplayString as X, createCommentVNode as f, createVNode as i, createElementVNode as W } from "vue";
|
|
2
|
+
import { useToasts as Y } from "@scalar/use-toasts";
|
|
3
|
+
import Z from "./CardForm.vue.js";
|
|
4
|
+
import _ from "./CardFormButton.vue.js";
|
|
5
|
+
import b from "./CardFormGroup.vue.js";
|
|
6
|
+
import j from "./CardFormRows.vue.js";
|
|
7
|
+
import v from "./CardFormTextInput.vue.js";
|
|
8
|
+
import K from "./SecuritySchemeScopes.vue.js";
|
|
9
|
+
import { getUrlFromServerState as x } from "../../../../helpers/getUrlFromServerState.js";
|
|
10
|
+
import { useServerStore as ee } from "../../../../stores/useServerStore.js";
|
|
11
|
+
import { redirectToProxy as te } from "../../../../helpers/redirectToProxy.js";
|
|
12
|
+
import { useAuthenticationStore as ae } from "../../../../stores/useAuthenticationStore.js";
|
|
13
|
+
import { concatenateUrlAndPath as oe } from "../../../../helpers/concatenateUrlAndPath.js";
|
|
14
|
+
const Ae = /* @__PURE__ */ J({
|
|
15
|
+
__name: "SecurityScheme",
|
|
16
|
+
props: {
|
|
17
|
+
value: {},
|
|
18
|
+
proxy: {}
|
|
19
|
+
},
|
|
20
|
+
setup(se) {
|
|
21
|
+
const { toast: R } = Y(), { server: L } = ee(), { authentication: t, setAuthentication: p } = ae(), N = (e) => {
|
|
22
|
+
p({
|
|
23
|
+
apiKey: {
|
|
24
|
+
...t.apiKey,
|
|
25
|
+
token: e.target.value
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}, V = (e) => {
|
|
29
|
+
p({
|
|
30
|
+
http: {
|
|
31
|
+
...t.http,
|
|
32
|
+
basic: {
|
|
33
|
+
...t.http.basic,
|
|
34
|
+
username: e.target.value
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}, D = (e) => {
|
|
39
|
+
p({
|
|
40
|
+
http: {
|
|
41
|
+
...t.http,
|
|
42
|
+
basic: {
|
|
43
|
+
...t.http.basic,
|
|
44
|
+
password: e.target.value
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}, E = (e) => {
|
|
49
|
+
p({
|
|
50
|
+
http: {
|
|
51
|
+
...t.http,
|
|
52
|
+
bearer: {
|
|
53
|
+
...t.http.bearer,
|
|
54
|
+
token: e.target.value
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}, S = (e) => {
|
|
59
|
+
p({
|
|
60
|
+
oAuth2: {
|
|
61
|
+
...t.oAuth2,
|
|
62
|
+
clientId: e.target.value
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}, H = (e) => {
|
|
66
|
+
p({
|
|
67
|
+
oAuth2: {
|
|
68
|
+
...t.oAuth2,
|
|
69
|
+
username: e.target.value
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}, G = (e) => {
|
|
73
|
+
p({
|
|
74
|
+
oAuth2: {
|
|
75
|
+
...t.oAuth2,
|
|
76
|
+
password: e.target.value
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
function M(e) {
|
|
81
|
+
const a = t.oAuth2.scopes.join(" "), l = (Math.random() + 1).toString(36).substring(7), o = new URL(e.authorizationUrl);
|
|
82
|
+
return p({
|
|
83
|
+
oAuth2: { ...t.oAuth2, state: l }
|
|
84
|
+
}), o.searchParams.set("response_type", "token"), o.searchParams.set("client_id", t.oAuth2.clientId), o.searchParams.set("redirect_uri", window.location.href), o.searchParams.set("scope", a), o.searchParams.set("state", l), o.toString();
|
|
85
|
+
}
|
|
86
|
+
function $(e, a) {
|
|
87
|
+
if (typeof e != "string") {
|
|
88
|
+
console.log("tokenUrl is not a string");
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const l = a != null && a.baseUrl && !e.startsWith("http") ? oe(a == null ? void 0 : a.baseUrl, e) : e, o = new URL(l);
|
|
92
|
+
o.searchParams.set("grant_type", "password"), o.searchParams.set("username", t.oAuth2.username), o.searchParams.set("password", t.oAuth2.password), o.searchParams.set("client_id", t.oAuth2.clientId), o.searchParams.set("scope", t.oAuth2.scopes.join(" ")), fetch(
|
|
93
|
+
a != null && a.proxy ? te(a == null ? void 0 : a.proxy, o.toString()) : o.toString(),
|
|
94
|
+
{
|
|
95
|
+
method: "POST",
|
|
96
|
+
headers: {
|
|
97
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
).then((r) => {
|
|
101
|
+
if (!r.ok)
|
|
102
|
+
throw new Error(
|
|
103
|
+
"Failed to get an access token. Please check your credentials."
|
|
104
|
+
);
|
|
105
|
+
return r.json();
|
|
106
|
+
}).then((r) => {
|
|
107
|
+
p({
|
|
108
|
+
oAuth2: { ...t.oAuth2, accessToken: r.access_token }
|
|
109
|
+
});
|
|
110
|
+
}).catch((r) => {
|
|
111
|
+
R("Couldn’t retrieve the password grant token", "warn", {
|
|
112
|
+
description: "Open your browser console to get more information."
|
|
113
|
+
}), console.error("[authorizeWithPassword]", r);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
const I = Q({
|
|
117
|
+
get: () => t.oAuth2.scopes,
|
|
118
|
+
set: (e) => p({ oAuth2: { ...t.oAuth2, scopes: e } })
|
|
119
|
+
}), q = (e) => {
|
|
120
|
+
const l = window.open(e, "openAuth2Window", "left=100,top=100,width=800,height=600");
|
|
121
|
+
if (l) {
|
|
122
|
+
const o = setInterval(function() {
|
|
123
|
+
var r;
|
|
124
|
+
try {
|
|
125
|
+
const h = new URLSearchParams(l.location.href).get("access_token");
|
|
126
|
+
if (l.closed || h) {
|
|
127
|
+
clearInterval(o);
|
|
128
|
+
const m = (r = l.location.href.match(/state=([^&]*)/)) == null ? void 0 : r[1];
|
|
129
|
+
h && t.oAuth2.state === m && p({
|
|
130
|
+
oAuth2: { ...t.oAuth2, accessToken: h }
|
|
131
|
+
}), l.close();
|
|
132
|
+
}
|
|
133
|
+
} catch {
|
|
134
|
+
}
|
|
135
|
+
}, 200);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
return (e, a) => {
|
|
139
|
+
var l;
|
|
140
|
+
return e.value && ((l = e.value) != null && l.type) ? (n(), w(Z, { key: 0 }, {
|
|
141
|
+
default: s(() => [
|
|
142
|
+
e.value.type === "apiKey" ? (n(), w(v, {
|
|
143
|
+
key: 0,
|
|
144
|
+
id: `security-scheme-${e.value.name}`,
|
|
145
|
+
placeholder: "Token",
|
|
146
|
+
type: "password",
|
|
147
|
+
value: u(t).apiKey.token,
|
|
148
|
+
onInput: N
|
|
149
|
+
}, {
|
|
150
|
+
default: s(() => {
|
|
151
|
+
var o, r, d;
|
|
152
|
+
return [
|
|
153
|
+
e.value.in ? (n(), P(C, { key: 0 }, [
|
|
154
|
+
c(X(((r = (o = e.value.in) == null ? void 0 : o.charAt(0)) == null ? void 0 : r.toUpperCase()) + ((d = e.value.in) == null ? void 0 : d.slice(1))), 1)
|
|
155
|
+
], 64)) : f("", !0),
|
|
156
|
+
c(" API ")
|
|
157
|
+
];
|
|
158
|
+
}),
|
|
159
|
+
_: 1
|
|
160
|
+
}, 8, ["id", "value"])) : e.value.type === "http" || e.value.type === "basic" ? (n(), P(C, { key: 1 }, [
|
|
161
|
+
e.value.type === "basic" || e.value.scheme === "basic" ? (n(), w(b, { key: 0 }, {
|
|
162
|
+
default: s(() => [
|
|
163
|
+
i(v, {
|
|
164
|
+
id: "http.basic.username",
|
|
165
|
+
placeholder: "Username",
|
|
166
|
+
value: u(t).http.basic.username,
|
|
167
|
+
onInput: V
|
|
168
|
+
}, {
|
|
169
|
+
default: s(() => [
|
|
170
|
+
c(" Username ")
|
|
171
|
+
]),
|
|
172
|
+
_: 1
|
|
173
|
+
}, 8, ["value"]),
|
|
174
|
+
i(v, {
|
|
175
|
+
id: "http.basic.password",
|
|
176
|
+
placeholder: "Password",
|
|
177
|
+
type: "password",
|
|
178
|
+
value: u(t).http.basic.password,
|
|
179
|
+
onInput: D
|
|
180
|
+
}, {
|
|
181
|
+
default: s(() => [
|
|
182
|
+
c(" Password ")
|
|
183
|
+
]),
|
|
184
|
+
_: 1
|
|
185
|
+
}, 8, ["value"])
|
|
186
|
+
]),
|
|
187
|
+
_: 1
|
|
188
|
+
})) : e.value.type === "http" && e.value.scheme === "bearer" ? (n(), w(v, {
|
|
189
|
+
key: 1,
|
|
190
|
+
id: "http.bearer.token",
|
|
191
|
+
placeholder: "Token",
|
|
192
|
+
type: "password",
|
|
193
|
+
value: u(t).http.bearer.token,
|
|
194
|
+
onInput: E
|
|
195
|
+
}, {
|
|
196
|
+
default: s(() => [
|
|
197
|
+
c(" Bearer Token ")
|
|
198
|
+
]),
|
|
199
|
+
_: 1
|
|
200
|
+
}, 8, ["value"])) : f("", !0)
|
|
201
|
+
], 64)) : e.value.type.toLowerCase() === "oauth2" && e.value.flows ? (n(), w(b, { key: 2 }, {
|
|
202
|
+
default: s(() => {
|
|
203
|
+
var o, r;
|
|
204
|
+
return [
|
|
205
|
+
e.value.flows.implicit ? (n(), P(C, { key: 0 }, [
|
|
206
|
+
u(t).oAuth2.accessToken ? (n(), P(C, { key: 0 }, [
|
|
207
|
+
i(v, {
|
|
208
|
+
id: "oAuth2.accessToken",
|
|
209
|
+
placeholder: "xxxxx",
|
|
210
|
+
type: "password",
|
|
211
|
+
value: u(t).oAuth2.accessToken
|
|
212
|
+
}, {
|
|
213
|
+
default: s(() => [
|
|
214
|
+
c(" Access Token ")
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
}, 8, ["value"]),
|
|
218
|
+
i(_, {
|
|
219
|
+
onClick: a[0] || (a[0] = () => u(p)({
|
|
220
|
+
oAuth2: {
|
|
221
|
+
...u(t).oAuth2,
|
|
222
|
+
accessToken: "",
|
|
223
|
+
state: ""
|
|
224
|
+
}
|
|
225
|
+
}))
|
|
226
|
+
}, {
|
|
227
|
+
default: s(() => [
|
|
228
|
+
c(" Reset ")
|
|
229
|
+
]),
|
|
230
|
+
_: 1
|
|
231
|
+
})
|
|
232
|
+
], 64)) : f("", !0)
|
|
233
|
+
], 64)) : f("", !0),
|
|
234
|
+
(r = (o = e.value) == null ? void 0 : o.flows) != null && r.password ? (n(), w(j, { key: 1 }, {
|
|
235
|
+
default: s(() => [
|
|
236
|
+
i(b, null, {
|
|
237
|
+
default: s(() => [
|
|
238
|
+
i(v, {
|
|
239
|
+
id: "oAuth2.username",
|
|
240
|
+
placeholder: "Username",
|
|
241
|
+
value: u(t).oAuth2.username,
|
|
242
|
+
onInput: H
|
|
243
|
+
}, {
|
|
244
|
+
default: s(() => [
|
|
245
|
+
c(" Username ")
|
|
246
|
+
]),
|
|
247
|
+
_: 1
|
|
248
|
+
}, 8, ["value"]),
|
|
249
|
+
i(v, {
|
|
250
|
+
id: "oAuth2.password",
|
|
251
|
+
placeholder: "Password",
|
|
252
|
+
type: "password",
|
|
253
|
+
value: u(t).oAuth2.password,
|
|
254
|
+
onInput: G
|
|
255
|
+
}, {
|
|
256
|
+
default: s(() => [
|
|
257
|
+
c(" Password ")
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
}, 8, ["value"])
|
|
261
|
+
]),
|
|
262
|
+
_: 1
|
|
263
|
+
}),
|
|
264
|
+
i(b, null, {
|
|
265
|
+
default: s(() => {
|
|
266
|
+
var d, h, m, A, y, k, T, U, F, B, O;
|
|
267
|
+
return [
|
|
268
|
+
i(v, {
|
|
269
|
+
id: "oAuth2.clientId",
|
|
270
|
+
placeholder: "12345",
|
|
271
|
+
type: "text",
|
|
272
|
+
value: u(t).oAuth2.clientId,
|
|
273
|
+
onInput: S
|
|
274
|
+
}, {
|
|
275
|
+
default: s(() => [
|
|
276
|
+
c(" Client ID ")
|
|
277
|
+
]),
|
|
278
|
+
_: 1
|
|
279
|
+
}, 8, ["value"]),
|
|
280
|
+
e.value !== void 0 && Object.entries(
|
|
281
|
+
((m = (h = (d = e.value) == null ? void 0 : d.flows) == null ? void 0 : h.implicit) == null ? void 0 : m.scopes) ?? ((k = (y = (A = e.value) == null ? void 0 : A.flows) == null ? void 0 : y.password) == null ? void 0 : k.scopes) ?? {}
|
|
282
|
+
).length > 0 ? (n(), w(K, {
|
|
283
|
+
key: 0,
|
|
284
|
+
selected: I.value,
|
|
285
|
+
"onUpdate:selected": a[1] || (a[1] = (g) => I.value = g),
|
|
286
|
+
scopes: ((F = (U = (T = e.value) == null ? void 0 : T.flows) == null ? void 0 : U.implicit) == null ? void 0 : F.scopes) ?? ((O = (B = e.value) == null ? void 0 : B.flows) == null ? void 0 : O.password.scopes)
|
|
287
|
+
}, null, 8, ["selected", "scopes"])) : f("", !0),
|
|
288
|
+
W("button", {
|
|
289
|
+
class: "cardform-auth-button",
|
|
290
|
+
type: "button",
|
|
291
|
+
onClick: a[2] || (a[2] = () => {
|
|
292
|
+
var g, z;
|
|
293
|
+
return $(
|
|
294
|
+
(z = (g = e.value.flows) == null ? void 0 : g.password) == null ? void 0 : z.tokenUrl,
|
|
295
|
+
{
|
|
296
|
+
baseUrl: u(x)(u(L)),
|
|
297
|
+
proxy: e.proxy
|
|
298
|
+
}
|
|
299
|
+
);
|
|
300
|
+
})
|
|
301
|
+
}, " Authorize ")
|
|
302
|
+
];
|
|
303
|
+
}),
|
|
304
|
+
_: 1
|
|
305
|
+
})
|
|
306
|
+
]),
|
|
307
|
+
_: 1
|
|
308
|
+
})) : (n(), w(j, { key: 2 }, {
|
|
309
|
+
default: s(() => [
|
|
310
|
+
i(b, null, {
|
|
311
|
+
default: s(() => {
|
|
312
|
+
var d, h;
|
|
313
|
+
return [
|
|
314
|
+
i(v, {
|
|
315
|
+
id: "oAuth2.clientId",
|
|
316
|
+
placeholder: "12345",
|
|
317
|
+
type: "text",
|
|
318
|
+
value: u(t).oAuth2.clientId,
|
|
319
|
+
onInput: S
|
|
320
|
+
}, {
|
|
321
|
+
default: s(() => [
|
|
322
|
+
c(" Client ID ")
|
|
323
|
+
]),
|
|
324
|
+
_: 1
|
|
325
|
+
}, 8, ["value"]),
|
|
326
|
+
e.value !== void 0 && Object.entries(
|
|
327
|
+
((d = e.value.flows.implicit) == null ? void 0 : d.scopes) ?? e.value.flows.password.scopes
|
|
328
|
+
).length > 0 ? (n(), w(K, {
|
|
329
|
+
key: 0,
|
|
330
|
+
selected: I.value,
|
|
331
|
+
"onUpdate:selected": a[3] || (a[3] = (m) => I.value = m),
|
|
332
|
+
scopes: ((h = e.value.flows.implicit) == null ? void 0 : h.scopes) ?? e.value.flows.password.scopes
|
|
333
|
+
}, null, 8, ["selected", "scopes"])) : f("", !0),
|
|
334
|
+
W("button", {
|
|
335
|
+
class: "cardform-auth-button",
|
|
336
|
+
type: "button",
|
|
337
|
+
onClick: a[4] || (a[4] = () => {
|
|
338
|
+
var m, A, y, k;
|
|
339
|
+
return q(
|
|
340
|
+
M(
|
|
341
|
+
((A = (m = e.value) == null ? void 0 : m.flows) == null ? void 0 : A.implicit) ?? ((k = (y = e.value) == null ? void 0 : y.flows) == null ? void 0 : k.password)
|
|
342
|
+
)
|
|
343
|
+
);
|
|
344
|
+
})
|
|
345
|
+
}, " Authorize ")
|
|
346
|
+
];
|
|
347
|
+
}),
|
|
348
|
+
_: 1
|
|
349
|
+
})
|
|
350
|
+
]),
|
|
351
|
+
_: 1
|
|
352
|
+
}))
|
|
353
|
+
];
|
|
354
|
+
}),
|
|
355
|
+
_: 1
|
|
356
|
+
})) : f("", !0)
|
|
357
|
+
]),
|
|
358
|
+
_: 1
|
|
359
|
+
})) : f("", !0);
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
export {
|
|
364
|
+
Ae as default
|
|
365
|
+
};
|
package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
-
scopes
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
|
+
scopes?: {
|
|
3
3
|
[scope: string]: string;
|
|
4
|
-
};
|
|
4
|
+
} | undefined;
|
|
5
5
|
selected: string[];
|
|
6
6
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
"update:selected": (v: string[]) => void;
|
|
8
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<
|
|
9
|
-
scopes
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
9
|
+
scopes?: {
|
|
10
10
|
[scope: string]: string;
|
|
11
|
-
};
|
|
11
|
+
} | undefined;
|
|
12
12
|
selected: string[];
|
|
13
13
|
}>>> & {
|
|
14
14
|
"onUpdate:selected"?: ((v: string[]) => any) | undefined;
|
|
15
15
|
}, {}, {}>;
|
|
16
16
|
export default _default;
|
|
17
17
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
-
type
|
|
18
|
+
type __VLS_TypePropsToOption<T> = {
|
|
19
19
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
20
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
21
|
} : {
|
package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecuritySchemeScopes.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue
|
|
1
|
+
{"version":3,"file":"SecuritySchemeScopes.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;AAuZA,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { defineComponent as C, ref as h, computed as V, openBlock as n, createBlock as p, unref as e, withCtx as l, createElementVNode as t, normalizeClass as _, createVNode as r, createTextVNode as w, toDisplayString as c, Teleport as B, normalizeStyle as L, createElementBlock as O, Fragment as I, renderList as N, createCommentVNode as j, pushScopeId as z, popScopeId as E } from "vue";
|
|
2
|
+
import { useFloating as F, autoUpdate as U, offset as D, flip as T, shift as M } from "@floating-ui/vue";
|
|
3
|
+
import { Listbox as R, ListboxButton as q, ListboxOptions as A, ListboxOption as G } from "@headlessui/vue";
|
|
4
|
+
import { ScalarIcon as H } from "@scalar/components";
|
|
5
|
+
import { ResetStyles as J } from "@scalar/themes";
|
|
6
|
+
import K from "./CardFormButton.vue.js";
|
|
7
|
+
const P = (o) => (z("data-v-ab898ada"), o = o(), E(), o), Q = { class: "scopes-label" }, W = /* @__PURE__ */ P(() => /* @__PURE__ */ t("em", null, "/", -1)), X = ["checked"], Y = { class: "dropdown-item-title" }, Z = { class: "dropdown-item-description" }, de = /* @__PURE__ */ C({
|
|
8
|
+
__name: "SecuritySchemeScopes",
|
|
9
|
+
props: {
|
|
10
|
+
scopes: {},
|
|
11
|
+
selected: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:selected"],
|
|
14
|
+
setup(o, { emit: b }) {
|
|
15
|
+
const g = o, v = b, m = h(), u = h(), { floatingStyles: S } = F(m, u, {
|
|
16
|
+
placement: "bottom-end",
|
|
17
|
+
whileElementsMounted: U,
|
|
18
|
+
middleware: [D(5), T(), M()]
|
|
19
|
+
}), a = V({
|
|
20
|
+
get: () => g.selected,
|
|
21
|
+
set: (s) => v("update:selected", s)
|
|
22
|
+
});
|
|
23
|
+
return (s, f) => Object.keys(s.scopes ?? {}).length ? (n(), p(e(R), {
|
|
24
|
+
key: 0,
|
|
25
|
+
modelValue: a.value,
|
|
26
|
+
"onUpdate:modelValue": f[0] || (f[0] = (d) => a.value = d),
|
|
27
|
+
multiple: ""
|
|
28
|
+
}, {
|
|
29
|
+
default: l(({ open: d }) => [
|
|
30
|
+
t("div", {
|
|
31
|
+
ref_key: "trigger",
|
|
32
|
+
ref: m,
|
|
33
|
+
class: _(["wrapper", { "wrapper-open": d }])
|
|
34
|
+
}, [
|
|
35
|
+
r(e(q), { as: K }, {
|
|
36
|
+
default: l(() => [
|
|
37
|
+
t("div", Q, [
|
|
38
|
+
w(" Scopes " + c(a.value.length), 1),
|
|
39
|
+
W,
|
|
40
|
+
w(c(Object.entries(s.scopes ?? {}).length) + " ", 1),
|
|
41
|
+
r(e(H), {
|
|
42
|
+
icon: d ? "ChevronUp" : "ChevronDown",
|
|
43
|
+
size: "sm"
|
|
44
|
+
}, null, 8, ["icon"])
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
_: 2
|
|
48
|
+
}, 1024)
|
|
49
|
+
], 2),
|
|
50
|
+
(n(), p(B, { to: "body" }, [
|
|
51
|
+
r(e(J), null, {
|
|
52
|
+
default: l(({ styles: y }) => [
|
|
53
|
+
t("div", {
|
|
54
|
+
ref_key: "dropdown",
|
|
55
|
+
ref: u,
|
|
56
|
+
class: _(["floating", y]),
|
|
57
|
+
style: L(e(S))
|
|
58
|
+
}, [
|
|
59
|
+
r(e(A), {
|
|
60
|
+
as: "dl",
|
|
61
|
+
class: "dropdown"
|
|
62
|
+
}, {
|
|
63
|
+
default: l(() => [
|
|
64
|
+
(n(!0), O(I, null, N(Object.entries(s.scopes ?? {}), ([i, k]) => (n(), p(e(G), {
|
|
65
|
+
key: i,
|
|
66
|
+
as: "div",
|
|
67
|
+
class: "dropdown-item",
|
|
68
|
+
value: i
|
|
69
|
+
}, {
|
|
70
|
+
default: l(({ selected: x }) => [
|
|
71
|
+
t("input", {
|
|
72
|
+
checked: x,
|
|
73
|
+
class: "dropdown-item-check",
|
|
74
|
+
tabindex: "-1",
|
|
75
|
+
type: "checkbox"
|
|
76
|
+
}, null, 8, X),
|
|
77
|
+
t("dt", Y, c(i), 1),
|
|
78
|
+
t("dd", Z, c(k), 1)
|
|
79
|
+
]),
|
|
80
|
+
_: 2
|
|
81
|
+
}, 1032, ["value"]))), 128))
|
|
82
|
+
]),
|
|
83
|
+
_: 1
|
|
84
|
+
})
|
|
85
|
+
], 6)
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
})
|
|
89
|
+
]))
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
}, 8, ["modelValue"])) : j("", !0);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
export {
|
|
96
|
+
de as default
|
|
97
|
+
};
|
package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-parser';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
3
|
value?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3.SecuritySchemeObject> | {
|
|
4
4
|
[key: string]: OpenAPIV3.ReferenceObject | OpenAPIV3.SecuritySchemeObject;
|
|
5
5
|
} | undefined;
|
|
6
6
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
input: (key: string) => void;
|
|
8
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
9
9
|
value?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3.SecuritySchemeObject> | {
|
|
10
10
|
[key: string]: OpenAPIV3.ReferenceObject | OpenAPIV3.SecuritySchemeObject;
|
|
11
11
|
} | undefined;
|
|
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
14
14
|
}, {}, {}>;
|
|
15
15
|
export default _default;
|
|
16
16
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
17
|
-
type
|
|
17
|
+
type __VLS_TypePropsToOption<T> = {
|
|
18
18
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
19
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
20
|
} : {
|
package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecuritySchemeSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue
|
|
1
|
+
{"version":3,"file":"SecuritySchemeSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue"],"names":[],"mappings":"AA0LA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;;;;;;;;;;;;;;AAiMpE,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue2.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineComponent as N, onMounted as O, onServerPrefetch as k, computed as B, openBlock as a, createElementBlock as i, toDisplayString as d, createElementVNode as y, unref as c, createVNode as j, withModifiers as K, Fragment as P, renderList as V, createCommentVNode as $, pushScopeId as D, popScopeId as E } from "vue";
|
|
2
|
+
import { ScalarIcon as F } from "@scalar/components";
|
|
3
|
+
import { useAuthenticationStore as H } from "../../../../stores/useAuthenticationStore.js";
|
|
4
|
+
const M = (r) => (D("data-v-daca0c64"), r = r(), E(), r), T = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "security-scheme-label"
|
|
7
|
+
}, z = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "security-scheme-selector"
|
|
10
|
+
}, q = { class: "security-scheme-label" }, G = ["value"], J = /* @__PURE__ */ M(() => /* @__PURE__ */ y("option", { value: "" }, "None", -1)), Q = ["value"], X = /* @__PURE__ */ N({
|
|
11
|
+
__name: "SecuritySchemeSelector",
|
|
12
|
+
props: {
|
|
13
|
+
value: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["input"],
|
|
16
|
+
setup(r, { emit: v }) {
|
|
17
|
+
const l = r, m = v, { authentication: o, setAuthentication: _ } = H(), A = (e) => {
|
|
18
|
+
p(e.target.value);
|
|
19
|
+
};
|
|
20
|
+
O(() => {
|
|
21
|
+
o.preferredSecurityScheme || p(Object.keys(l.value ?? {})[0] ?? null);
|
|
22
|
+
});
|
|
23
|
+
const p = (e) => {
|
|
24
|
+
_({
|
|
25
|
+
preferredSecurityScheme: e
|
|
26
|
+
}), m("input", e);
|
|
27
|
+
};
|
|
28
|
+
k(
|
|
29
|
+
() => p(Object.keys(l.value ?? {})[0] ?? null)
|
|
30
|
+
);
|
|
31
|
+
const w = (e) => !(e != null && e.type), b = (e) => e.type.toLowerCase() === "apikey", C = (e) => e.type === "http" && e.scheme.toLowerCase() === "basic" || e.type.toLowerCase() === "basic", I = (e) => e.type === "http" && e.scheme.toLowerCase() === "bearer", L = (e) => e.type.toLowerCase() === "oauth2", h = (e, t) => `${g(e)} (${t})`, g = (e) => {
|
|
32
|
+
var t, s;
|
|
33
|
+
return w(e) ? "No Authentication" : b(e) ? "API Key" : C(e) ? "Basic Authentication" : I(e) ? "Bearer Authentication" : L(e) ? (t = e.flows) != null && t.implicit ? "OAuth 2.0 Implicit" : (s = e.flows) != null && s.password ? "OAuth 2.0 Password" : "OAuth 2.0" : `${e.type} (not yet supported)`;
|
|
34
|
+
}, n = B(() => Object.keys(l.value ?? {}));
|
|
35
|
+
return (e, t) => {
|
|
36
|
+
var s, f;
|
|
37
|
+
return n.value.length === 1 ? (a(), i("div", T, d(h((s = e.value) == null ? void 0 : s[n.value[0]], n.value[0])), 1)) : n.value.length > 1 ? (a(), i("div", z, [
|
|
38
|
+
y("span", q, d(c(o).preferredSecurityScheme ? h(
|
|
39
|
+
(f = e.value) == null ? void 0 : f[c(o).preferredSecurityScheme],
|
|
40
|
+
c(o).preferredSecurityScheme
|
|
41
|
+
) : "None"), 1),
|
|
42
|
+
j(c(F), { icon: "ChevronDown" }),
|
|
43
|
+
y("select", {
|
|
44
|
+
value: c(o).preferredSecurityScheme,
|
|
45
|
+
onClick: t[0] || (t[0] = K(() => {
|
|
46
|
+
}, ["prevent"])),
|
|
47
|
+
onInput: A
|
|
48
|
+
}, [
|
|
49
|
+
J,
|
|
50
|
+
(a(!0), i(P, null, V(n.value, (u) => {
|
|
51
|
+
var S;
|
|
52
|
+
return a(), i("option", {
|
|
53
|
+
key: u,
|
|
54
|
+
value: u ?? null
|
|
55
|
+
}, d(h((S = e.value) == null ? void 0 : S[u], u)), 9, Q);
|
|
56
|
+
}), 128))
|
|
57
|
+
], 40, G)
|
|
58
|
+
])) : $("", !0);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
X as default
|
|
64
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as RequestAuthentication } from './RequestAuthentication.vue';
|
|
2
|
-
export { default as SecurityScheme } from './SecurityScheme.vue';
|
|
3
|
-
export { default as SecuritySchemeSelector } from './SecuritySchemeSelector.vue';
|
|
1
|
+
export { default as RequestAuthentication } from './RequestAuthentication.vue.js';
|
|
2
|
+
export { default as SecurityScheme } from './SecurityScheme.vue.js';
|
|
3
|
+
export { default as SecuritySchemeSelector } from './SecuritySchemeSelector.vue.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
2
|
body?: string | undefined;
|
|
3
3
|
formData?: any[] | undefined;
|
|
4
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<
|
|
4
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
5
5
|
body?: string | undefined;
|
|
6
6
|
formData?: any[] | undefined;
|
|
7
7
|
}>>>, {}, {}>;
|
|
8
8
|
export default _default;
|
|
9
9
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
-
type
|
|
10
|
+
type __VLS_TypePropsToOption<T> = {
|
|
11
11
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
12
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
13
|
} : {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestBody.vue
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestBody.vue"],"names":[],"mappings":";;;;;;;AA+JA,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|