@scalar/api-client 2.7.0 → 2.8.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 (209) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +1 -1
  3. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  4. package/dist/components/DataTable/DataTableInputSelect.vue.js +21 -22
  5. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  6. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +4 -5
  7. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  8. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +13 -14
  9. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  10. package/dist/components/Sidebar/SidebarButton.vue.js +0 -1
  11. package/dist/hooks/useClientConfig.d.ts +30 -36
  12. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  13. package/dist/hooks/useResponseBody.js +6 -6
  14. package/dist/layouts/App/create-api-client-app.d.ts +16 -16
  15. package/dist/layouts/Modal/create-api-client-modal.d.ts +32 -32
  16. package/dist/layouts/Web/create-api-client-web.d.ts +16 -16
  17. package/dist/libs/create-client.d.ts +16 -16
  18. package/dist/libs/hot-keys.d.ts +1 -1
  19. package/dist/libs/send-request/create-request-operation.d.ts +2 -2
  20. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  21. package/dist/libs/send-request/create-request-operation.js +19 -19
  22. package/dist/plugins/plugin-manager.d.ts +2 -2
  23. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  24. package/dist/store/active-entities.d.ts +1 -1
  25. package/dist/store/store.d.ts +16 -16
  26. package/dist/store/workspace.d.ts +12 -12
  27. package/dist/style.css +1 -1
  28. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
  29. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +2 -3
  30. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  31. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  32. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +70 -71
  33. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +1 -1
  34. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  35. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  36. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +31 -32
  37. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +2 -0
  38. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +1 -0
  39. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +39 -0
  40. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -0
  41. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +7 -0
  42. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +226 -0
  43. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +66 -0
  44. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -0
  45. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +7 -0
  46. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +200 -0
  47. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +2 -0
  48. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +1 -0
  49. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +51 -0
  50. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -0
  51. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +89 -0
  52. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue2.js +4 -0
  53. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +2 -0
  54. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +1 -0
  55. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +46 -0
  56. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -0
  57. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +7 -0
  58. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +85 -0
  59. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +2 -0
  60. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +1 -0
  61. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +43 -0
  62. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -0
  63. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +193 -0
  64. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue2.js +4 -0
  65. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +2 -0
  66. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +1 -0
  67. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts +8 -0
  68. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts.map +1 -0
  69. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.js +7 -0
  70. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue2.js +62 -0
  71. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +2 -0
  72. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +1 -0
  73. package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts +5 -0
  74. package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts.map +1 -0
  75. package/dist/v2/blocks/scalar-operation-block/helpers/files.js +7 -0
  76. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts +8 -0
  77. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts.map +1 -0
  78. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.js +9 -0
  79. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +2 -0
  80. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +1 -0
  81. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts +6 -0
  82. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts.map +1 -0
  83. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.js +12 -0
  84. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +2 -0
  85. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +1 -0
  86. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts +6 -0
  87. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts.map +1 -0
  88. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.js +6 -0
  89. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +2 -0
  90. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +1 -0
  91. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts +3 -0
  92. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts.map +1 -0
  93. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.js +5 -0
  94. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts +5 -0
  95. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts.map +1 -0
  96. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.js +7 -0
  97. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +2 -0
  98. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +1 -0
  99. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts +11 -0
  100. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts.map +1 -0
  101. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.js +32 -0
  102. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +2 -0
  103. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +1 -0
  104. package/dist/v2/blocks/scalar-operation-block/index.d.ts +2 -0
  105. package/dist/v2/blocks/scalar-operation-block/index.d.ts.map +1 -0
  106. package/dist/v2/blocks/scalar-operation-block/index.js +4 -0
  107. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +2 -0
  108. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +1 -0
  109. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +20 -0
  110. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -0
  111. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +98 -0
  112. package/dist/v2/blocks/scalar-response-block/components/Headers.vue2.js +4 -0
  113. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +2 -0
  114. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +1 -0
  115. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +47 -0
  116. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -0
  117. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +7 -0
  118. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +182 -0
  119. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts +12 -0
  120. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -0
  121. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +7 -0
  122. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +88 -0
  123. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +2 -0
  124. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +1 -0
  125. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts +8 -0
  126. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -0
  127. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.js +36 -0
  128. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue2.js +4 -0
  129. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts +13 -0
  130. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts.map +1 -0
  131. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.js +14 -0
  132. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +2 -0
  133. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +1 -0
  134. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts +10 -0
  135. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -0
  136. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.js +7 -0
  137. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue2.js +64 -0
  138. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts +8 -0
  139. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -0
  140. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.js +7 -0
  141. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue2.js +41 -0
  142. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +2 -0
  143. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +1 -0
  144. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts +6 -0
  145. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -0
  146. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +74 -0
  147. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue2.js +4 -0
  148. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts +10 -0
  149. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -0
  150. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.js +25 -0
  151. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue2.js +4 -0
  152. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts +11 -0
  153. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -0
  154. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +52 -0
  155. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue3.js +5 -0
  156. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +2 -0
  157. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +1 -0
  158. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts +9 -0
  159. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -0
  160. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +54 -0
  161. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue2.js +4 -0
  162. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts +23 -0
  163. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts.map +1 -0
  164. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.js +7 -0
  165. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue2.js +88 -0
  166. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts +8 -0
  167. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -0
  168. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.js +7 -0
  169. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue2.js +41 -0
  170. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts +10 -0
  171. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -0
  172. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.js +61 -0
  173. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue2.js +4 -0
  174. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts +5 -0
  175. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts.map +1 -0
  176. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.js +18 -0
  177. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +2 -0
  178. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +1 -0
  179. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts +4 -0
  180. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts.map +1 -0
  181. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.js +12 -0
  182. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +2 -0
  183. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +1 -0
  184. package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts +20 -0
  185. package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts.map +1 -0
  186. package/dist/v2/blocks/scalar-response-block/helpers/media-types.js +127 -0
  187. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +2 -0
  188. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +1 -0
  189. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts +17 -0
  190. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts.map +1 -0
  191. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.js +16 -0
  192. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +2 -0
  193. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +1 -0
  194. package/dist/v2/blocks/scalar-response-block/index.d.ts +2 -0
  195. package/dist/v2/blocks/scalar-response-block/index.d.ts.map +1 -0
  196. package/dist/v2/blocks/scalar-response-block/index.js +4 -0
  197. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  198. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  199. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +31 -32
  200. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  201. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  202. package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -1
  203. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  204. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  205. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +13 -14
  206. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  207. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  208. package/dist/views/Request/components/WorkspaceDropdown.vue.js +5 -6
  209. package/package.json +17 -17
