@scalar/api-client 2.23.0 → 2.23.3

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 (95) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/style.css +1 -1
  3. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +13 -3
  4. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  5. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +68 -68
  6. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
  7. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +54 -53
  8. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +5 -3
  9. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
  10. package/dist/v2/blocks/operation-block/helpers/build-request-security.js +1 -1
  11. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +3 -2
  12. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
  13. package/dist/v2/blocks/operation-block/index.d.ts +2 -1
  14. package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
  15. package/dist/v2/blocks/operation-block/index.js +7 -4
  16. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +3 -2
  17. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  18. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +2 -2
  19. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +3 -2
  20. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  21. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
  22. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +78 -78
  23. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +2 -2
  24. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -1
  25. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +3 -2
  26. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  27. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +2 -2
  28. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -1
  29. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +8 -5
  30. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  31. package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
  32. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +4 -4
  33. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +49 -45
  35. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  36. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +63 -51
  37. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  38. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +2 -2
  39. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +4 -2
  40. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  41. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +18 -181
  42. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  43. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +118 -107
  44. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -2
  45. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  46. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +30 -33
  47. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +11 -178
  48. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  49. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -110
  50. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
  51. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +5 -29
  52. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts +6 -0
  53. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -0
  54. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +85 -0
  55. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +9 -0
  56. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -0
  57. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +15 -0
  58. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +3 -2
  59. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  60. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +23 -0
  61. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -0
  62. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +2 -2
  63. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
  64. package/dist/v2/blocks/scalar-auth-selector-block/index.js +4 -6
  65. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  66. package/dist/v2/features/app/App.vue.js +51 -42
  67. package/dist/v2/features/app/app-state.d.ts +1 -1
  68. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  69. package/dist/v2/features/app/app-state.js +40 -38
  70. package/dist/v2/features/app/helpers/routes.d.ts +1 -1
  71. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  72. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  73. package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
  74. package/dist/v2/features/collection/components/Authentication.vue2.js +14 -11
  75. package/dist/v2/features/import-listener/helpers/import-document-to-workspace.d.ts.map +1 -1
  76. package/dist/v2/features/import-listener/helpers/import-document-to-workspace.js +3 -1
  77. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  78. package/dist/v2/features/modal/Modal.vue.js +1 -1
  79. package/dist/v2/features/modal/Modal.vue2.js +14 -12
  80. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  81. package/dist/v2/features/operation/Operation.vue.js +44 -35
  82. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +3 -5
  83. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
  84. package/dist/v2/workspace-events.d.ts.map +1 -1
  85. package/dist/v2/workspace-events.js +116 -109
  86. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  87. package/package.json +17 -17
  88. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts +0 -2
  89. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts.map +0 -1
  90. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts +0 -8
  91. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts.map +0 -1
  92. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.js +0 -33
  93. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts +0 -7
  94. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts.map +0 -1
  95. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.js +0 -13
@@ -1,15 +1,15 @@
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
- import { getCustomCodeSamples as O } from "../../operation-code-sample/helpers/get-custom-code-samples.js";
7
- import { getSecrets as z } from "../../operation-code-sample/helpers/get-secrets.js";
1
+ import { defineComponent as g, computed as s, ref as S, watch as x, withDirectives as b, createBlock as y, openBlock as w, unref as l, withCtx as o, createVNode as n, createElementVNode as u, createTextVNode as m, toDisplayString as k, normalizeClass as B, vShow as V } from "vue";
2
+ import { ScalarErrorBoundary as D, ScalarCodeBlock as T, ScalarCombobox as E, ScalarButton as N } from "@scalar/components";
3
+ import { ScalarIconCaretDown as O } from "@scalar/icons";
4
+ import { generateCodeSnippet as z } from "../../operation-code-sample/helpers/generate-code-snippet.js";
5
+ import { getClients as I } from "../../operation-code-sample/helpers/get-clients.js";
6
+ import { getCustomCodeSamples as R } from "../../operation-code-sample/helpers/get-custom-code-samples.js";
7
+ import { getSecrets as W } from "../../operation-code-sample/helpers/get-secrets.js";
8
8
  import { findClient as f } from "../../operation-code-sample/helpers/find-client.js";
