@scalar/api-reference 1.31.17 → 1.32.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 (223) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/blocks/helpers/getPointer.d.ts +1 -1
  3. package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
  4. package/dist/blocks/hooks/useBlockProps.js +10 -10
  5. package/dist/browser/standalone.js +15959 -15866
  6. package/dist/browser/webpack-stats.json +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  8. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  9. package/dist/components/ApiReferenceLayout.vue2.js +124 -126
  10. package/dist/components/ClassicHeader.vue.d.ts.map +1 -1
  11. package/dist/components/ClassicHeader.vue.js +11 -9
  12. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  13. package/dist/components/Content/Content.vue.js +2 -2
  14. package/dist/components/Content/Content.vue2.js +93 -92
  15. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  16. package/dist/components/Content/Introduction/Introduction.vue2.js +3 -3
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts +3 -0
  18. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Lazy/Loading.vue.js +93 -93
  20. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  22. package/dist/components/Content/Schema/SchemaProperty.vue2.js +1 -1
  23. package/dist/components/Content/Tag/Tag.vue.js +1 -1
  24. package/dist/components/Content/Tag/TagList.vue.d.ts +7 -1
  25. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Tag/TagList.vue.js +41 -38
  27. package/dist/features/Operation/Operation.vue.d.ts +8 -3
  28. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  29. package/dist/features/Operation/Operation.vue.js +67 -51
  30. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  31. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  32. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  33. package/dist/features/Operation/components/callbacks/Callback.vue.js +2 -2
  34. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +9 -2
  35. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  36. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  37. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +92 -84
  38. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +10 -3
  39. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  40. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  41. package/dist/features/Operation/layouts/ModernLayout.vue2.js +132 -117
  42. package/dist/features/Search/SearchButton.vue.d.ts +1 -3
  43. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  44. package/dist/features/Search/SearchButton.vue.js +17 -16
  45. package/dist/features/Search/SearchModal.vue.js +2 -2
  46. package/dist/features/Search/SearchModal.vue2.js +4 -4
  47. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  48. package/dist/features/Search/useSearchIndex.js +15 -15
  49. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -0
  50. package/dist/features/api-client-modal/index.d.ts.map +1 -0
  51. package/dist/features/{ApiClientModal → api-client-modal}/useApiClient.d.ts +118 -118
  52. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -0
  53. package/dist/features/base-url/BaseUrl.vue.d.ts.map +1 -0
  54. package/dist/features/base-url/index.d.ts.map +1 -0
  55. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -0
  56. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -0
  57. package/dist/features/document-source/hooks/useDocumentSource.js +71 -0
  58. package/dist/features/document-source/index.d.ts.map +1 -0
  59. package/dist/features/download-link/DownloadLink.vue.d.ts.map +1 -0
  60. package/dist/features/{DownloadLink → download-link}/DownloadLink.vue.js +2 -2
  61. package/dist/features/download-link/DownloadLink.vue2.js +59 -0
  62. package/dist/features/download-link/index.d.ts.map +1 -0
  63. package/dist/features/download-link/openapi-version-symbol.d.ts.map +1 -0
  64. package/dist/features/example-request/ExamplePicker.vue.d.ts +13 -0
  65. package/dist/features/example-request/ExamplePicker.vue.d.ts.map +1 -0
  66. package/dist/features/example-request/ExamplePicker.vue.js +7 -0
  67. package/dist/features/example-request/ExamplePicker.vue2.js +56 -0
  68. package/dist/features/example-request/ExampleRequest.vue.d.ts.map +1 -0
  69. package/dist/features/{ExampleRequest → example-request}/ExampleRequest.vue.js +2 -2
  70. package/dist/features/{ExampleRequest → example-request}/ExampleRequest.vue2.js +93 -93
  71. package/dist/features/example-request/TextSelect.vue.d.ts.map +1 -0
  72. package/dist/features/example-request/index.d.ts.map +1 -0
  73. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -0
  74. package/dist/features/example-responses/ExampleResponse.vue.js +7 -0
  75. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -0
  76. package/dist/features/example-responses/ExampleResponses.vue.js +7 -0
  77. package/dist/features/{ExampleResponses → example-responses}/ExampleResponses.vue2.js +1 -1
  78. package/dist/features/example-responses/index.d.ts.map +1 -0
  79. package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue.d.ts.map +1 -1
  80. package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue.js +15 -15
  81. package/dist/features/multiple-documents/index.d.ts +3 -0
  82. package/dist/features/multiple-documents/index.d.ts.map +1 -0
  83. package/dist/{hooks → features/multiple-documents}/useMultipleDocuments.d.ts +1 -1
  84. package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -0
  85. package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -0
  86. package/dist/features/sidebar/components/Sidebar.vue.js +7 -0
  87. package/dist/{components/Sidebar → features/sidebar/components}/Sidebar.vue2.js +2 -2
  88. package/dist/{components/Sidebar → features/sidebar/components}/SidebarElement.vue.d.ts +1 -1
  89. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -0
  90. package/dist/features/sidebar/components/SidebarElement.vue.js +7 -0
  91. package/dist/{components/Sidebar → features/sidebar/components}/SidebarElement.vue2.js +2 -2
  92. package/dist/features/sidebar/components/SidebarGroup.vue.d.ts.map +1 -0
  93. package/dist/features/sidebar/components/SidebarGroup.vue.js +7 -0
  94. package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +1 -0
  95. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +7 -0
  96. package/dist/{components/Sidebar → features/sidebar/components}/SidebarHttpBadge.vue2.js +1 -1
  97. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
  98. package/dist/features/sidebar/helpers/create-sidebar.js +8 -8
  99. package/dist/features/sidebar/index.d.ts +1 -0
  100. package/dist/features/sidebar/index.d.ts.map +1 -1
  101. package/dist/features/specification-extension/SpecificationExtension.vue.d.ts.map +1 -0
  102. package/dist/features/specification-extension/index.d.ts.map +1 -0
  103. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -0
  104. package/dist/features/{TestRequestButton → test-request-button}/TestRequestButton.vue.js +2 -2
  105. package/dist/features/{TestRequestButton → test-request-button}/TestRequestButton.vue2.js +1 -1
  106. package/dist/features/test-request-button/index.d.ts.map +1 -0
  107. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  108. package/dist/features/traverse-schema/helpers/traverse-paths.js +21 -20
  109. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  110. package/dist/features/traverse-schema/helpers/traverse-schemas.js +14 -14
  111. package/dist/helpers/parse.js +7 -7
  112. package/dist/hooks/useOperationDiscriminator.d.ts +2 -2
  113. package/dist/hooks/useOperationDiscriminator.d.ts.map +1 -1
  114. package/dist/hooks/useOperationDiscriminator.js +28 -28
  115. package/dist/index.d.ts +1 -2
  116. package/dist/index.d.ts.map +1 -1
  117. package/dist/index.js +5 -5
  118. package/dist/libs/openapi.d.ts +5 -6
  119. package/dist/libs/openapi.d.ts.map +1 -1
  120. package/dist/libs/openapi.js +44 -46
  121. package/dist/style.css +1 -1
  122. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  123. package/dist/v2/ApiReferenceWorkspace.vue.js +110 -65
  124. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +141 -0
  125. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -0
  126. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +38 -0
  127. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -0
  128. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +21 -0
  129. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +1 -0
  130. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +20 -0
  131. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +1 -0
  132. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +4 -0
  133. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -0
  134. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -0
  135. package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +1 -0
  136. package/dist/v2/blocks/scalar-request-example-block/types.d.ts +21 -0
  137. package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +1 -0
  138. package/package.json +14 -14
  139. package/dist/components/DocumentSelector/index.d.ts +0 -2
  140. package/dist/components/DocumentSelector/index.d.ts.map +0 -1
  141. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +0 -1
  142. package/dist/components/Sidebar/Sidebar.vue.js +0 -7
  143. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +0 -1
  144. package/dist/components/Sidebar/SidebarElement.vue.js +0 -7
  145. package/dist/components/Sidebar/SidebarGroup.vue.d.ts.map +0 -1
  146. package/dist/components/Sidebar/SidebarGroup.vue.js +0 -7
  147. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +0 -1
  148. package/dist/components/Sidebar/SidebarHttpBadge.vue.js +0 -7
  149. package/dist/components/Sidebar/index.d.ts +0 -2
  150. package/dist/components/Sidebar/index.d.ts.map +0 -1
  151. package/dist/components/SpecificationExtension/SpecificationExtension.vue.d.ts.map +0 -1
  152. package/dist/components/SpecificationExtension/index.d.ts.map +0 -1
  153. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +0 -1
  154. package/dist/features/ApiClientModal/index.d.ts.map +0 -1
  155. package/dist/features/ApiClientModal/useApiClient.d.ts.map +0 -1
  156. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +0 -1
  157. package/dist/features/BaseUrl/index.d.ts.map +0 -1
  158. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts.map +0 -1
  159. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +0 -1
  160. package/dist/features/DocumentSource/hooks/useDocumentSource.js +0 -67
  161. package/dist/features/DocumentSource/index.d.ts.map +0 -1
  162. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +0 -1
  163. package/dist/features/DownloadLink/DownloadLink.vue2.js +0 -55
  164. package/dist/features/DownloadLink/index.d.ts.map +0 -1
  165. package/dist/features/DownloadLink/openapi-version-symbol.d.ts.map +0 -1
  166. package/dist/features/ExampleRequest/ExamplePicker.vue.d.ts +0 -10
  167. package/dist/features/ExampleRequest/ExamplePicker.vue.d.ts.map +0 -1
  168. package/dist/features/ExampleRequest/ExamplePicker.vue.js +0 -7
  169. package/dist/features/ExampleRequest/ExamplePicker.vue2.js +0 -59
  170. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +0 -1
  171. package/dist/features/ExampleRequest/TextSelect.vue.d.ts.map +0 -1
  172. package/dist/features/ExampleRequest/index.d.ts.map +0 -1
  173. package/dist/features/ExampleResponses/ExampleResponse.vue.d.ts.map +0 -1
  174. package/dist/features/ExampleResponses/ExampleResponse.vue.js +0 -7
  175. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +0 -1
  176. package/dist/features/ExampleResponses/ExampleResponses.vue.js +0 -7
  177. package/dist/features/ExampleResponses/index.d.ts.map +0 -1
  178. package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +0 -1
  179. package/dist/features/TestRequestButton/index.d.ts.map +0 -1
  180. package/dist/hooks/useMultipleDocuments.d.ts.map +0 -1
  181. package/dist/legacy/fixtures/httpRequestMethods.d.ts +0 -10
  182. package/dist/legacy/fixtures/httpRequestMethods.d.ts.map +0 -1
  183. package/dist/legacy/fixtures/index.d.ts +0 -2
  184. package/dist/legacy/fixtures/index.d.ts.map +0 -1
  185. /package/dist/features/{ApiClientModal → api-client-modal}/ApiClientModal.vue.d.ts +0 -0
  186. /package/dist/features/{ApiClientModal → api-client-modal}/ApiClientModal.vue.js +0 -0
  187. /package/dist/features/{ApiClientModal → api-client-modal}/ApiClientModal.vue2.js +0 -0
  188. /package/dist/features/{ApiClientModal → api-client-modal}/index.d.ts +0 -0
  189. /package/dist/features/{ApiClientModal → api-client-modal}/useApiClient.js +0 -0
  190. /package/dist/features/{BaseUrl → base-url}/BaseUrl.vue.d.ts +0 -0
  191. /package/dist/features/{BaseUrl → base-url}/BaseUrl.vue.js +0 -0
  192. /package/dist/features/{BaseUrl → base-url}/BaseUrl.vue2.js +0 -0
  193. /package/dist/features/{BaseUrl → base-url}/index.d.ts +0 -0
  194. /package/dist/features/{DocumentSource → document-source}/hooks/useDocumentFetcher.d.ts +0 -0
  195. /package/dist/features/{DocumentSource → document-source}/hooks/useDocumentFetcher.js +0 -0
  196. /package/dist/features/{DocumentSource → document-source}/hooks/useDocumentSource.d.ts +0 -0
  197. /package/dist/features/{DocumentSource → document-source}/index.d.ts +0 -0
  198. /package/dist/features/{DownloadLink → download-link}/DownloadLink.vue.d.ts +0 -0
  199. /package/dist/features/{DownloadLink → download-link}/index.d.ts +0 -0
  200. /package/dist/features/{DownloadLink → download-link}/openapi-version-symbol.d.ts +0 -0
  201. /package/dist/features/{DownloadLink → download-link}/openapi-version-symbol.js +0 -0
  202. /package/dist/features/{ExampleRequest → example-request}/ExampleRequest.vue.d.ts +0 -0
  203. /package/dist/features/{ExampleRequest → example-request}/TextSelect.vue.d.ts +0 -0
  204. /package/dist/features/{ExampleRequest → example-request}/TextSelect.vue.js +0 -0
  205. /package/dist/features/{ExampleRequest → example-request}/TextSelect.vue3.js +0 -0
  206. /package/dist/features/{ExampleRequest → example-request}/index.d.ts +0 -0
  207. /package/dist/features/{ExampleResponses → example-responses}/ExampleResponse.vue.d.ts +0 -0
  208. /package/dist/features/{ExampleResponses → example-responses}/ExampleResponse.vue2.js +0 -0
  209. /package/dist/features/{ExampleResponses → example-responses}/ExampleResponses.vue.d.ts +0 -0
  210. /package/dist/features/{ExampleResponses → example-responses}/index.d.ts +0 -0
  211. /package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue.d.ts +0 -0
  212. /package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue2.js +0 -0
  213. /package/dist/{hooks → features/multiple-documents}/useMultipleDocuments.js +0 -0
  214. /package/dist/{components/Sidebar → features/sidebar/components}/Sidebar.vue.d.ts +0 -0
  215. /package/dist/{components/Sidebar → features/sidebar/components}/SidebarGroup.vue.d.ts +0 -0
  216. /package/dist/{components/Sidebar → features/sidebar/components}/SidebarGroup.vue2.js +0 -0
  217. /package/dist/{components/Sidebar → features/sidebar/components}/SidebarHttpBadge.vue.d.ts +0 -0
  218. /package/dist/{components/SpecificationExtension → features/specification-extension}/SpecificationExtension.vue.d.ts +0 -0
  219. /package/dist/{components/SpecificationExtension → features/specification-extension}/SpecificationExtension.vue.js +0 -0
  220. /package/dist/{components/SpecificationExtension → features/specification-extension}/SpecificationExtension.vue2.js +0 -0
  221. /package/dist/{components/SpecificationExtension → features/specification-extension}/index.d.ts +0 -0
  222. /package/dist/features/{TestRequestButton → test-request-button}/TestRequestButton.vue.d.ts +0 -0
  223. /package/dist/features/{TestRequestButton → test-request-button}/index.d.ts +0 -0
