@scalar/api-client 2.10.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
  3. package/dist/components/ImportCollection/IntegrationLogo.vue.js +1 -0
  4. package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
  5. package/dist/components/Server/ServerVariablesForm.vue.js +6 -6
  6. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  7. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
  8. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +14 -13
  9. package/dist/hooks/useClientConfig.d.ts +3 -3
  10. package/dist/layouts/App/create-api-client-app.d.ts +1 -1
  11. package/dist/layouts/Web/create-api-client-web.d.ts +1 -1
  12. package/dist/libs/create-client.d.ts +1 -1
  13. package/dist/store/store.d.ts +1 -1
  14. package/dist/style.css +1 -1
  15. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +4 -6
  16. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  17. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +24 -27
  18. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +3 -6
  19. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  20. package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
  21. package/dist/v2/blocks/operation-block/components/Header.vue2.js +10 -12
  22. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
  23. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +11 -10
  24. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -5
  25. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  26. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  27. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +45 -47
  28. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +11 -9
  29. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  30. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +179 -5
  31. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +2 -179
  32. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +201 -198
  33. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +11 -6
  34. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  35. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +82 -5
  36. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +2 -85
  37. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +3 -13
  38. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +16 -18
  40. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +133 -142
  41. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +1 -1
  42. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  43. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -1
  44. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +2 -16
  45. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -1
  46. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +2 -2
  47. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +202 -229
  48. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +3 -5
  49. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -1
  50. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +2 -2
  51. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +81 -85
  52. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +2 -5
  53. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -1
  54. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +32 -34
  55. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +2 -5
  56. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -1
  57. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +2 -2
  58. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +31 -33
  59. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +2 -5
  60. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -1
  61. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +42 -45
  62. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +2 -2
  63. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -1
  64. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +9 -9
  65. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -1
  66. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +2 -2
  67. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +18 -18
  68. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
  69. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +14 -14
  70. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
  71. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +12 -12
  72. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -1
  73. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +13 -13
  74. package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
  75. package/dist/v2/components/data-table/DataTable.vue.js +4 -4
  76. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +5 -7
  77. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  78. package/dist/v2/components/data-table/DataTableInput.vue.js +2 -2
  79. package/dist/v2/components/data-table/DataTableInput.vue2.js +32 -36
  80. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts +25 -0
  81. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -0
  82. package/dist/v2/components/forms/ConfirmationForm.vue.js +7 -0
  83. package/dist/v2/components/forms/ConfirmationForm.vue2.js +45 -0
  84. package/dist/v2/components/forms/index.d.ts +2 -0
  85. package/dist/v2/components/forms/index.d.ts.map +1 -0
  86. package/dist/v2/components/forms/index.js +4 -0
  87. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts +43 -0
  88. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -0
  89. package/dist/v2/components/layout/CollapsibleSection.vue.js +89 -0
  90. package/dist/v2/components/layout/CollapsibleSection.vue2.js +4 -0
  91. package/dist/v2/components/layout/ValueEmitter.vue.d.ts +23 -0
  92. package/dist/v2/components/layout/ValueEmitter.vue.d.ts.map +1 -0
  93. package/dist/v2/components/layout/ValueEmitter.vue.js +21 -0
  94. package/dist/v2/components/layout/ValueEmitter.vue2.js +4 -0
  95. package/dist/v2/components/layout/index.d.ts +2 -0
  96. package/dist/v2/components/layout/index.d.ts.map +1 -0
  97. package/dist/v2/components/layout/index.js +4 -0
  98. package/dist/v2/components/modals/DeleteModal.vue.d.ts +15 -0
  99. package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -0
  100. package/dist/v2/components/modals/DeleteModal.vue.js +31 -0
  101. package/dist/v2/components/modals/DeleteModal.vue2.js +4 -0
  102. package/dist/v2/components/modals/index.d.ts +2 -0
  103. package/dist/v2/components/modals/index.d.ts.map +1 -0
  104. package/dist/v2/components/modals/index.js +4 -0
  105. package/dist/v2/components/server/ServerDropdown.vue.d.ts +4 -2
  106. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  107. package/dist/v2/components/server/ServerDropdown.vue.js +31 -31
  108. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts +2 -6
  109. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
  110. package/dist/v2/components/server/ServerDropdownItem.vue.js +1 -1
  111. package/dist/v2/components/server/ServerDropdownItem.vue2.js +16 -16
  112. package/dist/v2/components/server/index.d.ts.map +1 -1
  113. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +6 -2
  114. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  115. package/dist/v2/components/sidebar/Sidebar.vue.js +45 -55
  116. package/dist/v2/features/app/App.vue.d.ts +2 -2
  117. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  118. package/dist/v2/features/app/App.vue.js +89 -74
  119. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +6 -2
  120. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  121. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  122. package/dist/v2/features/app/components/AppSidebar.vue2.js +50 -47
  123. package/dist/v2/features/app/helpers/routes.d.ts +0 -10
  124. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  125. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  126. package/dist/v2/features/collection/DocumentCollection.vue2.js +75 -73
  127. package/dist/v2/features/collection/components/Authentication.vue.d.ts +13 -25
  128. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  129. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  130. package/dist/v2/features/collection/components/Authentication.vue2.js +47 -35
  131. package/dist/v2/features/collection/components/Form.vue.d.ts +3 -7
  132. package/dist/v2/features/collection/components/Form.vue.d.ts.map +1 -1
  133. package/dist/v2/features/collection/components/Form.vue.js +28 -33
  134. package/dist/v2/features/collection/components/Servers.vue.d.ts +13 -31
  135. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  136. package/dist/v2/features/collection/components/Servers.vue2.js +103 -82
  137. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
  138. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +3 -3
  139. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  140. package/dist/v2/features/modal/Modal.vue.js +3 -3
  141. package/dist/v2/features/modal/Modal.vue2.js +40 -32
  142. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  143. package/dist/v2/features/operation/Operation.vue.js +22 -28
  144. package/dist/v2/hooks/use-sidebar-state.d.ts +47 -0
  145. package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -0
  146. package/dist/v2/hooks/use-sidebar-state.js +112 -0
  147. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
  148. package/dist/v2/hooks/use-workspace-client-events.js +75 -107
  149. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  150. package/package.json +17 -17
  151. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +0 -45
  152. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +0 -1
  153. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +0 -29
  154. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +0 -1
  155. package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts +0 -29
  156. package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts.map +0 -1
@@ -1,87 +1,4 @@
1
- import { defineComponent as v, computed as b, createElementBlock as n, openBlock as t, withModifiers as p, createCommentVNode as u, createBlock as h, normalizeClass as i, Fragment as f, renderList as y, createElementVNode as d, toDisplayString as S, unref as x, withCtx as g, createVNode as k } from "vue";
2
- import w from "./RequestAuthTab.vue.js";
3
- import A from "../../../../components/DataTable/DataTable.vue.js";
4
- const B = ["onClick"], V = { class: "relative z-10 font-medium whitespace-nowrap" }, C = {
5
- key: 0,
6
- class: "absolute inset-x-1 bottom-[var(--scalar-border-width)] left-1/2 z-1 h-px w-full -translate-x-1/2 bg-current"
7
- }, O = /* @__PURE__ */ v({
8
- __name: "RequestAuthDataTable",
9
- props: {
10
- environment: {},
11
- envVariables: {},
12
- layout: { default: "client" },
13
- selectedSchemeOptions: { default: () => [] },
14
- activeAuthIndex: {},
15
- securitySchemes: {},
16
- server: {},
17
- eventBus: {},
18
- meta: {}
19
- },
20
- setup(l, { expose: c }) {
21
- const o = b(() => l.selectedSchemeOptions[l.activeAuthIndex]);
22
- return c({
23
- activeAuthIndex: l.activeAuthIndex,
24
- activeScheme: o
25
- }), (e, r) => (t(), n("form", {
26
- onSubmit: r[2] || (r[2] = p(() => {
27
- }, ["prevent"]))
28
- }, [
29
- e.selectedSchemeOptions.length > 1 ? (t(), n("div", {
30
- key: 0,
31
- class: i(["box-content flex flex-wrap gap-x-2.5 overflow-hidden border border-b-0 px-3", e.layout === "client" && "border-x-0"]),
32
- "data-testid": "auth-tabs"
33
- }, [
34
- (t(!0), n(f, null, y(e.selectedSchemeOptions, (a, s) => (t(), n("div", {
35
- key: a.id,
36
- class: i(["relative z-1 -mb-[var(--scalar-border-width)] flex h-8 cursor-pointer", [e.activeAuthIndex === s ? "text-c-1" : "text-c-3"]])
37
- }, [
38
- d("button", {
39
- class: "floating-bg relative cursor-pointer border-b-[1px] border-transparent py-1 text-sm font-medium",
40
- type: "button",
41
- onClick: () => e.eventBus.emit("auth:update:active-index", { index: s, meta: e.meta })
42
- }, [
43
- d("span", V, S(a.label), 1)
44
- ], 8, B),
45
- e.activeAuthIndex === s ? (t(), n("div", C)) : u("", !0)
46
- ], 2))), 128))
47
- ], 2)) : u("", !0),
48
- o.value ? (t(), h(x(A), {
49
- key: 1,
50
- class: i(["flex-1", e.layout === "reference" && "bg-b-1 rounded-b-lg border border-t-0"]),
51
- columns: [""],
52
- presentational: ""
53
- }, {
54
- default: g(() => [
55
- k(w, {
56
- envVariables: e.envVariables,
57
- environment: e.environment,
58
- layout: e.layout,
59
- securitySchemes: e.securitySchemes ?? {},
60
- selectedSecuritySchemas: o.value.value,
61
- server: e.server,
62
- "onUpdate:securityScheme": r[0] || (r[0] = (a) => e.eventBus.emit("auth:update:security-scheme", {
63
- data: a,
64
- name: o.value?.id ?? ""
65
- })),
66
- "onUpdate:selectedScopes": r[1] || (r[1] = ({ id: a, name: s, scopes: m }) => e.eventBus.emit("auth:update:selected-scopes", {
67
- id: a,
68
- name: s,
69
- scopes: m,
70
- meta: e.meta
71
- }))
72
- }, null, 8, ["envVariables", "environment", "layout", "securitySchemes", "selectedSecuritySchemas", "server"])
73
- ]),
74
- _: 1
75
- }, 8, ["class"])) : (t(), n("div", {
76
- key: 2,
77
- class: i([
78
- "text-c-3 bg-b-1 flex min-h-16 items-center justify-center border-t px-4 text-sm",
79
- e.layout === "reference" && "min-h-[calc(4rem+0.5px)] rounded-b-lg border"
80
- ])
81
- }, " No authentication selected ", 2))
82
- ], 32));
83
- }
84
- });
1
+ import f from "./RequestAuthDataTable.vue.js";
85
2
  export {
86
- O as default
3
+ f as default
87
4
  };
