@scalar/api-client 2.38.1 → 2.38.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/AddressBar-B4xnl66I.js +302 -0
- package/dist/AddressBar-B4xnl66I.js.map +1 -0
- package/dist/App-BVH4lIe8.js +533 -0
- package/dist/App-BVH4lIe8.js.map +1 -0
- package/dist/App-CvClwSlM.js +2510 -0
- package/dist/App-CvClwSlM.js.map +1 -0
- package/dist/CodeInput-C-igR77V.js +694 -0
- package/dist/CodeInput-C-igR77V.js.map +1 -0
- package/dist/CodeSnippet-D7Heh1nd.js +218 -0
- package/dist/CodeSnippet-D7Heh1nd.js.map +1 -0
- package/dist/Collection-4MT9WmDD.js +219 -0
- package/dist/Collection-4MT9WmDD.js.map +1 -0
- package/dist/CollectionAuthentication-MHWQpw74.js +56 -0
- package/dist/CollectionAuthentication-MHWQpw74.js.map +1 -0
- package/dist/CollectionCookies-DyjPPMdt.js +19 -0
- package/dist/CollectionCookies-DyjPPMdt.js.map +1 -0
- package/dist/CollectionEnvironment-Dw35vIqo.js +514 -0
- package/dist/CollectionEnvironment-Dw35vIqo.js.map +1 -0
- package/dist/CollectionOverview-TUdDIu5f.js +131 -0
- package/dist/CollectionOverview-TUdDIu5f.js.map +1 -0
- package/dist/CollectionScripts-CMNlBlby.js +19 -0
- package/dist/CollectionScripts-CMNlBlby.js.map +1 -0
- package/dist/CollectionServers-BrjTCfDe.js +168 -0
- package/dist/CollectionServers-BrjTCfDe.js.map +1 -0
- package/dist/CollectionSettings-HVSlp2Gv.js +87 -0
- package/dist/CollectionSettings-HVSlp2Gv.js.map +1 -0
- package/dist/CollectionSync-CAflc5yW.js +19 -0
- package/dist/CollectionSync-CAflc5yW.js.map +1 -0
- package/dist/CommandActionInput-TkcAx6E8.js +97 -0
- package/dist/CommandActionInput-TkcAx6E8.js.map +1 -0
- package/dist/CommandPalette-CL8k4CoN.js +964 -0
- package/dist/CommandPalette-CL8k4CoN.js.map +1 -0
- package/dist/CommandPaletteImport-Diu5dDIY.js +622 -0
- package/dist/CommandPaletteImport-Diu5dDIY.js.map +1 -0
- package/dist/Cookies-DbOKTi1f.js +284 -0
- package/dist/Cookies-DbOKTi1f.js.map +1 -0
- package/dist/DataTable-BqbZKW3K.js +62 -0
- package/dist/DataTable-BqbZKW3K.js.map +1 -0
- package/dist/DataTableHeader-DJVB0jCZ.js +21 -0
- package/dist/DataTableHeader-DJVB0jCZ.js.map +1 -0
- package/dist/DataTableInput-yaU5g-kP.js +166 -0
- package/dist/DataTableInput-yaU5g-kP.js.map +1 -0
- package/dist/DataTableRow-c3XveEUO.js +57 -0
- package/dist/DataTableRow-c3XveEUO.js.map +1 -0
- package/dist/DeleteSidebarListElement-C-p87d03.js +78 -0
- package/dist/DeleteSidebarListElement-C-p87d03.js.map +1 -0
- package/dist/EditSidebarListElement-CodWPnM6.js +32 -0
- package/dist/EditSidebarListElement-CodWPnM6.js.map +1 -0
- package/dist/Editor-BomsGWHx.js +909 -0
- package/dist/Editor-BomsGWHx.js.map +1 -0
- package/dist/EmptyState-Cnm7hGW5.js +46 -0
- package/dist/EmptyState-Cnm7hGW5.js.map +1 -0
- package/dist/Environment-DJatRQIg.js +416 -0
- package/dist/Environment-DJatRQIg.js.map +1 -0
- package/dist/EnvironmentModal-DBEJ4Kzj.js +288 -0
- package/dist/EnvironmentModal-DBEJ4Kzj.js.map +1 -0
- package/dist/Form-CSKzyHGO.js +83 -0
- package/dist/Form-CSKzyHGO.js.map +1 -0
- package/dist/HttpMethod-rnWEgC3T.js +78 -0
- package/dist/HttpMethod-rnWEgC3T.js.map +1 -0
- package/dist/IconSelector-BDC_GQXv.js +67 -0
- package/dist/IconSelector-BDC_GQXv.js.map +1 -0
- package/dist/ImportCollection-DfX1UQ5u.js +804 -0
- package/dist/ImportCollection-DfX1UQ5u.js.map +1 -0
- package/dist/IntegrationLogo-B9EDW8db.js +51 -0
- package/dist/IntegrationLogo-B9EDW8db.js.map +1 -0
- package/dist/MainLayout-BEFMl1ud.js +281 -0
- package/dist/MainLayout-BEFMl1ud.js.map +1 -0
- package/dist/Modal-sQ9vH6MN.js +67 -0
- package/dist/Modal-sQ9vH6MN.js.map +1 -0
- package/dist/ModalClientContainer-qHsZi4wQ.js +65 -0
- package/dist/ModalClientContainer-qHsZi4wQ.js.map +1 -0
- package/dist/Request-gscRsGQ8.js +212 -0
- package/dist/Request-gscRsGQ8.js.map +1 -0
- package/dist/RequestAuth-BzBfIysT.js +989 -0
- package/dist/RequestAuth-BzBfIysT.js.map +1 -0
- package/dist/RequestRoot-3Bj8JZD-.js +1611 -0
- package/dist/RequestRoot-3Bj8JZD-.js.map +1 -0
- package/dist/RequestSection-HhdJj9hW.js +1582 -0
- package/dist/RequestSection-HhdJj9hW.js.map +1 -0
- package/dist/ResponseSection-DMJ0tw8E.js +949 -0
- package/dist/ResponseSection-DMJ0tw8E.js.map +1 -0
- package/dist/ScalarAsciiArt-BjuSnj8e.js +45 -0
- package/dist/ScalarAsciiArt-BjuSnj8e.js.map +1 -0
- package/dist/SectionFilter-hrtoRLwj.js +99 -0
- package/dist/SectionFilter-hrtoRLwj.js.map +1 -0
- package/dist/Server-DnA_BzPS.js +303 -0
- package/dist/Server-DnA_BzPS.js.map +1 -0
- package/dist/ServerVariablesForm-BRZ9XC8o.js +145 -0
- package/dist/ServerVariablesForm-BRZ9XC8o.js.map +1 -0
- package/dist/Settings-CYZzdJPO.js +347 -0
- package/dist/Settings-CYZzdJPO.js.map +1 -0
- package/dist/Sidebar-C6AdX6-N.js +73 -0
- package/dist/Sidebar-C6AdX6-N.js.map +1 -0
- package/dist/SidebarButton-BAagdMDe.js +37 -0
- package/dist/SidebarButton-BAagdMDe.js.map +1 -0
- package/dist/SidebarListElement-BfTPiihc.js +232 -0
- package/dist/SidebarListElement-BfTPiihc.js.map +1 -0
- package/dist/TheCommandPalette-Dl9TAeke.js +204 -0
- package/dist/TheCommandPalette-Dl9TAeke.js.map +1 -0
- package/dist/ValueEmitter-QYkZ9Hdc.js +20 -0
- package/dist/ValueEmitter-QYkZ9Hdc.js.map +1 -0
- package/dist/ViewLayout-BOXN0IYo.js +17 -0
- package/dist/ViewLayout-BOXN0IYo.js.map +1 -0
- package/dist/ViewLayoutCollapse-CiTb-Uml.js +86 -0
- package/dist/ViewLayoutCollapse-CiTb-Uml.js.map +1 -0
- package/dist/ViewLayoutContent-CvMoJYPF.js +13 -0
- package/dist/ViewLayoutContent-CvMoJYPF.js.map +1 -0
- package/dist/ViewLayoutSection-mUqKbQry.js +23 -0
- package/dist/ViewLayoutSection-mUqKbQry.js.map +1 -0
- package/dist/WatchModeToggle-D_eAiTWJ.js +41 -0
- package/dist/WatchModeToggle-D_eAiTWJ.js.map +1 -0
- package/dist/_plugin-vue_export-helper-BmmBcIzD.js +8 -0
- package/dist/analytics-BZimCWcw.js +7 -0
- package/dist/analytics-BZimCWcw.js.map +1 -0
- package/dist/build-request-security-BQjNr2MD.js +41 -0
- package/dist/build-request-security-BQjNr2MD.js.map +1 -0
- package/dist/code-input-iq-moLxi.js +775 -0
- package/dist/code-input-iq-moLxi.js.map +1 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
- package/dist/components/AddressBar/index.d.ts +1 -1
- package/dist/components/AddressBar/index.js +5 -4
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
- package/dist/components/CodeInput/index.d.ts +1 -1
- package/dist/components/CodeInput/index.js +2 -4
- package/dist/components/CommandPalette/index.d.ts +1 -1
- package/dist/components/CommandPalette/index.js +3 -4
- package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -2
- package/dist/components/DataTable/index.d.ts +8 -8
- package/dist/components/DataTable/index.js +6 -18
- package/dist/components/Form/LabelInput.vue.d.ts +1 -1
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/HttpMethod/index.js +2 -4
- package/dist/components/ImportCollection/index.d.ts +1 -1
- package/dist/components/ImportCollection/index.js +2 -4
- package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
- package/dist/components/Server/index.d.ts +3 -3
- package/dist/components/Server/index.js +3 -8
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/Sidebar/index.js +2 -4
- package/dist/components/ViewLayout/index.d.ts +1 -1
- package/dist/components/ViewLayout/index.js +2 -4
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +7 -8
- package/dist/components-CSxJTn6F.js +183 -0
- package/dist/components-CSxJTn6F.js.map +1 -0
- package/dist/components-ChixwQhN.js +61 -0
- package/dist/components-ChixwQhN.js.map +1 -0
- package/dist/computer-D7VW3Ruy.js +562 -0
- package/dist/computer-D7VW3Ruy.js.map +1 -0
- package/dist/consts-CyGRb9dl.js +318 -0
- package/dist/consts-CyGRb9dl.js.map +1 -0
- package/dist/curl-nbw1OxbV.js +54 -0
- package/dist/curl-nbw1OxbV.js.map +1 -0
- package/dist/data-table-PL7e8NRO.js +282 -0
- package/dist/data-table-PL7e8NRO.js.map +1 -0
- package/dist/editor-BZ_J0eze.js +466 -0
- package/dist/editor-BZ_J0eze.js.map +1 -0
- package/dist/environments-ByLK9lnC.js +592 -0
- package/dist/environments-ByLK9lnC.js.map +1 -0
- package/dist/formatters-DOGXZq9R.js +36 -0
- package/dist/formatters-DOGXZq9R.js.map +1 -0
- package/dist/forms-CZX6cFDS.js +42 -0
- package/dist/forms-CZX6cFDS.js.map +1 -0
- package/dist/get-active-environment-CkxyQ1dM.js +19 -0
- package/dist/get-active-environment-CkxyQ1dM.js.map +1 -0
- package/dist/get-resolved-url-BUCwrBzc.js +30 -0
- package/dist/get-resolved-url-BUCwrBzc.js.map +1 -0
- package/dist/get-server-url-o3On8CEr.js +32 -0
- package/dist/get-server-url-o3On8CEr.js.map +1 -0
- package/dist/get-servers-B_WNlQWB.js +106 -0
- package/dist/get-servers-B_WNlQWB.js.map +1 -0
- package/dist/get-snippet-DBRUSfZ2.js +39 -0
- package/dist/get-snippet-DBRUSfZ2.js.map +1 -0
- package/dist/global-cookies-D3ZS9ON3.js +184 -0
- package/dist/global-cookies-D3ZS9ON3.js.map +1 -0
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.js +3 -11
- package/dist/hooks/useSidebar.d.ts +1 -1
- package/dist/hooks-BvZxH4XB.js +80 -0
- package/dist/hooks-BvZxH4XB.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -12
- package/dist/layout-BWiL7dfb.js +81 -0
- package/dist/layout-BWiL7dfb.js.map +1 -0
- package/dist/layouts/App/create-api-client-app.d.ts +9 -9
- package/dist/layouts/App/index.d.ts +2 -2
- package/dist/layouts/App/index.js +5 -7
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1 -1
- package/dist/layouts/Modal/index.d.ts +2 -2
- package/dist/layouts/Modal/index.js +3 -4
- package/dist/layouts/Web/create-api-client-web.d.ts +9 -9
- package/dist/layouts/Web/index.d.ts +2 -2
- package/dist/layouts/Web/index.js +101 -6
- package/dist/layouts/Web/index.js.map +1 -0
- package/dist/libs/create-client.d.ts +9 -9
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/importers/index.d.ts +1 -1
- package/dist/libs/importers/index.js +2 -4
- package/dist/libs/index.d.ts +15 -15
- package/dist/libs/index.js +6 -45
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +3 -3
- package/dist/libs/send-request/index.d.ts +3 -3
- package/dist/libs/send-request/index.js +3 -8
- package/dist/libs-spbv4P0g.js +249 -0
- package/dist/libs-spbv4P0g.js.map +1 -0
- package/dist/monacoeditorwork/json.worker.bundle.js +8 -8
- package/dist/monacoeditorwork/yaml.worker.bundle.js +151 -151
- package/dist/operation-block-BnMIKAOh.js +1624 -0
- package/dist/operation-block-BnMIKAOh.js.map +1 -0
- package/dist/operation-code-sample-ZUTueV3v.js +1726 -0
- package/dist/operation-code-sample-ZUTueV3v.js.map +1 -0
- package/dist/parse-curl-BtypQT3D.js +106 -0
- package/dist/parse-curl-BtypQT3D.js.map +1 -0
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/index.d.ts +2 -2
- package/dist/plugins/index.js +2 -7
- package/dist/plugins/plugin-manager.d.ts +10 -4
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/plugins-B52hCIyZ.js +50 -0
- package/dist/plugins-B52hCIyZ.js.map +1 -0
- package/dist/rabbitjump-CMZXAR6d.js +9 -0
- package/dist/rabbitjump-CMZXAR6d.js.map +1 -0
- package/dist/request-block-DwsGy64Q.js +1466 -0
- package/dist/request-block-DwsGy64Q.js.map +1 -0
- package/dist/resize-D2IYvVdh.js +114 -0
- package/dist/resize-D2IYvVdh.js.map +1 -0
- package/dist/response-block-DmkaDZYs.js +1188 -0
- package/dist/response-block-DmkaDZYs.js.map +1 -0
- package/dist/scalar-address-bar-block--Vs6IBU1.js +425 -0
- package/dist/scalar-address-bar-block--Vs6IBU1.js.map +1 -0
- package/dist/scalar-auth-selector-block-DI3DLag9.js +1886 -0
- package/dist/scalar-auth-selector-block-DI3DLag9.js.map +1 -0
- package/dist/search-CmsQQkjn.js +151 -0
- package/dist/search-CmsQQkjn.js.map +1 -0
- package/dist/send-request-BsTfRiBC.js +348 -0
- package/dist/send-request-BsTfRiBC.js.map +1 -0
- package/dist/server-tcI-OCyx.js +140 -0
- package/dist/server-tcI-OCyx.js.map +1 -0
- package/dist/set-request-cookies-BJJhsU4A.js +88 -0
- package/dist/set-request-cookies-BJJhsU4A.js.map +1 -0
- package/dist/settings-BKk_1lcH.js +455 -0
- package/dist/settings-BKk_1lcH.js.map +1 -0
- package/dist/sidebar-ceSbYmnt.js +217 -0
- package/dist/sidebar-ceSbYmnt.js.map +1 -0
- package/dist/store/collections.d.ts +1 -1
- package/dist/store/environment.d.ts +1 -1
- package/dist/store/events.d.ts +8 -8
- package/dist/store/import-spec.d.ts +2 -2
- package/dist/store/index.d.ts +2 -2
- package/dist/store/index.js +2 -10
- package/dist/store/request-example.d.ts +1 -1
- package/dist/store/requests.d.ts +1 -1
- package/dist/store/security-schemes.d.ts +1 -1
- package/dist/store/servers.d.ts +1 -1
- package/dist/store/store.d.ts +7 -7
- package/dist/store/tags.d.ts +1 -1
- package/dist/store/workspace.d.ts +1 -1
- package/dist/store-DpSUVhjp.js +1512 -0
- package/dist/store-DpSUVhjp.js.map +1 -0
- package/dist/string-template-sS5PtY6T.js +64 -0
- package/dist/string-template-sS5PtY6T.js.map +1 -0
- package/dist/style.css +10372 -1
- package/dist/types/index.js +0 -1
- package/dist/use-global-hot-keys-D8Ai8Qbm.js +274 -0
- package/dist/use-global-hot-keys-D8Ai8Qbm.js.map +1 -0
- package/dist/useSidebar-DLTwHDI-.js +45 -0
- package/dist/useSidebar-DLTwHDI-.js.map +1 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -3
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
- package/dist/v2/blocks/operation-block/index.d.ts +4 -4
- package/dist/v2/blocks/operation-block/index.js +20 -11
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts +6 -6
- package/dist/v2/blocks/operation-code-sample/index.js +2 -16
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +3 -2
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +1 -1
- package/dist/v2/blocks/request-block/index.d.ts +1 -1
- package/dist/v2/blocks/request-block/index.js +9 -4
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/index.d.ts +1 -1
- package/dist/v2/blocks/response-block/index.js +6 -4
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/index.js +5 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +4 -4
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +6 -8
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
- package/dist/v2/components/code-input/index.d.ts +1 -1
- package/dist/v2/components/code-input/index.js +2 -4
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +1 -1
- package/dist/v2/components/data-table/index.d.ts +8 -8
- package/dist/v2/components/data-table/index.js +3 -18
- package/dist/v2/components/forms/index.d.ts +1 -1
- package/dist/v2/components/forms/index.js +2 -4
- package/dist/v2/components/layout/index.d.ts +1 -1
- package/dist/v2/components/layout/index.js +2 -4
- package/dist/v2/components/modals/index.d.ts +1 -1
- package/dist/v2/components/modals/index.js +37 -3
- package/dist/v2/components/modals/index.js.map +1 -0
- package/dist/v2/components/resize/index.d.ts +2 -2
- package/dist/v2/components/resize/index.js +2 -6
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
- package/dist/v2/components/server/index.d.ts +1 -1
- package/dist/v2/components/server/index.js +2 -4
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/v2/components/sidebar/index.d.ts +3 -3
- package/dist/v2/components/sidebar/index.js +3 -8
- package/dist/v2/features/app/App.vue.d.ts +4 -4
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
- package/dist/v2/features/app/components/index.d.ts +1 -1
- package/dist/v2/features/app/components/index.js +10 -5
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +3 -3
- package/dist/v2/features/app/helpers/get-route-param.d.ts +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts +5 -5
- package/dist/v2/features/app/hooks/use-theme.d.ts +1 -1
- package/dist/v2/features/app/index.d.ts +8 -8
- package/dist/v2/features/app/index.js +3161 -19
- package/dist/v2/features/app/index.js.map +1 -0
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/OperationCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Cookies.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Editor/index.d.ts +1 -1
- package/dist/v2/features/collection/components/Editor/index.js +2 -4
- package/dist/v2/features/collection/components/Environment.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Overview.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Servers.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Settings.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Tabs.vue.d.ts +1 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +10 -45
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/index.d.ts +2 -2
- package/dist/v2/features/command-palette/index.js +3 -6
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-path.d.ts +1 -1
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +1 -1
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-editor.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +1 -1
- package/dist/v2/features/editor/index.d.ts +4 -4
- package/dist/v2/features/editor/index.js +2 -10
- package/dist/v2/features/environments/index.d.ts +1 -1
- package/dist/v2/features/environments/index.js +4 -4
- package/dist/v2/features/global-cookies/index.d.ts +1 -1
- package/dist/v2/features/global-cookies/index.js +4 -4
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -2
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +1 -1
- package/dist/v2/features/modal/index.d.ts +3 -3
- package/dist/v2/features/modal/index.js +639 -7
- package/dist/v2/features/modal/index.js.map +1 -0
- package/dist/v2/features/modal/modal-events.d.ts +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +2 -2
- package/dist/v2/features/operation/index.d.ts +5 -5
- package/dist/v2/features/operation/index.js +19 -12
- package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +1 -1
- package/dist/v2/features/search/helpers/create-search-index.d.ts +1 -1
- package/dist/v2/features/search/index.d.ts +1 -1
- package/dist/v2/features/search/index.js +2 -4
- package/dist/v2/features/settings/index.d.ts +2 -2
- package/dist/v2/features/settings/index.js +2 -6
- package/dist/v2/helpers/get-active-proxy-url.d.ts +1 -1
- package/dist/v2/helpers/get-tab-details.d.ts +1 -1
- package/dist/v2/helpers/handle-hotkeys.d.ts +1 -1
- package/dist/v2/helpers/index.d.ts +2 -2
- package/dist/v2/helpers/index.js +3 -6
- package/dist/v2/hooks/use-global-hot-keys.d.ts +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +1 -1
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/index.d.ts +4 -4
- package/dist/views/Components/CodeSnippet/index.js +3 -10
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
- package/dist/views/Environment/handle-drag.d.ts +1 -1
- package/dist/views/Request/Request.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/index.js +4 -8
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +1 -1
- package/dist/views/Request/RequestSection/index.d.ts +2 -2
- package/dist/views/Request/RequestSection/index.js +42 -5
- package/dist/views/Request/RequestSection/index.js.map +1 -0
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/index.d.ts +2 -2
- package/dist/views/Request/ResponseSection/index.js +7 -6
- package/dist/views/Request/components/index.d.ts +1 -1
- package/dist/views/Request/components/index.js +2 -4
- package/dist/views/Request/consts/index.d.ts +2 -2
- package/dist/views/Request/consts/index.js +2 -10
- package/dist/views/Request/handle-drag.d.ts +2 -2
- package/dist/views/Request/libs/auth.d.ts +1 -1
- package/dist/views/Request/libs/index.d.ts +3 -3
- package/dist/views/Request/libs/index.js +3 -22
- package/dist/views/Request/libs/oauth2.d.ts +1 -1
- package/dist/views/Request/libs/watch-mode.d.ts +2 -2
- package/dist/views/Request/types/index.js +0 -1
- package/dist/watch-mode-Dbaqd9bG.js +375 -0
- package/dist/watch-mode-Dbaqd9bG.js.map +1 -0
- package/package.json +29 -33
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/analytics.js +0 -9
- package/dist/assets/computer.ascii.js +0 -34
- package/dist/assets/keycap.ascii.js +0 -25
- package/dist/assets/rabbit.ascii.js +0 -11
- package/dist/assets/rabbitjump.ascii.js +0 -11
- package/dist/components/AddressBar/AddressBar.vue.js +0 -7
- package/dist/components/AddressBar/AddressBar.vue2.js +0 -160
- package/dist/components/AddressBar/AddressBarHistory.vue.js +0 -7
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +0 -98
- package/dist/components/AddressBar/httpStatusCodeColors.js +0 -38
- package/dist/components/CodeInput/CodeInput.vue.js +0 -8
- package/dist/components/CodeInput/CodeInput.vue2.js +0 -209
- package/dist/components/CodeInput/codeVariableWidget.js +0 -111
- package/dist/components/CommandPalette/CommandActionForm.vue.js +0 -44
- package/dist/components/CommandPalette/CommandActionForm.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandActionInput.vue.js +0 -52
- package/dist/components/CommandPalette/CommandActionInput.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +0 -80
- package/dist/components/CommandPalette/CommandPaletteCollection.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +0 -116
- package/dist/components/CommandPalette/CommandPaletteExample.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +0 -217
- package/dist/components/CommandPalette/CommandPaletteImport.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +0 -136
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +0 -123
- package/dist/components/CommandPalette/CommandPaletteServer.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +0 -84
- package/dist/components/CommandPalette/CommandPaletteTag.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +0 -48
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue2.js +0 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +0 -7
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -305
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +0 -39
- package/dist/components/CommandPalette/WatchModeToggle.vue2.js +0 -4
- package/dist/components/DataTable/DataTable.vue.js +0 -38
- package/dist/components/DataTable/DataTable.vue2.js +0 -4
- package/dist/components/DataTable/DataTableCell.vue.js +0 -26
- package/dist/components/DataTable/DataTableCell.vue2.js +0 -4
- package/dist/components/DataTable/DataTableCheckbox.vue.js +0 -53
- package/dist/components/DataTable/DataTableCheckbox.vue2.js +0 -4
- package/dist/components/DataTable/DataTableHeader.vue.js +0 -18
- package/dist/components/DataTable/DataTableHeader.vue2.js +0 -4
- package/dist/components/DataTable/DataTableInput.vue.js +0 -7
- package/dist/components/DataTable/DataTableInput.vue2.js +0 -124
- package/dist/components/DataTable/DataTableInputSelect.vue.js +0 -146
- package/dist/components/DataTable/DataTableInputSelect.vue2.js +0 -4
- package/dist/components/DataTable/DataTableRow.vue.js +0 -12
- package/dist/components/DataTable/DataTableText.vue.js +0 -23
- package/dist/components/DataTable/DataTableText.vue2.js +0 -4
- package/dist/components/EmptyState.vue.js +0 -7
- package/dist/components/EmptyState.vue2.js +0 -42
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +0 -113
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue2.js +0 -4
- package/dist/components/Form/Form.vue.js +0 -83
- package/dist/components/Form/Form.vue2.js +0 -4
- package/dist/components/Form/LabelInput.vue.js +0 -7
- package/dist/components/Form/LabelInput.vue2.js +0 -42
- package/dist/components/HelpfulLink.vue.js +0 -20
- package/dist/components/HelpfulLink.vue2.js +0 -4
- package/dist/components/HttpMethod/HttpMethod.vue.js +0 -7
- package/dist/components/HttpMethod/HttpMethod.vue2.js +0 -62
- package/dist/components/IconSelector.vue.js +0 -75
- package/dist/components/IconSelector.vue2.js +0 -4
- package/dist/components/ImportCollection/DropEventListener.vue.js +0 -81
- package/dist/components/ImportCollection/DropEventListener.vue2.js +0 -4
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +0 -77
- package/dist/components/ImportCollection/ImportCollectionListener.vue2.js +0 -4
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +0 -208
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +0 -5
- package/dist/components/ImportCollection/ImportNowButton.vue.js +0 -73
- package/dist/components/ImportCollection/ImportNowButton.vue2.js +0 -4
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +0 -44
- package/dist/components/ImportCollection/IntegrationLogo.vue2.js +0 -4
- package/dist/components/ImportCollection/PasteEventListener.vue.js +0 -24
- package/dist/components/ImportCollection/PasteEventListener.vue2.js +0 -4
- package/dist/components/ImportCollection/PrefetchError.vue.js +0 -27
- package/dist/components/ImportCollection/PrefetchError.vue2.js +0 -4
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +0 -20
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue2.js +0 -4
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +0 -134
- package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +0 -4
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +0 -106
- package/dist/components/ImportCollection/utils/get-openapi-version.js +0 -20
- package/dist/components/ImportCollection/utils/import-collection.js +0 -29
- package/dist/components/ImportCollection/utils/is-document.js +0 -9
- package/dist/components/ImportCollection/utils/is-url.js +0 -9
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.js +0 -7
- package/dist/components/OpenApiClientButton.vue.js +0 -7
- package/dist/components/OpenApiClientButton.vue2.js +0 -48
- package/dist/components/ScalarAsciiArt.vue.js +0 -7
- package/dist/components/ScalarAsciiArt.vue2.js +0 -37
- package/dist/components/Search/useSearch.js +0 -78
- package/dist/components/SectionFilter.vue.js +0 -7
- package/dist/components/SectionFilter.vue2.js +0 -64
- package/dist/components/SectionFilterButton.vue.js +0 -23
- package/dist/components/SectionFilterButton.vue2.js +0 -4
- package/dist/components/Server/ServerDropdown.vue.js +0 -132
- package/dist/components/Server/ServerDropdown.vue2.js +0 -4
- package/dist/components/Server/ServerDropdownItem.vue.js +0 -7
- package/dist/components/Server/ServerDropdownItem.vue2.js +0 -84
- package/dist/components/Server/ServerSelector.vue.js +0 -82
- package/dist/components/Server/ServerSelector.vue2.js +0 -4
- package/dist/components/Server/ServerVariablesForm.vue.js +0 -49
- package/dist/components/Server/ServerVariablesForm.vue2.js +0 -4
- package/dist/components/Server/ServerVariablesSelect.vue.js +0 -54
- package/dist/components/Server/ServerVariablesSelect.vue2.js +0 -4
- package/dist/components/Server/ServerVariablesTextbox.vue.js +0 -29
- package/dist/components/Server/ServerVariablesTextbox.vue2.js +0 -4
- package/dist/components/SideNav/DownloadAppButton.vue.js +0 -7
- package/dist/components/SideNav/DownloadAppButton.vue2.js +0 -33
- package/dist/components/SideNav/SideHelp.vue.js +0 -127
- package/dist/components/SideNav/SideHelp.vue2.js +0 -4
- package/dist/components/SideNav/SideNav.vue.js +0 -96
- package/dist/components/SideNav/SideNav.vue2.js +0 -4
- package/dist/components/SideNav/SideNavGroup.vue.js +0 -16
- package/dist/components/SideNav/SideNavGroup.vue2.js +0 -4
- package/dist/components/SideNav/SideNavLink.vue.js +0 -39
- package/dist/components/SideNav/SideNavLink.vue2.js +0 -4
- package/dist/components/SideNav/SideNavRouterLink.vue.js +0 -27
- package/dist/components/SideNav/SideNavRouterLink.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +0 -30
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +0 -58
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +0 -29
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +0 -46
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +0 -4
- package/dist/components/Sidebar/Sidebar.vue.js +0 -7
- package/dist/components/Sidebar/Sidebar.vue2.js +0 -63
- package/dist/components/Sidebar/SidebarButton.vue.js +0 -33
- package/dist/components/Sidebar/SidebarButton.vue2.js +0 -4
- package/dist/components/Sidebar/SidebarList.vue.js +0 -12
- package/dist/components/Sidebar/SidebarListElement.vue.js +0 -8
- package/dist/components/Sidebar/SidebarListElement.vue2.js +0 -94
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +0 -86
- package/dist/components/Sidebar/SidebarListElementActions.vue2.js +0 -4
- package/dist/components/Sidebar/SidebarToggle.vue.js +0 -49
- package/dist/components/Sidebar/SidebarToggle.vue2.js +0 -4
- package/dist/components/TopNav/TopNav.vue.js +0 -210
- package/dist/components/TopNav/TopNav.vue2.js +0 -4
- package/dist/components/TopNav/TopNavItem.vue.js +0 -7
- package/dist/components/TopNav/TopNavItem.vue2.js +0 -138
- package/dist/components/ViewLayout/ViewLayout.vue.js +0 -18
- package/dist/components/ViewLayout/ViewLayout.vue2.js +0 -4
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +0 -92
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue2.js +0 -4
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +0 -12
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +0 -23
- package/dist/components/ViewLayout/ViewLayoutSection.vue2.js +0 -4
- package/dist/constants.js +0 -40
- package/dist/data/httpHeaders.js +0 -537
- package/dist/hooks/useAnalytics.js +0 -11
- package/dist/hooks/useClientConfig.js +0 -7
- package/dist/hooks/useFileDialog.js +0 -21
- package/dist/hooks/useLayout.js +0 -8
- package/dist/hooks/useResponseBody.js +0 -20
- package/dist/hooks/useSidebar.js +0 -28
- package/dist/layouts/App/ApiClientApp.vue.js +0 -70
- package/dist/layouts/App/ApiClientApp.vue3.js +0 -5
- package/dist/layouts/App/MainLayout.vue.js +0 -26
- package/dist/layouts/App/MainLayout.vue2.js +0 -4
- package/dist/layouts/App/create-api-client-app.js +0 -35
- package/dist/layouts/App/hotkeys.js +0 -21
- package/dist/layouts/Modal/ApiClientModal.vue.js +0 -30
- package/dist/layouts/Modal/ApiClientModal.vue2.js +0 -4
- package/dist/layouts/Modal/create-api-client-modal.js +0 -32
- package/dist/layouts/Web/ApiClientWeb.vue.js +0 -64
- package/dist/layouts/Web/ApiClientWeb.vue3.js +0 -5
- package/dist/layouts/Web/create-api-client-web.js +0 -32
- package/dist/libs/create-client.js +0 -189
- package/dist/libs/electron.js +0 -4
- package/dist/libs/env-helpers.js +0 -6
- package/dist/libs/environment-parser.js +0 -18
- package/dist/libs/errors.js +0 -16
- package/dist/libs/event-bus.js +0 -32
- package/dist/libs/extractAttachmentFilename.js +0 -18
- package/dist/libs/find-request.js +0 -23
- package/dist/libs/formatters.js +0 -10
- package/dist/libs/get-request-uid-by-path-method.js +0 -18
- package/dist/libs/getOpenApiDocumentDetails.js +0 -40
- package/dist/libs/hot-keys.js +0 -44
- package/dist/libs/importers/curl.js +0 -53
- package/dist/libs/isUrl.js +0 -7
- package/dist/libs/local-storage.js +0 -41
- package/dist/libs/normalize-headers.js +0 -27
- package/dist/libs/parse-curl.js +0 -59
- package/dist/libs/postman.js +0 -37
- package/dist/libs/send-request/build-request-security.js +0 -35
- package/dist/libs/send-request/create-fetch-body.js +0 -25
- package/dist/libs/send-request/create-fetch-headers.js +0 -11
- package/dist/libs/send-request/create-fetch-query-params.js +0 -33
- package/dist/libs/send-request/create-request-operation.js +0 -140
- package/dist/libs/send-request/decode-buffer.js +0 -9
- package/dist/libs/send-request/set-request-cookies.js +0 -58
- package/dist/libs/string-template.js +0 -42
- package/dist/libs/validate-parameters.js +0 -16
- package/dist/plugins/hooks/usePluginManager.js +0 -10
- package/dist/plugins/plugin-manager.js +0 -26
- package/dist/routes.js +0 -210
- package/dist/store/active-entities.js +0 -118
- package/dist/store/collections.js +0 -73
- package/dist/store/cookies.js +0 -13
- package/dist/store/environment.js +0 -32
- package/dist/store/events.js +0 -35
- package/dist/store/import-spec.js +0 -55
- package/dist/store/request-example.js +0 -43
- package/dist/store/requests.js +0 -97
- package/dist/store/router-params.js +0 -22
- package/dist/store/security-schemes.js +0 -55
- package/dist/store/servers.js +0 -39
- package/dist/store/store.js +0 -144
- package/dist/store/tags.js +0 -45
- package/dist/store/workspace.js +0 -52
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +0 -242
- package/dist/v2/blocks/operation-block/OperationBlock.vue2.js +0 -4
- package/dist/v2/blocks/operation-block/components/Header.vue.js +0 -7
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +0 -100
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +0 -40
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +0 -31
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +0 -107
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +0 -46
- package/dist/v2/blocks/operation-block/helpers/build-request.js +0 -70
- package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +0 -25
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +0 -9
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +0 -14
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +0 -4
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js +0 -7
- package/dist/v2/blocks/operation-block/helpers/get-example.js +0 -36
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +0 -17
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +0 -4
- package/dist/v2/blocks/operation-block/helpers/get-server-url.js +0 -12
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.js +0 -31
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js +0 -43
- package/dist/v2/blocks/operation-block/helpers/response-cache.js +0 -12
- package/dist/v2/blocks/operation-block/helpers/send-request.js +0 -122
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +0 -49
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +0 -17
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +0 -56
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue2.js +0 -4
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +0 -30
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue2.js +0 -4
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +0 -7
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +0 -227
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +0 -22
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +0 -27
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +0 -40
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +0 -20
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +0 -4
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +0 -302
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +0 -28
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js +0 -10
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +0 -67
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +0 -66
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -172
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js +0 -55
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +0 -18
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +0 -7
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +0 -347
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +0 -7
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +0 -191
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +0 -84
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +0 -135
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +0 -78
- package/dist/v2/blocks/request-block/components/RequestParams.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +0 -7
- package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +0 -74
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +0 -204
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +0 -7
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +0 -63
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +0 -55
- package/dist/v2/blocks/request-block/helpers/files.js +0 -7
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +0 -26
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +0 -29
- package/dist/v2/blocks/request-block/helpers/get-parameter-content.js +0 -9
- package/dist/v2/blocks/request-block/helpers/get-parameter-schema.js +0 -6
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +0 -16
- package/dist/v2/blocks/request-block/helpers/group-by.js +0 -10
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +0 -7
- package/dist/v2/blocks/request-block/helpers/validate-parameter.js +0 -32
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +0 -7
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +0 -180
- package/dist/v2/blocks/response-block/components/Headers.vue.js +0 -96
- package/dist/v2/blocks/response-block/components/Headers.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +0 -87
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +0 -36
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js +0 -14
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +0 -63
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue2.js +0 -41
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +0 -94
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +0 -25
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js +0 -52
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue3.js +0 -5
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +0 -54
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +0 -79
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +0 -46
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +0 -67
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue2.js +0 -4
- package/dist/v2/blocks/response-block/helpers/extract-filename.js +0 -18
- package/dist/v2/blocks/response-block/helpers/get-content-length.js +0 -12
- package/dist/v2/blocks/response-block/helpers/media-types.js +0 -126
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +0 -12
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +0 -16
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +0 -7
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +0 -208
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +0 -7
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +0 -95
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +0 -145
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue2.js +0 -4
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -38
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +0 -25
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +0 -184
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +0 -51
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +0 -330
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +0 -7
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +0 -76
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +0 -165
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue3.js +0 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +0 -91
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +0 -83
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +0 -46
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +0 -244
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +0 -97
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +0 -135
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +0 -35
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +0 -7
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +0 -23
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +0 -139
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +0 -27
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +0 -64
- package/dist/v2/components/callout/Callout.vue.js +0 -7
- package/dist/v2/components/callout/Callout.vue2.js +0 -43
- package/dist/v2/components/code-input/CodeInput.vue.js +0 -8
- package/dist/v2/components/code-input/CodeInput.vue2.js +0 -213
- package/dist/v2/components/code-input/code-variable-widget.js +0 -106
- package/dist/v2/components/data-table/DataTable.vue.js +0 -38
- package/dist/v2/components/data-table/DataTable.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableCell.vue.js +0 -26
- package/dist/v2/components/data-table/DataTableCell.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +0 -53
- package/dist/v2/components/data-table/DataTableCheckbox.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableHeader.vue.js +0 -18
- package/dist/v2/components/data-table/DataTableHeader.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableInput.vue.js +0 -7
- package/dist/v2/components/data-table/DataTableInput.vue2.js +0 -121
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +0 -149
- package/dist/v2/components/data-table/DataTableInputSelect.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableRow.vue.js +0 -12
- package/dist/v2/components/data-table/DataTableText.vue.js +0 -23
- package/dist/v2/components/data-table/DataTableText.vue2.js +0 -4
- package/dist/v2/components/forms/ConfirmationForm.vue.js +0 -45
- package/dist/v2/components/forms/ConfirmationForm.vue2.js +0 -4
- package/dist/v2/components/layout/CollapsibleSection.vue.js +0 -89
- package/dist/v2/components/layout/CollapsibleSection.vue2.js +0 -4
- package/dist/v2/components/layout/ValueEmitter.vue.js +0 -21
- package/dist/v2/components/layout/ValueEmitter.vue2.js +0 -4
- package/dist/v2/components/modals/DeleteModal.vue.js +0 -31
- package/dist/v2/components/modals/DeleteModal.vue2.js +0 -4
- package/dist/v2/components/modals/ModalClientContainer.vue.js +0 -7
- package/dist/v2/components/modals/ModalClientContainer.vue2.js +0 -60
- package/dist/v2/components/resize/Resize.vue.js +0 -8
- package/dist/v2/components/resize/Resize.vue2.js +0 -36
- package/dist/v2/components/resize/use-split-resize.js +0 -57
- package/dist/v2/components/server/ServerDropdown.vue.js +0 -91
- package/dist/v2/components/server/ServerDropdown.vue2.js +0 -4
- package/dist/v2/components/server/ServerDropdownItem.vue.js +0 -7
- package/dist/v2/components/server/ServerDropdownItem.vue2.js +0 -49
- package/dist/v2/components/sidebar/Sidebar.vue.js +0 -115
- package/dist/v2/components/sidebar/Sidebar.vue2.js +0 -4
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +0 -52
- package/dist/v2/components/sidebar/SidebarMenu.vue2.js +0 -4
- package/dist/v2/components/sidebar/SidebarToggle.vue.js +0 -52
- package/dist/v2/components/sidebar/SidebarToggle.vue2.js +0 -4
- package/dist/v2/features/app/App.vue.js +0 -152
- package/dist/v2/features/app/App.vue3.js +0 -5
- package/dist/v2/features/app/app-events.js +0 -251
- package/dist/v2/features/app/app-state.js +0 -415
- package/dist/v2/features/app/components/AppSidebar.vue.js +0 -7
- package/dist/v2/features/app/components/AppSidebar.vue2.js +0 -304
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +0 -56
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue2.js +0 -4
- package/dist/v2/features/app/components/DesktopTab.vue.js +0 -7
- package/dist/v2/features/app/components/DesktopTab.vue2.js +0 -134
- package/dist/v2/features/app/components/DesktopTabs.vue.js +0 -56
- package/dist/v2/features/app/components/DesktopTabs.vue2.js +0 -4
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +0 -7
- package/dist/v2/features/app/components/DownloadAppButton.vue2.js +0 -19
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +0 -185
- package/dist/v2/features/app/components/SidebarItemMenu.vue2.js +0 -4
- package/dist/v2/features/app/components/SplashScreen.vue.js +0 -7
- package/dist/v2/features/app/components/SplashScreen.vue2.js +0 -18
- package/dist/v2/features/app/helpers/create-api-client-app.js +0 -36
- package/dist/v2/features/app/helpers/filter-workspaces.js +0 -5
- package/dist/v2/features/app/helpers/get-route-param.js +0 -9
- package/dist/v2/features/app/helpers/group-workspaces.js +0 -23
- package/dist/v2/features/app/helpers/routes.js +0 -157
- package/dist/v2/features/app/hooks/use-document-watcher.js +0 -66
- package/dist/v2/features/app/hooks/use-theme.js +0 -48
- package/dist/v2/features/collection/DocumentCollection.vue.js +0 -336
- package/dist/v2/features/collection/DocumentCollection.vue3.js +0 -5
- package/dist/v2/features/collection/OperationCollection.vue.js +0 -86
- package/dist/v2/features/collection/OperationCollection.vue2.js +0 -4
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +0 -68
- package/dist/v2/features/collection/WorkspaceCollection.vue2.js +0 -4
- package/dist/v2/features/collection/components/Authentication.vue.js +0 -7
- package/dist/v2/features/collection/components/Authentication.vue2.js +0 -154
- package/dist/v2/features/collection/components/Cookies.vue.js +0 -52
- package/dist/v2/features/collection/components/Cookies.vue2.js +0 -4
- package/dist/v2/features/collection/components/Editor/Editor.vue.js +0 -7
- package/dist/v2/features/collection/components/Editor/Editor.vue2.js +0 -344
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js +0 -78
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue2.js +0 -4
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js +0 -83
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue2.js +0 -4
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js +0 -10
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js +0 -5
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js +0 -5
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js +0 -21
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js +0 -5
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js +0 -25
- package/dist/v2/features/collection/components/Environment.vue.js +0 -54
- package/dist/v2/features/collection/components/Environment.vue2.js +0 -4
- package/dist/v2/features/collection/components/Form.vue.js +0 -78
- package/dist/v2/features/collection/components/Form.vue2.js +0 -4
- package/dist/v2/features/collection/components/LabelInput.vue.js +0 -7
- package/dist/v2/features/collection/components/LabelInput.vue2.js +0 -35
- package/dist/v2/features/collection/components/Overview.vue.js +0 -7
- package/dist/v2/features/collection/components/Overview.vue2.js +0 -208
- package/dist/v2/features/collection/components/Servers.vue.js +0 -210
- package/dist/v2/features/collection/components/Servers.vue2.js +0 -4
- package/dist/v2/features/collection/components/Settings.vue.js +0 -61
- package/dist/v2/features/collection/components/Settings.vue2.js +0 -4
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.js +0 -7
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue2.js +0 -136
- package/dist/v2/features/collection/components/Tabs.vue.js +0 -44
- package/dist/v2/features/collection/components/Tabs.vue2.js +0 -4
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js +0 -13
- package/dist/v2/features/command-palette/TheCommandPalette.vue.js +0 -7
- package/dist/v2/features/command-palette/TheCommandPalette.vue2.js +0 -152
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +0 -48
- package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +0 -52
- package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +0 -211
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +0 -182
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +0 -115
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js +0 -78
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +0 -221
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +0 -114
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +0 -40
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +0 -4
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.js +0 -11
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +0 -31
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +0 -11
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +0 -76
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +0 -18
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.js +0 -33
- package/dist/v2/features/command-palette/helpers/is-postman-collection.js +0 -11
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js +0 -52
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -139
- package/dist/v2/features/editor/config.js +0 -16
- package/dist/v2/features/editor/helpers/configure-language-support.js +0 -39
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.js +0 -20
- package/dist/v2/features/editor/helpers/json/create-json-model.js +0 -19
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js +0 -9
- package/dist/v2/features/editor/helpers/json/json-ast.js +0 -24
- package/dist/v2/features/editor/helpers/json/json-pointer-links.js +0 -72
- package/dist/v2/features/editor/helpers/json/json-pointer-path.js +0 -21
- package/dist/v2/features/editor/helpers/range-to-whole-line.js +0 -8
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.js +0 -56
- package/dist/v2/features/editor/helpers/theme/load-css-variables.js +0 -21
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js +0 -19
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.js +0 -50
- package/dist/v2/features/editor/hooks/use-editor-markers.js +0 -34
- package/dist/v2/features/editor/hooks/use-editor.js +0 -107
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js +0 -27
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +0 -316
- package/dist/v2/features/editor/schemas/openapi-3.1-schema.json.js +0 -25
- package/dist/v2/features/environments/EnvironmentsList.vue.js +0 -68
- package/dist/v2/features/environments/EnvironmentsList.vue2.js +0 -4
- package/dist/v2/features/environments/components/Environment.vue.js +0 -66
- package/dist/v2/features/environments/components/Environment.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +0 -121
- package/dist/v2/features/environments/components/EnvironmentColors.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +0 -85
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +0 -53
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +0 -109
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +0 -7
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +0 -136
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +0 -7
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +0 -189
- package/dist/v2/features/modal/Modal.vue.js +0 -122
- package/dist/v2/features/modal/Modal.vue2.js +0 -4
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +0 -89
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +0 -36
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +0 -29
- package/dist/v2/features/modal/helpers/restore-workspace-state.js +0 -36
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js +0 -93
- package/dist/v2/features/modal/modal-events.js +0 -44
- package/dist/v2/features/operation/Operation.vue.js +0 -126
- package/dist/v2/features/operation/Operation.vue2.js +0 -4
- package/dist/v2/features/operation/helpers/combine-params.js +0 -14
- package/dist/v2/features/operation/helpers/get-security-requirements.js +0 -4
- package/dist/v2/features/operation/helpers/get-selected-security.js +0 -18
- package/dist/v2/features/operation/helpers/get-selected-server.js +0 -4
- package/dist/v2/features/search/helpers/create-fuse-instance.js +0 -43
- package/dist/v2/features/search/helpers/create-search-index.js +0 -63
- package/dist/v2/features/search/hooks/use-search-index.js +0 -18
- package/dist/v2/features/settings/CollectionSettings.vue.js +0 -275
- package/dist/v2/features/settings/CollectionSettings.vue2.js +0 -4
- package/dist/v2/features/settings/DocumentSettings.vue.js +0 -115
- package/dist/v2/features/settings/DocumentSettings.vue2.js +0 -4
- package/dist/v2/features/settings/components/Appearance.vue.js +0 -88
- package/dist/v2/features/settings/components/Appearance.vue2.js +0 -4
- package/dist/v2/features/settings/components/Section.vue.js +0 -35
- package/dist/v2/features/settings/components/Section.vue2.js +0 -4
- package/dist/v2/features/settings/helpers/get-theme-colors.js +0 -16
- package/dist/v2/helpers/drag-handle-factory.js +0 -120
- package/dist/v2/helpers/generate-location-id.js +0 -10
- package/dist/v2/helpers/get-active-environment.js +0 -22
- package/dist/v2/helpers/get-active-proxy-url.js +0 -5
- package/dist/v2/helpers/get-servers.js +0 -66
- package/dist/v2/helpers/get-tab-details.js +0 -34
- package/dist/v2/helpers/handle-hotkeys.js +0 -54
- package/dist/v2/helpers/is-url.js +0 -5
- package/dist/v2/helpers/slugify.js +0 -4
- package/dist/v2/helpers/storage.js +0 -16
- package/dist/v2/hooks/use-color-mode.js +0 -24
- package/dist/v2/hooks/use-global-hot-keys.js +0 -11
- package/dist/v2/hooks/use-scroll-lock.js +0 -21
- package/dist/v2/workspace-events.js +0 -252
- package/dist/views/Collection/Collection.vue.js +0 -4
- package/dist/views/Collection/Collection.vue2.js +0 -49
- package/dist/views/Collection/CollectionAuthentication.vue.js +0 -7
- package/dist/views/Collection/CollectionAuthentication.vue2.js +0 -56
- package/dist/views/Collection/CollectionCookies.vue.js +0 -4
- package/dist/views/Collection/CollectionCookies.vue2.js +0 -16
- package/dist/views/Collection/CollectionEnvironment.vue.js +0 -5
- package/dist/views/Collection/CollectionEnvironment.vue2.js +0 -229
- package/dist/views/Collection/CollectionInfoForm.vue.js +0 -7
- package/dist/views/Collection/CollectionInfoForm.vue2.js +0 -63
- package/dist/views/Collection/CollectionNavigation.vue.js +0 -133
- package/dist/views/Collection/CollectionNavigation.vue2.js +0 -4
- package/dist/views/Collection/CollectionOverview.vue.js +0 -4
- package/dist/views/Collection/CollectionOverview.vue2.js +0 -34
- package/dist/views/Collection/CollectionScripts.vue.js +0 -4
- package/dist/views/Collection/CollectionScripts.vue2.js +0 -16
- package/dist/views/Collection/CollectionServerForm.vue.js +0 -75
- package/dist/views/Collection/CollectionServerForm.vue2.js +0 -4
- package/dist/views/Collection/CollectionServers.vue.js +0 -4
- package/dist/views/Collection/CollectionServers.vue2.js +0 -94
- package/dist/views/Collection/CollectionSettings.vue.js +0 -4
- package/dist/views/Collection/CollectionSettings.vue2.js +0 -118
- package/dist/views/Collection/CollectionSync.vue.js +0 -4
- package/dist/views/Collection/CollectionSync.vue2.js +0 -16
- package/dist/views/Collection/components/EnvironmentForm.vue.js +0 -7
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +0 -270
- package/dist/views/Collection/components/MarkdownInput.vue.js +0 -7
- package/dist/views/Collection/components/MarkdownInput.vue2.js +0 -100
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +0 -50
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue2.js +0 -4
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +0 -62
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +0 -82
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +0 -30
- package/dist/views/Cookies/CookieForm.vue.js +0 -34
- package/dist/views/Cookies/CookieForm.vue2.js +0 -4
- package/dist/views/Cookies/CookieModal.vue.js +0 -7
- package/dist/views/Cookies/CookieModal.vue2.js +0 -88
- package/dist/views/Cookies/Cookies.vue.js +0 -4
- package/dist/views/Cookies/Cookies.vue2.js +0 -162
- package/dist/views/Environment/Environment.vue.js +0 -4
- package/dist/views/Environment/Environment.vue2.js +0 -402
- package/dist/views/Environment/EnvironmentColorModal.vue.js +0 -42
- package/dist/views/Environment/EnvironmentColorModal.vue2.js +0 -4
- package/dist/views/Environment/EnvironmentColors.vue.js +0 -118
- package/dist/views/Environment/EnvironmentColors.vue2.js +0 -4
- package/dist/views/Environment/EnvironmentModal.vue.js +0 -131
- package/dist/views/Environment/EnvironmentModal.vue2.js +0 -4
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +0 -129
- package/dist/views/Environment/EnvironmentVariableDropdown.vue2.js +0 -4
- package/dist/views/Environment/handle-drag.js +0 -32
- package/dist/views/Request/Request.vue.js +0 -7
- package/dist/views/Request/Request.vue2.js +0 -105
- package/dist/views/Request/RequestRoot.vue.js +0 -7
- package/dist/views/Request/RequestRoot.vue2.js +0 -123
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +0 -52
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +0 -246
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +0 -135
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +0 -209
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +0 -116
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +0 -50
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +0 -219
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js +0 -28
- package/dist/views/Request/RequestSection/RequestBody.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -451
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +0 -170
- package/dist/views/Request/RequestSection/RequestParams.vue.js +0 -162
- package/dist/views/Request/RequestSection/RequestParams.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +0 -96
- package/dist/views/Request/RequestSection/RequestPathParams.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestSection.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +0 -247
- package/dist/views/Request/RequestSection/RequestTable.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +0 -227
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +0 -61
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +0 -29
- package/dist/views/Request/RequestSection/helpers/getting-started.js +0 -13
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +0 -16
- package/dist/views/Request/RequestSidebar.vue.js +0 -7
- package/dist/views/Request/RequestSidebar.vue2.js +0 -341
- package/dist/views/Request/RequestSidebarItem.vue.js +0 -8
- package/dist/views/Request/RequestSidebarItem.vue2.js +0 -464
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +0 -7
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +0 -236
- package/dist/views/Request/RequestSubpageHeader.vue.js +0 -7
- package/dist/views/Request/RequestSubpageHeader.vue2.js +0 -79
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +0 -96
- package/dist/views/Request/ResponseSection/RequestHeaders.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +0 -83
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +0 -36
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +0 -14
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +0 -63
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +0 -42
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +0 -74
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +0 -25
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +0 -50
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +0 -5
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +0 -51
- package/dist/views/Request/ResponseSection/ResponseCookies.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +0 -103
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +0 -96
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +0 -38
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +0 -67
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +0 -189
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +0 -182
- package/dist/views/Request/components/WorkspaceDropdown.vue2.js +0 -4
- package/dist/views/Request/consts/mediaTypes.js +0 -131
- package/dist/views/Request/consts/new-auth-options.js +0 -100
- package/dist/views/Request/handle-drag.js +0 -42
- package/dist/views/Request/hooks/useOpenApiWatcher.js +0 -57
- package/dist/views/Request/libs/auth.js +0 -52
- package/dist/views/Request/libs/oauth2.js +0 -127
- package/dist/views/Request/libs/request.js +0 -40
- package/dist/views/Request/libs/watch-mode.js +0 -337
- package/dist/views/Settings/Settings.vue.js +0 -4
- package/dist/views/Settings/Settings.vue2.js +0 -29
- package/dist/views/Settings/SettingsGeneral.vue.js +0 -286
- package/dist/views/Settings/SettingsGeneral.vue2.js +0 -4
- package/dist/views/Settings/components/SettingsAppearance.vue.js +0 -85
- package/dist/views/Settings/components/SettingsAppearance.vue2.js +0 -4
- package/dist/views/Settings/components/SettingsSection.vue.js +0 -24
- package/dist/views/Settings/components/SettingsSection.vue2.js +0 -4
|
@@ -0,0 +1,989 @@
|
|
|
1
|
+
import { r as useWorkspace } from "./store-DpSUVhjp.js";
|
|
2
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BmmBcIzD.js";
|
|
3
|
+
import { n as DataTableCell_default, r as DataTable_default, t as DataTableRow_default } from "./DataTableRow-c3XveEUO.js";
|
|
4
|
+
import { n as DataTableCheckbox_default } from "./DataTable-BqbZKW3K.js";
|
|
5
|
+
import { t as DataTableInput_default } from "./DataTableInput-yaU5g-kP.js";
|
|
6
|
+
import { t as ViewLayoutCollapse_default } from "./ViewLayoutCollapse-CiTb-Uml.js";
|
|
7
|
+
import { a as formatScheme, i as formatComplexScheme, o as getSchemeOptions, s as getSecurityRequirements, t as authorizeOauth2 } from "./libs-spbv4P0g.js";
|
|
8
|
+
import { Fragment, capitalize, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, watch, withCtx, withModifiers } from "vue";
|
|
9
|
+
import { ScalarButton, ScalarComboboxMultiselect, ScalarIcon, ScalarIconButton, ScalarListboxCheckbox, ScalarMarkdownSummary, ScalarModal, useLoadingState, useModal } from "@scalar/components";
|
|
10
|
+
import { useToasts } from "@scalar/use-toasts";
|
|
11
|
+
import { isDefined } from "@scalar/oas-utils/helpers";
|
|
12
|
+
import { CLIENT_LS_KEYS, safeLocalStorage } from "@scalar/helpers/object/local-storage";
|
|
13
|
+
import { pkceOptions } from "@scalar/oas-utils/entities/spec";
|
|
14
|
+
import { isDefined as isDefined$1 } from "@scalar/helpers/array/is-defined";
|
|
15
|
+
import { Disclosure, DisclosureButton, DisclosurePanel } from "@headlessui/vue";
|
|
16
|
+
import { ScalarIconCaretDown, ScalarIconTrash } from "@scalar/icons";
|
|
17
|
+
//#region src/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue?vue&type=script&setup=true&lang.ts
|
|
18
|
+
var _hoisted_1$6 = { class: "text-c-2 mb-4 text-sm leading-normal" };
|
|
19
|
+
var _hoisted_2$5 = { class: "flex justify-between gap-2" };
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue
|
|
22
|
+
var DeleteRequestAuthModal_default = /* @__PURE__ */ defineComponent({
|
|
23
|
+
__name: "DeleteRequestAuthModal",
|
|
24
|
+
props: {
|
|
25
|
+
state: {},
|
|
26
|
+
scheme: {}
|
|
27
|
+
},
|
|
28
|
+
emits: ["close", "delete"],
|
|
29
|
+
setup(__props, { emit: __emit }) {
|
|
30
|
+
const props = __props;
|
|
31
|
+
const emit = __emit;
|
|
32
|
+
const { securitySchemeMutators } = useWorkspace();
|
|
33
|
+
const deleteScheme = () => {
|
|
34
|
+
if (props.scheme?.id) securitySchemeMutators.delete(props.scheme.id);
|
|
35
|
+
emit("delete");
|
|
36
|
+
};
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return openBlock(), createBlock(unref(ScalarModal), {
|
|
39
|
+
size: "xxs",
|
|
40
|
+
state: __props.state,
|
|
41
|
+
title: "Delete Security Scheme"
|
|
42
|
+
}, {
|
|
43
|
+
default: withCtx(() => [createElementVNode("p", _hoisted_1$6, " This cannot be undone. You're about to delete the " + toDisplayString(__props.scheme?.label) + " security scheme from the collection. ", 1), createElementVNode("div", _hoisted_2$5, [createVNode(unref(ScalarButton), {
|
|
44
|
+
class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",
|
|
45
|
+
type: "button",
|
|
46
|
+
variant: "outlined",
|
|
47
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
|
|
48
|
+
}, {
|
|
49
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Cancel ", -1)])]),
|
|
50
|
+
_: 1
|
|
51
|
+
}), createVNode(unref(ScalarButton), {
|
|
52
|
+
class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",
|
|
53
|
+
type: "submit",
|
|
54
|
+
onClick: deleteScheme
|
|
55
|
+
}, {
|
|
56
|
+
default: withCtx(() => [createTextVNode(" Delete " + toDisplayString(__props.scheme?.label), 1)]),
|
|
57
|
+
_: 1
|
|
58
|
+
})])]),
|
|
59
|
+
_: 1
|
|
60
|
+
}, 8, ["state"]);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/views/Request/RequestSection/helpers/update-scheme.ts
|
|
66
|
+
/** Update the security scheme with side effects */
|
|
67
|
+
var updateScheme = (uid, path, value, { securitySchemeMutators, securitySchemes }, persistAuth = false) => {
|
|
68
|
+
securitySchemeMutators.edit(uid, path, value);
|
|
69
|
+
if (!persistAuth) return;
|
|
70
|
+
try {
|
|
71
|
+
const auth = JSON.parse(safeLocalStorage().getItem(CLIENT_LS_KEYS.AUTH) ?? "{}");
|
|
72
|
+
const scheme = securitySchemes[uid];
|
|
73
|
+
if (auth && scheme?.nameKey) {
|
|
74
|
+
const nameScheme = auth[scheme.nameKey] ||= {};
|
|
75
|
+
nameScheme[path] = value;
|
|
76
|
+
safeLocalStorage().setItem(CLIENT_LS_KEYS.AUTH, JSON.stringify(auth));
|
|
77
|
+
}
|
|
78
|
+
} catch (e) {
|
|
79
|
+
console.error(e);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.ts
|
|
84
|
+
/**
|
|
85
|
+
* Manually restore the auth from local storage
|
|
86
|
+
*
|
|
87
|
+
* Only use this if you need to restore auth manually, in the client web + app we load the whole store from
|
|
88
|
+
* local storage so it isn't needed there.
|
|
89
|
+
*/
|
|
90
|
+
var restoreAuthFromLocalStorage = (store, collectionUid) => {
|
|
91
|
+
try {
|
|
92
|
+
const { collectionMutators, securitySchemes, securitySchemeMutators } = store;
|
|
93
|
+
const auth = JSON.parse(safeLocalStorage().getItem(CLIENT_LS_KEYS.AUTH) ?? "{}");
|
|
94
|
+
/** Map the security scheme name key to the uid */
|
|
95
|
+
const dict = Object.keys(securitySchemes).reduce((acc, key) => {
|
|
96
|
+
const scheme = securitySchemes[key];
|
|
97
|
+
if (scheme) acc[scheme.nameKey] = scheme.uid;
|
|
98
|
+
return acc;
|
|
99
|
+
}, {});
|
|
100
|
+
/** Now we can use the dict to restore the auth from local storage */
|
|
101
|
+
Object.entries(auth).forEach(([key, entry]) => {
|
|
102
|
+
const uid = dict[key];
|
|
103
|
+
if (uid) Object.entries(entry).forEach(([path, value]) => {
|
|
104
|
+
securitySchemeMutators.edit(uid, path, value);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
const uids = JSON.parse(safeLocalStorage().getItem(CLIENT_LS_KEYS.SELECTED_SECURITY_SCHEMES) ?? "[]").map((nameKeys) => {
|
|
108
|
+
if (Array.isArray(nameKeys)) return nameKeys.map((key) => dict[key]).filter(isDefined$1);
|
|
109
|
+
return dict[nameKeys];
|
|
110
|
+
}).filter(isDefined$1);
|
|
111
|
+
collectionMutators.edit(collectionUid, "selectedSecuritySchemeUids", uids);
|
|
112
|
+
} catch (e) {
|
|
113
|
+
console.error(e);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue?vue&type=script&setup=true&lang.ts
|
|
118
|
+
var _hoisted_1$5 = { class: "flex h-fit w-full" };
|
|
119
|
+
var _hoisted_2$4 = { class: "flex-1" };
|
|
120
|
+
var _hoisted_3$3 = { class: "flex items-center gap-1.75" };
|
|
121
|
+
var _hoisted_4$1 = {
|
|
122
|
+
class: "grid auto-rows-auto",
|
|
123
|
+
style: { gridTemplateColumns: "1fr auto" }
|
|
124
|
+
};
|
|
125
|
+
var _hoisted_5$1 = { key: 0 };
|
|
126
|
+
var _hoisted_6 = { class: "font-code text-xs" };
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue
|
|
129
|
+
var OAuthScopesInput_default = /* @__PURE__ */ defineComponent({
|
|
130
|
+
__name: "OAuthScopesInput",
|
|
131
|
+
props: {
|
|
132
|
+
flow: {},
|
|
133
|
+
updateScheme: { type: Function }
|
|
134
|
+
},
|
|
135
|
+
setup(__props) {
|
|
136
|
+
const scopes = computed(() => Object.entries(__props.flow?.scopes ?? {}).map(([key, val]) => ({
|
|
137
|
+
id: key,
|
|
138
|
+
label: key,
|
|
139
|
+
description: val
|
|
140
|
+
})));
|
|
141
|
+
/** An array of the selected scope ids */
|
|
142
|
+
const selectedScopes = computed(() => __props.flow?.selectedScopes || []);
|
|
143
|
+
function setScope(id, checked) {
|
|
144
|
+
if (checked) __props.updateScheme(`flows.${__props.flow.type}.selectedScopes`, [...selectedScopes.value, id]);
|
|
145
|
+
else __props.updateScheme(`flows.${__props.flow.type}.selectedScopes`, selectedScopes.value.filter((scope) => scope !== id));
|
|
146
|
+
}
|
|
147
|
+
const allScopesSelected = computed(() => __props.flow?.selectedScopes?.length === Object.keys(__props.flow?.scopes ?? {}).length);
|
|
148
|
+
const selectAllScopes = () => {
|
|
149
|
+
__props.updateScheme(`flows.${__props.flow.type}.selectedScopes`, Object.keys(__props.flow?.scopes ?? {}));
|
|
150
|
+
};
|
|
151
|
+
const deselectAllScopes = () => {
|
|
152
|
+
__props.updateScheme(`flows.${__props.flow.type}.selectedScopes`, []);
|
|
153
|
+
};
|
|
154
|
+
return (_ctx, _cache) => {
|
|
155
|
+
return openBlock(), createBlock(unref(DataTableCell_default), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
|
|
156
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$5, [_cache[2] || (_cache[2] = createElementVNode("div", { class: "text-c-1 h-full items-center" }, null, -1)), createVNode(unref(Disclosure), {
|
|
157
|
+
as: "div",
|
|
158
|
+
class: "bl flex w-full flex-col"
|
|
159
|
+
}, {
|
|
160
|
+
default: withCtx(() => [createVNode(unref(DisclosureButton), { class: normalizeClass(["group/scopes-accordion hover:text-c-1 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pr-2.25 pl-3 text-left", (__props.flow?.selectedScopes?.length || 0) > 0 ? "text-c-1" : "text-c-3"]) }, {
|
|
161
|
+
default: withCtx(({ open }) => [createElementVNode("div", _hoisted_2$4, " Scopes Selected " + toDisplayString(__props.flow?.selectedScopes?.length || 0) + " / " + toDisplayString(Object.keys(__props.flow?.scopes ?? {}).length || 0), 1), createElementVNode("div", _hoisted_3$3, [
|
|
162
|
+
allScopesSelected.value ? (openBlock(), createBlock(unref(ScalarButton), {
|
|
163
|
+
key: 0,
|
|
164
|
+
class: "pr-0.75 pl-1 transition-none",
|
|
165
|
+
size: "sm",
|
|
166
|
+
variant: "ghost",
|
|
167
|
+
onClick: withModifiers(deselectAllScopes, ["stop"])
|
|
168
|
+
}, {
|
|
169
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" Deselect All ", -1)])]),
|
|
170
|
+
_: 1
|
|
171
|
+
})) : createCommentVNode("", true),
|
|
172
|
+
!allScopesSelected.value ? (openBlock(), createBlock(unref(ScalarButton), {
|
|
173
|
+
key: 1,
|
|
174
|
+
class: "pr-0.75 pl-1 transition-none",
|
|
175
|
+
size: "sm",
|
|
176
|
+
variant: "ghost",
|
|
177
|
+
onClick: withModifiers(selectAllScopes, ["stop"])
|
|
178
|
+
}, {
|
|
179
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Select All ", -1)])]),
|
|
180
|
+
_: 1
|
|
181
|
+
})) : createCommentVNode("", true),
|
|
182
|
+
createVNode(unref(ScalarIcon), {
|
|
183
|
+
class: "text-c-3 group-hover/scopes-accordion:text-c-2",
|
|
184
|
+
icon: open ? "ChevronDown" : "ChevronRight",
|
|
185
|
+
size: "md"
|
|
186
|
+
}, null, 8, ["icon"])
|
|
187
|
+
])]),
|
|
188
|
+
_: 1
|
|
189
|
+
}, 8, ["class"]), createVNode(unref(DisclosurePanel), { as: "template" }, {
|
|
190
|
+
default: withCtx(() => [createElementVNode("table", _hoisted_4$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(scopes.value, ({ id, label, description }) => {
|
|
191
|
+
return openBlock(), createBlock(unref(DataTableRow_default), {
|
|
192
|
+
key: id,
|
|
193
|
+
class: "text-c-2",
|
|
194
|
+
onClick: ($event) => setScope(id, !selectedScopes.value.includes(id))
|
|
195
|
+
}, {
|
|
196
|
+
default: withCtx(() => [createVNode(unref(DataTableCell_default), { class: "hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5" }, {
|
|
197
|
+
default: withCtx(() => [description ? (openBlock(), createElementBlock("div", _hoisted_5$1, [createElementVNode("span", _hoisted_6, toDisplayString(label), 1), createTextVNode(" – " + toDisplayString(description), 1)])) : createCommentVNode("", true)]),
|
|
198
|
+
_: 2
|
|
199
|
+
}, 1024), createVNode(unref(DataTableCheckbox_default), {
|
|
200
|
+
modelValue: selectedScopes.value.includes(id),
|
|
201
|
+
"onUpdate:modelValue": () => {}
|
|
202
|
+
}, null, 8, ["modelValue"])]),
|
|
203
|
+
_: 2
|
|
204
|
+
}, 1032, ["onClick"]);
|
|
205
|
+
}), 128))])]),
|
|
206
|
+
_: 1
|
|
207
|
+
})]),
|
|
208
|
+
_: 1
|
|
209
|
+
})])]),
|
|
210
|
+
_: 1
|
|
211
|
+
});
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue?vue&type=script&setup=true&lang.ts
|
|
217
|
+
var _hoisted_1$4 = ["for"];
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue
|
|
220
|
+
var RequestAuthDataTableInput_default = /* @__PURE__ */ defineComponent({
|
|
221
|
+
__name: "RequestAuthDataTableInput",
|
|
222
|
+
props: {
|
|
223
|
+
type: {},
|
|
224
|
+
containerClass: {},
|
|
225
|
+
required: {
|
|
226
|
+
type: Boolean,
|
|
227
|
+
default: false
|
|
228
|
+
},
|
|
229
|
+
modelValue: {},
|
|
230
|
+
readOnly: {
|
|
231
|
+
type: Boolean,
|
|
232
|
+
default: false
|
|
233
|
+
},
|
|
234
|
+
environment: {},
|
|
235
|
+
envVariables: {},
|
|
236
|
+
workspace: {}
|
|
237
|
+
},
|
|
238
|
+
emits: [
|
|
239
|
+
"update:modelValue",
|
|
240
|
+
"inputFocus",
|
|
241
|
+
"inputBlur",
|
|
242
|
+
"selectVariable"
|
|
243
|
+
],
|
|
244
|
+
setup(__props, { emit: __emit }) {
|
|
245
|
+
const props = __props;
|
|
246
|
+
const emit = __emit;
|
|
247
|
+
const id = useId();
|
|
248
|
+
return (_ctx, _cache) => {
|
|
249
|
+
return openBlock(), createBlock(DataTableInput_default, mergeProps({
|
|
250
|
+
id: unref(id),
|
|
251
|
+
canAddCustomEnumValue: !props.readOnly,
|
|
252
|
+
containerClass: props.containerClass
|
|
253
|
+
}, _ctx.$attrs, {
|
|
254
|
+
envVariables: props.envVariables,
|
|
255
|
+
environment: props.environment,
|
|
256
|
+
lineWrapping: "",
|
|
257
|
+
modelValue: props.modelValue,
|
|
258
|
+
readOnly: props.readOnly,
|
|
259
|
+
required: props.required,
|
|
260
|
+
type: props.type,
|
|
261
|
+
workspace: props.workspace,
|
|
262
|
+
onInputBlur: _cache[0] || (_cache[0] = ($event) => emit("inputBlur")),
|
|
263
|
+
onInputFocus: _cache[1] || (_cache[1] = ($event) => emit("inputFocus")),
|
|
264
|
+
onSelectVariable: _cache[2] || (_cache[2] = ($event) => emit("selectVariable", $event)),
|
|
265
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
|
|
266
|
+
}), {
|
|
267
|
+
default: withCtx(() => [createElementVNode("label", { for: unref(id) }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$4)]),
|
|
268
|
+
icon: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
|
|
269
|
+
_: 3
|
|
270
|
+
}, 16, [
|
|
271
|
+
"id",
|
|
272
|
+
"canAddCustomEnumValue",
|
|
273
|
+
"containerClass",
|
|
274
|
+
"envVariables",
|
|
275
|
+
"environment",
|
|
276
|
+
"modelValue",
|
|
277
|
+
"readOnly",
|
|
278
|
+
"required",
|
|
279
|
+
"type",
|
|
280
|
+
"workspace"
|
|
281
|
+
]);
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/views/Request/RequestSection/RequestAuth/OAuth2.vue?vue&type=script&setup=true&lang.ts
|
|
287
|
+
var _hoisted_1$3 = { class: "flex h-8 items-center justify-end border-t" };
|
|
288
|
+
var _hoisted_2$3 = { class: "flex h-8 w-full items-center justify-end border-t" };
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/views/Request/RequestSection/RequestAuth/OAuth2.vue
|
|
291
|
+
var OAuth2_default = /* @__PURE__ */ defineComponent({
|
|
292
|
+
__name: "OAuth2",
|
|
293
|
+
props: {
|
|
294
|
+
collection: {},
|
|
295
|
+
environment: {},
|
|
296
|
+
envVariables: {},
|
|
297
|
+
flow: {},
|
|
298
|
+
persistAuth: {
|
|
299
|
+
type: Boolean,
|
|
300
|
+
default: false
|
|
301
|
+
},
|
|
302
|
+
scheme: {},
|
|
303
|
+
server: {},
|
|
304
|
+
workspace: {}
|
|
305
|
+
},
|
|
306
|
+
emits: ["authorized"],
|
|
307
|
+
setup(__props, { emit: __emit }) {
|
|
308
|
+
const emits = __emit;
|
|
309
|
+
const loader = useLoadingState();
|
|
310
|
+
const { toast } = useToasts();
|
|
311
|
+
const storeContext = useWorkspace();
|
|
312
|
+
/** Update the current scheme */
|
|
313
|
+
const updateScheme$2 = (path, value) => updateScheme(__props.scheme.uid, path, value, storeContext, __props.persistAuth);
|
|
314
|
+
/** Authorize the user using specified flow */
|
|
315
|
+
const handleAuthorize = async () => {
|
|
316
|
+
if (loader.isActive || !__props.collection?.uid) return;
|
|
317
|
+
if (!__props.server) {
|
|
318
|
+
toast("No server selected", "error");
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
loader.start();
|
|
322
|
+
const [error, accessToken] = await authorizeOauth2(__props.flow, __props.server, __props.workspace?.proxyUrl);
|
|
323
|
+
await loader.clear();
|
|
324
|
+
if (accessToken) {
|
|
325
|
+
updateScheme$2(`flows.${__props.flow.type}.token`, accessToken);
|
|
326
|
+
emits("authorized");
|
|
327
|
+
} else {
|
|
328
|
+
console.error(error);
|
|
329
|
+
toast(error?.message ?? "Failed to authorize", "error");
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
/** To make prop drilling a little easier */
|
|
333
|
+
const dataTableInputProps = {
|
|
334
|
+
environment: __props.environment,
|
|
335
|
+
envVariables: __props.envVariables,
|
|
336
|
+
workspace: __props.workspace
|
|
337
|
+
};
|
|
338
|
+
return (_ctx, _cache) => {
|
|
339
|
+
return openBlock(), createElementBlock(Fragment, null, [__props.flow.token ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(DataTableRow_default), null, {
|
|
340
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps(dataTableInputProps, {
|
|
341
|
+
class: "border-r-transparent",
|
|
342
|
+
modelValue: __props.flow.token,
|
|
343
|
+
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
344
|
+
type: "password",
|
|
345
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = (v) => updateScheme$2(`flows.${__props.flow.type}.token`, v))
|
|
346
|
+
}), {
|
|
347
|
+
default: withCtx(() => [..._cache[10] || (_cache[10] = [createTextVNode(" Access Token ", -1)])]),
|
|
348
|
+
_: 1
|
|
349
|
+
}, 16, ["modelValue"])]),
|
|
350
|
+
_: 1
|
|
351
|
+
}), createVNode(unref(DataTableRow_default), { class: "min-w-full" }, {
|
|
352
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$3, [createVNode(unref(ScalarButton), {
|
|
353
|
+
class: "mr-1 p-0 px-2 py-0.5",
|
|
354
|
+
loader: unref(loader),
|
|
355
|
+
size: "sm",
|
|
356
|
+
variant: "outlined",
|
|
357
|
+
onClick: _cache[1] || (_cache[1] = ($event) => updateScheme$2(`flows.${__props.flow.type}.token`, ""))
|
|
358
|
+
}, {
|
|
359
|
+
default: withCtx(() => [..._cache[11] || (_cache[11] = [createTextVNode(" Clear ", -1)])]),
|
|
360
|
+
_: 1
|
|
361
|
+
}, 8, ["loader"]), renderSlot(_ctx.$slots, "oauth-actions")])]),
|
|
362
|
+
_: 3
|
|
363
|
+
})], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
364
|
+
createVNode(unref(DataTableRow_default), null, {
|
|
365
|
+
default: withCtx(() => ["authorizationUrl" in __props.flow ? (openBlock(), createBlock(RequestAuthDataTableInput_default, mergeProps({ key: 0 }, dataTableInputProps, {
|
|
366
|
+
containerClass: "border-r-0",
|
|
367
|
+
modelValue: __props.flow.authorizationUrl,
|
|
368
|
+
placeholder: "https://galaxy.scalar.com/authorize",
|
|
369
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = (v) => updateScheme$2(`flows.${__props.flow.type}.authorizationUrl`, v))
|
|
370
|
+
}), {
|
|
371
|
+
default: withCtx(() => [..._cache[12] || (_cache[12] = [createTextVNode(" Auth URL ", -1)])]),
|
|
372
|
+
_: 1
|
|
373
|
+
}, 16, ["modelValue"])) : createCommentVNode("", true), "tokenUrl" in __props.flow ? (openBlock(), createBlock(RequestAuthDataTableInput_default, mergeProps({ key: 1 }, dataTableInputProps, {
|
|
374
|
+
modelValue: __props.flow.tokenUrl,
|
|
375
|
+
placeholder: "https://galaxy.scalar.com/token",
|
|
376
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = (v) => updateScheme$2(`flows.${__props.flow.type}.tokenUrl`, v))
|
|
377
|
+
}), {
|
|
378
|
+
default: withCtx(() => [..._cache[13] || (_cache[13] = [createTextVNode(" Token URL ", -1)])]),
|
|
379
|
+
_: 1
|
|
380
|
+
}, 16, ["modelValue"])) : createCommentVNode("", true)]),
|
|
381
|
+
_: 1
|
|
382
|
+
}),
|
|
383
|
+
"x-scalar-redirect-uri" in __props.flow ? (openBlock(), createBlock(unref(DataTableRow_default), { key: 0 }, {
|
|
384
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps(dataTableInputProps, {
|
|
385
|
+
modelValue: __props.flow["x-scalar-redirect-uri"],
|
|
386
|
+
placeholder: "https://galaxy.scalar.com/callback",
|
|
387
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = (v) => updateScheme$2(`flows.${__props.flow.type}.x-scalar-redirect-uri`, v))
|
|
388
|
+
}), {
|
|
389
|
+
default: withCtx(() => [..._cache[14] || (_cache[14] = [createTextVNode(" Redirect URL ", -1)])]),
|
|
390
|
+
_: 1
|
|
391
|
+
}, 16, ["modelValue"])]),
|
|
392
|
+
_: 1
|
|
393
|
+
})) : createCommentVNode("", true),
|
|
394
|
+
__props.flow.type === "password" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createVNode(unref(DataTableRow_default), null, {
|
|
395
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps(dataTableInputProps, {
|
|
396
|
+
class: "text-c-2",
|
|
397
|
+
modelValue: __props.flow.username,
|
|
398
|
+
placeholder: "janedoe",
|
|
399
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = (v) => updateScheme$2(`flows.${__props.flow.type}.username`, v))
|
|
400
|
+
}), {
|
|
401
|
+
default: withCtx(() => [..._cache[15] || (_cache[15] = [createTextVNode(" Username ", -1)])]),
|
|
402
|
+
_: 1
|
|
403
|
+
}, 16, ["modelValue"])]),
|
|
404
|
+
_: 1
|
|
405
|
+
}), createVNode(unref(DataTableRow_default), null, {
|
|
406
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps(dataTableInputProps, {
|
|
407
|
+
modelValue: __props.flow.password,
|
|
408
|
+
placeholder: "********",
|
|
409
|
+
type: "password",
|
|
410
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = (v) => updateScheme$2(`flows.${__props.flow.type}.password`, v))
|
|
411
|
+
}), {
|
|
412
|
+
default: withCtx(() => [..._cache[16] || (_cache[16] = [createTextVNode(" Password ", -1)])]),
|
|
413
|
+
_: 1
|
|
414
|
+
}, 16, ["modelValue"])]),
|
|
415
|
+
_: 1
|
|
416
|
+
})], 64)) : createCommentVNode("", true),
|
|
417
|
+
createVNode(unref(DataTableRow_default), null, {
|
|
418
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps(dataTableInputProps, {
|
|
419
|
+
modelValue: __props.flow["x-scalar-client-id"],
|
|
420
|
+
placeholder: "12345",
|
|
421
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = (v) => updateScheme$2(`flows.${__props.flow.type}.x-scalar-client-id`, v))
|
|
422
|
+
}), {
|
|
423
|
+
default: withCtx(() => [..._cache[17] || (_cache[17] = [createTextVNode(" Client ID ", -1)])]),
|
|
424
|
+
_: 1
|
|
425
|
+
}, 16, ["modelValue"])]),
|
|
426
|
+
_: 1
|
|
427
|
+
}),
|
|
428
|
+
"clientSecret" in __props.flow ? (openBlock(), createBlock(unref(DataTableRow_default), { key: 2 }, {
|
|
429
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps(dataTableInputProps, {
|
|
430
|
+
modelValue: __props.flow.clientSecret,
|
|
431
|
+
placeholder: "XYZ123",
|
|
432
|
+
type: "password",
|
|
433
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = (v) => updateScheme$2(`flows.${__props.flow.type}.clientSecret`, v))
|
|
434
|
+
}), {
|
|
435
|
+
default: withCtx(() => [..._cache[18] || (_cache[18] = [createTextVNode(" Client Secret ", -1)])]),
|
|
436
|
+
_: 1
|
|
437
|
+
}, 16, ["modelValue"])]),
|
|
438
|
+
_: 1
|
|
439
|
+
})) : createCommentVNode("", true),
|
|
440
|
+
"x-usePkce" in __props.flow ? (openBlock(), createBlock(unref(DataTableRow_default), { key: 3 }, {
|
|
441
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps(dataTableInputProps, {
|
|
442
|
+
enum: unref(pkceOptions),
|
|
443
|
+
modelValue: __props.flow["x-usePkce"],
|
|
444
|
+
readOnly: "",
|
|
445
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = (v) => updateScheme$2(`flows.${__props.flow.type}.x-usePkce`, v))
|
|
446
|
+
}), {
|
|
447
|
+
default: withCtx(() => [..._cache[19] || (_cache[19] = [createTextVNode(" Use PKCE ", -1)])]),
|
|
448
|
+
_: 1
|
|
449
|
+
}, 16, ["enum", "modelValue"])]),
|
|
450
|
+
_: 1
|
|
451
|
+
})) : createCommentVNode("", true),
|
|
452
|
+
Object.keys(__props.flow.scopes ?? {}).length ? (openBlock(), createBlock(unref(DataTableRow_default), { key: 4 }, {
|
|
453
|
+
default: withCtx(() => [createVNode(OAuthScopesInput_default, {
|
|
454
|
+
flow: __props.flow,
|
|
455
|
+
updateScheme: updateScheme$2
|
|
456
|
+
}, null, 8, ["flow"])]),
|
|
457
|
+
_: 1
|
|
458
|
+
})) : createCommentVNode("", true)
|
|
459
|
+
], 64)), !__props.flow.token ? (openBlock(), createBlock(unref(DataTableRow_default), {
|
|
460
|
+
key: 2,
|
|
461
|
+
class: "min-w-full"
|
|
462
|
+
}, {
|
|
463
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_2$3, [createVNode(unref(ScalarButton), {
|
|
464
|
+
class: "mr-0.75 p-0 px-2 py-0.5",
|
|
465
|
+
loader: unref(loader),
|
|
466
|
+
size: "sm",
|
|
467
|
+
variant: "outlined",
|
|
468
|
+
onClick: handleAuthorize
|
|
469
|
+
}, {
|
|
470
|
+
default: withCtx(() => [..._cache[20] || (_cache[20] = [createTextVNode(" Authorize ", -1)])]),
|
|
471
|
+
_: 1
|
|
472
|
+
}, 8, ["loader"])])]),
|
|
473
|
+
_: 1
|
|
474
|
+
})) : createCommentVNode("", true)], 64);
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue?vue&type=script&setup=true&lang.ts
|
|
480
|
+
var _hoisted_1$2 = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow-hidden px-3 py-1.25 text-ellipsis group-hover/auth:absolute group-hover/auth:h-auto group-hover/auth:border-b *:first:line-clamp-1 *:first:text-ellipsis group-hover/auth:*:first:line-clamp-none" };
|
|
481
|
+
var _hoisted_2$2 = {
|
|
482
|
+
key: 0,
|
|
483
|
+
class: "flex min-h-8 border-t text-base"
|
|
484
|
+
};
|
|
485
|
+
var _hoisted_3$2 = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" };
|
|
486
|
+
var _hoisted_4 = ["onClick"];
|
|
487
|
+
var _hoisted_5 = { class: "relative z-10" };
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue
|
|
490
|
+
var RequestAuthTab_default = /* @__PURE__ */ defineComponent({
|
|
491
|
+
__name: "RequestAuthTab",
|
|
492
|
+
props: {
|
|
493
|
+
collection: {},
|
|
494
|
+
environment: {},
|
|
495
|
+
envVariables: {},
|
|
496
|
+
layout: {},
|
|
497
|
+
persistAuth: {
|
|
498
|
+
type: Boolean,
|
|
499
|
+
default: false
|
|
500
|
+
},
|
|
501
|
+
securitySchemeUids: {},
|
|
502
|
+
server: {},
|
|
503
|
+
workspace: {}
|
|
504
|
+
},
|
|
505
|
+
emits: ["authorized"],
|
|
506
|
+
setup(__props, { emit: __emit }) {
|
|
507
|
+
const emits = __emit;
|
|
508
|
+
const storeContext = useWorkspace();
|
|
509
|
+
const { securitySchemes } = storeContext;
|
|
510
|
+
const security = computed(() => __props.securitySchemeUids.map((uid) => ({ scheme: securitySchemes[uid] })));
|
|
511
|
+
const activeFlow = ref("");
|
|
512
|
+
const generateLabel = (scheme) => {
|
|
513
|
+
const description = scheme.description ? `: ${scheme.description}` : "";
|
|
514
|
+
const baseLabel = `${capitalize(scheme.nameKey)}${description || `: ${scheme.type}`}`;
|
|
515
|
+
if (scheme.type === "apiKey") return `${capitalize(scheme.nameKey)}${description || `: ${scheme.in}`}`;
|
|
516
|
+
if (scheme.type === "oauth2") {
|
|
517
|
+
const firstFlow = Object.values(scheme.flows ?? {})[0];
|
|
518
|
+
return `${capitalize(scheme.nameKey)}: ${activeFlow.value ? activeFlow.value : firstFlow?.type ?? ""}${description}`;
|
|
519
|
+
}
|
|
520
|
+
if (scheme.type === "http") return `${capitalize(scheme.nameKey)}: ${scheme.scheme}${description}`;
|
|
521
|
+
return `${baseLabel}${description}`;
|
|
522
|
+
};
|
|
523
|
+
/** Wrapper for the updateScheme function */
|
|
524
|
+
const updateScheme$1 = (uid, path, value) => {
|
|
525
|
+
updateScheme(uid, path, value, storeContext, __props.persistAuth);
|
|
526
|
+
};
|
|
527
|
+
onMounted(() => {
|
|
528
|
+
if (!__props.persistAuth) return;
|
|
529
|
+
restoreAuthFromLocalStorage(storeContext, __props.collection.uid);
|
|
530
|
+
});
|
|
531
|
+
/** To make prop drilling a little easier */
|
|
532
|
+
const dataTableInputProps = {
|
|
533
|
+
environment: __props.environment,
|
|
534
|
+
envVariables: __props.envVariables,
|
|
535
|
+
workspace: __props.workspace
|
|
536
|
+
};
|
|
537
|
+
return (_ctx, _cache) => {
|
|
538
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(security.value, ({ scheme }) => {
|
|
539
|
+
return openBlock(), createElementBlock(Fragment, { key: scheme?.uid }, [
|
|
540
|
+
security.value.length > 1 && scheme ? (openBlock(), createBlock(unref(DataTableRow_default), { key: 0 }, {
|
|
541
|
+
default: withCtx(() => [createVNode(unref(DataTableCell_default), {
|
|
542
|
+
"aria-label": generateLabel(scheme),
|
|
543
|
+
class: "text-c-2 group/auth flex items-center leading-[22px] whitespace-nowrap outline-none hover:whitespace-normal"
|
|
544
|
+
}, {
|
|
545
|
+
default: withCtx(() => [createElementVNode("p", _hoisted_1$2, toDisplayString(generateLabel(scheme)), 1)]),
|
|
546
|
+
_: 2
|
|
547
|
+
}, 1032, ["aria-label"])]),
|
|
548
|
+
_: 2
|
|
549
|
+
}, 1024)) : createCommentVNode("", true),
|
|
550
|
+
scheme?.description && security.value.length <= 1 ? (openBlock(), createBlock(unref(DataTableRow_default), { key: 1 }, {
|
|
551
|
+
default: withCtx(() => [createVNode(unref(DataTableCell_default), {
|
|
552
|
+
"aria-label": scheme.description,
|
|
553
|
+
class: "max-h-[auto]"
|
|
554
|
+
}, {
|
|
555
|
+
default: withCtx(() => [createVNode(unref(ScalarMarkdownSummary), {
|
|
556
|
+
class: "auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25",
|
|
557
|
+
value: scheme.description
|
|
558
|
+
}, null, 8, ["value"])]),
|
|
559
|
+
_: 2
|
|
560
|
+
}, 1032, ["aria-label"])]),
|
|
561
|
+
_: 2
|
|
562
|
+
}, 1024)) : createCommentVNode("", true),
|
|
563
|
+
scheme?.type === "http" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [scheme.scheme === "bearer" ? (openBlock(), createBlock(unref(DataTableRow_default), { key: 0 }, {
|
|
564
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps({ ref_for: true }, dataTableInputProps, {
|
|
565
|
+
containerClass: __props.layout === "reference" && "border-t",
|
|
566
|
+
modelValue: scheme.token,
|
|
567
|
+
placeholder: "Token",
|
|
568
|
+
type: "password",
|
|
569
|
+
"onUpdate:modelValue": (v) => updateScheme$1(scheme.uid, "token", v)
|
|
570
|
+
}), {
|
|
571
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Bearer Token ", -1)])]),
|
|
572
|
+
_: 1
|
|
573
|
+
}, 16, [
|
|
574
|
+
"containerClass",
|
|
575
|
+
"modelValue",
|
|
576
|
+
"onUpdate:modelValue"
|
|
577
|
+
])]),
|
|
578
|
+
_: 2
|
|
579
|
+
}, 1024)) : scheme?.scheme === "basic" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createVNode(unref(DataTableRow_default), null, {
|
|
580
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps({ ref_for: true }, dataTableInputProps, {
|
|
581
|
+
class: "text-c-2",
|
|
582
|
+
modelValue: scheme.username,
|
|
583
|
+
placeholder: "janedoe",
|
|
584
|
+
required: "",
|
|
585
|
+
"onUpdate:modelValue": (v) => updateScheme$1(scheme.uid, "username", v)
|
|
586
|
+
}), {
|
|
587
|
+
default: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode(" Username ", -1)])]),
|
|
588
|
+
_: 1
|
|
589
|
+
}, 16, ["modelValue", "onUpdate:modelValue"])]),
|
|
590
|
+
_: 2
|
|
591
|
+
}, 1024), createVNode(unref(DataTableRow_default), null, {
|
|
592
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps({ ref_for: true }, dataTableInputProps, {
|
|
593
|
+
modelValue: scheme.password,
|
|
594
|
+
placeholder: "********",
|
|
595
|
+
type: "password",
|
|
596
|
+
"onUpdate:modelValue": (v) => updateScheme$1(scheme.uid, "password", v)
|
|
597
|
+
}), {
|
|
598
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" Password ", -1)])]),
|
|
599
|
+
_: 1
|
|
600
|
+
}, 16, ["modelValue", "onUpdate:modelValue"])]),
|
|
601
|
+
_: 2
|
|
602
|
+
}, 1024)], 64)) : createCommentVNode("", true)], 64)) : scheme?.type === "apiKey" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createVNode(unref(DataTableRow_default), null, {
|
|
603
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps({ ref_for: true }, dataTableInputProps, {
|
|
604
|
+
containerClass: __props.layout === "reference" && "border-t",
|
|
605
|
+
modelValue: scheme.name,
|
|
606
|
+
placeholder: "api-key",
|
|
607
|
+
"onUpdate:modelValue": (v) => updateScheme$1(scheme.uid, "name", v)
|
|
608
|
+
}), {
|
|
609
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode(" Name ", -1)])]),
|
|
610
|
+
_: 1
|
|
611
|
+
}, 16, [
|
|
612
|
+
"containerClass",
|
|
613
|
+
"modelValue",
|
|
614
|
+
"onUpdate:modelValue"
|
|
615
|
+
])]),
|
|
616
|
+
_: 2
|
|
617
|
+
}, 1024), createVNode(unref(DataTableRow_default), null, {
|
|
618
|
+
default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, mergeProps({ ref_for: true }, dataTableInputProps, {
|
|
619
|
+
modelValue: scheme.value,
|
|
620
|
+
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
621
|
+
type: "password",
|
|
622
|
+
"onUpdate:modelValue": (v) => updateScheme$1(scheme.uid, "value", v)
|
|
623
|
+
}), {
|
|
624
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" Value ", -1)])]),
|
|
625
|
+
_: 1
|
|
626
|
+
}, 16, ["modelValue", "onUpdate:modelValue"])]),
|
|
627
|
+
_: 2
|
|
628
|
+
}, 1024)], 64)) : scheme?.type === "oauth2" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [createVNode(unref(DataTableRow_default), null, {
|
|
629
|
+
default: withCtx(() => [Object.keys(scheme.flows).length > 1 ? (openBlock(), createElementBlock("div", _hoisted_2$2, [createElementVNode("div", _hoisted_3$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(scheme?.flows, (_, key, ind) => {
|
|
630
|
+
return openBlock(), createElementBlock("button", {
|
|
631
|
+
key,
|
|
632
|
+
class: normalizeClass(["floating-bg text-c-3 relative cursor-pointer border-b-[1px] border-transparent py-1 text-base font-medium", {
|
|
633
|
+
"!text-c-1 !rounded-none border-b-[1px] !border-current": __props.layout !== "reference" && (activeFlow.value === key || ind === 0 && !activeFlow.value),
|
|
634
|
+
"!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100": __props.layout === "reference" && (activeFlow.value === key || ind === 0 && !activeFlow.value)
|
|
635
|
+
}]),
|
|
636
|
+
type: "button",
|
|
637
|
+
onClick: ($event) => activeFlow.value = key
|
|
638
|
+
}, [createElementVNode("span", _hoisted_5, toDisplayString(key), 1)], 10, _hoisted_4);
|
|
639
|
+
}), 128))])])) : createCommentVNode("", true)]),
|
|
640
|
+
_: 2
|
|
641
|
+
}, 1024), (openBlock(true), createElementBlock(Fragment, null, renderList(scheme?.flows, (flow, key, ind) => {
|
|
642
|
+
return openBlock(), createElementBlock(Fragment, { key }, [activeFlow.value === key || ind === 0 && !activeFlow.value ? (openBlock(), createBlock(OAuth2_default, mergeProps({
|
|
643
|
+
key: 0,
|
|
644
|
+
ref_for: true
|
|
645
|
+
}, dataTableInputProps, {
|
|
646
|
+
collection: __props.collection,
|
|
647
|
+
flow,
|
|
648
|
+
persistAuth: __props.persistAuth,
|
|
649
|
+
scheme,
|
|
650
|
+
server: __props.server,
|
|
651
|
+
workspace: __props.workspace,
|
|
652
|
+
onAuthorized: _cache[0] || (_cache[0] = ($event) => emits("authorized"))
|
|
653
|
+
}), {
|
|
654
|
+
"oauth-actions": withCtx(() => [renderSlot(_ctx.$slots, "oauth-actions")]),
|
|
655
|
+
_: 3
|
|
656
|
+
}, 16, [
|
|
657
|
+
"collection",
|
|
658
|
+
"flow",
|
|
659
|
+
"persistAuth",
|
|
660
|
+
"scheme",
|
|
661
|
+
"server",
|
|
662
|
+
"workspace"
|
|
663
|
+
])) : createCommentVNode("", true)], 64);
|
|
664
|
+
}), 128))], 64)) : scheme?.type === "openIdConnect" ? (openBlock(), createElementBlock("div", {
|
|
665
|
+
key: 5,
|
|
666
|
+
class: normalizeClass(["text-c-3 bg-b-1 flex min-h-[calc(4rem+1px)] items-center justify-center border-t border-b-0 px-4 text-base", { "rounded-b-lg": __props.layout === "reference" }])
|
|
667
|
+
}, " Coming soon ", 2)) : createCommentVNode("", true)
|
|
668
|
+
], 64);
|
|
669
|
+
}), 128);
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
//#endregion
|
|
674
|
+
//#region src/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue?vue&type=script&setup=true&lang.ts
|
|
675
|
+
var _hoisted_1$1 = ["onClick"];
|
|
676
|
+
var _hoisted_2$1 = { class: "relative z-10 font-medium whitespace-nowrap" };
|
|
677
|
+
var _hoisted_3$1 = {
|
|
678
|
+
key: 0,
|
|
679
|
+
class: "absolute inset-x-1 bottom-[var(--scalar-border-width)] left-1/2 z-1 h-px w-full -translate-x-1/2 bg-current"
|
|
680
|
+
};
|
|
681
|
+
//#endregion
|
|
682
|
+
//#region src/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue
|
|
683
|
+
var RequestAuthDataTable_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
684
|
+
__name: "RequestAuthDataTable",
|
|
685
|
+
props: {
|
|
686
|
+
collection: {},
|
|
687
|
+
environment: {},
|
|
688
|
+
envVariables: {},
|
|
689
|
+
layout: { default: "client" },
|
|
690
|
+
persistAuth: {
|
|
691
|
+
type: Boolean,
|
|
692
|
+
default: false
|
|
693
|
+
},
|
|
694
|
+
selectedSchemeOptions: { default: () => [] },
|
|
695
|
+
server: {},
|
|
696
|
+
workspace: {}
|
|
697
|
+
},
|
|
698
|
+
emits: ["authorized", "activeSchemes"],
|
|
699
|
+
setup(__props, { emit: __emit }) {
|
|
700
|
+
const emits = __emit;
|
|
701
|
+
const { securitySchemes } = useWorkspace();
|
|
702
|
+
const deleteSchemeModal = useModal();
|
|
703
|
+
const selectedScheme = ref(null);
|
|
704
|
+
/** Add new ref for active tab */
|
|
705
|
+
const activeAuthIndex = ref(0);
|
|
706
|
+
/** Return currently selected schemes including complex auth */
|
|
707
|
+
const activeScheme = computed(() => {
|
|
708
|
+
if (!__props.selectedSchemeOptions || __props.selectedSchemeOptions.length === 0) return [];
|
|
709
|
+
const option = __props.selectedSchemeOptions[activeAuthIndex.value];
|
|
710
|
+
if (!option) return [];
|
|
711
|
+
const keys = option.id.split(",").filter(Boolean);
|
|
712
|
+
return keys.length > 1 ? keys : [option.id];
|
|
713
|
+
});
|
|
714
|
+
/** Emit active schemes */
|
|
715
|
+
watch(activeScheme, (newActiveSchemes) => {
|
|
716
|
+
emits("activeSchemes", newActiveSchemes.map((scheme) => securitySchemes[scheme]).filter(isDefined$1));
|
|
717
|
+
}, { immediate: true });
|
|
718
|
+
/** Return true if there are any active schemes */
|
|
719
|
+
const hasActiveSchemes = computed(() => activeScheme.value.length > 0);
|
|
720
|
+
watch(() => __props.selectedSchemeOptions, (newOptions) => {
|
|
721
|
+
if (!newOptions || !newOptions[activeAuthIndex.value]) activeAuthIndex.value = Math.max(0, activeAuthIndex.value - 1);
|
|
722
|
+
});
|
|
723
|
+
return (_ctx, _cache) => {
|
|
724
|
+
return openBlock(), createElementBlock("form", { onSubmit: _cache[2] || (_cache[2] = withModifiers(() => {}, ["prevent"])) }, [
|
|
725
|
+
__props.selectedSchemeOptions.length > 1 ? (openBlock(), createElementBlock("div", {
|
|
726
|
+
key: 0,
|
|
727
|
+
class: normalizeClass(["box-content flex flex-wrap gap-x-2.5 overflow-hidden border border-b-0 px-3", __props.layout === "client" && "border-x-0"])
|
|
728
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.selectedSchemeOptions, (option, index) => {
|
|
729
|
+
return openBlock(), createElementBlock("div", {
|
|
730
|
+
key: option.id,
|
|
731
|
+
class: normalizeClass(["relative z-1 -mb-[var(--scalar-border-width)] flex h-8 cursor-pointer", [activeAuthIndex.value === index ? "text-c-1" : "text-c-3"]])
|
|
732
|
+
}, [createElementVNode("button", {
|
|
733
|
+
class: "floating-bg relative cursor-pointer border-b-[1px] border-transparent py-1 text-sm font-medium",
|
|
734
|
+
type: "button",
|
|
735
|
+
onClick: ($event) => activeAuthIndex.value = index
|
|
736
|
+
}, [createElementVNode("span", _hoisted_2$1, toDisplayString(option.label), 1)], 8, _hoisted_1$1), activeAuthIndex.value === index ? (openBlock(), createElementBlock("div", _hoisted_3$1)) : createCommentVNode("", true)], 2);
|
|
737
|
+
}), 128))], 2)) : createCommentVNode("", true),
|
|
738
|
+
hasActiveSchemes.value ? (openBlock(), createBlock(unref(DataTable_default), {
|
|
739
|
+
key: 1,
|
|
740
|
+
class: normalizeClass(["flex-1", __props.layout === "reference" && "bg-b-1 rounded-b-lg border border-t-0"]),
|
|
741
|
+
columns: [""],
|
|
742
|
+
presentational: ""
|
|
743
|
+
}, {
|
|
744
|
+
default: withCtx(() => [createVNode(RequestAuthTab_default, {
|
|
745
|
+
collection: __props.collection,
|
|
746
|
+
envVariables: __props.envVariables,
|
|
747
|
+
environment: __props.environment,
|
|
748
|
+
layout: __props.layout,
|
|
749
|
+
persistAuth: __props.persistAuth,
|
|
750
|
+
securitySchemeUids: activeScheme.value,
|
|
751
|
+
server: __props.server,
|
|
752
|
+
workspace: __props.workspace,
|
|
753
|
+
onAuthorized: _cache[0] || (_cache[0] = ($event) => emits("authorized"))
|
|
754
|
+
}, {
|
|
755
|
+
"oauth-actions": withCtx(() => [renderSlot(_ctx.$slots, "oauth-actions", {}, void 0, true)]),
|
|
756
|
+
_: 3
|
|
757
|
+
}, 8, [
|
|
758
|
+
"collection",
|
|
759
|
+
"envVariables",
|
|
760
|
+
"environment",
|
|
761
|
+
"layout",
|
|
762
|
+
"persistAuth",
|
|
763
|
+
"securitySchemeUids",
|
|
764
|
+
"server",
|
|
765
|
+
"workspace"
|
|
766
|
+
])]),
|
|
767
|
+
_: 3
|
|
768
|
+
}, 8, ["class"])) : (openBlock(), createElementBlock("div", {
|
|
769
|
+
key: 2,
|
|
770
|
+
class: normalizeClass(["text-c-3 bg-b-1 flex min-h-16 items-center justify-center border-t px-4 text-sm", __props.layout === "reference" && "min-h-[calc(4rem+0.5px)] rounded-b-lg border"])
|
|
771
|
+
}, " No authentication selected ", 2)),
|
|
772
|
+
createVNode(DeleteRequestAuthModal_default, {
|
|
773
|
+
scheme: selectedScheme.value,
|
|
774
|
+
state: unref(deleteSchemeModal),
|
|
775
|
+
onClose: _cache[1] || (_cache[1] = ($event) => unref(deleteSchemeModal).hide())
|
|
776
|
+
}, null, 8, ["scheme", "state"])
|
|
777
|
+
], 32);
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
}), [["__scopeId", "data-v-0bb98074"]]);
|
|
781
|
+
//#endregion
|
|
782
|
+
//#region src/views/Request/RequestSection/RequestAuth/RequestAuth.vue?vue&type=script&setup=true&lang.ts
|
|
783
|
+
var _hoisted_1 = ["id"];
|
|
784
|
+
var _hoisted_2 = { class: "flex flex-1" };
|
|
785
|
+
var _hoisted_3 = { class: "min-w-0 flex-1 truncate" };
|
|
786
|
+
//#endregion
|
|
787
|
+
//#region src/views/Request/RequestSection/RequestAuth/RequestAuth.vue
|
|
788
|
+
var RequestAuth_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
789
|
+
__name: "RequestAuth",
|
|
790
|
+
props: {
|
|
791
|
+
collection: {},
|
|
792
|
+
isReadOnly: {
|
|
793
|
+
type: Boolean,
|
|
794
|
+
default: false
|
|
795
|
+
},
|
|
796
|
+
environment: {},
|
|
797
|
+
envVariables: {},
|
|
798
|
+
layout: {},
|
|
799
|
+
operation: {},
|
|
800
|
+
persistAuth: {
|
|
801
|
+
type: Boolean,
|
|
802
|
+
default: false
|
|
803
|
+
},
|
|
804
|
+
selectedSecuritySchemeUids: {},
|
|
805
|
+
server: {},
|
|
806
|
+
title: {},
|
|
807
|
+
workspace: {}
|
|
808
|
+
},
|
|
809
|
+
emits: ["authorized", "activeSchemes"],
|
|
810
|
+
setup(__props, { emit: __emit }) {
|
|
811
|
+
const emits = __emit;
|
|
812
|
+
const { securitySchemes, securitySchemeMutators, requestMutators, collectionMutators } = useWorkspace();
|
|
813
|
+
const titleId = useId();
|
|
814
|
+
const comboboxButtonRef = ref(null);
|
|
815
|
+
const deleteSchemeModal = useModal();
|
|
816
|
+
const selectedScheme = ref(null);
|
|
817
|
+
const isViewLayoutOpen = ref(false);
|
|
818
|
+
/** Security requirements for the request */
|
|
819
|
+
const securityRequirements = computed(() => {
|
|
820
|
+
const requirements = getSecurityRequirements(__props.operation, __props.collection);
|
|
821
|
+
return {
|
|
822
|
+
filteredRequirements: requirements.filter((r) => Object.keys(r).length),
|
|
823
|
+
requirements
|
|
824
|
+
};
|
|
825
|
+
});
|
|
826
|
+
/** Indicates if auth is required */
|
|
827
|
+
const authIndicator = computed(() => {
|
|
828
|
+
const { filteredRequirements, requirements } = securityRequirements.value;
|
|
829
|
+
if (!requirements.length) return null;
|
|
830
|
+
const isOptional = !requirements.some((req) => Object.keys(req).length > 1) && filteredRequirements.length < requirements.length;
|
|
831
|
+
return {
|
|
832
|
+
icon: isOptional ? "Unlock" : "Lock",
|
|
833
|
+
text: isOptional ? "Optional" : "Required"
|
|
834
|
+
};
|
|
835
|
+
});
|
|
836
|
+
/**
|
|
837
|
+
* Currently selected auth schemes on the collection, we store complex auth joined by a comma to represent the array
|
|
838
|
+
* in the string
|
|
839
|
+
*/
|
|
840
|
+
const selectedSchemeOptions = computed(() => __props.selectedSecuritySchemeUids.map((s) => {
|
|
841
|
+
if (Array.isArray(s)) return formatComplexScheme(s, securitySchemes);
|
|
842
|
+
const scheme = securitySchemes[s ?? ""];
|
|
843
|
+
if (!scheme) return;
|
|
844
|
+
return formatScheme(scheme);
|
|
845
|
+
}).filter(isDefined));
|
|
846
|
+
/** Update the selected auth types */
|
|
847
|
+
function updateSelectedAuth(entries) {
|
|
848
|
+
const addNewOption = entries.find((e) => e.payload);
|
|
849
|
+
const _entries = entries.filter((e) => !e.payload).map(({ id }) => {
|
|
850
|
+
const arr = id.split(",");
|
|
851
|
+
return arr.length > 1 ? arr : id;
|
|
852
|
+
});
|
|
853
|
+
if (addNewOption?.payload) {
|
|
854
|
+
const scheme = securitySchemeMutators.add(addNewOption.payload, __props.collection?.uid);
|
|
855
|
+
if (scheme) _entries.push(scheme.uid);
|
|
856
|
+
}
|
|
857
|
+
editSelectedSchemeUids(_entries);
|
|
858
|
+
}
|
|
859
|
+
const editSelectedSchemeUids = (uids) => {
|
|
860
|
+
if (__props.collection.useCollectionSecurity) {
|
|
861
|
+
collectionMutators.edit(__props.collection.uid, "selectedSecuritySchemeUids", uids);
|
|
862
|
+
if (!__props.persistAuth) return;
|
|
863
|
+
const nameKeys = uids.map((uids) => {
|
|
864
|
+
if (Array.isArray(uids)) return uids.map((uid) => securitySchemes[uid]?.nameKey);
|
|
865
|
+
return securitySchemes[uids]?.nameKey;
|
|
866
|
+
});
|
|
867
|
+
safeLocalStorage().setItem(CLIENT_LS_KEYS.SELECTED_SECURITY_SCHEMES, JSON.stringify(nameKeys));
|
|
868
|
+
} else if (__props.operation?.uid) requestMutators.edit(__props.operation.uid, "selectedSecuritySchemeUids", uids);
|
|
869
|
+
};
|
|
870
|
+
function handleDeleteScheme({ id, label }) {
|
|
871
|
+
selectedScheme.value = {
|
|
872
|
+
id,
|
|
873
|
+
label
|
|
874
|
+
};
|
|
875
|
+
deleteSchemeModal.show();
|
|
876
|
+
}
|
|
877
|
+
const unselectAuth = (unSelectUid) => {
|
|
878
|
+
if (!unSelectUid) return;
|
|
879
|
+
editSelectedSchemeUids(__props.selectedSecuritySchemeUids.filter((uid) => {
|
|
880
|
+
const arr = unSelectUid.split(",");
|
|
881
|
+
if (arr.length > 1 && Array.isArray(uid) && arr.length === uid.length) return uid.every((u) => !arr.includes(u));
|
|
882
|
+
return uid !== unSelectUid;
|
|
883
|
+
}));
|
|
884
|
+
comboboxButtonRef.value?.$el.focus();
|
|
885
|
+
deleteSchemeModal.hide();
|
|
886
|
+
};
|
|
887
|
+
/** Options for the security scheme dropdown */
|
|
888
|
+
const schemeOptions = computed(() => getSchemeOptions(securityRequirements.value.filteredRequirements, __props.collection?.securitySchemes ?? [], securitySchemes, __props.isReadOnly));
|
|
889
|
+
const openAuthCombobox = (event) => {
|
|
890
|
+
if (isViewLayoutOpen.value) event.stopPropagation();
|
|
891
|
+
comboboxButtonRef.value?.$el.click();
|
|
892
|
+
};
|
|
893
|
+
return (_ctx, _cache) => {
|
|
894
|
+
return openBlock(), createBlock(ViewLayoutCollapse_default, {
|
|
895
|
+
class: "group/params relative",
|
|
896
|
+
itemCount: selectedSchemeOptions.value.length,
|
|
897
|
+
layout: __props.layout,
|
|
898
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isViewLayoutOpen.value = $event)
|
|
899
|
+
}, {
|
|
900
|
+
title: withCtx(() => [createElementVNode("div", {
|
|
901
|
+
id: unref(titleId),
|
|
902
|
+
class: "inline-flex items-center gap-0.5 leading-[20px]"
|
|
903
|
+
}, [createElementVNode("span", null, toDisplayString(__props.title), 1), authIndicator.value ? (openBlock(), createElementBlock("span", {
|
|
904
|
+
key: 0,
|
|
905
|
+
class: normalizeClass(["text-c-3 hover:bg-b-3 hover:text-c-1 -mr-1 cursor-pointer rounded px-1 py-0.5 text-xs leading-[normal]", { "text-c-1": authIndicator.value.text === "Required" }]),
|
|
906
|
+
onClick: openAuthCombobox
|
|
907
|
+
}, toDisplayString(authIndicator.value.text), 3)) : createCommentVNode("", true)], 8, _hoisted_1)]),
|
|
908
|
+
actions: withCtx(() => [createElementVNode("div", _hoisted_2, [createVNode(unref(ScalarComboboxMultiselect), {
|
|
909
|
+
class: "w-72 text-xs",
|
|
910
|
+
modelValue: selectedSchemeOptions.value,
|
|
911
|
+
multiple: "",
|
|
912
|
+
options: schemeOptions.value,
|
|
913
|
+
placement: "bottom-end",
|
|
914
|
+
teleport: "",
|
|
915
|
+
onDelete: handleDeleteScheme,
|
|
916
|
+
"onUpdate:modelValue": updateSelectedAuth
|
|
917
|
+
}, {
|
|
918
|
+
option: withCtx(({ option, selected }) => [
|
|
919
|
+
createVNode(unref(ScalarListboxCheckbox), {
|
|
920
|
+
multiselect: "",
|
|
921
|
+
selected
|
|
922
|
+
}, null, 8, ["selected"]),
|
|
923
|
+
createElementVNode("div", _hoisted_3, toDisplayString(option.label), 1),
|
|
924
|
+
option.isDeletable ?? !__props.isReadOnly ? (openBlock(), createBlock(unref(ScalarIconButton), {
|
|
925
|
+
key: 0,
|
|
926
|
+
class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
|
|
927
|
+
icon: unref(ScalarIconTrash),
|
|
928
|
+
label: `Delete ${option.label}`,
|
|
929
|
+
size: "xs",
|
|
930
|
+
onClick: withModifiers(($event) => handleDeleteScheme(option), ["stop"])
|
|
931
|
+
}, null, 8, [
|
|
932
|
+
"icon",
|
|
933
|
+
"label",
|
|
934
|
+
"onClick"
|
|
935
|
+
])) : createCommentVNode("", true)
|
|
936
|
+
]),
|
|
937
|
+
default: withCtx(() => [createVNode(unref(ScalarButton), {
|
|
938
|
+
ref_key: "comboboxButtonRef",
|
|
939
|
+
ref: comboboxButtonRef,
|
|
940
|
+
"aria-describedby": unref(titleId),
|
|
941
|
+
class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",
|
|
942
|
+
variant: "ghost"
|
|
943
|
+
}, {
|
|
944
|
+
default: withCtx(() => [selectedSchemeOptions.value.length === 1 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[5] || (_cache[5] = createElementVNode("span", { class: "sr-only" }, "Selected Auth Type:", -1)), createTextVNode(" " + toDisplayString(selectedSchemeOptions.value[0]?.label), 1)], 64)) : selectedSchemeOptions.value.length > 1 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [_cache[6] || (_cache[6] = createTextVNode(" Multiple ", -1)), _cache[7] || (_cache[7] = createElementVNode("span", { class: "sr-only" }, "Auth Types Selected", -1))], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [_cache[8] || (_cache[8] = createElementVNode("span", { class: "sr-only" }, "Select", -1)), _cache[9] || (_cache[9] = createTextVNode(" Auth Type ", -1))], 64)), createVNode(unref(ScalarIconCaretDown), {
|
|
945
|
+
class: "size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",
|
|
946
|
+
weight: "bold"
|
|
947
|
+
})]),
|
|
948
|
+
_: 1
|
|
949
|
+
}, 8, ["aria-describedby"])]),
|
|
950
|
+
_: 1
|
|
951
|
+
}, 8, ["modelValue", "options"])])]),
|
|
952
|
+
default: withCtx(() => [createVNode(RequestAuthDataTable_default, {
|
|
953
|
+
collection: __props.collection,
|
|
954
|
+
envVariables: __props.envVariables,
|
|
955
|
+
environment: __props.environment,
|
|
956
|
+
layout: __props.layout,
|
|
957
|
+
persistAuth: __props.persistAuth,
|
|
958
|
+
selectedSchemeOptions: selectedSchemeOptions.value,
|
|
959
|
+
server: __props.server,
|
|
960
|
+
workspace: __props.workspace,
|
|
961
|
+
onActiveSchemes: _cache[0] || (_cache[0] = ($event) => emits("activeSchemes", $event)),
|
|
962
|
+
onAuthorized: _cache[1] || (_cache[1] = ($event) => emits("authorized"))
|
|
963
|
+
}, {
|
|
964
|
+
"oauth-actions": withCtx(() => [renderSlot(_ctx.$slots, "oauth-actions", {}, void 0, true)]),
|
|
965
|
+
_: 3
|
|
966
|
+
}, 8, [
|
|
967
|
+
"collection",
|
|
968
|
+
"envVariables",
|
|
969
|
+
"environment",
|
|
970
|
+
"layout",
|
|
971
|
+
"persistAuth",
|
|
972
|
+
"selectedSchemeOptions",
|
|
973
|
+
"server",
|
|
974
|
+
"workspace"
|
|
975
|
+
]), createVNode(DeleteRequestAuthModal_default, {
|
|
976
|
+
scheme: selectedScheme.value,
|
|
977
|
+
state: unref(deleteSchemeModal),
|
|
978
|
+
onClose: _cache[2] || (_cache[2] = ($event) => unref(deleteSchemeModal).hide()),
|
|
979
|
+
onDelete: _cache[3] || (_cache[3] = ($event) => unselectAuth(selectedScheme.value?.id))
|
|
980
|
+
}, null, 8, ["scheme", "state"])]),
|
|
981
|
+
_: 3
|
|
982
|
+
}, 8, ["itemCount", "layout"]);
|
|
983
|
+
};
|
|
984
|
+
}
|
|
985
|
+
}), [["__scopeId", "data-v-3f1067a4"]]);
|
|
986
|
+
//#endregion
|
|
987
|
+
export { RequestAuthDataTable_default as n, restoreAuthFromLocalStorage as r, RequestAuth_default as t };
|
|
988
|
+
|
|
989
|
+
//# sourceMappingURL=RequestAuth-BzBfIysT.js.map
|