@scalar/api-client 2.10.0 → 2.11.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.
Files changed (156) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
  3. package/dist/components/ImportCollection/IntegrationLogo.vue.js +1 -0
  4. package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
  5. package/dist/components/Server/ServerVariablesForm.vue.js +6 -6
  6. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  7. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
  8. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +14 -13
  9. package/dist/hooks/useClientConfig.d.ts +3 -3
  10. package/dist/layouts/App/create-api-client-app.d.ts +1 -1
  11. package/dist/layouts/Web/create-api-client-web.d.ts +1 -1
  12. package/dist/libs/create-client.d.ts +1 -1
  13. package/dist/store/store.d.ts +1 -1
  14. package/dist/style.css +1 -1
  15. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +4 -6
  16. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  17. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +24 -27
  18. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +3 -6
  19. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  20. package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
  21. package/dist/v2/blocks/operation-block/components/Header.vue2.js +10 -12
  22. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
  23. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +11 -10
  24. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -5
  25. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  26. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  27. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +45 -47
  28. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +11 -9
  29. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  30. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +179 -5
  31. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +2 -179
  32. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +201 -198
  33. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +11 -6
  34. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  35. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +82 -5
  36. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +2 -85
  37. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +3 -13
  38. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +16 -18
  40. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +133 -142
  41. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +1 -1
  42. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  43. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -1
  44. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +2 -16
  45. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -1
  46. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +2 -2
  47. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +202 -229
  48. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +3 -5
  49. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -1
  50. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +2 -2
  51. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +81 -85
  52. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +2 -5
  53. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -1
  54. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +32 -34
  55. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +2 -5
  56. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -1
  57. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +2 -2
  58. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +31 -33
  59. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +2 -5
  60. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -1
  61. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +42 -45
  62. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +2 -2
  63. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -1
  64. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +9 -9
  65. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -1
  66. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +2 -2
  67. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +18 -18
  68. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
  69. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +14 -14
  70. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
  71. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +12 -12
  72. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -1
  73. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +13 -13
  74. package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
  75. package/dist/v2/components/data-table/DataTable.vue.js +4 -4
  76. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +5 -7
  77. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  78. package/dist/v2/components/data-table/DataTableInput.vue.js +2 -2
  79. package/dist/v2/components/data-table/DataTableInput.vue2.js +32 -36
  80. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts +25 -0
  81. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -0
  82. package/dist/v2/components/forms/ConfirmationForm.vue.js +7 -0
  83. package/dist/v2/components/forms/ConfirmationForm.vue2.js +45 -0
  84. package/dist/v2/components/forms/index.d.ts +2 -0
  85. package/dist/v2/components/forms/index.d.ts.map +1 -0
  86. package/dist/v2/components/forms/index.js +4 -0
  87. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts +43 -0
  88. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -0
  89. package/dist/v2/components/layout/CollapsibleSection.vue.js +89 -0
  90. package/dist/v2/components/layout/CollapsibleSection.vue2.js +4 -0
  91. package/dist/v2/components/layout/ValueEmitter.vue.d.ts +23 -0
  92. package/dist/v2/components/layout/ValueEmitter.vue.d.ts.map +1 -0
  93. package/dist/v2/components/layout/ValueEmitter.vue.js +21 -0
  94. package/dist/v2/components/layout/ValueEmitter.vue2.js +4 -0
  95. package/dist/v2/components/layout/index.d.ts +2 -0
  96. package/dist/v2/components/layout/index.d.ts.map +1 -0
  97. package/dist/v2/components/layout/index.js +4 -0
  98. package/dist/v2/components/modals/DeleteModal.vue.d.ts +15 -0
  99. package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -0
  100. package/dist/v2/components/modals/DeleteModal.vue.js +31 -0
  101. package/dist/v2/components/modals/DeleteModal.vue2.js +4 -0
  102. package/dist/v2/components/modals/index.d.ts +2 -0
  103. package/dist/v2/components/modals/index.d.ts.map +1 -0
  104. package/dist/v2/components/modals/index.js +4 -0
  105. package/dist/v2/components/server/ServerDropdown.vue.d.ts +4 -2
  106. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  107. package/dist/v2/components/server/ServerDropdown.vue.js +31 -31
  108. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts +2 -6
  109. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
  110. package/dist/v2/components/server/ServerDropdownItem.vue.js +1 -1
  111. package/dist/v2/components/server/ServerDropdownItem.vue2.js +16 -16
  112. package/dist/v2/components/server/index.d.ts.map +1 -1
  113. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +6 -2
  114. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  115. package/dist/v2/components/sidebar/Sidebar.vue.js +45 -55
  116. package/dist/v2/features/app/App.vue.d.ts +2 -2
  117. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  118. package/dist/v2/features/app/App.vue.js +89 -74
  119. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +6 -2
  120. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  121. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  122. package/dist/v2/features/app/components/AppSidebar.vue2.js +50 -47
  123. package/dist/v2/features/app/helpers/routes.d.ts +0 -10
  124. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  125. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  126. package/dist/v2/features/collection/DocumentCollection.vue2.js +75 -73
  127. package/dist/v2/features/collection/components/Authentication.vue.d.ts +13 -25
  128. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  129. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  130. package/dist/v2/features/collection/components/Authentication.vue2.js +47 -35
  131. package/dist/v2/features/collection/components/Form.vue.d.ts +3 -7
  132. package/dist/v2/features/collection/components/Form.vue.d.ts.map +1 -1
  133. package/dist/v2/features/collection/components/Form.vue.js +28 -33
  134. package/dist/v2/features/collection/components/Servers.vue.d.ts +13 -31
  135. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  136. package/dist/v2/features/collection/components/Servers.vue2.js +103 -82
  137. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
  138. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +3 -3
  139. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  140. package/dist/v2/features/modal/Modal.vue.js +3 -3
  141. package/dist/v2/features/modal/Modal.vue2.js +40 -32
  142. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  143. package/dist/v2/features/operation/Operation.vue.js +22 -28
  144. package/dist/v2/hooks/use-sidebar-state.d.ts +47 -0
  145. package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -0
  146. package/dist/v2/hooks/use-sidebar-state.js +112 -0
  147. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
  148. package/dist/v2/hooks/use-workspace-client-events.js +75 -107
  149. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  150. package/package.json +17 -17
  151. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +0 -45
  152. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +0 -1
  153. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +0 -29
  154. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +0 -1
  155. package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts +0 -29
  156. package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import o from "./OperationBlock.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6ab70e2e"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5b361e3c"]]);
