@scalar/api-reference 1.31.7 → 1.31.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.
Files changed (183) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/browser/standalone.js +18613 -18470
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReference.vue.js +10 -30
  6. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  8. package/dist/components/ApiReferenceLayout.vue2.js +240 -222
  9. package/dist/components/Content/Content.vue.d.ts +2 -0
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +2 -2
  12. package/dist/components/Content/Content.vue2.js +84 -74
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts +1 -3
  14. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  16. package/dist/components/Content/Introduction/Introduction.vue2.js +93 -83
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Lazy/Loading.vue.js +84 -86
  19. package/dist/components/Content/Models/Models.vue.js +1 -1
  20. package/dist/components/Content/Models/Models.vue2.js +4 -4
  21. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  23. package/dist/components/Content/Schema/Schema.vue2.js +53 -53
  24. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
  26. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +117 -112
  29. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  31. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +161 -191
  32. package/dist/components/Content/Schema/helpers/schema-name.d.ts +13 -0
  33. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/helpers/schema-name.js +59 -13
  35. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
  36. package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
  37. package/dist/components/Content/Tag/OperationsList.vue2.js +22 -25
  38. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -3
  39. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
  41. package/dist/components/Content/Tag/OperationsListItem.vue2.js +46 -47
  42. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Tag/Tag.vue.js +45 -47
  44. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
  45. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Tag/TagList.vue.js +40 -41
  47. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
  48. package/dist/components/Content/Tag/TagSection.vue.js +2 -2
  49. package/dist/components/Content/Tag/TagSection.vue2.js +21 -21
  50. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +16 -1
  51. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  52. package/dist/components/HttpMethod/HttpMethod.vue.js +12 -11
  53. package/dist/components/MobileHeader.vue.d.ts +1 -8
  54. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  55. package/dist/components/MobileHeader.vue.js +1 -1
  56. package/dist/components/MobileHeader.vue2.js +19 -19
  57. package/dist/components/Section/Section.vue.js +2 -2
  58. package/dist/components/Section/Section.vue2.js +1 -1
  59. package/dist/components/ShowMoreButton.vue.js +2 -2
  60. package/dist/components/ShowMoreButton.vue2.js +1 -1
  61. package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -4
  62. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  63. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  64. package/dist/components/Sidebar/Sidebar.vue2.js +113 -159
  65. package/dist/components/Sidebar/SidebarElement.vue.d.ts +2 -11
  66. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  68. package/dist/components/Sidebar/SidebarElement.vue2.js +85 -81
  69. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts +16 -1
  70. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +1 -1
  71. package/dist/components/Sidebar/SidebarHttpBadge.vue.js +2 -2
  72. package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +11 -5
  73. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  74. package/dist/features/ApiClientModal/ApiClientModal.vue.js +54 -42
  75. package/dist/features/ApiClientModal/useApiClient.d.ts +74 -72
  76. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  77. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +0 -2
  78. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
  79. package/dist/features/DocumentSource/hooks/useDocumentSource.js +40 -67
  80. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  81. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +5 -5
  82. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  83. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  84. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +200 -179
  85. package/dist/features/Operation/Operation.vue.d.ts +0 -1
  86. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/Operation.vue.js +31 -34
  88. package/dist/features/Operation/components/OperationParameters.vue.d.ts +3 -2
  89. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  90. package/dist/features/Operation/components/OperationParameters.vue.js +62 -64
  91. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -2
  92. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  93. package/dist/features/Operation/components/OperationResponses.vue.js +2 -2
  94. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  95. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  96. package/dist/features/Operation/components/callbacks/Callback.vue2.js +31 -38
  97. package/dist/features/Operation/hooks/useResponses.d.ts +3 -3
  98. package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
  99. package/dist/features/Operation/hooks/useResponses.js +12 -13
  100. package/dist/features/Operation/index.d.ts +0 -1
  101. package/dist/features/Operation/index.d.ts.map +1 -1
  102. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -6
  103. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  105. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +85 -72
  106. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -4
  107. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  109. package/dist/features/Operation/layouts/ModernLayout.vue2.js +114 -98
  110. package/dist/features/Search/SearchModal.vue.js +2 -2
  111. package/dist/features/Search/SearchModal.vue2.js +1 -1
  112. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  113. package/dist/features/Search/useSearchIndex.js +61 -64
  114. package/dist/features/sidebar/helpers/create-sidebar.d.ts +4 -2
  115. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
  116. package/dist/features/sidebar/helpers/create-sidebar.js +33 -0
  117. package/dist/features/sidebar/hooks/useSidebar.d.ts +2 -3
  118. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -1
  119. package/dist/features/sidebar/hooks/useSidebar.js +18 -0
  120. package/dist/features/sidebar/index.d.ts +2 -1
  121. package/dist/features/sidebar/index.d.ts.map +1 -1
  122. package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -2
  123. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
  124. package/dist/features/traverse-schema/helpers/get-tag.js +7 -0
  125. package/dist/features/traverse-schema/helpers/traverse-description.js +33 -0
  126. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
  127. package/dist/features/traverse-schema/helpers/traverse-document.js +34 -0
  128. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +5 -3
  129. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  130. package/dist/features/traverse-schema/helpers/traverse-paths.js +32 -0
  131. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +2 -2
  132. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  133. package/dist/features/traverse-schema/helpers/traverse-schemas.js +23 -0
  134. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +2 -2
  135. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
  136. package/dist/features/traverse-schema/helpers/traverse-tags.js +43 -0
  137. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +2 -2
  138. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
  139. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +26 -0
  140. package/dist/features/traverse-schema/index.d.ts +3 -3
  141. package/dist/features/traverse-schema/index.d.ts.map +1 -1
  142. package/dist/features/traverse-schema/types.d.ts +8 -5
  143. package/dist/features/traverse-schema/types.d.ts.map +1 -1
  144. package/dist/helpers/parse.d.ts +2 -1
  145. package/dist/helpers/parse.d.ts.map +1 -1
  146. package/dist/helpers/parse.js +72 -88
  147. package/dist/hooks/useMultipleDocuments.d.ts +6 -6
  148. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  149. package/dist/hooks/useNavState.d.ts +1 -1
  150. package/dist/hooks/useNavState.d.ts.map +1 -1
  151. package/dist/hooks/useNavState.js +14 -9
  152. package/dist/hooks/useOperation.d.ts +7 -7
  153. package/dist/hooks/useOperation.d.ts.map +1 -1
  154. package/dist/hooks/useOperation.js +13 -12
  155. package/dist/index.d.ts +0 -1
  156. package/dist/index.d.ts.map +1 -1
  157. package/dist/index.js +23 -25
  158. package/dist/legacy/fixtures/index.d.ts +1 -1
  159. package/dist/libs/openapi.d.ts +3 -4
  160. package/dist/libs/openapi.d.ts.map +1 -1
  161. package/dist/libs/openapi.js +8 -9
  162. package/dist/style.css +1 -1
  163. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -18
  164. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  165. package/dist/v2/ApiReferenceWorkspace.vue.js +68 -45
  166. package/package.json +17 -17
  167. package/dist/components/Content/Webhooks/index.d.ts +0 -2
  168. package/dist/components/Content/Webhooks/index.d.ts.map +0 -1
  169. package/dist/features/Operation/Webhooks.vue.d.ts +0 -7
  170. package/dist/features/Operation/Webhooks.vue.d.ts.map +0 -1
  171. package/dist/features/Operation/Webhooks.vue.js +0 -7
  172. package/dist/features/Operation/Webhooks.vue2.js +0 -121
  173. package/dist/features/Operation/components/Webhook.vue.d.ts +0 -7
  174. package/dist/features/Operation/components/Webhook.vue.d.ts.map +0 -1
  175. package/dist/features/Operation/components/Webhook.vue.js +0 -7
  176. package/dist/features/Operation/components/Webhook.vue2.js +0 -29
  177. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +0 -8
  178. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +0 -1
  179. package/dist/features/traverse-schema/helpers/operation-id-params.js +0 -8
  180. package/dist/hooks/useSidebar.d.ts +0 -53
  181. package/dist/hooks/useSidebar.d.ts.map +0 -1
  182. package/dist/hooks/useSidebar.js +0 -248
  183. package/dist/legacy/fixtures/httpRequestMethods.js +0 -14
