@scalar/api-client 2.34.1 → 2.36.1

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 (68) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  3. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
  4. package/dist/style.css +1 -1
  5. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  6. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +88 -80
  7. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  8. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +28 -27
  9. package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +6 -4
  10. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.d.ts +16 -0
  11. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.d.ts.map +1 -0
  12. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +17 -0
  13. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
  14. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +90 -84
  15. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  16. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +47 -42
  17. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  18. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
  19. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +76 -50
  20. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  21. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +65 -59
  22. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  23. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +57 -42
  24. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  25. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +44 -41
  26. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +2 -2
  27. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
  28. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  29. package/dist/v2/components/sidebar/Sidebar.vue.js +50 -44
  30. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  31. package/dist/v2/features/app/App.vue.js +41 -35
  32. package/dist/v2/features/app/app-events.d.ts +5 -2
  33. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  34. package/dist/v2/features/app/app-events.js +58 -44
  35. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  36. package/dist/v2/features/app/app-state.js +82 -80
  37. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  38. package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
  39. package/dist/v2/features/app/components/AppSidebar.vue2.js +78 -76
  40. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  41. package/dist/v2/features/app/components/DesktopTabs.vue.js +34 -30
  42. package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
  43. package/dist/v2/features/app/components/SidebarItemMenu.vue.js +73 -45
  44. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  45. package/dist/v2/features/collection/DocumentCollection.vue.js +20 -20
  46. package/dist/v2/features/collection/OperationCollection.vue.d.ts.map +1 -1
  47. package/dist/v2/features/collection/OperationCollection.vue.js +7 -7
  48. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
  49. package/dist/v2/features/collection/WorkspaceCollection.vue.js +5 -4
  50. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  51. package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
  52. package/dist/v2/features/collection/components/Authentication.vue2.js +84 -66
  53. package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
  54. package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
  55. package/dist/v2/features/collection/components/LabelInput.vue2.js +1 -1
  56. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +5 -0
  57. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
  58. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +131 -96
  59. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +25 -0
  60. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  61. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +42 -36
  62. package/dist/v2/features/operation/Operation.vue.js +1 -1
  63. package/dist/v2/workspace-events.d.ts.map +1 -1
  64. package/dist/v2/workspace-events.js +8 -5
  65. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
  66. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +44 -45
  67. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  68. package/package.json +19 -19
