@scalar/api-reference 1.41.1 → 1.42.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 +41 -0
- package/dist/blocks/index.d.ts +0 -1
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/blocks/index.js +4 -6
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +4 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +9 -13
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +4 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +10 -9
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +4 -0
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue2.js +4 -7
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +7 -9
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +9 -6
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +2 -9
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +13 -25
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts +8 -4
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +18 -41
- package/dist/browser/standalone.js +20335 -23246
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts +2 -254
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue2.js +71 -83
- package/dist/components/Content/Auth/Auth.vue.d.ts +17 -0
- package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -0
- package/dist/components/Content/Auth/Auth.vue.js +70 -0
- package/dist/components/Content/Auth/Auth.vue2.js +4 -0
- package/dist/components/Content/Auth/helpers/get-default-security.d.ts +18 -0
- package/dist/components/Content/Auth/helpers/get-default-security.d.ts.map +1 -0
- package/dist/components/Content/Auth/helpers/get-default-security.js +43 -0
- package/dist/components/Content/Auth/index.d.ts +2 -0
- package/dist/components/Content/Auth/index.d.ts.map +1 -0
- package/dist/components/Content/Content.vue.d.ts +9 -19
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +46 -47
- package/dist/components/Content/Models/Model.vue.d.ts +3 -6
- package/dist/components/Content/Models/Model.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Model.vue.js +2 -2
- package/dist/components/Content/Models/ModelTag.vue.d.ts +2 -7
- package/dist/components/Content/Models/ModelTag.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelTag.vue.js +3 -3
- package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts +3 -5
- package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue2.js +2 -8
- package/dist/components/Content/Models/components/ModernLayout.vue.d.ts +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +20 -25
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +38 -56
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/index.d.ts +0 -1
- package/dist/components/Content/index.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.d.ts +1 -4
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue2.js +7 -17
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +12 -14
- package/dist/features/Operation/Operation.vue.d.ts +23 -25
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +28 -19
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -4
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +17 -6
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +3 -5
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +3 -1
- package/dist/features/Operation/components/ParameterList.vue.d.ts +3 -6
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +6 -8
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +3 -6
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +6 -8
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +2 -4
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +1 -5
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +2 -8
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +35 -24
- package/dist/features/Operation/helpers/filter-selected-security.d.ts +9 -0
- package/dist/features/Operation/helpers/filter-selected-security.d.ts.map +1 -0
- package/dist/features/Operation/helpers/filter-selected-security.js +27 -0
- package/dist/features/Operation/helpers/get-first-server.d.ts +1 -1
- package/dist/features/Operation/helpers/get-first-server.d.ts.map +1 -1
- package/dist/features/Operation/helpers/get-first-server.js +3 -3
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +7 -23
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +24 -23
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +7 -23
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +25 -27
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue2.js +1 -2
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue2.js +1 -2
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts +3 -0
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue2.js +5 -9
- package/dist/helpers/index.d.ts +0 -4
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +1 -9
- package/dist/helpers/map-config-plugins.d.ts +5 -0
- package/dist/helpers/map-config-plugins.d.ts.map +1 -0
- package/dist/helpers/map-config-plugins.js +29 -0
- package/dist/helpers/map-config-to-workspace-store.d.ts.map +1 -1
- package/dist/helpers/map-config-to-workspace-store.js +5 -0
- package/dist/helpers/map-configuration.d.ts +2 -2
- package/dist/helpers/storage.d.ts +347 -0
- package/dist/helpers/storage.d.ts.map +1 -0
- package/dist/helpers/storage.js +61 -0
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -5
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/plugins/persistance-plugin.d.ts +16 -0
- package/dist/plugins/persistance-plugin.d.ts.map +1 -0
- package/dist/plugins/persistance-plugin.js +54 -0
- package/dist/style.css +220 -542
- package/package.json +15 -15
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +0 -11
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +0 -7
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +0 -259
- package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts +0 -21
- package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +0 -66
- package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +0 -4
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +0 -17
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +0 -273
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +0 -4
- package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +0 -9
- package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +0 -150
- package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +0 -4
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +0 -20
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +0 -7
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +0 -116
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +0 -50
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +0 -55
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +0 -4
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +0 -17
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +0 -288
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +0 -4
- package/dist/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts +0 -6
- package/dist/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts +0 -8
- package/dist/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/helpers/update-scheme.js +0 -26
- package/dist/blocks/scalar-auth-selector-block/index.d.ts +0 -2
- package/dist/blocks/scalar-auth-selector-block/index.d.ts.map +0 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +0 -16
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +0 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +0 -7
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +0 -142
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +0 -13
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +0 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +0 -7
- package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +0 -125
- package/dist/components/Content/ClientLibraries/featured-clients.d.ts +0 -11
- package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +0 -1
- package/dist/components/Content/ClientLibraries/featured-clients.js +0 -24
- package/dist/components/Content/ClientLibraries/index.d.ts +0 -2
- package/dist/components/Content/ClientLibraries/index.d.ts.map +0 -1
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts +0 -26
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts.map +0 -1
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.js +0 -39
- package/dist/helpers/convert-security-scheme.d.ts +0 -9
- package/dist/helpers/convert-security-scheme.d.ts.map +0 -1
- package/dist/helpers/convert-security-scheme.js +0 -34
- package/dist/helpers/map-config-to-client-store.d.ts +0 -72
- package/dist/helpers/map-config-to-client-store.d.ts.map +0 -1
- package/dist/helpers/map-config-to-client-store.js +0 -146
- package/dist/hooks/use-legacy-store-events.d.ts +0 -14
- package/dist/hooks/use-legacy-store-events.d.ts.map +0 -1
- package/dist/hooks/use-legacy-store-events.js +0 -91
- package/dist/hooks/use-workspace-store-events.d.ts +0 -4
- package/dist/hooks/use-workspace-store-events.d.ts.map +0 -1
- package/dist/hooks/use-workspace-store-events.js +0 -68
|
@@ -14,6 +14,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
props: {
|
|
15
15
|
responses: {},
|
|
16
16
|
breadcrumb: {},
|
|
17
|
+
collapsableItems: { type: Boolean },
|
|
17
18
|
eventBus: {},
|
|
18
19
|
options: {}
|
|
19
20
|
},
|
|
@@ -26,11 +27,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
27
|
return openBlock(), createBlock(ParameterListItem, {
|
|
27
28
|
key: status,
|
|
28
29
|
breadcrumb: _ctx.breadcrumb,
|
|
30
|
+
collapsableItems: _ctx.collapsableItems,
|
|
29
31
|
eventBus: _ctx.eventBus,
|
|
30
32
|
name: status,
|
|
31
33
|
options: _ctx.options,
|
|
32
34
|
parameter: unref(getResolvedRef)(response)
|
|
33
|
-
}, null, 8, ["breadcrumb", "eventBus", "name", "options", "parameter"]);
|
|
35
|
+
}, null, 8, ["breadcrumb", "collapsableItems", "eventBus", "name", "options", "parameter"]);
|
|
34
36
|
}), 128))
|
|
35
37
|
])
|
|
36
38
|
])) : createCommentVNode("", true);
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
2
|
import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
import type { OperationProps } from '../../../features/Operation/Operation.vue.js';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
parameters: ParameterObject[];
|
|
5
6
|
breadcrumb?: string[];
|
|
6
7
|
eventBus: WorkspaceEventBus | null;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
withExamples?: boolean;
|
|
10
|
-
orderRequiredPropertiesFirst: boolean | undefined;
|
|
11
|
-
orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
|
|
12
|
-
};
|
|
8
|
+
collapsableItems?: boolean;
|
|
9
|
+
options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
|
|
13
10
|
};
|
|
14
11
|
declare var __VLS_1: {};
|
|
15
12
|
type __VLS_Slots = {} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAGnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAIxE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;AA+DF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAqB7C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useId,
|
|
2
|
-
import { shouldIgnoreEntity } from "@scalar/oas-utils/helpers";
|
|
1
|
+
import { defineComponent, useId, createElementBlock, createCommentVNode, openBlock, createElementVNode, unref, renderSlot, Fragment, renderList, createBlock } from "vue";
|
|
3
2
|
import ParameterListItem from "./ParameterListItem.vue.js";
|
|
4
3
|
const _hoisted_1 = {
|
|
5
4
|
key: 0,
|
|
@@ -13,15 +12,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
12
|
parameters: {},
|
|
14
13
|
breadcrumb: {},
|
|
15
14
|
eventBus: {},
|
|
15
|
+
collapsableItems: { type: Boolean },
|
|
16
16
|
options: {}
|
|
17
17
|
},
|
|
18
18
|
setup(__props) {
|
|
19
19
|
const id = useId();
|
|
20
|
-
const filteredParameters = computed(
|
|
21
|
-
() => __props.parameters.filter((parameter) => !shouldIgnoreEntity(parameter))
|
|
22
|
-
);
|
|
23
20
|
return (_ctx, _cache) => {
|
|
24
|
-
return
|
|
21
|
+
return _ctx.parameters?.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
25
22
|
createElementVNode("div", {
|
|
26
23
|
id: unref(id),
|
|
27
24
|
class: "text-c-1 mt-3 mb-3 text-lg leading-[1.45] font-medium"
|
|
@@ -32,15 +29,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
29
|
"aria-labelledby": unref(id),
|
|
33
30
|
class: "mb-3 list-none p-0 text-sm"
|
|
34
31
|
}, [
|
|
35
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
32
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.parameters, (item) => {
|
|
36
33
|
return openBlock(), createBlock(ParameterListItem, {
|
|
37
34
|
key: item.name,
|
|
38
35
|
breadcrumb: _ctx.breadcrumb,
|
|
36
|
+
collapsableItems: _ctx.collapsableItems,
|
|
39
37
|
eventBus: _ctx.eventBus,
|
|
40
38
|
name: item.name,
|
|
41
39
|
options: _ctx.options,
|
|
42
40
|
parameter: item
|
|
43
|
-
}, null, 8, ["breadcrumb", "eventBus", "name", "options", "parameter"]);
|
|
41
|
+
}, null, 8, ["breadcrumb", "collapsableItems", "eventBus", "name", "options", "parameter"]);
|
|
44
42
|
}), 128))
|
|
45
43
|
], 8, _hoisted_3)
|
|
46
44
|
])) : createCommentVNode("", true);
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
2
|
import type { ParameterObject, ResponseObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
import type { OperationProps } from '../../../features/Operation/Operation.vue.js';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
parameter: ParameterObject | ResponseObject;
|
|
5
6
|
name: string;
|
|
6
7
|
breadcrumb?: string[];
|
|
7
8
|
eventBus: WorkspaceEventBus | null;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
withExamples?: boolean;
|
|
11
|
-
orderRequiredPropertiesFirst: boolean | undefined;
|
|
12
|
-
orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
|
|
13
|
-
};
|
|
9
|
+
collapsableItems?: boolean;
|
|
10
|
+
options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
|
|
14
11
|
};
|
|
15
12
|
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>;
|
|
16
13
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AA2SA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAIrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAKxE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;;AAoVF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ParameterListItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ParameterListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ParameterListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2b6dfab9"]]);
|
|
5
5
|
export {
|
|
6
6
|
ParameterListItem as default
|
|
7
7
|
};
|
|
@@ -20,6 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
name: {},
|
|
21
21
|
breadcrumb: {},
|
|
22
22
|
eventBus: {},
|
|
23
|
+
collapsableItems: { type: Boolean },
|
|
23
24
|
options: {}
|
|
24
25
|
},
|
|
25
26
|
setup(__props) {
|
|
@@ -53,9 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
54
|
};
|
|
54
55
|
});
|
|
55
56
|
const shouldCollapse = computed(
|
|
56
|
-
() => Boolean(
|
|
57
|
-
__props.options.collapsableItems && (content.value || headers.value || schema.value)
|
|
58
|
-
)
|
|
57
|
+
() => Boolean(__props.collapsableItems && (content.value || headers.value || schema.value))
|
|
59
58
|
);
|
|
60
59
|
return (_ctx, _cache) => {
|
|
61
60
|
return openBlock(), createElementBlock("li", _hoisted_1, [
|
|
@@ -73,8 +72,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73
72
|
}, null, 8, ["class"]),
|
|
74
73
|
createElementVNode("div", null, [
|
|
75
74
|
createVNode(unref(ScalarWrappingText), {
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
preset: "property",
|
|
76
|
+
text: _ctx.name
|
|
78
77
|
}, null, 8, ["text"])
|
|
79
78
|
])
|
|
80
79
|
]),
|
|
@@ -133,9 +132,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
133
132
|
orderSchemaPropertiesBy: _ctx.options.orderSchemaPropertiesBy
|
|
134
133
|
},
|
|
135
134
|
required: "required" in _ctx.parameter && _ctx.parameter.required,
|
|
136
|
-
schema: value.value
|
|
137
|
-
|
|
138
|
-
}, null, 8, ["breadcrumb", "description", "eventBus", "name", "options", "required", "schema", "withExamples"])
|
|
135
|
+
schema: value.value
|
|
136
|
+
}, null, 8, ["breadcrumb", "description", "eventBus", "name", "options", "required", "schema"])
|
|
139
137
|
]),
|
|
140
138
|
_: 1
|
|
141
139
|
}, 8, ["static"])
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
|
|
2
2
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
3
|
import { type OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
|
+
import type { OperationProps } from '../../../../features/Operation/Operation.vue.js';
|
|
4
5
|
type __VLS_Props = {
|
|
5
6
|
callback: OperationObject;
|
|
6
7
|
method: HttpMethodType;
|
|
7
8
|
name: string;
|
|
8
9
|
url: string;
|
|
9
10
|
eventBus: WorkspaceEventBus | null;
|
|
10
|
-
options:
|
|
11
|
-
orderRequiredPropertiesFirst: boolean | undefined;
|
|
12
|
-
orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
|
|
13
|
-
};
|
|
11
|
+
options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
|
|
14
12
|
};
|
|
15
13
|
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>;
|
|
16
14
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAKnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAExE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAA;IACzB,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;;AAgLF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Callback.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const Callback = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Callback = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-102d2096"]]);
|
|
5
5
|
export {
|
|
6
6
|
Callback as default
|
|
7
7
|
};
|
|
@@ -44,11 +44,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
createVNode(_sfc_main$3, {
|
|
45
45
|
collapsableItems: false,
|
|
46
46
|
eventBus: _ctx.eventBus,
|
|
47
|
-
options:
|
|
48
|
-
collapsableItems: true,
|
|
49
|
-
orderRequiredPropertiesFirst: _ctx.options.orderRequiredPropertiesFirst,
|
|
50
|
-
orderSchemaPropertiesBy: _ctx.options.orderSchemaPropertiesBy
|
|
51
|
-
},
|
|
47
|
+
options: _ctx.options,
|
|
52
48
|
responses: _ctx.callback.responses
|
|
53
49
|
}, null, 8, ["eventBus", "options", "responses"])
|
|
54
50
|
])
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
2
|
import type { CallbackObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
import type { OperationProps } from '../../../../features/Operation/Operation.vue.js';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
path: string;
|
|
6
|
-
method: HttpMethod;
|
|
7
6
|
callbacks: CallbackObject;
|
|
8
7
|
eventBus: WorkspaceEventBus | null;
|
|
9
|
-
options:
|
|
10
|
-
collapsableItems?: boolean;
|
|
11
|
-
withExamples?: boolean;
|
|
12
|
-
orderRequiredPropertiesFirst: boolean | undefined;
|
|
13
|
-
orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
|
|
14
|
-
};
|
|
8
|
+
options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
|
|
15
9
|
};
|
|
16
10
|
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>;
|
|
17
11
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callbacks.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Callbacks.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"names":[],"mappings":"AA0FA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAIxE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,cAAc,CAAA;IACzB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;;AA6GF,wBAMG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, createElementVNode, Fragment, renderList,
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, createElementVNode, Fragment, renderList, createBlock } from "vue";
|
|
2
2
|
import { isHttpMethod } from "@scalar/helpers/http/is-http-method";
|
|
3
|
+
import { objectEntries } from "@scalar/helpers/object/object-entries";
|
|
3
4
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
5
|
import Callback from "./Callback.vue.js";
|
|
5
6
|
const _hoisted_1 = {
|
|
@@ -11,37 +12,47 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
12
|
__name: "Callbacks",
|
|
12
13
|
props: {
|
|
13
14
|
path: {},
|
|
14
|
-
method: {},
|
|
15
15
|
callbacks: {},
|
|
16
16
|
eventBus: {},
|
|
17
17
|
options: {}
|
|
18
18
|
},
|
|
19
19
|
setup(__props) {
|
|
20
|
+
const flattenedCallbacks = computed(() => {
|
|
21
|
+
const _callbacks = [];
|
|
22
|
+
objectEntries(__props.callbacks).forEach(([name, pathItem]) => {
|
|
23
|
+
objectEntries(getResolvedRef(pathItem)).forEach(([url, methods]) => {
|
|
24
|
+
if (typeof methods !== "object" || !methods) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
objectEntries(methods).forEach(([callbackMethod, callback]) => {
|
|
28
|
+
if (!isHttpMethod(callbackMethod)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
_callbacks.push({
|
|
32
|
+
name,
|
|
33
|
+
url,
|
|
34
|
+
method: callbackMethod,
|
|
35
|
+
callback
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
return _callbacks;
|
|
41
|
+
});
|
|
20
42
|
return (_ctx, _cache) => {
|
|
21
43
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
22
44
|
_cache[0] || (_cache[0] = createElementVNode("div", { class: "callbacks-title text-c-1 my-3 text-lg font-medium" }, " Callbacks ", -1)),
|
|
23
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
24
|
-
return openBlock(),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
name,
|
|
35
|
-
operationMethod: __props.method,
|
|
36
|
-
options: _ctx.options,
|
|
37
|
-
path: _ctx.path,
|
|
38
|
-
url
|
|
39
|
-
}, null, 8, ["callback", "eventBus", "method", "name", "operationMethod", "options", "path", "url"])) : createCommentVNode("", true)
|
|
40
|
-
], 64);
|
|
41
|
-
}), 128))
|
|
42
|
-
], 64);
|
|
43
|
-
}), 256))
|
|
44
|
-
], 64);
|
|
45
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(flattenedCallbacks.value, ({ callback, method, name, url }) => {
|
|
46
|
+
return openBlock(), createBlock(Callback, {
|
|
47
|
+
key: `${name}-${url}-${method}`,
|
|
48
|
+
callback,
|
|
49
|
+
eventBus: _ctx.eventBus,
|
|
50
|
+
method,
|
|
51
|
+
name,
|
|
52
|
+
options: _ctx.options,
|
|
53
|
+
path: _ctx.path,
|
|
54
|
+
url
|
|
55
|
+
}, null, 8, ["callback", "eventBus", "method", "name", "options", "path", "url"]);
|
|
45
56
|
}), 128))
|
|
46
57
|
]);
|
|
47
58
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MergedSecuritySchemes } from '@scalar/api-client/v2/blocks/scalar-auth-selector-block';
|
|
2
|
+
import type { OpenApiDocument, OperationObject, SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
/**
|
|
4
|
+
* Find the intersection between which security is selected on the document and what this operation requires
|
|
5
|
+
*
|
|
6
|
+
* If there is no overlap, we return the first requirement
|
|
7
|
+
*/
|
|
8
|
+
export declare const filterSelectedSecurity: (document: OpenApiDocument, operation: OperationObject | null, securitySchemes?: MergedSecuritySchemes) => SecuritySchemeObject[];
|
|
9
|
+
//# sourceMappingURL=filter-selected-security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-selected-security.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/filter-selected-security.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAA;AAEpG,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAEf,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAKrE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAU,eAAe,EACzB,WAAW,eAAe,GAAG,IAAI,EACjC,kBAAiB,qBAA0B,KAC1C,oBAAoB,EAkCtB,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getSecuritySchemes } from "@scalar/api-client/v2/blocks/operation-block";
|
|
2
|
+
import { getSelectedSecurity } from "@scalar/api-client/v2/features/operation";
|
|
3
|
+
const getKey = (requirement) => Object.keys(requirement).sort().join(",");
|
|
4
|
+
const filterSelectedSecurity = (document, operation, securitySchemes = {}) => {
|
|
5
|
+
const securityRequirements = operation?.security ?? document.security ?? [];
|
|
6
|
+
const selectedSecurity = getSelectedSecurity(
|
|
7
|
+
document?.["x-scalar-selected-security"],
|
|
8
|
+
operation?.["x-scalar-selected-security"]
|
|
9
|
+
);
|
|
10
|
+
const requirementSet = new Set(securityRequirements.map((r) => getKey(r)));
|
|
11
|
+
const selectedRequirement = selectedSecurity.selectedSchemes[selectedSecurity.selectedIndex];
|
|
12
|
+
if (selectedRequirement && requirementSet.has(getKey(selectedRequirement))) {
|
|
13
|
+
return getSecuritySchemes(securitySchemes, [selectedRequirement]);
|
|
14
|
+
}
|
|
15
|
+
for (const selected of selectedSecurity.selectedSchemes) {
|
|
16
|
+
if (requirementSet.has(getKey(selected))) {
|
|
17
|
+
return getSecuritySchemes(securitySchemes, [selected]);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (operation?.security?.length && !document?.["x-scalar-set-operation-security"]) {
|
|
21
|
+
return getSecuritySchemes(securitySchemes, securityRequirements.slice(0, 1));
|
|
22
|
+
}
|
|
23
|
+
return [];
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
filterSelectedSecurity
|
|
27
|
+
};
|
|
@@ -5,5 +5,5 @@ import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/o
|
|
|
5
5
|
* @example
|
|
6
6
|
* getFirstServer([operation.servers, pathItem.servers, server])
|
|
7
7
|
*/
|
|
8
|
-
export declare
|
|
8
|
+
export declare const getFirstServer: (...availableServers: (ServerObject[] | ServerObject | null)[]) => ServerObject | null;
|
|
9
9
|
//# sourceMappingURL=get-first-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-first-server.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/get-first-server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"get-first-server.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/get-first-server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,GAAG,kBAAkB,CAAC,YAAY,EAAE,GAAG,YAAY,GAAG,IAAI,CAAC,EAAE,KAAG,YAAY,GAAG,IAyB7G,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
-
|
|
2
|
+
const getFirstServer = (...availableServers) => {
|
|
3
3
|
for (const serverSource of availableServers) {
|
|
4
4
|
if (!serverSource) {
|
|
5
5
|
continue;
|
|
@@ -18,8 +18,8 @@ function getFirstServer(...availableServers) {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
return
|
|
22
|
-
}
|
|
21
|
+
return null;
|
|
22
|
+
};
|
|
23
23
|
export {
|
|
24
24
|
getFirstServer
|
|
25
25
|
};
|
|
@@ -1,28 +1,12 @@
|
|
|
1
|
-
import { type ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample';
|
|
2
|
-
import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
|
|
3
|
-
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
|
-
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
5
1
|
import type { OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
path
|
|
9
|
-
method: HttpMethodType;
|
|
2
|
+
import type { OperationProps } from '../../../features/Operation/Operation.vue.js';
|
|
3
|
+
type __VLS_Props = Omit<OperationProps, 'document' | 'pathValue' | 'server' | 'securitySchemes'> & {
|
|
4
|
+
/** Operation object with path params */
|
|
10
5
|
operation: OperationObject;
|
|
11
|
-
server
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
eventBus: WorkspaceEventBus | null;
|
|
16
|
-
/** Global options that can be derived from the top level config or assigned at a block level */
|
|
17
|
-
options: {
|
|
18
|
-
/** Sets some additional display properties when an operation is a webhook */
|
|
19
|
-
isWebhook: boolean;
|
|
20
|
-
clientOptions: ClientOptionGroup[];
|
|
21
|
-
showOperationId: boolean | undefined;
|
|
22
|
-
hideTestRequestButton: boolean | undefined;
|
|
23
|
-
orderRequiredPropertiesFirst: boolean | undefined;
|
|
24
|
-
orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
|
|
25
|
-
};
|
|
6
|
+
/** The selected server for the operation */
|
|
7
|
+
selectedServer: ServerObject | null;
|
|
8
|
+
/** The selected security schemes for the operation */
|
|
9
|
+
selectedSecuritySchemes: SecuritySchemeObject[];
|
|
26
10
|
};
|
|
27
11
|
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>;
|
|
28
12
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAggBA,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAMxE,KAAK,WAAW,GAAG,IAAI,CACnB,cAAc,EACd,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,iBAAiB,CACxD,GAAG;IACF,wCAAwC;IACxC,SAAS,EAAE,eAAe,CAAA;IAC1B,4CAA4C;IAC5C,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,sDAAsD;IACtD,uBAAuB,EAAE,oBAAoB,EAAE,CAAA;CAChD,CAAC;;AA2kBJ,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ClassicLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ClassicLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ClassicLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-727857de"]]);
|
|
5
5
|
export {
|
|
6
6
|
ClassicLayout as default
|
|
7
7
|
};
|
|
@@ -45,15 +45,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
__name: "ClassicLayout",
|
|
46
46
|
props: {
|
|
47
47
|
id: {},
|
|
48
|
-
path: {},
|
|
49
48
|
method: {},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
xScalarDefaultClient: {},
|
|
49
|
+
options: {},
|
|
50
|
+
path: {},
|
|
51
|
+
clientOptions: {},
|
|
54
52
|
isCollapsed: { type: Boolean },
|
|
53
|
+
isWebhook: { type: Boolean },
|
|
54
|
+
selectedClient: {},
|
|
55
55
|
eventBus: {},
|
|
56
|
-
|
|
56
|
+
operation: {},
|
|
57
|
+
selectedServer: {},
|
|
58
|
+
selectedSecuritySchemes: {}
|
|
57
59
|
},
|
|
58
60
|
setup(__props) {
|
|
59
61
|
const operationTitle = computed(() => __props.operation.summary || __props.path || "");
|
|
@@ -98,7 +100,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
100
|
]),
|
|
99
101
|
_: 1
|
|
100
102
|
}, 8, ["class"])) : createCommentVNode("", true),
|
|
101
|
-
_ctx.
|
|
103
|
+
_ctx.isWebhook ? (openBlock(), createBlock(unref(Badge), {
|
|
102
104
|
key: 1,
|
|
103
105
|
class: "font-code text-green flex w-fit items-center justify-center gap-1"
|
|
104
106
|
}, {
|
|
@@ -124,17 +126,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
124
126
|
badges: _ctx.operation["x-badges"],
|
|
125
127
|
position: "after"
|
|
126
128
|
}, null, 8, ["badges"]),
|
|
127
|
-
!_ctx.options
|
|
128
|
-
active && !_ctx.
|
|
129
|
+
!_ctx.options.hideTestRequestButton ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
130
|
+
active && !_ctx.isWebhook ? (openBlock(), createBlock(unref(TestRequestButton), {
|
|
129
131
|
key: 0,
|
|
132
|
+
id: _ctx.id,
|
|
133
|
+
eventBus: _ctx.eventBus,
|
|
130
134
|
method: _ctx.method,
|
|
131
135
|
path: _ctx.path
|
|
132
|
-
}, null, 8, ["method", "path"])) : (openBlock(), createBlock(unref(ScalarIconPlay), {
|
|
136
|
+
}, null, 8, ["id", "eventBus", "method", "path"])) : (openBlock(), createBlock(unref(ScalarIconPlay), {
|
|
133
137
|
key: 1,
|
|
134
138
|
class: "endpoint-try-hint size-4.5"
|
|
135
139
|
}))
|
|
136
140
|
], 64)) : createCommentVNode("", true),
|
|
137
|
-
_ctx.options
|
|
141
|
+
_ctx.options.showOperationId && _ctx.operation.operationId ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(_ctx.operation.operationId), 1)) : createCommentVNode("", true),
|
|
138
142
|
createVNode(unref(ScalarIconButton), {
|
|
139
143
|
class: "endpoint-copy p-0.5",
|
|
140
144
|
icon: unref(ScalarIconCopy),
|
|
@@ -164,10 +168,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
164
168
|
createElementVNode("div", _hoisted_11, [
|
|
165
169
|
createVNode(_sfc_main$3, {
|
|
166
170
|
eventBus: _ctx.eventBus,
|
|
167
|
-
options:
|
|
168
|
-
orderRequiredPropertiesFirst: _ctx.options.orderRequiredPropertiesFirst,
|
|
169
|
-
orderSchemaPropertiesBy: _ctx.options.orderSchemaPropertiesBy
|
|
170
|
-
},
|
|
171
|
+
options: _ctx.options,
|
|
171
172
|
responses: _ctx.operation.responses
|
|
172
173
|
}, null, 8, ["eventBus", "options", "responses"])
|
|
173
174
|
]),
|
|
@@ -175,10 +176,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
175
176
|
createVNode(_sfc_main$4, {
|
|
176
177
|
callbacks: _ctx.operation.callbacks,
|
|
177
178
|
eventBus: _ctx.eventBus,
|
|
178
|
-
method: _ctx.method,
|
|
179
179
|
options: _ctx.options,
|
|
180
180
|
path: _ctx.path
|
|
181
|
-
}, null, 8, ["callbacks", "eventBus", "
|
|
181
|
+
}, null, 8, ["callbacks", "eventBus", "options", "path"])
|
|
182
182
|
])) : createCommentVNode("", true)
|
|
183
183
|
]),
|
|
184
184
|
_ctx.operation.responses ? (openBlock(), createBlock(unref(ExampleResponses), {
|
|
@@ -199,16 +199,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
199
199
|
default: withCtx(() => [
|
|
200
200
|
createVNode(unref(OperationCodeSample), {
|
|
201
201
|
class: "operation-example-card",
|
|
202
|
-
clientOptions: _ctx.
|
|
202
|
+
clientOptions: _ctx.clientOptions,
|
|
203
|
+
eventBus: _ctx.eventBus,
|
|
203
204
|
fallback: "",
|
|
204
|
-
isWebhook: _ctx.
|
|
205
|
+
isWebhook: _ctx.isWebhook,
|
|
205
206
|
method: _ctx.method,
|
|
206
207
|
operation: _ctx.operation,
|
|
207
208
|
path: _ctx.path,
|
|
208
|
-
securitySchemes: _ctx.
|
|
209
|
-
selectedClient: _ctx.
|
|
210
|
-
selectedServer: _ctx.
|
|
211
|
-
}, null, 8, ["clientOptions", "isWebhook", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"])
|
|
209
|
+
securitySchemes: _ctx.selectedSecuritySchemes,
|
|
210
|
+
selectedClient: _ctx.selectedClient,
|
|
211
|
+
selectedServer: _ctx.selectedServer
|
|
212
|
+
}, null, 8, ["clientOptions", "eventBus", "isWebhook", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"])
|
|
212
213
|
]),
|
|
213
214
|
_: 1
|
|
214
215
|
})
|
|
@@ -1,28 +1,12 @@
|
|
|
1
|
-
import { type ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample';
|
|
2
|
-
import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
|
|
3
|
-
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
|
-
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
5
1
|
import type { OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
path
|
|
9
|
-
method: HttpMethodType;
|
|
2
|
+
import type { OperationProps } from '../../../features/Operation/Operation.vue.js';
|
|
3
|
+
type __VLS_Props = Omit<OperationProps, 'document' | 'pathValue' | 'server' | 'isCollapsed' | 'securitySchemes'> & {
|
|
4
|
+
/** Operation object with path params */
|
|
10
5
|
operation: OperationObject;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/** Global options that can be derived from the top level config or assigned at a block level */
|
|
16
|
-
options: {
|
|
17
|
-
/** Sets some additional display properties when an operation is a webhook */
|
|
18
|
-
isWebhook: boolean;
|
|
19
|
-
showOperationId: boolean | undefined;
|
|
20
|
-
hideTestRequestButton: boolean | undefined;
|
|
21
|
-
expandAllResponses: boolean | undefined;
|
|
22
|
-
clientOptions: ClientOptionGroup[];
|
|
23
|
-
orderRequiredPropertiesFirst: boolean | undefined;
|
|
24
|
-
orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
|
|
25
|
-
};
|
|
6
|
+
/** The selected server for the operation */
|
|
7
|
+
selectedServer: ServerObject | null;
|
|
8
|
+
/** The selected security schemes for the operation */
|
|
9
|
+
selectedSecuritySchemes: SecuritySchemeObject[];
|
|
26
10
|
};
|
|
27
11
|
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>;
|
|
28
12
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AA6PA,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAoBrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAMxE,KAAK,WAAW,GAAG,IAAI,CACnB,cAAc,EACd,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,iBAAiB,CACxE,GAAG;IACF,wCAAwC;IACxC,SAAS,EAAE,eAAe,CAAA;IAC1B,4CAA4C;IAC5C,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,sDAAsD;IACtD,uBAAuB,EAAE,oBAAoB,EAAE,CAAA;CAChD,CAAC;;AA6fJ,wBAMG"}
|