@@ -1,5 +1,4 @@
1
1
  import type { OpenAPI, OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { Spec, TransformedOperation } from '@scalar/types/legacy';
3
2
  import { XScalarStability } from '@scalar/types/legacy';
4
3
  type PropertyObject = {
5
4
  required?: string[];
@@ -17,19 +16,19 @@ export declare function formatProperty(key: string, obj: PropertyObject): string
17
16
  /**
18
17
  * Extracts the request body from an operation.
19
18
  */
20
- export declare function extractRequestBody(operation: TransformedOperation): string[] | boolean;
19
+ export declare function extractRequestBody(operation: OpenAPIV3_1.OperationObject): string[] | boolean;
21
20
  /**
22
21
  * Returns all models from the specification, no matter if it’s OpenAPI 3.x.
23
22
  */
24
- export declare function getModels(spec?: Spec): Record<string, OpenAPIV3_1.SchemaObject>;
23
+ export declare function getModels(document?: OpenAPIV3_1.Document): Record<string, OpenAPIV3_1.SchemaObject>;
25
24
  /**
26
25
  * Checks if the OpenAPI document has schemas.
27
26
  */
28
- export declare const hasModels: (content?: Spec) => boolean;
27
+ export declare const hasModels: (content?: OpenAPIV3_1.Document) => boolean;
29
28
  /**
30
29
  * Checks if the OpenAPI document has webhooks.
31
30
  */
32
- export declare const hasWebhooks: (content?: Spec) => boolean;
31
+ export declare const hasWebhooks: (document?: OpenAPIV3_1.Document) => boolean;
33
32
  /**
34
33
  * Deep merge for objects
35
34
  */
@@ -38,7 +37,7 @@ export declare function deepMerge(source: Record<any, any>, target: Record<any,
38
37
  * Creates an empty specification object.
39
38
  * The returning object has the same structure as a valid OpenAPI specification, but everything is empty.
40
39
  */
41
- export declare function createEmptySpecification(partialSpecification?: Partial<OpenAPI.Document>): Spec;
40
+ export declare function createEmptySpecification(partialSpecification?: Partial<OpenAPI.Document>): OpenAPI.Document;
42
41
  /**
43
42
  * Returns if an operation is considered deprecated.
44
43
  */
@@ -1 +1 @@
1
- {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/libs/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAIvD,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,IAAI,EAAE,MAAM,CAAA;YACZ,WAAW,CAAC,EAAE,MAAM,CAAA;SACrB,CAAA;KACF,CAAA;CACF,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,CAcvE;AA8BD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,oBAAoB,GAAG,MAAM,EAAE,GAAG,OAAO,CAYtF;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,4CAsBpC;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,aAAc,IAAI,YAUvC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,aAAc,IAAI,YAUzC,CAAA;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,oBAW3E;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAiBjF,IAAI,CACX;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,GAAG,OAAO,CAQrF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,GAAG,gBAAgB,GAAG,SAAS,CAK1G;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,GAAG,MAAM,CAYzF"}
1
+ {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/libs/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAIvD,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,IAAI,EAAE,MAAM,CAAA;YACZ,WAAW,CAAC,EAAE,MAAM,CAAA;SACrB,CAAA;KACF,CAAA;CACF,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,CAcvE;AA8BD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,GAAG,MAAM,EAAE,GAAG,OAAO,CAY7F;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ,4CAsBxD;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,aAAc,WAAW,CAAC,QAAQ,YAUvD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,cAAe,WAAW,CAAC,QAAQ,YAU1D,CAAA;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,oBAW3E;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAiBjF,OAAO,CAAC,QAAQ,CACvB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,GAAG,OAAO,CAQrF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,GAAG,gBAAgB,GAAG,SAAS,CAK1G;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,GAAG,MAAM,CAYzF"}
@@ -1,58 +1,57 @@
1
- import { XScalarStability as o } from "@scalar/types/legacy";
2
- function p(e, t) {
3
- var n;
4
- let r = e;
5
- const i = (n = t.required) == null ? void 0 : n.includes(e);
6
- return r += i ? " REQUIRED " : " optional ", t.properties[e] && (r += t.properties[e].type, t.properties[e].description && (r += " " + t.properties[e].description)), r;
1
+ import { XScalarStability as c } from "@scalar/types/legacy";
2
+ function u(e, r) {
3
+ var s;
4
+ let t = e;
5
+ const i = (s = r.required) == null ? void 0 : s.includes(e);
6
+ return t += i ? " REQUIRED " : " optional ", r.properties[e] && (t += r.properties[e].type, r.properties[e].description && (t += " " + r.properties[e].description)), t;
7
7
  }
8
8
  function d(e) {
9
9
  var i;
10
- const t = ["Body"], r = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
11
- return r && Object.keys(r).forEach((n) => {
10
+ const r = ["Body"], t = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
11
+ return t && Object.keys(t).forEach((s) => {
12
12
  if (!e.schema)
13
13
  return;
14
- t.push(p(n, e.schema));
15
- const s = r[n];
16
- s.type === "object" && !!s.properties && s.properties && Object.keys(s.properties).forEach((u) => {
17
- var a, f;
18
- t.push(`${u} ${(f = (a = s.properties) == null ? void 0 : a[u]) == null ? void 0 : f.type}`);
14
+ r.push(u(s, e.schema));
15
+ const n = t[s];
16
+ n.type === "object" && !!n.properties && n.properties && Object.keys(n.properties).forEach((p) => {
17
+ var f, a;
18
+ r.push(`${p} ${(a = (f = n.properties) == null ? void 0 : f[p]) == null ? void 0 : a.type}`);
19
19
  });
20
- }), t;
20
+ }), r;
21
21
  }
22
- function O(e) {
23
- var t, r, i;
22
+ function x(e) {
23
+ var r, t;
24
24
  try {
25
- const n = (i = (r = (t = e == null ? void 0 : e.information) == null ? void 0 : t.requestBody) == null ? void 0 : r.content) == null ? void 0 : i["application/json"];
26
- if (!n)
25
+ const i = (t = (r = e == null ? void 0 : e.requestBody) == null ? void 0 : r.content) == null ? void 0 : t["application/json"];
26
+ if (!i)
27
27
  throw new Error("Body not found");
28
- return d(n);
28
+ return d(i);
29
29
  } catch {
30
30
  return !1;
31
31
  }
32
32
  }
33
- function y(e) {
34
- var r, i;
33
+ function O(e) {
34
+ var t, i;
35
35
  if (!e)
36
36
  return {};
37
- const t = (
37
+ const r = (
38
38
  // OpenAPI 3.x
39
- Object.keys(((r = e == null ? void 0 : e.components) == null ? void 0 : r.schemas) ?? {}).length ? (i = e == null ? void 0 : e.components) == null ? void 0 : i.schemas : (
39
+ Object.keys(((t = e == null ? void 0 : e.components) == null ? void 0 : t.schemas) ?? {}).length ? (i = e == null ? void 0 : e.components) == null ? void 0 : i.schemas : (
40
40
  // Fallback
41
41
  {}
42
42
  )
43
43
  );
44
- return Object.keys(t ?? {}).forEach((n) => {
45
- var s, c;
46
- (((s = t[n]) == null ? void 0 : s["x-internal"]) === !0 || ((c = t[n]) == null ? void 0 : c["x-scalar-ignore"]) === !0) && delete t[n];
47
- }), t;
44
+ return Object.keys(r ?? {}).forEach((s) => {
45
+ var n, o;
46
+ (((n = r[s]) == null ? void 0 : n["x-internal"]) === !0 || ((o = r[s]) == null ? void 0 : o["x-scalar-ignore"]) === !0) && delete r[s];
47
+ }), r;
48
48
  }
49
- const x = (e) => e ? !!Object.keys(y(e) ?? {}).length : !1;
50
- function l(e, t) {
51
- for (const [r, i] of Object.entries(e))
52
- i !== null && typeof i == "object" ? (t[r] ??= new i.__proto__.constructor(), l(i, t[r])) : typeof i < "u" && (t[r] = i);
53
- return t;
49
+ function l(e, r) {
50
+ for (const [t, i] of Object.entries(e))
51
+ i !== null && typeof i == "object" ? (r[t] ?? (r[t] = new i.__proto__.constructor()), l(i, r[t])) : typeof i < "u" && (r[t] = i);
52
+ return r;
54
53
  }
55
- function g(e) {
54
+ function E(e) {
56
55
  return l(e ?? {}, {
57
56
  info: {
58
57
  title: "",
@@ -72,23 +71,22 @@ function g(e) {
72
71
  });
73
72
  }
74
73
  function b(e) {
75
- return e.deprecated !== void 0 ? e.deprecated : !!(e["x-scalar-stability"] && e["x-scalar-stability"] === o.Deprecated);
74
+ return e.deprecated !== void 0 ? e.deprecated : !!(e["x-scalar-stability"] && e["x-scalar-stability"] === c.Deprecated);
76
75
  }
77
- function m(e) {
78
- return e.deprecated ? o.Deprecated : e["x-scalar-stability"];
76
+ function y(e) {
77
+ return e.deprecated ? c.Deprecated : e["x-scalar-stability"];
79
78
  }
80
- function E(e) {
81
- const t = m(e);
82
- return t === o.Deprecated ? "text-red" : t === o.Experimental ? "text-orange" : t === o.Stable ? "text-green" : "";
79
+ function S(e) {
80
+ const r = y(e);
81
+ return r === c.Deprecated ? "text-red" : r === c.Experimental ? "text-orange" : r === c.Stable ? "text-green" : "";
83
82
  }
84
83
  export {
85
- g as createEmptySpecification,
84
+ E as createEmptySpecification,
86
85
  l as deepMerge,
87
- O as extractRequestBody,
88
- p as formatProperty,
89
- y as getModels,
90
- m as getOperationStability,
91
- E as getOperationStabilityColor,
92
- x as hasModels,
86
+ x as extractRequestBody,
87
+ u as formatProperty,
88
+ O as getModels,
89
+ y as getOperationStability,
90
+ S as getOperationStabilityColor,
93
91
  b as isOperationDeprecated
94
92
  };