@scalar/api-client 2.18.4 → 2.19.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 (223) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/components/AddressBar/AddressBar.vue2.js +5 -5
  3. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +6 -6
  4. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
  5. package/dist/components/ImportCollection/DropEventListener.vue.js +26 -28
  6. package/dist/components/ImportCollection/utils/get-openapi-version.d.ts.map +1 -1
  7. package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
  8. package/dist/components/ImportCollection/utils/import-collection.d.ts.map +1 -1
  9. package/dist/components/Search/useSearch.d.ts.map +1 -1
  10. package/dist/components/Search/useSearch.js +16 -16
  11. package/dist/components/Server/index.d.ts +1 -1
  12. package/dist/components/Server/index.d.ts.map +1 -1
  13. package/dist/components/Server/index.js +6 -6
  14. package/dist/components/SideNav/SideNav.vue.js +3 -3
  15. package/dist/components/Sidebar/index.d.ts +1 -2
  16. package/dist/components/Sidebar/index.d.ts.map +1 -1
  17. package/dist/components/index.d.ts +2 -2
  18. package/dist/components/index.d.ts.map +1 -1
  19. package/dist/hooks/index.d.ts +2 -2
  20. package/dist/hooks/index.d.ts.map +1 -1
  21. package/dist/hooks/useResponseBody.d.ts +1 -1
  22. package/dist/hooks/useResponseBody.d.ts.map +1 -1
  23. package/dist/hooks/useResponseBody.js +4 -4
  24. package/dist/hooks/useSidebar.d.ts +1 -1
  25. package/dist/hooks/useSidebar.d.ts.map +1 -1
  26. package/dist/index.d.ts +2 -2
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/layouts/App/ApiClientApp.vue.js +5 -5
  29. package/dist/layouts/App/MainLayout.vue.js +4 -4
  30. package/dist/layouts/App/create-api-client-app.d.ts +12 -12
  31. package/dist/layouts/App/index.d.ts +1 -1
  32. package/dist/layouts/App/index.d.ts.map +1 -1
  33. package/dist/layouts/Web/ApiClientWeb.vue.js +6 -6
  34. package/dist/layouts/Web/create-api-client-web.d.ts +12 -12
  35. package/dist/layouts/Web/index.d.ts +1 -1
  36. package/dist/layouts/Web/index.d.ts.map +1 -1
  37. package/dist/libs/create-client.d.ts +12 -12
  38. package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
  39. package/dist/libs/get-request-uid-by-path-method.d.ts.map +1 -1
  40. package/dist/libs/hot-keys.d.ts +2 -2
  41. package/dist/libs/hot-keys.d.ts.map +1 -1
  42. package/dist/libs/importers/curl.d.ts.map +1 -1
  43. package/dist/libs/index.d.ts +14 -15
  44. package/dist/libs/index.d.ts.map +1 -1
  45. package/dist/libs/index.js +33 -33
  46. package/dist/libs/parse-curl.js +4 -4
  47. package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
  48. package/dist/libs/send-request/create-fetch-body.d.ts.map +1 -1
  49. package/dist/libs/send-request/create-fetch-body.js +1 -1
  50. package/dist/libs/send-request/create-fetch-headers.d.ts.map +1 -1
  51. package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
  52. package/dist/libs/send-request/create-fetch-query-params.js +2 -1
  53. package/dist/libs/send-request/index.d.ts +1 -1
  54. package/dist/libs/send-request/index.d.ts.map +1 -1
  55. package/dist/libs/send-request/index.js +4 -4
  56. package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
  57. package/dist/libs/send-request/set-request-cookies.js +4 -4
  58. package/dist/store/active-entities.d.ts +1 -1
  59. package/dist/store/collections.d.ts +1 -1
  60. package/dist/store/collections.d.ts.map +1 -1
  61. package/dist/store/collections.js +4 -4
  62. package/dist/store/environment.d.ts +1 -1
  63. package/dist/store/environment.d.ts.map +1 -1
  64. package/dist/store/environment.js +4 -4
  65. package/dist/store/import-spec.d.ts +2 -2
  66. package/dist/store/import-spec.d.ts.map +1 -1
  67. package/dist/store/index.d.ts +1 -1
  68. package/dist/store/index.d.ts.map +1 -1
  69. package/dist/store/request-example.d.ts +1 -1
  70. package/dist/store/request-example.d.ts.map +1 -1
  71. package/dist/store/request-example.js +6 -6
  72. package/dist/store/requests.d.ts +1 -1
  73. package/dist/store/requests.d.ts.map +1 -1
  74. package/dist/store/requests.js +8 -8
  75. package/dist/store/security-schemes.d.ts +1 -1
  76. package/dist/store/security-schemes.d.ts.map +1 -1
  77. package/dist/store/security-schemes.js +4 -4
  78. package/dist/store/servers.d.ts +1 -1
  79. package/dist/store/servers.d.ts.map +1 -1
  80. package/dist/store/servers.js +4 -4
  81. package/dist/store/store.d.ts +12 -12
  82. package/dist/store/tags.d.ts +1 -1
  83. package/dist/store/tags.d.ts.map +1 -1
  84. package/dist/store/tags.js +5 -5
  85. package/dist/store/workspace.d.ts +13 -13
  86. package/dist/store/workspace.d.ts.map +1 -1
  87. package/dist/store/workspace.js +7 -7
  88. package/dist/style.css +1 -1
  89. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +4 -5
  90. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  91. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +17 -16
  92. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +3 -3
  93. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -1
  94. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +22 -22
  95. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
  96. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +14 -13
  97. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
  98. package/dist/v2/blocks/operation-block/helpers/build-request.js +43 -41
  99. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts +14 -0
  100. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts.map +1 -0
  101. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +14 -0
  102. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +25 -0
  103. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +1 -0
  104. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +17 -0
  105. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +10 -0
  106. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  107. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  108. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +29 -25
  109. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +6 -1
  110. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  111. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +27 -23
  112. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +10 -1
  113. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  114. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +48 -39
  115. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  116. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +49 -46
  117. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts +1 -1
  118. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts.map +1 -1
  119. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +1 -1
  120. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +6 -2
  121. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  122. package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
  123. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +200 -115
  124. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +4 -4
  125. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  126. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +21 -17
  127. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +16 -10
  128. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  129. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +32 -45
  130. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +16 -13
  131. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  132. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +4 -4
  133. package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +32 -33
  134. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +33 -18
  135. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  136. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +106 -106
  137. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +10 -5
  138. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
  139. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +60 -31
  140. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +41 -0
  141. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -0
  142. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +25 -0
  143. package/dist/v2/blocks/request-block/helpers/group-by.d.ts +1 -1
  144. package/dist/v2/blocks/request-block/helpers/group-by.d.ts.map +1 -1
  145. package/dist/v2/blocks/request-block/helpers/group-by.js +6 -3
  146. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts +13 -0
  147. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts.map +1 -0
  148. package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +7 -0
  149. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  150. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  151. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +61 -63
  152. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +1 -2
  153. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  154. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +2 -2
  155. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +2 -2
  156. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +1 -2
  157. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  158. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
  159. package/dist/v2/components/code-input/CodeInput.vue.d.ts +2 -0
  160. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  161. package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
  162. package/dist/v2/components/code-input/CodeInput.vue2.js +57 -51
  163. package/dist/v2/features/app/App.vue.js +6 -6
  164. package/dist/v2/features/app/app-events.d.ts +5 -9
  165. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  166. package/dist/v2/features/app/app-events.js +146 -120
  167. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  168. package/dist/v2/features/app/app-state.js +69 -71
  169. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  170. package/dist/v2/features/app/components/AppSidebar.vue2.js +5 -5
  171. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  172. package/dist/v2/features/modal/Modal.vue.js +1 -1
  173. package/dist/v2/features/modal/Modal.vue2.js +21 -22
  174. package/dist/v2/features/modal/index.d.ts +1 -1
  175. package/dist/v2/features/modal/index.d.ts.map +1 -1
  176. package/dist/v2/features/modal/index.js +4 -4
  177. package/dist/v2/features/modal/modal-events.d.ts +13 -0
  178. package/dist/v2/features/modal/modal-events.d.ts.map +1 -0
  179. package/dist/v2/features/modal/modal-events.js +31 -0
  180. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  181. package/dist/v2/features/operation/Operation.vue.js +30 -43
  182. package/dist/v2/workspace-events.d.ts +25 -0
  183. package/dist/v2/workspace-events.d.ts.map +1 -0
  184. package/dist/v2/workspace-events.js +202 -0
  185. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
  186. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
  187. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
  188. package/dist/views/Cookies/Cookies.vue2.js +3 -3
  189. package/dist/views/Environment/handle-drag.d.ts +1 -1
  190. package/dist/views/Environment/handle-drag.d.ts.map +1 -1
  191. package/dist/views/Request/RequestRoot.vue2.js +9 -9
  192. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +4 -4
  193. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +4 -4
  194. package/dist/views/Request/RequestSection/RequestSection.vue2.js +5 -5
  195. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +1 -1
  196. package/dist/views/Request/RequestSidebar.vue2.js +6 -6
  197. package/dist/views/Request/RequestSidebarItem.vue2.js +6 -6
  198. package/dist/views/Request/RequestSubpageHeader.vue2.js +4 -4
  199. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  200. package/dist/views/Request/ResponseSection/index.d.ts +1 -1
  201. package/dist/views/Request/ResponseSection/index.d.ts.map +1 -1
  202. package/dist/views/Request/ResponseSection/index.js +4 -4
  203. package/dist/views/Request/consts/index.d.ts +2 -3
  204. package/dist/views/Request/consts/index.d.ts.map +1 -1
  205. package/dist/views/Request/consts/new-auth-options.d.ts +1 -1
  206. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  207. package/dist/views/Request/handle-drag.d.ts +1 -1
  208. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  209. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
  210. package/dist/views/Request/hooks/useOpenApiWatcher.js +14 -14
  211. package/dist/views/Request/libs/auth.d.ts +1 -1
  212. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  213. package/dist/views/Request/libs/index.d.ts +3 -3
  214. package/dist/views/Request/libs/index.d.ts.map +1 -1
  215. package/dist/views/Request/libs/oauth2.js +1 -1
  216. package/dist/views/Request/libs/watch-mode.js +6 -6
  217. package/dist/views/Request/types/index.d.ts +1 -1
  218. package/dist/views/Request/types/index.d.ts.map +1 -1
  219. package/package.json +13 -13
  220. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +0 -18
  221. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +0 -1
  222. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +0 -39
  223. package/dist/v2/features/operation/helpers/get-operation-header.js +0 -12
