@scalar/api-client 2.22.3 → 2.23.2

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 (121) hide show
  1. package/CHANGELOG.md +49 -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-security.d.ts +5 -3
  7. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
  8. package/dist/v2/blocks/operation-block/helpers/build-request-security.js +1 -1
  9. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +3 -2
  10. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/index.d.ts +2 -1
  12. package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
  13. package/dist/v2/blocks/operation-block/index.js +7 -4
  14. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +3 -2
  15. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  16. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +2 -2
  17. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +3 -2
  18. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  19. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +2 -2
  20. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -1
  21. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +3 -2
  22. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  23. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +2 -2
  24. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -1
  25. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +8 -5
  26. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  27. package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
  28. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +4 -4
  29. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  30. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +49 -45
  31. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  32. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +4 -2
  33. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +18 -181
  35. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  36. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +118 -107
  37. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -2
  38. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +30 -33
  40. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +11 -178
  41. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  42. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -110
  43. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
  44. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +5 -29
  45. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts +6 -0
  46. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -0
  47. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +85 -0
  48. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +9 -0
  49. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -0
  50. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +15 -0
  51. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +3 -2
  52. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  53. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +23 -0
  54. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -0
  55. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +2 -2
  56. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
  57. package/dist/v2/blocks/scalar-auth-selector-block/index.js +4 -6
  58. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  59. package/dist/v2/features/app/App.vue.js +127 -92
  60. package/dist/v2/features/app/app-state.d.ts +1 -1
  61. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  62. package/dist/v2/features/app/app-state.js +145 -142
  63. package/dist/v2/features/app/helpers/routes.d.ts +1 -1
  64. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  65. package/dist/v2/features/app/helpers/routes.js +31 -25
  66. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  67. package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
  68. package/dist/v2/features/collection/components/Authentication.vue2.js +14 -11
  69. package/dist/v2/features/import-listener/ImportListener.vue.d.ts +52 -0
  70. package/dist/v2/features/import-listener/ImportListener.vue.d.ts.map +1 -0
  71. package/dist/v2/features/import-listener/ImportListener.vue.js +91 -0
  72. package/dist/v2/features/import-listener/ImportListener.vue2.js +4 -0
  73. package/dist/v2/features/import-listener/components/DropEventListener.vue.d.ts +7 -0
  74. package/dist/v2/features/import-listener/components/DropEventListener.vue.d.ts.map +1 -0
  75. package/dist/v2/features/import-listener/components/DropEventListener.vue.js +81 -0
  76. package/dist/v2/features/import-listener/components/DropEventListener.vue2.js +4 -0
  77. package/dist/v2/features/import-listener/components/ImportModal.vue.d.ts +40 -0
  78. package/dist/v2/features/import-listener/components/ImportModal.vue.d.ts.map +1 -0
  79. package/dist/v2/features/import-listener/components/ImportModal.vue.js +170 -0
  80. package/dist/v2/features/import-listener/components/ImportModal.vue3.js +5 -0
  81. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.d.ts +29 -0
  82. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.d.ts.map +1 -0
  83. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.js +83 -0
  84. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue2.js +4 -0
  85. package/dist/v2/features/import-listener/helpers/generate-unique-slug.d.ts +16 -0
  86. package/dist/v2/features/import-listener/helpers/generate-unique-slug.d.ts.map +1 -0
  87. package/dist/v2/features/import-listener/helpers/generate-unique-slug.js +11 -0
  88. package/dist/v2/features/import-listener/helpers/get-url-query-parameter.d.ts +8 -0
  89. package/dist/v2/features/import-listener/helpers/get-url-query-parameter.d.ts.map +1 -0
  90. package/dist/v2/features/import-listener/helpers/get-url-query-parameter.js +4 -0
  91. package/dist/v2/features/import-listener/helpers/import-document-to-workspace.d.ts +30 -0
  92. package/dist/v2/features/import-listener/helpers/import-document-to-workspace.d.ts.map +1 -0
  93. package/dist/v2/features/import-listener/helpers/import-document-to-workspace.js +33 -0
  94. package/dist/v2/features/import-listener/helpers/load-document-from-source.d.ts +15 -0
  95. package/dist/v2/features/import-listener/helpers/load-document-from-source.d.ts.map +1 -0
  96. package/dist/v2/features/import-listener/helpers/load-document-from-source.js +28 -0
  97. package/dist/v2/features/import-listener/helpers/wait-for-condition.d.ts +15 -0
  98. package/dist/v2/features/import-listener/helpers/wait-for-condition.d.ts.map +1 -0
  99. package/dist/v2/features/import-listener/helpers/wait-for-condition.js +16 -0
  100. package/dist/v2/features/import-listener/index.d.ts +2 -0
  101. package/dist/v2/features/import-listener/index.d.ts.map +1 -0
  102. package/dist/v2/features/import-listener/index.js +4 -0
  103. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  104. package/dist/v2/features/modal/Modal.vue.js +1 -1
  105. package/dist/v2/features/modal/Modal.vue2.js +14 -12
  106. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  107. package/dist/v2/features/operation/Operation.vue.js +44 -35
  108. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +3 -5
  109. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
  110. package/dist/v2/workspace-events.d.ts.map +1 -1
  111. package/dist/v2/workspace-events.js +116 -109
  112. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  113. package/package.json +19 -14
  114. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts +0 -2
  115. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts.map +0 -1
  116. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts +0 -8
  117. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts.map +0 -1
  118. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.js +0 -33
  119. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts +0 -7
  120. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts.map +0 -1
  121. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.js +0 -13
@@ -1,13 +1,22 @@
1
+ import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
1
2
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
2
- import type { ApiKeyObject, ComponentsObject, HttpObject, SecurityRequirementObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
+ import type { SecurityRequirementObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
4
+ import type { MergedSecuritySchemes } from '../../../../v2/blocks/scalar-auth-selector-block/index.js';
3
5
  type __VLS_Props = {
6
+ /** Current environment configuration */
4
7
  environment: XScalarEnvironment;
5
8
  /** Controls the display of certain borders which are used when we are non-collapsible */
6
9
  isStatic: boolean;
10
+ /** Proxy URL */
7
11
  proxyUrl: string;
12
+ /** Selected security schemes*/
8
13
  selectedSecuritySchemas: SecurityRequirementObject;
9
- securitySchemes: NonNullable<ComponentsObject['securitySchemes']>;
14
+ /** Merged security schemes from the document and the config together with the auth store secrets */
15
+ securitySchemes: MergedSecuritySchemes;
16
+ /** Current server configuration */
10
17
  server: ServerObject | null;
18
+ /** Event bus for authentication updates */
19
+ eventBus: WorkspaceEventBus;
11
20
  };
12
21
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
22
  "update:selectedScopes": (payload: Omit<{
@@ -21,94 +30,6 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
21
30
  };
22
31
  meta: import("@scalar/workspace-store/events").AuthMeta;
23
32
  }, "meta">) => any;
24
- "update:securityScheme": (payload: ({
25
- type: "http";
26
- } & Partial<Omit<HttpObject, "type">>) | ({
27
- type: "apiKey";
28
- } & Partial<Omit<ApiKeyObject, "type">>) | ({
29
- type: "oauth2";
30
- } & {
31
- description?: string | undefined;
32
- 'x-default-scopes'?: string[] | undefined;
33
- flows?: {
34
- implicit?: {
35
- refreshUrl?: string | undefined;
36
- scopes?: {
37
- [x: string]: string | undefined;
38
- } | undefined;
39
- 'x-scalar-secret-client-id'?: string | undefined;
40
- 'x-scalar-secret-token'?: string | undefined;
41
- 'x-scalar-security-query'?: {
42
- [x: string]: string | undefined;
43
- } | undefined;
44
- 'x-scalar-security-body'?: {
45
- [x: string]: string | undefined;
46
- } | undefined;
47
- 'x-tokenName'?: string | undefined;
48
- authorizationUrl?: string | undefined;
49
- 'x-scalar-secret-redirect-uri'?: string | undefined;
50
- } | undefined;
51
- password?: {
52
- refreshUrl?: string | undefined;
53
- scopes?: {
54
- [x: string]: string | undefined;
55
- } | undefined;
56
- 'x-scalar-secret-client-id'?: string | undefined;
57
- 'x-scalar-secret-token'?: string | undefined;
58
- 'x-scalar-security-query'?: {
59
- [x: string]: string | undefined;
60
- } | undefined;
61
- 'x-scalar-security-body'?: {
62
- [x: string]: string | undefined;
63
- } | undefined;
64
- 'x-tokenName'?: string | undefined;
65
- tokenUrl?: string | undefined;
66
- 'x-scalar-secret-username'?: string | undefined;
67
- 'x-scalar-secret-password'?: string | undefined;
68
- 'x-scalar-secret-client-secret'?: string | undefined;
69
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
70
- } | undefined;
71
- clientCredentials?: {
72
- refreshUrl?: string | undefined;
73
- scopes?: {
74
- [x: string]: string | undefined;
75
- } | undefined;
76
- 'x-scalar-secret-client-id'?: string | undefined;
77
- 'x-scalar-secret-token'?: string | undefined;
78
- 'x-scalar-security-query'?: {
79
- [x: string]: string | undefined;
80
- } | undefined;
81
- 'x-scalar-security-body'?: {
82
- [x: string]: string | undefined;
83
- } | undefined;
84
- 'x-tokenName'?: string | undefined;
85
- tokenUrl?: string | undefined;
86
- 'x-scalar-secret-client-secret'?: string | undefined;
87
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
88
- } | undefined;
89
- authorizationCode?: {
90
- refreshUrl?: string | undefined;
91
- scopes?: {
92
- [x: string]: string | undefined;
93
- } | undefined;
94
- 'x-scalar-secret-client-id'?: string | undefined;
95
- 'x-scalar-secret-token'?: string | undefined;
96
- 'x-scalar-security-query'?: {
97
- [x: string]: string | undefined;
98
- } | undefined;
99
- 'x-scalar-security-body'?: {
100
- [x: string]: string | undefined;
101
- } | undefined;
102
- 'x-tokenName'?: string | undefined;
103
- authorizationUrl?: string | undefined;
104
- tokenUrl?: string | undefined;
105
- 'x-scalar-secret-client-secret'?: string | undefined;
106
- 'x-scalar-secret-redirect-uri'?: string | undefined;
107
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
108
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
109
- } | undefined;
110
- } | undefined;
111
- }), name: string) => any;
112
33
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
113
34
  "onUpdate:selectedScopes"?: ((payload: Omit<{
114
35
  id: string[];
@@ -121,94 +42,6 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
121
42
  };
122
43
  meta: import("@scalar/workspace-store/events").AuthMeta;
123
44
  }, "meta">) => any) | undefined;
124
- "onUpdate:securityScheme"?: ((payload: ({
125
- type: "http";
126
- } & Partial<Omit<HttpObject, "type">>) | ({
127
- type: "apiKey";
128
- } & Partial<Omit<ApiKeyObject, "type">>) | ({
129
- type: "oauth2";
130
- } & {
131
- description?: string | undefined;
132
- 'x-default-scopes'?: string[] | undefined;
133
- flows?: {
134
- implicit?: {
135
- refreshUrl?: string | undefined;
136
- scopes?: {
137
- [x: string]: string | undefined;
138
- } | undefined;
139
- 'x-scalar-secret-client-id'?: string | undefined;
140
- 'x-scalar-secret-token'?: string | undefined;
141
- 'x-scalar-security-query'?: {
142
- [x: string]: string | undefined;
143
- } | undefined;
144
- 'x-scalar-security-body'?: {
145
- [x: string]: string | undefined;
146
- } | undefined;
147
- 'x-tokenName'?: string | undefined;
148
- authorizationUrl?: string | undefined;
149
- 'x-scalar-secret-redirect-uri'?: string | undefined;
150
- } | undefined;
151
- password?: {
152
- refreshUrl?: string | undefined;
153
- scopes?: {
154
- [x: string]: string | undefined;
155
- } | undefined;
156
- 'x-scalar-secret-client-id'?: string | undefined;
157
- 'x-scalar-secret-token'?: string | undefined;
158
- 'x-scalar-security-query'?: {
159
- [x: string]: string | undefined;
160
- } | undefined;
161
- 'x-scalar-security-body'?: {
162
- [x: string]: string | undefined;
163
- } | undefined;
164
- 'x-tokenName'?: string | undefined;
165
- tokenUrl?: string | undefined;
166
- 'x-scalar-secret-username'?: string | undefined;
167
- 'x-scalar-secret-password'?: string | undefined;
168
- 'x-scalar-secret-client-secret'?: string | undefined;
169
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
170
- } | undefined;
171
- clientCredentials?: {
172
- refreshUrl?: string | undefined;
173
- scopes?: {
174
- [x: string]: string | undefined;
175
- } | undefined;
176
- 'x-scalar-secret-client-id'?: string | undefined;
177
- 'x-scalar-secret-token'?: string | undefined;
178
- 'x-scalar-security-query'?: {
179
- [x: string]: string | undefined;
180
- } | undefined;
181
- 'x-scalar-security-body'?: {
182
- [x: string]: string | undefined;
183
- } | undefined;
184
- 'x-tokenName'?: string | undefined;
185
- tokenUrl?: string | undefined;
186
- 'x-scalar-secret-client-secret'?: string | undefined;
187
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
188
- } | undefined;
189
- authorizationCode?: {
190
- refreshUrl?: string | undefined;
191
- scopes?: {
192
- [x: string]: string | undefined;
193
- } | undefined;
194
- 'x-scalar-secret-client-id'?: string | undefined;
195
- 'x-scalar-secret-token'?: string | undefined;
196
- 'x-scalar-security-query'?: {
197
- [x: string]: string | undefined;
198
- } | undefined;
199
- 'x-scalar-security-body'?: {
200
- [x: string]: string | undefined;
201
- } | undefined;
202
- 'x-tokenName'?: string | undefined;
203
- authorizationUrl?: string | undefined;
204
- tokenUrl?: string | undefined;
205
- 'x-scalar-secret-client-secret'?: string | undefined;
206
- 'x-scalar-secret-redirect-uri'?: string | undefined;
207
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
208
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
209
- } | undefined;
210
- } | undefined;
211
- }), name: string) => any) | undefined;
212
45
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
213
46
  export default _default;
214
47
  //# sourceMappingURL=RequestAuthTab.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"names":[],"mappings":"AA8TA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,yBAAyB,EAEzB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,yFAAyF;IACzF,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,uBAAuB,EAAE,yBAAyB,CAAA;IAClD,eAAe,EAAE,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAA;IACjE,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6iBF,wBAOG"}
1
+ {"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"names":[],"mappings":"AA2UA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAEV,yBAAyB,EACzB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAA;AAanF,KAAK,WAAW,GAAG;IACjB,wCAAwC;IACxC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,yFAAyF;IACzF,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,+BAA+B;IAC/B,uBAAuB,EAAE,yBAAyB,CAAA;IAClD,oGAAoG;IACpG,eAAe,EAAE,qBAAqB,CAAA;IACtC,mCAAmC;IACnC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,2CAA2C;IAC3C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AA4iBF,wBAOG"}
@@ -1,11 +1,11 @@
1
- import { defineComponent as A, computed as N, ref as P, createElementBlock as u, openBlock as l, Fragment as c, renderList as g, createBlock as y, createCommentVNode as f, unref as d, withCtx as r, createVNode as i, createElementVNode as V, toDisplayString as R, createTextVNode as v, normalizeClass as z, capitalize as Q } from "vue";
2
- import { ScalarMarkdownSummary as _ } from "@scalar/components";
3
- import { getResolvedRef as q } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
- import D from "./OAuth2.vue.js";
1
+ import { defineComponent as P, computed as T, ref as Q, createElementBlock as u, openBlock as n, Fragment as c, renderList as k, createBlock as f, createCommentVNode as v, unref as d, withCtx as r, createVNode as i, createElementVNode as w, toDisplayString as j, createTextVNode as y, normalizeClass as K, capitalize as q } from "vue";
2
+ import { ScalarMarkdownSummary as D } from "@scalar/components";
3
+ import { getResolvedRef as E } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
+ import H from "./OAuth2.vue.js";
5
5
  import b from "./RequestAuthDataTableInput.vue.js";
6
6
  import m from "../../../components/data-table/DataTableRow.vue.js";
7
- import I from "../../../components/data-table/DataTableCell.vue.js";
8
- const E = { 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" }, H = { class: "flex min-h-8 border-t text-base" }, L = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, G = ["onClick"], J = { class: "relative z-10" }, le = /* @__PURE__ */ A({
7
+ import N from "../../../components/data-table/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" }, G = { class: "flex min-h-8 border-t text-base" }, J = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, W = ["onClick"], X = { class: "relative z-10" }, oe = /* @__PURE__ */ P({
9
9
  __name: "RequestAuthTab",
10
10
  props: {
11
11
  environment: {},
@@ -13,117 +13,113 @@ const E = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
13
13
  proxyUrl: {},
14
14
  selectedSecuritySchemas: {},
15
15
  securitySchemes: {},
16
- server: {}
16
+ server: {},
17
+ eventBus: {}
17
18
  },
18
- emits: ["update:securityScheme", "update:selectedScopes"],
19
- setup(n, { emit: K }) {
20
- const x = K, $ = N(
21
- () => Object.entries(n.selectedSecuritySchemas).map(([o, t = []]) => ({
22
- scheme: q(n.securitySchemes[o]),
23
- name: o,
24
- scopes: t
19
+ emits: ["update:selectedScopes"],
20
+ setup(a, { emit: R }) {
21
+ const z = R, g = T(
22
+ () => Object.entries(a.selectedSecuritySchemas).map(([l, e = []]) => ({
23
+ scheme: E(a.securitySchemes[l]),
24
+ name: l,
25
+ scopes: e
25
26
  }))
26
- ), w = P(""), C = N(() => $.value.length > 1), F = (o, t) => {
27
- const e = Q(o), a = t.description ? `: ${t.description}` : "";
28
- switch (t.type) {
27
+ ), x = Q(""), U = T(() => g.value.length > 1), $ = (l, e) => {
28
+ const t = q(l), o = e.description ? `: ${e.description}` : "";
29
+ switch (e.type) {
29
30
  case "apiKey":
30
- return `${e}${a || `: ${t.in}`}`;
31
+ return `${t}${o || `: ${e.in}`}`;
31
32
  case "oauth2": {
32
- const k = Object.keys(t.flows ?? {})[0], s = w.value || k;
33
- return `${e}: ${s}${a}`;
33
+ const V = Object.keys(e.flows ?? {})[0], s = x.value || V;
34
+ return `${t}: ${s}${o}`;
34
35
  }
35
36
  case "http":
36
- return `${e}: ${t.scheme}${a}`;
37
+ return `${t}: ${e.scheme}${o}`;
37
38
  default:
38
- return `${e}${a || `: ${t.type}`}`;
39
+ return `${t}${o || `: ${e.type}`}`;
39
40
  }
40
- }, T = (o, t) => w.value === o || t === 0 && !w.value, B = () => n.isStatic && "border-t", h = (o, t, e) => x(
41
- "update:securityScheme",
42
- {
43
- type: "http",
44
- [o]: t
45
- },
46
- e
47
- ), j = (o, t, e) => x(
48
- "update:securityScheme",
49
- {
50
- type: "apiKey",
51
- [o]: t
52
- },
53
- e
54
- ), M = (o, t) => {
55
- x("update:selectedScopes", {
56
- id: Object.keys(n.selectedSecuritySchemas),
57
- name: o,
58
- ...t
41
+ }, C = (l, e) => x.value === l || e === 0 && !x.value, B = () => a.isStatic && "border-t", S = (l, e) => a.eventBus.emit("auth:update:security-scheme-secrets", {
42
+ payload: { type: "http", ...l },
43
+ name: e
44
+ }), I = (l, e) => a.eventBus.emit("auth:update:security-scheme-secrets", {
45
+ payload: { type: "apiKey", ...l },
46
+ name: e
47
+ }), A = (l, e) => a.eventBus.emit("auth:update:security-scheme", {
48
+ payload: { type: "apiKey", ...l },
49
+ name: e
50
+ }), M = (l, e) => {
51
+ z("update:selectedScopes", {
52
+ id: Object.keys(a.selectedSecuritySchemas),
53
+ name: l,
54
+ ...e
59
55
  });
60
- }, O = (o, t) => {
61
- const e = "floating-bg text-c-3 relative cursor-pointer border-b border-transparent py-1 text-base font-medium";
62
- return T(o, t) ? `${e} !text-c-1 !rounded-none border-b !border-current ${n.isStatic ? "opacity-100" : ""}` : e;
56
+ }, O = (l, e) => {
57
+ const t = "floating-bg text-c-3 relative cursor-pointer border-b border-transparent py-1 text-base font-medium";
58
+ return C(l, e) ? `${t} !text-c-1 !rounded-none border-b !border-current ${a.isStatic ? "opacity-100" : ""}` : t;
63
59
  };
64
- return (o, t) => (l(!0), u(c, null, g($.value, ({ scheme: e, name: a, scopes: k }) => (l(), u(c, { key: a }, [
65
- C.value && e ? (l(), y(d(m), { key: 0 }, {
60
+ return (l, e) => (n(!0), u(c, null, k(g.value, ({ scheme: t, name: o, scopes: V }) => (n(), u(c, { key: o }, [
61
+ U.value && t ? (n(), f(d(m), { key: 0 }, {
66
62
  default: r(() => [
67
- i(d(I), {
68
- "aria-label": F(a, e),
63
+ i(d(N), {
64
+ "aria-label": $(o, t),
69
65
  class: "text-c-2 group/auth flex items-center leading-[22px] whitespace-nowrap outline-none hover:whitespace-normal"
70
66
  }, {
71
67
  default: r(() => [
72
- V("p", E, R(F(a, e)), 1)
68
+ w("p", L, j($(o, t)), 1)
73
69
  ]),
74
70
  _: 2
75
71
  }, 1032, ["aria-label"])
76
72
  ]),
77
73
  _: 2
78
- }, 1024)) : f("", !0),
79
- e?.description && !C.value ? (l(), y(d(m), { key: 1 }, {
74
+ }, 1024)) : v("", !0),
75
+ t?.description && !U.value ? (n(), f(d(m), { key: 1 }, {
80
76
  default: r(() => [
81
- i(d(I), {
82
- "aria-label": e.description,
77
+ i(d(N), {
78
+ "aria-label": t.description,
83
79
  class: "max-h-[auto]"
84
80
  }, {
85
81
  default: r(() => [
86
- i(d(_), {
82
+ i(d(D), {
87
83
  class: "auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25",
88
- value: e.description
84
+ value: t.description
89
85
  }, null, 8, ["value"])
90
86
  ]),
91
87
  _: 2
92
88
  }, 1032, ["aria-label"])
93
89
  ]),
94
90
  _: 2
95
- }, 1024)) : f("", !0),
96
- e?.type === "http" ? (l(), u(c, { key: 2 }, [
97
- e.scheme === "bearer" ? (l(), y(d(m), { key: 0 }, {
91
+ }, 1024)) : v("", !0),
92
+ t?.type === "http" ? (n(), u(c, { key: 2 }, [
93
+ t.scheme === "bearer" ? (n(), f(d(m), { key: 0 }, {
98
94
  default: r(() => [
99
95
  i(b, {
100
96
  containerClass: B(),
101
- environment: n.environment,
102
- modelValue: e["x-scalar-secret-token"],
97
+ environment: a.environment,
98
+ modelValue: t["x-scalar-secret-token"],
103
99
  placeholder: "Token",
104
100
  type: "password",
105
- "onUpdate:modelValue": (s) => h("x-scalar-secret-token", s, a)
101
+ "onUpdate:modelValue": (s) => S({ "x-scalar-secret-token": s }, o)
106
102
  }, {
107
- default: r(() => [...t[0] || (t[0] = [
108
- v(" Bearer Token ", -1)
103
+ default: r(() => [...e[0] || (e[0] = [
104
+ y(" Bearer Token ", -1)
109
105
  ])]),
110
106
  _: 1
111
107
  }, 8, ["containerClass", "environment", "modelValue", "onUpdate:modelValue"])
112
108
  ]),
113
109
  _: 2
114
- }, 1024)) : e?.scheme === "basic" ? (l(), u(c, { key: 1 }, [
110
+ }, 1024)) : t?.scheme === "basic" ? (n(), u(c, { key: 1 }, [
115
111
  i(d(m), null, {
116
112
  default: r(() => [
117
113
  i(b, {
118
114
  class: "text-c-2",
119
- environment: n.environment,
120
- modelValue: e["x-scalar-secret-username"],
115
+ environment: a.environment,
116
+ modelValue: t["x-scalar-secret-username"],
121
117
  placeholder: "janedoe",
122
118
  required: "",
123
- "onUpdate:modelValue": (s) => h("x-scalar-secret-username", s, a)
119
+ "onUpdate:modelValue": (s) => S({ "x-scalar-secret-username": s }, o)
124
120
  }, {
125
- default: r(() => [...t[1] || (t[1] = [
126
- v(" Username ", -1)
121
+ default: r(() => [...e[1] || (e[1] = [
122
+ y(" Username ", -1)
127
123
  ])]),
128
124
  _: 1
129
125
  }, 8, ["environment", "modelValue", "onUpdate:modelValue"])
@@ -133,33 +129,33 @@ const E = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
133
129
  i(d(m), null, {
134
130
  default: r(() => [
135
131
  i(b, {
136
- environment: n.environment,
137
- modelValue: e["x-scalar-secret-password"],
132
+ environment: a.environment,
133
+ modelValue: t["x-scalar-secret-password"],
138
134
  placeholder: "********",
139
135
  type: "password",
140
- "onUpdate:modelValue": (s) => h("x-scalar-secret-password", s, a)
136
+ "onUpdate:modelValue": (s) => S({ "x-scalar-secret-password": s }, o)
141
137
  }, {
142
- default: r(() => [...t[2] || (t[2] = [
143
- v(" Password ", -1)
138
+ default: r(() => [...e[2] || (e[2] = [
139
+ y(" Password ", -1)
144
140
  ])]),
145
141
  _: 1
146
142
  }, 8, ["environment", "modelValue", "onUpdate:modelValue"])
147
143
  ]),
148
144
  _: 2
149
145
  }, 1024)
150
- ], 64)) : f("", !0)
151
- ], 64)) : e?.type === "apiKey" ? (l(), u(c, { key: 3 }, [
146
+ ], 64)) : v("", !0)
147
+ ], 64)) : t?.type === "apiKey" ? (n(), u(c, { key: 3 }, [
152
148
  i(d(m), null, {
153
149
  default: r(() => [
154
150
  i(b, {
155
151
  containerClass: B(),
156
- environment: n.environment,
157
- modelValue: e.name,
152
+ environment: a.environment,
153
+ modelValue: t.name,
158
154
  placeholder: "api-key",
159
- "onUpdate:modelValue": (s) => j("name", s, a)
155
+ "onUpdate:modelValue": (s) => A({ name: s }, o)
160
156
  }, {
161
- default: r(() => [...t[3] || (t[3] = [
162
- v(" Name ", -1)
157
+ default: r(() => [...e[3] || (e[3] = [
158
+ y(" Name ", -1)
163
159
  ])]),
164
160
  _: 1
165
161
  }, 8, ["containerClass", "environment", "modelValue", "onUpdate:modelValue"])
@@ -169,58 +165,59 @@ const E = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
169
165
  i(d(m), null, {
170
166
  default: r(() => [
171
167
  i(b, {
172
- environment: n.environment,
173
- modelValue: e["x-scalar-secret-token"],
168
+ environment: a.environment,
169
+ modelValue: t["x-scalar-secret-token"],
174
170
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
175
171
  type: "password",
176
- "onUpdate:modelValue": (s) => j("x-scalar-secret-token", s, a)
172
+ "onUpdate:modelValue": (s) => I({ "x-scalar-secret-token": s }, o)
177
173
  }, {
178
- default: r(() => [...t[4] || (t[4] = [
179
- v(" Value ", -1)
174
+ default: r(() => [...e[4] || (e[4] = [
175
+ y(" Value ", -1)
180
176
  ])]),
181
177
  _: 1
182
178
  }, 8, ["environment", "modelValue", "onUpdate:modelValue"])
183
179
  ]),
184
180
  _: 2
185
181
  }, 1024)
186
- ], 64)) : e?.type === "oauth2" ? (l(), u(c, { key: 4 }, [
187
- Object.keys(e.flows).length > 1 ? (l(), y(d(m), { key: 0 }, {
182
+ ], 64)) : t?.type === "oauth2" ? (n(), u(c, { key: 4 }, [
183
+ Object.keys(t.flows).length > 1 ? (n(), f(d(m), { key: 0 }, {
188
184
  default: r(() => [
189
- V("div", H, [
190
- V("div", L, [
191
- (l(!0), u(c, null, g(e.flows, (s, p, U) => (l(), u("button", {
185
+ w("div", G, [
186
+ w("div", J, [
187
+ (n(!0), u(c, null, k(t.flows, (s, p, h) => (n(), u("button", {
192
188
  key: p,
193
- class: z(O(p, U)),
189
+ class: K(O(p, h)),
194
190
  type: "button",
195
- onClick: (S) => w.value = p
191
+ onClick: (F) => x.value = p
196
192
  }, [
197
- V("span", J, R(p), 1)
198
- ], 10, G))), 128))
193
+ w("span", X, j(p), 1)
194
+ ], 10, W))), 128))
199
195
  ])
200
196
  ])
201
197
  ]),
202
198
  _: 2
203
- }, 1024)) : f("", !0),
204
- (l(!0), u(c, null, g(e.flows, (s, p, U) => (l(), u(c, { key: p }, [
205
- T(p, U) ? (l(), y(D, {
199
+ }, 1024)) : v("", !0),
200
+ (n(!0), u(c, null, k(t.flows, (s, p, h) => (n(), u(c, { key: p }, [
201
+ C(p, h) ? (n(), f(H, {
206
202
  key: 0,
207
- environment: n.environment,
208
- flows: e.flows,
209
- proxyUrl: n.proxyUrl,
210
- selectedScopes: k,
211
- server: n.server,
203
+ environment: a.environment,
204
+ eventBus: a.eventBus,
205
+ flows: t.flows,
206
+ name: o,
207
+ proxyUrl: a.proxyUrl,
208
+ selectedScopes: V,
209
+ server: a.server,
212
210
  type: p,
213
- "onUpdate:securityScheme": (S) => x("update:securityScheme", S, a),
214
- "onUpdate:selectedScopes": (S) => M(a, S)
215
- }, null, 8, ["environment", "flows", "proxyUrl", "selectedScopes", "server", "type", "onUpdate:securityScheme", "onUpdate:selectedScopes"])) : f("", !0)
211
+ "onUpdate:selectedScopes": (F) => M(o, F)
212
+ }, null, 8, ["environment", "eventBus", "flows", "name", "proxyUrl", "selectedScopes", "server", "type", "onUpdate:selectedScopes"])) : v("", !0)
216
213
  ], 64))), 128))
217
- ], 64)) : e?.type === "openIdConnect" ? (l(), u("div", {
214
+ ], 64)) : t?.type === "openIdConnect" ? (n(), u("div", {
218
215
  key: 5,
219
- 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": n.isStatic }])
220
- }, " Coming soon ", 2)) : f("", !0)
216
+ class: K(["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": a.isStatic }])
217
+ }, " Coming soon ", 2)) : v("", !0)
221
218
  ], 64))), 128));
222
219
  }
223
220
  });
224
221
  export {
225
- le as default
222
+ oe as default
226
223
  };
@@ -1 +1 @@
1
- {"version":3,"file":"auth-options.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/auth-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAExG,KAAK,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAAA;AAElE,wCAAwC;AACxC,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAqHlD,CAAA"}
1
+ {"version":3,"file":"auth-options.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/auth-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAExG,KAAK,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAAA;AAElE,wCAAwC;AACxC,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA6FlD,CAAA"}
@@ -4,8 +4,7 @@ const e = {
4
4
  payload: {
5
5
  type: "apiKey",
6
6
  in: "cookie",
7
- name: "apiKeyCookie",
8
- "x-scalar-secret-token": ""
7
+ name: "apiKeyCookie"
9
8
  }
10
9
  },
11
10
  apiKeyHeader: {
@@ -13,8 +12,7 @@ const e = {
13
12
  payload: {
14
13
  type: "apiKey",
15
14
  in: "header",
16
- name: "apiKeyHeader",
17
- "x-scalar-secret-token": ""
15
+ name: "apiKeyHeader"
18
16
  }
19
17
  },
20
18
  apiKeyQuery: {
@@ -22,28 +20,21 @@ const e = {
22
20
  payload: {
23
21
  type: "apiKey",
24
22
  in: "query",
25
- name: "apiKeyQuery",
26
- "x-scalar-secret-token": ""
23
+ name: "apiKeyQuery"
27
24
  }
28
25
  },
29
26
  httpBasic: {
30
27
  label: "HTTP Basic",
31
28
  payload: {
32
29
  type: "http",
33
- scheme: "basic",
34
- "x-scalar-secret-token": "",
35
- "x-scalar-secret-username": "",
36
- "x-scalar-secret-password": ""
30
+ scheme: "basic"
37
31
  }
38
32
  },
39
33
  httpBearer: {
40
34
  label: "HTTP Bearer",
41
35
  payload: {
42
36
  type: "http",
43
- scheme: "bearer",
44
- "x-scalar-secret-token": "",
45
- "x-scalar-secret-username": "",
46
- "x-scalar-secret-password": ""
37
+ scheme: "bearer"
47
38
  }
48
39
  },
49
40
  oauth2Implicit: {
@@ -54,9 +45,6 @@ const e = {
54
45
  implicit: {
55
46
  authorizationUrl: "",
56
47
  refreshUrl: "",
57
- "x-scalar-secret-client-id": "",
58
- "x-scalar-secret-redirect-uri": "",
59
- "x-scalar-secret-token": "",
60
48
  scopes: {}
61
49
  }
62
50
  }
@@ -70,11 +58,6 @@ const e = {
70
58
  password: {
71
59
  tokenUrl: "",
72
60
  refreshUrl: "",
73
- "x-scalar-secret-client-id": "",
74
- "x-scalar-secret-username": "",
75
- "x-scalar-secret-password": "",
76
- "x-scalar-secret-token": "",
77
- "x-scalar-secret-client-secret": "",
78
61
  scopes: {}
79
62
  }
80
63
  }
@@ -88,9 +71,6 @@ const e = {
88
71
  clientCredentials: {
89
72
  tokenUrl: "",
90
73
  refreshUrl: "",
91
- "x-scalar-secret-client-id": "",
92
- "x-scalar-secret-token": "",
93
- "x-scalar-secret-client-secret": "",
94
74
  scopes: {}
95
75
  }
96
76
  }
@@ -105,10 +85,6 @@ const e = {
105
85
  authorizationUrl: "",
106
86
  tokenUrl: "",
107
87
  refreshUrl: "",
108
- "x-scalar-secret-client-id": "",
109
- "x-scalar-secret-client-secret": "",
110
- "x-scalar-secret-token": "",
111
- "x-scalar-secret-redirect-uri": "",
112
88
  "x-usePkce": "no",
113
89
  scopes: {}
114
90
  }