@@ -1,66 +1,63 @@
1
- import { defineComponent as c, computed as d, createElementBlock as p, createCommentVNode as u, unref as t, openBlock as n, Fragment as f, createBlock as m } from "vue";
1
+ import { defineComponent as m, computed as u, createElementBlock as d, createCommentVNode as p, openBlock as n, Fragment as f, createBlock as c, unref as t } from "vue";
2
2
  import { useWorkspace as v } from "@scalar/api-client/store";
3
3
  import { getPointer as h } from "../../blocks/helpers/getPointer.js";
4
4
  import { useBlockProps as O } from "../../blocks/hooks/useBlockProps.js";
5
5
  import { useOperationDiscriminator as k } from "../../hooks/useOperationDiscriminator.js";
6
6
  import y from "./layouts/ClassicLayout.vue.js";
7
7
  import U from "./layouts/ModernLayout.vue.js";
8
- const P = /* @__PURE__ */ c({
8
+ const D = /* @__PURE__ */ m({
9
9
  __name: "Operation",
10
10
  props: {
11
- id: {},
12
11
  layout: { default: "modern" },
13
12
  transformedOperation: {},
14
13
  collection: {},
15
14
  server: {},
16
15
  schemas: {}
17
16
  },
18
- setup(o) {
19
- const i = v(), { handleDiscriminatorChange: s } = k(
20
- o.transformedOperation,
21
- o.schemas
22
- ), { operation: r } = O({
23
- store: i,
24
- collection: o.collection,
17
+ setup(r) {
18
+ const s = v(), { handleDiscriminatorChange: l } = k(
19
+ r.transformedOperation,
20
+ r.schemas
21
+ ), { operation: o } = O({
22
+ store: s,
23
+ collection: r.collection,
25
24
  location: h([
26
25
  "paths",
27
- o.transformedOperation.path,
28
- o.transformedOperation.httpVerb.toLowerCase()
26
+ r.transformedOperation.path,
27
+ r.transformedOperation.httpVerb.toLowerCase()
29
28
  ])
30
- }), l = d(() => {
29
+ }), i = u(() => {
31
30
  var e;
32
- if (!r.value)
33
- return o.server;
34
- if ((e = r.value) != null && e.selectedServerUid) {
35
- const a = i.servers[r.value.selectedServerUid];
31
+ if (!o.value)
32
+ return r.server;
33
+ if ((e = o.value) != null && e.selectedServerUid) {
34
+ const a = s.servers[o.value.selectedServerUid];
36
35
  if (a)
37
36
  return a;
38
37
  }
39
- return o.server;
38
+ return r.server;
40
39
  });
41
- return (e, a) => e.collection && t(r) ? (n(), p(f, { key: 0 }, [
42
- e.layout === "classic" ? (n(), m(y, {
40
+ return (e, a) => e.collection ? (n(), d(f, { key: 0 }, [
41
+ e.layout === "classic" ? (n(), c(y, {
43
42
  key: 0,
44
- id: e.id,
45
43
  collection: e.collection,
46
- operation: t(r),
47
- schemas: e.schemas,
48
- server: l.value,
44
+ request: t(o),
49
45
  transformedOperation: e.transformedOperation,
50
- "onUpdate:modelValue": t(s)
51
- }, null, 8, ["id", "collection", "operation", "schemas", "server", "transformedOperation", "onUpdate:modelValue"])) : (n(), m(U, {
46
+ schemas: e.schemas,
47
+ server: i.value,
48
+ "onUpdate:modelValue": t(l)
49
+ }, null, 8, ["collection", "request", "transformedOperation", "schemas", "server", "onUpdate:modelValue"])) : (n(), c(U, {
52
50
  key: 1,
53
- id: e.id,
54
51
  collection: e.collection,
55
- operation: t(r),
56
- schemas: e.schemas,
57
- server: l.value,
52
+ request: t(o),
58
53
  transformedOperation: e.transformedOperation,
59
- "onUpdate:modelValue": t(s)
60
- }, null, 8, ["id", "collection", "operation", "schemas", "server", "transformedOperation", "onUpdate:modelValue"]))
61
- ], 64)) : u("", !0);
54
+ schemas: e.schemas,
55
+ server: i.value,
56
+ "onUpdate:modelValue": t(l)
57
+ }, null, 8, ["collection", "request", "transformedOperation", "schemas", "server", "onUpdate:modelValue"]))
58
+ ], 64)) : p("", !0);
62
59
  }
63
60
  });
64
61
  export {
65
- P as default
62
+ D as default
66
63
  };
@@ -1,7 +1,8 @@
1
- import type { Request as RequestEntity } from '@scalar/oas-utils/entities/spec';
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
2
  import type { Schemas } from '../../../features/Operation/types/schemas';
3
3
  type __VLS_Props = {
4
- operation?: Pick<RequestEntity, 'parameters' | 'requestBody'>;
4
+ parameters?: OpenAPIV3_1.ParameterObject[];
5
+ requestBody?: OpenAPIV3_1.RequestBodyObject | undefined;
5
6
  schemas?: Schemas;
6
7
  };
7
8
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
@@ -1 +1 @@
1
- {"version":3,"file":"OperationParameters.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,aAAa,CAAC,CAAA;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AA2IF,wBAOG"}
1
+ {"version":3,"file":"OperationParameters.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"names":[],"mappings":"AAuEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IAC1C,WAAW,CAAC,EAAE,WAAW,CAAC,iBAAiB,GAAG,SAAS,CAAA;IACvD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AA+IF,wBAOG"}
@@ -1,74 +1,72 @@
1
- import { defineComponent as B, createElementBlock as c, openBlock as i, Fragment as f, createVNode as o, createBlock as k, createCommentVNode as q, withCtx as s, createTextVNode as a } from "vue";
2
- import p from "./ParameterList.vue.js";
3
- import P from "./RequestBody.vue.js";
4
- const g = /* @__PURE__ */ B({
1
+ import { defineComponent as h, createElementBlock as y, openBlock as i, Fragment as B, createVNode as m, createBlock as f, createCommentVNode as c, withCtx as t, createTextVNode as r } from "vue";
2
+ import o from "./ParameterList.vue.js";
3
+ import q from "./RequestBody.vue.js";
4
+ const C = /* @__PURE__ */ h({
5
5
  __name: "OperationParameters",
6
6
  props: {
7
- operation: {},
7
+ parameters: { default: () => [] },
8
+ requestBody: {},
8
9
  schemas: {}
9
10
  },
10
11
  emits: ["update:modelValue"],
11
- setup(n, { emit: l }) {
12
- const d = n, u = l, h = (t) => {
13
- u("update:modelValue", t);
14
- }, m = (t) => {
15
- var e, r;
16
- return ((r = (e = d.operation) == null ? void 0 : e.parameters) == null ? void 0 : r.filter((y) => y.in === t)) ?? [];
17
- };
18
- return (t, e) => {
19
- var r;
20
- return i(), c(f, null, [
21
- o(p, {
22
- parameters: m("path"),
23
- schemas: t.schemas
24
- }, {
25
- title: s(() => e[0] || (e[0] = [
26
- a("Path Parameters")
27
- ])),
28
- _: 1
29
- }, 8, ["parameters", "schemas"]),
30
- o(p, {
31
- parameters: m("query"),
32
- schemas: t.schemas
33
- }, {
34
- title: s(() => e[1] || (e[1] = [
35
- a("Query Parameters")
36
- ])),
37
- _: 1
38
- }, 8, ["parameters", "schemas"]),
39
- o(p, {
40
- parameters: m("header"),
41
- schemas: t.schemas
42
- }, {
43
- title: s(() => e[2] || (e[2] = [
44
- a("Headers")
45
- ])),
46
- _: 1
47
- }, 8, ["parameters", "schemas"]),
48
- o(p, {
49
- parameters: m("cookie"),
50
- schemas: t.schemas
51
- }, {
52
- title: s(() => e[3] || (e[3] = [
53
- a("Cookies")
54
- ])),
55
- _: 1
56
- }, 8, ["parameters", "schemas"]),
57
- (r = t.operation) != null && r.requestBody ? (i(), k(P, {
58
- key: 0,
59
- requestBody: t.operation.requestBody,
60
- schemas: t.schemas,
61
- "onUpdate:modelValue": h
62
- }, {
63
- title: s(() => e[4] || (e[4] = [
64
- a("Body")
65
- ])),
66
- _: 1
67
- }, 8, ["requestBody", "schemas"])) : q("", !0)
68
- ], 64);
12
+ setup(p, { emit: d }) {
13
+ const l = d, n = (s) => {
14
+ l("update:modelValue", s);
15
+ }, a = (s) => {
16
+ var e;
17
+ return ((e = p.parameters) == null ? void 0 : e.filter((u) => u.in === s)) ?? [];
69
18
  };
19
+ return (s, e) => (i(), y(B, null, [
20
+ m(o, {
21
+ parameters: a("path"),
22
+ schemas: s.schemas
23
+ }, {
24
+ title: t(() => e[0] || (e[0] = [
25
+ r("Path Parameters")
26
+ ])),
27
+ _: 1
28
+ }, 8, ["parameters", "schemas"]),
29
+ m(o, {
30
+ parameters: a("query"),
31
+ schemas: s.schemas
32
+ }, {
33
+ title: t(() => e[1] || (e[1] = [
34
+ r("Query Parameters")
35
+ ])),
36
+ _: 1
37
+ }, 8, ["parameters", "schemas"]),
38
+ m(o, {
39
+ parameters: a("header"),
40
+ schemas: s.schemas
41
+ }, {
42
+ title: t(() => e[2] || (e[2] = [
43
+ r("Headers")
44
+ ])),
45
+ _: 1
46
+ }, 8, ["parameters", "schemas"]),
47
+ m(o, {
48
+ parameters: a("cookie"),
49
+ schemas: s.schemas
50
+ }, {
51
+ title: t(() => e[3] || (e[3] = [
52
+ r("Cookies")
53
+ ])),
54
+ _: 1
55
+ }, 8, ["parameters", "schemas"]),
56
+ s.requestBody ? (i(), f(q, {
57
+ key: 0,
58
+ requestBody: s.requestBody,
59
+ schemas: s.schemas,
60
+ "onUpdate:modelValue": n
61
+ }, {
62
+ title: t(() => e[4] || (e[4] = [
63
+ r("Body")
64
+ ])),
65
+ _: 1
66
+ }, 8, ["requestBody", "schemas"])) : c("", !0)
67
+ ], 64));
70
68
  }
71
69
  });
72
70
  export {
73
- g as default
71
+ C as default
74
72
  };
@@ -1,7 +1,6 @@
1
1
  import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { TransformedOperation } from '@scalar/types/legacy';
3
2
  type __VLS_Props = {
4
- operation: TransformedOperation;
3
+ responses: OpenAPIV3_1.ResponseObject | undefined;
5
4
  collapsableItems?: boolean;
6
5
  schemas?: Record<string, OpenAPIV3_1.SchemaObject> | unknown;
7
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAOhE,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,oBAAoB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;CAC7D,CAAC;;sBAFmB,OAAO;;AA+E9B,wBAQG"}
1
+ {"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQxD,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,WAAW,CAAC,cAAc,GAAG,SAAS,CAAA;IACjD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;CAC7D,CAAC;;sBAFmB,OAAO;;AA+E9B,wBAQG"}
@@ -4,12 +4,12 @@ import f from "./ParameterList.vue.js";
4
4
  const d = /* @__PURE__ */ r({
5
5
  __name: "OperationResponses",
6
6
  props: {
7
- operation: {},
7
+ responses: {},
8
8
  collapsableItems: { type: Boolean, default: !0 },
9
9
  schemas: {}
10
10
  },
11
11
  setup(o) {
12
- const t = o, { responses: a } = i(t.operation);
12
+ const t = o, { responses: a } = i(t.responses);
13
13
  return (e, s) => (m(), p(f, {
14
14
  collapsableItems: e.collapsableItems,
15
15
  parameters: l(a),
@@ -1 +1 @@
1
- {"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AA+HA,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAwB,MAAM,sBAAsB,CAAA;AAM7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAA;IACrC,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;CACZ,CAAC;;AAkKF,wBAMG"}
1
+ {"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AAqHA,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAwB,MAAM,sBAAsB,CAAA;AAM7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAA;IACrC,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;CACZ,CAAC;;AAqJF,wBAMG"}
@@ -1,7 +1,7 @@
1
- import a from "./Callback.vue2.js";
1
+ import o from "./Callback.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(a, [["__scopeId", "data-v-5fa8be5a"]]);
3
+ import a from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-f1d7309a"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,14 +1,14 @@
1
- import { defineComponent as m, computed as c, createElementBlock as i, createCommentVNode as p, openBlock as h, createElementVNode as o, createVNode as a, unref as r, createTextVNode as d, toDisplayString as n } from "vue";
1
+ import { defineComponent as l, computed as m, createElementBlock as n, createCommentVNode as i, openBlock as p, createElementVNode as o, createVNode as s, unref as a, createTextVNode as d, toDisplayString as r } from "vue";
2
2
  import { ScalarIconCaretRight as u } from "@scalar/icons";
3
3
  import { requestSchema as f } from "@scalar/oas-utils/entities/spec";
4
- import { schemaModel as b } from "@scalar/oas-utils/helpers";
5
- import k from "../OperationParameters.vue.js";
6
- import g from "../OperationResponses.vue.js";
7
- import x from "../../../../components/HttpMethod/HttpMethod.vue.js";
8
- const v = {
4
+ import { schemaModel as h } from "@scalar/oas-utils/helpers";
5
+ import b from "../OperationParameters.vue.js";
6
+ import k from "../OperationResponses.vue.js";
7
+ import g from "../../../../components/HttpMethod/HttpMethod.vue.js";
8
+ const y = {
9
9
  key: 0,
10
10
  class: "group"
11
- }, y = { class: "font-code bg-b-1 callback-sticky-offset sticky flex cursor-pointer flex-row items-center gap-2 border-t py-3 text-sm group-open:flex-wrap" }, V = { class: "text-c-1 truncate leading-3 group-open:whitespace-normal" }, C = { class: "text-c-2" }, N = { class: "callback-operation-container flex flex-col gap-2" }, D = /* @__PURE__ */ m({
11
+ }, _ = { class: "font-code bg-b-1 callback-sticky-offset sticky flex cursor-pointer flex-row items-center gap-2 border-t py-3 text-sm group-open:flex-wrap" }, q = { class: "text-c-1 truncate leading-3 group-open:whitespace-normal" }, B = { class: "text-c-2" }, v = { class: "callback-operation-container flex flex-col gap-2" }, I = /* @__PURE__ */ l({
12
12
  __name: "Callback",
13
13
  props: {
14
14
  callback: {},
@@ -18,45 +18,38 @@ const v = {
18
18
  schemas: {},
19
19
  url: {}
20
20
  },
21
- setup(e) {
22
- const s = c(
23
- () => b({ ...e.callback, path: e.url, method: e.method }, f, !1)
24
- ), l = c(
25
- () => ({
26
- ...e.callback,
27
- httpVerb: e.method,
28
- path: e.url,
29
- information: {
30
- responses: e.callback.responses
31
- }
32
- })
21
+ setup(t) {
22
+ const c = m(
23
+ () => h({ ...t.callback, path: t.url, method: t.method }, f, !1)
33
24
  );
34
- return (t, _) => t.collection && s.value ? (h(), i("details", v, [
35
- o("summary", y, [
36
- a(r(u), { class: "text-c-3 group-hover:text-c-1 absolute -left-5 size-4 transition-transform group-open:rotate-90" }),
37
- a(r(x), {
25
+ return (e, x) => e.collection && c.value ? (p(), n("details", y, [
26
+ o("summary", _, [
27
+ s(a(u), { class: "text-c-3 group-hover:text-c-1 absolute -left-5 size-4 transition-transform group-open:rotate-90" }),
28
+ s(a(g), {
38
29
  as: "span",
39
30
  class: "request-method",
40
- method: t.method
31
+ method: e.method
41
32
  }, null, 8, ["method"]),
42
- o("div", V, [
43
- d(n(t.name) + " ", 1),
44
- o("span", C, n(t.url), 1)
33
+ o("div", q, [
34
+ d(r(e.name) + " ", 1),
35
+ o("span", B, r(e.url), 1)
45
36
  ])
46
37
  ]),
47
- o("div", N, [
48
- a(k, {
49
- operation: s.value,
50
- schemas: t.schemas
51
- }, null, 8, ["operation", "schemas"]),
52
- a(g, {
53
- operation: l.value,
54
- schemas: t.schemas
55
- }, null, 8, ["operation", "schemas"])
38
+ o("div", v, [
39
+ s(b, {
40
+ requestBody: e.callback.requestBody,
41
+ parameters: e.callback.parameters,
42
+ schemas: e.schemas
43
+ }, null, 8, ["requestBody", "parameters", "schemas"]),
44
+ s(k, {
45
+ collapsableItems: !1,
46
+ responses: e.callback.responses,
47
+ schemas: e.schemas
48
+ }, null, 8, ["responses", "schemas"])
56
49
  ])
57
- ])) : p("", !0);
50
+ ])) : i("", !0);
58
51
  }
59
52
  });
60
53
  export {
61
- D as default
54
+ I as default
62
55
  };
@@ -1,9 +1,9 @@
1
- import type { OpenAPI } from '@scalar/openapi-types';
2
- import type { RequestBodyMimeTypes, TransformedOperation } from '@scalar/types/legacy';
1
+ import type { OpenAPI, OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ import type { RequestBodyMimeTypes } from '@scalar/types/legacy';
3
3
  /**
4
4
  * Generates the responses for the request from the parameters in the OpenAPI document
5
5
  */
6
- export declare function useResponses(operation: TransformedOperation): {
6
+ export declare function useResponses(responses: OpenAPIV3_1.ResponseObject | undefined): {
7
7
  responses: import("vue").ComputedRef<{
8
8
  name: string;
9
9
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useResponses.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/hooks/useResponses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGtF;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,oBAAoB;;cAShD,MAAM;qBACC,MAAM;iBACV,oBAAoB;kBACnB;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAA;SAAE;iBACxC,OAAO,CAAC,YAAY;;EAqBlC"}
1
+ {"version":3,"file":"useResponses.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/hooks/useResponses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGhE;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,WAAW,CAAC,cAAc,GAAG,SAAS;;cAGlE,MAAM;qBACC,MAAM;iBACV,oBAAoB;kBACnB;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAA;SAAE;iBACxC,OAAO,CAAC,YAAY;;EAoBlC"}
@@ -1,20 +1,19 @@
1
1
  import { computed as o } from "vue";
2
- function m(r) {
2
+ function u(n) {
3
3
  return { responses: o(() => {
4
- if (!r.information)
5
- return [];
6
- const { responses: t } = r.information, n = [];
7
- return t && Object.entries(t).forEach(([s, e]) => {
8
- n.push({
9
- name: s,
10
- description: e.description,
11
- content: e.content,
12
- headers: e.headers,
13
- schema: e.schema
4
+ const e = [];
5
+ return n && Object.entries(n).forEach(([c, t]) => {
6
+ var r;
7
+ e.push({
8
+ name: c,
9
+ description: t.description,
10
+ content: t.content,
11
+ headers: t.headers,
12
+ schema: (r = t.content) == null ? void 0 : r.schema
14
13
  });
15
- }), n;
14
+ }), e;
16
15
  }) };
17
16
  }
18
17
  export {
19
- m as useResponses
18
+ u as useResponses
20
19
  };
@@ -1,3 +1,2 @@
1
1
  export { default as Operation } from './Operation.vue.js';
2
- export { default as Webhooks } from './Webhooks.vue.js';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA"}
@@ -1,14 +1,12 @@
1
- import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
2
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
1
+ import type { Collection, Request, Server } from '@scalar/oas-utils/entities/spec';
3
2
  import type { TransformedOperation } from '@scalar/types/legacy';
3
+ import type { Schemas } from '../../../features/Operation/types/schemas';
4
4
  type __VLS_Props = {
5
- id?: string;
6
5
  collection: Collection;
7
6
  server: Server | undefined;
8
- operation: Operation;
9
- /** @deprecated Use `operation` instead */
7
+ request: Request | undefined;
10
8
  transformedOperation: TransformedOperation;
11
- schemas?: Record<string, OpenAPIV3_1.SchemaObject> | unknown;
9
+ schemas?: Schemas;
12
10
  };
13
11
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
12
  "update:modelValue": (value: string) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAoUA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAwBhE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0CAA0C;IAC1C,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;CAC7D,CAAC;;;;;;AAqTF,wBAQG"}
1
+ {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AA2UA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAUhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAcjE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AA+UF,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ClassicLayout.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f5174751"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bbf0f07b"]]);
5
5
  export {
6
- f as default
6
+ s as default
7
7
  };