@@ -1,8 +1,8 @@
1
- import { defineComponent as h, computed as s, ref as S, watch as x, createBlock as g, openBlock as y, unref as t, withCtx as l, createVNode as n, createElementVNode as m, createTextVNode as u, toDisplayString as b, normalizeClass as w } from "vue";
2
- import { ScalarErrorBoundary as B, ScalarCodeBlock as k, ScalarCombobox as V, ScalarButton as T } from "@scalar/components";
3
- import { ScalarIconCaretDown as E } from "@scalar/icons";
4
- import { generateCodeSnippet as N } from "../../operation-code-sample/helpers/generate-code-snippet.js";
5
- import { getClients as D } from "../../operation-code-sample/helpers/get-clients.js";
1
+ import { defineComponent as h, computed as s, ref as g, watch as S, createBlock as x, openBlock as b, unref as t, withCtx as l, createVNode as n, createElementVNode as m, createTextVNode as u, toDisplayString as y, normalizeClass as k } from "vue";
2
+ import { ScalarErrorBoundary as w, ScalarCodeBlock as B, ScalarCombobox as V, ScalarButton as T } from "@scalar/components";
3
+ import { ScalarIconCaretDown as D } from "@scalar/icons";
4
+ import { generateCodeSnippet as E } from "../../operation-code-sample/helpers/generate-code-snippet.js";
5
+ import { getClients as N } from "../../operation-code-sample/helpers/get-clients.js";
6
6
  import { getCustomCodeSamples as O } from "../../operation-code-sample/helpers/get-custom-code-samples.js";