5
5
  export {
6
- p as default
6
+ c as default
7
7
  };
@@ -1,23 +1,24 @@
1
- import { defineComponent as E, computed as f, ref as C, useId as S, watch as O, createBlock as V, openBlock as i, withCtx as k, withDirectives as d, createElementBlock as B, createVNode as u, unref as v, vShow as y, Fragment as U, renderList as H, createCommentVNode as w, resolveDynamicComponent as I, createElementVNode as N, toDisplayString as P } from "vue";
2
- import { ScalarErrorBoundary as Q } from "@scalar/components";
3
- import { canMethodHaveBody as q, REGEX as R } from "@scalar/oas-utils/helpers";
4
- import { getResolvedRef as g } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
- import F from "../../../../components/SectionFilter.vue.js";
6
- import L from "../../../../components/ViewLayout/ViewLayoutSection.vue.js";
7
- import M from "./OperationBody.vue.js";
8
- import b from "./OperationParams.vue.js";
9
- import { groupBy as $ } from "../helpers/group-by.js";
10
- import j from "../../scalar-auth-selector-block/components/AuthSelector.vue.js";
11
- const z = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, G = ["for"], X = ["id", "placeholder", "value"], J = {
1
+ import { defineComponent as L, computed as v, ref as G, useId as V, watch as X, createBlock as U, openBlock as u, unref as t, withCtx as q, withDirectives as h, createElementBlock as x, createVNode as s, vShow as f, Fragment as J, renderList as W, createCommentVNode as K, resolveDynamicComponent as Y, createElementVNode as Z, toDisplayString as ee } from "vue";
2
+ import { ScalarErrorBoundary as te } from "@scalar/components";
3
+ import { canMethodHaveBody as w } from "@scalar/helpers/http/can-method-have-body";
4
+ import { REGEX as oe } from "@scalar/helpers/regex/regex-helpers";
5
+ import { getResolvedRef as C } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
+ import ae from "../../../../components/SectionFilter.vue.js";
7
+ import le from "../../../../components/ViewLayout/ViewLayoutSection.vue.js";
8
+ import ne from "./OperationBody.vue.js";
9
+ import B from "./OperationParams.vue.js";
10
+ import { groupBy as re } from "../helpers/group-by.js";
11
+ import de from "../../scalar-auth-selector-block/components/AuthSelector.vue.js";
12
+ const ie = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, ue = ["for"], se = ["id", "placeholder", "value"], me = {
12
13
  key: 2,
13
14
  class: "text-c-1 flex h-8 items-center"
14
- }, re = /* @__PURE__ */ E({
15
+ }, Ue = /* @__PURE__ */ L({
15
16
  __name: "OperationBlock",
16
17
  props: {
17
18
  method: {},
18
19
  path: {},
19
20
  operation: {},
20
- authMeta: { default: () => ({ type: "document" }) },
21
+ authMeta: {},
21
22
  exampleKey: {},
22
23
  securitySchemes: {},
23
24
  selectedSecurity: {},
@@ -26,256 +27,228 @@ const z = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
26
27
  layout: {},
27
28
  plugins: {},
28
29
  eventBus: {},
29
- environment: {},
30
- envVariables: {}
30
+ environment: {}
31
31
  },
32
- setup(l) {
33
- const o = f(() => ({
34
- method: l.method,
35
- path: l.path,
36
- exampleKey: l.exampleKey
37
- })), m = f(
38
- () => $(l.operation.parameters?.map((e) => g(e)) ?? [], "in")
39
- ), T = [
32
+ setup(E) {
33
+ const R = E, {
34
+ operation: r,
35
+ method: A,
36
+ layout: k,
37
+ securitySchemes: S,
38
+ path: _,
39
+ exampleKey: d,
40
+ security: P,
41
+ eventBus: l,
42
+ environment: m
43
+ } = R, H = R.authMeta ?? { type: "document" }, n = v(() => ({
44
+ method: A,
45
+ path: _,
46
+ exampleKey: d
47
+ })), p = v(
48
+ () => re(r.parameters?.map((e) => C(e)) ?? [], "in")
49
+ ), O = [
40
50
  "Auth",
41
51
  "Variables",
42
52
  "Cookies",
43
53
  "Headers",
44
54
  "Query",
45
55
  "Body"
46
- ], s = C("All"), A = f(() => {
47
- const e = /* @__PURE__ */ new Set(["All", ...T]);
48
- return m.value.path?.length || e.delete("Variables"), q(l.method) || e.delete("Body"), K.value && e.delete("Auth"), [...e];
49
- }), n = f(
56
+ ], c = G("All"), b = v(() => {
57
+ const e = /* @__PURE__ */ new Set(["All", ...O]);
58
+ return p.value.path?.length || e.delete("Variables"), w(A) || e.delete("Body"), g.value && e.delete("Auth"), [...e];
59
+ }), i = v(
50
60
  () => Object.fromEntries(
51
- A.value.map((e) => [e, S()])
61
+ b.value.map((e) => [e, V()])
52
62
  )
53
63
  );
54
- O(
55
- () => l.method,
64
+ X(
65
+ () => A,
56
66
  (e) => {
57
- s.value === "Body" && !q(e) && (s.value = "All");
67
+ c.value === "Body" && !w(e) && (c.value = "All");
58
68
  }
59
69
  );
60
- const K = f(
61
- () => l.layout === "modal" && !l.operation.security && !Object.keys(l.securitySchemes ?? {}).length
62
- ), D = () => l.operation.summary ? l.operation.summary : l.path.replace(R.PROTOCOL, "") ? l.path.replace(R.PROTOCOL, "") : "Request Name", p = (e) => s.value === "All" || s.value === e, h = S();
63
- return (e, a) => (i(), V(L, {
64
- "aria-label": `Request: ${e.operation.summary}`
70
+ const g = v(
71
+ () => k === "modal" && !r.security && !Object.keys(S ?? {}).length
72
+ ), F = v(() => r.summary ? r.summary : _.replace(oe.PROTOCOL, "") || "Request Name"), y = (e) => c.value === "All" || c.value === e, I = (e) => {
73
+ const a = e.target.value;
74
+ l.emit("operation:update:summary", {
75
+ meta: n.value,
76
+ payload: { summary: a }
77
+ });
78
+ }, o = (e) => ({
79
+ onAdd: (a) => {
80
+ l.emit("operation:add:parameter", {
81
+ type: e,
82
+ payload: {
83
+ key: a.key ?? "",
84
+ value: a.value ?? "",
85
+ isEnabled: !0
86
+ },
87
+ meta: n.value
88
+ });
89
+ },
90
+ onDelete: (a) => {
91
+ l.emit("operation:delete:parameter", {
92
+ type: e,
93
+ index: a.index,
94
+ meta: n.value
95
+ });
96
+ },
97
+ onDeleteAll: () => {
98
+ l.emit("operation:delete-all:parameters", {
99
+ type: e,
100
+ meta: n.value
101
+ });
102
+ },
103
+ onUpdate: (a) => {
104
+ l.emit("operation:update:parameter", {
105
+ type: e,
106
+ index: a.index,
107
+ payload: a.payload,
108
+ meta: n.value
109
+ });
110
+ }
111
+ }), N = (e) => l.emit("operation:add:requestBody:formRow", {
112
+ contentType: e.contentType,
113
+ meta: n.value,
114
+ payload: {
115
+ key: e.data.key ?? "",
116
+ value: e.data.value ?? ""
117
+ }
118
+ }), M = (e) => l.emit("operation:delete:requestBody:formRow", {
119
+ contentType: e.contentType,
120
+ index: e.index,
121
+ meta: n.value
122
+ }), Q = (e) => l.emit("operation:update:requestBody:contentType", {
123
+ payload: { contentType: e.value },
124
+ meta: n.value
125
+ }), $ = (e) => l.emit("operation:update:requestBody:formRow", {
126
+ contentType: e.contentType,
127
+ meta: n.value,
128
+ index: e.index,
129
+ payload: {
130
+ key: e.data.key ?? "",
131
+ value: e.data.value ?? ""
132
+ }
133
+ }), j = (e) => l.emit("operation:update:requestBody:value", {
134
+ contentType: e.contentType,
135
+ payload: { value: e.value ?? "" },
136
+ meta: n.value
137
+ }), T = V();
138
+ return (e, a) => (u(), U(le, {
139
+ "aria-label": `Request: ${t(r).summary}`
65
140
  }, {
66
- title: k(() => [
67
- N("div", z, [
68
- e.layout !== "modal" ? (i(), B("label", {
141
+ title: q(() => [
142
+ Z("div", ie, [
143
+ t(k) !== "modal" ? (u(), x("label", {
69
144
  key: 0,
70
145
  class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
71
- for: v(h)
72
- }, null, 8, G)) : w("", !0),
73
- e.layout !== "modal" ? (i(), B("input", {
146
+ for: t(T)
147
+ }, null, 8, ue)) : K("", !0),
148
+ t(k) !== "modal" ? (u(), x("input", {
74
149
  key: 1,
75
- id: v(h),
150
+ id: t(T),
76
151
  class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
77
- placeholder: D(),
78
- value: e.operation.summary,
79
- onInput: a[0] || (a[0] = (t) => e.eventBus.emit("operation:update:summary", {
80
- meta: o.value,
81
- payload: {
82
- summary: t.target.value
83
- }
84
- }))
85
- }, null, 40, X)) : (i(), B("span", J, P(e.operation.summary), 1))
152
+ placeholder: F.value,
153
+ value: t(r).summary,
154
+ onInput: I
155
+ }, null, 40, se)) : (u(), x("span", me, ee(t(r).summary), 1))
86
156
  ]),
87
- u(F, {
88
- modelValue: s.value,
89
- "onUpdate:modelValue": a[1] || (a[1] = (t) => s.value = t),
90
- filterIds: n.value,
91
- filters: A.value
157
+ s(ae, {
158
+ modelValue: c.value,
159
+ "onUpdate:modelValue": a[0] || (a[0] = (D) => c.value = D),
160
+ filterIds: i.value,
161
+ filters: b.value
92
162
  }, null, 8, ["modelValue", "filterIds", "filters"])
93
163
  ]),
94
- default: k(() => [
95
- d(u(v(j), {
96
- id: n.value.Auth,
97
- envVariables: e.envVariables,
98
- environment: e.environment,
99
- layout: "client",
100
- security: e.security,
101
- securitySchemes: e.securitySchemes,
164
+ default: q(() => [
165
+ h(s(t(de), {
166
+ id: i.value.Auth,
167
+ environment: t(m),
168
+ eventBus: t(l),
169
+ meta: t(H),
170
+ security: t(P),
171
+ securitySchemes: t(S),
102
172
  selectedSecurity: e.selectedSecurity,
103
173
  server: e.server,
104
- title: "Authorization",
105
- meta: e.authMeta,
106
- eventBus: e.eventBus
107
- }, null, 8, ["id", "envVariables", "environment", "security", "securitySchemes", "selectedSecurity", "server", "meta", "eventBus"]), [
108
- [y, p("Auth") && !K.value]
174
+ title: "Authorization"
175
+ }, null, 8, ["id", "environment", "eventBus", "meta", "security", "securitySchemes", "selectedSecurity", "server"]), [
176
+ [f, y("Auth") && !g.value]
109
177
  ]),
110
- d(u(b, {
111
- id: n.value.Variables,
112
- envVariables: e.envVariables,
113
- environment: e.environment,
114
- exampleKey: e.exampleKey,
115
- parameters: m.value.path ?? [],
178
+ h(s(B, {
179
+ id: i.value.Variables,
180
+ environment: t(m),
181
+ exampleKey: t(d),
182
+ parameters: p.value.path ?? [],
183
+ showAddRowPlaceholder: !1,
116
184
  title: "Variables",
117
- "show-add-row-placeholder": !1,
118
- onDelete: a[2] || (a[2] = ({ index: t }) => e.eventBus.emit("operation:delete:parameter", {
119
- type: "path",
120
- index: t,
121
- meta: o.value
122
- })),
123
- onDeleteAll: a[3] || (a[3] = () => e.eventBus.emit("operation:delete-all:parameters", {
124
- type: "path",
125
- meta: o.value
126
- })),
127
- onUpdate: a[4] || (a[4] = ({ index: t, payload: r }) => e.eventBus.emit("operation:update:parameter", {
128
- type: "path",
129
- index: t,
130
- payload: r,
131
- meta: o.value
132
- }))
133
- }, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
134
- [y, p("Variables") && m.value.path?.length]
185
+ onDelete: o("path").onDelete,
186
+ onDeleteAll: o("path").onDeleteAll,
187
+ onUpdate: o("path").onUpdate
188
+ }, null, 8, ["id", "environment", "exampleKey", "parameters", "onDelete", "onDeleteAll", "onUpdate"]), [
189
+ [f, y("Variables") && p.value.path?.length]
135
190
  ]),
136
- d(u(b, {
137
- id: n.value.Cookies,
138
- envVariables: e.envVariables,
139
- environment: e.environment,
140
- exampleKey: e.exampleKey,
141
- parameters: m.value.cookie ?? [],
191
+ h(s(B, {
192
+ id: i.value.Cookies,
193
+ environment: t(m),
194
+ exampleKey: t(d),
195
+ parameters: p.value.cookie ?? [],
196
+ showAddRowPlaceholder: !0,
142
197
  title: "Cookies",
143
- "show-add-row-placeholder": !0,
144
- onAdd: a[5] || (a[5] = ({ key: t, value: r }) => e.eventBus.emit("operation:add:parameter", {
145
- type: "cookie",
146
- payload: { key: t ?? "", value: r ?? "", isEnabled: !0 },
147
- meta: o.value
148
- })),
149
- onDelete: a[6] || (a[6] = ({ index: t }) => e.eventBus.emit("operation:delete:parameter", {
150
- type: "cookie",
151
- index: t,
152
- meta: o.value
153
- })),
154
- onDeleteAll: a[7] || (a[7] = () => e.eventBus.emit("operation:delete-all:parameters", {
155
- type: "cookie",
156
- meta: o.value
157
- })),
158
- onUpdate: a[8] || (a[8] = ({ index: t, payload: r }) => e.eventBus.emit("operation:update:parameter", {
159
- type: "cookie",
160
- index: t,
161
- payload: r,
162
- meta: o.value
163
- }))
164
- }, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
165
- [y, p("Cookies")]
198
+ onAdd: o("cookie").onAdd,
199
+ onDelete: o("cookie").onDelete,
200
+ onDeleteAll: o("cookie").onDeleteAll,
201
+ onUpdate: o("cookie").onUpdate
202
+ }, null, 8, ["id", "environment", "exampleKey", "parameters", "onAdd", "onDelete", "onDeleteAll", "onUpdate"]), [
203
+ [f, y("Cookies")]
166
204
  ]),
167
- d(u(b, {
168
- id: n.value.Headers,
169
- envVariables: e.envVariables,
170
- environment: e.environment,
171
- exampleKey: e.exampleKey,
172
- parameters: m.value.header ?? [],
205
+ h(s(B, {
206
+ id: i.value.Headers,
207
+ environment: t(m),
208
+ exampleKey: t(d),
209
+ parameters: p.value.header ?? [],
173
210
  title: "Headers",
174
- onAdd: a[9] || (a[9] = ({ key: t, value: r }) => e.eventBus.emit("operation:add:parameter", {
175
- type: "header",
176
- payload: { key: t ?? "", value: r ?? "", isEnabled: !0 },
177
- meta: o.value
178
- })),
179
- onDelete: a[10] || (a[10] = ({ index: t }) => e.eventBus.emit("operation:delete:parameter", {
180
- type: "header",
181
- index: t,
182
- meta: o.value
183
- })),
184
- onDeleteAll: a[11] || (a[11] = () => e.eventBus.emit("operation:delete-all:parameters", {
185
- type: "header",
186
- meta: o.value
187
- })),
188
- onUpdate: a[12] || (a[12] = ({ index: t, payload: r }) => e.eventBus.emit("operation:update:parameter", {
189
- type: "header",
190
- index: t,
191
- payload: r,
192
- meta: o.value
193
- }))
194
- }, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
195
- [y, p("Headers")]
211
+ onAdd: o("header").onAdd,
212
+ onDelete: o("header").onDelete,
213
+ onDeleteAll: o("header").onDeleteAll,
214
+ onUpdate: o("header").onUpdate
215
+ }, null, 8, ["id", "environment", "exampleKey", "parameters", "onAdd", "onDelete", "onDeleteAll", "onUpdate"]), [
216
+ [f, y("Headers")]
196
217
  ]),
197
- d(u(b, {
198
- id: n.value.Query,
199
- envVariables: e.envVariables,
200
- environment: e.environment,
201
- exampleKey: e.exampleKey,
202
- parameters: m.value.query ?? [],
218
+ h(s(B, {
219
+ id: i.value.Query,
220
+ environment: t(m),
221
+ exampleKey: t(d),
222
+ parameters: p.value.query ?? [],
203
223
  title: "Query Parameters",
204
- onAdd: a[13] || (a[13] = ({ key: t, value: r }) => e.eventBus.emit("operation:add:parameter", {
205
- type: "query",
206
- payload: { key: t ?? "", value: r ?? "", isEnabled: !0 },
207
- meta: o.value
208
- })),
209
- onDelete: a[14] || (a[14] = ({ index: t }) => e.eventBus.emit("operation:delete:parameter", {
210
- type: "query",
211
- index: t,
212
- meta: o.value
213
- })),
214
- onDeleteAll: a[15] || (a[15] = () => e.eventBus.emit("operation:delete-all:parameters", {
215
- type: "query",
216
- meta: o.value
217
- })),
218
- onUpdate: a[16] || (a[16] = ({ index: t, payload: r }) => e.eventBus.emit("operation:update:parameter", {
219
- type: "query",
220
- index: t,
221
- payload: r,
222
- meta: o.value
223
- }))
224
- }, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
225
- [y, p("Query")]
224
+ onAdd: o("query").onAdd,
225
+ onDelete: o("query").onDelete,
226
+ onDeleteAll: o("query").onDeleteAll,
227
+ onUpdate: o("query").onUpdate
228
+ }, null, 8, ["id", "environment", "exampleKey", "parameters", "onAdd", "onDelete", "onDeleteAll", "onUpdate"]), [
229
+ [f, y("Query")]
226
230
  ]),
227
- d(u(M, {
228
- id: n.value.Body,
229
- envVariables: e.envVariables,
230
- environment: e.environment,
231
- exampleKey: e.exampleKey,
232
- requestBody: v(g)(e.operation.requestBody),
231
+ h(s(ne, {
232
+ id: i.value.Body,
233
+ environment: t(m),
234
+ exampleKey: t(d),
235
+ requestBody: t(C)(t(r).requestBody),
233
236
  title: "Request Body",
234
- "onAdd:formRow": a[17] || (a[17] = (t) => e.eventBus.emit("operation:add:requestBody:formRow", {
235
- contentType: t.contentType,
236
- meta: o.value,
237
- payload: {
238
- key: t.data.key,
239
- value: t.data.value
240
- }
241
- })),
242
- "onUpdate:contentType": a[18] || (a[18] = (t) => e.eventBus.emit("operation:update:requestBody:contentType", {
243
- payload: {
244
- contentType: t.value
245
- },
246
- meta: o.value
247
- })),
248
- "onUpdate:formRow": a[19] || (a[19] = (t) => e.eventBus.emit("operation:update:requestBody:formRow", {
249
- contentType: t.contentType,
250
- meta: o.value,
251
- index: t.index,
252
- payload: {
253
- key: t.data.key,
254
- value: t.data.value
255
- }
256
- })),
257
- "onDelete:fromRow": a[20] || (a[20] = (t) => e.eventBus.emit("operation:delete:requestBody:formRow", {
258
- contentType: t.contentType,
259
- index: t.index,
260
- meta: o.value
261
- })),
262
- "onUpdate:value": a[21] || (a[21] = (t) => e.eventBus.emit("operation:update:requestBody:value", {
263
- contentType: t.contentType,
264
- payload: {
265
- value: t.value
266
- },
267
- meta: o.value
268
- }))
269
- }, null, 8, ["id", "envVariables", "environment", "exampleKey", "requestBody"]), [
270
- [y, p("Body") && v(q)(e.method)]
237
+ "onAdd:formRow": N,
238
+ "onDelete:fromRow": M,
239
+ "onUpdate:contentType": Q,
240
+ "onUpdate:formRow": $,
241
+ "onUpdate:value": j
242
+ }, null, 8, ["id", "environment", "exampleKey", "requestBody"]), [
243
+ [f, y("Body") && t(w)(t(A))]
271
244
  ]),
272
- (i(!0), B(U, null, H(e.plugins, (t, r) => (i(), V(v(Q), { key: r }, {
273
- default: k(() => [
274
- t?.components?.request ? (i(), V(I(t.components.request), {
245
+ (u(!0), x(J, null, W(e.plugins, (D, z) => (u(), U(t(te), { key: z }, {
246
+ default: q(() => [
247
+ D?.components?.request ? (u(), U(Y(D.components.request), {
275
248
  key: 0,
276
- operation: e.operation,
277
- selectedExample: e.exampleKey
278
- }, null, 8, ["operation", "selectedExample"])) : w("", !0)
249
+ operation: t(r),
250
+ selectedExample: t(d)
251
+ }, null, 8, ["operation", "selectedExample"])) : K("", !0)
279
252
  ]),
280
253
  _: 2
281
254
  }, 1024))), 128))
@@ -285,5 +258,5 @@ const z = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
285
258
  }
286
259
  });
287
260
  export {
288
- re as default
261
+ Ue as default
289
262
  };
@@ -1,6 +1,5 @@
1
- import type { Environment } from '@scalar/oas-utils/entities/environment';
1
+ import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
2
2
  import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
- import type { EnvVariable } from '../../../../store/active-entities.js';
4
3
  type __VLS_Props = {
5
4
  /** Request body */
6
5
  requestBody?: RequestBodyObject;
@@ -8,9 +7,8 @@ type __VLS_Props = {
8
7
  exampleKey: string;
9
8
  /** Display title */
10
9
  title: string;
11
- /** TODO: remove when we do the migration */
12
- environment: Environment;
13
- envVariables: EnvVariable[];
10
+ /** Selected environment */
11
+ environment: XScalarEnvironment;
14
12
  };
15
13
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
16
14
  "update:contentType": (payload: {
@@ -1 +1 @@
1
- {"version":3,"file":"OperationBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBody.vue"],"names":[],"mappings":"AA2VA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAEzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAUrG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACf,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IAEb,4CAA4C;IAC5C,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;eAK0C,MAAM;;;gBAI7B,MAAM,GAAG,IAAI;qBAAe,MAAM;;;cAM7C,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;qBACxC,MAAM;;;eAMZ,MAAM;cACP,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;SAAE,CAAC;qBAC9C,MAAM;;;eAGiB,MAAM;qBAAe,MAAM;;;;eAtBvB,MAAM;;;gBAI7B,MAAM,GAAG,IAAI;qBAAe,MAAM;;;cAM7C,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;qBACxC,MAAM;;;eAMZ,MAAM;cACP,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;SAAE,CAAC;qBAC9C,MAAM;;;eAGiB,MAAM;qBAAe,MAAM;;;AA0jBrE,wBAOG"}
1
+ {"version":3,"file":"OperationBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBody.vue"],"names":[],"mappings":"AAuVA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAgBrG,KAAK,WAAW,GAAG;IACjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;eAI4C,MAAM;;;gBAI7B,MAAM,GAAG,IAAI;qBAAe,MAAM;;;cAM7C,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;qBACxC,MAAM;;;eAMZ,MAAM;cACP,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;SAAE,CAAC;qBAC9C,MAAM;;;eAGiB,MAAM;qBAAe,MAAM;;;;eAtBvB,MAAM;;;gBAI7B,MAAM,GAAG,IAAI;qBAAe,MAAM;;;cAM7C,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;qBACxC,MAAM;;;eAMZ,MAAM;cACP,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;SAAE,CAAC;qBAC9C,MAAM;;;eAGiB,MAAM;qBAAe,MAAM;;;AAyjBrE,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./OperationBody.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-caf58516"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-01b90115"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };