@scalar/api-client 2.15.0 → 2.17.0
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 +150 -0
- package/dist/hooks/useResponseBody.js +6 -6
- package/dist/libs/errors.d.ts +1 -0
- package/dist/libs/errors.d.ts.map +1 -1
- package/dist/libs/errors.js +1 -0
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +41 -35
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +28 -38
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +84 -45
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -11
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +28 -35
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +22 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +31 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +31 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +3 -9
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +56 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +10 -3
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +46 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +45 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.js +66 -0
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +9 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts +16 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +4 -0
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +17 -0
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +9 -3
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +21 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +53 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.js +120 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +89 -110
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +8 -13
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +22 -28
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +19 -8
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +30 -24
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +12 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +20 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts +10 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +4 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +14 -12
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +191 -169
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +10 -10
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +2 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +15 -19
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +2 -2
- package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/types.d.ts +16 -0
- package/dist/v2/blocks/operation-code-sample/types.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +15 -10
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +158 -125
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +59 -50
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +8 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +127 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +4 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +24 -23
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +148 -149
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +28 -27
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -2
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +13 -3
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +4 -4
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +3 -3
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +41 -45
- package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.js +27 -27
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +1 -1
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts +18 -0
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts.map +1 -0
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +12 -0
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +0 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +97 -87
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts +19 -0
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +24 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +59 -56
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -24
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +44 -43
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +4 -4
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -2
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +7 -6
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/code-input/CodeInput.vue2.js +61 -59
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +2 -2
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +44 -44
- package/dist/v2/components/resize/index.d.ts +0 -1
- package/dist/v2/components/resize/index.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +5 -5
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +49 -47
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.d.ts +3 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +128 -139
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
- package/dist/v2/features/app/components/AppSidebar.vue2.js +103 -80
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts +1 -1
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -2
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +8 -8
- package/dist/v2/features/app/helpers/routes.d.ts +32 -6
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +25 -16
- package/dist/v2/{hooks/use-sidebar-state.d.ts → features/app/hooks/use-app-sidebar.d.ts} +10 -11
- package/dist/v2/features/app/hooks/use-app-sidebar.d.ts.map +1 -0
- package/dist/v2/{hooks/use-sidebar-state.js → features/app/hooks/use-app-sidebar.js} +19 -19
- package/dist/v2/features/app/hooks/use-document-watcher.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-sync-path.d.ts +2 -2
- package/dist/v2/features/app/hooks/use-sync-path.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-sync-path.js +52 -0
- package/dist/v2/{hooks → features/app/hooks}/use-tabs.d.ts +2 -2
- package/dist/v2/features/app/hooks/use-tabs.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-tabs.js +1 -1
- package/dist/v2/{hooks/use-workspace-client-events.d.ts → features/app/hooks/use-workspace-client-app-events.d.ts} +5 -5
- package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts.map +1 -0
- package/dist/v2/{hooks/use-workspace-client-events.js → features/app/hooks/use-workspace-client-app-events.js} +48 -45
- package/dist/v2/features/app/hooks/use-workspace-selector.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.js +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +92 -2
- package/dist/v2/features/collection/DocumentCollection.vue2.js +2 -91
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +42 -2
- package/dist/v2/features/collection/WorkspaceCollection.vue2.js +2 -41
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +14 -12
- package/dist/v2/features/collection/components/Cookies.vue.js +30 -1
- package/dist/v2/features/collection/components/Cookies.vue2.js +1 -29
- package/dist/v2/features/collection/components/Environment.vue.js +32 -1
- package/dist/v2/features/collection/components/Environment.vue2.js +1 -31
- package/dist/v2/features/collection/components/Overview.vue2.js +5 -4
- package/dist/v2/features/collection/components/Servers.vue.js +142 -2
- package/dist/v2/features/collection/components/Servers.vue2.js +2 -141
- package/dist/v2/features/collection/components/Settings.vue.js +58 -2
- package/dist/v2/features/collection/components/Settings.vue2.js +2 -57
- package/dist/v2/features/modal/Modal.vue.d.ts +23 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +118 -31
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +18 -32
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +46 -26
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +55 -0
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -0
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +29 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +42 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js +93 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +18 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +30 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +59 -28
- package/dist/v2/features/operation/helpers/get-operation-header.d.ts +17 -0
- package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +1 -0
- package/dist/v2/features/operation/helpers/get-operation-header.js +12 -0
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +1 -1
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +7 -0
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -0
- package/dist/v2/features/operation/helpers/get-selected-security.js +19 -0
- package/dist/v2/features/operation/index.d.ts +0 -1
- package/dist/v2/features/operation/index.d.ts.map +1 -1
- package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/v2/features/search/components/SearchModal.vue.js +3 -3
- package/dist/v2/features/search/components/SearchModal.vue2.js +45 -44
- package/dist/v2/helpers/generate-location-id.d.ts +19 -0
- package/dist/v2/helpers/generate-location-id.d.ts.map +1 -0
- package/dist/v2/helpers/generate-location-id.js +10 -0
- package/dist/v2/helpers/get-active-environment.d.ts +5 -0
- package/dist/v2/helpers/get-active-environment.d.ts.map +1 -0
- package/dist/v2/helpers/get-active-environment.js +22 -0
- package/dist/v2/helpers/get-tab-details.d.ts +2 -2
- package/dist/v2/helpers/get-tab-details.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +1 -1
- package/dist/v2/helpers/plugins.d.ts +59 -0
- package/dist/v2/helpers/plugins.d.ts.map +1 -0
- package/dist/v2/helpers/plugins.js +11 -0
- package/dist/v2/hooks/use-scroll-lock.d.ts +28 -0
- package/dist/v2/hooks/use-scroll-lock.d.ts.map +1 -0
- package/dist/v2/hooks/use-scroll-lock.js +21 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +18 -18
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts +0 -7
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.js +0 -28
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts +0 -6
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts.map +0 -1
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.js +0 -12
- package/dist/v2/hooks/use-document-watcher.d.ts.map +0 -1
- package/dist/v2/hooks/use-sidebar-state.d.ts.map +0 -1
- package/dist/v2/hooks/use-sync-path.d.ts.map +0 -1
- package/dist/v2/hooks/use-sync-path.js +0 -51
- package/dist/v2/hooks/use-tabs.d.ts.map +0 -1
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +0 -1
- package/dist/v2/hooks/use-workspace-selector.d.ts.map +0 -1
- package/dist/v2/plugins.d.ts +0 -44
- package/dist/v2/plugins.d.ts.map +0 -1
- /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.d.ts +0 -0
- /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.js +0 -0
- /package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.d.ts +0 -0
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarTooltip as
|
|
3
|
-
import { ScalarIconTrash as
|
|
4
|
-
import { unpackProxyObject as
|
|
1
|
+
import { defineComponent as z, computed as r, createBlock as u, openBlock as s, unref as l, normalizeClass as D, withCtx as n, createVNode as d, createCommentVNode as c, createElementVNode as m, createElementBlock as v, Fragment as U, toDisplayString as $ } from "vue";
|
|
2
|
+
import { ScalarTooltip as q, ScalarIcon as h, ScalarButton as y } from "@scalar/components";
|
|
3
|
+
import { ScalarIconTrash as I } from "@scalar/icons";
|
|
4
|
+
import { unpackProxyObject as p } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
5
|
+
import { RouterLink as S } from "vue-router";
|
|
5
6
|
import { getFileName as k } from "../helpers/files.js";
|
|
6
|
-
import { validateParameter as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import { validateParameter as j } from "../helpers/validate-parameter.js";
|
|
8
|
+
import E from "./RequestTableTooltip.vue.js";
|
|
9
|
+
import N from "../../../components/data-table/DataTableRow.vue.js";
|
|
10
|
+
import O from "../../../components/data-table/DataTableCheckbox.vue.js";
|
|
10
11
|
import f from "../../../components/data-table/DataTableCell.vue.js";
|
|
11
12
|
import w from "../../../components/code-input/CodeInput.vue.js";
|
|
12
|
-
const
|
|
13
|
+
const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center justify-center overflow-hidden p-1" }, G = {
|
|
13
14
|
key: 1,
|
|
14
15
|
class: "p-0.5"
|
|
15
|
-
}, ee = /* @__PURE__ */
|
|
16
|
+
}, ee = /* @__PURE__ */ z({
|
|
16
17
|
__name: "RequestTableRow",
|
|
17
18
|
props: {
|
|
18
19
|
data: {},
|
|
@@ -31,160 +32,158 @@ const G = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
|
|
|
31
32
|
() => t.data.schema && "maximum" in t.data.schema ? t.data.schema.maximum : void 0
|
|
32
33
|
), F = r(
|
|
33
34
|
() => t.data.schema && "type" in t.data.schema ? t.data.schema.type : void 0
|
|
34
|
-
),
|
|
35
|
-
() =>
|
|
35
|
+
), b = r(
|
|
36
|
+
() => j(t.data.schema, t.data.value)
|
|
36
37
|
), x = (e) => e instanceof File, T = r({
|
|
37
38
|
get: () => {
|
|
38
|
-
const e =
|
|
39
|
-
return e instanceof File ? k(
|
|
39
|
+
const e = p(t.data.value);
|
|
40
|
+
return e instanceof File ? k(p(t.data.value)) ?? "" : e === null ? "" : e;
|
|
40
41
|
},
|
|
41
42
|
set: (e) => {
|
|
42
43
|
typeof e == "string" && i("updateRow", { value: e });
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
|
-
return (e, a) => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
46
|
+
return (e, a) => (s(), u(l(N), {
|
|
47
|
+
id: e.data.name,
|
|
48
|
+
class: D({
|
|
49
|
+
alert: b.value.ok === !1,
|
|
50
|
+
error: b.value.ok === !1 && e.invalidParams?.has(e.data.name)
|
|
51
|
+
})
|
|
52
|
+
}, {
|
|
53
|
+
default: n(() => [
|
|
54
|
+
e.data.globalRoute !== void 0 ? (s(), u(l(S), {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: "text-c-2 flex items-center justify-center border-t !border-r",
|
|
57
|
+
to: e.data.globalRoute ?? {}
|
|
58
|
+
}, {
|
|
59
|
+
default: n(() => [
|
|
60
|
+
a[7] || (a[7] = m("span", { class: "sr-only" }, "Global", -1)),
|
|
61
|
+
d(l(q), {
|
|
62
|
+
content: "Global cookies are shared across the whole workspace.",
|
|
63
|
+
placement: "top"
|
|
64
|
+
}, {
|
|
65
|
+
default: n(() => [
|
|
66
|
+
d(l(h), {
|
|
67
|
+
class: "text-c-1",
|
|
68
|
+
icon: "Globe",
|
|
69
|
+
size: "xs",
|
|
70
|
+
tabindex: "0"
|
|
71
|
+
})
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
})
|
|
75
|
+
]),
|
|
76
|
+
_: 1
|
|
77
|
+
}, 8, ["to"])) : (s(), u(l(O), {
|
|
78
|
+
key: 1,
|
|
79
|
+
class: "!border-r",
|
|
80
|
+
disabled: e.hasCheckboxDisabled ?? !1,
|
|
81
|
+
modelValue: !e.data.isDisabled,
|
|
82
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => i("updateRow", { isDisabled: !o }))
|
|
83
|
+
}, null, 8, ["disabled", "modelValue"])),
|
|
84
|
+
d(l(f), null, {
|
|
85
|
+
default: n(() => [
|
|
86
|
+
d(l(w), {
|
|
87
|
+
"aria-label": `${e.label} Key`,
|
|
88
|
+
disableCloseBrackets: "",
|
|
89
|
+
disabled: e.isReadOnly,
|
|
90
|
+
disableEnter: "",
|
|
91
|
+
disableTabIndent: "",
|
|
92
|
+
environment: e.environment,
|
|
93
|
+
lineWrapping: "",
|
|
94
|
+
modelValue: e.data.name,
|
|
95
|
+
placeholder: "Key",
|
|
96
|
+
required: !!e.data.isRequired,
|
|
97
|
+
onSelectVariable: a[1] || (a[1] = (o) => i("updateRow", { key: o })),
|
|
98
|
+
"onUpdate:modelValue": a[2] || (a[2] = (o) => i("updateRow", { key: o }))
|
|
99
|
+
}, null, 8, ["aria-label", "disabled", "environment", "modelValue", "required"])
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
}),
|
|
103
|
+
d(l(f), null, {
|
|
104
|
+
default: n(() => [
|
|
105
|
+
d(l(w), {
|
|
106
|
+
"aria-label": `${e.label} Value`,
|
|
107
|
+
class: "pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10",
|
|
108
|
+
default: V.value,
|
|
109
|
+
disableCloseBrackets: "",
|
|
110
|
+
disabled: e.isReadOnly,
|
|
111
|
+
disableEnter: "",
|
|
112
|
+
disableTabIndent: "",
|
|
113
|
+
enum: g.value ?? [],
|
|
114
|
+
environment: e.environment,
|
|
115
|
+
lineWrapping: "",
|
|
116
|
+
max: C.value,
|
|
117
|
+
min: B.value,
|
|
118
|
+
modelValue: T.value,
|
|
119
|
+
placeholder: "Value",
|
|
120
|
+
type: F.value,
|
|
121
|
+
"onUpdate:modelValue": a[4] || (a[4] = (o) => i("updateRow", { value: o }))
|
|
122
|
+
}, {
|
|
123
|
+
icon: n(() => [
|
|
124
|
+
(e.data.name || e.data.value) && !e.data.isRequired ? (s(), u(l(y), {
|
|
125
|
+
key: 0,
|
|
126
|
+
class: "text-c-2 hover:text-c-1 hover:bg-b-2 z-context -mr-0.5 hidden h-fit rounded p-1 group-hover:flex group-has-[.cm-focused]:flex",
|
|
127
|
+
size: "sm",
|
|
128
|
+
variant: "ghost",
|
|
129
|
+
onClick: a[3] || (a[3] = (o) => i("deleteRow"))
|
|
130
|
+
}, {
|
|
131
|
+
default: n(() => [
|
|
132
|
+
d(l(I), { class: "size-3.5" })
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
})) : c("", !0),
|
|
136
|
+
e.data.schema ? (s(), u(E, {
|
|
137
|
+
key: 1,
|
|
138
|
+
description: e.data.description,
|
|
139
|
+
schema: e.data.schema,
|
|
140
|
+
value: e.data.value
|
|
141
|
+
}, null, 8, ["description", "schema", "value"])) : c("", !0)
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
}, 8, ["aria-label", "default", "disabled", "enum", "environment", "max", "min", "modelValue", "type"])
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
}),
|
|
148
|
+
e.showUploadButton ? (s(), u(l(f), {
|
|
149
|
+
key: 2,
|
|
150
|
+
class: "group/upload flex items-center justify-center whitespace-nowrap"
|
|
151
|
+
}, {
|
|
152
|
+
default: n(() => [
|
|
153
|
+
x(l(p)(e.data.value)) ? (s(), v(U, { key: 0 }, [
|
|
154
|
+
m("div", P, [
|
|
155
|
+
m("span", null, $(l(k)(l(p)(e.data.value))), 1)
|
|
156
|
+
]),
|
|
157
|
+
m("button", {
|
|
158
|
+
class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
|
|
159
|
+
type: "button",
|
|
160
|
+
onClick: a[5] || (a[5] = (o) => i("removeFile"))
|
|
161
|
+
}, " Delete ")
|
|
162
|
+
], 64)) : (s(), v("div", G, [
|
|
163
|
+
d(l(y), {
|
|
164
|
+
class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
|
|
165
|
+
size: "sm",
|
|
166
|
+
variant: "outlined",
|
|
167
|
+
onClick: a[6] || (a[6] = (o) => i("uploadFile"))
|
|
65
168
|
}, {
|
|
66
169
|
default: n(() => [
|
|
170
|
+
a[8] || (a[8] = m("span", null, "Upload File", -1)),
|
|
67
171
|
d(l(h), {
|
|
68
|
-
class: "
|
|
69
|
-
icon: "
|
|
172
|
+
class: "ml-1",
|
|
173
|
+
icon: "Upload",
|
|
70
174
|
size: "xs",
|
|
71
|
-
|
|
175
|
+
thickness: "2.5"
|
|
72
176
|
})
|
|
73
177
|
]),
|
|
74
178
|
_: 1
|
|
75
179
|
})
|
|
76
|
-
])
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"onUpdate:modelValue": a[0] || (a[0] = (o) => i("updateRow", { isDisabled: !o }))
|
|
84
|
-
}, null, 8, ["disabled", "modelValue"])),
|
|
85
|
-
d(l(f), null, {
|
|
86
|
-
default: n(() => [
|
|
87
|
-
d(l(w), {
|
|
88
|
-
"aria-label": `${e.label} Key`,
|
|
89
|
-
disableCloseBrackets: "",
|
|
90
|
-
disabled: e.isReadOnly,
|
|
91
|
-
disableEnter: "",
|
|
92
|
-
disableTabIndent: "",
|
|
93
|
-
environment: e.environment,
|
|
94
|
-
lineWrapping: "",
|
|
95
|
-
modelValue: e.data.name,
|
|
96
|
-
placeholder: "Key",
|
|
97
|
-
required: !!e.data.isRequired,
|
|
98
|
-
onSelectVariable: a[1] || (a[1] = (o) => i("updateRow", { key: o })),
|
|
99
|
-
"onUpdate:modelValue": a[2] || (a[2] = (o) => i("updateRow", { key: o }))
|
|
100
|
-
}, null, 8, ["aria-label", "disabled", "environment", "modelValue", "required"])
|
|
101
|
-
]),
|
|
102
|
-
_: 1
|
|
103
|
-
}),
|
|
104
|
-
d(l(f), null, {
|
|
105
|
-
default: n(() => [
|
|
106
|
-
d(l(w), {
|
|
107
|
-
"aria-label": `${e.label} Value`,
|
|
108
|
-
class: "pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10",
|
|
109
|
-
default: V.value,
|
|
110
|
-
disableCloseBrackets: "",
|
|
111
|
-
disabled: e.isReadOnly,
|
|
112
|
-
disableEnter: "",
|
|
113
|
-
disableTabIndent: "",
|
|
114
|
-
enum: g.value ?? [],
|
|
115
|
-
environment: e.environment,
|
|
116
|
-
lineWrapping: "",
|
|
117
|
-
max: C.value,
|
|
118
|
-
min: B.value,
|
|
119
|
-
modelValue: T.value,
|
|
120
|
-
placeholder: "Value",
|
|
121
|
-
type: F.value,
|
|
122
|
-
"onUpdate:modelValue": a[4] || (a[4] = (o) => i("updateRow", { value: o }))
|
|
123
|
-
}, {
|
|
124
|
-
icon: n(() => [
|
|
125
|
-
(e.data.name || e.data.value) && !e.data.isRequired ? (s(), u(l(y), {
|
|
126
|
-
key: 0,
|
|
127
|
-
class: "text-c-2 hover:text-c-1 hover:bg-b-2 z-context -mr-0.5 hidden h-fit rounded p-1 group-hover:flex group-has-[.cm-focused]:flex",
|
|
128
|
-
size: "sm",
|
|
129
|
-
variant: "ghost",
|
|
130
|
-
onClick: a[3] || (a[3] = (o) => i("deleteRow"))
|
|
131
|
-
}, {
|
|
132
|
-
default: n(() => [
|
|
133
|
-
d(l(j), { class: "size-3.5" })
|
|
134
|
-
]),
|
|
135
|
-
_: 1
|
|
136
|
-
})) : b("", !0),
|
|
137
|
-
e.data.schema ? (s(), u(N, {
|
|
138
|
-
key: 1,
|
|
139
|
-
schema: e.data.schema,
|
|
140
|
-
value: e.data.value
|
|
141
|
-
}, null, 8, ["schema", "value"])) : b("", !0)
|
|
142
|
-
]),
|
|
143
|
-
_: 1
|
|
144
|
-
}, 8, ["aria-label", "default", "disabled", "enum", "environment", "max", "min", "modelValue", "type"])
|
|
145
|
-
]),
|
|
146
|
-
_: 1
|
|
147
|
-
}),
|
|
148
|
-
e.showUploadButton ? (s(), u(l(f), {
|
|
149
|
-
key: 2,
|
|
150
|
-
class: "group/upload flex items-center justify-center whitespace-nowrap"
|
|
151
|
-
}, {
|
|
152
|
-
default: n(() => [
|
|
153
|
-
x(l(c)(e.data.value)) ? (s(), v(q, { key: 0 }, [
|
|
154
|
-
m("div", G, [
|
|
155
|
-
m("span", null, I(l(k)(l(c)(e.data.value))), 1)
|
|
156
|
-
]),
|
|
157
|
-
m("button", {
|
|
158
|
-
class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
|
|
159
|
-
type: "button",
|
|
160
|
-
onClick: a[5] || (a[5] = (o) => i("removeFile"))
|
|
161
|
-
}, " Delete ")
|
|
162
|
-
], 64)) : (s(), v("div", K, [
|
|
163
|
-
d(l(y), {
|
|
164
|
-
class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
|
|
165
|
-
size: "sm",
|
|
166
|
-
variant: "outlined",
|
|
167
|
-
onClick: a[6] || (a[6] = (o) => i("uploadFile"))
|
|
168
|
-
}, {
|
|
169
|
-
default: n(() => [
|
|
170
|
-
a[8] || (a[8] = m("span", null, "Upload File", -1)),
|
|
171
|
-
d(l(h), {
|
|
172
|
-
class: "ml-1",
|
|
173
|
-
icon: "Upload",
|
|
174
|
-
size: "xs",
|
|
175
|
-
thickness: "2.5"
|
|
176
|
-
})
|
|
177
|
-
]),
|
|
178
|
-
_: 1
|
|
179
|
-
})
|
|
180
|
-
]))
|
|
181
|
-
]),
|
|
182
|
-
_: 1
|
|
183
|
-
})) : b("", !0)
|
|
184
|
-
]),
|
|
185
|
-
_: 1
|
|
186
|
-
}, 8, ["id", "class"]);
|
|
187
|
-
};
|
|
180
|
+
]))
|
|
181
|
+
]),
|
|
182
|
+
_: 1
|
|
183
|
+
})) : c("", !0)
|
|
184
|
+
]),
|
|
185
|
+
_: 1
|
|
186
|
+
}, 8, ["id", "class"]));
|
|
188
187
|
}
|
|
189
188
|
});
|
|
190
189
|
export {
|
|
@@ -2,6 +2,7 @@ import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/o
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
schema?: SchemaObject;
|
|
4
4
|
value: string | File | null;
|
|
5
|
+
description?: string;
|
|
5
6
|
};
|
|
6
7
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
8
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"names":[],"mappings":"AAkFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC;;AAmLF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestTableTooltip.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f2ab7aa3"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarPopover as p } from "@scalar/components";
|
|
3
|
-
import { ScalarIconWarning as
|
|
1
|
+
import { defineComponent as h, computed as c, createBlock as i, openBlock as a, unref as m, withCtx as u, createElementVNode as d, createElementBlock as t, createCommentVNode as s, toDisplayString as o } from "vue";
|
|
2
|
+
import { ScalarPopover as p, ScalarMarkdown as f } from "@scalar/components";
|
|
3
|
+
import { ScalarIconWarning as v, ScalarIconInfo as k } from "@scalar/icons";
|
|
4
4
|
import { validateParameter as y } from "../helpers/validate-parameter.js";
|
|
5
|
-
const
|
|
5
|
+
const g = ["aria-label", "role"], b = { class: "w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none" }, I = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "text-error-1"
|
|
8
|
-
},
|
|
8
|
+
}, w = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "schema text-c-2 flex items-center"
|
|
11
|
-
},
|
|
12
|
-
key: 2,
|
|
13
|
-
class: "text-sm leading-snug text-pretty",
|
|
14
|
-
style: { maxWidth: "16rem" }
|
|
15
|
-
}, T = /* @__PURE__ */ d({
|
|
11
|
+
}, S = { key: 0 }, _ = { key: 1 }, x = { key: 2 }, B = { key: 3 }, C = { key: 4 }, T = /* @__PURE__ */ h({
|
|
16
12
|
__name: "RequestTableTooltip",
|
|
17
13
|
props: {
|
|
18
14
|
schema: {},
|
|
19
|
-
value: {}
|
|
15
|
+
value: {},
|
|
16
|
+
description: {}
|
|
20
17
|
},
|
|
21
18
|
setup(l) {
|
|
22
|
-
const
|
|
23
|
-
return (e,
|
|
19
|
+
const r = c(() => y(l.schema, l.value)), n = c(() => r.value.ok === !1);
|
|
20
|
+
return (e, M) => (a(), i(m(p), {
|
|
24
21
|
offset: 4,
|
|
25
22
|
placement: "left",
|
|
26
23
|
teleport: ""
|
|
27
24
|
}, {
|
|
28
|
-
popover:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"type" in e.schema ? (a(), t("span",
|
|
32
|
-
"format" in e.schema ? (a(), t("span",
|
|
33
|
-
"minimum" in e.schema ? (a(), t("span",
|
|
34
|
-
"maximum" in e.schema ? (a(), t("span",
|
|
35
|
-
"default" in e.schema ? (a(), t("span",
|
|
25
|
+
popover: u(() => [
|
|
26
|
+
d("div", b, [
|
|
27
|
+
r.value.ok === !1 ? (a(), t("div", I, o(r.value.message), 1)) : e.schema && ("type" in e.schema || "format" in e.schema || "minimum" in e.schema || "maximum" in e.schema || "default" in e.schema) ? (a(), t("div", w, [
|
|
28
|
+
"type" in e.schema ? (a(), t("span", S, o(e.schema.type), 1)) : s("", !0),
|
|
29
|
+
"format" in e.schema ? (a(), t("span", _, o(e.schema.format), 1)) : s("", !0),
|
|
30
|
+
"minimum" in e.schema ? (a(), t("span", x, "min: " + o(e.schema.minimum), 1)) : s("", !0),
|
|
31
|
+
"maximum" in e.schema ? (a(), t("span", B, "max: " + o(e.schema.maximum), 1)) : s("", !0),
|
|
32
|
+
"default" in e.schema ? (a(), t("span", C, "default: " + o(e.schema.default), 1)) : s("", !0)
|
|
36
33
|
])) : s("", !0),
|
|
37
|
-
e.
|
|
34
|
+
e.description && !n.value ? (a(), i(m(f), {
|
|
35
|
+
key: 2,
|
|
36
|
+
class: "max-w-[16rem]",
|
|
37
|
+
value: e.description
|
|
38
|
+
}, null, 8, ["value"])) : s("", !0)
|
|
38
39
|
])
|
|
39
40
|
]),
|
|
40
|
-
default:
|
|
41
|
-
|
|
41
|
+
default: u(() => [
|
|
42
|
+
d("button", {
|
|
42
43
|
"aria-label": n.value ? "Input is invalid" : "More Information",
|
|
43
44
|
class: "text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1",
|
|
44
45
|
role: n.value ? "alert" : "none",
|
|
45
46
|
type: "button"
|
|
46
47
|
}, [
|
|
47
|
-
n.value ? (a(), i(
|
|
48
|
+
n.value ? (a(), i(m(v), {
|
|
48
49
|
key: 0,
|
|
49
50
|
class: "text-orange size-3.5 brightness-90 hover:brightness-75"
|
|
50
|
-
})) : (a(), i(
|
|
51
|
+
})) : (a(), i(m(k), {
|
|
51
52
|
key: 1,
|
|
52
53
|
class: "text-c-2 hover:text-c-1 size-3.5"
|
|
53
54
|
}))
|
|
54
|
-
], 8,
|
|
55
|
+
], 8, g)
|
|
55
56
|
]),
|
|
56
57
|
_: 1
|
|
57
58
|
}));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
-
|
|
1
|
+
import type { ExampleObject, RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
/** Grab the resolved reference to the example from the request body, or build an example from the schema */
|
|
3
|
+
export declare const getExampleFromBody: (requestBody: RequestBodyObject, contentType: string, exampleKey: string) => ExampleObject | null;
|
|
3
4
|
//# sourceMappingURL=get-request-body-example.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-request-body-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-request-body-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;
|
|
1
|
+
{"version":3,"file":"get-request-body-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-request-body-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAIpH,4GAA4G;AAC5G,eAAO,MAAM,kBAAkB,GAC7B,aAAa,iBAAiB,EAC9B,aAAa,MAAM,EACnB,YAAY,MAAM,KACjB,aAAa,GAAG,IAqBlB,CAAA"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
import { getResolvedRef as
|
|
2
|
-
|
|
1
|
+
import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
+
import { getExampleFromSchema as s } from "../../operation-code-sample/helpers/get-example-from-schema.js";
|
|
3
|
+
const u = (m, l, c) => {
|
|
4
|
+
const e = m.content?.[l], t = n(e?.examples?.[c]);
|
|
5
|
+
if (t)
|
|
6
|
+
return t;
|
|
7
|
+
const o = n(e?.schema);
|
|
8
|
+
if (!o)
|
|
9
|
+
return null;
|
|
10
|
+
const r = s(o);
|
|
11
|
+
return r ? { value: r } : null;
|
|
12
|
+
};
|
|
3
13
|
export {
|
|
4
|
-
|
|
14
|
+
u as getExampleFromBody
|
|
5
15
|
};
|
|
@@ -2,12 +2,12 @@ import type { ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
|
2
2
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
3
|
import type { ClientLayout } from '../../../hooks/index.js';
|
|
4
4
|
import type { createStoreEvents } from '../../../store/events.js';
|
|
5
|
-
import type { ClientPlugin } from '../../../v2/plugins';
|
|
5
|
+
import type { ClientPlugin } from '../../../v2/helpers/plugins.js';
|
|
6
6
|
type __VLS_Props = {
|
|
7
7
|
/** Preprocessed response */
|
|
8
|
-
response
|
|
8
|
+
response: ResponseInstance | null;
|
|
9
9
|
/** Original request instance */
|
|
10
|
-
request
|
|
10
|
+
request: Request | null;
|
|
11
11
|
/** Client layout */
|
|
12
12
|
layout: ClientLayout;
|
|
13
13
|
/** Total number of performed requests */
|
|
@@ -15,7 +15,7 @@ type __VLS_Props = {
|
|
|
15
15
|
/** Application version */
|
|
16
16
|
appVersion: string;
|
|
17
17
|
/** Registered app plugins */
|
|
18
|
-
plugins
|
|
18
|
+
plugins: ClientPlugin[];
|
|
19
19
|
/** Event bus */
|
|
20
20
|
events: ReturnType<typeof createStoreEvents>;
|
|
21
21
|
eventBus: WorkspaceEventBus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/response-block/ResponseBlock.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/response-block/ResponseBlock.vue"],"names":[],"mappings":"AA4RA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAWvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,KAAK,WAAW,GAAG;IACjB,4BAA4B;IAC5B,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACjC,gCAAgC;IAChC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,6BAA6B;IAC7B,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA4BF,QAAA,MAAM,gBAAgB,yCAA0C,CAAA;AAChE,KAAK,MAAM,GAAG,KAAK,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;AAmZvD,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseBlock.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const s = /* @__PURE__ */ a(o, [["__scopeId", "data-v-aaba9a18"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|