@@ -1,18 +1,8 @@
1
- import type { Environment } from '@scalar/oas-utils/entities/environment';
2
- import { type MaybeRefOrGetter } from 'vue';
3
- import type { EnvVariable } from '../../../../store/index.js';
4
- /**
5
- * Vue class prop type
6
- *
7
- * Vue seems to just use any behind the scenes
8
- *
9
- * @see https://vuejs.org/guide/essentials/class-and-style.html#class-and-style-bindings
10
- */
11
- export type VueClassProp = MaybeRefOrGetter<string | Record<string, boolean> | (string | Record<string, boolean>)[] | false>;
1
+ import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
2
+ import type { VueClassProp } from '../../../../types/vue';
12
3
  type __VLS_Props = {
13
4
  containerClass?: VueClassProp;
14
- environment: Environment;
15
- envVariables: EnvVariable[];
5
+ environment: XScalarEnvironment;
16
6
  readOnly?: boolean;
17
7
  required?: boolean;
18
8
  type?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAAS,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAGlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,gBAAgB,CACvC,MAAM,GACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,GACpC,KAAK,CACR,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,cAAc,CAAC,EAAE,YAAY,CAAA;IAC7B,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;AAyBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;AA2EF,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB7C,QAAA,MAAM,eAAe;;;;;;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,KAAK,WAAW,GAAG;IACjB,cAAc,CAAC,EAAE,YAAY,CAAA;IAC7B,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;AAwBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;AAyEF,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB7C,QAAA,MAAM,eAAe;;;;;;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,11 +1,10 @@
1
- import { defineComponent as p, mergeModels as u, useModel as V, useId as f, createBlock as v, openBlock as y, unref as t, mergeProps as b, withCtx as s, renderSlot as i, createElementVNode as C } from "vue";
2
- import B from "../../../../components/DataTable/DataTableInput.vue.js";
1
+ import { defineComponent as p, mergeModels as u, useModel as f, useId as V, createBlock as y, openBlock as v, unref as o, mergeProps as C, withCtx as d, renderSlot as s, createElementVNode as B } from "vue";
2
+ import b from "../../../components/data-table/DataTableInput.vue.js";
3
3
  const q = ["for"], $ = /* @__PURE__ */ p({
4
4
  __name: "RequestAuthDataTableInput",
5
5
  props: /* @__PURE__ */ u({
6
6
  containerClass: {},
7
7
  environment: {},
8
- envVariables: {},
9
8
  readOnly: { type: Boolean, default: !1 },
10
9
  required: { type: Boolean, default: !1 },
11
10
  type: {}
@@ -14,33 +13,32 @@ const q = ["for"], $ = /* @__PURE__ */ p({
14
13
  modelModifiers: {}
15
14
  }),
16
15
  emits: /* @__PURE__ */ u(["inputFocus", "inputBlur", "selectVariable"], ["update:modelValue"]),
17
- setup(d, { emit: m }) {
18
- const a = m, o = V(d, "modelValue"), r = f();
19
- return (e, n) => (y(), v(t(B), b({ id: t(r) }, e.$attrs, {
20
- modelValue: o.value,
21
- "onUpdate:modelValue": n[0] || (n[0] = (l) => o.value = l),
16
+ setup(i, { emit: m }) {
17
+ const t = m, r = f(i, "modelValue"), a = V();
18
+ return (e, n) => (v(), y(o(b), C({ id: o(a) }, e.$attrs, {
19
+ modelValue: r.value,
20
+ "onUpdate:modelValue": n[0] || (n[0] = (l) => r.value = l),
22
21
  canAddCustomEnumValue: !e.readOnly,
23
22
  containerClass: e.containerClass,
24
- envVariables: e.envVariables,
25
23
  environment: e.environment,
26
24
  lineWrapping: "",
27
25
  readOnly: e.readOnly,
28
26
  required: e.required,
29
27
  type: e.type,
30
- onInputBlur: n[1] || (n[1] = (l) => a("inputBlur")),
31
- onInputFocus: n[2] || (n[2] = (l) => a("inputFocus")),
32
- onSelectVariable: n[3] || (n[3] = (l) => a("selectVariable", l))
28
+ onInputBlur: n[1] || (n[1] = (l) => t("inputBlur")),
29
+ onInputFocus: n[2] || (n[2] = (l) => t("inputFocus")),
30
+ onSelectVariable: n[3] || (n[3] = (l) => t("selectVariable", l))
33
31
  }), {
34
- default: s(() => [
35
- C("label", { for: t(r) }, [
36
- i(e.$slots, "default")
32
+ default: d(() => [
33
+ B("label", { for: o(a) }, [
34
+ s(e.$slots, "default")
37
35
  ], 8, q)
38
36
  ]),
39
- icon: s(() => [
40
- i(e.$slots, "icon")
37
+ icon: d(() => [
38
+ s(e.$slots, "icon")
41
39
  ]),
42
40
  _: 3
43
- }, 16, ["id", "modelValue", "canAddCustomEnumValue", "containerClass", "envVariables", "environment", "readOnly", "required", "type"]));
41
+ }, 16, ["id", "modelValue", "canAddCustomEnumValue", "containerClass", "environment", "readOnly", "required", "type"]));
44
42
  }
45
43
  });
46
44
  export {
@@ -1,67 +1,80 @@
1
- import { defineComponent as R, computed as N, ref as P, createElementBlock as u, openBlock as r, Fragment as i, renderList as C, createBlock as k, createCommentVNode as b, unref as s, withCtx as o, createVNode as a, createElementVNode as _, toDisplayString as F, mergeProps as v, createTextVNode as x, normalizeClass as j, capitalize as $ } from "vue";
2
- import { ScalarMarkdownSummary as z } from "@scalar/components";
3
- import { getResolvedRef as K } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
- import O from "./OAuth2.vue.js";
5
- import w from "./RequestAuthDataTableInput.vue.js";
6
- import f from "../../../../components/DataTable/DataTableRow.vue.js";
7
- import B from "../../../../components/DataTable/DataTableCell.vue.js";
8
- const L = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow-hidden px-3 py-1.25 text-ellipsis group-hover/auth:absolute group-hover/auth:h-auto group-hover/auth:border-b *:first:line-clamp-1 *:first:text-ellipsis group-hover/auth:*:first:line-clamp-none" }, M = {
9
- key: 0,
10
- class: "flex min-h-8 border-t text-base"
11
- }, Q = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, q = ["onClick"], D = { class: "relative z-10" }, Y = /* @__PURE__ */ R({
1
+ import { defineComponent as A, computed as N, ref as P, createElementBlock as s, openBlock as r, Fragment as d, renderList as C, createBlock as v, createCommentVNode as m, unref as i, withCtx as l, createVNode as n, createElementVNode as k, toDisplayString as R, createTextVNode as y, normalizeClass as z, capitalize as Q } from "vue";
2
+ import { ScalarMarkdownSummary as q } from "@scalar/components";
3
+ import { getResolvedRef as D } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
+ import E from "./OAuth2.vue.js";
5
+ import b from "./RequestAuthDataTableInput.vue.js";
6
+ import c from "../../../components/data-table/DataTableRow.vue.js";
7
+ import I from "../../../components/data-table/DataTableCell.vue.js";
8
+ const H = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow-hidden px-3 py-1.25 text-ellipsis group-hover/auth:absolute group-hover/auth:h-auto group-hover/auth:border-b *:first:line-clamp-1 *:first:text-ellipsis group-hover/auth:*:first:line-clamp-none" }, L = { class: "flex min-h-8 border-t text-base" }, _ = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, G = ["onClick"], J = { class: "relative z-10" }, re = /* @__PURE__ */ A({
12
9
  __name: "RequestAuthTab",
13
10
  props: {
14
11
  environment: {},
15
- envVariables: {},
16
- layout: {},
12
+ isStatic: { type: Boolean },
17
13
  selectedSecuritySchemas: {},
18
14
  securitySchemes: {},
19
15
  server: {}
20
16
  },
21
17
  emits: ["update:securityScheme", "update:selectedScopes"],
22
- setup(S, { emit: I }) {
23
- const c = I, h = N(
24
- () => Object.entries(S.selectedSecuritySchemas).map(([l, e]) => ({
25
- scheme: K(S.securitySchemes[l]),
26
- name: l,
18
+ setup(f, { emit: K }) {
19
+ const x = K, U = N(
20
+ () => Object.entries(f.selectedSecuritySchemas).map(([o, e]) => ({
21
+ scheme: D(f.securitySchemes[o]),
22
+ name: o,
27
23
  scopes: e
28
24
  }))
29
- ), p = P(""), T = (l, e) => {
30
- const t = e.description ? `: ${e.description}` : "", m = `${$(l)}${t || `: ${e.type}`}`;
31
- if (e.type === "apiKey")
32
- return `${$(l)}${t || `: ${e.in}`}`;
33
- if (e.type === "oauth2") {
34
- const U = Object.keys(e.flows ?? {})[0];
35
- return `${$(l)}: ${p.value ? p.value : U}${t}`;
25
+ ), w = P(""), h = N(() => U.value.length > 1), F = (o, e) => {
26
+ const t = Q(o), u = e.description ? `: ${e.description}` : "";
27
+ switch (e.type) {
28
+ case "apiKey":
29
+ return `${t}${u || `: ${e.in}`}`;
30
+ case "oauth2": {
31
+ const V = Object.keys(e.flows ?? {})[0], a = w.value || V;
32
+ return `${t}: ${a}${u}`;
33
+ }
34
+ case "http":
35
+ return `${t}: ${e.scheme}${u}`;
36
+ default:
37
+ return `${t}${u || `: ${e.type}`}`;
36
38
  }
37
- return e.type === "http" ? `${$(l)}: ${e.scheme}${t}` : `${m}${t}`;
38
- }, y = {
39
- environment: S.environment,
40
- envVariables: S.envVariables
39
+ }, T = (o, e) => w.value === o || e === 0 && !w.value, B = () => f.isStatic && "border-t", g = (o, e) => x("update:securityScheme", {
40
+ type: "http",
41
+ [o]: e
42
+ }), j = (o, e) => x("update:securityScheme", {
43
+ type: "apiKey",
44
+ [o]: e
45
+ }), M = (o, e) => {
46
+ x("update:selectedScopes", {
47
+ id: Object.keys(f.selectedSecuritySchemas),
48
+ name: o,
49
+ ...e
50
+ });
51
+ }, O = (o, e) => {
52
+ const t = "floating-bg text-c-3 relative cursor-pointer border-b border-transparent py-1 text-base font-medium";
53
+ return T(o, e) ? `${t} !text-c-1 !rounded-none border-b !border-current ${f.isStatic ? "opacity-100" : ""}` : t;
41
54
  };
42
- return (l, e) => (r(!0), u(i, null, C(h.value, ({ scheme: t, name: m, scopes: U }) => (r(), u(i, { key: m }, [
43
- h.value.length > 1 && t ? (r(), k(s(f), { key: 0 }, {
44
- default: o(() => [
45
- a(s(B), {
46
- "aria-label": T(m, t),
55
+ return (o, e) => (r(!0), s(d, null, C(U.value, ({ scheme: t, name: u, scopes: V }) => (r(), s(d, { key: u }, [
56
+ h.value && t ? (r(), v(i(c), { key: 0 }, {
57
+ default: l(() => [
58
+ n(i(I), {
59
+ "aria-label": F(u, t),
47
60
  class: "text-c-2 group/auth flex items-center leading-[22px] whitespace-nowrap outline-none hover:whitespace-normal"
48
61
  }, {
49
- default: o(() => [
50
- _("p", L, F(T(m, t)), 1)
62
+ default: l(() => [
63
+ k("p", H, R(F(u, t)), 1)
51
64
  ]),
52
65
  _: 2
53
66
  }, 1032, ["aria-label"])
54
67
  ]),
55
68
  _: 2
56
- }, 1024)) : b("", !0),
57
- t?.description && h.value.length <= 1 ? (r(), k(s(f), { key: 1 }, {
58
- default: o(() => [
59
- a(s(B), {
69
+ }, 1024)) : m("", !0),
70
+ t?.description && !h.value ? (r(), v(i(c), { key: 1 }, {
71
+ default: l(() => [
72
+ n(i(I), {
60
73
  "aria-label": t.description,
61
74
  class: "max-h-[auto]"
62
75
  }, {
63
- default: o(() => [
64
- a(s(z), {
76
+ default: l(() => [
77
+ n(i(q), {
65
78
  class: "auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25",
66
79
  value: t.description
67
80
  }, null, 8, ["value"])
@@ -70,157 +83,135 @@ const L = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
70
83
  }, 1032, ["aria-label"])
71
84
  ]),
72
85
  _: 2
73
- }, 1024)) : b("", !0),
74
- t?.type === "http" ? (r(), u(i, { key: 2 }, [
75
- t.scheme === "bearer" ? (r(), k(s(f), { key: 0 }, {
76
- default: o(() => [
77
- a(w, v({ ref_for: !0 }, y, {
78
- containerClass: l.layout === "reference" && "border-t",
86
+ }, 1024)) : m("", !0),
87
+ t?.type === "http" ? (r(), s(d, { key: 2 }, [
88
+ t.scheme === "bearer" ? (r(), v(i(c), { key: 0 }, {
89
+ default: l(() => [
90
+ n(b, {
91
+ containerClass: B(),
92
+ environment: o.environment,
79
93
  modelValue: t["x-scalar-secret-token"],
80
94
  placeholder: "Token",
81
95
  type: "password",
82
- "onUpdate:modelValue": e[0] || (e[0] = (n) => c("update:securityScheme", {
83
- type: "http",
84
- payload: { token: n }
85
- }))
86
- }), {
87
- default: o(() => [...e[5] || (e[5] = [
88
- x(" Bearer Token ", -1)
96
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => g("x-scalar-secret-token", a))
97
+ }, {
98
+ default: l(() => [...e[6] || (e[6] = [
99
+ y(" Bearer Token ", -1)
89
100
  ])]),
90
101
  _: 1
91
- }, 16, ["containerClass", "modelValue"])
102
+ }, 8, ["containerClass", "environment", "modelValue"])
92
103
  ]),
93
104
  _: 2
94
- }, 1024)) : t?.scheme === "basic" ? (r(), u(i, { key: 1 }, [
95
- a(s(f), null, {
96
- default: o(() => [
97
- a(w, v({ ref_for: !0 }, y, {
105
+ }, 1024)) : t?.scheme === "basic" ? (r(), s(d, { key: 1 }, [
106
+ n(i(c), null, {
107
+ default: l(() => [
108
+ n(b, {
98
109
  class: "text-c-2",
110
+ environment: o.environment,
99
111
  modelValue: t["x-scalar-secret-username"],
100
112
  placeholder: "janedoe",
101
113
  required: "",
102
- "onUpdate:modelValue": e[1] || (e[1] = (n) => c("update:securityScheme", {
103
- type: "http",
104
- payload: { username: n }
105
- }))
106
- }), {
107
- default: o(() => [...e[6] || (e[6] = [
108
- x(" Username ", -1)
114
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => g("x-scalar-secret-username", a))
115
+ }, {
116
+ default: l(() => [...e[7] || (e[7] = [
117
+ y(" Username ", -1)
109
118
  ])]),
110
119
  _: 1
111
- }, 16, ["modelValue"])
120
+ }, 8, ["environment", "modelValue"])
112
121
  ]),
113
122
  _: 2
114
123
  }, 1024),
115
- a(s(f), null, {
116
- default: o(() => [
117
- a(w, v({ ref_for: !0 }, y, {
124
+ n(i(c), null, {
125
+ default: l(() => [
126
+ n(b, {
127
+ environment: o.environment,
118
128
  modelValue: t["x-scalar-secret-password"],
119
129
  placeholder: "********",
120
130
  type: "password",
121
- "onUpdate:modelValue": e[2] || (e[2] = (n) => c("update:securityScheme", {
122
- type: "http",
123
- payload: { password: n }
124
- }))
125
- }), {
126
- default: o(() => [...e[7] || (e[7] = [
127
- x(" Password ", -1)
131
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => g("x-scalar-secret-password", a))
132
+ }, {
133
+ default: l(() => [...e[8] || (e[8] = [
134
+ y(" Password ", -1)
128
135
  ])]),
129
136
  _: 1
130
- }, 16, ["modelValue"])
137
+ }, 8, ["environment", "modelValue"])
131
138
  ]),
132
139
  _: 2
133
140
  }, 1024)
134
- ], 64)) : b("", !0)
135
- ], 64)) : t?.type === "apiKey" ? (r(), u(i, { key: 3 }, [
136
- a(s(f), null, {
137
- default: o(() => [
138
- a(w, v({ ref_for: !0 }, y, {
139
- containerClass: l.layout === "reference" && "border-t",
141
+ ], 64)) : m("", !0)
142
+ ], 64)) : t?.type === "apiKey" ? (r(), s(d, { key: 3 }, [
143
+ n(i(c), null, {
144
+ default: l(() => [
145
+ n(b, {
146
+ containerClass: B(),
147
+ environment: o.environment,
140
148
  modelValue: t.name,
141
149
  placeholder: "api-key",
142
- "onUpdate:modelValue": e[3] || (e[3] = (n) => c("update:securityScheme", {
143
- type: "apiKey",
144
- payload: { name: n }
145
- }))
146
- }), {
147
- default: o(() => [...e[8] || (e[8] = [
148
- x(" Name ", -1)
150
+ "onUpdate:modelValue": e[3] || (e[3] = (a) => j("name", a))
151
+ }, {
152
+ default: l(() => [...e[9] || (e[9] = [
153
+ y(" Name ", -1)
149
154
  ])]),
150
155
  _: 1
151
- }, 16, ["containerClass", "modelValue"])
156
+ }, 8, ["containerClass", "environment", "modelValue"])
152
157
  ]),
153
158
  _: 2
154
159
  }, 1024),
155
- a(s(f), null, {
156
- default: o(() => [
157
- a(w, v({ ref_for: !0 }, y, {
160
+ n(i(c), null, {
161
+ default: l(() => [
162
+ n(b, {
163
+ environment: o.environment,
158
164
  modelValue: t["x-scalar-secret-token"],
159
165
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
160
166
  type: "password",
161
- "onUpdate:modelValue": e[4] || (e[4] = (n) => c("update:securityScheme", {
162
- type: "apiKey",
163
- payload: { value: n }
164
- }))
165
- }), {
166
- default: o(() => [...e[9] || (e[9] = [
167
- x(" Value ", -1)
167
+ "onUpdate:modelValue": e[4] || (e[4] = (a) => j("x-scalar-secret-token", a))
168
+ }, {
169
+ default: l(() => [...e[10] || (e[10] = [
170
+ y(" Value ", -1)
168
171
  ])]),
169
172
  _: 1
170
- }, 16, ["modelValue"])
173
+ }, 8, ["environment", "modelValue"])
171
174
  ]),
172
175
  _: 2
173
176
  }, 1024)
174
- ], 64)) : t?.type === "oauth2" ? (r(), u(i, { key: 4 }, [
175
- a(s(f), null, {
176
- default: o(() => [
177
- Object.keys(t.flows).length > 1 ? (r(), u("div", M, [
178
- _("div", Q, [
179
- (r(!0), u(i, null, C(t?.flows, (n, d, V) => (r(), u("button", {
180
- key: d,
181
- class: j(["floating-bg text-c-3 relative cursor-pointer border-b-[1px] border-transparent py-1 text-base font-medium", {
182
- "!text-c-1 !rounded-none border-b-[1px] !border-current": l.layout !== "reference" && (p.value === d || V === 0 && !p.value),
183
- "!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100": l.layout === "reference" && (p.value === d || V === 0 && !p.value)
184
- }]),
177
+ ], 64)) : t?.type === "oauth2" ? (r(), s(d, { key: 4 }, [
178
+ Object.keys(t.flows).length > 1 ? (r(), v(i(c), { key: 0 }, {
179
+ default: l(() => [
180
+ k("div", L, [
181
+ k("div", _, [
182
+ (r(!0), s(d, null, C(t.flows, (a, p, $) => (r(), s("button", {
183
+ key: p,
184
+ class: z(O(p, $)),
185
185
  type: "button",
186
- onClick: (g) => p.value = d
186
+ onClick: (S) => w.value = p
187
187
  }, [
188
- _("span", D, F(d), 1)
189
- ], 10, q))), 128))
188
+ k("span", J, R(p), 1)
189
+ ], 10, G))), 128))
190
190
  ])
191
- ])) : b("", !0)
191
+ ])
192
192
  ]),
193
193
  _: 2
194
- }, 1024),
195
- (r(!0), u(i, null, C(t.flows, (n, d, V) => (r(), u(i, { key: d }, [
196
- p.value === d || V === 0 && !p.value ? (r(), k(O, v({
194
+ }, 1024)) : m("", !0),
195
+ (r(!0), s(d, null, C(t.flows, (a, p, $) => (r(), s(d, { key: p }, [
196
+ T(p, $) ? (r(), v(E, {
197
197
  key: 0,
198
- ref_for: !0
199
- }, y, {
198
+ environment: o.environment,
200
199
  flows: t.flows,
201
200
  proxyUrl: "",
202
- selectedScopes: U,
203
- server: l.server,
204
- type: d,
205
- "onUpdate:securityScheme": (g) => c("update:securityScheme", {
206
- type: "oauth2",
207
- flow: d,
208
- payload: g
209
- }),
210
- "onUpdate:selectedScopes": (g) => c("update:selectedScopes", {
211
- id: Object.keys(l.selectedSecuritySchemas),
212
- name: m,
213
- ...g
214
- })
215
- }), null, 16, ["flows", "selectedScopes", "server", "type", "onUpdate:securityScheme", "onUpdate:selectedScopes"])) : b("", !0)
201
+ selectedScopes: V,
202
+ server: o.server,
203
+ type: p,
204
+ "onUpdate:securityScheme": e[5] || (e[5] = (S) => x("update:securityScheme", S)),
205
+ "onUpdate:selectedScopes": (S) => M(u, S)
206
+ }, null, 8, ["environment", "flows", "selectedScopes", "server", "type", "onUpdate:selectedScopes"])) : m("", !0)
216
207
  ], 64))), 128))
217
- ], 64)) : t?.type === "openIdConnect" ? (r(), u("div", {
208
+ ], 64)) : t?.type === "openIdConnect" ? (r(), s("div", {
218
209
  key: 5,
219
- class: j(["text-c-3 bg-b-1 flex min-h-[calc(4rem+1px)] items-center justify-center border-t border-b-0 px-4 text-base", { "rounded-b-lg": l.layout === "reference" }])
220
- }, " Coming soon ", 2)) : b("", !0)
210
+ class: z(["text-c-3 bg-b-1 flex min-h-[calc(4rem+1px)] items-center justify-center border-t border-b-0 px-4 text-base", { "rounded-b-lg": o.isStatic }])
211
+ }, " Coming soon ", 2)) : m("", !0)
221
212
  ], 64))), 128));
222
213
  }
223
214
  });
224
215
  export {
225
- Y as default
216
+ re as default
226
217
  };
@@ -18,7 +18,7 @@ export declare const generateCodeChallenge: (verifier: string, encoding: "SHA-25
18
18
  */
19
19
  export declare const authorizeOauth2: (flows: OAuthFlowsObject, type: keyof OAuthFlowsObject, selectedScopes: string[],
20
20
  /** We use the active server to set a base for relative redirect uris */
21
- activeServer: ServerObject,
21
+ activeServer: ServerObject | undefined,
22
22
  /** If we want to use the proxy */
23
23
  proxyUrl?: string) => Promise<ErrorResponse<string>>;
24
24
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGlH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,qDAAqD;AACrD,KAAK,eAAe,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;AAEzD,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAgBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAU,UAAU,MAAM,EAAE,UAAU,SAAS,GAAG,OAAO,KAAG,OAAO,CAAC,MAAM,CAkB3G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,gBAAgB,EACvB,MAAM,MAAM,gBAAgB,EAC5B,gBAAgB,MAAM,EAAE;AACxB,wEAAwE;AACxE,cAAc,YAAY;AAC1B,kCAAkC;AAClC,WAAW,MAAM,KAChB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAkK/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,eAAe,EACtB,MAAM,MAAM,eAAe,EAC3B,QAAQ,MAAM,EACd,4BAIG;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACzB,KACL,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA8F/B,CAAA"}
1
+ {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGlH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,qDAAqD;AACrD,KAAK,eAAe,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;AAEzD,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAgBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAU,UAAU,MAAM,EAAE,UAAU,SAAS,GAAG,OAAO,KAAG,OAAO,CAAC,MAAM,CAkB3G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,gBAAgB,EACvB,MAAM,MAAM,gBAAgB,EAC5B,gBAAgB,MAAM,EAAE;AACxB,wEAAwE;AACxE,cAAc,YAAY,GAAG,SAAS;AACtC,kCAAkC;AAClC,WAAW,MAAM,KAChB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAkK/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,eAAe,EACtB,MAAM,MAAM,eAAe,EAC3B,QAAQ,MAAM,EACd,4BAIG;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACzB,KACL,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA8F/B,CAAA"}
@@ -37,7 +37,7 @@ const C = () => {
37
37
  }
38
38
  const w = a[t];
39
39
  if (w["x-scalar-secret-redirect-uri"].startsWith("/")) {
40
- const s = f.url || window.location.origin + window.location.pathname, n = new URL(w["x-scalar-secret-redirect-uri"], s).toString();
40
+ const s = f?.url || window.location.origin + window.location.pathname, n = new URL(w["x-scalar-secret-redirect-uri"], s).toString();
41
41
  c.searchParams.set("redirect_uri", n);
42
42
  } else
43
43
  c.searchParams.set("redirect_uri", w["x-scalar-secret-redirect-uri"]);
@@ -1,38 +1,24 @@
1
1
  import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
- import type { Environment } from '@scalar/oas-utils/entities/environment';
3
2
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
4
3
  import type { AuthMeta } from '@scalar/workspace-store/mutators';
4
+ import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
5
5
  import type { OpenApiDocument, OperationObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
6
6
  import type { ClientLayout } from '../../../../hooks/index.js';
7
- import type { EnvVariable } from '../../../../store/index.js';
8
7
  import type { ClientPlugin } from '../../../../v2/plugins';
9
8
  type __VLS_Props = {
10
- /** Operation method */
11
9
  method: HttpMethod;
12
- /** Operation path */
13
10
  path: string;
14
- /** Operation object */
15
11
  operation: OperationObject;
16
- /** Meta information for the auth update */
17
12
  authMeta?: AuthMeta;
18
- /** Currently selected example key for the current operation */
19
13
  exampleKey: string;
20
- /** Document defined security schemes */
21
14
  securitySchemes: NonNullable<OpenApiDocument['components']>['securitySchemes'];
22
- /** Currently selected security for the current operation */
23
15
  selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
24
- /** Required security for the operation/document */
25
16
  security: OpenApiDocument['security'];
26
- /** Currently selected server for the current operation/document/workspace */
27
17
  server?: ServerObject;
28
- /** Client layout */
29
18
  layout: ClientLayout;
30
- /** Registered app plugins */
31
19
  plugins?: ClientPlugin[];
32
20
  eventBus: WorkspaceEventBus;
33
- /** TODO: remove when we migrate */
34
- environment: Environment;
35
- envVariables: EnvVariable[];
21
+ environment: XScalarEnvironment;
36
22
  };
37
23
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
24
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBlock.vue"],"names":[],"mappings":"AAucA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAEzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAK1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,KAAK,WAAW,GAAG;IACjB,uBAAuB;IACvB,MAAM,EAAE,UAAU,CAAA;IAClB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,uBAAuB;IACvB,SAAS,EAAE,eAAe,CAAA;IAC1B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,wCAAwC;IACxC,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,4DAA4D;IAC5D,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,mDAAmD;IACnD,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,6EAA6E;IAC7E,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IAExB,QAAQ,EAAE,iBAAiB,CAAA;IAE3B,mCAAmC;IACnC,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;AAuoBF,wBAMG"}
1
+ {"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBlock.vue"],"names":[],"mappings":"AAwYA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,eAAe,CAAA;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,MAAM,EAAE,YAAY,CAAA;IACpB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;AAgnBF,wBAMG"}