@@ -0,0 +1,46 @@
1
+ import type { Environment } from '@scalar/oas-utils/entities/environment';
2
+ import type { EnvVariable } from '../../../../store/active-entities.js';
3
+ import { type TableRow } from '../../../../v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js';
4
+ type __VLS_Props = {
5
+ data: TableRow[];
6
+ isReadOnly?: boolean;
7
+ /** Hide the enabled column */
8
+ hasCheckboxDisabled?: boolean;
9
+ invalidParams?: Set<string>;
10
+ label?: string;
11
+ showUploadButton?: boolean;
12
+ /** TODO: remove once we migrate */
13
+ environment: Environment;
14
+ envVariables: EnvVariable[];
15
+ };
16
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
+ updateRow: (index: number, payload: Partial<{
18
+ key: string;
19
+ value: string;
20
+ isEnabled: boolean;
21
+ }>) => any;
22
+ addRow: (payload: Partial<{
23
+ key: string;
24
+ value: string;
25
+ isEnabled: boolean;
26
+ }>) => any;
27
+ deleteRow: (index: number) => any;
28
+ uploadFile: (index?: number | undefined) => any;
29
+ removeFile: (index: number) => any;
30
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
31
+ onUpdateRow?: ((index: number, payload: Partial<{
32
+ key: string;
33
+ value: string;
34
+ isEnabled: boolean;
35
+ }>) => any) | undefined;
36
+ onAddRow?: ((payload: Partial<{
37
+ key: string;
38
+ value: string;
39
+ isEnabled: boolean;
40
+ }>) => any) | undefined;
41
+ onDeleteRow?: ((index: number) => any) | undefined;
42
+ onUploadFile?: ((index?: number | undefined) => any) | undefined;
43
+ onRemoveFile?: ((index: number) => any) | undefined;
44
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
45
+ export default _default;
46
+ //# sourceMappingURL=OperationTable.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationTable.vue"],"names":[],"mappings":"AA2JA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAMzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAA0B,EACxB,KAAK,QAAQ,EACd,MAAM,qEAAqE,CAAA;AAE5E,KAAK,WAAW,GAAG;IACf,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B,mCAAmC;IACnC,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;aAgBwB,MAAM;eAAS,MAAM;mBAAa,OAAO;;;aALzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;;aAKzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;aALzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;AAoNrE,wBAOG"}
@@ -0,0 +1,7 @@
1
+ import o from "./OperationTable.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5ef78e55"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,85 @@
1
+ import { defineComponent as h, computed as y, createBlock as p, openBlock as r, withCtx as o, createVNode as t, createElementBlock as B, createTextVNode as s, toDisplayString as u, Fragment as D, renderList as F } from "vue";
2
+ import k from "../../../../components/DataTable/DataTable.vue.js";
3
+ import m from "../../../../components/DataTable/DataTableHeader.vue.js";
4
+ import U from "../../../../components/DataTable/DataTableRow.vue.js";
5
+ import V from "./OperationTableRow.vue.js";
6
+ const T = /* @__PURE__ */ h({
7
+ __name: "OperationTable",
8
+ props: {
9
+ data: {},
10
+ isReadOnly: { type: Boolean },
11
+ hasCheckboxDisabled: { type: Boolean },
12
+ invalidParams: {},
13
+ label: {},
14
+ showUploadButton: { type: Boolean },
15
+ environment: {},
16
+ envVariables: {}
17
+ },
18
+ emits: ["addRow", "updateRow", "deleteRow", "uploadFile", "removeFile"],
19
+ setup(n, { emit: b }) {
20
+ const a = b, v = (e) => {
21
+ a("uploadFile", e);
22
+ }, c = ["36px", "", "", "auto"], f = y(() => {
23
+ const e = n.data.at(-1);
24
+ return !e || e.name !== "" && e.value !== "" ? [...n.data, { name: "", value: "", isDisabled: !0 }] : n.data;
25
+ }), R = ({
26
+ index: e,
27
+ payload: i
28
+ }) => {
29
+ if (e >= n.data.length) {
30
+ a("addRow", i);
31
+ return;
32
+ }
33
+ a("updateRow", e, i);
34
+ };
35
+ return (e, i) => (r(), p(k, {
36
+ class: "group/table flex-1",
37
+ columns: c
38
+ }, {
39
+ default: o(() => [
40
+ t(U, { class: "sr-only !block" }, {
41
+ default: o(() => [
42
+ t(m, null, {
43
+ default: o(() => [
44
+ s(u(e.label) + " Enabled", 1)
45
+ ]),
46
+ _: 1
47
+ }),
48
+ t(m, null, {
49
+ default: o(() => [
50
+ s(u(e.label) + " Key", 1)
51
+ ]),
52
+ _: 1
53
+ }),
54
+ t(m, null, {
55
+ default: o(() => [
56
+ s(u(e.label) + " Value", 1)
57
+ ]),
58
+ _: 1
59
+ })
60
+ ]),
61
+ _: 1
62
+ }),
63
+ (r(!0), B(D, null, F(f.value, (w, l) => (r(), p(V, {
64
+ key: l,
65
+ data: w,
66
+ envVariables: e.envVariables,
67
+ environment: e.environment,
68
+ hasCheckboxDisabled: e.hasCheckboxDisabled,
69
+ invalidParams: e.invalidParams,
70
+ isReadOnly: e.isReadOnly,
71
+ label: e.label,
72
+ showUploadButton: e.showUploadButton,
73
+ onDeleteRow: (d) => a("deleteRow", l),
74
+ onRemoveFile: (d) => a("removeFile", l),
75
+ onUpdateRow: (d) => R({ index: l, payload: d }),
76
+ onUploadFile: () => v(l)
77
+ }, null, 8, ["data", "envVariables", "environment", "hasCheckboxDisabled", "invalidParams", "isReadOnly", "label", "showUploadButton", "onDeleteRow", "onRemoveFile", "onUpdateRow", "onUploadFile"]))), 128))
78
+ ]),
79
+ _: 1
80
+ }));
81
+ }
82
+ });
83
+ export {
84
+ T as default
85
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=OperationTableRow.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationTableRow.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationTableRow.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ import type { Environment } from '@scalar/oas-utils/entities/environment';
2
+ import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
+ import type { EnvVariable } from '../../../../store/index.js';
4
+ type __VLS_Props = {
5
+ data: TableRow;
6
+ isReadOnly?: boolean;
7
+ hasCheckboxDisabled?: boolean;
8
+ invalidParams?: Set<string>;
9
+ label?: string;
10
+ /** TODO: remove as soon as we migrate to the new store */
11
+ environment: Environment;
12
+ envVariables: EnvVariable[];
13
+ showUploadButton?: boolean;
14
+ };
15
+ export type TableRow = {
16
+ name: string;
17
+ value: string | File | null;
18
+ globalRoute?: string;
19
+ isDisabled?: boolean;
20
+ schema?: SchemaObject;
21
+ isRequired?: boolean;
22
+ };
23
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
24
+ updateRow: (payload: Partial<{
25
+ key: string;
26
+ value: string;
27
+ isEnabled: boolean;
28
+ }>) => any;
29
+ deleteRow: () => any;
30
+ uploadFile: () => any;
31
+ removeFile: () => any;
32
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
33
+ onUpdateRow?: ((payload: Partial<{
34
+ key: string;
35
+ value: string;
36
+ isEnabled: boolean;
37
+ }>) => any) | undefined;
38
+ onDeleteRow?: (() => any) | undefined;
39
+ onUploadFile?: (() => any) | undefined;
40
+ onRemoveFile?: (() => any) | undefined;
41
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
+ export default _default;
43
+ //# sourceMappingURL=OperationTableRow.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationTableRow.vue"],"names":[],"mappings":"AAwNA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAShG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0DAA0D;IAC1D,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;AAoBF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;;;aAf2B,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;;aAAzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;AA2erE,wBAOG"}
@@ -0,0 +1,193 @@
1
+ import { defineComponent as z, computed as r, resolveComponent as S, createBlock as u, openBlock as s, unref as t, normalizeClass as U, withCtx as i, createVNode as d, createCommentVNode as b, createElementVNode as m, createElementBlock as p, Fragment as $, toDisplayString as x } from "vue";
2
+ import { ScalarTooltip as D, ScalarIcon as c, ScalarButton as y } from "@scalar/components";
3
+ import { ScalarIconTrash as I } from "@scalar/icons";
4
+ import E from "./OperationTableTooltip.vue.js";
5
+ import { validateParameter as O } from "../helpers/validate-parameter.js";
6
+ import q from "../../../../components/DataTable/DataTableRow.vue.js";
7
+ import j from "../../../../components/DataTable/DataTableCheckbox.vue.js";
8
+ import v from "../../../../components/DataTable/DataTableCell.vue.js";
9
+ import h from "../../../../components/CodeInput/CodeInput.vue.js";
10
+ const G = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center justify-center overflow-hidden p-1" }, N = {
11
+ key: 1,
12
+ class: "p-0.5"
13
+ }, X = /* @__PURE__ */ z({
14
+ __name: "OperationTableRow",
15
+ props: {
16
+ data: {},
17
+ isReadOnly: { type: Boolean },
18
+ hasCheckboxDisabled: { type: Boolean },
19
+ invalidParams: {},
20
+ label: {},
21
+ environment: {},
22
+ envVariables: {},
23
+ showUploadButton: { type: Boolean }
24
+ },
25
+ emits: ["updateRow", "deleteRow", "uploadFile", "removeFile"],
26
+ setup(l, { emit: k }) {
27
+ const n = k, V = r(() => l.data.schema?.default), w = r(() => l.data.schema?.enum), R = r(
28
+ () => l.data.schema && "minimum" in l.data.schema ? l.data.schema.minimum : void 0
29
+ ), g = r(
30
+ () => l.data.schema && "maximum" in l.data.schema ? l.data.schema.maximum : void 0
31
+ ), B = r(
32
+ () => l.data.schema && "type" in l.data.schema ? l.data.schema.type : void 0
33
+ ), f = r(
34
+ () => O(l.data.schema, l.data.value)
35
+ ), C = (e) => e instanceof File, F = r({
36
+ get: () => l.data.value instanceof File ? l.data.value.name : l.data.value === null ? "" : l.data.value,
37
+ set: (e) => {
38
+ typeof e == "string" && n("updateRow", { value: e });
39
+ }
40
+ });
41
+ return (e, a) => {
42
+ const T = S("RouterLink");
43
+ return s(), u(t(q), {
44
+ id: e.data.name,
45
+ class: U({
46
+ alert: f.value.ok === !1,
47
+ error: f.value.ok === !1 && e.invalidParams?.has(e.data.name)
48
+ })
49
+ }, {
50
+ default: i(() => [
51
+ e.data.globalRoute !== void 0 ? (s(), u(T, {
52
+ key: 0,
53
+ class: "text-c-2 flex items-center justify-center border-t !border-r",
54
+ to: e.data.globalRoute ?? {}
55
+ }, {
56
+ default: i(() => [
57
+ a[8] || (a[8] = m("span", { class: "sr-only" }, "Global", -1)),
58
+ d(t(D), {
59
+ content: "Global cookies are shared across the whole workspace.",
60
+ placement: "top"
61
+ }, {
62
+ default: i(() => [
63
+ d(t(c), {
64
+ class: "text-c-1",
65
+ icon: "Globe",
66
+ size: "xs",
67
+ tabindex: "0"
68
+ })
69
+ ]),
70
+ _: 1
71
+ })
72
+ ]),
73
+ _: 1,
74
+ __: [8]
75
+ }, 8, ["to"])) : (s(), u(t(j), {
76
+ key: 1,
77
+ class: "!border-r",
78
+ disabled: e.hasCheckboxDisabled ?? !1,
79
+ modelValue: !e.data.isDisabled,
80
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => n("updateRow", { isEnabled: o }))
81
+ }, null, 8, ["disabled", "modelValue"])),
82
+ d(t(v), null, {
83
+ default: i(() => [
84
+ d(t(h), {
85
+ "aria-label": `${e.label} Key`,
86
+ disableCloseBrackets: "",
87
+ disabled: e.isReadOnly,
88
+ disableEnter: "",
89
+ disableTabIndent: "",
90
+ envVariables: e.envVariables,
91
+ environment: e.environment,
92
+ lineWrapping: "",
93
+ modelValue: e.data.name,
94
+ placeholder: "Key",
95
+ required: !!e.data.isRequired,
96
+ onSelectVariable: a[1] || (a[1] = (o) => n("updateRow", { key: o })),
97
+ "onUpdate:modelValue": a[2] || (a[2] = (o) => n("updateRow", { key: o }))
98
+ }, null, 8, ["aria-label", "disabled", "envVariables", "environment", "modelValue", "required"])
99
+ ]),
100
+ _: 1
101
+ }),
102
+ d(t(v), null, {
103
+ default: i(() => [
104
+ d(t(h), {
105
+ "aria-label": `${e.label} Value`,
106
+ class: "pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10",
107
+ default: V.value,
108
+ disableCloseBrackets: "",
109
+ disabled: e.isReadOnly,
110
+ disableEnter: "",
111
+ disableTabIndent: "",
112
+ enum: w.value ?? [],
113
+ envVariables: e.envVariables,
114
+ environment: e.environment,
115
+ lineWrapping: "",
116
+ max: g.value,
117
+ min: R.value,
118
+ modelValue: F.value,
119
+ placeholder: "Value",
120
+ type: B.value,
121
+ onSelectVariable: a[4] || (a[4] = (o) => n("updateRow", { value: o })),
122
+ "onUpdate:modelValue": a[5] || (a[5] = (o) => n("updateRow", { value: o }))
123
+ }, {
124
+ icon: i(() => [
125
+ (e.data.name || e.data.value) && !e.data.isRequired ? (s(), u(t(y), {
126
+ key: 0,
127
+ class: "text-c-2 hover:text-c-1 hover:bg-b-2 z-context -mr-0.5 hidden h-fit rounded p-1 group-hover:flex group-has-[.cm-focused]:flex",
128
+ size: "sm",
129
+ variant: "ghost",
130
+ onClick: a[3] || (a[3] = (o) => n("deleteRow"))
131
+ }, {
132
+ default: i(() => [
133
+ d(t(I), { class: "size-3.5" })
134
+ ]),
135
+ _: 1
136
+ })) : b("", !0),
137
+ e.data.schema ? (s(), u(E, {
138
+ key: 1,
139
+ schema: e.data.schema,
140
+ value: e.data.value
141
+ }, null, 8, ["schema", "value"])) : b("", !0)
142
+ ]),
143
+ _: 1
144
+ }, 8, ["aria-label", "default", "disabled", "enum", "envVariables", "environment", "max", "min", "modelValue", "type"])
145
+ ]),
146
+ _: 1
147
+ }),
148
+ e.showUploadButton ? (s(), u(t(v), {
149
+ key: 2,
150
+ class: "group/upload flex items-center justify-center whitespace-nowrap"
151
+ }, {
152
+ default: i(() => [
153
+ C(e.data.value) ? (s(), p($, { key: 0 }, [
154
+ m("div", G, [
155
+ m("span", null, x(e.data.value.name), 1)
156
+ ]),
157
+ m("button", {
158
+ class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
159
+ type: "button",
160
+ onClick: a[6] || (a[6] = (o) => n("removeFile"))
161
+ }, " Delete ")
162
+ ], 64)) : (s(), p("div", N, [
163
+ d(t(y), {
164
+ class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
165
+ size: "sm",
166
+ variant: "outlined",
167
+ onClick: a[7] || (a[7] = (o) => n("uploadFile"))
168
+ }, {
169
+ default: i(() => [
170
+ a[9] || (a[9] = m("span", null, "Upload File", -1)),
171
+ d(t(c), {
172
+ class: "ml-1",
173
+ icon: "Upload",
174
+ size: "xs",
175
+ thickness: "2.5"
176
+ })
177
+ ]),
178
+ _: 1,
179
+ __: [9]
180
+ })
181
+ ]))
182
+ ]),
183
+ _: 1
184
+ })) : b("", !0)
185
+ ]),
186
+ _: 1
187
+ }, 8, ["id", "class"]);
188
+ };
189
+ }
190
+ });
191
+ export {
192
+ X as default
193
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./OperationTableRow.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=OperationTableTooltip.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationTableTooltip.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ type __VLS_Props = {
3
+ schema?: SchemaObject;
4
+ value: string | File | null;
5
+ };
6
+ 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>;
7
+ export default _default;
8
+ //# sourceMappingURL=OperationTableTooltip.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;CAC5B,CAAC;;AA8KF,wBAMG"}
@@ -0,0 +1,7 @@
1
+ import o from "./OperationTableTooltip.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-05ca9351"]]);
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,62 @@
1
+ import { defineComponent as d, computed as c, createBlock as m, openBlock as a, unref as r, withCtx as h, createElementVNode as u, createElementBlock as t, createCommentVNode as s, toDisplayString as o } from "vue";
2
+ import { ScalarPopover as p } from "@scalar/components";
3
+ import { ScalarIconWarning as f, ScalarIconInfo as v } from "@scalar/icons";
4
+ import { validateParameter as y } from "../helpers/validate-parameter.js";
5
+ const k = ["aria-label", "role"], g = { class: "w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none" }, b = {
6
+ key: 0,
7
+ class: "text-error-1"
8
+ }, _ = {
9
+ key: 1,
10
+ class: "schema text-c-2 flex items-center"
11
+ }, I = { key: 0 }, x = { key: 1 }, S = { key: 2 }, w = { key: 3 }, B = { key: 4 }, C = {
12
+ key: 2,
13
+ class: "text-sm leading-snug text-pretty",
14
+ style: { maxWidth: "16rem" }
15
+ }, T = /* @__PURE__ */ d({
16
+ __name: "OperationTableTooltip",
17
+ props: {
18
+ schema: {},
19
+ value: {}
20
+ },
21
+ setup(l) {
22
+ const i = c(() => y(l.schema, l.value)), n = c(() => i.value.ok === !1);
23
+ return (e, P) => (a(), m(r(p), {
24
+ offset: 4,
25
+ placement: "left",
26
+ teleport: ""
27
+ }, {
28
+ popover: h(() => [
29
+ u("div", g, [
30
+ i.value.ok === !1 ? (a(), t("div", b, o(i.value.message), 1)) : e.schema && ("type" in e.schema || "format" in e.schema || "minimum" in e.schema || "maximum" in e.schema || "default" in e.schema) ? (a(), t("div", _, [
31
+ "type" in e.schema ? (a(), t("span", I, o(e.schema.type), 1)) : s("", !0),
32
+ "format" in e.schema ? (a(), t("span", x, o(e.schema.format), 1)) : s("", !0),
33
+ "minimum" in e.schema ? (a(), t("span", S, "min: " + o(e.schema.minimum), 1)) : s("", !0),
34
+ "maximum" in e.schema ? (a(), t("span", w, "max: " + o(e.schema.maximum), 1)) : s("", !0),
35
+ "default" in e.schema ? (a(), t("span", B, "default: " + o(e.schema.default), 1)) : s("", !0)
36
+ ])) : s("", !0),
37
+ e.schema?.description && !n.value ? (a(), t("span", C, o(e.schema.description), 1)) : s("", !0)
38
+ ])
39
+ ]),
40
+ default: h(() => [
41
+ u("button", {
42
+ "aria-label": n.value ? "Input is invalid" : "More Information",
43
+ class: "text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1",
44
+ role: n.value ? "alert" : "none",
45
+ type: "button"
46
+ }, [
47
+ n.value ? (a(), m(r(f), {
48
+ key: 0,
49
+ class: "text-orange size-3.5 brightness-90 hover:brightness-75"
50
+ })) : (a(), m(r(v), {
51
+ key: 1,
52
+ class: "text-c-2 hover:text-c-1 size-3.5"
53
+ }))
54
+ ], 8, k)
55
+ ]),
56
+ _: 1
57
+ }));
58
+ }
59
+ });
60
+ export {
61
+ T as default
62
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=file.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/file.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Extract file name from an input
3
+ */
4
+ export declare const getFileName: (input: unknown) => string | undefined;
5
+ //# sourceMappingURL=files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/files.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,uBAKzC,CAAA"}
@@ -0,0 +1,7 @@
1
+ const n = (e) => {
2
+ if (e instanceof File)
3
+ return e.name;
4
+ };
5
+ export {
6
+ n as getFileName
7
+ };
@@ -0,0 +1,8 @@
1
+ import type { MediaTypeObject, ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ /**
3
+ * Extract content value from parameter object
4
+ *
5
+ * Parameters MUST only have one specified content key
6
+ */
7
+ export declare const getParameterContentValue: (parameter: ParameterObject) => MediaTypeObject | undefined;
8
+ //# sourceMappingURL=get-parameter-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-parameter-content.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-parameter-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAEpH;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GAAI,WAAW,eAAe,KAAG,eAAe,GAAG,SAYvF,CAAA"}
@@ -0,0 +1,9 @@
1
+ const e = (n) => {
2
+ if ("content" in n && n.content) {
3
+ const t = Object.keys(n.content);
4
+ return t.length !== 1 ? void 0 : n.content[t[0]];
5
+ }
6
+ };
7
+ export {
8
+ e as getParameterContentValue
9
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=get-parameter-content.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-parameter-content.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ /**
3
+ * Extract example from parameter object
4
+ */
5
+ export declare const getParameterExample: (parameter: ParameterObject, exampleKey: string) => import("@scalar/workspace-store/schemas/v3.1/strict/example").ExampleObject | undefined;
6
+ //# sourceMappingURL=get-parameter-example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-parameter-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-parameter-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAInG;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,WAAW,eAAe,EAAE,YAAY,MAAM,4FAYjF,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
+ import { getParameterContentValue as r } from "./get-parameter-content.js";
3
+ const l = (e, t) => {
4
+ if ("examples" in e && e.examples)
5
+ return n(e.examples[t]);
6
+ const o = r(e);
7
+ if (o?.examples)
8
+ return n(o.examples[t]);
9
+ };
10
+ export {
11
+ l as getParameterExample
12
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=get-parameter-example.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-parameter-example.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { ParameterObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ /**
3
+ * Extract the schema from the parameter object
4
+ */
5
+ export declare const getParameterSchema: (parameter: ParameterObject) => SchemaObject | undefined;
6
+ //# sourceMappingURL=get-parameter-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-parameter-schema.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIjH;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAW,eAAe,KAAG,YAAY,GAAG,SAM9E,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { getResolvedRef as t } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
+ import { getParameterContentValue as m } from "./get-parameter-content.js";
3
+ const c = (e) => "schema" in e && e.schema ? t(e.schema) : t(m(e)?.schema);
4
+ export {
5
+ c as getParameterSchema
6
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=get-parameter-schema.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-parameter-schema.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ export declare const getExampleFromBody: (requestBody: RequestBodyObject, contentType: string, exampleKey: string) => import("@scalar/workspace-store/schemas/v3.1/strict/example").ExampleObject | undefined;
3
+ //# sourceMappingURL=get-request-body-example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-request-body-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-request-body-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAErG,eAAO,MAAM,kBAAkB,GAAI,aAAa,iBAAiB,EAAE,aAAa,MAAM,EAAE,YAAY,MAAM,4FAEzG,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { getResolvedRef as r } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
+ const n = (e, o, t) => r(e.content[o]?.examples?.[t]);
3
+ export {
4
+ n as getExampleFromBody
5
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Group together array objects by a specific key
3
+ */
4
+ export declare const groupBy: <T extends Record<string, unknown>, K extends keyof T, V extends string | number | symbol = Extract<T[K], string | number | symbol>>(arr: T[], key: K) => Record<V, T[]>;
5
+ //# sourceMappingURL=group-by.d.ts.map