@scalar/api-reference 1.32.8 → 1.32.9
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 +6 -0
- package/dist/blocks/constants.js +6 -0
- package/dist/blocks/helpers/getPointer.js +12 -0
- package/dist/blocks/hooks/useBlockProps.d.ts +31 -0
- package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -0
- package/dist/blocks/hooks/useBlockProps.js +24 -0
- package/dist/browser/standalone.js +14550 -14647
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +176 -164
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +5 -5
- package/dist/features/Operation/Operation.vue.d.ts +6 -6
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +49 -50
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +6 -8
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +28 -21
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +3 -5
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -33
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +12 -11
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +162 -164
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +13 -12
- 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 +117 -111
- package/dist/features/api-client-modal/useApiClient.d.ts +5795 -5795
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/example-request/ExamplePicker.vue.d.ts +13 -0
- package/dist/features/example-request/ExamplePicker.vue.d.ts.map +1 -0
- package/dist/features/example-request/ExamplePicker.vue.js +7 -0
- package/dist/features/example-request/ExamplePicker.vue2.js +57 -0
- package/dist/features/example-request/ExampleRequest.vue.d.ts +85 -0
- package/dist/features/example-request/ExampleRequest.vue.d.ts.map +1 -0
- package/dist/features/example-request/ExampleRequest.vue.js +7 -0
- package/dist/features/example-request/ExampleRequest.vue2.js +348 -0
- package/dist/features/example-request/TextSelect.vue.d.ts +34 -0
- package/dist/features/example-request/TextSelect.vue.d.ts.map +1 -0
- package/dist/features/example-request/TextSelect.vue.js +48 -0
- package/dist/features/example-request/TextSelect.vue3.js +5 -0
- package/dist/features/example-request/index.d.ts +3 -0
- package/dist/features/example-request/index.d.ts.map +1 -0
- 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 +50 -51
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts +2 -3
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
- package/dist/features/test-request-button/TestRequestButton.vue2.js +19 -21
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -13
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +1 -3
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +86 -113
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +3 -20
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -2
- package/dist/v2/events/index.d.ts +1 -1
- package/dist/v2/events/listeners.d.ts +1 -1
- package/package.json +10 -10
- package/dist/helpers/convert-security-scheme.js +0 -23
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -64
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -212
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -35
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -29
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
- package/dist/v2/events/definitions.js +0 -7
- package/dist/v2/hooks/useStore.js +0 -14
|
@@ -1,86 +1,88 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import { ScalarIconWebhooksLogo as
|
|
4
|
-
import { getOperationStability as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
const Q = { class: "operation-details" }, X = { class: "examples" }, be = /* @__PURE__ */ V({
|
|
1
|
+
import { defineComponent as I, computed as N, useId as O, createBlock as l, openBlock as s, unref as o, withCtx as t, createVNode as a, createCommentVNode as i, createElementVNode as n, normalizeClass as S, createTextVNode as m, toDisplayString as q, createSlots as W } from "vue";
|
|
2
|
+
import { ScalarMarkdown as D, ScalarErrorBoundary as p } from "@scalar/components";
|
|
3
|
+
import { ScalarIconWebhooksLogo as L } from "@scalar/icons";
|
|
4
|
+
import { getOperationStability as C, getOperationStabilityColor as P, isOperationDeprecated as R } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import $ from "../../../components/OperationPath.vue.js";
|
|
6
|
+
import { useConfig as z } from "../../../hooks/useConfig.js";
|
|
7
|
+
import A from "../components/callbacks/Callbacks.vue.js";
|
|
8
|
+
import H from "../components/OperationParameters.vue.js";
|
|
9
|
+
import M from "../components/OperationResponses.vue.js";
|
|
10
|
+
import U from "../../../components/Section/Section.vue.js";
|
|
11
|
+
import j from "../../../components/Section/SectionContent.vue.js";
|
|
12
|
+
import B from "../../../components/Badge/Badge.vue.js";
|
|
13
|
+
import _ from "../../../components/Section/SectionHeader.vue.js";
|
|
14
|
+
import F from "../../../components/Anchor/Anchor.vue.js";
|
|
15
|
+
import G from "../../../components/Section/SectionHeaderTag.vue.js";
|
|
16
|
+
import J from "../../../components/Section/SectionColumns.vue.js";
|
|
17
|
+
import V from "../../../components/Section/SectionColumn.vue.js";
|
|
18
|
+
import K from "../../example-request/ExampleRequest.vue.js";
|
|
19
|
+
import Q from "../../test-request-button/TestRequestButton.vue.js";
|
|
20
|
+
import X from "../../example-responses/ExampleResponses.vue.js";
|
|
21
|
+
const Y = { class: "operation-details" }, Z = { class: "examples" }, ke = /* @__PURE__ */ I({
|
|
23
22
|
__name: "ModernLayout",
|
|
24
23
|
props: {
|
|
25
24
|
id: {},
|
|
26
25
|
path: {},
|
|
27
26
|
method: {},
|
|
28
27
|
operation: {},
|
|
29
|
-
oldOperation: {},
|
|
30
28
|
isWebhook: { type: Boolean },
|
|
31
|
-
|
|
29
|
+
collection: {},
|
|
32
30
|
server: {},
|
|
31
|
+
request: {},
|
|
33
32
|
schemas: {}
|
|
34
33
|
},
|
|
35
34
|
emits: ["update:modelValue"],
|
|
36
|
-
setup(d, { emit:
|
|
37
|
-
const
|
|
38
|
-
|
|
35
|
+
setup(d, { emit: w }) {
|
|
36
|
+
const u = N(() => {
|
|
37
|
+
var e;
|
|
38
|
+
return ((e = d.operation) == null ? void 0 : e.summary) || d.path || "";
|
|
39
|
+
}), T = w, c = O(), E = z(), f = (e) => {
|
|
40
|
+
T("update:modelValue", e);
|
|
39
41
|
};
|
|
40
|
-
return (e, h) => (s(),
|
|
42
|
+
return (e, h) => (s(), l(o(U), {
|
|
41
43
|
id: e.id,
|
|
42
|
-
"aria-labelledby": o(
|
|
43
|
-
label:
|
|
44
|
+
"aria-labelledby": o(c),
|
|
45
|
+
label: u.value,
|
|
44
46
|
tabindex: "-1"
|
|
45
47
|
}, {
|
|
46
48
|
default: t(() => [
|
|
47
|
-
a(o(
|
|
48
|
-
loading: o(
|
|
49
|
+
a(o(j), {
|
|
50
|
+
loading: o(E).isLoading
|
|
49
51
|
}, {
|
|
50
52
|
default: t(() => [
|
|
51
|
-
o(
|
|
53
|
+
o(C)(e.operation) ? (s(), l(o(B), {
|
|
52
54
|
key: 0,
|
|
53
|
-
class:
|
|
55
|
+
class: S(["capitalize", o(P)(e.operation)])
|
|
54
56
|
}, {
|
|
55
57
|
default: t(() => [
|
|
56
|
-
|
|
58
|
+
m(q(o(C)(e.operation)), 1)
|
|
57
59
|
]),
|
|
58
60
|
_: 1
|
|
59
|
-
}, 8, ["class"])) :
|
|
60
|
-
e.isWebhook ? (s(),
|
|
61
|
+
}, 8, ["class"])) : i("", !0),
|
|
62
|
+
e.isWebhook ? (s(), l(o(B), {
|
|
61
63
|
key: 1,
|
|
62
64
|
class: "font-code text-green flex w-fit items-center justify-center gap-1"
|
|
63
65
|
}, {
|
|
64
66
|
default: t(() => [
|
|
65
|
-
a(o(
|
|
66
|
-
h[0] || (h[0] =
|
|
67
|
+
a(o(L), { weight: "bold" }),
|
|
68
|
+
h[0] || (h[0] = m("Webhook "))
|
|
67
69
|
]),
|
|
68
70
|
_: 1,
|
|
69
71
|
__: [0]
|
|
70
|
-
})) :
|
|
71
|
-
|
|
72
|
-
class:
|
|
72
|
+
})) : i("", !0),
|
|
73
|
+
n("div", {
|
|
74
|
+
class: S(o(R)(e.operation) ? "deprecated" : "")
|
|
73
75
|
}, [
|
|
74
|
-
a(o(
|
|
76
|
+
a(o(_), null, {
|
|
75
77
|
default: t(() => [
|
|
76
|
-
a(o(
|
|
78
|
+
a(o(F), { id: e.id }, {
|
|
77
79
|
default: t(() => [
|
|
78
|
-
a(o(
|
|
79
|
-
id: o(
|
|
80
|
+
a(o(G), {
|
|
81
|
+
id: o(c),
|
|
80
82
|
level: 3
|
|
81
83
|
}, {
|
|
82
84
|
default: t(() => [
|
|
83
|
-
|
|
85
|
+
m(q(u.value), 1)
|
|
84
86
|
]),
|
|
85
87
|
_: 1
|
|
86
88
|
}, 8, ["id"])
|
|
@@ -91,94 +93,98 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, be = /* @__
|
|
|
91
93
|
_: 1
|
|
92
94
|
})
|
|
93
95
|
], 2),
|
|
94
|
-
a(o(
|
|
96
|
+
a(o(J), null, {
|
|
95
97
|
default: t(() => [
|
|
96
|
-
a(o(
|
|
97
|
-
default: t(() =>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
98
|
+
a(o(V), null, {
|
|
99
|
+
default: t(() => {
|
|
100
|
+
var r, b, y, g;
|
|
101
|
+
return [
|
|
102
|
+
n("div", Y, [
|
|
103
|
+
a(o(D), {
|
|
104
|
+
value: (r = e.operation) == null ? void 0 : r.description,
|
|
105
|
+
withImages: "",
|
|
106
|
+
withAnchors: "",
|
|
107
|
+
transformType: "heading",
|
|
108
|
+
anchorPrefix: e.id
|
|
109
|
+
}, null, 8, ["value", "anchorPrefix"]),
|
|
110
|
+
a(H, {
|
|
111
|
+
parameters: (b = e.operation) == null ? void 0 : b.parameters,
|
|
112
|
+
requestBody: (y = e.operation) == null ? void 0 : y.requestBody,
|
|
113
|
+
schemas: e.schemas,
|
|
114
|
+
"onUpdate:modelValue": f
|
|
115
|
+
}, null, 8, ["parameters", "requestBody", "schemas"]),
|
|
116
|
+
a(M, {
|
|
117
|
+
responses: (g = e.operation) == null ? void 0 : g.responses,
|
|
118
|
+
schemas: e.schemas
|
|
119
|
+
}, null, 8, ["responses", "schemas"]),
|
|
120
|
+
a(o(p), null, {
|
|
121
|
+
default: t(() => {
|
|
122
|
+
var k, v;
|
|
123
|
+
return [
|
|
124
|
+
(k = e.operation) != null && k.callbacks ? (s(), l(A, {
|
|
125
|
+
key: 0,
|
|
126
|
+
class: "mt-6",
|
|
127
|
+
callbacks: (v = e.operation) == null ? void 0 : v.callbacks,
|
|
128
|
+
collection: e.collection,
|
|
129
|
+
schemas: e.schemas
|
|
130
|
+
}, null, 8, ["callbacks", "collection", "schemas"])) : i("", !0)
|
|
131
|
+
];
|
|
132
|
+
}),
|
|
133
|
+
_: 1
|
|
134
|
+
})
|
|
135
|
+
])
|
|
136
|
+
];
|
|
137
|
+
}),
|
|
131
138
|
_: 1
|
|
132
139
|
}),
|
|
133
|
-
a(o(
|
|
140
|
+
a(o(V), null, {
|
|
134
141
|
default: t(() => [
|
|
135
|
-
|
|
136
|
-
a(o(
|
|
142
|
+
n("div", Z, [
|
|
143
|
+
a(o(p), null, {
|
|
137
144
|
default: t(() => [
|
|
138
|
-
a(o(
|
|
145
|
+
a(o(K), {
|
|
146
|
+
request: e.request,
|
|
139
147
|
method: e.method,
|
|
140
|
-
|
|
141
|
-
securitySchemes: e.securitySchemes,
|
|
142
|
-
selectedClient: o(B)["x-scalar-default-client"],
|
|
143
|
-
path: e.path,
|
|
148
|
+
collection: e.collection,
|
|
144
149
|
fallback: "",
|
|
145
150
|
operation: e.operation,
|
|
151
|
+
server: e.server,
|
|
146
152
|
schemas: e.schemas,
|
|
147
|
-
"onUpdate:modelValue":
|
|
148
|
-
},
|
|
153
|
+
"onUpdate:modelValue": f
|
|
154
|
+
}, W({
|
|
149
155
|
header: t(() => {
|
|
150
|
-
var
|
|
156
|
+
var r;
|
|
151
157
|
return [
|
|
152
|
-
a(
|
|
158
|
+
a($, {
|
|
153
159
|
class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
|
|
154
|
-
deprecated: (
|
|
160
|
+
deprecated: (r = e.operation) == null ? void 0 : r.deprecated,
|
|
155
161
|
path: e.path
|
|
156
162
|
}, null, 8, ["deprecated", "path"])
|
|
157
163
|
];
|
|
158
164
|
}),
|
|
159
165
|
_: 2
|
|
160
166
|
}, [
|
|
161
|
-
e.
|
|
167
|
+
e.request ? {
|
|
162
168
|
name: "footer",
|
|
163
169
|
fn: t(() => [
|
|
164
|
-
a(o(
|
|
165
|
-
method: e.method,
|
|
166
|
-
path: e.path
|
|
167
|
-
}, null, 8, ["method", "path"])
|
|
170
|
+
a(o(Q), { operation: e.request }, null, 8, ["operation"])
|
|
168
171
|
]),
|
|
169
172
|
key: "0"
|
|
170
|
-
}
|
|
171
|
-
]), 1032, ["
|
|
173
|
+
} : void 0
|
|
174
|
+
]), 1032, ["request", "method", "collection", "operation", "server", "schemas"])
|
|
172
175
|
]),
|
|
173
176
|
_: 1
|
|
174
177
|
}),
|
|
175
|
-
a(o(
|
|
176
|
-
default: t(() =>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
a(o(p), null, {
|
|
179
|
+
default: t(() => {
|
|
180
|
+
var r;
|
|
181
|
+
return [
|
|
182
|
+
a(o(X), {
|
|
183
|
+
responses: (r = e.operation) == null ? void 0 : r.responses,
|
|
184
|
+
style: { "margin-top": "12px" }
|
|
185
|
+
}, null, 8, ["responses"])
|
|
186
|
+
];
|
|
187
|
+
}),
|
|
182
188
|
_: 1
|
|
183
189
|
})
|
|
184
190
|
])
|
|
@@ -197,5 +203,5 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, be = /* @__
|
|
|
197
203
|
}
|
|
198
204
|
});
|
|
199
205
|
export {
|
|
200
|
-
|
|
206
|
+
ke as default
|
|
201
207
|
};
|