@@ -1,73 +1,88 @@
1
- import { isObject as u } from "@scalar/helpers/object/is-object";
2
- import { objectEntries as p } from "@scalar/helpers/object/object-entries";
1
+ import { isObject as p } from "@scalar/helpers/object/is-object";
2
+ import { objectEntries as u } from "@scalar/helpers/object/object-entries";
3
3
  const f = {
4
4
  "x-scalar-secret-client-id": "x-scalar-client-id",
5
5
  "x-scalar-secret-client-secret": "clientSecret",
6
6
  "x-scalar-secret-password": "password",
7
7
  "x-scalar-secret-redirect-uri": "x-scalar-redirect-uri",
8
8
  "x-scalar-secret-token": "token",
9
- "x-scalar-secret-username": "username"
10
- }, n = (t, s, i = {}) => Object.fromEntries(
11
- t.map((a) => {
12
- const r = i[a] || s[a] || s[f[a]] || "";
13
- return [a, r];
9
+ "x-scalar-secret-username": "username",
10
+ "x-scalar-secret-auth-url": "authorizationUrl",
11
+ "x-scalar-secret-token-url": "tokenUrl"
12
+ }, i = (t, s, n = {}) => Object.fromEntries(
13
+ t.map((c) => {
14
+ const r = n[c] || s[c] || s[f[c]] || "";
15
+ return [c, r];
14
16
  })
15
- ), o = (t = {}) => {
17
+ ), l = (t = {}) => {
16
18
  const s = t["x-scalar-secret-refresh-token"];
17
19
  return typeof s == "string" ? { "x-scalar-secret-refresh-token": s } : {};
18
20
  }, x = (t, s) => {
19
- const i = /* @__PURE__ */ new Set();
20
- return { flows: p(t ?? {}).reduce((r, [e, c]) => {
21
- if (!u(c))
21
+ const n = /* @__PURE__ */ new Set();
22
+ return { flows: u(t ?? {}).reduce((r, [e, a]) => {
23
+ if (!p(a))
22
24
  return r;
23
- const l = c.selectedScopes;
24
- return Array.isArray(l) && l.forEach((d) => typeof d == "string" && i.add(d)), e === "implicit" && (r.implicit = {
25
- ...c,
26
- ...n(
27
- ["x-scalar-secret-client-id", "x-scalar-secret-redirect-uri", "x-scalar-secret-token"],
28
- c,
25
+ const o = a.selectedScopes;
26
+ return Array.isArray(o) && o.forEach((d) => typeof d == "string" && n.add(d)), e === "implicit" && (r.implicit = {
27
+ ...a,
28
+ ...i(
29
+ [
30
+ "x-scalar-secret-client-id",
31
+ "x-scalar-secret-redirect-uri",
32
+ "x-scalar-secret-token",
33
+ "x-scalar-secret-auth-url"
34
+ ],
35
+ a,
29
36
  s?.implicit
30
37
  ),
31
- ...o(s?.implicit)
38
+ ...l(s?.implicit)
32
39
  }), e === "password" && (r[e] = {
33
- ...c,
34
- ...n(
40
+ ...a,
41
+ ...i(
35
42
  [
36
43
  "x-scalar-secret-client-id",
37
44
  "x-scalar-secret-client-secret",
38
45
  "x-scalar-secret-username",
39
46
  "x-scalar-secret-password",
40
- "x-scalar-secret-token"
47
+ "x-scalar-secret-token",
48
+ "x-scalar-secret-token-url"
41
49
  ],
42
- c,
50
+ a,
43
51
  s?.password
44
52
  ),
45
- ...o(s?.password)
53
+ ...l(s?.password)
46
54
  }), e === "clientCredentials" && (r[e] = {
47
- ...c,
48
- ...n(
49
- ["x-scalar-secret-client-id", "x-scalar-secret-client-secret", "x-scalar-secret-token"],
50
- c,
55
+ ...a,
56
+ ...i(
57
+ [
58
+ "x-scalar-secret-client-id",
59
+ "x-scalar-secret-client-secret",
60
+ "x-scalar-secret-token",
61
+ "x-scalar-secret-token-url"
62
+ ],
63
+ a,
51
64
  s?.clientCredentials
52
65
  ),
53
- ...o(s?.clientCredentials)
66
+ ...l(s?.clientCredentials)
54
67
  }), e === "authorizationCode" && (r[e] = {
55
- ...c,
56
- ...n(
68
+ ...a,
69
+ ...i(
57
70
  [
58
71
  "x-scalar-secret-client-id",
59
72
  "x-scalar-secret-client-secret",
60
73
  "x-scalar-secret-redirect-uri",
61
- "x-scalar-secret-token"
74
+ "x-scalar-secret-token",
75
+ "x-scalar-secret-auth-url",
76
+ "x-scalar-secret-token-url"
62
77
  ],
63
- c,
78
+ a,
64
79
  s?.authorizationCode
65
80
  ),
66
- ...o(s?.authorizationCode)
81
+ ...l(s?.authorizationCode)
67
82
  }), r;
68
- }, {}), selectedScopes: Array.from(i) };
69
- }, S = (t, s, i, a) => {
70
- const r = s.getAuthSecrets(a, i);
83
+ }, {}), selectedScopes: Array.from(n) };
84
+ }, C = (t, s, n, c) => {
85
+ const r = s.getAuthSecrets(c, n);
71
86
  if (t.type === "apiKey") {
72
87
  const e = r?.type === "apiKey" ? r : void 0;
73
88
  return {
@@ -85,15 +100,15 @@ const f = {
85
100
  };
86
101
  }
87
102
  if (t.type === "oauth2") {
88
- const e = r?.type === "oauth2" ? r : void 0, c = x(t.flows, e);
103
+ const e = r?.type === "oauth2" ? r : void 0, a = x(t.flows, e);
89
104
  return {
90
105
  ...t,
91
- flows: c.flows,
92
- "x-default-scopes": c.selectedScopes
106
+ flows: a.flows,
107
+ "x-default-scopes": a.selectedScopes
93
108
  };
94
109
  }
95
110
  if (t.type === "openIdConnect") {
96
- const e = r?.type === "openIdConnect" ? r : void 0, c = x(
111
+ const e = r?.type === "openIdConnect" ? r : void 0, a = x(
97
112
  {
98
113
  implicit: e?.implicit,
99
114
  password: e?.password,
@@ -104,11 +119,11 @@ const f = {
104
119
  );
105
120
  return {
106
121
  ...t,
107
- ...p(c.flows).length ? { flows: c.flows } : {}
122
+ ...u(a.flows).length ? { flows: a.flows } : {}
108
123
  };
109
124
  }
110
125
  return t;
111
126
  };
112
127
  export {
113
- S as extractSecuritySchemeSecrets
128
+ C as extractSecuritySchemeSecrets
114
129
  };
@@ -1 +1 @@
1
- {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6DAA6D,CAAA;AAYzG,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAqDD;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,sBAAsB,EAC7B,MAAM,MAAM,sBAAsB,EAClC,gBAAgB,MAAM,EAAE;AACxB,wEAAwE;AACxE,cAAc,YAAY,GAAG,IAAI;AACjC,kCAAkC;AAClC,UAAU,MAAM;AAChB,6FAA6F;AAC7F,uBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,KAChD,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAwLrC,CAAA"}
1
+ {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6DAA6D,CAAA;AAWzG,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAqDD;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,sBAAsB,EAC7B,MAAM,MAAM,sBAAsB,EAClC,gBAAgB,MAAM,EAAE;AACxB,wEAAwE;AACxE,cAAc,YAAY,GAAG,IAAI;AACjC,kCAAkC;AAClC,UAAU,MAAM;AAChB,6FAA6F;AAC7F,uBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,KAChD,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAwLrC,CAAA"}
@@ -33,52 +33,52 @@ const z = (t, e = {}) => {
33
33
  u,
34
34
  g
35
35
  );
36
- const s = (Math.random() + 1).toString(36).substring(2, 10), n = A(
37
- t[e].authorizationUrl,
36
+ const r = (Math.random() + 1).toString(36).substring(2, 10), a = A(
37
+ t[e]["x-scalar-secret-auth-url"] ?? t[e].authorizationUrl,
38
38
  z(u, g)
39
- ), a = new URL(n);
39
+ ), n = new URL(a);
40
40
  let c = null;
41
41
  if (e === "implicit")
42
- a.searchParams.set("response_type", "token");
42
+ n.searchParams.set("response_type", "token");
43
43
  else if (e === "authorizationCode") {
44
- const r = t[e];
45
- if (a.searchParams.set("response_type", "code"), r["x-usePkce"] !== "no") {
46
- const o = $(), d = await L(o, r["x-usePkce"]);
44
+ const s = t[e];
45
+ if (n.searchParams.set("response_type", "code"), s["x-usePkce"] !== "no") {
46
+ const o = $(), d = await L(o, s["x-usePkce"]);
47
47
  c = {
48
48
  codeVerifier: o,
49
49
  codeChallenge: d,
50
- codeChallengeMethod: r["x-usePkce"] === "SHA-256" ? "S256" : "plain"
51
- }, a.searchParams.set("code_challenge", d), a.searchParams.set("code_challenge_method", c.codeChallengeMethod);
50
+ codeChallengeMethod: s["x-usePkce"] === "SHA-256" ? "S256" : "plain"
51
+ }, n.searchParams.set("code_challenge", d), n.searchParams.set("code_challenge_method", c.codeChallengeMethod);
52
52
  }
53
53
  }
54
54
  const l = t[e];
55
55
  if (l["x-scalar-secret-redirect-uri"].startsWith("/")) {
56
- const r = b(u, g) || window.location.origin + window.location.pathname, o = new URL(l["x-scalar-secret-redirect-uri"], r).toString();
57
- a.searchParams.set("redirect_uri", o);
56
+ const s = b(u, g) || window.location.origin + window.location.pathname, o = new URL(l["x-scalar-secret-redirect-uri"], s).toString();
57
+ n.searchParams.set("redirect_uri", o);
58
58
  } else
59
- a.searchParams.set("redirect_uri", l["x-scalar-secret-redirect-uri"]);
60
- f["x-scalar-security-query"] && Object.keys(f["x-scalar-security-query"]).forEach((r) => {
61
- const o = f["x-scalar-security-query"]?.[r];
62
- o && a.searchParams.set(r, o);
63
- }), a.searchParams.set("client_id", f["x-scalar-secret-client-id"]), a.searchParams.set("state", s), p && a.searchParams.set("scope", p);
64
- const w = window.open(a, "openAuth2Window", "left=100,top=100,width=800,height=600");
65
- return w ? new Promise((r) => {
59
+ n.searchParams.set("redirect_uri", l["x-scalar-secret-redirect-uri"]);
60
+ f["x-scalar-security-query"] && Object.keys(f["x-scalar-security-query"]).forEach((s) => {
61
+ const o = f["x-scalar-security-query"]?.[s];
62
+ o && n.searchParams.set(s, o);
63
+ }), n.searchParams.set("client_id", f["x-scalar-secret-client-id"]), n.searchParams.set("state", r), p && n.searchParams.set("scope", p);
64
+ const w = window.open(n, "openAuth2Window", "left=100,top=100,width=800,height=600");
65
+ return w ? new Promise((s) => {
66
66
  const o = setInterval(() => {
67
- let d = null, _ = null, x = null, P = null, k = null;
67
+ let d = null, _ = null, x = null, P = null, y = null;
68
68
  try {
69
69
  const h = new URL(w.location.href).searchParams, S = f["x-tokenName"] || "access_token";
70
- d = h.get(S), _ = h.get("refresh_token"), x = h.get("code"), P = h.get("error"), k = h.get("error_description");
71
- const y = new URLSearchParams(w.location.href.split("#")[1]);
72
- d ||= y.get(S), _ ||= y.get("refresh_token"), x ||= y.get("code"), P ||= y.get("error"), k ||= y.get("error_description");
70
+ d = h.get(S), _ = h.get("refresh_token"), x = h.get("code"), P = h.get("error"), y = h.get("error_description");
71
+ const k = new URLSearchParams(w.location.href.split("#")[1]);
72
+ d ||= k.get(S), _ ||= k.get("refresh_token"), x ||= k.get("code"), P ||= k.get("error"), y ||= k.get("error_description");
73
73
  } catch {
74
74
  }
75
75
  if (w.closed || d || x || P)
76
76
  if (clearInterval(o), w.close(), P)
77
- r([new Error(`OAuth error: ${P}${k ? ` (${k})` : ""}`), null]);
77
+ s([new Error(`OAuth error: ${P}${y ? ` (${y})` : ""}`), null]);
78
78
  else if (d) {
79
79
  const h = w.location.href.match(/state=([^&]*)/)?.[1];
80
- r(h === s ? [null, { accessToken: d, ..._ ? { refreshToken: _ } : {} }] : [new Error("State mismatch"), null]);
81
- } else x && e === "authorizationCode" ? new URL(w.location.href).searchParams.get("state") === s ? C(
80
+ s(h === r ? [null, { accessToken: d, ..._ ? { refreshToken: _ } : {} }] : [new Error("State mismatch"), null]);
81
+ } else x && e === "authorizationCode" ? new URL(w.location.href).searchParams.get("state") === r ? C(
82
82
  t,
83
83
  e,
84
84
  p,
@@ -89,7 +89,7 @@ const z = (t, e = {}) => {
89
89
  },
90
90
  u,
91
91
  g
92
- ).then(r) : r([new Error("State mismatch"), null]) : (clearInterval(o), r([new Error("Window was closed without granting authorization"), null]));
92
+ ).then(s) : s([new Error("State mismatch"), null]) : (clearInterval(o), s([new Error("Window was closed without granting authorization"), null]));
93
93
  }, 200);
94
94
  }) : [new Error("Failed to open auth window"), null];
95
95
  } catch {
@@ -100,32 +100,35 @@ const z = (t, e = {}) => {
100
100
  pkce: m,
101
101
  proxyUrl: g
102
102
  } = {}, f, p = {}) => {
103
- const s = t[e];
104
- if (!s)
103
+ const r = t[e];
104
+ if (!r)
105
105
  return [new Error("OAuth2 flow was not defined"), null];
106
- const n = new URLSearchParams();
107
- i && (e === "clientCredentials" || e === "password") && n.set("scope", i);
108
- const a = s["x-scalar-credentials-location"] === "body";
109
- if (a && (n.set("client_id", s["x-scalar-secret-client-id"]), n.set("client_secret", s["x-scalar-secret-client-secret"])), "x-scalar-secret-redirect-uri" in s && s["x-scalar-secret-redirect-uri"] && n.set("redirect_uri", s["x-scalar-secret-redirect-uri"]), u)
110
- n.set("code", u), n.set("grant_type", "authorization_code"), m && n.set("code_verifier", m.codeVerifier);
106
+ const a = new URLSearchParams();
107
+ i && (e === "clientCredentials" || e === "password") && a.set("scope", i);
108
+ const n = r["x-scalar-credentials-location"] === "body";
109
+ if (n && (a.set("client_id", r["x-scalar-secret-client-id"]), a.set("client_secret", r["x-scalar-secret-client-secret"])), "x-scalar-secret-redirect-uri" in r && r["x-scalar-secret-redirect-uri"] && a.set("redirect_uri", r["x-scalar-secret-redirect-uri"]), u)
110
+ a.set("code", u), a.set("grant_type", "authorization_code"), m && a.set("code_verifier", m.codeVerifier);
111
111
  else if (e === "password") {
112
112
  const c = t[e];
113
- n.set("grant_type", "password"), n.set("username", c["x-scalar-secret-username"]), n.set("password", c["x-scalar-secret-password"]);
113
+ a.set("grant_type", "password"), a.set("username", c["x-scalar-secret-username"]), a.set("password", c["x-scalar-secret-password"]);
114
114
  } else
115
- n.set("grant_type", "client_credentials");
116
- s["x-scalar-security-body"] && Object.entries(s["x-scalar-security-body"]).forEach(([c, l]) => {
117
- l && n.set(c, String(l));
115
+ a.set("grant_type", "client_credentials");
116
+ r["x-scalar-security-body"] && Object.entries(r["x-scalar-security-body"]).forEach(([c, l]) => {
117
+ l && a.set(c, String(l));
118
118
  });
119
119
  try {
120
120
  const c = {
121
121
  "Content-Type": "application/x-www-form-urlencoded"
122
122
  };
123
- a || (c.Authorization = `Basic ${T(`${s["x-scalar-secret-client-id"]}:${s["x-scalar-secret-client-secret"]}`)}`);
124
- const l = A(s.tokenUrl, z(f, p)), U = R(g, l) ? `${g}?${new URLSearchParams([["scalar_url", l]]).toString()}` : l, r = await (await fetch(U, {
123
+ n || (c.Authorization = `Basic ${T(`${r["x-scalar-secret-client-id"]}:${r["x-scalar-secret-client-secret"]}`)}`);
124
+ const l = A(
125
+ r["x-scalar-secret-token-url"] ?? r.tokenUrl,
126
+ z(f, p)
127
+ ), U = R(g, l) ? `${g}?${new URLSearchParams([["scalar_url", l]]).toString()}` : l, s = await (await fetch(U, {
125
128
  method: "POST",
126
129
  headers: c,
127
- body: n
128
- })).json(), o = s["x-tokenName"] || "access_token", d = r[o], _ = r.refresh_token;
130
+ body: a
131
+ })).json(), o = r["x-tokenName"] || "access_token", d = s[o], _ = s.refresh_token;
129
132
  return [null, { accessToken: d, ...typeof _ == "string" ? { refreshToken: _ } : {} }];
130
133
  } catch {
131
134
  return [new Error("Failed to get an access token. Please check your credentials."), null];
@@ -1,7 +1,7 @@
1
- import type { XScalarSecretClientId, XScalarSecretClientSecret, XScalarSecretHTTP, XScalarSecretRedirectUri, XScalarSecretRefreshToken, XScalarSecretToken } from '@scalar/workspace-store/schemas/extensions/security';
1
+ import type { XScalarAuthUrl, XScalarSecretClientId, XScalarSecretClientSecret, XScalarSecretHTTP, XScalarSecretRedirectUri, XScalarSecretRefreshToken, XScalarSecretToken, XScalarTokenUrl } from '@scalar/workspace-store/schemas/extensions/security';
2
2
  import type { OAuthFlowAuthorizationCode, OAuthFlowClientCredentials, OAuthFlowImplicit, OAuthFlowPassword } from '@scalar/workspace-store/schemas/v3.1/strict/oauth-flow';
3
3
  import type { ApiKeyObject, HttpObject, OAuth2Object, OpenIdConnectObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
4
- type OAuthFlowCommonSecret = XScalarSecretClientId & XScalarSecretToken & XScalarSecretRefreshToken;
4
+ type OAuthFlowCommonSecret = XScalarSecretClientId & XScalarSecretToken & XScalarSecretRefreshToken & XScalarAuthUrl & XScalarTokenUrl;
5
5
  export type OAuthFlowImplicitSecret = OAuthFlowImplicit & OAuthFlowCommonSecret & XScalarSecretRedirectUri;
6
6
  export type OAuthFlowPasswordSecret = OAuthFlowPassword & OAuthFlowCommonSecret & XScalarSecretHTTP & XScalarSecretClientSecret;
7
7
  export type OAuthFlowClientCredentialsSecret = OAuthFlowClientCredentials & OAuthFlowCommonSecret & XScalarSecretClientSecret;
@@ -1 +1 @@
1
- {"version":3,"file":"secret-types.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/secret-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,wDAAwD,CAAA;AAC/D,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,mBAAmB,EACpB,MAAM,8DAA8D,CAAA;AAErE,KAAK,qBAAqB,GAAG,qBAAqB,GAAG,kBAAkB,GAAG,yBAAyB,CAAA;AAEnG,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,wBAAwB,CAAA;AAE1G,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GACrD,qBAAqB,GACrB,iBAAiB,GACjB,yBAAyB,CAAA;AAE3B,MAAM,MAAM,gCAAgC,GAAG,0BAA0B,GACvE,qBAAqB,GACrB,yBAAyB,CAAA;AAE3B,MAAM,MAAM,gCAAgC,GAAG,0BAA0B,GACvE,qBAAqB,GACrB,yBAAyB,GACzB,wBAAwB,CAAA;AAE1B,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,EAAE,uBAAuB,CAAA;IAClC,QAAQ,CAAC,EAAE,uBAAuB,CAAA;IAClC,iBAAiB,CAAC,EAAE,gCAAgC,CAAA;IACpD,iBAAiB,CAAC,EAAE,gCAAgC,CAAA;CACrD,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,kBAAkB,CAAA;AAClE,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,iBAAiB,GAAG,kBAAkB,CAAA;AAClF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,EAAE,sBAAsB,CAAA;CAAE,CAAA;AAChG,MAAM,MAAM,yBAAyB,GAAG,mBAAmB,GAAG;IAAE,KAAK,CAAC,EAAE,sBAAsB,CAAA;CAAE,CAAA;AAEhG,MAAM,MAAM,0BAA0B,GAClC,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,yBAAyB,CAAA"}
1
+ {"version":3,"file":"secret-types.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/secret-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,wDAAwD,CAAA;AAC/D,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,mBAAmB,EACpB,MAAM,8DAA8D,CAAA;AAErE,KAAK,qBAAqB,GAAG,qBAAqB,GAChD,kBAAkB,GAClB,yBAAyB,GACzB,cAAc,GACd,eAAe,CAAA;AAEjB,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,wBAAwB,CAAA;AAE1G,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GACrD,qBAAqB,GACrB,iBAAiB,GACjB,yBAAyB,CAAA;AAE3B,MAAM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;KAAE,GAAG,OAAO,CAAA;IACpD,mDAAmD;IACnD,MAAM,CAAC,IAAI,OAAO,CAAA;IAClB,yDAAyD;IACzD,KAAK,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAA;IAChD,oEAAoE;IACpE,kBAAkB,CAAC,IAAI,OAAO,CAAA;IAC9B,iDAAiD;IACjD,IAAI,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,cAAc,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAA;CAC/D,CAAC;AAiCF,KAAK,gBAAgB,GAAG;IACxB,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACtB,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAkSxD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,13 +1,13 @@
1
- import { defineComponent as V, mergeModels as S, useSlots as h, ref as B, useModel as M, computed as C, createBlock as u, openBlock as l, unref as r, withCtx as s, createVNode as y, createSlots as E, renderSlot as i, createElementBlock as g, createCommentVNode as m, Fragment as N, normalizeProps as f, guardReactiveProps as p, createElementVNode as w, isRef as R } from "vue";
2
- import { ScalarIconButton as z, ScalarSidebarSearchInput as F } from "@scalar/components";
3
- import { ScalarIconFileDashed as q, ScalarIconMagnifyingGlass as A } from "@scalar/icons";
4
- import { ScalarSidebar as U } from "@scalar/sidebar";
5
- import j from "./SidebarMenu.vue.js";
6
- import { useSearchIndex as G } from "../../features/search/hooks/use-search-index.js";
7
- import H from "../resize/Resize.vue.js";
8
- const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K = { class: "flex items-center justify-between" }, L = { key: 1 }, _ = /* @__PURE__ */ V({
1
+ import { defineComponent as V, mergeModels as g, useSlots as B, ref as C, useModel as M, computed as E, createBlock as u, openBlock as r, unref as l, withCtx as s, createVNode as y, createSlots as z, renderSlot as i, createElementBlock as w, createCommentVNode as c, Fragment as N, normalizeProps as f, guardReactiveProps as b, createElementVNode as p, normalizeClass as R, isRef as h } from "vue";
2
+ import { ScalarIconButton as F, ScalarSidebarSearchInput as q } from "@scalar/components";
3
+ import { ScalarIconFileDashed as A, ScalarIconMagnifyingGlass as U } from "@scalar/icons";
4
+ import { ScalarSidebar as j } from "@scalar/sidebar";
5
+ import G from "./SidebarMenu.vue.js";
6
+ import { useSearchIndex as H } from "../../features/search/hooks/use-search-index.js";
7
+ import J from "../resize/Resize.vue.js";
8
+ const K = { class: "flex items-center justify-between" }, L = { key: 1 }, _ = /* @__PURE__ */ V({
9
9
  __name: "Sidebar",
10
- props: /* @__PURE__ */ S({
10
+ props: /* @__PURE__ */ g({
11
11
  sidebarState: {},
12
12
  layout: {},
13
13
  activeWorkspace: {},
@@ -21,19 +21,19 @@ const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K =
21
21
  },
22
22
  sidebarWidthModifiers: {}
23
23
  }),
24
- emits: /* @__PURE__ */ S(["selectItem", "select:workspace", "create:workspace", "reorder", "navigate:to:settings"], ["update:sidebarWidth"]),
24
+ emits: /* @__PURE__ */ g(["selectItem", "select:workspace", "create:workspace", "reorder", "navigate:to:settings"], ["update:sidebarWidth"]),
25
25
  setup(a, { emit: x }) {
26
- const n = x, b = h(), d = B(!1), v = M(a, "sidebarWidth"), k = (o) => o.type === "example" && o.title === "draft", { query: c, results: $ } = G(() => a.documents), I = C(() => $.value ?? a.sidebarState.items.value), W = (o) => {
27
- n("selectItem", o), c.value = "", d.value = !1;
26
+ const n = x, v = B(), d = C(!1), k = M(a, "sidebarWidth"), S = (o) => o.type === "example" && o.title === "draft", { query: m, results: $ } = H(() => a.documents), I = E(() => $.value ?? a.sidebarState.items.value), W = (o) => {
27
+ n("selectItem", o), m.value = "", d.value = !1;
28
28
  };
29
- return (o, t) => (l(), u(r(H), {
30
- width: v.value,
31
- "onUpdate:width": t[6] || (t[6] = (e) => v.value = e),
29
+ return (o, e) => (r(), u(l(J), {
30
+ width: k.value,
31
+ "onUpdate:width": e[6] || (e[6] = (t) => k.value = t),
32
32
  class: "flex flex-col"
33
33
  }, {
34
34
  default: s(() => [
35
- y(r(U), {
36
- class: "mac:pt-10 flex w-auto flex-1 pt-2",
35
+ y(l(j), {
36
+ class: "flex w-auto flex-1",
37
37
  indent: 20,
38
38
  isDraggable: a.layout !== "modal",
39
39
  isDroppable: a.isDroppable,
@@ -41,47 +41,53 @@ const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K =
41
41
  isSelected: a.sidebarState.isSelected,
42
42
  items: I.value,
43
43
  layout: "client",
44
- onReorder: t[5] || (t[5] = (e, D) => n("reorder", e, D)),
44
+ onReorder: e[5] || (e[5] = (t, D) => n("reorder", t, D)),
45
45
  onSelectItem: W
46
- }, E({
46
+ }, z({
47
47
  header: s(() => [
48
- w("div", J, [
49
- w("div", K, [
50
- a.layout !== "modal" ? (l(), u(j, {
48
+ e[7] || (e[7] = p("div", { class: "mac:h-12 mac:app-drag-region h-2" }, null, -1)),
49
+ p("div", {
50
+ class: R(["bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5", { "max-md:pt-12": a.layout !== "modal" }])
51
+ }, [
52
+ p("div", K, [
53
+ a.layout !== "modal" ? (r(), u(G, {
51
54
  key: 0,
52
55
  activeWorkspace: a.activeWorkspace,
53
56
  workspaces: a.workspaces,
54
- "onCreate:workspace": t[0] || (t[0] = (e) => n("create:workspace")),
55
- "onNavigate:to:settings": t[1] || (t[1] = (e) => n("navigate:to:settings")),
56
- "onSelect:workspace": t[2] || (t[2] = (e) => n("select:workspace", e))
57
+ "onCreate:workspace": e[0] || (e[0] = (t) => n("create:workspace")),
58
+ "onNavigate:to:settings": e[1] || (e[1] = (t) => n("navigate:to:settings")),
59
+ "onSelect:workspace": e[2] || (e[2] = (t) => n("select:workspace", t))
57
60
  }, {
58
61
  sidebarMenuActions: s(() => [
59
62
  i(o.$slots, "sidebarMenuActions")
60
63
  ]),
61
64
  _: 3
62
- }, 8, ["activeWorkspace", "workspaces"])) : a.layout === "modal" ? (l(), g("div", L)) : m("", !0),
63
- y(r(z), {
64
- icon: r(A),
65
+ }, 8, ["activeWorkspace", "workspaces"])) : a.layout === "modal" ? (r(), w("div", L)) : c("", !0),
66
+ y(l(F), {
67
+ icon: l(U),
65
68
  label: "Search",
66
- onClick: t[3] || (t[3] = (e) => d.value = !d.value)
69
+ onClick: e[3] || (e[3] = (t) => d.value = !d.value)
67
70
  }, null, 8, ["icon"])
68
71
  ]),
69
- d.value ? (l(), u(r(F), {
72
+ d.value ? (r(), u(l(q), {
70
73
  key: 0,
71
- modelValue: r(c),
72
- "onUpdate:modelValue": t[4] || (t[4] = (e) => R(c) ? c.value = e : null),
74
+ modelValue: l(m),
75
+ "onUpdate:modelValue": e[4] || (e[4] = (t) => h(m) ? m.value = t : null),
73
76
  autofocus: ""
74
- }, null, 8, ["modelValue"])) : m("", !0)
75
- ])
77
+ }, null, 8, ["modelValue"])) : c("", !0)
78
+ ], 2)
76
79
  ]),
77
- decorator: s((e) => [
78
- i(o.$slots, "decorator", f(p(e)))
80
+ spacer: s(() => [
81
+ e[8] || (e[8] = p("div", { class: "mac:app-drag-region flex-1" }, null, -1))
79
82
  ]),
80
- icon: s((e) => [
81
- b.icon || k(e.item) ? (l(), g(N, { key: 0 }, [
82
- k(e.item) ? (l(), u(r(q), { key: 0 })) : m("", !0),
83
- i(o.$slots, "icon", f(p(e)))
84
- ], 64)) : m("", !0)
83
+ decorator: s((t) => [
84
+ i(o.$slots, "decorator", f(b(t)))
85
+ ]),
86
+ icon: s((t) => [
87
+ v.icon || S(t.item) ? (r(), w(N, { key: 0 }, [
88
+ S(t.item) ? (r(), u(l(A), { key: 0 })) : c("", !0),
89
+ i(o.$slots, "icon", f(b(t)))
90
+ ], 64)) : c("", !0)
85
91
  ]),
86
92
  before: s(() => [
87
93
  i(o.$slots, "workspaceButton")
@@ -91,10 +97,10 @@ const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K =
91
97
  ]),
92
98
  _: 2
93
99
  }, [
94
- b.empty ? {
100
+ v.empty ? {
95
101
  name: "empty",
96
- fn: s((e) => [
97
- i(o.$slots, "empty", f(p(e)))
102
+ fn: s((t) => [
103
+ i(o.$slots, "empty", f(b(t)))
98
104
  ]),
99
105
  key: "0"
100
106
  } : void 0
@@ -1 +1 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AA4OA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAW7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAA;AAIxG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAK3C;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;YAER,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;iBACX,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;;;YAHzC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;iBACX,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;IAWjD;;;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