@scalar/workspace-store 0.40.2 → 0.40.4

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 (368) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/client.d.ts +7 -2
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +820 -681
  5. package/dist/entities/auth/index.js +96 -101
  6. package/dist/entities/auth/schema.d.ts +10 -0
  7. package/dist/entities/auth/schema.d.ts.map +1 -1
  8. package/dist/entities/auth/schema.js +42 -116
  9. package/dist/entities/history/index.js +80 -60
  10. package/dist/entities/history/schema.js +94 -88
  11. package/dist/events/bus.js +146 -93
  12. package/dist/events/definitions/analytics.js +1 -1
  13. package/dist/events/definitions/auth.js +1 -1
  14. package/dist/events/definitions/common.js +1 -1
  15. package/dist/events/definitions/cookie.js +1 -1
  16. package/dist/events/definitions/document.js +1 -1
  17. package/dist/events/definitions/environment.js +1 -1
  18. package/dist/events/definitions/hooks.js +1 -1
  19. package/dist/events/definitions/index.js +1 -1
  20. package/dist/events/definitions/meta.js +1 -1
  21. package/dist/events/definitions/operation.js +1 -1
  22. package/dist/events/definitions/server.js +1 -1
  23. package/dist/events/definitions/tabs.js +1 -1
  24. package/dist/events/definitions/tag.js +1 -1
  25. package/dist/events/definitions/ui.js +1 -1
  26. package/dist/events/definitions/workspace.js +1 -1
  27. package/dist/events/index.js +3 -9
  28. package/dist/events/listeners.js +20 -22
  29. package/dist/events/old-definitions.js +15 -12
  30. package/dist/helpers/deep-clone.js +33 -17
  31. package/dist/helpers/detect-changes-proxy.js +95 -57
  32. package/dist/helpers/general.js +78 -23
  33. package/dist/helpers/generate-unique-value.js +77 -45
  34. package/dist/helpers/get-fetch.js +12 -10
  35. package/dist/helpers/get-resolved-ref.js +11 -10
  36. package/dist/helpers/is-non-optional-security-requirement.js +3 -6
  37. package/dist/helpers/merge-object.js +71 -30
  38. package/dist/helpers/overrides-proxy.js +98 -58
  39. package/dist/helpers/unpack-proxy.js +60 -58
  40. package/dist/mutators/auth.js +358 -230
  41. package/dist/mutators/cookie.js +59 -42
  42. package/dist/mutators/document.js +104 -66
  43. package/dist/mutators/environment.js +97 -72
  44. package/dist/mutators/helpers.js +9 -13
  45. package/dist/mutators/index.js +62 -49
  46. package/dist/mutators/operation/body.js +88 -57
  47. package/dist/mutators/operation/extensions.js +20 -12
  48. package/dist/mutators/operation/helpers/fetch-request-to-har.js +144 -107
  49. package/dist/mutators/operation/helpers/fetch-response-to-har.js +143 -95
  50. package/dist/mutators/operation/helpers/get-parameter-position.js +12 -12
  51. package/dist/mutators/operation/helpers/har-to-operation.js +169 -132
  52. package/dist/mutators/operation/helpers/sync-path-parameters.js +109 -60
  53. package/dist/mutators/operation/history.js +60 -64
  54. package/dist/mutators/operation/index.js +25 -49
  55. package/dist/mutators/operation/operation.js +349 -240
  56. package/dist/mutators/operation/parameters.js +157 -93
  57. package/dist/mutators/server.js +213 -152
  58. package/dist/mutators/tabs.js +173 -130
  59. package/dist/mutators/tag.js +131 -97
  60. package/dist/mutators/workspace.js +72 -42
  61. package/dist/navigation/get-navigation-options.js +97 -84
  62. package/dist/navigation/helpers/get-openapi-object.js +46 -29
  63. package/dist/navigation/helpers/get-operation-entries.js +72 -32
  64. package/dist/navigation/helpers/get-parent-entry.js +16 -12
  65. package/dist/navigation/helpers/get-tag-entries.js +56 -29
  66. package/dist/navigation/helpers/get-tag.js +22 -23
  67. package/dist/navigation/helpers/get-x-keys.js +13 -9
  68. package/dist/navigation/helpers/traverse-description.js +90 -72
  69. package/dist/navigation/helpers/traverse-document.js +111 -98
  70. package/dist/navigation/helpers/traverse-examples.js +35 -31
  71. package/dist/navigation/helpers/traverse-paths.js +118 -106
  72. package/dist/navigation/helpers/traverse-schemas.js +65 -64
  73. package/dist/navigation/helpers/traverse-tags.js +158 -129
  74. package/dist/navigation/helpers/traverse-webhooks.js +96 -90
  75. package/dist/navigation/helpers/update-order-ids.js +59 -51
  76. package/dist/navigation/helpers/utils.js +71 -21
  77. package/dist/navigation/index.js +5 -13
  78. package/dist/navigation/types.js +1 -1
  79. package/dist/persistence/index.js +283 -285
  80. package/dist/persistence/indexdb.js +263 -126
  81. package/dist/plugins/bundler/helpers.js +21 -12
  82. package/dist/plugins/bundler/index.d.ts +7 -0
  83. package/dist/plugins/bundler/index.d.ts.map +1 -1
  84. package/dist/plugins/bundler/index.js +305 -171
  85. package/dist/plugins/client/index.js +1 -5
  86. package/dist/plugins/client/persistence.js +95 -90
  87. package/dist/resolve.js +18 -25
  88. package/dist/schemas/compose.js +6 -7
  89. package/dist/schemas/extensions/document/x-internal.js +3 -7
  90. package/dist/schemas/extensions/document/x-scalar-environments.js +16 -22
  91. package/dist/schemas/extensions/document/x-scalar-icon.js +3 -7
  92. package/dist/schemas/extensions/document/x-scalar-ignore.js +3 -7
  93. package/dist/schemas/extensions/document/x-scalar-is-dirty.js +21 -8
  94. package/dist/schemas/extensions/document/x-scalar-original-document-hash.js +17 -8
  95. package/dist/schemas/extensions/document/x-scalar-registry-meta.js +15 -21
  96. package/dist/schemas/extensions/document/x-scalar-sdk-installation.js +5 -13
  97. package/dist/schemas/extensions/document/x-scalar-watch-mode.js +4 -8
  98. package/dist/schemas/extensions/document/x-tags.js +3 -7
  99. package/dist/schemas/extensions/example/x-disabled.js +17 -7
  100. package/dist/schemas/extensions/general/x-scalar-active-environment.js +4 -7
  101. package/dist/schemas/extensions/general/x-scalar-cookies.js +9 -14
  102. package/dist/schemas/extensions/general/x-scalar-order.js +8 -7
  103. package/dist/schemas/extensions/operation/index.js +4 -23
  104. package/dist/schemas/extensions/operation/x-badge.js +42 -50
  105. package/dist/schemas/extensions/operation/x-code-samples.js +8 -12
  106. package/dist/schemas/extensions/operation/x-draft-examples.js +3 -7
  107. package/dist/schemas/extensions/operation/x-post-response.js +18 -7
  108. package/dist/schemas/extensions/operation/x-scalar-disable-parameters.js +57 -13
  109. package/dist/schemas/extensions/operation/x-scalar-selected-content-type.js +9 -7
  110. package/dist/schemas/extensions/operation/x-scalar-stability.js +15 -14
  111. package/dist/schemas/extensions/parameter/x-global.js +12 -7
  112. package/dist/schemas/extensions/schema/x-additional-properties-name.js +10 -7
  113. package/dist/schemas/extensions/schema/x-enum-descriptions.js +17 -12
  114. package/dist/schemas/extensions/schema/x-enum-varnames.js +21 -8
  115. package/dist/schemas/extensions/schema/x-examples.js +3 -7
  116. package/dist/schemas/extensions/schema/x-variable.js +3 -7
  117. package/dist/schemas/extensions/security/index.js +1 -1
  118. package/dist/schemas/extensions/security/x-default-scopes.js +16 -7
  119. package/dist/schemas/extensions/security/x-scalar-credentials-location.js +16 -7
  120. package/dist/schemas/extensions/security/x-scalar-security-body.js +14 -7
  121. package/dist/schemas/extensions/security/x-scalar-security-query.js +14 -7
  122. package/dist/schemas/extensions/security/x-scalar-security-secrets.js +66 -37
  123. package/dist/schemas/extensions/security/x-tokenName.js +11 -7
  124. package/dist/schemas/extensions/security/x-use-pkce.js +6 -10
  125. package/dist/schemas/extensions/server/x-scalar-selected-server.js +3 -7
  126. package/dist/schemas/extensions/tag/index.js +1 -1
  127. package/dist/schemas/extensions/tag/x-display-name.js +11 -7
  128. package/dist/schemas/extensions/tag/x-tag-groups.js +13 -15
  129. package/dist/schemas/extensions/workspace/index.js +2 -11
  130. package/dist/schemas/extensions/workspace/x-scalar-active-proxy.js +13 -7
  131. package/dist/schemas/extensions/workspace/x-scalar-tabs.js +15 -13
  132. package/dist/schemas/extensions.js +11 -15
  133. package/dist/schemas/inmemory-workspace.d.ts +6 -0
  134. package/dist/schemas/inmemory-workspace.d.ts.map +1 -1
  135. package/dist/schemas/inmemory-workspace.js +13 -21
  136. package/dist/schemas/navigation.js +48 -85
  137. package/dist/schemas/reference-config/appearance.js +15 -22
  138. package/dist/schemas/reference-config/features.js +14 -21
  139. package/dist/schemas/reference-config/index.d.ts +2 -0
  140. package/dist/schemas/reference-config/index.d.ts.map +1 -1
  141. package/dist/schemas/reference-config/index.js +42 -44
  142. package/dist/schemas/reference-config/meta.js +11 -18
  143. package/dist/schemas/reference-config/routing.js +7 -14
  144. package/dist/schemas/reference-config/settings.d.ts +2 -0
  145. package/dist/schemas/reference-config/settings.d.ts.map +1 -1
  146. package/dist/schemas/reference-config/settings.js +10 -17
  147. package/dist/schemas/typebox-coerce.js +23 -6
  148. package/dist/schemas/v3.1/strict/callback.js +6 -12
  149. package/dist/schemas/v3.1/strict/components.js +26 -48
  150. package/dist/schemas/v3.1/strict/contact.js +9 -12
  151. package/dist/schemas/v3.1/strict/discriminator.js +11 -10
  152. package/dist/schemas/v3.1/strict/encoding.js +15 -12
  153. package/dist/schemas/v3.1/strict/example.js +11 -13
  154. package/dist/schemas/v3.1/strict/external-documentation.js +7 -10
  155. package/dist/schemas/v3.1/strict/header.js +27 -28
  156. package/dist/schemas/v3.1/strict/info.js +10 -16
  157. package/dist/schemas/v3.1/strict/license.js +9 -12
  158. package/dist/schemas/v3.1/strict/link.js +22 -19
  159. package/dist/schemas/v3.1/strict/media-type.js +17 -16
  160. package/dist/schemas/v3.1/strict/oauth-flow.js +28 -62
  161. package/dist/schemas/v3.1/strict/oauthflows.js +14 -20
  162. package/dist/schemas/v3.1/strict/openapi-document.d.ts +70 -0
  163. package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
  164. package/dist/schemas/v3.1/strict/openapi-document.js +126 -210
  165. package/dist/schemas/v3.1/strict/operation.js +16 -43
  166. package/dist/schemas/v3.1/strict/parameter.d.ts +6 -0
  167. package/dist/schemas/v3.1/strict/parameter.d.ts.map +1 -1
  168. package/dist/schemas/v3.1/strict/parameter.js +29 -35
  169. package/dist/schemas/v3.1/strict/path-item.js +36 -40
  170. package/dist/schemas/v3.1/strict/paths.js +8 -11
  171. package/dist/schemas/v3.1/strict/ref-definitions.js +76 -100
  172. package/dist/schemas/v3.1/strict/reference.js +18 -21
  173. package/dist/schemas/v3.1/strict/request-body.js +8 -16
  174. package/dist/schemas/v3.1/strict/response.js +12 -16
  175. package/dist/schemas/v3.1/strict/responses.js +13 -11
  176. package/dist/schemas/v3.1/strict/schema.js +149 -157
  177. package/dist/schemas/v3.1/strict/security-requirement.js +13 -12
  178. package/dist/schemas/v3.1/strict/security-scheme.js +29 -41
  179. package/dist/schemas/v3.1/strict/server-variable.js +9 -12
  180. package/dist/schemas/v3.1/strict/server.js +10 -13
  181. package/dist/schemas/v3.1/strict/tag.js +11 -20
  182. package/dist/schemas/v3.1/strict/type-guards.js +20 -20
  183. package/dist/schemas/v3.1/strict/xml.js +17 -16
  184. package/dist/schemas/workspace-specification/index.js +11 -23
  185. package/dist/schemas/workspace-specification/info.js +4 -8
  186. package/dist/schemas/workspace.d.ts +6 -0
  187. package/dist/schemas/workspace.d.ts.map +1 -1
  188. package/dist/schemas/workspace.js +25 -51
  189. package/dist/schemas.js +2 -6
  190. package/dist/server.js +286 -176
  191. package/dist/workspace-plugin.js +1 -1
  192. package/package.json +13 -19
  193. package/dist/client.js.map +0 -7
  194. package/dist/entities/auth/index.js.map +0 -7
  195. package/dist/entities/auth/schema.js.map +0 -7
  196. package/dist/entities/history/index.js.map +0 -7
  197. package/dist/entities/history/schema.js.map +0 -7
  198. package/dist/events/bus.js.map +0 -7
  199. package/dist/events/definitions/analytics.js.map +0 -7
  200. package/dist/events/definitions/auth.js.map +0 -7
  201. package/dist/events/definitions/common.js.map +0 -7
  202. package/dist/events/definitions/cookie.js.map +0 -7
  203. package/dist/events/definitions/document.js.map +0 -7
  204. package/dist/events/definitions/environment.js.map +0 -7
  205. package/dist/events/definitions/hooks.js.map +0 -7
  206. package/dist/events/definitions/index.js.map +0 -7
  207. package/dist/events/definitions/meta.js.map +0 -7
  208. package/dist/events/definitions/operation.js.map +0 -7
  209. package/dist/events/definitions/server.js.map +0 -7
  210. package/dist/events/definitions/tabs.js.map +0 -7
  211. package/dist/events/definitions/tag.js.map +0 -7
  212. package/dist/events/definitions/ui.js.map +0 -7
  213. package/dist/events/definitions/workspace.js.map +0 -7
  214. package/dist/events/index.js.map +0 -7
  215. package/dist/events/listeners.js.map +0 -7
  216. package/dist/events/old-definitions.js.map +0 -7
  217. package/dist/helpers/apply-selective-updates.d.ts +0 -19
  218. package/dist/helpers/apply-selective-updates.d.ts.map +0 -1
  219. package/dist/helpers/apply-selective-updates.js +0 -37
  220. package/dist/helpers/apply-selective-updates.js.map +0 -7
  221. package/dist/helpers/deep-clone.js.map +0 -7
  222. package/dist/helpers/detect-changes-proxy.js.map +0 -7
  223. package/dist/helpers/general.js.map +0 -7
  224. package/dist/helpers/generate-unique-value.js.map +0 -7
  225. package/dist/helpers/get-fetch.js.map +0 -7
  226. package/dist/helpers/get-resolved-ref.js.map +0 -7
  227. package/dist/helpers/is-non-optional-security-requirement.js.map +0 -7
  228. package/dist/helpers/merge-object.js.map +0 -7
  229. package/dist/helpers/overrides-proxy.js.map +0 -7
  230. package/dist/helpers/unpack-proxy.js.map +0 -7
  231. package/dist/mutators/auth.js.map +0 -7
  232. package/dist/mutators/cookie.js.map +0 -7
  233. package/dist/mutators/document.js.map +0 -7
  234. package/dist/mutators/environment.js.map +0 -7
  235. package/dist/mutators/helpers.js.map +0 -7
  236. package/dist/mutators/index.js.map +0 -7
  237. package/dist/mutators/operation/body.js.map +0 -7
  238. package/dist/mutators/operation/extensions.js.map +0 -7
  239. package/dist/mutators/operation/helpers/fetch-request-to-har.js.map +0 -7
  240. package/dist/mutators/operation/helpers/fetch-response-to-har.js.map +0 -7
  241. package/dist/mutators/operation/helpers/get-parameter-position.js.map +0 -7
  242. package/dist/mutators/operation/helpers/har-to-operation.js.map +0 -7
  243. package/dist/mutators/operation/helpers/sync-path-parameters.js.map +0 -7
  244. package/dist/mutators/operation/history.js.map +0 -7
  245. package/dist/mutators/operation/index.js.map +0 -7
  246. package/dist/mutators/operation/operation.js.map +0 -7
  247. package/dist/mutators/operation/parameters.js.map +0 -7
  248. package/dist/mutators/server.js.map +0 -7
  249. package/dist/mutators/tabs.js.map +0 -7
  250. package/dist/mutators/tag.js.map +0 -7
  251. package/dist/mutators/workspace.js.map +0 -7
  252. package/dist/navigation/get-navigation-options.js.map +0 -7
  253. package/dist/navigation/helpers/get-openapi-object.js.map +0 -7
  254. package/dist/navigation/helpers/get-operation-entries.js.map +0 -7
  255. package/dist/navigation/helpers/get-parent-entry.js.map +0 -7
  256. package/dist/navigation/helpers/get-tag-entries.js.map +0 -7
  257. package/dist/navigation/helpers/get-tag.js.map +0 -7
  258. package/dist/navigation/helpers/get-x-keys.js.map +0 -7
  259. package/dist/navigation/helpers/traverse-description.js.map +0 -7
  260. package/dist/navigation/helpers/traverse-document.js.map +0 -7
  261. package/dist/navigation/helpers/traverse-examples.js.map +0 -7
  262. package/dist/navigation/helpers/traverse-paths.js.map +0 -7
  263. package/dist/navigation/helpers/traverse-schemas.js.map +0 -7
  264. package/dist/navigation/helpers/traverse-tags.js.map +0 -7
  265. package/dist/navigation/helpers/traverse-webhooks.js.map +0 -7
  266. package/dist/navigation/helpers/update-order-ids.js.map +0 -7
  267. package/dist/navigation/helpers/utils.js.map +0 -7
  268. package/dist/navigation/index.js.map +0 -7
  269. package/dist/navigation/types.js.map +0 -7
  270. package/dist/persistence/index.js.map +0 -7
  271. package/dist/persistence/indexdb.js.map +0 -7
  272. package/dist/plugins/bundler/helpers.js.map +0 -7
  273. package/dist/plugins/bundler/index.js.map +0 -7
  274. package/dist/plugins/client/index.js.map +0 -7
  275. package/dist/plugins/client/persistence.js.map +0 -7
  276. package/dist/resolve.js.map +0 -7
  277. package/dist/schemas/compose.js.map +0 -7
  278. package/dist/schemas/extensions/document/x-internal.js.map +0 -7
  279. package/dist/schemas/extensions/document/x-scalar-environments.js.map +0 -7
  280. package/dist/schemas/extensions/document/x-scalar-icon.js.map +0 -7
  281. package/dist/schemas/extensions/document/x-scalar-ignore.js.map +0 -7
  282. package/dist/schemas/extensions/document/x-scalar-is-dirty.js.map +0 -7
  283. package/dist/schemas/extensions/document/x-scalar-original-document-hash.js.map +0 -7
  284. package/dist/schemas/extensions/document/x-scalar-registry-meta.js.map +0 -7
  285. package/dist/schemas/extensions/document/x-scalar-sdk-installation.js.map +0 -7
  286. package/dist/schemas/extensions/document/x-scalar-watch-mode.js.map +0 -7
  287. package/dist/schemas/extensions/document/x-tags.js.map +0 -7
  288. package/dist/schemas/extensions/example/x-disabled.js.map +0 -7
  289. package/dist/schemas/extensions/general/x-scalar-active-environment.js.map +0 -7
  290. package/dist/schemas/extensions/general/x-scalar-cookies.js.map +0 -7
  291. package/dist/schemas/extensions/general/x-scalar-order.js.map +0 -7
  292. package/dist/schemas/extensions/operation/index.js.map +0 -7
  293. package/dist/schemas/extensions/operation/x-badge.js.map +0 -7
  294. package/dist/schemas/extensions/operation/x-code-samples.js.map +0 -7
  295. package/dist/schemas/extensions/operation/x-draft-examples.js.map +0 -7
  296. package/dist/schemas/extensions/operation/x-post-response.js.map +0 -7
  297. package/dist/schemas/extensions/operation/x-scalar-disable-parameters.js.map +0 -7
  298. package/dist/schemas/extensions/operation/x-scalar-selected-content-type.js.map +0 -7
  299. package/dist/schemas/extensions/operation/x-scalar-stability.js.map +0 -7
  300. package/dist/schemas/extensions/parameter/x-global.js.map +0 -7
  301. package/dist/schemas/extensions/schema/x-additional-properties-name.js.map +0 -7
  302. package/dist/schemas/extensions/schema/x-enum-descriptions.js.map +0 -7
  303. package/dist/schemas/extensions/schema/x-enum-varnames.js.map +0 -7
  304. package/dist/schemas/extensions/schema/x-examples.js.map +0 -7
  305. package/dist/schemas/extensions/schema/x-variable.js.map +0 -7
  306. package/dist/schemas/extensions/security/index.js.map +0 -7
  307. package/dist/schemas/extensions/security/x-default-scopes.js.map +0 -7
  308. package/dist/schemas/extensions/security/x-scalar-credentials-location.js.map +0 -7
  309. package/dist/schemas/extensions/security/x-scalar-security-body.js.map +0 -7
  310. package/dist/schemas/extensions/security/x-scalar-security-query.js.map +0 -7
  311. package/dist/schemas/extensions/security/x-scalar-security-secrets.js.map +0 -7
  312. package/dist/schemas/extensions/security/x-tokenName.js.map +0 -7
  313. package/dist/schemas/extensions/security/x-use-pkce.js.map +0 -7
  314. package/dist/schemas/extensions/server/x-scalar-selected-server.js.map +0 -7
  315. package/dist/schemas/extensions/tag/index.js.map +0 -7
  316. package/dist/schemas/extensions/tag/x-display-name.js.map +0 -7
  317. package/dist/schemas/extensions/tag/x-tag-groups.js.map +0 -7
  318. package/dist/schemas/extensions/workspace/index.js.map +0 -7
  319. package/dist/schemas/extensions/workspace/x-scalar-active-proxy.js.map +0 -7
  320. package/dist/schemas/extensions/workspace/x-scalar-tabs.js.map +0 -7
  321. package/dist/schemas/extensions.js.map +0 -7
  322. package/dist/schemas/inmemory-workspace.js.map +0 -7
  323. package/dist/schemas/navigation.js.map +0 -7
  324. package/dist/schemas/reference-config/appearance.js.map +0 -7
  325. package/dist/schemas/reference-config/features.js.map +0 -7
  326. package/dist/schemas/reference-config/index.js.map +0 -7
  327. package/dist/schemas/reference-config/meta.js.map +0 -7
  328. package/dist/schemas/reference-config/routing.js.map +0 -7
  329. package/dist/schemas/reference-config/settings.js.map +0 -7
  330. package/dist/schemas/typebox-coerce.js.map +0 -7
  331. package/dist/schemas/v3.1/strict/callback.js.map +0 -7
  332. package/dist/schemas/v3.1/strict/components.js.map +0 -7
  333. package/dist/schemas/v3.1/strict/contact.js.map +0 -7
  334. package/dist/schemas/v3.1/strict/discriminator.js.map +0 -7
  335. package/dist/schemas/v3.1/strict/encoding.js.map +0 -7
  336. package/dist/schemas/v3.1/strict/example.js.map +0 -7
  337. package/dist/schemas/v3.1/strict/external-documentation.js.map +0 -7
  338. package/dist/schemas/v3.1/strict/header.js.map +0 -7
  339. package/dist/schemas/v3.1/strict/info.js.map +0 -7
  340. package/dist/schemas/v3.1/strict/license.js.map +0 -7
  341. package/dist/schemas/v3.1/strict/link.js.map +0 -7
  342. package/dist/schemas/v3.1/strict/media-type.js.map +0 -7
  343. package/dist/schemas/v3.1/strict/oauth-flow.js.map +0 -7
  344. package/dist/schemas/v3.1/strict/oauthflows.js.map +0 -7
  345. package/dist/schemas/v3.1/strict/openapi-document.js.map +0 -7
  346. package/dist/schemas/v3.1/strict/operation.js.map +0 -7
  347. package/dist/schemas/v3.1/strict/parameter.js.map +0 -7
  348. package/dist/schemas/v3.1/strict/path-item.js.map +0 -7
  349. package/dist/schemas/v3.1/strict/paths.js.map +0 -7
  350. package/dist/schemas/v3.1/strict/ref-definitions.js.map +0 -7
  351. package/dist/schemas/v3.1/strict/reference.js.map +0 -7
  352. package/dist/schemas/v3.1/strict/request-body.js.map +0 -7
  353. package/dist/schemas/v3.1/strict/response.js.map +0 -7
  354. package/dist/schemas/v3.1/strict/responses.js.map +0 -7
  355. package/dist/schemas/v3.1/strict/schema.js.map +0 -7
  356. package/dist/schemas/v3.1/strict/security-requirement.js.map +0 -7
  357. package/dist/schemas/v3.1/strict/security-scheme.js.map +0 -7
  358. package/dist/schemas/v3.1/strict/server-variable.js.map +0 -7
  359. package/dist/schemas/v3.1/strict/server.js.map +0 -7
  360. package/dist/schemas/v3.1/strict/tag.js.map +0 -7
  361. package/dist/schemas/v3.1/strict/type-guards.js.map +0 -7
  362. package/dist/schemas/v3.1/strict/xml.js.map +0 -7
  363. package/dist/schemas/workspace-specification/index.js.map +0 -7
  364. package/dist/schemas/workspace-specification/info.js.map +0 -7
  365. package/dist/schemas/workspace.js.map +0 -7
  366. package/dist/schemas.js.map +0 -7
  367. package/dist/server.js.map +0 -7
  368. package/dist/workspace-plugin.js.map +0 -7
