@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
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { defineComponent as q, computed as h, ref as D, createElementBlock as c, openBlock as l, Fragment as d, renderList as B, createBlock as y, createCommentVNode as v, unref as s, withCtx as o, createVNode as u, createElementVNode as f, toDisplayString as j, createTextVNode as x, normalizeClass as E, capitalize as H } from "vue";
|
|
2
|
-
import { ScalarMarkdownSummary as K } from "@scalar/components";
|
|
3
|
-
import { getResolvedRef as L } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
|
-
import G from "./OAuth2.vue.js";
|
|
5
|
-
import J from "./OpenIDConnect.vue.js";
|
|
6
|
-
import b from "./RequestAuthDataTableInput.vue.js";
|
|
7
|
-
import m from "../../../components/data-table/DataTableRow.vue.js";
|
|
8
|
-
import A from "../../../components/data-table/DataTableCell.vue.js";
|
|
9
|
-
const W = { class: "bg-b-1 min-w-0 flex-1 px-3 py-1.25" }, X = { class: "text-c-1 leading-5.5 font-medium" }, Y = { class: "flex min-h-8 border-t text-base" }, Z = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, _ = ["onClick"], ee = { class: "relative z-10" }, te = {
|
|
10
|
-
key: 5,
|
|
11
|
-
class: "text-c-3 flex items-center justify-center border-t p-4 px-4 text-center text-xs text-balance"
|
|
12
|
-
}, ce = /* @__PURE__ */ q({
|
|
13
|
-
__name: "RequestAuthTab",
|
|
14
|
-
props: {
|
|
15
|
-
environment: {},
|
|
16
|
-
isStatic: { type: Boolean },
|
|
17
|
-
proxyUrl: {},
|
|
18
|
-
selectedSecuritySchemas: {},
|
|
19
|
-
securitySchemes: {},
|
|
20
|
-
server: {},
|
|
21
|
-
eventBus: {}
|
|
22
|
-
},
|
|
23
|
-
emits: ["update:selectedScopes"],
|
|
24
|
-
setup(n, { emit: O }) {
|
|
25
|
-
const N = O, k = h(
|
|
26
|
-
() => Object.entries(n.selectedSecuritySchemas).map(([a, t = []]) => ({
|
|
27
|
-
scheme: L(n.securitySchemes[a]),
|
|
28
|
-
name: a,
|
|
29
|
-
scopes: t
|
|
30
|
-
}))
|
|
31
|
-
), V = D(""), S = h(() => k.value.flatMap(({ scheme: t }) => t?.type !== "oauth2" && t?.type !== "openIdConnect" ? [] : Object.keys(t.flows ?? {})).includes(V.value) ? V.value : ""), R = (a) => {
|
|
32
|
-
V.value = a;
|
|
33
|
-
}, F = h(() => k.value.length > 1), $ = (a, t) => {
|
|
34
|
-
const e = H(a);
|
|
35
|
-
switch (t.type) {
|
|
36
|
-
case "apiKey":
|
|
37
|
-
return `${e}: ${t.in}`;
|
|
38
|
-
case "openIdConnect":
|
|
39
|
-
case "oauth2": {
|
|
40
|
-
const r = Object.keys(t.flows ?? {})[0], w = S.value || r;
|
|
41
|
-
return w ? `${e}: ${w}` : e;
|
|
42
|
-
}
|
|
43
|
-
case "http":
|
|
44
|
-
return `${e}: ${t.scheme}`;
|
|
45
|
-
default:
|
|
46
|
-
return e;
|
|
47
|
-
}
|
|
48
|
-
}, T = (a, t) => S.value === a || t === 0 && !S.value, U = () => n.isStatic && "border-t", C = (a, t) => n.eventBus.emit("auth:update:security-scheme-secrets", {
|
|
49
|
-
payload: { type: "http", ...a },
|
|
50
|
-
name: t
|
|
51
|
-
}), M = (a, t) => n.eventBus.emit("auth:update:security-scheme-secrets", {
|
|
52
|
-
payload: { type: "apiKey", ...a },
|
|
53
|
-
name: t
|
|
54
|
-
}), z = (a, t) => n.eventBus.emit("auth:update:security-scheme", {
|
|
55
|
-
payload: { type: "apiKey", ...a },
|
|
56
|
-
name: t
|
|
57
|
-
}), P = (a, t) => {
|
|
58
|
-
N("update:selectedScopes", {
|
|
59
|
-
id: Object.keys(n.selectedSecuritySchemas),
|
|
60
|
-
name: a,
|
|
61
|
-
...t
|
|
62
|
-
});
|
|
63
|
-
}, Q = (a, t) => {
|
|
64
|
-
const e = "floating-bg text-c-3 relative cursor-pointer border-b border-transparent py-1 text-base font-medium";
|
|
65
|
-
return T(a, t) ? `${e} !text-c-1 !rounded-none border-b !border-current ${n.isStatic ? "opacity-100" : ""}` : e;
|
|
66
|
-
};
|
|
67
|
-
return (a, t) => (l(!0), c(d, null, B(k.value, ({ scheme: e, name: r, scopes: w }) => (l(), c(d, { key: r }, [
|
|
68
|
-
F.value && e ? (l(), y(s(m), { key: 0 }, {
|
|
69
|
-
default: o(() => [
|
|
70
|
-
u(s(A), {
|
|
71
|
-
"aria-label": $(r, e),
|
|
72
|
-
class: "max-h-[auto]"
|
|
73
|
-
}, {
|
|
74
|
-
default: o(() => [
|
|
75
|
-
f("div", W, [
|
|
76
|
-
f("p", X, j($(r, e)), 1),
|
|
77
|
-
e.description ? (l(), y(s(K), {
|
|
78
|
-
key: 0,
|
|
79
|
-
class: "auth-description text-c-2 w-full",
|
|
80
|
-
value: e.description
|
|
81
|
-
}, null, 8, ["value"])) : v("", !0)
|
|
82
|
-
])
|
|
83
|
-
]),
|
|
84
|
-
_: 2
|
|
85
|
-
}, 1032, ["aria-label"])
|
|
86
|
-
]),
|
|
87
|
-
_: 2
|
|
88
|
-
}, 1024)) : v("", !0),
|
|
89
|
-
e?.description && !F.value ? (l(), y(s(m), { key: 1 }, {
|
|
90
|
-
default: o(() => [
|
|
91
|
-
u(s(A), {
|
|
92
|
-
"aria-label": e.description,
|
|
93
|
-
class: "max-h-[auto]"
|
|
94
|
-
}, {
|
|
95
|
-
default: o(() => [
|
|
96
|
-
u(s(K), {
|
|
97
|
-
class: "auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25",
|
|
98
|
-
value: e.description
|
|
99
|
-
}, null, 8, ["value"])
|
|
100
|
-
]),
|
|
101
|
-
_: 2
|
|
102
|
-
}, 1032, ["aria-label"])
|
|
103
|
-
]),
|
|
104
|
-
_: 2
|
|
105
|
-
}, 1024)) : v("", !0),
|
|
106
|
-
e?.type === "http" ? (l(), c(d, { key: 2 }, [
|
|
107
|
-
e.scheme === "bearer" ? (l(), y(s(m), { key: 0 }, {
|
|
108
|
-
default: o(() => [
|
|
109
|
-
u(b, {
|
|
110
|
-
containerClass: U(),
|
|
111
|
-
environment: n.environment,
|
|
112
|
-
modelValue: e["x-scalar-secret-token"],
|
|
113
|
-
placeholder: "Token",
|
|
114
|
-
type: "password",
|
|
115
|
-
"onUpdate:modelValue": (i) => C({ "x-scalar-secret-token": i }, r)
|
|
116
|
-
}, {
|
|
117
|
-
default: o(() => [...t[0] || (t[0] = [
|
|
118
|
-
x(" Bearer Token ", -1)
|
|
119
|
-
])]),
|
|
120
|
-
_: 1
|
|
121
|
-
}, 8, ["containerClass", "environment", "modelValue", "onUpdate:modelValue"])
|
|
122
|
-
]),
|
|
123
|
-
_: 2
|
|
124
|
-
}, 1024)) : e?.scheme === "basic" ? (l(), c(d, { key: 1 }, [
|
|
125
|
-
u(s(m), null, {
|
|
126
|
-
default: o(() => [
|
|
127
|
-
u(b, {
|
|
128
|
-
class: "text-c-2",
|
|
129
|
-
environment: n.environment,
|
|
130
|
-
modelValue: e["x-scalar-secret-username"],
|
|
131
|
-
placeholder: "janedoe",
|
|
132
|
-
required: "",
|
|
133
|
-
"onUpdate:modelValue": (i) => C({ "x-scalar-secret-username": i }, r)
|
|
134
|
-
}, {
|
|
135
|
-
default: o(() => [...t[1] || (t[1] = [
|
|
136
|
-
x(" Username ", -1)
|
|
137
|
-
])]),
|
|
138
|
-
_: 1
|
|
139
|
-
}, 8, ["environment", "modelValue", "onUpdate:modelValue"])
|
|
140
|
-
]),
|
|
141
|
-
_: 2
|
|
142
|
-
}, 1024),
|
|
143
|
-
u(s(m), null, {
|
|
144
|
-
default: o(() => [
|
|
145
|
-
u(b, {
|
|
146
|
-
environment: n.environment,
|
|
147
|
-
modelValue: e["x-scalar-secret-password"],
|
|
148
|
-
placeholder: "********",
|
|
149
|
-
type: "password",
|
|
150
|
-
"onUpdate:modelValue": (i) => C({ "x-scalar-secret-password": i }, r)
|
|
151
|
-
}, {
|
|
152
|
-
default: o(() => [...t[2] || (t[2] = [
|
|
153
|
-
x(" Password ", -1)
|
|
154
|
-
])]),
|
|
155
|
-
_: 1
|
|
156
|
-
}, 8, ["environment", "modelValue", "onUpdate:modelValue"])
|
|
157
|
-
]),
|
|
158
|
-
_: 2
|
|
159
|
-
}, 1024)
|
|
160
|
-
], 64)) : v("", !0)
|
|
161
|
-
], 64)) : e?.type === "apiKey" ? (l(), c(d, { key: 3 }, [
|
|
162
|
-
u(s(m), null, {
|
|
163
|
-
default: o(() => [
|
|
164
|
-
u(b, {
|
|
165
|
-
containerClass: U(),
|
|
166
|
-
environment: n.environment,
|
|
167
|
-
modelValue: e.name,
|
|
168
|
-
placeholder: "api-key",
|
|
169
|
-
"onUpdate:modelValue": (i) => z({ name: i }, r)
|
|
170
|
-
}, {
|
|
171
|
-
default: o(() => [...t[3] || (t[3] = [
|
|
172
|
-
x(" Name ", -1)
|
|
173
|
-
])]),
|
|
174
|
-
_: 1
|
|
175
|
-
}, 8, ["containerClass", "environment", "modelValue", "onUpdate:modelValue"])
|
|
176
|
-
]),
|
|
177
|
-
_: 2
|
|
178
|
-
}, 1024),
|
|
179
|
-
u(s(m), null, {
|
|
180
|
-
default: o(() => [
|
|
181
|
-
u(b, {
|
|
182
|
-
environment: n.environment,
|
|
183
|
-
modelValue: e["x-scalar-secret-token"],
|
|
184
|
-
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
185
|
-
type: "password",
|
|
186
|
-
"onUpdate:modelValue": (i) => M({ "x-scalar-secret-token": i }, r)
|
|
187
|
-
}, {
|
|
188
|
-
default: o(() => [...t[4] || (t[4] = [
|
|
189
|
-
x(" Value ", -1)
|
|
190
|
-
])]),
|
|
191
|
-
_: 1
|
|
192
|
-
}, 8, ["environment", "modelValue", "onUpdate:modelValue"])
|
|
193
|
-
]),
|
|
194
|
-
_: 2
|
|
195
|
-
}, 1024)
|
|
196
|
-
], 64)) : e?.type === "oauth2" || e?.type === "openIdConnect" ? (l(), c(d, { key: 4 }, [
|
|
197
|
-
e?.type === "openIdConnect" && !Object.keys(e.flows ?? {}).length ? (l(), y(J, {
|
|
198
|
-
key: 0,
|
|
199
|
-
environment: n.environment,
|
|
200
|
-
eventBus: n.eventBus,
|
|
201
|
-
getStaticBorderClass: U,
|
|
202
|
-
name: r,
|
|
203
|
-
proxyUrl: n.proxyUrl,
|
|
204
|
-
scheme: e
|
|
205
|
-
}, null, 8, ["environment", "eventBus", "name", "proxyUrl", "scheme"])) : v("", !0),
|
|
206
|
-
Object.keys(e.flows ?? {}).length > 1 ? (l(), y(s(m), { key: 1 }, {
|
|
207
|
-
default: o(() => [
|
|
208
|
-
f("div", Y, [
|
|
209
|
-
f("div", Z, [
|
|
210
|
-
(l(!0), c(d, null, B(e.flows, (i, p, g) => (l(), c("button", {
|
|
211
|
-
key: p,
|
|
212
|
-
class: E(Q(p, g)),
|
|
213
|
-
type: "button",
|
|
214
|
-
onClick: (I) => R(p)
|
|
215
|
-
}, [
|
|
216
|
-
f("span", ee, j(p), 1)
|
|
217
|
-
], 10, _))), 128))
|
|
218
|
-
])
|
|
219
|
-
])
|
|
220
|
-
]),
|
|
221
|
-
_: 2
|
|
222
|
-
}, 1024)) : v("", !0),
|
|
223
|
-
(l(!0), c(d, null, B(e.flows, (i, p, g) => (l(), c(d, { key: p }, [
|
|
224
|
-
e.flows && T(p, g) ? (l(), y(G, {
|
|
225
|
-
key: 0,
|
|
226
|
-
environment: n.environment,
|
|
227
|
-
eventBus: n.eventBus,
|
|
228
|
-
flows: e.flows,
|
|
229
|
-
name: r,
|
|
230
|
-
proxyUrl: n.proxyUrl,
|
|
231
|
-
scheme: e,
|
|
232
|
-
selectedScopes: w,
|
|
233
|
-
server: n.server,
|
|
234
|
-
type: p,
|
|
235
|
-
"onUpdate:selectedScopes": (I) => P(r, I)
|
|
236
|
-
}, null, 8, ["environment", "eventBus", "flows", "name", "proxyUrl", "scheme", "selectedScopes", "server", "type", "onUpdate:selectedScopes"])) : v("", !0)
|
|
237
|
-
], 64))), 128))
|
|
238
|
-
], 64)) : (l(), c("div", te, " The security scheme is missing a type, please double check your OpenAPI document or Authentication Configuration "))
|
|
239
|
-
], 64))), 128));
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
export {
|
|
243
|
-
ce as default
|
|
244
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
const e = {
|
|
2
|
-
apiKeyCookie: {
|
|
3
|
-
label: "API Key in Cookies",
|
|
4
|
-
payload: {
|
|
5
|
-
type: "apiKey",
|
|
6
|
-
in: "cookie",
|
|
7
|
-
name: "apiKeyCookie"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
apiKeyHeader: {
|
|
11
|
-
label: "API Key in Headers",
|
|
12
|
-
payload: {
|
|
13
|
-
type: "apiKey",
|
|
14
|
-
in: "header",
|
|
15
|
-
name: "apiKeyHeader"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
apiKeyQuery: {
|
|
19
|
-
label: "API Key in Query Params",
|
|
20
|
-
payload: {
|
|
21
|
-
type: "apiKey",
|
|
22
|
-
in: "query",
|
|
23
|
-
name: "apiKeyQuery"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
httpBasic: {
|
|
27
|
-
label: "HTTP Basic",
|
|
28
|
-
payload: {
|
|
29
|
-
type: "http",
|
|
30
|
-
scheme: "basic"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
httpBearer: {
|
|
34
|
-
label: "HTTP Bearer",
|
|
35
|
-
payload: {
|
|
36
|
-
type: "http",
|
|
37
|
-
scheme: "bearer"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
oauth2Implicit: {
|
|
41
|
-
label: "Oauth2 Implicit Flow",
|
|
42
|
-
payload: {
|
|
43
|
-
type: "oauth2",
|
|
44
|
-
flows: {
|
|
45
|
-
implicit: {
|
|
46
|
-
authorizationUrl: "",
|
|
47
|
-
refreshUrl: "",
|
|
48
|
-
scopes: {}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
oauth2Password: {
|
|
54
|
-
label: "Oauth2 Password Flow",
|
|
55
|
-
payload: {
|
|
56
|
-
type: "oauth2",
|
|
57
|
-
flows: {
|
|
58
|
-
password: {
|
|
59
|
-
tokenUrl: "",
|
|
60
|
-
refreshUrl: "",
|
|
61
|
-
scopes: {}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
oauth2ClientCredentials: {
|
|
67
|
-
label: "Oauth2 Client Credentials",
|
|
68
|
-
payload: {
|
|
69
|
-
type: "oauth2",
|
|
70
|
-
flows: {
|
|
71
|
-
clientCredentials: {
|
|
72
|
-
tokenUrl: "",
|
|
73
|
-
refreshUrl: "",
|
|
74
|
-
scopes: {}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
oauth2AuthorizationFlow: {
|
|
80
|
-
label: "Oauth2 Authorization Code",
|
|
81
|
-
payload: {
|
|
82
|
-
type: "oauth2",
|
|
83
|
-
flows: {
|
|
84
|
-
authorizationCode: {
|
|
85
|
-
authorizationUrl: "",
|
|
86
|
-
tokenUrl: "",
|
|
87
|
-
refreshUrl: "",
|
|
88
|
-
"x-usePkce": "no",
|
|
89
|
-
scopes: {}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
export {
|
|
96
|
-
e as authOptions
|
|
97
|
-
};
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { isObject as f } from "@scalar/helpers/object/is-object";
|
|
2
|
-
import { objectEntries as p } from "@scalar/helpers/object/object-entries";
|
|
3
|
-
const C = {
|
|
4
|
-
"x-scalar-secret-client-id": "x-scalar-client-id",
|
|
5
|
-
"x-scalar-secret-client-secret": "clientSecret",
|
|
6
|
-
"x-scalar-secret-password": "password",
|
|
7
|
-
"x-scalar-secret-redirect-uri": "x-scalar-redirect-uri",
|
|
8
|
-
"x-scalar-secret-token": "token",
|
|
9
|
-
"x-scalar-secret-username": "username",
|
|
10
|
-
"x-scalar-secret-auth-url": "authorizationUrl",
|
|
11
|
-
"x-scalar-secret-token-url": "tokenUrl"
|
|
12
|
-
}, i = (e, t, c = {}) => Object.fromEntries(
|
|
13
|
-
e.map((n) => {
|
|
14
|
-
const a = c[n] || t[n] || t[C[n]] || "";
|
|
15
|
-
return [n, a];
|
|
16
|
-
})
|
|
17
|
-
), l = (e = {}) => {
|
|
18
|
-
const t = e["x-scalar-secret-refresh-token"];
|
|
19
|
-
return typeof t == "string" ? { "x-scalar-secret-refresh-token": t } : {};
|
|
20
|
-
}, o = (e, t = {}) => {
|
|
21
|
-
const c = t["x-scalar-credentials-location"] ?? e["x-scalar-credentials-location"];
|
|
22
|
-
return c ? { "x-scalar-credentials-location": c } : {};
|
|
23
|
-
}, u = (e, t) => {
|
|
24
|
-
const c = /* @__PURE__ */ new Set();
|
|
25
|
-
return { flows: p(e ?? {}).reduce((a, [r, s]) => {
|
|
26
|
-
if (!f(s))
|
|
27
|
-
return a;
|
|
28
|
-
const d = s.selectedScopes;
|
|
29
|
-
return Array.isArray(d) && d.forEach((x) => typeof x == "string" && c.add(x)), r === "implicit" && (a.implicit = {
|
|
30
|
-
...s,
|
|
31
|
-
...i(
|
|
32
|
-
[
|
|
33
|
-
"x-scalar-secret-client-id",
|
|
34
|
-
"x-scalar-secret-redirect-uri",
|
|
35
|
-
"x-scalar-secret-token",
|
|
36
|
-
"x-scalar-secret-auth-url"
|
|
37
|
-
],
|
|
38
|
-
s,
|
|
39
|
-
t?.implicit
|
|
40
|
-
),
|
|
41
|
-
...l(t?.implicit)
|
|
42
|
-
}), r === "password" && (a[r] = {
|
|
43
|
-
...s,
|
|
44
|
-
...i(
|
|
45
|
-
[
|
|
46
|
-
"x-scalar-secret-client-id",
|
|
47
|
-
"x-scalar-secret-client-secret",
|
|
48
|
-
"x-scalar-secret-username",
|
|
49
|
-
"x-scalar-secret-password",
|
|
50
|
-
"x-scalar-secret-token",
|
|
51
|
-
"x-scalar-secret-token-url"
|
|
52
|
-
],
|
|
53
|
-
s,
|
|
54
|
-
t?.password
|
|
55
|
-
),
|
|
56
|
-
...o(s, t?.password),
|
|
57
|
-
...l(t?.password)
|
|
58
|
-
}), r === "clientCredentials" && (a[r] = {
|
|
59
|
-
...s,
|
|
60
|
-
...i(
|
|
61
|
-
[
|
|
62
|
-
"x-scalar-secret-client-id",
|
|
63
|
-
"x-scalar-secret-client-secret",
|
|
64
|
-
"x-scalar-secret-token",
|
|
65
|
-
"x-scalar-secret-token-url"
|
|
66
|
-
],
|
|
67
|
-
s,
|
|
68
|
-
t?.clientCredentials
|
|
69
|
-
),
|
|
70
|
-
...o(s, t?.clientCredentials),
|
|
71
|
-
...l(t?.clientCredentials)
|
|
72
|
-
}), r === "authorizationCode" && (a[r] = {
|
|
73
|
-
...s,
|
|
74
|
-
...i(
|
|
75
|
-
[
|
|
76
|
-
"x-scalar-secret-client-id",
|
|
77
|
-
"x-scalar-secret-client-secret",
|
|
78
|
-
"x-scalar-secret-redirect-uri",
|
|
79
|
-
"x-scalar-secret-token",
|
|
80
|
-
"x-scalar-secret-auth-url",
|
|
81
|
-
"x-scalar-secret-token-url"
|
|
82
|
-
],
|
|
83
|
-
s,
|
|
84
|
-
t?.authorizationCode
|
|
85
|
-
),
|
|
86
|
-
...o(s, t?.authorizationCode),
|
|
87
|
-
...l(t?.authorizationCode)
|
|
88
|
-
}), a;
|
|
89
|
-
}, {}), selectedScopes: Array.from(c) };
|
|
90
|
-
}, h = (e, t, c, n) => {
|
|
91
|
-
const a = t.getAuthSecrets(n, c);
|
|
92
|
-
if (e.type === "apiKey") {
|
|
93
|
-
const r = a?.type === "apiKey" ? a : void 0;
|
|
94
|
-
return {
|
|
95
|
-
...e,
|
|
96
|
-
"x-scalar-secret-token": r?.["x-scalar-secret-token"] || e.value || ""
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
if (e.type === "http") {
|
|
100
|
-
const r = a?.type === "http" ? a : void 0;
|
|
101
|
-
return {
|
|
102
|
-
...e,
|
|
103
|
-
"x-scalar-secret-token": r?.["x-scalar-secret-token"] || e.token || "",
|
|
104
|
-
"x-scalar-secret-username": r?.["x-scalar-secret-username"] || e.username || "",
|
|
105
|
-
"x-scalar-secret-password": r?.["x-scalar-secret-password"] || e.password || ""
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
if (e.type === "oauth2") {
|
|
109
|
-
const r = a?.type === "oauth2" ? a : void 0, s = u(e.flows, r);
|
|
110
|
-
return {
|
|
111
|
-
...e,
|
|
112
|
-
flows: s.flows,
|
|
113
|
-
"x-default-scopes": s.selectedScopes
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
if (e.type === "openIdConnect") {
|
|
117
|
-
const r = a?.type === "openIdConnect" ? a : void 0, s = u(
|
|
118
|
-
{
|
|
119
|
-
implicit: r?.implicit,
|
|
120
|
-
password: r?.password,
|
|
121
|
-
clientCredentials: r?.clientCredentials,
|
|
122
|
-
authorizationCode: r?.authorizationCode
|
|
123
|
-
},
|
|
124
|
-
r
|
|
125
|
-
);
|
|
126
|
-
return {
|
|
127
|
-
...e,
|
|
128
|
-
...p(s.flows).length ? { flows: s.flows } : {}
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
return e;
|
|
132
|
-
};
|
|
133
|
-
export {
|
|
134
|
-
h as extractSecuritySchemeSecrets
|
|
135
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { redirectToProxy as a } from "@scalar/helpers/url/redirect-to-proxy";
|
|
2
|
-
import { Type as n } from "@scalar/typebox";
|
|
3
|
-
import { coerceValue as p } from "@scalar/workspace-store/schemas/typebox-coerce";
|
|
4
|
-
const s = n.Object({
|
|
5
|
-
/** URL of the OAuth 2.0 Authorization Endpoint */
|
|
6
|
-
authorization_endpoint: n.Optional(n.String()),
|
|
7
|
-
/** URL of the OAuth 2.0 Token Endpoint */
|
|
8
|
-
token_endpoint: n.Optional(n.String()),
|
|
9
|
-
/** List of OAuth 2.0 scope values that this server supports */
|
|
10
|
-
scopes_supported: n.Optional(n.Array(n.String())),
|
|
11
|
-
/** List of OAuth 2.0 grant type values that this server supports */
|
|
12
|
-
grant_types_supported: n.Optional(n.Array(n.String())),
|
|
13
|
-
/** Supported PKCE code challenge methods (RFC 7636) */
|
|
14
|
-
code_challenge_methods_supported: n.Optional(n.Array(n.String()))
|
|
15
|
-
}), f = async (o, i) => {
|
|
16
|
-
try {
|
|
17
|
-
let e = o.trim();
|
|
18
|
-
if (!e)
|
|
19
|
-
return [new Error("URL cannot be empty"), null];
|
|
20
|
-
e.endsWith("/") && (e = e.slice(0, -1)), e.includes("/.well-known/openid-configuration") || (e = `${e}/.well-known/openid-configuration`);
|
|
21
|
-
const c = a(i, e), t = await fetch(c);
|
|
22
|
-
if (!t.ok)
|
|
23
|
-
return [
|
|
24
|
-
new Error(`Failed to fetch OpenID Connect discovery document: ${t.status} ${t.statusText}`),
|
|
25
|
-
null
|
|
26
|
-
];
|
|
27
|
-
const r = p(s, await t.json());
|
|
28
|
-
return !r.authorization_endpoint && !r.token_endpoint ? [new Error("Invalid OpenID Connect discovery document: missing required endpoints"), null] : [null, r];
|
|
29
|
-
} catch (e) {
|
|
30
|
-
return e instanceof Error ? [e, null] : [new Error("Failed to fetch OpenID Connect discovery document"), null];
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export {
|
|
34
|
-
f as fetchOpenIDConnectDiscovery
|
|
35
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { objectEntries as c } from "@scalar/helpers/object/object-entries";
|
|
2
|
-
import { deepClone as f } from "@scalar/workspace-store/helpers/deep-clone";
|
|
3
|
-
import { getResolvedRef as p } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
|
-
import { mergeObjects as g } from "@scalar/workspace-store/helpers/merge-object";
|
|
5
|
-
import { coerceValue as h } from "@scalar/workspace-store/schemas/typebox-coerce";
|
|
6
|
-
import { SecuritySchemeObjectSchema as l } from "@scalar/workspace-store/schemas/v3.1/strict/openapi-document";
|
|
7
|
-
import { extractSecuritySchemeSecrets as y } from "./extract-security-scheme-secrets.js";
|
|
8
|
-
const D = (m = {}, s = {}, i, n) => {
|
|
9
|
-
const d = c(m).reduce(
|
|
10
|
-
(e, [r, o]) => {
|
|
11
|
-
const t = f(p(o));
|
|
12
|
-
return t && (e[r] = t), e;
|
|
13
|
-
},
|
|
14
|
-
{}
|
|
15
|
-
), u = g(d, s) ?? {};
|
|
16
|
-
return c(u).reduce((e, [r, o]) => {
|
|
17
|
-
const S = { ...h(l, o), ...o };
|
|
18
|
-
return e[r] = y(S, i, r, n), e;
|
|
19
|
-
}, {});
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
D as mergeSecurity
|
|
23
|
-
};
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { isRelativePath as F } from "@scalar/helpers/url/is-relative-path";
|
|
2
|
-
import { makeUrlAbsolute as A } from "@scalar/helpers/url/make-url-absolute";
|
|
3
|
-
import { shouldUseProxy as R } from "@scalar/helpers/url/redirect-to-proxy";
|
|
4
|
-
import { encode as T, fromUint8Array as E } from "js-base64";
|
|
5
|
-
import { getServerUrl as b } from "../../operation-block/helpers/get-server-url.js";
|
|
6
|
-
const z = (t, e = {}) => {
|
|
7
|
-
const i = b(t, e);
|
|
8
|
-
return i ? F(i) ? typeof window > "u" ? {} : { basePath: i } : { baseUrl: i } : {};
|
|
9
|
-
}, $ = () => {
|
|
10
|
-
const t = new Uint8Array(32);
|
|
11
|
-
return crypto.getRandomValues(t), E(t, !0);
|
|
12
|
-
}, L = async (t, e) => {
|
|
13
|
-
if (e === "plain")
|
|
14
|
-
return t;
|
|
15
|
-
if (typeof crypto?.subtle?.digest != "function")
|
|
16
|
-
return console.warn("SHA-256 is only supported when using https, using a plain text code challenge instead."), t;
|
|
17
|
-
const u = new TextEncoder().encode(t), m = await crypto.subtle.digest("SHA-256", u);
|
|
18
|
-
return E(new Uint8Array(m), !0);
|
|
19
|
-
}, B = async (t, e, i, u, m, g = {}) => {
|
|
20
|
-
const f = t[e];
|
|
21
|
-
try {
|
|
22
|
-
if (!f)
|
|
23
|
-
return [new Error("Flow not found"), null];
|
|
24
|
-
const p = i.join(" ");
|
|
25
|
-
if (e === "clientCredentials" || e === "password")
|
|
26
|
-
return C(
|
|
27
|
-
t,
|
|
28
|
-
e,
|
|
29
|
-
p,
|
|
30
|
-
{
|
|
31
|
-
proxyUrl: m
|
|
32
|
-
},
|
|
33
|
-
u,
|
|
34
|
-
g
|
|
35
|
-
);
|
|
36
|
-
const r = (Math.random() + 1).toString(36).substring(2, 10), a = A(
|
|
37
|
-
t[e]["x-scalar-secret-auth-url"] ?? t[e].authorizationUrl,
|
|
38
|
-
z(u, g)
|
|
39
|
-
), n = new URL(a);
|
|
40
|
-
let c = null;
|
|
41
|
-
if (e === "implicit")
|
|
42
|
-
n.searchParams.set("response_type", "token");
|
|
43
|
-
else if (e === "authorizationCode") {
|
|
44
|
-
const s = t[e];
|
|
45
|
-
if (n.searchParams.set("response_type", "code"), s["x-usePkce"] !== "no") {
|
|
46
|
-
const o = $(), d = await L(o, s["x-usePkce"]);
|
|
47
|
-
c = {
|
|
48
|
-
codeVerifier: o,
|
|
49
|
-
codeChallenge: d,
|
|
50
|
-
codeChallengeMethod: s["x-usePkce"] === "SHA-256" ? "S256" : "plain"
|
|
51
|
-
}, n.searchParams.set("code_challenge", d), n.searchParams.set("code_challenge_method", c.codeChallengeMethod);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const l = t[e];
|
|
55
|
-
if (l["x-scalar-secret-redirect-uri"].startsWith("/")) {
|
|
56
|
-
const s = b(u, g) || window.location.origin + window.location.pathname, o = new URL(l["x-scalar-secret-redirect-uri"], s).toString();
|
|
57
|
-
n.searchParams.set("redirect_uri", o);
|
|
58
|
-
} else
|
|
59
|
-
n.searchParams.set("redirect_uri", l["x-scalar-secret-redirect-uri"]);
|
|
60
|
-
f["x-scalar-security-query"] && Object.keys(f["x-scalar-security-query"]).forEach((s) => {
|
|
61
|
-
const o = f["x-scalar-security-query"]?.[s];
|
|
62
|
-
o && n.searchParams.set(s, o);
|
|
63
|
-
}), n.searchParams.set("client_id", f["x-scalar-secret-client-id"]), n.searchParams.set("state", r), p && n.searchParams.set("scope", p);
|
|
64
|
-
const w = window.open(n, "openAuth2Window", "left=100,top=100,width=800,height=600");
|
|
65
|
-
return w ? new Promise((s) => {
|
|
66
|
-
const o = setInterval(() => {
|
|
67
|
-
let d = null, _ = null, x = null, P = null, y = null;
|
|
68
|
-
try {
|
|
69
|
-
const h = new URL(w.location.href).searchParams, S = f["x-tokenName"] || "access_token";
|
|
70
|
-
d = h.get(S), _ = h.get("refresh_token"), x = h.get("code"), P = h.get("error"), y = h.get("error_description");
|
|
71
|
-
const k = new URLSearchParams(w.location.href.split("#")[1]);
|
|
72
|
-
d ||= k.get(S), _ ||= k.get("refresh_token"), x ||= k.get("code"), P ||= k.get("error"), y ||= k.get("error_description");
|
|
73
|
-
} catch {
|
|
74
|
-
}
|
|
75
|
-
if (w.closed || d || x || P)
|
|
76
|
-
if (clearInterval(o), w.close(), P)
|
|
77
|
-
s([new Error(`OAuth error: ${P}${y ? ` (${y})` : ""}`), null]);
|
|
78
|
-
else if (d) {
|
|
79
|
-
const h = w.location.href.match(/state=([^&]*)/)?.[1];
|
|
80
|
-
s(h === r ? [null, { accessToken: d, ..._ ? { refreshToken: _ } : {} }] : [new Error("State mismatch"), null]);
|
|
81
|
-
} else x && e === "authorizationCode" ? new URL(w.location.href).searchParams.get("state") === r ? C(
|
|
82
|
-
t,
|
|
83
|
-
e,
|
|
84
|
-
p,
|
|
85
|
-
{
|
|
86
|
-
code: x,
|
|
87
|
-
pkce: c,
|
|
88
|
-
proxyUrl: m
|
|
89
|
-
},
|
|
90
|
-
u,
|
|
91
|
-
g
|
|
92
|
-
).then(s) : s([new Error("State mismatch"), null]) : (clearInterval(o), s([new Error("Window was closed without granting authorization"), null]));
|
|
93
|
-
}, 200);
|
|
94
|
-
}) : [new Error("Failed to open auth window"), null];
|
|
95
|
-
} catch {
|
|
96
|
-
return [new Error("Failed to authorize oauth2 flow"), null];
|
|
97
|
-
}
|
|
98
|
-
}, C = async (t, e, i, {
|
|
99
|
-
code: u,
|
|
100
|
-
pkce: m,
|
|
101
|
-
proxyUrl: g
|
|
102
|
-
} = {}, f, p = {}) => {
|
|
103
|
-
const r = t[e];
|
|
104
|
-
if (!r)
|
|
105
|
-
return [new Error("OAuth2 flow was not defined"), null];
|
|
106
|
-
const a = new URLSearchParams();
|
|
107
|
-
i && (e === "clientCredentials" || e === "password") && a.set("scope", i);
|
|
108
|
-
const n = r["x-scalar-credentials-location"] === "body";
|
|
109
|
-
if (n && (a.set("client_id", r["x-scalar-secret-client-id"]), a.set("client_secret", r["x-scalar-secret-client-secret"])), "x-scalar-secret-redirect-uri" in r && r["x-scalar-secret-redirect-uri"] && a.set("redirect_uri", r["x-scalar-secret-redirect-uri"]), u)
|
|
110
|
-
a.set("code", u), a.set("grant_type", "authorization_code"), m && a.set("code_verifier", m.codeVerifier);
|
|
111
|
-
else if (e === "password") {
|
|
112
|
-
const c = t[e];
|
|
113
|
-
a.set("grant_type", "password"), a.set("username", c["x-scalar-secret-username"]), a.set("password", c["x-scalar-secret-password"]);
|
|
114
|
-
} else
|
|
115
|
-
a.set("grant_type", "client_credentials");
|
|
116
|
-
r["x-scalar-security-body"] && Object.entries(r["x-scalar-security-body"]).forEach(([c, l]) => {
|
|
117
|
-
l && a.set(c, String(l));
|
|
118
|
-
});
|
|
119
|
-
try {
|
|
120
|
-
const c = {
|
|
121
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
122
|
-
};
|
|
123
|
-
n || (c.Authorization = `Basic ${T(`${r["x-scalar-secret-client-id"]}:${r["x-scalar-secret-client-secret"]}`)}`);
|
|
124
|
-
const l = A(
|
|
125
|
-
r["x-scalar-secret-token-url"] ?? r.tokenUrl,
|
|
126
|
-
z(f, p)
|
|
127
|
-
), U = R(g, l) ? `${g}?${new URLSearchParams([["scalar_url", l]]).toString()}` : l, s = await (await fetch(U, {
|
|
128
|
-
method: "POST",
|
|
129
|
-
headers: c,
|
|
130
|
-
body: a
|
|
131
|
-
})).json(), o = r["x-tokenName"] || "access_token", d = s[o], _ = s.refresh_token;
|
|
132
|
-
return [null, { accessToken: d, ...typeof _ == "string" ? { refreshToken: _ } : {} }];
|
|
133
|
-
} catch {
|
|
134
|
-
return [new Error("Failed to get an access token. Please check your credentials."), null];
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
export {
|
|
138
|
-
B as authorizeOauth2
|
|
139
|
-
};
|