7
7
  import { getSecrets as z } from "../../operation-code-sample/helpers/get-secrets.js";
8
8
  import { findClient as f } from "../../operation-code-sample/helpers/find-client.js";
@@ -12,6 +12,7 @@ import W from "../../../components/data-table/DataTableRow.vue.js";
12
12
  const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__PURE__ */ h({
13
13
  __name: "RequestCodeSnippet",
14
14
  props: {
15
+ integration: {},
15
16
  clientOptions: {},
16
17
  selectedClient: {},
17
18
  selectedServer: { default: null },
@@ -24,15 +25,16 @@ const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__
24
25
  operation: {},
25
26
  fallback: { type: Boolean },
26
27
  generateLabel: { type: Function },
27
- isWebhook: { type: Boolean }
28
+ isWebhook: { type: Boolean },
29
+ globalCookies: {}
28
30
  },
29
31
  setup(e) {
30
32
  const d = s(() => O(e.operation)), c = s(
31
- () => D(d.value, e.clientOptions)
32
- ), i = S(
33
+ () => N(d.value, e.clientOptions)
34
+ ), i = g(
33
35
  f(c.value, e.selectedClient)
34
36
  );
35
- x(
37
+ S(
36
38
  () => e.selectedClient,
37
39
  (a) => {
38
40
  const o = f(c.value, a);
@@ -42,7 +44,7 @@ const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__
42
44
  const p = s(() => z(e.securitySchemes ?? [])), C = (a) => {
43
45
  i.value = a, a && !a.id.startsWith("custom") && e.eventBus.emit("workspace:update:selected-client", a.id);
44
46
  }, v = s(
45
- () => N({
47
+ () => E({
46
48
  clientId: i.value?.id,
47
49
  customCodeSamples: d.value,
48
50
  operation: e.operation,
@@ -51,10 +53,12 @@ const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__
51
53
  contentType: e.selectedContentType,
52
54
  server: e.selectedServer,
53
55
  securitySchemes: e.securitySchemes,
54
- example: e.selectedExample
56
+ example: e.selectedExample,
57
+ globalCookies: e.globalCookies,
58
+ includeDefaultHeaders: e.integration === "client"
55
59
  })
56
60
  );
57
- return (a, o) => (y(), g(t(I), {
61
+ return (a, o) => (b(), x(t(I), {
58
62
  class: "group/preview w-full border-t",
59
63
  defaultOpen: !1
60
64
  }, {
@@ -76,9 +80,9 @@ const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__
76
80
  variant: "ghost"
77
81
  }, {
78
82
  default: l(() => [
79
- u(b(i.value?.title) + " ", 1),
80
- n(t(E), {
81
- class: w(["mt-0.25 size-3 transition-transform duration-100", r && "rotate-180"]),
83
+ u(y(i.value?.title) + " ", 1),
84
+ n(t(D), {
85
+ class: k(["mt-0.25 size-3 transition-transform duration-100", r && "rotate-180"]),
82
86
  weight: "bold"
83
87
  }, null, 8, ["class"])
84
88
  ]),
@@ -90,7 +94,7 @@ const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__
90
94
  ])
91
95
  ]),
92
96
  default: l(() => [
93
- n(t(B), null, {
97
+ n(t(w), null, {
94
98
  default: l(() => [
95
99
  n(t(R), {
96
100
  columns: [""],
@@ -100,7 +104,7 @@ const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__
100
104
  n(t(W), null, {
101
105
  default: l(() => [
102
106
  m("div", q, [
103
- n(t(k), {
107
+ n(t(B), {
104
108
  class: "text-base -outline-offset-2",
105
109
  content: v.value,
106
110
  hideCredentials: p.value,
@@ -1,7 +1,8 @@
1
+ import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
1
2
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
2
- import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
+ import type { TableRow } from './RequestTableRow.vue.js';
3
4
  type __VLS_Props = {
4
- parameters: ParameterObject[];
5
+ rows: TableRow[];
5
6
  exampleKey: string;
6
7
  title: string;
7
8
  label?: string;
@@ -9,6 +10,7 @@ type __VLS_Props = {
9
10
  globalRoute?: string;
10
11
  showAddRowPlaceholder?: boolean;
11
12
  environment: XScalarEnvironment;
13
+ eventBus: WorkspaceEventBus;
12
14
  };
13
15
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
16
  delete: (payload: {
@@ -16,15 +18,17 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
16
18
  }) => any;
17
19
  add: (payload: Partial<{
18
20
  name: string;
19
- value: string;
21
+ value: string | File;
22
+ index: number;
23
+ isDisabled: boolean;
20
24
  }>) => any;
21
25
  update: (payload: {
22
26
  index: number;
23
- payload: Partial<{
27
+ payload: {
24
28
  name: string;
25
- value: string;
29
+ value: string | File;
26
30
  isDisabled: boolean;
27
- }>;
31
+ };
28
32
  }) => any;
29
33
  deleteAll: () => any;
30
34
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -33,15 +37,17 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
33
37
  }) => any) | undefined;
34
38
  onAdd?: ((payload: Partial<{
35
39
  name: string;
36
- value: string;
40
+ value: string | File;
41
+ index: number;
42
+ isDisabled: boolean;
37
43
  }>) => any) | undefined;
38
44
  onUpdate?: ((payload: {
39
45
  index: number;
40
- payload: Partial<{
46
+ payload: {
41
47
  name: string;
42
- value: string;
48
+ value: string | File;
43
49
  isDisabled: boolean;
44
- }>;
50
+ };
45
51
  }) => any) | undefined;
46
52
  onDeleteAll?: (() => any) | undefined;
47
53
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestParams.vue"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAUnG,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;eAmBgC,MAAM;;;cARF,MAAM;eAAS,MAAM;;;eAI9C,MAAM;iBACJ,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC;;;;;eAG1C,MAAM;;;cARF,MAAM;eAAS,MAAM;;;eAI9C,MAAM;iBACJ,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC;;;;AAsL5E,wBAOG"}
1
+ {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestParams.vue"],"names":[],"mappings":"AAgGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAMnH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAErD,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;;;eA4BgC,MAAM;;;cAb5B,MAAM;eACL,MAAM,GAAG,IAAI;eACb,MAAM;oBACD,OAAO;;;eAMZ,MAAM;iBACJ;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE;;;;;eAGxC,MAAM;;;cAb5B,MAAM;eACL,MAAM,GAAG,IAAI;eACb,MAAM;oBACD,OAAO;;;eAMZ,MAAM;iBACJ;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE;;;;AAyK1E,wBAOG"}
@@ -1,83 +1,70 @@
1
- import { defineComponent as b, computed as r, createBlock as s, openBlock as d, unref as i, withCtx as o, createVNode as m, createElementVNode as u, createCommentVNode as x, withModifiers as g, createTextVNode as c, toDisplayString as p } from "vue";
2
- import { ScalarTooltip as h, ScalarButton as y } from "@scalar/components";
3
- import { getExample as P } from "../../operation-block/helpers/get-example.js";
4
- import { getParameterSchema as A } from "../helpers/get-parameter-schema.js";
5
- import C from "./RequestTable.vue.js";
6
- import q from "../../../components/layout/CollapsibleSection.vue.js";
7
- const K = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100" }, k = { class: "sr-only" }, E = /* @__PURE__ */ b({
1
+ import { defineComponent as v, computed as c, createBlock as i, openBlock as s, unref as n, withCtx as l, createVNode as r, createElementVNode as d, createCommentVNode as R, withModifiers as g, createTextVNode as m, toDisplayString as u } from "vue";
2
+ import { ScalarTooltip as x, ScalarButton as b } from "@scalar/components";
3
+ import y from "./RequestTable.vue.js";
4
+ import P from "../../../components/layout/CollapsibleSection.vue.js";
5
+ const h = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100" }, A = { class: "sr-only" }, T = /* @__PURE__ */ v({
8
6
  __name: "RequestParams",
9
7
  props: {
10
- parameters: {},
8
+ rows: {},
11
9
  exampleKey: {},
12
10
  title: {},
13
11
  label: {},
14
12
  invalidParams: {},
15
13
  globalRoute: {},
16
14
  showAddRowPlaceholder: { type: Boolean, default: !0 },
17
- environment: {}
15
+ environment: {},
16
+ eventBus: {}
18
17
  },
19
18
  emits: ["add", "update", "delete", "deleteAll"],
20
- setup(e, { emit: f }) {
21
- const n = f, v = r(
22
- () => e.parameters.map((a) => {
23
- const t = P(a, e.exampleKey, void 0);
24
- return {
25
- name: a.name,
26
- value: t?.value ?? "",
27
- description: a.description,
28
- globalRoute: e.globalRoute,
29
- schema: A(a),
30
- isRequired: a.required,
31
- isDisabled: t?.["x-disabled"] ?? !1
32
- };
33
- })
34
- ), w = r(() => e.parameters.length > 1);
35
- return (a, t) => (d(), s(i(q), {
19
+ setup(e, { emit: w }) {
20
+ const a = w, f = c(() => e.rows.length > 1);
21
+ return (C, t) => (s(), i(n(P), {
36
22
  class: "group/params",
37
- itemCount: e.parameters.length
23
+ itemCount: e.rows.length
38
24
  }, {
39
- title: o(() => [
40
- c(p(e.title), 1)
25
+ title: l(() => [
26
+ m(u(e.title), 1)
41
27
  ]),
42
- actions: o(() => [
43
- u("div", K, [
44
- w.value ? (d(), s(i(h), {
28
+ actions: l(() => [
29
+ d("div", h, [
30
+ f.value ? (s(), i(n(x), {
45
31
  key: 0,
46
32
  content: "Clear optional parameters",
47
33
  placement: "left"
48
34
  }, {
49
- default: o(() => [
50
- m(i(y), {
35
+ default: l(() => [
36
+ r(n(b), {
51
37
  class: "pr-0.75 pl-1 transition-none",
52
38
  size: "sm",
53
39
  variant: "ghost",
54
- onClick: t[0] || (t[0] = g((l) => n("deleteAll"), ["stop"]))
40
+ onClick: t[0] || (t[0] = g((o) => a("deleteAll"), ["stop"]))
55
41
  }, {
56
- default: o(() => [
57
- t[4] || (t[4] = c(" Clear ", -1)),
58
- u("span", k, "All " + p(e.title), 1)
42
+ default: l(() => [
43
+ t[5] || (t[5] = m(" Clear ", -1)),
44
+ d("span", A, "All " + u(e.title), 1)
59
45
  ]),
60
46
  _: 1
61
47
  })
62
48
  ]),
63
49
  _: 1
64
- })) : x("", !0)
50
+ })) : R("", !0)
65
51
  ])
66
52
  ]),
67
- default: o(() => [
68
- m(C, {
53
+ default: l(() => [
54
+ r(y, {
69
55
  class: "flex-1",
70
56
  columns: ["32px", "", ""],
71
- data: v.value,
57
+ data: e.rows,
72
58
  environment: e.environment,
73
59
  exampleKey: e.exampleKey,
74
60
  globalRoute: e.globalRoute,
75
61
  invalidParams: e.invalidParams,
76
62
  label: e.label,
77
63
  showAddRowPlaceholder: e.showAddRowPlaceholder,
78
- onAddRow: t[1] || (t[1] = (l) => n("add", l)),
79
- onDeleteRow: t[2] || (t[2] = (l) => n("delete", { index: l })),
80
- onUpdateRow: t[3] || (t[3] = (l, R) => n("update", { index: l, payload: R }))
64
+ onAddRow: t[1] || (t[1] = (o) => a("add", o)),
65
+ onDeleteRow: t[2] || (t[2] = (o) => a("delete", { index: o })),
66
+ onNavigate: t[3] || (t[3] = (o) => e.eventBus.emit("ui:route:page", { name: o })),
67
+ onUpdateRow: t[4] || (t[4] = (o, p) => a("update", { index: o, payload: p }))
81
68
  }, null, 8, ["data", "environment", "exampleKey", "globalRoute", "invalidParams", "label", "showAddRowPlaceholder"])
82
69
  ]),
83
70
  _: 1
@@ -85,5 +72,5 @@ const K = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
85
72
  }
86
73
  });
87
74
  export {
88
- E as default
75
+ T as default
89
76
  };
@@ -2,7 +2,6 @@ import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensi
2
2
  import { type TableRow } from '../../../../v2/blocks/request-block/components/RequestTableRow.vue.js';
3
3
  type __VLS_Props = {
4
4
  data: TableRow[];
5
- isReadOnly?: boolean;
6
5
  /** Hide the enabled column */
7
6
  hasCheckboxDisabled?: boolean;
8
7
  invalidParams?: Set<string>;
@@ -12,28 +11,32 @@ type __VLS_Props = {
12
11
  environment: XScalarEnvironment;
13
12
  };
14
13
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
- updateRow: (index: number, payload: Partial<{
14
+ navigate: (route: string) => any;
15
+ updateRow: (index: number, payload: {
16
16
  name: string;
17
- value: string;
17
+ value: string | File;
18
18
  isDisabled: boolean;
19
- }>) => any;
20
- addRow: (payload: Partial<{
19
+ }) => any;
20
+ addRow: (payload: {
21
21
  name: string;
22
- value: string;
23
- }>) => any;
22
+ value: string | File;
23
+ isDisabled: boolean;
24
+ }) => any;
24
25
  deleteRow: (index: number) => any;
25
26
  uploadFile: (index: number) => any;
26
27
  removeFile: (index: number) => any;
27
28
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
28
- onUpdateRow?: ((index: number, payload: Partial<{
29
+ onNavigate?: ((route: string) => any) | undefined;
30
+ onUpdateRow?: ((index: number, payload: {
29
31
  name: string;
30
- value: string;
32
+ value: string | File;
31
33
  isDisabled: boolean;
32
- }>) => any) | undefined;
33
- onAddRow?: ((payload: Partial<{
34
+ }) => any) | undefined;
35
+ onAddRow?: ((payload: {
34
36
  name: string;
35
- value: string;
36
- }>) => any) | undefined;
37
+ value: string | File;
38
+ isDisabled: boolean;
39
+ }) => any) | undefined;
37
40
  onDeleteRow?: ((index: number) => any) | undefined;
38
41
  onUploadFile?: ((index: number) => any) | undefined;
39
42
  onRemoveFile?: ((index: number) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTable.vue"],"names":[],"mappings":"AAiKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAwB,EACtB,KAAK,QAAQ,EACd,MAAM,0DAA0D,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;cAmB2B,MAAM;eAAS,MAAM;oBAAc,OAAO;;;cAJ9B,MAAM;eAAS,MAAM;;;;;;;cAIjC,MAAM;eAAS,MAAM;oBAAc,OAAO;;;cAJ9B,MAAM;eAAS,MAAM;;;;;;AA4N9D,wBAOG"}
1
+ {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTable.vue"],"names":[],"mappings":"AAiKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAwB,EACtB,KAAK,QAAQ,EACd,MAAM,0DAA0D,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;;cAoBmB,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;cALjD,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;;;;;;cAKjD,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;cALjD,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;;;;AA+NtE,wBAOG"}
@@ -1,7 +1,7 @@
1
- import e from "./RequestTable.vue2.js";
1
+ import o from "./RequestTable.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(e, [["__scopeId", "data-v-e07e86c7"]]);
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-95e0197f"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,13 +1,12 @@
1
- import { defineComponent as B, computed as f, createBlock as b, openBlock as r, unref as o, withCtx as n, createVNode as i, createElementBlock as D, createTextVNode as m, toDisplayString as s, Fragment as k, renderList as F } from "vue";
2
- import U from "./RequestTableRow.vue.js";
1
+ import { defineComponent as D, computed as f, createBlock as v, openBlock as r, unref as d, withCtx as u, createVNode as i, createElementBlock as k, createTextVNode as m, toDisplayString as s, Fragment as F, renderList as U } from "vue";
2
+ import g from "./RequestTableRow.vue.js";
3
3
  import x from "../../../components/data-table/DataTable.vue.js";
4
- import C from "../../../components/data-table/DataTableRow.vue.js";
4
+ import y from "../../../components/data-table/DataTableRow.vue.js";
5
5
  import c from "../../../components/data-table/DataTableHeader.vue.js";
6
- const A = /* @__PURE__ */ B({
6
+ const N = /* @__PURE__ */ D({
7
7
  __name: "RequestTable",
8
8
  props: {
9
9
  data: {},
10
- isReadOnly: { type: Boolean },
11
10
  hasCheckboxDisabled: { type: Boolean },
12
11
  invalidParams: {},
13
12
  label: {},
@@ -15,44 +14,44 @@ const A = /* @__PURE__ */ B({
15
14
  showAddRowPlaceholder: { type: Boolean, default: !0 },
16
15
  environment: {}
17
16
  },
18
- emits: ["addRow", "updateRow", "deleteRow", "uploadFile", "removeFile"],
19
- setup(e, { emit: w }) {
20
- const l = w, h = f(() => e.showUploadButton ? ["36px", "", "", "auto"] : ["36px", "", ""]), R = f(() => {
17
+ emits: ["addRow", "updateRow", "deleteRow", "uploadFile", "removeFile", "navigate"],
18
+ setup(e, { emit: b }) {
19
+ const t = b, w = f(() => e.showUploadButton ? ["36px", "", "", "auto"] : ["36px", "", ""]), h = f(() => {
21
20
  if (!e.showAddRowPlaceholder)
22
21
  return e.data;
23
22
  const a = e.data.at(-1);
24
23
  return !a || a.name !== "" || a.value !== "" ? [...e.data, { name: "", value: "", isDisabled: !0 }] : e.data;
25
- }), v = ({
24
+ }), R = ({
26
25
  index: a,
27
- payload: u
26
+ payload: o
28
27
  }) => {
29
28
  if (a >= e.data.length) {
30
- l("addRow", u);
29
+ t("addRow", o);
31
30
  return;
32
31
  }
33
- l("updateRow", a, u);
32
+ t("updateRow", a, o);
34
33
  };
35
- return (a, u) => (r(), b(o(x), {
34
+ return (a, o) => (r(), v(d(x), {
36
35
  class: "group/table flex-1",
37
- columns: h.value
36
+ columns: w.value
38
37
  }, {
39
- default: n(() => [
40
- i(o(C), { class: "sr-only !block" }, {
41
- default: n(() => [
42
- i(o(c), null, {
43
- default: n(() => [
38
+ default: u(() => [
39
+ i(d(y), { class: "sr-only !block" }, {
40
+ default: u(() => [
41
+ i(d(c), null, {
42
+ default: u(() => [
44
43
  m(s(e.label) + " Enabled", 1)
45
44
  ]),
46
45
  _: 1
47
46
  }),
48
- i(o(c), null, {
49
- default: n(() => [
47
+ i(d(c), null, {
48
+ default: u(() => [
50
49
  m(s(e.label) + " Key", 1)
51
50
  ]),
52
51
  _: 1
53
52
  }),
54
- i(o(c), null, {
55
- default: n(() => [
53
+ i(d(c), null, {
54
+ default: u(() => [
56
55
  m(s(e.label) + " Value", 1)
57
56
  ]),
58
57
  _: 1
@@ -60,25 +59,25 @@ const A = /* @__PURE__ */ B({
60
59
  ]),
61
60
  _: 1
62
61
  }),
63
- (r(!0), D(k, null, F(R.value, (y, t) => (r(), b(U, {
64
- key: t,
65
- data: y,
62
+ (r(!0), k(F, null, U(h.value, (B, n) => (r(), v(g, {
63
+ key: n,
64
+ data: B,
66
65
  environment: e.environment,
67
66
  hasCheckboxDisabled: e.hasCheckboxDisabled,
68
67
  invalidParams: e.invalidParams,
69
- isReadOnly: e.isReadOnly,
70
68
  label: e.label,
71
69
  showUploadButton: e.showUploadButton,
72
- onDeleteRow: (d) => l("deleteRow", t),
73
- onRemoveFile: (d) => l("removeFile", t),
74
- onUpdateRow: (d) => v({ index: t, payload: d }),
75
- onUploadFile: (d) => l("uploadFile", t)
76
- }, null, 8, ["data", "environment", "hasCheckboxDisabled", "invalidParams", "isReadOnly", "label", "showUploadButton", "onDeleteRow", "onRemoveFile", "onUpdateRow", "onUploadFile"]))), 128))
70
+ onDeleteRow: (l) => t("deleteRow", n),
71
+ onNavigate: o[0] || (o[0] = (l) => t("navigate", l)),
72
+ onRemoveFile: (l) => t("removeFile", n),
73
+ onUploadFile: (l) => t("uploadFile", n),
74
+ onUpsertRow: (l) => R({ index: n, payload: l })
75
+ }, null, 8, ["data", "environment", "hasCheckboxDisabled", "invalidParams", "label", "showUploadButton", "onDeleteRow", "onRemoveFile", "onUploadFile", "onUpsertRow"]))), 128))
77
76
  ]),
78
77
  _: 1
79
78
  }, 8, ["columns"]));
80
79
  }
81
80
  });
82
81
  export {
83
- A as default
82
+ N as default
84
83
  };
@@ -1,41 +1,56 @@
1
1
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
2
2
  import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
- type __VLS_Props = {
4
- data: TableRow;
5
- isReadOnly?: boolean;
6
- hasCheckboxDisabled?: boolean;
7
- invalidParams?: Set<string>;
8
- label?: string;
9
- environment: XScalarEnvironment;
10
- showUploadButton?: boolean;
11
- };
12
3
  export type TableRow = {
4
+ /** The parameter or field name/key */
13
5
  name: string;
6
+ /** The parameter value, can be a string, file, or null */
14
7
  value: string | File | null;
8
+ /** Optional description for the parameter */
15
9
  description?: string;
10
+ /** Optional route for global parameters (e.g., cookies shared across workspace) */
16
11
  globalRoute?: string;
12
+ /** Whether the parameter is disabled/inactive */
17
13
  isDisabled?: boolean;
14
+ /** OpenAPI schema object with type, validation rules, examples, etc. */
18
15
  schema?: SchemaObject;
16
+ /** Whether the parameter is required */
19
17
  isRequired?: boolean;
18
+ /**
19
+ * Whether the parameter is readonly and can not be modifies directly
20
+ * User can still override the parameter which is going to show up with the linethrough style
21
+ */
22
+ isReadonly?: boolean;
23
+ /** Whether the parameter is overridden later on */
24
+ isOverridden?: boolean;
25
+ };
26
+ type __VLS_Props = {
27
+ data: TableRow;
28
+ hasCheckboxDisabled?: boolean;
29
+ invalidParams?: Set<string>;
30
+ label?: string;
31
+ environment: XScalarEnvironment;
32
+ showUploadButton?: boolean;
20
33
  };
21
34
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
22
- updateRow: (payload: Partial<{
23
- name: string;
24
- value: string;
25
- isDisabled: boolean;
26
- }>) => any;
35
+ navigate: (route: string) => any;
27
36
  deleteRow: () => any;
28
37
  uploadFile: () => any;
29
38
  removeFile: () => any;
30
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
31
- onUpdateRow?: ((payload: Partial<{
39
+ upsertRow: (payload: {
32
40
  name: string;
33
- value: string;
41
+ value: string | File;
34
42
  isDisabled: boolean;
35
- }>) => any) | undefined;
43
+ }) => any;
44
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
45
+ onNavigate?: ((route: string) => any) | undefined;
36
46
  onDeleteRow?: (() => any) | undefined;
37
47
  onUploadFile?: (() => any) | undefined;
38
48
  onRemoveFile?: (() => any) | undefined;
49
+ onUpsertRow?: ((payload: {
50
+ name: string;
51
+ value: string | File;
52
+ isDisabled: boolean;
53
+ }) => any) | undefined;
39
54
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
55
  export default _default;
41
56
  //# sourceMappingURL=RequestTableRow.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAkOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAehG,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;AAqBF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;;;cAhB4B,MAAM;eAAS,MAAM;oBAAc,OAAO;;;;;;;cAA1C,MAAM;eAAS,MAAM;oBAAc,OAAO;;;;;;AAifvE,wBAOG"}
1
+ {"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAoRA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAchG,MAAM,MAAM,QAAQ,GAAG;IACrB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;;;;;;cAYmB,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;;;;;;cAAjD,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;AAkhBtE,wBAOG"}