@@ -1,12 +1,16 @@
1
- import { Type } from "@scalar/typebox";
2
- import { AVAILABLE_CLIENTS } from "@scalar/types/snippetz";
3
- import { AppearanceSchema, defaultAppearance } from "./appearance.js";
4
- import { FeaturesSchema, defaultFeatures } from "./features.js";
5
- import { MetaSchema, defaultMeta } from "./meta.js";
6
- import { RoutingSchema, defaultRouting } from "./routing.js";
7
- import { SettingsSchema, defaultSettings } from "./settings.js";
8
- const ReferenceConfigSchema = Type.Partial(
9
- Type.Object({
1
+ import { Type } from '@scalar/typebox';
2
+ import { AVAILABLE_CLIENTS } from '@scalar/types/snippetz';
3
+ import { AppearanceSchema, defaultAppearance } from './appearance.js';
4
+ import { FeaturesSchema, defaultFeatures } from './features.js';
5
+ import { MetaSchema, defaultMeta } from './meta.js';
6
+ import { RoutingSchema, defaultRouting } from './routing.js';
7
+ import { SettingsSchema, defaultSettings } from './settings.js';
8
+ /**
9
+ * ReferenceConfigSchema defines the shape of the configuration object
10
+ * for the API Reference. All properties are optional due to Type.Partial.
11
+ * This schema is used for validating and typing the configuration.
12
+ */
13
+ export const ReferenceConfigSchema = Type.Partial(Type.Object({
10
14
  /** Document level title */
11
15
  title: Type.String(),
12
16
  /** Unique slug to identify the document */
@@ -22,39 +26,33 @@ const ReferenceConfigSchema = Type.Partial(
22
26
  /** Meta information */
23
27
  meta: MetaSchema,
24
28
  /** List of enabled HTTP clients for code samples */
25
- httpClients: Type.Array(Type.Union(AVAILABLE_CLIENTS.map((client) => Type.Literal(client))))
26
- })
27
- );
28
- const defaultReferenceConfig = {
29
- title: "Scalar API Reference",
30
- slug: "scalar-api-reference",
31
- /**
32
- * Default settings for the API reference.
33
- */
34
- settings: defaultSettings,
35
- /**
36
- * Default routing configuration for the API reference.
37
- */
38
- routing: defaultRouting,
39
- /**
40
- * Default appearance configuration for the API reference.
41
- */
42
- appearance: defaultAppearance,
43
- /**
44
- * Default features configuration for the API reference.
45
- */
46
- features: defaultFeatures,
47
- /**
48
- * Default meta configuration for the API reference.
49
- */
50
- meta: defaultMeta,
51
- /**
52
- * Default HTTP clients for the API reference.
53
- */
54
- httpClients: AVAILABLE_CLIENTS
29
+ httpClients: Type.Array(Type.Union(AVAILABLE_CLIENTS.map((client) => Type.Literal(client)))),
30
+ }));
31
+ export const defaultReferenceConfig = {
32
+ title: 'Scalar API Reference',
33
+ slug: 'scalar-api-reference',
34
+ /**
35
+ * Default settings for the API reference.
36
+ */
37
+ settings: defaultSettings,
38
+ /**
39
+ * Default routing configuration for the API reference.
40
+ */
41
+ routing: defaultRouting,
42
+ /**
43
+ * Default appearance configuration for the API reference.
44
+ */
45
+ appearance: defaultAppearance,
46
+ /**
47
+ * Default features configuration for the API reference.
48
+ */
49
+ features: defaultFeatures,
50
+ /**
51
+ * Default meta configuration for the API reference.
52
+ */
53
+ meta: defaultMeta,
54
+ /**
55
+ * Default HTTP clients for the API reference.
56
+ */
57
+ httpClients: AVAILABLE_CLIENTS,
55
58
  };
56
- export {
57
- ReferenceConfigSchema,
58
- defaultReferenceConfig
59
- };
60
- //# sourceMappingURL=index.js.map
@@ -1,24 +1,17 @@
1
- import { Type } from "@scalar/typebox";
2
- const MetaSchema = Type.Partial(
3
- Type.Object({
1
+ import { Type } from '@scalar/typebox';
2
+ export const MetaSchema = Type.Partial(Type.Object({
4
3
  title: Type.String(),
5
4
  description: Type.String(),
6
5
  ogTitle: Type.String(),
7
6
  ogDescription: Type.String(),
8
7
  ogImage: Type.String(),
9
- twitterCard: Type.String()
10
- })
11
- );
12
- const defaultMeta = {
13
- title: "Scalar API Reference",
14
- description: "Scalar API Reference",
15
- ogTitle: "Scalar API Reference",
16
- ogDescription: "Scalar API Reference",
17
- ogImage: "https://scalar.com/images/scalar-logo.png",
18
- twitterCard: "summary_large_image"
8
+ twitterCard: Type.String(),
9
+ }));
10
+ export const defaultMeta = {
11
+ title: 'Scalar API Reference',
12
+ description: 'Scalar API Reference',
13
+ ogTitle: 'Scalar API Reference',
14
+ ogDescription: 'Scalar API Reference',
15
+ ogImage: 'https://scalar.com/images/scalar-logo.png',
16
+ twitterCard: 'summary_large_image',
19
17
  };
20
- export {
21
- MetaSchema,
22
- defaultMeta
23
- };
24
- //# sourceMappingURL=meta.js.map
@@ -1,16 +1,9 @@
1
- import { Type } from "@scalar/typebox";
2
- const RoutingSchema = Type.Partial(
3
- Type.Object({
1
+ import { Type } from '@scalar/typebox';
2
+ export const RoutingSchema = Type.Partial(Type.Object({
4
3
  basePath: Type.String(),
5
- pathNotFound: Type.String()
6
- })
7
- );
8
- const defaultRouting = {
9
- basePath: "/",
10
- pathNotFound: "/"
4
+ pathNotFound: Type.String(),
5
+ }));
6
+ export const defaultRouting = {
7
+ basePath: '/',
8
+ pathNotFound: '/',
11
9
  };
12
- export {
13
- RoutingSchema,
14
- defaultRouting
15
- };
16
- //# sourceMappingURL=routing.js.map
@@ -1055,6 +1055,7 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
1055
1055
  required: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1056
1056
  deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1057
1057
  allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1058
+ allowReserved: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1058
1059
  }>, import("@scalar/typebox").TObject<{
1059
1060
  'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1060
1061
  }>, import("@scalar/typebox").TObject<{
@@ -1092,6 +1093,7 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
1092
1093
  required: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1093
1094
  deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1094
1095
  allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1096
+ allowReserved: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1095
1097
  }>, import("@scalar/typebox").TObject<{
1096
1098
  'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
1097
1099
  }>, import("@scalar/typebox").TObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/settings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAG7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAEhE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW1B,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,QAAQ,CAKlD,CAAA"}
@@ -1,7 +1,6 @@
1
- import { Type } from "@scalar/typebox";
2
- import { ServerObjectSchema } from "../../schemas/v3.1/strict/openapi-document.js";
3
- const SettingsSchema = Type.Partial(
4
- Type.Object({
1
+ import { Type } from '@scalar/typebox';
2
+ import { ServerObjectSchema } from '../../schemas/v3.1/strict/openapi-document.js';
3
+ export const SettingsSchema = Type.Partial(Type.Object({
5
4
  /** Custom proxy configuration */
6
5
  proxyUrl: Type.String(),
7
6
  /** Hotkey used to open the search menu */
@@ -9,17 +8,11 @@ const SettingsSchema = Type.Partial(
9
8
  /** Array of server configurations */
10
9
  servers: Type.Array(ServerObjectSchema),
11
10
  /** Base server URL for API requests */
12
- baseServerUrl: Type.String()
13
- })
14
- );
15
- const defaultSettings = {
16
- proxyUrl: "",
17
- searchKey: "k",
18
- servers: [],
19
- baseServerUrl: ""
11
+ baseServerUrl: Type.String(),
12
+ }));
13
+ export const defaultSettings = {
14
+ proxyUrl: '',
15
+ searchKey: 'k',
16
+ servers: [],
17
+ baseServerUrl: '',
20
18
  };
21
- export {
22
- SettingsSchema,
23
- defaultSettings
24
- };
25
- //# sourceMappingURL=settings.js.map
@@ -1,6 +1,23 @@
1
- import { Value } from "@scalar/typebox/value";
2
- const coerceValue = (schema, value) => Value.Cast(schema, value);
3
- export {
4
- coerceValue
5
- };
6
- //# sourceMappingURL=typebox-coerce.js.map
1
+ import { Value } from '@scalar/typebox/value';
2
+ /**
3
+ * Coerces a value to match the provided TypeBox schema by first converting and then casting the value.
4
+ * This is useful for ensuring values match their expected types, especially when dealing with
5
+ * form inputs or API responses that may need type conversion.
6
+ *
7
+ * @param schema - The TypeBox schema to coerce the value against
8
+ * @param value - The value to coerce
9
+ * @returns The coerced value that matches the schema
10
+ *
11
+ * @example
12
+ * // Convert string "123" to number
13
+ * const schema = Type.Number()
14
+ * const value = "123"
15
+ * const coerced = coerceValue(schema, value) // Returns 123
16
+ *
17
+ * @example
18
+ * // Convert string "true" to boolean
19
+ * const schema = Type.Boolean()
20
+ * const value = "true"
21
+ * const coerced = coerceValue(schema, value) // Returns true
22
+ */
23
+ export const coerceValue = (schema, value) => Value.Cast(schema, value);
@@ -1,12 +1,6 @@
1
- import { Type } from "@scalar/typebox";
2
- import { PathItemObjectRef } from "./ref-definitions.js";
3
- import { reference } from "./reference.js";
4
- const CallbackObjectSchemaDefinition = Type.Record(
5
- Type.String(),
6
- /** A Path Item Object used to define a callback request and expected responses. A complete example is available. */
7
- Type.Union([PathItemObjectRef, reference(PathItemObjectRef)])
8
- );
9
- export {
10
- CallbackObjectSchemaDefinition
11
- };
12
- //# sourceMappingURL=callback.js.map
1
+ import { Type } from '@scalar/typebox';
2
+ import { PathItemObjectRef } from './ref-definitions.js';
3
+ import { reference } from './reference.js';
4
+ export const CallbackObjectSchemaDefinition = Type.Record(Type.String(),
5
+ /** A Path Item Object used to define a callback request and expected responses. A complete example is available. */
6
+ Type.Union([PathItemObjectRef, reference(PathItemObjectRef)]));
@@ -1,49 +1,27 @@
1
- import { Type } from "@scalar/typebox";
2
- import {
3
- CallbackObjectRef,
4
- ExampleObjectRef,
5
- HeaderObjectRef,
6
- LinkObjectRef,
7
- ParameterObjectRef,
8
- PathItemObjectRef,
9
- RequestBodyObjectRef,
10
- ResponseObjectRef,
11
- SchemaObjectRef,
12
- SecuritySchemeObjectRef
13
- } from "./ref-definitions.js";
14
- import { reference } from "./reference.js";
15
- const SecuritySchemesSchemaDefinition = Type.Record(
16
- Type.String(),
17
- Type.Union([SecuritySchemeObjectRef, reference(SecuritySchemeObjectRef)])
18
- );
19
- const ComponentsObjectSchemaDefinition = Type.Object({
20
- /** An object to hold reusable Schema Objects. */
21
- schemas: Type.Optional(Type.Record(Type.String(), Type.Union([SchemaObjectRef, reference(SchemaObjectRef)]))),
22
- /** An object to hold reusable Response Objects. */
23
- responses: Type.Optional(Type.Record(Type.String(), Type.Union([ResponseObjectRef, reference(ResponseObjectRef)]))),
24
- /** An object to hold reusable Parameter Objects. */
25
- parameters: Type.Optional(
26
- Type.Record(Type.String(), Type.Union([ParameterObjectRef, reference(ParameterObjectRef)]))
27
- ),
28
- /** An object to hold reusable Example Objects. */
29
- examples: Type.Optional(Type.Record(Type.String(), Type.Union([ExampleObjectRef, reference(ExampleObjectRef)]))),
30
- /** An object to hold reusable Request Body Objects. */
31
- requestBodies: Type.Optional(
32
- Type.Record(Type.String(), Type.Union([RequestBodyObjectRef, reference(RequestBodyObjectRef)]))
33
- ),
34
- /** An object to hold reusable Header Objects. */
35
- headers: Type.Optional(Type.Record(Type.String(), Type.Union([HeaderObjectRef, reference(HeaderObjectRef)]))),
36
- /** An object to hold reusable Security Scheme Objects. */
37
- securitySchemes: Type.Optional(SecuritySchemesSchemaDefinition),
38
- /** An object to hold reusable Link Objects. */
39
- links: Type.Optional(Type.Record(Type.String(), Type.Union([LinkObjectRef, reference(LinkObjectRef)]))),
40
- /** An object to hold reusable Callback Objects. */
41
- callbacks: Type.Optional(Type.Record(Type.String(), Type.Union([CallbackObjectRef, reference(CallbackObjectRef)]))),
42
- /** An object to hold reusable Path Item Objects. */
43
- pathItems: Type.Optional(Type.Record(Type.String(), PathItemObjectRef))
1
+ import { Type } from '@scalar/typebox';
2
+ import { CallbackObjectRef, ExampleObjectRef, HeaderObjectRef, LinkObjectRef, ParameterObjectRef, PathItemObjectRef, RequestBodyObjectRef, ResponseObjectRef, SchemaObjectRef, SecuritySchemeObjectRef, } from './ref-definitions.js';
3
+ import { reference } from './reference.js';
4
+ export const SecuritySchemesSchemaDefinition = Type.Record(Type.String(), Type.Union([SecuritySchemeObjectRef, reference(SecuritySchemeObjectRef)]));
5
+ /** Holds a set of reusable objects for different aspects of the OAS. All objects defined within the Components Object will have no effect on the API unless they are explicitly referenced from outside the Components Object. */
6
+ export const ComponentsObjectSchemaDefinition = Type.Object({
7
+ /** An object to hold reusable Schema Objects. */
8
+ schemas: Type.Optional(Type.Record(Type.String(), Type.Union([SchemaObjectRef, reference(SchemaObjectRef)]))),
9
+ /** An object to hold reusable Response Objects. */
10
+ responses: Type.Optional(Type.Record(Type.String(), Type.Union([ResponseObjectRef, reference(ResponseObjectRef)]))),
11
+ /** An object to hold reusable Parameter Objects. */
12
+ parameters: Type.Optional(Type.Record(Type.String(), Type.Union([ParameterObjectRef, reference(ParameterObjectRef)]))),
13
+ /** An object to hold reusable Example Objects. */
14
+ examples: Type.Optional(Type.Record(Type.String(), Type.Union([ExampleObjectRef, reference(ExampleObjectRef)]))),
15
+ /** An object to hold reusable Request Body Objects. */
16
+ requestBodies: Type.Optional(Type.Record(Type.String(), Type.Union([RequestBodyObjectRef, reference(RequestBodyObjectRef)]))),
17
+ /** An object to hold reusable Header Objects. */
18
+ headers: Type.Optional(Type.Record(Type.String(), Type.Union([HeaderObjectRef, reference(HeaderObjectRef)]))),
19
+ /** An object to hold reusable Security Scheme Objects. */
20
+ securitySchemes: Type.Optional(SecuritySchemesSchemaDefinition),
21
+ /** An object to hold reusable Link Objects. */
22
+ links: Type.Optional(Type.Record(Type.String(), Type.Union([LinkObjectRef, reference(LinkObjectRef)]))),
23
+ /** An object to hold reusable Callback Objects. */
24
+ callbacks: Type.Optional(Type.Record(Type.String(), Type.Union([CallbackObjectRef, reference(CallbackObjectRef)]))),
25
+ /** An object to hold reusable Path Item Objects. */
26
+ pathItems: Type.Optional(Type.Record(Type.String(), PathItemObjectRef)),
44
27
  });
45
- export {
46
- ComponentsObjectSchemaDefinition,
47
- SecuritySchemesSchemaDefinition
48
- };
49
- //# sourceMappingURL=components.js.map
@@ -1,13 +1,10 @@
1
- import { Type } from "@scalar/typebox";
2
- const ContactObjectSchemaDefinition = Type.Object({
3
- /** The identifying name of the contact person/organization. */
4
- name: Type.Optional(Type.String()),
5
- /** The URI for the contact information. This MUST be in the form of a URI. */
6
- url: Type.Optional(Type.String()),
7
- /** The email address of the contact person/organization. This MUST be in the form of an email address. */
8
- email: Type.Optional(Type.String())
1
+ import { Type } from '@scalar/typebox';
2
+ /** Contact information for the exposed API. */
3
+ export const ContactObjectSchemaDefinition = Type.Object({
4
+ /** The identifying name of the contact person/organization. */
5
+ name: Type.Optional(Type.String()),
6
+ /** The URI for the contact information. This MUST be in the form of a URI. */
7
+ url: Type.Optional(Type.String()),
8
+ /** The email address of the contact person/organization. This MUST be in the form of an email address. */
9
+ email: Type.Optional(Type.String()),
9
10
  });
10
- export {
11
- ContactObjectSchemaDefinition
12
- };
13
- //# sourceMappingURL=contact.js.map
@@ -1,11 +1,12 @@
1
- import { Type } from "@scalar/typebox";
2
- const DiscriminatorObjectSchemaDefinition = Type.Object({
3
- /** REQUIRED. The name of the property in the payload that will hold the discriminating value. This property SHOULD be required in the payload schema, as the behavior when the property is absent is undefined. */
4
- propertyName: Type.String(),
5
- /** An object to hold mappings between payload values and schema names or URI references. */
6
- mapping: Type.Optional(Type.Record(Type.String(), Type.String()))
1
+ import { Type } from '@scalar/typebox';
2
+ /**
3
+ * When request bodies or response payloads may be one of a number of different schemas, a Discriminator Object gives a hint about the expected schema of the document. This hint can be used to aid in serialization, deserialization, and validation. The Discriminator Object does this by implicitly or explicitly associating the possible values of a named property with alternative schemas.
4
+ *
5
+ * Note that discriminator MUST NOT change the validation outcome of the schema.
6
+ */
7
+ export const DiscriminatorObjectSchemaDefinition = Type.Object({
8
+ /** REQUIRED. The name of the property in the payload that will hold the discriminating value. This property SHOULD be required in the payload schema, as the behavior when the property is absent is undefined. */
9
+ propertyName: Type.String(),
10
+ /** An object to hold mappings between payload values and schema names or URI references. */
11
+ mapping: Type.Optional(Type.Record(Type.String(), Type.String())),
7
12
  });
8
- export {
9
- DiscriminatorObjectSchemaDefinition
10
- };
11
- //# sourceMappingURL=discriminator.js.map
@@ -1,13 +1,16 @@
1
- import { Type } from "@scalar/typebox";
2
- import { HeaderObjectRef } from "./ref-definitions.js";
3
- import { reference } from "./reference.js";
4
- const EncodingObjectSchemaDefinition = Type.Object({
5
- /** The Content-Type for encoding a specific property. The value is a comma-separated list, each element of which is either a specific media type (e.g. image/png) or a wildcard media type (e.g. image/*). Default value depends on the property type as shown in the table below. */
6
- contentType: Type.Optional(Type.String()),
7
- /** A map allowing additional information to be provided as headers. Content-Type is described separately and SHALL be ignored in this section. This field SHALL be ignored if the request body media type is not a multipart. */
8
- headers: Type.Optional(Type.Record(Type.String(), Type.Union([HeaderObjectRef, reference(HeaderObjectRef)])))
1
+ import { Type } from '@scalar/typebox';
2
+ import { HeaderObjectRef } from './ref-definitions.js';
3
+ import { reference } from './reference.js';
4
+ /**
5
+ * A single encoding definition applied to a single schema property. See Appendix B for a discussion of converting values of various types to string representations.
6
+ *
7
+ * Properties are correlated with multipart parts using the name parameter of Content-Disposition: form-data, and with application/x-www-form-urlencoded using the query string parameter names. In both cases, their order is implementation-defined.
8
+ *
9
+ * See Appendix E for a detailed examination of percent-encoding concerns for form media types.
10
+ */
11
+ export const EncodingObjectSchemaDefinition = Type.Object({
12
+ /** The Content-Type for encoding a specific property. The value is a comma-separated list, each element of which is either a specific media type (e.g. image/png) or a wildcard media type (e.g. image/*). Default value depends on the property type as shown in the table below. */
13
+ contentType: Type.Optional(Type.String()),
14
+ /** A map allowing additional information to be provided as headers. Content-Type is described separately and SHALL be ignored in this section. This field SHALL be ignored if the request body media type is not a multipart. */
15
+ headers: Type.Optional(Type.Record(Type.String(), Type.Union([HeaderObjectRef, reference(HeaderObjectRef)]))),
9
16
  });
10
- export {
11
- EncodingObjectSchemaDefinition
12
- };
13
- //# sourceMappingURL=encoding.js.map
@@ -1,8 +1,12 @@
1
- import { Type } from "@scalar/typebox";
2
- import { compose } from "../../../schemas/compose.js";
3
- import { XDisabled } from "../../../schemas/extensions/example/x-disabled.js";
4
- const ExampleObjectSchemaDefinition = compose(
5
- Type.Object({
1
+ import { Type } from '@scalar/typebox';
2
+ import { compose } from '../../../schemas/compose.js';
3
+ import { XDisabled } from '../../../schemas/extensions/example/x-disabled.js';
4
+ /**
5
+ * An object grouping an internal or external example value with basic summary and description metadata. This object is typically used in fields named examples (plural), and is a referenceable alternative to older example (singular) fields that do not support referencing or metadata.
6
+ *
7
+ * Examples allow demonstration of the usage of properties, parameters and objects within OpenAPI.
8
+ */
9
+ export const ExampleObjectSchemaDefinition = compose(Type.Object({
6
10
  /** Short description for the example. */
7
11
  summary: Type.Optional(Type.String()),
8
12
  /** Long description for the example. CommonMark syntax MAY be used for rich text representation. */
@@ -10,11 +14,5 @@ const ExampleObjectSchemaDefinition = compose(
10
14
  /** Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary. */
11
15
  value: Type.Optional(Type.Any()),
12
16
  /** A URI that identifies the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive. See the rules for resolving Relative References. */
13
- externalValue: Type.Optional(Type.String())
14
- }),
15
- XDisabled
16
- );
17
- export {
18
- ExampleObjectSchemaDefinition
19
- };
20
- //# sourceMappingURL=example.js.map
17
+ externalValue: Type.Optional(Type.String()),
18
+ }), XDisabled);
@@ -1,11 +1,8 @@
1
- import { Type } from "@scalar/typebox";
2
- const ExternalDocumentationObjectSchemaDefinition = Type.Object({
3
- /** REQUIRED. The URI for the target documentation. This MUST be in the form of a URI. */
4
- url: Type.String(),
5
- /** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
6
- description: Type.Optional(Type.String())
1
+ import { Type } from '@scalar/typebox';
2
+ /** Allows referencing an external resource for extended documentation. */
3
+ export const ExternalDocumentationObjectSchemaDefinition = Type.Object({
4
+ /** REQUIRED. The URI for the target documentation. This MUST be in the form of a URI. */
5
+ url: Type.String(),
6
+ /** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
7
+ description: Type.Optional(Type.String()),
7
8
  });
8
- export {
9
- ExternalDocumentationObjectSchemaDefinition
10
- };
11
- //# sourceMappingURL=external-documentation.js.map
@@ -1,18 +1,16 @@
1
- import { Type } from "@scalar/typebox";
2
- import { compose } from "../../../schemas/compose.js";
3
- import { ExampleObjectRef, MediaTypeObjectRef, SchemaObjectRef } from "./ref-definitions.js";
4
- import { reference } from "./reference.js";
1
+ import { Type } from '@scalar/typebox';
2
+ import { compose } from '../../../schemas/compose.js';
3
+ import { ExampleObjectRef, MediaTypeObjectRef, SchemaObjectRef } from './ref-definitions.js';
4
+ import { reference } from './reference.js';
5
5
  const HeaderObjectSchemaBase = Type.Object({
6
- /** A brief description of the header. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */
7
- description: Type.Optional(Type.String()),
8
- /** Determines whether this header is mandatory. The default value is false. */
9
- required: Type.Optional(Type.Boolean()),
10
- /** Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is false. */
11
- deprecated: Type.Optional(Type.Boolean())
6
+ /** A brief description of the header. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */
7
+ description: Type.Optional(Type.String()),
8
+ /** Determines whether this header is mandatory. The default value is false. */
9
+ required: Type.Optional(Type.Boolean()),
10
+ /** Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is false. */
11
+ deprecated: Type.Optional(Type.Boolean()),
12
12
  });
13
- const HeaderObjectWithSchemaSchema = compose(
14
- HeaderObjectSchemaBase,
15
- Type.Object({
13
+ const HeaderObjectWithSchemaSchema = compose(HeaderObjectSchemaBase, Type.Object({
16
14
  /** Describes how the header value will be serialized. The default (and only legal value for headers) is "simple". */
17
15
  style: Type.Optional(Type.String()),
18
16
  /** When this is true, header values of type array or object generate a single header whose value is a comma-separated list of the array items or key-value pairs of the map, see Style Examples. For other data types this field has no effect. The default value is false. */
@@ -22,19 +20,20 @@ const HeaderObjectWithSchemaSchema = compose(
22
20
  /** Example of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */
23
21
  example: Type.Optional(Type.Any()),
24
22
  /** Examples of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */
25
- examples: Type.Optional(Type.Record(Type.String(), Type.Union([ExampleObjectRef, reference(ExampleObjectRef)])))
26
- })
27
- );
28
- const HeaderObjectSchemaDefinition = Type.Union([
29
- HeaderObjectWithSchemaSchema,
30
- compose(
31
- HeaderObjectSchemaBase,
32
- Type.Object({
33
- content: Type.Optional(Type.Record(Type.String(), MediaTypeObjectRef))
34
- })
35
- )
23
+ examples: Type.Optional(Type.Record(Type.String(), Type.Union([ExampleObjectRef, reference(ExampleObjectRef)]))),
24
+ }));
25
+ /**
26
+ * Describes a single header for HTTP responses and for individual parts in multipart representations; see the relevant Response Object and Encoding Object documentation for restrictions on which headers can be described.
27
+ *
28
+ * The Header Object follows the structure of the Parameter Object, including determining its serialization strategy based on whether schema or content is present, with the following changes:
29
+ *
30
+ * - name MUST NOT be specified, it is given in the corresponding headers map.
31
+ * - in MUST NOT be specified, it is implicitly in header.
32
+ * - All traits that are affected by the location MUST be applicable to a location of header (for example, style). This means that allowEmptyValue and allowReserved MUST NOT be used, and style, if used, MUST be limited to "simple".
33
+ */
34
+ export const HeaderObjectSchemaDefinition = Type.Union([
35
+ HeaderObjectWithSchemaSchema,
36
+ compose(HeaderObjectSchemaBase, Type.Object({
37
+ content: Type.Optional(Type.Record(Type.String(), MediaTypeObjectRef)),
38
+ })),
36
39
  ]);
37
- export {
38
- HeaderObjectSchemaDefinition
39
- };
40
- //# sourceMappingURL=header.js.map
@@ -1,11 +1,11 @@
1
- import { Type } from "@scalar/typebox";
2
- import { compose } from "../../../schemas/compose.js";
3
- import {
4
- XScalarSdkInstallationSchema
5
- } from "../../../schemas/extensions/document/x-scalar-sdk-installation.js";
6
- import { ContactObjectRef, LicenseObjectRef } from "./ref-definitions.js";
7
- const InfoObjectSchemaDefinition = compose(
8
- Type.Object({
1
+ import { Type } from '@scalar/typebox';
2
+ import { compose } from '../../../schemas/compose.js';
3
+ import { XScalarSdkInstallationSchema, } from '../../../schemas/extensions/document/x-scalar-sdk-installation.js';
4
+ import { ContactObjectRef, LicenseObjectRef } from './ref-definitions.js';
5
+ /**
6
+ * The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
7
+ */
8
+ export const InfoObjectSchemaDefinition = compose(Type.Object({
9
9
  /** REQUIRED. The title of the API. */
10
10
  title: Type.String(),
11
11
  /** REQUIRED. The version of the OpenAPI Document (which is distinct from the OpenAPI Specification version or the version of the API being described or the version of the OpenAPI Description). */
@@ -19,11 +19,5 @@ const InfoObjectSchemaDefinition = compose(
19
19
  /** The contact information for the exposed API. */
20
20
  contact: Type.Optional(ContactObjectRef),
21
21
  /** The license information for the exposed API. */
22
- license: Type.Optional(LicenseObjectRef)
23
- }),
24
- XScalarSdkInstallationSchema
25
- );
26
- export {
27
- InfoObjectSchemaDefinition
28
- };
29
- //# sourceMappingURL=info.js.map
22
+ license: Type.Optional(LicenseObjectRef),
23
+ }), XScalarSdkInstallationSchema);
@@ -1,13 +1,10 @@
1
- import { Type } from "@scalar/typebox";
2
- const LicenseObjectSchemaDefinition = Type.Object({
3
- /** REQUIRED. The license name used for the API. */
4
- name: Type.Optional(Type.String()),
5
- /** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
6
- identifier: Type.Optional(Type.String()),
7
- /** A URI for the license used for the API. This MUST be in the form of a URI. The url field is mutually exclusive of the identifier field. */
8
- url: Type.Optional(Type.String())
1
+ import { Type } from '@scalar/typebox';
2
+ /** The license information for the exposed API. */
3
+ export const LicenseObjectSchemaDefinition = Type.Object({
4
+ /** REQUIRED. The license name used for the API. */
5
+ name: Type.Optional(Type.String()),
6
+ /** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
7
+ identifier: Type.Optional(Type.String()),
8
+ /** A URI for the license used for the API. This MUST be in the form of a URI. The url field is mutually exclusive of the identifier field. */
9
+ url: Type.Optional(Type.String()),
9
10
  });
10
- export {
11
- LicenseObjectSchemaDefinition
12
- };
13
- //# sourceMappingURL=license.js.map