9
- import I from "../../../components/layout/CollapsibleSection.vue.js";
10
- import R from "../../../components/data-table/DataTable.vue.js";
11
- import W from "../../../components/data-table/DataTableRow.vue.js";
12
- const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__PURE__ */ h({
9
+ import $ from "../../../components/layout/CollapsibleSection.vue.js";
10
+ import q from "../../../components/data-table/DataTable.vue.js";
11
+ import F from "../../../components/data-table/DataTableRow.vue.js";
12
+ const H = { class: "flex flex-1" }, L = { class: "overflow-hidden" }, Z = /* @__PURE__ */ g({
13
13
  __name: "RequestCodeSnippet",
14
14
  props: {
15
15
  integration: {},
@@ -29,22 +29,22 @@ const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__
29
29
  globalCookies: {}
30
30
  },
31
31
  setup(e) {
32
- const d = s(() => O(e.operation)), c = s(
33
- () => N(d.value, e.clientOptions)
34
- ), i = g(
32
+ const d = s(() => R(e.operation)), c = s(
33
+ () => I(d.value, e.clientOptions)
34
+ ), i = S(
35
35
  f(c.value, e.selectedClient)
36
36
  );
37
- S(
37
+ x(
38
38
  () => e.selectedClient,
39
- (a) => {
40
- const o = f(c.value, a);
41
- o && (i.value = o);
39
+ (t) => {
40
+ const a = f(c.value, t);
41
+ a && (i.value = a);
42
42
  }
43
43
  );
44
- const p = s(() => z(e.securitySchemes ?? [])), C = (a) => {
45
- i.value = a, a && !a.id.startsWith("custom") && e.eventBus.emit("workspace:update:selected-client", a.id);
44
+ const p = s(() => W(e.securitySchemes ?? [])), C = (t) => {
45
+ i.value = t, t && !t.id.startsWith("custom") && e.eventBus.emit("workspace:update:selected-client", t.id);
46
46
  }, v = s(
47
- () => E({
47
+ () => z({
48
48
  clientId: i.value?.id,
49
49
  customCodeSamples: d.value,
50
50
  operation: e.operation,
@@ -57,32 +57,34 @@ const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__
57
57
  globalCookies: e.globalCookies,
58
58
  includeDefaultHeaders: e.integration === "client"
59
59
  })
60
+ ), h = s(
61
+ () => c.value.some((t) => t.options.length > 0)
60
62
  );
61
- return (a, o) => (b(), x(t(I), {
63
+ return (t, a) => b((w(), y(l($), {
62
64
  class: "group/preview w-full border-t",
63
65
  defaultOpen: !1
64
66
  }, {
65
- title: l(() => [...o[1] || (o[1] = [
66
- u("Code Snippet", -1)
67
+ title: o(() => [...a[1] || (a[1] = [
68
+ m("Code Snippet", -1)
67
69
  ])]),
68
- actions: l(() => [
69
- m("div", $, [
70
- n(t(V), {
70
+ actions: o(() => [
71
+ u("div", H, [
72
+ n(l(E), {
71
73
  modelValue: i.value,
72
74
  options: c.value,
73
75
  placement: "bottom-end",
74
- "onUpdate:modelValue": o[0] || (o[0] = (r) => C(r))
76
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => C(r))
75
77
  }, {
76
- default: l(({ open: r }) => [
77
- n(t(T), {
78
+ default: o(({ open: r }) => [
79
+ n(l(N), {
78
80
  class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5 py-0 text-base font-normal",
79
81
  "data-testid": "client-picker",
80
82
  variant: "ghost"
81
83
  }, {
82
- default: l(() => [
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"]),
84
+ default: o(() => [
85
+ m(k(i.value?.title) + " ", 1),
86
+ n(l(O), {
87
+ class: B(["mt-0.25 size-3 transition-transform duration-100", r && "rotate-180"]),
86
88
  weight: "bold"
87
89
  }, null, 8, ["class"])
88
90
  ]),
@@ -93,18 +95,18 @@ const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__
93
95
  }, 8, ["modelValue", "options"])
94
96
  ])
95
97
  ]),
96
- default: l(() => [
97
- n(t(w), null, {
98
- default: l(() => [
99
- n(t(R), {
98
+ default: o(() => [
99
+ n(l(D), null, {
100
+ default: o(() => [
101
+ n(l(q), {
100
102
  columns: [""],
101
103
  presentational: ""
102
104
  }, {
103
- default: l(() => [
104
- n(t(W), null, {
105
- default: l(() => [
106
- m("div", q, [
107
- n(t(B), {
105
+ default: o(() => [
106
+ n(l(F), null, {
107
+ default: o(() => [
108
+ u("div", L, [
109
+ n(l(T), {
108
110
  class: "text-base -outline-offset-2",
109
111
  content: v.value,
110
112
  hideCredentials: p.value,
@@ -123,9 +125,11 @@ const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__
123
125
  })
124
126
  ]),
125
127
  _: 1
126
- }));
128
+ }, 512)), [
129
+ [V, h.value]
130
+ ]);
127
131
  }
128
132
  });
129
133
  export {
130
- Q as default
134
+ Z as default
131
135
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAyRA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,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;IACtB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,eAAe,CAAA;CACpC,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;;;AAghBtE,wBAOG"}
1
+ {"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAiTA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,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;IACtB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,eAAe,CAAA;CACpC,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;;;AAsiBtE,wBAOG"}
@@ -1,18 +1,19 @@
1
- import { defineComponent as q, ref as x, watch as y, computed as o, createBlock as m, openBlock as d, unref as t, normalizeClass as E, withCtx as s, createVNode as u, createCommentVNode as f, createElementBlock as R, Fragment as N, createElementVNode as h, toDisplayString as P } from "vue";
1
+ import { defineComponent as q, ref as x, watch as g, computed as o, createBlock as s, openBlock as d, unref as n, normalizeClass as E, withCtx as m, createVNode as u, createCommentVNode as f, createElementBlock as R, Fragment as N, createElementVNode as h, toDisplayString as P } from "vue";
2
2
  import { ScalarButton as C, ScalarIconButton as j, ScalarIcon as G } from "@scalar/components";
3
3
  import { ScalarIconTrash as K, ScalarIconGlobe as O } from "@scalar/icons";
4
4
  import { unpackProxyObject as B } from "@scalar/workspace-store/helpers/unpack-proxy";
5
- import { getFileName as W } from "../helpers/files.js";
6
- import { validateParameter as A } from "../helpers/validate-parameter.js";
5
+ import { resolve as W } from "@scalar/workspace-store/resolve";
6
+ import { getFileName as A } from "../helpers/files.js";
7
+ import { validateParameter as H } from "../helpers/validate-parameter.js";
7
8
  import D from "./RequestTableTooltip.vue.js";
8
- import H from "../../../components/data-table/DataTableRow.vue.js";
9
- import J from "../../../components/data-table/DataTableCheckbox.vue.js";
10
- import g from "../../../components/data-table/DataTableCell.vue.js";
11
- import F from "../../../components/code-input/CodeInput.vue.js";
12
- const L = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center justify-center overflow-hidden p-1" }, M = {
9
+ import J from "../../../components/data-table/DataTableRow.vue.js";
10
+ import L from "../../../components/data-table/DataTableCheckbox.vue.js";
11
+ import y from "../../../components/data-table/DataTableCell.vue.js";
12
+ import S from "../../../components/code-input/CodeInput.vue.js";
13
+ const M = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center justify-center overflow-hidden p-1" }, Q = {
13
14
  key: 1,
14
15
  class: "p-0.5"
15
- }, ne = /* @__PURE__ */ q({
16
+ }, de = /* @__PURE__ */ q({
16
17
  __name: "RequestTableRow",
17
18
  props: {
18
19
  data: {},
@@ -23,52 +24,63 @@ const L = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
23
24
  showUploadButton: { type: Boolean }
24
25
  },
25
26
  emits: ["upsertRow", "deleteRow", "uploadFile", "removeFile", "navigate"],
26
- setup(e, { emit: S }) {
27
- const r = S, c = x(e.data.name ?? ""), n = x(B(e.data.value) ?? ""), v = x(e.data.isDisabled ?? !1);
28
- y(
27
+ setup(e, { emit: F }) {
28
+ const r = F, c = x(e.data.name ?? ""), i = x(B(e.data.value) ?? ""), v = x(e.data.isDisabled ?? !1);
29
+ g(
29
30
  () => e.data.name,
30
- (i) => c.value = i ?? ""
31
- ), y(
31
+ (t) => c.value = t ?? ""
32
+ ), g(
32
33
  () => e.data.value,
33
- (i) => n.value = B(i) ?? ""
34
- ), y(
34
+ (t) => i.value = B(t) ?? ""
35
+ ), g(
35
36
  () => e.data.isDisabled,
36
- (i) => v.value = i ?? !1
37
+ (t) => v.value = t ?? !1
37
38
  );
38
- const k = o(() => n.value instanceof File), w = o(
39
- () => (k.value ? W(n.value) : n.value) ?? ""
40
- ), z = o(() => e.data.schema?.default), I = o(() => e.data.schema?.enum), T = o(
39
+ const k = o(() => i.value instanceof File), w = o(
40
+ () => (k.value ? A(i.value) : i.value) ?? ""
41
+ ), z = o(() => e.data.schema?.default), I = o(() => {
42
+ if (!e.data.schema)
43
+ return [];
44
+ if (e.data.schema.enum)
45
+ return e.data.schema.enum.map((t) => String(t));
46
+ if ("items" in e.data.schema) {
47
+ const t = W.schema(e.data.schema.items);
48
+ if (t?.enum)
49
+ return t.enum.map((a) => String(a));
50
+ }
51
+ return [];
52
+ }), T = o(
41
53
  () => e.data.schema && "minimum" in e.data.schema ? e.data.schema.minimum : void 0
42
54
  ), $ = o(
43
55
  () => e.data.schema && "maximum" in e.data.schema ? e.data.schema.maximum : void 0
44
56
  ), U = o(
45
57
  () => e.data.schema && "type" in e.data.schema ? e.data.schema.type : void 0
46
58
  ), V = o(
47
- () => A(e.data.schema, n.value)
48
- ), b = (i) => {
49
- i.name !== void 0 && (c.value = i.name), i.value !== void 0 && (n.value = i.value), v.value = i.isDisabled ?? !1, r("upsertRow", {
59
+ () => H(e.data.schema, i.value)
60
+ ), b = (t) => {
61
+ t.name !== void 0 && (c.value = t.name), t.value !== void 0 && (i.value = t.value), v.value = t.isDisabled ?? !1, r("upsertRow", {
50
62
  name: c.value,
51
- value: n.value,
63
+ value: i.value,
52
64
  isDisabled: v.value
53
65
  });
54
66
  };
55
- return (i, a) => (d(), m(t(H), {
67
+ return (t, a) => (d(), s(n(J), {
56
68
  id: e.data.name,
57
69
  class: E({
58
70
  alert: V.value.ok === !1,
59
71
  error: V.value.ok === !1 && e.invalidParams?.has(e.data.name)
60
72
  })
61
73
  }, {
62
- default: s(() => [
63
- u(t(J), {
74
+ default: m(() => [
75
+ u(n(L), {
64
76
  class: "!border-r",
65
77
  disabled: e.hasCheckboxDisabled ?? !1,
66
78
  modelValue: !v.value,
67
79
  "onUpdate:modelValue": a[0] || (a[0] = (l) => b({ isDisabled: !l }))
68
80
  }, null, 8, ["disabled", "modelValue"]),
69
- u(t(g), null, {
70
- default: s(() => [
71
- u(t(F), {
81
+ u(n(y), null, {
82
+ default: m(() => [
83
+ u(n(S), {
72
84
  "aria-label": `${e.label} Key`,
73
85
  disableCloseBrackets: "",
74
86
  disabled: e.data.isReadonly,
@@ -85,9 +97,9 @@ const L = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
85
97
  ]),
86
98
  _: 1
87
99
  }),
88
- u(t(g), null, {
89
- default: s(() => [
90
- u(t(F), {
100
+ u(n(y), null, {
101
+ default: m(() => [
102
+ u(n(S), {
91
103
  "aria-label": `${e.label} Value`,
92
104
  class: "pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10",
93
105
  default: z.value,
@@ -95,7 +107,7 @@ const L = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
95
107
  disabled: e.data.isReadonly,
96
108
  disableEnter: "",
97
109
  disableTabIndent: "",
98
- enum: I.value ?? [],
110
+ enum: I.value,
99
111
  environment: e.environment,
100
112
  examples: e.data.schema?.examples?.map((l) => String(l)) ?? [],
101
113
  linethrough: e.data.isOverridden,
@@ -107,38 +119,38 @@ const L = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
107
119
  type: U.value,
108
120
  "onUpdate:modelValue": a[5] || (a[5] = (l) => b({ value: l }))
109
121
  }, {
110
- icon: s(() => [
111
- (e.data.name || n.value) && !e.data.isRequired && e.data.isReadonly !== !0 ? (d(), m(t(C), {
122
+ icon: m(() => [
123
+ (e.data.name || i.value) && !e.data.isRequired && e.data.isReadonly !== !0 ? (d(), s(n(C), {
112
124
  key: 0,
113
125
  class: "text-c-2 hover:text-c-1 hover:bg-b-2 z-context -mr-0.5 hidden h-fit rounded p-1 group-hover:flex group-has-[.cm-focused]:flex",
114
126
  size: "sm",
115
127
  variant: "ghost",
116
128
  onClick: a[3] || (a[3] = (l) => r("deleteRow"))
117
129
  }, {
118
- default: s(() => [
119
- u(t(K), { class: "size-3.5" })
130
+ default: m(() => [
131
+ u(n(K), { class: "size-3.5" })
120
132
  ]),
121
133
  _: 1
122
134
  })) : f("", !0),
123
- e.data.globalRoute !== void 0 ? (d(), m(t(j), {
135
+ e.data.globalRoute !== void 0 ? (d(), s(n(j), {
124
136
  key: 1,
125
137
  class: "text-c-2 hover:text-c-1 hover:bg-b-2 z-context -mr-0.5 h-fit",
126
- icon: t(O),
138
+ icon: n(O),
127
139
  label: "Global cookies are shared across the whole workspace. Click to navigate.",
128
140
  size: "xs",
129
141
  tooltip: "top",
130
142
  variant: "ghost",
131
143
  onClick: a[4] || (a[4] = (l) => r("navigate", e.data.globalRoute))
132
144
  }, null, 8, ["icon"])) : f("", !0),
133
- e.data.isReadonly ? (d(), m(D, {
145
+ e.data.isReadonly ? (d(), s(D, {
134
146
  key: 2,
135
147
  description: "This is a readonly property and you can not modify it! If you want to change it you have to override it or disable it using the checkbox",
136
148
  value: null
137
- })) : e.data.schema ? (d(), m(D, {
149
+ })) : e.data.schema ? (d(), s(D, {
138
150
  key: 3,
139
151
  description: e.data.description,
140
152
  schema: e.data.schema,
141
- value: n.value
153
+ value: i.value
142
154
  }, null, 8, ["description", "schema", "value"])) : f("", !0)
143
155
  ]),
144
156
  _: 1
@@ -146,13 +158,13 @@ const L = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
146
158
  ]),
147
159
  _: 1
148
160
  }),
149
- e.showUploadButton ? (d(), m(t(g), {
161
+ e.showUploadButton ? (d(), s(n(y), {
150
162
  key: 0,
151
163
  class: "group/upload flex items-center justify-center whitespace-nowrap"
152
164
  }, {
153
- default: s(() => [
165
+ default: m(() => [
154
166
  k.value ? (d(), R(N, { key: 0 }, [
155
- h("div", L, [
167
+ h("div", M, [
156
168
  h("span", null, P(w.value), 1)
157
169
  ]),
158
170
  h("button", {
@@ -160,16 +172,16 @@ const L = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
160
172
  type: "button",
161
173
  onClick: a[6] || (a[6] = (l) => r("removeFile"))
162
174
  }, " Delete ")
163
- ], 64)) : (d(), R("div", M, [
164
- u(t(C), {
175
+ ], 64)) : (d(), R("div", Q, [
176
+ u(n(C), {
165
177
  class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
166
178
  size: "sm",
167
179
  variant: "outlined",
168
180
  onClick: a[7] || (a[7] = (l) => r("uploadFile"))
169
181
  }, {
170
- default: s(() => [
182
+ default: m(() => [
171
183
  a[8] || (a[8] = h("span", null, "Select File", -1)),
172
- u(t(G), {
184
+ u(n(G), {
173
185
  class: "ml-1",
174
186
  icon: "Upload",
175
187
  size: "xs",
@@ -188,5 +200,5 @@ const L = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
188
200
  }
189
201
  });
190
202
  export {
191
- ne as default
203
+ de as default
192
204
  };
@@ -1,7 +1,7 @@
1
1
  import { canMethodHaveBody as p } from "@scalar/helpers/http/can-method-have-body";
2
2
  import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
3
  import { isElectron as u } from "../../../../libs/electron.js";
4
- const i = "2.23.0", m = "application/json", h = "*/*", c = (r, t, o) => ({
4
+ const i = "2.23.3", m = "application/json", h = "*/*", c = (r, t, o) => ({
5
5
  name: r,
6
6
  defaultValue: t,
7
7
  isOverridden: o.has(r.toLowerCase())
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-32d6d6ca"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8ae4f555"]]);
5
5
  export {
6
- a as default
6
+ s as default
7
7
  };
@@ -1,7 +1,9 @@
1
1
  import { type Icon } from '@scalar/components';
2
+ import type { SelectedSecurity } from '@scalar/workspace-store/entities/auth';
2
3
  import type { AuthMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
3
4
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
4
5
  import type { OpenApiDocument, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
6
+ import type { MergedSecuritySchemes } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/merge-security.js';
5
7
  import { type SecuritySchemeOption } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js';
6
8
  type __VLS_Props = {
7
9
  environment: XScalarEnvironment;
@@ -11,8 +13,8 @@ type __VLS_Props = {
11
13
  meta: AuthMeta;
12
14
  proxyUrl: string;
13
15
  securityRequirements: OpenApiDocument['security'];
14
- securitySchemes: NonNullable<OpenApiDocument['components']>['securitySchemes'];
15
- selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
16
+ securitySchemes: MergedSecuritySchemes;
17
+ selectedSecurity: SelectedSecurity | undefined;
16
18
  server: ServerObject | null;
17
19
  title: string;
18
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAiTA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;;cA8BqC,IAAI;cAAQ,MAAM;;;;;AA4bzD,wBAOG"}
1
+ {"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAmTA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAA;AAC1G,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,qBAAqB,CAAA;IACtC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC9C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;;cA8BqC,IAAI;cAAQ,MAAM;;;;;AA4bzD,wBAOG"}