@scalar/workspace-store 0.40.2 → 0.40.3
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.
- package/CHANGELOG.md +7 -0
- package/dist/client.d.ts +7 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +820 -681
- package/dist/entities/auth/index.js +96 -101
- package/dist/entities/auth/schema.js +42 -116
- package/dist/entities/history/index.js +80 -60
- package/dist/entities/history/schema.js +94 -88
- package/dist/events/bus.js +146 -93
- package/dist/events/definitions/analytics.js +1 -1
- package/dist/events/definitions/auth.js +1 -1
- package/dist/events/definitions/common.js +1 -1
- package/dist/events/definitions/cookie.js +1 -1
- package/dist/events/definitions/document.js +1 -1
- package/dist/events/definitions/environment.js +1 -1
- package/dist/events/definitions/hooks.js +1 -1
- package/dist/events/definitions/index.js +1 -1
- package/dist/events/definitions/meta.js +1 -1
- package/dist/events/definitions/operation.js +1 -1
- package/dist/events/definitions/server.js +1 -1
- package/dist/events/definitions/tabs.js +1 -1
- package/dist/events/definitions/tag.js +1 -1
- package/dist/events/definitions/ui.js +1 -1
- package/dist/events/definitions/workspace.js +1 -1
- package/dist/events/index.js +3 -9
- package/dist/events/listeners.js +20 -22
- package/dist/events/old-definitions.js +15 -12
- package/dist/helpers/deep-clone.js +33 -17
- package/dist/helpers/detect-changes-proxy.js +95 -57
- package/dist/helpers/general.js +78 -23
- package/dist/helpers/generate-unique-value.js +77 -45
- package/dist/helpers/get-fetch.js +12 -10
- package/dist/helpers/get-resolved-ref.js +11 -10
- package/dist/helpers/is-non-optional-security-requirement.js +3 -6
- package/dist/helpers/merge-object.js +71 -30
- package/dist/helpers/overrides-proxy.js +98 -58
- package/dist/helpers/unpack-proxy.js +60 -58
- package/dist/mutators/auth.js +358 -230
- package/dist/mutators/cookie.js +59 -42
- package/dist/mutators/document.js +104 -66
- package/dist/mutators/environment.js +97 -72
- package/dist/mutators/helpers.js +9 -13
- package/dist/mutators/index.js +62 -49
- package/dist/mutators/operation/body.js +88 -57
- package/dist/mutators/operation/extensions.js +20 -12
- package/dist/mutators/operation/helpers/fetch-request-to-har.js +144 -107
- package/dist/mutators/operation/helpers/fetch-response-to-har.js +143 -95
- package/dist/mutators/operation/helpers/get-parameter-position.js +12 -12
- package/dist/mutators/operation/helpers/har-to-operation.js +169 -132
- package/dist/mutators/operation/helpers/sync-path-parameters.js +109 -60
- package/dist/mutators/operation/history.js +60 -64
- package/dist/mutators/operation/index.js +25 -49
- package/dist/mutators/operation/operation.js +349 -240
- package/dist/mutators/operation/parameters.js +157 -93
- package/dist/mutators/server.js +213 -152
- package/dist/mutators/tabs.js +173 -130
- package/dist/mutators/tag.js +131 -97
- package/dist/mutators/workspace.js +72 -42
- package/dist/navigation/get-navigation-options.js +97 -84
- package/dist/navigation/helpers/get-openapi-object.js +46 -29
- package/dist/navigation/helpers/get-operation-entries.js +72 -32
- package/dist/navigation/helpers/get-parent-entry.js +16 -12
- package/dist/navigation/helpers/get-tag-entries.js +56 -29
- package/dist/navigation/helpers/get-tag.js +22 -23
- package/dist/navigation/helpers/get-x-keys.js +13 -9
- package/dist/navigation/helpers/traverse-description.js +90 -72
- package/dist/navigation/helpers/traverse-document.js +111 -98
- package/dist/navigation/helpers/traverse-examples.js +35 -31
- package/dist/navigation/helpers/traverse-paths.js +118 -106
- package/dist/navigation/helpers/traverse-schemas.js +65 -64
- package/dist/navigation/helpers/traverse-tags.js +158 -129
- package/dist/navigation/helpers/traverse-webhooks.js +96 -90
- package/dist/navigation/helpers/update-order-ids.js +59 -51
- package/dist/navigation/helpers/utils.js +71 -21
- package/dist/navigation/index.js +5 -13
- package/dist/navigation/types.js +1 -1
- package/dist/persistence/index.js +283 -285
- package/dist/persistence/indexdb.js +263 -126
- package/dist/plugins/bundler/helpers.js +21 -12
- package/dist/plugins/bundler/index.d.ts +7 -0
- package/dist/plugins/bundler/index.d.ts.map +1 -1
- package/dist/plugins/bundler/index.js +305 -171
- package/dist/plugins/client/index.js +1 -5
- package/dist/plugins/client/persistence.js +95 -90
- package/dist/resolve.js +18 -25
- package/dist/schemas/compose.js +6 -7
- package/dist/schemas/extensions/document/x-internal.js +3 -7
- package/dist/schemas/extensions/document/x-scalar-environments.js +16 -22
- package/dist/schemas/extensions/document/x-scalar-icon.js +3 -7
- package/dist/schemas/extensions/document/x-scalar-ignore.js +3 -7
- package/dist/schemas/extensions/document/x-scalar-is-dirty.js +21 -8
- package/dist/schemas/extensions/document/x-scalar-original-document-hash.js +17 -8
- package/dist/schemas/extensions/document/x-scalar-registry-meta.js +15 -21
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.js +5 -13
- package/dist/schemas/extensions/document/x-scalar-watch-mode.js +4 -8
- package/dist/schemas/extensions/document/x-tags.js +3 -7
- package/dist/schemas/extensions/example/x-disabled.js +17 -7
- package/dist/schemas/extensions/general/x-scalar-active-environment.js +4 -7
- package/dist/schemas/extensions/general/x-scalar-cookies.js +9 -14
- package/dist/schemas/extensions/general/x-scalar-order.js +8 -7
- package/dist/schemas/extensions/operation/index.js +4 -23
- package/dist/schemas/extensions/operation/x-badge.js +42 -50
- package/dist/schemas/extensions/operation/x-code-samples.js +8 -12
- package/dist/schemas/extensions/operation/x-draft-examples.js +3 -7
- package/dist/schemas/extensions/operation/x-post-response.js +18 -7
- package/dist/schemas/extensions/operation/x-scalar-disable-parameters.js +57 -13
- package/dist/schemas/extensions/operation/x-scalar-selected-content-type.js +9 -7
- package/dist/schemas/extensions/operation/x-scalar-stability.js +15 -14
- package/dist/schemas/extensions/parameter/x-global.js +12 -7
- package/dist/schemas/extensions/schema/x-additional-properties-name.js +10 -7
- package/dist/schemas/extensions/schema/x-enum-descriptions.js +17 -12
- package/dist/schemas/extensions/schema/x-enum-varnames.js +21 -8
- package/dist/schemas/extensions/schema/x-examples.js +3 -7
- package/dist/schemas/extensions/schema/x-variable.js +3 -7
- package/dist/schemas/extensions/security/index.js +1 -1
- package/dist/schemas/extensions/security/x-default-scopes.js +16 -7
- package/dist/schemas/extensions/security/x-scalar-credentials-location.js +16 -7
- package/dist/schemas/extensions/security/x-scalar-security-body.js +14 -7
- package/dist/schemas/extensions/security/x-scalar-security-query.js +14 -7
- package/dist/schemas/extensions/security/x-scalar-security-secrets.js +66 -37
- package/dist/schemas/extensions/security/x-tokenName.js +11 -7
- package/dist/schemas/extensions/security/x-use-pkce.js +6 -10
- package/dist/schemas/extensions/server/x-scalar-selected-server.js +3 -7
- package/dist/schemas/extensions/tag/index.js +1 -1
- package/dist/schemas/extensions/tag/x-display-name.js +11 -7
- package/dist/schemas/extensions/tag/x-tag-groups.js +13 -15
- package/dist/schemas/extensions/workspace/index.js +2 -11
- package/dist/schemas/extensions/workspace/x-scalar-active-proxy.js +13 -7
- package/dist/schemas/extensions/workspace/x-scalar-tabs.js +15 -13
- package/dist/schemas/extensions.js +11 -15
- package/dist/schemas/inmemory-workspace.js +13 -21
- package/dist/schemas/navigation.js +48 -85
- package/dist/schemas/reference-config/appearance.js +15 -22
- package/dist/schemas/reference-config/features.js +14 -21
- package/dist/schemas/reference-config/index.js +42 -44
- package/dist/schemas/reference-config/meta.js +11 -18
- package/dist/schemas/reference-config/routing.js +7 -14
- package/dist/schemas/reference-config/settings.js +10 -17
- package/dist/schemas/typebox-coerce.js +23 -6
- package/dist/schemas/v3.1/strict/callback.js +6 -12
- package/dist/schemas/v3.1/strict/components.js +26 -48
- package/dist/schemas/v3.1/strict/contact.js +9 -12
- package/dist/schemas/v3.1/strict/discriminator.js +11 -10
- package/dist/schemas/v3.1/strict/encoding.js +15 -12
- package/dist/schemas/v3.1/strict/example.js +11 -13
- package/dist/schemas/v3.1/strict/external-documentation.js +7 -10
- package/dist/schemas/v3.1/strict/header.js +27 -28
- package/dist/schemas/v3.1/strict/info.js +10 -16
- package/dist/schemas/v3.1/strict/license.js +9 -12
- package/dist/schemas/v3.1/strict/link.js +22 -19
- package/dist/schemas/v3.1/strict/media-type.js +17 -16
- package/dist/schemas/v3.1/strict/oauth-flow.js +28 -62
- package/dist/schemas/v3.1/strict/oauthflows.js +14 -20
- package/dist/schemas/v3.1/strict/openapi-document.js +126 -210
- package/dist/schemas/v3.1/strict/operation.js +16 -43
- package/dist/schemas/v3.1/strict/parameter.js +27 -35
- package/dist/schemas/v3.1/strict/path-item.js +36 -40
- package/dist/schemas/v3.1/strict/paths.js +8 -11
- package/dist/schemas/v3.1/strict/ref-definitions.js +76 -100
- package/dist/schemas/v3.1/strict/reference.js +18 -21
- package/dist/schemas/v3.1/strict/request-body.js +8 -16
- package/dist/schemas/v3.1/strict/response.js +12 -16
- package/dist/schemas/v3.1/strict/responses.js +13 -11
- package/dist/schemas/v3.1/strict/schema.js +149 -157
- package/dist/schemas/v3.1/strict/security-requirement.js +13 -12
- package/dist/schemas/v3.1/strict/security-scheme.js +29 -41
- package/dist/schemas/v3.1/strict/server-variable.js +9 -12
- package/dist/schemas/v3.1/strict/server.js +10 -13
- package/dist/schemas/v3.1/strict/tag.js +11 -20
- package/dist/schemas/v3.1/strict/type-guards.js +20 -20
- package/dist/schemas/v3.1/strict/xml.js +17 -16
- package/dist/schemas/workspace-specification/index.js +11 -23
- package/dist/schemas/workspace-specification/info.js +4 -8
- package/dist/schemas/workspace.js +25 -51
- package/dist/schemas.js +2 -6
- package/dist/server.js +286 -176
- package/dist/workspace-plugin.js +1 -1
- package/package.json +13 -19
- package/dist/client.js.map +0 -7
- package/dist/entities/auth/index.js.map +0 -7
- package/dist/entities/auth/schema.js.map +0 -7
- package/dist/entities/history/index.js.map +0 -7
- package/dist/entities/history/schema.js.map +0 -7
- package/dist/events/bus.js.map +0 -7
- package/dist/events/definitions/analytics.js.map +0 -7
- package/dist/events/definitions/auth.js.map +0 -7
- package/dist/events/definitions/common.js.map +0 -7
- package/dist/events/definitions/cookie.js.map +0 -7
- package/dist/events/definitions/document.js.map +0 -7
- package/dist/events/definitions/environment.js.map +0 -7
- package/dist/events/definitions/hooks.js.map +0 -7
- package/dist/events/definitions/index.js.map +0 -7
- package/dist/events/definitions/meta.js.map +0 -7
- package/dist/events/definitions/operation.js.map +0 -7
- package/dist/events/definitions/server.js.map +0 -7
- package/dist/events/definitions/tabs.js.map +0 -7
- package/dist/events/definitions/tag.js.map +0 -7
- package/dist/events/definitions/ui.js.map +0 -7
- package/dist/events/definitions/workspace.js.map +0 -7
- package/dist/events/index.js.map +0 -7
- package/dist/events/listeners.js.map +0 -7
- package/dist/events/old-definitions.js.map +0 -7
- package/dist/helpers/apply-selective-updates.d.ts +0 -19
- package/dist/helpers/apply-selective-updates.d.ts.map +0 -1
- package/dist/helpers/apply-selective-updates.js +0 -37
- package/dist/helpers/apply-selective-updates.js.map +0 -7
- package/dist/helpers/deep-clone.js.map +0 -7
- package/dist/helpers/detect-changes-proxy.js.map +0 -7
- package/dist/helpers/general.js.map +0 -7
- package/dist/helpers/generate-unique-value.js.map +0 -7
- package/dist/helpers/get-fetch.js.map +0 -7
- package/dist/helpers/get-resolved-ref.js.map +0 -7
- package/dist/helpers/is-non-optional-security-requirement.js.map +0 -7
- package/dist/helpers/merge-object.js.map +0 -7
- package/dist/helpers/overrides-proxy.js.map +0 -7
- package/dist/helpers/unpack-proxy.js.map +0 -7
- package/dist/mutators/auth.js.map +0 -7
- package/dist/mutators/cookie.js.map +0 -7
- package/dist/mutators/document.js.map +0 -7
- package/dist/mutators/environment.js.map +0 -7
- package/dist/mutators/helpers.js.map +0 -7
- package/dist/mutators/index.js.map +0 -7
- package/dist/mutators/operation/body.js.map +0 -7
- package/dist/mutators/operation/extensions.js.map +0 -7
- package/dist/mutators/operation/helpers/fetch-request-to-har.js.map +0 -7
- package/dist/mutators/operation/helpers/fetch-response-to-har.js.map +0 -7
- package/dist/mutators/operation/helpers/get-parameter-position.js.map +0 -7
- package/dist/mutators/operation/helpers/har-to-operation.js.map +0 -7
- package/dist/mutators/operation/helpers/sync-path-parameters.js.map +0 -7
- package/dist/mutators/operation/history.js.map +0 -7
- package/dist/mutators/operation/index.js.map +0 -7
- package/dist/mutators/operation/operation.js.map +0 -7
- package/dist/mutators/operation/parameters.js.map +0 -7
- package/dist/mutators/server.js.map +0 -7
- package/dist/mutators/tabs.js.map +0 -7
- package/dist/mutators/tag.js.map +0 -7
- package/dist/mutators/workspace.js.map +0 -7
- package/dist/navigation/get-navigation-options.js.map +0 -7
- package/dist/navigation/helpers/get-openapi-object.js.map +0 -7
- package/dist/navigation/helpers/get-operation-entries.js.map +0 -7
- package/dist/navigation/helpers/get-parent-entry.js.map +0 -7
- package/dist/navigation/helpers/get-tag-entries.js.map +0 -7
- package/dist/navigation/helpers/get-tag.js.map +0 -7
- package/dist/navigation/helpers/get-x-keys.js.map +0 -7
- package/dist/navigation/helpers/traverse-description.js.map +0 -7
- package/dist/navigation/helpers/traverse-document.js.map +0 -7
- package/dist/navigation/helpers/traverse-examples.js.map +0 -7
- package/dist/navigation/helpers/traverse-paths.js.map +0 -7
- package/dist/navigation/helpers/traverse-schemas.js.map +0 -7
- package/dist/navigation/helpers/traverse-tags.js.map +0 -7
- package/dist/navigation/helpers/traverse-webhooks.js.map +0 -7
- package/dist/navigation/helpers/update-order-ids.js.map +0 -7
- package/dist/navigation/helpers/utils.js.map +0 -7
- package/dist/navigation/index.js.map +0 -7
- package/dist/navigation/types.js.map +0 -7
- package/dist/persistence/index.js.map +0 -7
- package/dist/persistence/indexdb.js.map +0 -7
- package/dist/plugins/bundler/helpers.js.map +0 -7
- package/dist/plugins/bundler/index.js.map +0 -7
- package/dist/plugins/client/index.js.map +0 -7
- package/dist/plugins/client/persistence.js.map +0 -7
- package/dist/resolve.js.map +0 -7
- package/dist/schemas/compose.js.map +0 -7
- package/dist/schemas/extensions/document/x-internal.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-environments.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-icon.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-ignore.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-is-dirty.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-original-document-hash.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-registry-meta.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-watch-mode.js.map +0 -7
- package/dist/schemas/extensions/document/x-tags.js.map +0 -7
- package/dist/schemas/extensions/example/x-disabled.js.map +0 -7
- package/dist/schemas/extensions/general/x-scalar-active-environment.js.map +0 -7
- package/dist/schemas/extensions/general/x-scalar-cookies.js.map +0 -7
- package/dist/schemas/extensions/general/x-scalar-order.js.map +0 -7
- package/dist/schemas/extensions/operation/index.js.map +0 -7
- package/dist/schemas/extensions/operation/x-badge.js.map +0 -7
- package/dist/schemas/extensions/operation/x-code-samples.js.map +0 -7
- package/dist/schemas/extensions/operation/x-draft-examples.js.map +0 -7
- package/dist/schemas/extensions/operation/x-post-response.js.map +0 -7
- package/dist/schemas/extensions/operation/x-scalar-disable-parameters.js.map +0 -7
- package/dist/schemas/extensions/operation/x-scalar-selected-content-type.js.map +0 -7
- package/dist/schemas/extensions/operation/x-scalar-stability.js.map +0 -7
- package/dist/schemas/extensions/parameter/x-global.js.map +0 -7
- package/dist/schemas/extensions/schema/x-additional-properties-name.js.map +0 -7
- package/dist/schemas/extensions/schema/x-enum-descriptions.js.map +0 -7
- package/dist/schemas/extensions/schema/x-enum-varnames.js.map +0 -7
- package/dist/schemas/extensions/schema/x-examples.js.map +0 -7
- package/dist/schemas/extensions/schema/x-variable.js.map +0 -7
- package/dist/schemas/extensions/security/index.js.map +0 -7
- package/dist/schemas/extensions/security/x-default-scopes.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-credentials-location.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-security-body.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-security-query.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-security-secrets.js.map +0 -7
- package/dist/schemas/extensions/security/x-tokenName.js.map +0 -7
- package/dist/schemas/extensions/security/x-use-pkce.js.map +0 -7
- package/dist/schemas/extensions/server/x-scalar-selected-server.js.map +0 -7
- package/dist/schemas/extensions/tag/index.js.map +0 -7
- package/dist/schemas/extensions/tag/x-display-name.js.map +0 -7
- package/dist/schemas/extensions/tag/x-tag-groups.js.map +0 -7
- package/dist/schemas/extensions/workspace/index.js.map +0 -7
- package/dist/schemas/extensions/workspace/x-scalar-active-proxy.js.map +0 -7
- package/dist/schemas/extensions/workspace/x-scalar-tabs.js.map +0 -7
- package/dist/schemas/extensions.js.map +0 -7
- package/dist/schemas/inmemory-workspace.js.map +0 -7
- package/dist/schemas/navigation.js.map +0 -7
- package/dist/schemas/reference-config/appearance.js.map +0 -7
- package/dist/schemas/reference-config/features.js.map +0 -7
- package/dist/schemas/reference-config/index.js.map +0 -7
- package/dist/schemas/reference-config/meta.js.map +0 -7
- package/dist/schemas/reference-config/routing.js.map +0 -7
- package/dist/schemas/reference-config/settings.js.map +0 -7
- package/dist/schemas/typebox-coerce.js.map +0 -7
- package/dist/schemas/v3.1/strict/callback.js.map +0 -7
- package/dist/schemas/v3.1/strict/components.js.map +0 -7
- package/dist/schemas/v3.1/strict/contact.js.map +0 -7
- package/dist/schemas/v3.1/strict/discriminator.js.map +0 -7
- package/dist/schemas/v3.1/strict/encoding.js.map +0 -7
- package/dist/schemas/v3.1/strict/example.js.map +0 -7
- package/dist/schemas/v3.1/strict/external-documentation.js.map +0 -7
- package/dist/schemas/v3.1/strict/header.js.map +0 -7
- package/dist/schemas/v3.1/strict/info.js.map +0 -7
- package/dist/schemas/v3.1/strict/license.js.map +0 -7
- package/dist/schemas/v3.1/strict/link.js.map +0 -7
- package/dist/schemas/v3.1/strict/media-type.js.map +0 -7
- package/dist/schemas/v3.1/strict/oauth-flow.js.map +0 -7
- package/dist/schemas/v3.1/strict/oauthflows.js.map +0 -7
- package/dist/schemas/v3.1/strict/openapi-document.js.map +0 -7
- package/dist/schemas/v3.1/strict/operation.js.map +0 -7
- package/dist/schemas/v3.1/strict/parameter.js.map +0 -7
- package/dist/schemas/v3.1/strict/path-item.js.map +0 -7
- package/dist/schemas/v3.1/strict/paths.js.map +0 -7
- package/dist/schemas/v3.1/strict/ref-definitions.js.map +0 -7
- package/dist/schemas/v3.1/strict/reference.js.map +0 -7
- package/dist/schemas/v3.1/strict/request-body.js.map +0 -7
- package/dist/schemas/v3.1/strict/response.js.map +0 -7
- package/dist/schemas/v3.1/strict/responses.js.map +0 -7
- package/dist/schemas/v3.1/strict/schema.js.map +0 -7
- package/dist/schemas/v3.1/strict/security-requirement.js.map +0 -7
- package/dist/schemas/v3.1/strict/security-scheme.js.map +0 -7
- package/dist/schemas/v3.1/strict/server-variable.js.map +0 -7
- package/dist/schemas/v3.1/strict/server.js.map +0 -7
- package/dist/schemas/v3.1/strict/tag.js.map +0 -7
- package/dist/schemas/v3.1/strict/type-guards.js.map +0 -7
- package/dist/schemas/v3.1/strict/xml.js.map +0 -7
- package/dist/schemas/workspace-specification/index.js.map +0 -7
- package/dist/schemas/workspace-specification/info.js.map +0 -7
- package/dist/schemas/workspace.js.map +0 -7
- package/dist/schemas.js.map +0 -7
- package/dist/server.js.map +0 -7
- package/dist/workspace-plugin.js.map +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/parameter.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport { type XInternal, XInternalSchema } from '@/schemas/extensions/document/x-internal'\nimport { type XScalarIgnore, XScalarIgnoreSchema } from '@/schemas/extensions/document/x-scalar-ignore'\nimport { XGlobal } from '@/schemas/extensions/parameter/x-global'\nimport type { ExampleObject } from '@/schemas/v3.1/strict/example'\nimport type { MediaTypeObject } from '@/schemas/v3.1/strict/media-type'\nimport { ExampleObjectRef, MediaTypeObjectRef, SchemaObjectRef } from '@/schemas/v3.1/strict/ref-definitions'\nimport { type ReferenceType, reference } from '@/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@/schemas/v3.1/strict/schema'\n\nconst ParameterObjectBaseSchema = compose(\n Type.Object({\n /** REQUIRED. The name of the parameter. Parameter names are case sensitive.\n * - If in is \"path\", the name field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.\n * - If in is \"header\" and the name field is \"Accept\", \"Content-Type\" or \"Authorization\", the parameter definition SHALL be ignored.\n * - For all other cases, the name corresponds to the parameter name used by the in field. */\n name: Type.String(),\n /** REQUIRED. The location of the parameter. Possible values are \"query\", \"header\", \"path\" or \"cookie\". */\n in: Type.Union([Type.Literal('query'), Type.Literal('header'), Type.Literal('path'), Type.Literal('cookie')]),\n /** A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */\n description: Type.Optional(Type.String()),\n /** Determines whether this parameter is mandatory. If the parameter location is \"path\", this field is REQUIRED and its value MUST be true. Otherwise, the field MAY be included and its default value is false. */\n required: Type.Optional(Type.Boolean()),\n /** Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false. */\n deprecated: Type.Optional(Type.Boolean()),\n /** If true, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted entirely, which the server SHOULD interpret as the parameter being unused. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Interactions between this field and the parameter's Schema Object are implementation-defined. This field is valid only for query parameters. Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision. */\n allowEmptyValue: Type.Optional(Type.Boolean()),\n }),\n XGlobal,\n XInternalSchema,\n XScalarIgnoreSchema,\n)\n\ntype ParameterObjectBase = {\n /** REQUIRED. The name of the parameter. Parameter names are case sensitive.\n * - If in is \"path\", the name field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.\n * - If in is \"header\" and the name field is \"Accept\", \"Content-Type\" or \"Authorization\", the parameter definition SHALL be ignored.\n * - For all other cases, the name corresponds to the parameter name used by the in field. */\n name: string\n /** REQUIRED. The location of the parameter. Possible values are \"query\", \"header\", \"path\" or \"cookie\". */\n in: 'query' | 'header' | 'path' | 'cookie'\n /** A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */\n description?: string\n /** Determines whether this parameter is mandatory. If the parameter location is \"path\", this field is REQUIRED and its value MUST be true. Otherwise, the field MAY be included and its default value is false. */\n required?: boolean\n /** Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false. */\n deprecated?: boolean\n /** If true, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted entirely, which the server SHOULD interpret as the parameter being unused. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Interactions between this field and the parameter's Schema Object are implementation-defined. This field is valid only for query parameters. Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision. */\n allowEmptyValue?: boolean\n /**\n * OpenAPI extension used by the api-client application to determine if a parameter is considered global in scope\n * for the entire workspace. When set, this parameter will be injected into every request automatically.\n */\n 'x-global'?: boolean\n} & XInternal &\n XScalarIgnore\n\nconst ParameterObjectWithSchemaSchema = compose(\n ParameterObjectBaseSchema,\n Type.Object({\n /** Describes how the header value will be serialized. The default (and only legal value for headers) is \"simple\". */\n style: Type.Optional(Type.String()),\n /** 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. */\n explode: Type.Optional(Type.Boolean()),\n /** The schema defining the type used for the header. */\n schema: Type.Optional(Type.Union([SchemaObjectRef, reference(SchemaObjectRef)])),\n /** Example of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */\n example: Type.Optional(Type.Any()),\n /** Examples of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */\n examples: Type.Optional(Type.Record(Type.String(), Type.Union([ExampleObjectRef, reference(ExampleObjectRef)]))),\n }),\n)\n\nexport type ParameterWithSchemaObject = ParameterObjectBase & {\n /** Describes how the header value will be serialized. The default (and only legal value for headers) is \"simple\". */\n style?: string\n /** 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. */\n explode?: boolean\n /** The schema defining the type used for the header. */\n schema?: ReferenceType<SchemaObject>\n /** Example of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */\n example?: any\n /** Examples of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */\n examples?: Record<string, ReferenceType<ExampleObject>>\n}\n\nconst ParameterObjectWithContentSchema = compose(\n ParameterObjectBaseSchema,\n Type.Object({\n content: Type.Optional(Type.Record(Type.String(), MediaTypeObjectRef)),\n }),\n)\n\nexport type ParameterWithContentObject = ParameterObjectBase & {\n content?: Record<string, MediaTypeObject>\n}\n\n/**\n * Describes a single operation parameter.\n *\n * A unique parameter is defined by a combination of a name and location.\n *\n * See Appendix E for a detailed examination of percent-encoding concerns, including interactions with the application/x-www-form-urlencoded query string format.\n */\nexport const ParameterObjectSchemaDefinition = Type.Union([\n ParameterObjectWithSchemaSchema,\n ParameterObjectWithContentSchema,\n])\n\n/**\n * Describes a single operation parameter.\n *\n * A unique parameter is defined by a combination of a name and location.\n *\n * See Appendix E for a detailed examination of percent-encoding concerns, including interactions with the application/x-www-form-urlencoded query string format.\n */\nexport type ParameterObject = ParameterWithSchemaObject | ParameterWithContentObject\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAErB,SAAS,eAAe;AACxB,SAAyB,uBAAuB;AAChD,SAA6B,2BAA2B;AACxD,SAAS,eAAe;AAGxB,SAAS,kBAAkB,oBAAoB,uBAAuB;AACtE,SAA6B,iBAAiB;AAG9C,MAAM,4BAA4B;AAAA,EAChC,KAAK,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKV,MAAM,KAAK,OAAO;AAAA;AAAA,IAElB,IAAI,KAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,GAAG,KAAK,QAAQ,QAAQ,GAAG,KAAK,QAAQ,MAAM,GAAG,KAAK,QAAQ,QAAQ,CAAC,CAAC;AAAA;AAAA,IAE5G,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,IAExC,UAAU,KAAK,SAAS,KAAK,QAAQ,CAAC;AAAA;AAAA,IAEtC,YAAY,KAAK,SAAS,KAAK,QAAQ,CAAC;AAAA;AAAA,IAExC,iBAAiB,KAAK,SAAS,KAAK,QAAQ,CAAC;AAAA,EAC/C,CAAC;AAAA,EACD;AAAA,EACA;AAAA,EACA;AACF;AA0BA,MAAM,kCAAkC;AAAA,EACtC;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,OAAO,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,IAElC,SAAS,KAAK,SAAS,KAAK,QAAQ,CAAC;AAAA;AAAA,IAErC,QAAQ,KAAK,SAAS,KAAK,MAAM,CAAC,iBAAiB,UAAU,eAAe,CAAC,CAAC,CAAC;AAAA;AAAA,IAE/E,SAAS,KAAK,SAAS,KAAK,IAAI,CAAC;AAAA;AAAA,IAEjC,UAAU,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,MAAM,CAAC,kBAAkB,UAAU,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAAA,EACjH,CAAC;AACH;AAeA,MAAM,mCAAmC;AAAA,EACvC;AAAA,EACA,KAAK,OAAO;AAAA,IACV,SAAS,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,kBAAkB,CAAC;AAAA,EACvE,CAAC;AACH;AAaO,MAAM,kCAAkC,KAAK,MAAM;AAAA,EACxD;AAAA,EACA;AACF,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/path-item.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport type { OperationObject } from './operation'\nimport type { ParameterObject } from './parameter'\nimport { OperationObjectRef, ParameterObjectRef, ServerObjectRef } from './ref-definitions'\nimport { type ReferenceType, reference } from './reference'\nimport type { ServerObject } from './server'\n\nexport const PathItemObjectSchemaDefinition = Type.Object({\n /**\n * Allows for a referenced definition of this path item. The value MUST be in the form of a URI, and the referenced structure MUST be in the form of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving Relative References.\n *\n * Note: The behavior of $ref with adjacent properties is likely to change in future versions of this specification to bring it into closer alignment with the behavior of the Reference Object.\n */\n '$ref': Type.Optional(Type.String()),\n /** An optional string summary, intended to apply to all operations in this path. */\n summary: Type.Optional(Type.String()),\n /** An optional string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation. */\n description: Type.Optional(Type.String()),\n /** A definition of a GET operation on this path. */\n get: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),\n /** A definition of a PUT operation on this path. */\n put: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),\n /** A definition of a POST operation on this path. */\n post: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),\n /** A definition of a DELETE operation on this path. */\n delete: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),\n /** A definition of a PATCH operation on this path. */\n patch: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),\n /** A definition of a CONNECT operation on this path. */\n connect: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),\n /** A definition of a OPTIONS operation on this path. */\n options: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),\n /** A definition of a HEAD operation on this path. */\n head: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),\n /** A definition of a TRACE operation on this path. */\n trace: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),\n /** An alternative servers array to service all operations in this path. If a servers array is specified at the OpenAPI Object level, it will be overridden by this value. */\n servers: Type.Optional(Type.Array(ServerObjectRef)),\n /** A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined in the OpenAPI Object's components.parameters. */\n parameters: Type.Optional(Type.Array(Type.Union([ParameterObjectRef, reference(ParameterObjectRef)]))),\n})\n\nexport type PathItemObject = {\n /**\n * Allows for a referenced definition of this path item. The value MUST be in the form of a URI, and the referenced structure MUST be in the form of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving Relative References.\n *\n * Note: The behavior of $ref with adjacent properties is likely to change in future versions of this specification to bring it into closer alignment with the behavior of the Reference Object.\n */\n '$ref'?: string\n /** An optional string summary, intended to apply to all operations in this path. */\n summary?: string\n /** An optional string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation. */\n description?: string\n /** A definition of a GET operation on this path. */\n get?: ReferenceType<OperationObject>\n /** A definition of a PUT operation on this path. */\n put?: ReferenceType<OperationObject>\n /** A definition of a POST operation on this path. */\n post?: ReferenceType<OperationObject>\n /** A definition of a DELETE operation on this path. */\n delete?: ReferenceType<OperationObject>\n /** A definition of a PATCH operation on this path. */\n patch?: ReferenceType<OperationObject>\n /** A definition of a CONNECT operation on this path. */\n connect?: ReferenceType<OperationObject>\n /** A definition of a OPTIONS operation on this path. */\n options?: ReferenceType<OperationObject>\n /** A definition of a HEAD operation on this path. */\n head?: ReferenceType<OperationObject>\n /** A definition of a TRACE operation on this path. */\n trace?: ReferenceType<OperationObject>\n /** An alternative servers array to service all operations in this path. If a servers array is specified at the OpenAPI Object level, it will be overridden by this value. */\n servers?: ServerObject[]\n /** A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined in the OpenAPI Object's components.parameters. */\n parameters?: ReferenceType<ParameterObject>[]\n}\n"],
|
|
5
|
-
"mappings": "AAA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AA,EAElD,YAAY,KAAK,SAAS,KAAK,MAAM,KAAK,MAAM,CAAC,oBAAoB,UAAU,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACvG,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/paths.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport type { PathItemObject } from './path-item'\nimport { PathItemObjectRef } from './ref-definitions'\n\n/**\n * Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the Server Object in order to construct the full URL. The Paths Object MAY be empty, due to Access Control List (ACL) constraints.\n */\nexport const PathsObjectSchemaDefinition = Type.Record(\n Type.String(),\n /** A relative path to an individual endpoint. The field name MUST begin with a forward slash (/). The path is appended (no relative URL resolution) to the expanded URL from the Server Object's url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use. */\n PathItemObjectRef,\n)\n\n/**\n * Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the Server Object in order to construct the full URL. The Paths Object MAY be empty, due to Access Control List (ACL) constraints.\n */\nexport type PathsObject = Record<string, PathItemObject>\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAGrB,SAAS,yBAAyB;AAK3B,MAAM,8BAA8B,KAAK;AAAA,EAC9C,KAAK,OAAO;AAAA;AAAA,EAEZ;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/ref-definitions.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\n/**\n * Reference definitions for OpenAPI 3.1 objects.\n * These can be used with Type.Ref to create references to these objects in other schemas.\n *\n * Referencing them this way helps avoid circular dependencies in TypeBox schemas while keeping the overhead performance lower.\n */\nexport const REF_DEFINITIONS = {\n ComponentsObject: 'ComponentsObject',\n SecurityRequirementObject: 'SecurityRequirementObject',\n TagObject: 'TagObject',\n CallbackObject: 'CallbackObject',\n PathsObject: 'PathsObject',\n PathItemObject: 'PathItemObject',\n OperationObject: 'OperationObject',\n SchemaObject: 'SchemaObject',\n EncodingObject: 'EncodingObject',\n HeaderObject: 'HeaderObject',\n MediaTypeObject: 'MediaTypeObject',\n ServerObject: 'ServerObject',\n ExternalDocumentationObject: 'ExternalDocumentationObject',\n InfoObject: 'InfoObject',\n ContactObject: 'ContactObject',\n LicenseObject: 'LicenseObject',\n ResponseObject: 'ResponseObject',\n ResponsesObject: 'ResponsesObject',\n ParameterObject: 'ParameterObject',\n ExampleObject: 'ExampleObject',\n RequestBodyObject: 'RequestBodyObject',\n SecuritySchemeObject: 'SecuritySchemeObject',\n SecuritySchemes: 'SecuritySchemes',\n LinkObject: 'LinkObject',\n XMLObject: 'XMLObject',\n DiscriminatorObject: 'DiscriminatorObject',\n OAuthFlowsObject: 'OAuthFlowsObject',\n ServerVariableObject: 'ServerVariableObject',\n\n // Navigation schemas\n TraversedDescriptionObject: 'TraversedDescriptionObject',\n TraversedOperationObject: 'TraversedOperationObject',\n TraversedSchemaObject: 'TraversedSchemaObject',\n TraversedWebhookObject: 'TraversedWebhookObject',\n TraversedTagObject: 'TraversedTagObject',\n TraversedEntryObject: 'TraversedEntryObject',\n TraversedDocumentObject: 'TraversedDocumentObject',\n} as const\n\n// Type alias for schema definitions\nexport const ComponentsObjectRef = Type.Ref(REF_DEFINITIONS.ComponentsObject)\nexport const SecurityRequirementObjectRef = Type.Ref(REF_DEFINITIONS.SecurityRequirementObject)\nexport const TagObjectRef = Type.Ref(REF_DEFINITIONS.TagObject)\nexport const CallbackObjectRef = Type.Ref(REF_DEFINITIONS.CallbackObject)\nexport const PathItemObjectRef = Type.Ref(REF_DEFINITIONS.PathItemObject)\nexport const PathsObjectRef = Type.Ref(REF_DEFINITIONS.PathsObject)\nexport const OperationObjectRef = Type.Ref(REF_DEFINITIONS.OperationObject)\nexport const SchemaObjectRef = Type.Ref(REF_DEFINITIONS.SchemaObject)\nexport const EncodingObjectRef = Type.Ref(REF_DEFINITIONS.EncodingObject)\nexport const HeaderObjectRef = Type.Ref(REF_DEFINITIONS.HeaderObject)\nexport const MediaTypeObjectRef = Type.Ref(REF_DEFINITIONS.MediaTypeObject)\nexport const ServerObjectRef = Type.Ref(REF_DEFINITIONS.ServerObject)\nexport const ExternalDocumentationObjectRef = Type.Ref(REF_DEFINITIONS.ExternalDocumentationObject)\nexport const InfoObjectRef = Type.Ref(REF_DEFINITIONS.InfoObject)\nexport const ContactObjectRef = Type.Ref(REF_DEFINITIONS.ContactObject)\nexport const LicenseObjectRef = Type.Ref(REF_DEFINITIONS.LicenseObject)\nexport const ResponseObjectRef = Type.Ref(REF_DEFINITIONS.ResponseObject)\nexport const ResponsesObjectRef = Type.Ref(REF_DEFINITIONS.ResponsesObject)\nexport const ParameterObjectRef = Type.Ref(REF_DEFINITIONS.ParameterObject)\nexport const ExampleObjectRef = Type.Ref(REF_DEFINITIONS.ExampleObject)\nexport const RequestBodyObjectRef = Type.Ref(REF_DEFINITIONS.RequestBodyObject)\nexport const SecuritySchemeObjectRef = Type.Ref(REF_DEFINITIONS.SecuritySchemeObject)\nexport const LinkObjectRef = Type.Ref(REF_DEFINITIONS.LinkObject)\nexport const XMLObjectRef = Type.Ref(REF_DEFINITIONS.XMLObject)\nexport const DiscriminatorObjectRef = Type.Ref(REF_DEFINITIONS.DiscriminatorObject)\nexport const OAuthFlowsObjectRef = Type.Ref(REF_DEFINITIONS.OAuthFlowsObject)\nexport const ServerVariableObjectRef = Type.Ref(REF_DEFINITIONS.ServerVariableObject)\n\n// Navigation schema references\nexport const TraversedEntryObjectRef = Type.Ref(REF_DEFINITIONS.TraversedEntryObject)\n// export const TraversedTagObjectRef = Type.Ref(REF_DEFINITIONS.TraversedTagObject)\nexport const TraversedDocumentObjectRef = Type.Ref(REF_DEFINITIONS.TraversedDocumentObject)\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAQd,MAAM,kBAAkB;AAAA,EAC7B,kBAAkB;AAAA,EAClB,2BAA2B;AAAA,EAC3B,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,6BAA6B;AAAA,EAC7B,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,kBAAkB;AAAA,EAClB,sBAAsB;AAAA;AAAA,EAGtB,4BAA4B;AAAA,EAC5B,0BAA0B;AAAA,EAC1B,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EACtB,yBAAyB;AAC3B;AAGO,MAAM,sBAAsB,KAAK,IAAI,gBAAgB,gBAAgB;AACrE,MAAM,+BAA+B,KAAK,IAAI,gBAAgB,yBAAyB;AACvF,MAAM,eAAe,KAAK,IAAI,gBAAgB,SAAS;AACvD,MAAM,oBAAoB,KAAK,IAAI,gBAAgB,cAAc;AACjE,MAAM,oBAAoB,KAAK,IAAI,gBAAgB,cAAc;AACjE,MAAM,iBAAiB,KAAK,IAAI,gBAAgB,WAAW;AAC3D,MAAM,qBAAqB,KAAK,IAAI,gBAAgB,eAAe;AACnE,MAAM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Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\n\nexport const ReferenceObjectExtensionsSchema = Type.Object({\n /** Indicates the current status of the reference resolution. Can be either 'loading' while fetching the reference or 'error' if the resolution failed. */\n '$status': Type.Optional(Type.Union([Type.Literal('loading'), Type.Literal('error')])),\n /** Indicates whether this reference should be resolved globally across all documents, rather than just within the current document context. */\n '$global': Type.Optional(Type.Boolean()),\n})\n\n/**\n * A simple object to allow referencing other components in the OpenAPI Description, internally and externally.\n *\n * The $ref string value contains a URI RFC3986, which identifies the value being referenced.\n *\n * See the rules for resolving Relative References. */\nexport const ReferenceObjectSchema = compose(\n Type.Object({\n /** REQUIRED. The reference identifier. This MUST be in the form of a URI. */\n '$ref': Type.String(),\n /** A short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a summary field, then this field has no effect. */\n summary: Type.Optional(Type.String()),\n /** A description which by default SHOULD override that of the referenced component. CommonMark syntax MAY be used for rich text representation. If the referenced object-type does not allow a description field, then this field has no effect. */\n description: Type.Optional(Type.String()),\n }),\n ReferenceObjectExtensionsSchema,\n)\n\n/**\n * A simple object to allow referencing other components in the OpenAPI Description, internally and externally.\n *\n * The $ref string value contains a URI RFC3986, which identifies the value being referenced.\n *\n * See the rules for resolving Relative References. */\nexport type ReferenceObject = {\n /** REQUIRED. The reference identifier. This MUST be in the form of a URI. */\n '$ref': string\n /** A short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a summary field, then this field has no effect. */\n summary?: string\n /** A description which by default SHOULD override that of the referenced component. CommonMark syntax MAY be used for rich text representation. If the referenced object-type does not allow a description field, then this field has no effect. */\n description?: string\n /** Indicates the current status of the reference resolution. Can be either 'loading' while fetching the reference or 'error' if the resolution failed. */\n '$status'?: 'loading' | 'error'\n /** Indicates whether this reference should be resolved globally across all documents, rather than just within the current document context. */\n '$global'?: boolean\n}\n\nexport const reference = <T extends TSchema>(schema: T) =>\n compose(ReferenceObjectSchema, Type.Object({ '$ref-value': schema }))\n\nexport type ReferenceType<Value> = Value | (ReferenceObject & { '$ref-value': Value })\n"],
|
|
5
|
-
"mappings": "AAAA,SAAuB,YAAY;AAEnC,SAAS,eAAe;AAEjB,MAAM,kCAAkC,KAAK,OAAO;AAAA;AAAA,EAEzD,WAAW,KAAK,SAAS,KAAK,MAAM,CAAC,KAAK,QAAQ,SAAS,GAAG,KAAK,QAAQ,OAAO,CAAC,CAAC,CAAC;AAAA;AAAA,EAErF,WAAW,KAAK,SAAS,KAAK,QAAQ,CAAC;AACzC,CAAC;AAQM,MAAM,wBAAwB;AAAA,EACnC,KAAK,OAAO;AAAA;AAAA,IAEV,QAAQ,KAAK,OAAO;AAAA;AAAA,IAEpB,SAAS,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,IAEpC,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA,EAC1C,CAAC;AAAA,EACD;AACF;AAqBO,MAAM,YAAY,CAAoB,WAC3C,QAAQ,uBAAuB,KAAK,OAAO,EAAE,cAAc,OAAO,CAAC,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/request-body.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport {\n type XScalarSelectedContentType,\n XScalarSelectedContentTypeSchema,\n} from '@/schemas/extensions/operation/x-scalar-selected-content-type'\n\nimport type { MediaTypeObject } from './media-type'\nimport { MediaTypeObjectRef } from './ref-definitions'\n\n/** Describes a single request body. */\nexport const RequestBodyObjectSchemaDefinition = compose(\n Type.Object({\n /** A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */\n description: Type.Optional(Type.String()),\n /** REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. \"text/plain\" overrides \"text/* */\n content: Type.Record(Type.String(), MediaTypeObjectRef),\n /** Determines if the request body is required in the request. Defaults to false. */\n required: Type.Optional(Type.Boolean()),\n }),\n XScalarSelectedContentTypeSchema,\n)\n\n/** Describes a single request body. */\nexport type RequestBodyObject = {\n /** A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */\n description?: string\n /** REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. \"text/plain\" overrides \"text/* */\n content: Record<string, MediaTypeObject>\n /** Determines if the request body is required in the request. Defaults to false. */\n required?: boolean\n} & XScalarSelectedContentType\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAErB,SAAS,eAAe;AACxB;AAAA,EAEE;AAAA,OACK;AAGP,SAAS,0BAA0B;AAG5B,MAAM,oCAAoC;AAAA,EAC/C,KAAK,OAAO;AAAA;AAAA,IAEV,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,IAExC,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,kBAAkB;AAAA;AAAA,IAEtD,UAAU,KAAK,SAAS,KAAK,QAAQ,CAAC;AAAA,EACxC,CAAC;AAAA,EACD;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/response.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport type { HeaderObject } from '@/schemas/v3.1/strict/header'\nimport type { MediaTypeObject } from '@/schemas/v3.1/strict/media-type'\n\nimport type { LinkObject } from './link'\nimport { HeaderObjectRef, LinkObjectRef, MediaTypeObjectRef } from './ref-definitions'\nimport { type ReferenceType, reference } from './reference'\n\nexport const ResponseObjectSchemaDefinition = Type.Object({\n /** REQUIRED. A description of the response. CommonMark syntax MAY be used for rich text representation. */\n description: Type.String(),\n /** Maps a header name to its definition. RFC7230 states header names are case insensitive. If a response header is defined with the name \"Content-Type\", it SHALL be ignored. */\n headers: Type.Optional(Type.Record(Type.String(), Type.Union([HeaderObjectRef, reference(HeaderObjectRef)]))),\n /** A map containing descriptions of potential response payloads. The key is a media type or media type range and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. \"text/plain\" overrides \"text/*\" */\n content: Type.Optional(Type.Record(Type.String(), MediaTypeObjectRef)),\n /** A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects. */\n links: Type.Optional(Type.Record(Type.String(), Type.Union([LinkObjectRef, reference(LinkObjectRef)]))),\n})\n\n/**\n * Describes a single response from an API operation, including design-time, static links to operations based on the response.\n */\nexport type ResponseObject = {\n /** REQUIRED. A description of the response. CommonMark syntax MAY be used for rich text representation. */\n description: string\n /** Maps a header name to its definition. RFC7230 states header names are case insensitive. If a response header is defined with the name \"Content-Type\", it SHALL be ignored. */\n headers?: Record<string, ReferenceType<HeaderObject>>\n /** A map containing descriptions of potential response payloads. The key is a media type or media type range and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. \"text/plain\" overrides \"text/*\" */\n content?: Record<string, MediaTypeObject>\n /** A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects. */\n links?: Record<string, ReferenceType<LinkObject>>\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAMrB,SAAS,iBAAiB,eAAe,0BAA0B;AACnE,SAA6B,iBAAiB;AAEvC,MAAM,iCAAiC,KAAK,OAAO;AAAA;AAAA,EAExD,aAAa,KAAK,OAAO;AAAA;AAAA,EAEzB,SAAS,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,MAAM,CAAC,iBAAiB,UAAU,eAAe,CAAC,CAAC,CAAC,CAAC;AAAA;AAAA,EAE5G,SAAS,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,kBAAkB,CAAC;AAAA;AAAA,EAErE,OAAO,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,MAAM,CAAC,eAAe,UAAU,aAAa,CAAC,CAAC,CAAC,CAAC;AACxG,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/responses.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport { ResponseObjectRef } from './ref-definitions'\nimport { type ReferenceType, reference } from './reference'\nimport type { ResponseObject } from './response'\n\n/**\n * A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.\n *\n * The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.\n *\n * The default MAY be used as a default Response Object for all HTTP codes that are not covered individually by the Responses Object.\n *\n * The Responses Object MUST contain at least one response code, and if only one response code is provided it SHOULD be the response for a successful operation call.\n */\nexport const ResponsesObjectSchemaDefinition = Type.Record(\n Type.String(),\n Type.Union([ResponseObjectRef, reference(ResponseObjectRef)]),\n)\n\n/**\n * A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.\n *\n * The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.\n *\n * The default MAY be used as a default Response Object for all HTTP codes that are not covered individually by the Responses Object.\n *\n * The Responses Object MUST contain at least one response code, and if only one response code is provided it SHOULD be the response for a successful operation call.\n */\nexport type ResponsesObject = Record<string, ReferenceType<ResponseObject>>\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAErB,SAAS,yBAAyB;AAClC,SAA6B,iBAAiB;AAYvC,MAAM,kCAAkC,KAAK;AAAA,EAClD,KAAK,OAAO;AAAA,EACZ,KAAK,MAAM,CAAC,mBAAmB,UAAU,iBAAiB,CAAC,CAAC;AAC9D;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/schema.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport { type XInternal, XInternalSchema } from '@/schemas/extensions/document/x-internal'\nimport { type XScalarIgnore, XScalarIgnoreSchema } from '@/schemas/extensions/document/x-scalar-ignore'\nimport { XTags } from '@/schemas/extensions/document/x-tags'\nimport {\n type XAdditionalPropertiesName,\n XAdditionalPropertiesNameSchema,\n} from '@/schemas/extensions/schema/x-additional-properties-name'\nimport { type XEnumDescriptions, XEnumDescriptionsSchema } from '@/schemas/extensions/schema/x-enum-descriptions'\nimport { type XEnumVarNames, XEnumVarNamesSchema } from '@/schemas/extensions/schema/x-enum-varnames'\nimport { type XExamples, XExamplesSchema } from '@/schemas/extensions/schema/x-examples'\nimport { type XVariable, XVariableSchema } from '@/schemas/extensions/schema/x-variable'\nimport type { ExternalDocumentationObject } from '@/schemas/v3.1/strict/external-documentation'\nimport type { XMLObject } from '@/schemas/v3.1/strict/xml'\n\nimport type { DiscriminatorObject } from './discriminator'\nimport {\n DiscriminatorObjectRef,\n ExternalDocumentationObjectRef,\n SchemaObjectRef,\n XMLObjectRef,\n} from './ref-definitions'\nimport { type ReferenceObject, ReferenceObjectSchema } from './reference'\n\nexport type SchemaReferenceType<Value> = Value | (ReferenceObject & { '$ref-value': unknown })\n\nconst schemaOrReference = Type.Union([\n SchemaObjectRef,\n compose(ReferenceObjectSchema, Type.Object({ '$ref-value': Type.Unknown() })),\n])\n\n/** We use this type to ensure that we are parsing a schema object as every property can be optional */\ntype _InternalType = CoreProperties & {\n __scalar_: string\n} & Extensions\n\n/**\n * Primitive types that don't have additional validation properties.\n * These types (null, boolean, string, number, integer, object, array) can be used\n * without additional validation constraints.\n *\n * TODO: Type array will actually validate against every union type but we can cross that bridge when we come to it\n */\nconst OtherTypes = Type.Object({\n type: Type.Union([\n Type.Literal('null'),\n Type.Literal('boolean'),\n Type.Array(\n Type.Union([\n Type.Literal('null'),\n Type.Literal('boolean'),\n Type.Literal('string'),\n Type.Literal('number'),\n Type.Literal('integer'),\n Type.Literal('object'),\n Type.Literal('array'),\n ]),\n ),\n ]),\n})\n\ntype OtherType = 'boolean' | 'null' | ('string' | 'number' | 'boolean' | 'object' | 'null' | 'integer' | 'array')[]\n\ntype OtherTypes = CoreProperties & {\n type: OtherType\n} & Extensions\n\nconst Extensions = compose(\n XScalarIgnoreSchema,\n XInternalSchema,\n XVariableSchema,\n XExamplesSchema,\n XEnumDescriptionsSchema,\n XEnumVarNamesSchema,\n XAdditionalPropertiesNameSchema,\n XTags,\n)\n\ntype Extensions = XScalarIgnore &\n XInternal &\n XVariable &\n XEnumDescriptions &\n XEnumVarNames &\n XExamples &\n XAdditionalPropertiesName &\n XTags\n\nconst CorePropertiesWithSchema = Type.Object({\n name: Type.Optional(Type.String()),\n /** A title for the schema. */\n title: Type.Optional(Type.String()),\n /** A description of the schema. */\n description: Type.Optional(Type.String()),\n /** Default value for the schema. */\n default: Type.Optional(Type.Unknown()),\n /** Array of allowed values. */\n enum: Type.Optional(Type.Array(Type.Unknown())),\n /** Constant value that must match exactly. */\n const: Type.Optional(Type.Unknown()),\n /** Media type for content validation. */\n contentMediaType: Type.Optional(Type.String()),\n /** Content encoding. */\n contentEncoding: Type.Optional(Type.String()),\n /** Schema for content validation. */\n contentSchema: Type.Optional(schemaOrReference),\n /** Whether the schema is deprecated. */\n deprecated: Type.Optional(Type.Boolean()),\n /** Adds support for polymorphism. The discriminator is used to determine which of a set of schemas a payload is expected to satisfy. See Composition and Inheritance for more details. */\n discriminator: Type.Optional(DiscriminatorObjectRef),\n /** Whether the schema is read-only. */\n readOnly: Type.Optional(Type.Boolean()),\n /** Whether the schema is write-only. */\n writeOnly: Type.Optional(Type.Boolean()),\n /** This MAY be used only on property schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property. */\n xml: Type.Optional(XMLObjectRef),\n /** Additional external documentation for this schema. */\n externalDocs: Type.Optional(ExternalDocumentationObjectRef),\n /**\n * A free-form field to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.\n *\n * @deprecated The example field has been deprecated in favor of the JSON Schema examples keyword. Use of example is discouraged, and later versions of this specification may remove it.\n */\n example: Type.Optional(Type.Unknown()),\n /**\n * An array of examples of valid instances for this schema. This keyword follows the JSON Schema Draft 2020-12 specification.\n * Each example should be a valid instance of the schema.\n */\n examples: Type.Optional(Type.Array(Type.Unknown())),\n /** All schemas must be valid. */\n allOf: Type.Optional(Type.Array(schemaOrReference)),\n /** Exactly one schema must be valid. */\n oneOf: Type.Optional(Type.Array(schemaOrReference)),\n /** At least one schema must be valid. */\n anyOf: Type.Optional(Type.Array(schemaOrReference)),\n /** Schema must not be valid. */\n not: Type.Optional(schemaOrReference),\n})\n\ntype CoreProperties = {\n name?: string\n /** A title for the schema. */\n title?: string\n /** A description of the schema. */\n description?: string\n /** Default value for the schema. */\n default?: unknown\n /** Array of allowed values. */\n enum?: unknown[]\n /** Constant value that must match exactly. */\n const?: unknown\n /** Media type for content validation. */\n contentMediaType?: string\n /** Content encoding. */\n contentEncoding?: string\n /** Schema for content validation. */\n contentSchema?: SchemaReferenceType<SchemaObject>\n /** Whether the schema is deprecated. */\n deprecated?: boolean\n /** Adds support for polymorphism. The discriminator is used to determine which of a set of schemas a payload is expected to satisfy. See Composition and Inheritance for more details. */\n discriminator?: DiscriminatorObject\n /** Whether the schema is read-only. */\n readOnly?: boolean\n /** Whether the schema is write-only. */\n writeOnly?: boolean\n /** This MAY be used only on property schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property. */\n xml?: XMLObject\n /** Additional external documentation for this schema. */\n externalDocs?: ExternalDocumentationObject\n /**\n * A free-form field to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.\n *\n * @deprecated The example field has been deprecated in favor of the JSON Schema examples keyword. Use of example is discouraged, and later versions of this specification may remove it.\n */\n example?: unknown\n /**\n * An array of examples of valid instances for this schema. This keyword follows the JSON Schema Draft 2020-12 specification.\n * Each example should be a valid instance of the schema.\n */\n examples?: unknown[]\n /** All schemas must be valid. */\n allOf?: SchemaReferenceType<SchemaObject>[]\n /** Exactly one schema must be valid. */\n oneOf?: SchemaReferenceType<SchemaObject>[]\n /** At least one schema must be valid. */\n anyOf?: SchemaReferenceType<SchemaObject>[]\n /** Schema must not be valid. */\n not?: SchemaReferenceType<SchemaObject>\n}\n\n/**\n * Numeric validation properties for number and integer types.\n */\nconst NumericProperties = Type.Object({\n type: Type.Union([Type.Literal('number'), Type.Literal('integer')]),\n /** Different subtypes */\n format: Type.Optional(Type.String()),\n /** Number must be a multiple of this value. */\n multipleOf: Type.Optional(Type.Number()),\n /** Maximum value (inclusive). */\n maximum: Type.Optional(Type.Number()),\n /** Maximum value (exclusive). */\n exclusiveMaximum: Type.Optional(Type.Number({ minimum: 0 })),\n /** Minimum value (inclusive). */\n minimum: Type.Optional(Type.Number()),\n /** Minimum value (exclusive). */\n exclusiveMinimum: Type.Optional(Type.Number({ minimum: 0 })),\n})\n\ntype NumericObject = CoreProperties & {\n type: 'number' | 'integer'\n /** Different subtypes */\n format?:\n | 'int8'\n | 'int16'\n | 'int32'\n | 'int64'\n | 'uint8'\n | 'uint16'\n | 'uint32'\n | 'uint64'\n | 'double-int'\n | 'float'\n | 'double'\n | 'decimal'\n | 'decimal128'\n | 'sf-integer'\n | 'sf-decimal'\n | (string & {})\n /** Number must be a multiple of this value. */\n multipleOf?: number\n /** Maximum value (inclusive). */\n maximum?: number\n /** Maximum value (exclusive). */\n exclusiveMaximum?: number\n /** Minimum value (inclusive). */\n minimum?: number\n /** Minimum value (exclusive). */\n exclusiveMinimum?: number\n} & Extensions\n\n/**\n * String validation properties for string types.\n */\nconst StringValidationProperties = Type.Object({\n type: Type.Literal('string'),\n /** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */\n format: Type.Optional(Type.String()),\n /** Maximum string length. */\n maxLength: Type.Optional(Type.Integer({ minimum: 0 })),\n /** Minimum string length. */\n minLength: Type.Optional(Type.Integer({ minimum: 0 })),\n /** Regular expression pattern. */\n pattern: Type.Optional(Type.String()),\n})\n\n/**\n * Supported string formats in OpenAPI schemas.\n *\n * These provide better type safety for string format validation. We wanted to allow any arbitrary string\n * in the schema, so we type it in typescript instead. This gives us autocomplete while allowing any string!\n */\ntype StringFormat =\n // Date and time formats\n | 'date'\n | 'date-time'\n | 'date-time-local'\n | 'time'\n | 'time-local'\n | 'duration'\n | 'http-date'\n // Network formats\n | 'email'\n | 'idn-email'\n | 'hostname'\n | 'idn-hostname'\n | 'ipv4'\n | 'ipv6'\n | 'uri'\n | 'uri-reference'\n | 'uri-template'\n | 'iri'\n | 'iri-reference'\n | 'uuid'\n // Content formats\n | 'binary'\n | 'byte'\n | 'base64url'\n | 'html'\n | 'commonmark'\n | 'password'\n | 'regex'\n | 'json-pointer'\n | 'relative-json-pointer'\n | 'media-range'\n // Character formats\n | 'char'\n // Structured field string formats\n | 'sf-string'\n | 'sf-token'\n | 'sf-binary'\n | 'sf-boolean'\n | (string & {})\n\ntype StringObject = CoreProperties & {\n type: 'string'\n /** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */\n format?: StringFormat\n /** Maximum string length. */\n maxLength?: number\n /** Minimum string length. */\n minLength?: number\n /** Regular expression pattern. */\n pattern?: string\n} & Extensions\n\nconst ArrayValidationPropertiesWithSchema = Type.Object({\n type: Type.Literal('array'),\n /** Maximum number of items in array. */\n maxItems: Type.Optional(Type.Integer({ minimum: 0 })),\n /** Minimum number of items in array. */\n minItems: Type.Optional(Type.Integer({ minimum: 0 })),\n /** Whether array items must be unique. */\n uniqueItems: Type.Optional(Type.Boolean()),\n /** Schema for array items. */\n items: Type.Optional(schemaOrReference),\n /** Schema for tuple validation. */\n prefixItems: Type.Optional(Type.Array(schemaOrReference)),\n})\n\ntype ArrayObject = CoreProperties & {\n type: 'array'\n /** Maximum number of items in array. */\n maxItems?: number\n /** Minimum number of items in array. */\n minItems?: number\n /** Whether array items must be unique. */\n uniqueItems?: boolean\n /** Schema for array items. */\n items?: SchemaReferenceType<SchemaObject>\n /** Schema for tuple validation. */\n prefixItems?: SchemaReferenceType<SchemaObject>[]\n} & Extensions\n\nconst ObjectValidationPropertiesWithSchema = Type.Object({\n type: Type.Literal('object'),\n /** Maximum number of properties. */\n maxProperties: Type.Optional(Type.Integer({ minimum: 0 })),\n /** Minimum number of properties. */\n minProperties: Type.Optional(Type.Integer({ minimum: 0 })),\n /** Array of required property names. */\n required: Type.Optional(Type.Array(Type.String())),\n /** Object property definitions. */\n properties: Type.Optional(Type.Record(Type.String(), schemaOrReference)),\n /** Schema for additional properties. */\n additionalProperties: Type.Optional(Type.Union([Type.Boolean(), schemaOrReference])),\n /** Properties matching regex patterns. */\n patternProperties: Type.Optional(Type.Record(Type.String(), schemaOrReference)),\n /** Constraints on property names (JSON Schema propertyNames keyword). */\n propertyNames: Type.Optional(schemaOrReference),\n})\n\ntype ObjectObject = CoreProperties & {\n type: 'object'\n /** Maximum number of properties. */\n maxProperties?: number\n /** Minimum number of properties. */\n minProperties?: number\n /** Array of required property names. */\n required?: string[]\n /** Object property definitions. */\n properties?: Record<string, SchemaReferenceType<SchemaObject>>\n /** Schema for additional properties. */\n additionalProperties?: boolean | SchemaReferenceType<SchemaObject>\n /** Properties matching regex patterns. */\n patternProperties?: Record<string, SchemaReferenceType<SchemaObject>>\n /** Constraints on property names (JSON Schema propertyNames keyword). */\n propertyNames?: SchemaReferenceType<SchemaObject>\n} & Extensions\n\n/** Builds the recursive schema schema */\nexport const SchemaObjectSchemaDefinition = Type.Union([\n // Keep compositions first so they get priority when union is evaluated\n // Make sure there is always a required field so not all properties are optional\n // When all properties are optional (1) typescript will not throw any warnings/error and accepts anything\n // even a non resolved ref and (2) it will match any schema so it will not validate the refs correctly\n compose(Type.Object({ __scalar_: Type.String() }), CorePropertiesWithSchema, Extensions),\n compose(OtherTypes, CorePropertiesWithSchema, Extensions),\n compose(NumericProperties, CorePropertiesWithSchema, Extensions),\n compose(StringValidationProperties, CorePropertiesWithSchema, Extensions),\n compose(ObjectValidationPropertiesWithSchema, CorePropertiesWithSchema, Extensions),\n compose(ArrayValidationPropertiesWithSchema, CorePropertiesWithSchema, Extensions),\n])\n\nexport type SchemaObject = _InternalType | OtherTypes | NumericObject | StringObject | ObjectObject | ArrayObject\nexport type MaybeRefSchemaObject = SchemaReferenceType<SchemaObject>\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAErB,SAAS,eAAe;AACxB,SAAyB,uBAAuB;AAChD,SAA6B,2BAA2B;AACxD,SAAS,aAAa;AACtB;AAAA,EAEE;AAAA,OACK;AACP,SAAiC,+BAA+B;AAChE,SAA6B,2BAA2B;AACxD,SAAyB,uBAAuB;AAChD,SAAyB,uBAAuB;AAKhD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAA+B,6BAA6B;AAI5D,MAAM,oBAAoB,KAAK,MAAM;AAAA,EACnC;AAAA,EACA,QAAQ,uBAAuB,KAAK,OAAO,EAAE,cAAc,KAAK,QAAQ,EAAE,CAAC,CAAC;AAC9E,CAAC;AAcD,MAAM,aAAa,KAAK,OAAO;AAAA,EAC7B,MAAM,KAAK,MAAM;AAAA,IACf,KAAK,QAAQ,MAAM;AAAA,IACnB,KAAK,QAAQ,SAAS;AAAA,IACtB,KAAK;AAAA,MACH,KAAK,MAAM;AAAA,QACT,KAAK,QAAQ,MAAM;AAAA,QACnB,KAAK,QAAQ,SAAS;AAAA,QACtB,KAAK,QAAQ,QAAQ;AAAA,QACrB,KAAK,QAAQ,QAAQ;AAAA,QACrB,KAAK,QAAQ,SAAS;AAAA,QACtB,KAAK,QAAQ,QAAQ;AAAA,QACrB,KAAK,QAAQ,O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AA0B,UAAU;AACnF,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/security-requirement.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\n/**\n * Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.\n *\n * A Security Requirement Object MAY refer to multiple security schemes in which case all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.\n *\n * When the security field is defined on the OpenAPI Object or Operation Object and contains multiple Security Requirement Objects, only one of the entries in the list needs to be satisfied to authorize the request. This enables support for scenarios where the API allows multiple, independent security schemes.\n *\n * An empty Security Requirement Object ({}) indicates anonymous access is supported.\n */\nexport const SecurityRequirementObjectSchemaDefinition = Type.Partial(\n Type.Record(\n /** Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type \"oauth2\" or \"openIdConnect\", then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MAY contain a list of role names which are required for the execution, but are not otherwise defined or exchanged in-band. */\n Type.String(),\n Type.Array(Type.String()),\n ),\n)\n\n/**\n * Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.\n *\n * A Security Requirement Object MAY refer to multiple security schemes in which case all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.\n *\n * When the security field is defined on the OpenAPI Object or Operation Object and contains multiple Security Requirement Objects, only one of the entries in the list needs to be satisfied to authorize the request. This enables support for scenarios where the API allows multiple, independent security schemes.\n *\n * The partial allows for an empty Security Requirement Object ({}) to be included.\n */\nexport type SecurityRequirementObject = Partial<\n Record<\n /** Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type \"oauth2\" or \"openIdConnect\", then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MAY contain a list of role names which are required for the execution, but are not otherwise defined or exchanged in-band. */\n string,\n string[]\n >\n>\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAWd,MAAM,4CAA4C,KAAK;AAAA,EAC5D,KAAK;AAAA;AAAA,IAEH,KAAK,OAAO;AAAA,IACZ,KAAK,MAAM,KAAK,OAAO,CAAC;AAAA,EAC1B;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/security-scheme.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport { type XDefaultScopes, XDefaultScopesSchema } from '@/schemas/extensions/security/x-default-scopes'\nimport type { OAuthFlowsObject } from '@/schemas/v3.1/strict/oauthflows'\nimport { OAuthFlowsObjectRef } from '@/schemas/v3.1/strict/ref-definitions'\n\nconst DescriptionSchema = Type.Object({\n /** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */\n description: Type.Optional(Type.String()),\n})\n\ntype Description = {\n /** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */\n description?: string\n}\n\nconst ApiKeySchema = compose(\n DescriptionSchema,\n Type.Object({\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: Type.Literal('apiKey'),\n /** REQUIRED. The name of the header, query or cookie parameter to be used. */\n name: Type.String(),\n /** REQUIRED. The location of the API key. Valid values are \"query\", \"header\", or \"cookie\". */\n in: Type.Union([Type.Literal('query'), Type.Literal('header'), Type.Literal('cookie')]),\n }),\n)\n\nexport type ApiKeyObject = Description & {\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: 'apiKey'\n /** REQUIRED. The name of the header, query or cookie parameter to be used. */\n name: string\n /** REQUIRED. The location of the API key. Valid values are \"query\", \"header\", or \"cookie\". */\n in: 'query' | 'header' | 'cookie'\n}\n\nconst HttpSchema = compose(\n DescriptionSchema,\n Type.Object({\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: Type.Literal('http'),\n /** REQUIRED. The name of the HTTP Authentication scheme to be used in the Authorization header as defined in RFC7235. The values used SHOULD be registered in the IANA Authentication Scheme registry. The value is case-insensitive, as defined in RFC7235. */\n scheme: Type.Union([Type.Literal('basic'), Type.Literal('bearer')]),\n /** A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. */\n bearerFormat: Type.Optional(Type.String()),\n }),\n)\n\nexport type HttpObject = Description & {\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: 'http'\n /** REQUIRED. The name of the HTTP Authentication scheme to be used in the Authorization header as defined in RFC7235. The values used SHOULD be registered in the IANA Authentication Scheme registry. The value is case-insensitive, as defined in RFC7235. */\n scheme: 'basic' | 'bearer'\n /** A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. */\n bearerFormat?: string\n}\n\nconst OAuth2 = compose(\n DescriptionSchema,\n Type.Object({\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: Type.Literal('oauth2'),\n /** REQUIRED. An object containing configuration information for the flow types supported. */\n flows: OAuthFlowsObjectRef,\n }),\n XDefaultScopesSchema,\n)\n\nexport type OAuth2Object = Description & {\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: 'oauth2'\n /** REQUIRED. An object containing configuration information for the flow types supported. */\n flows: OAuthFlowsObject\n} & XDefaultScopes\n\nconst OpenIdConnect = compose(\n DescriptionSchema,\n Type.Object({\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: Type.Literal('openIdConnect'),\n /** REQUIRED. Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata. */\n openIdConnectUrl: Type.String(),\n }),\n)\n\nexport type OpenIdConnectObject = Description & {\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: 'openIdConnect'\n /** REQUIRED. Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata. */\n openIdConnectUrl: string\n}\n\n/**\n * Defines a security scheme that can be used by the operations.\n *\n * Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2's common flows (implicit, password, client credentials and authorization code) as defined in RFC6749, and [[OpenID-Connect-Core]]. Please note that as of 2020, the implicit flow is about to be deprecated by OAuth 2.0 Security Best Current Practice. Recommended for most use cases is Authorization Code Grant flow with PKCE.\n */\nexport const SecuritySchemeObjectSchemaDefinition = Type.Union([ApiKeySchema, HttpSchema, OAuth2, OpenIdConnect])\n\nexport type SecuritySchemeObject = ApiKeyObject | HttpObject | OAuth2Object | OpenIdConnectObject\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAErB,SAAS,eAAe;AACxB,SAA8B,4BAA4B;AAE1D,SAAS,2BAA2B;AAEpC,MAAM,oBAAoB,KAAK,OAAO;AAAA;AAAA,EAEpC,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAC1C,CAAC;AAOD,MAAM,eAAe;AAAA,EACnB;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,MAAM,KAAK,QAAQ,QAAQ;AAAA;AAAA,IAE3B,MAAM,KAAK,OAAO;AAAA;AAAA,IAElB,IAAI,KAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,GAAG,KAAK,QAAQ,QAAQ,GAAG,KAAK,QAAQ,QAAQ,CAAC,CAAC;AAAA,EACxF,CAAC;AACH;AAWA,MAAM,aAAa;AAAA,EACjB;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,MAAM,KAAK,QAAQ,MAAM;AAAA;AAAA,IAEzB,QAAQ,KAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,GAAG,KAAK,QAAQ,QAAQ,CAAC,CAAC;AAAA;AAAA,IAElE,cAAc,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA,EAC3C,CAAC;AACH;AAWA,MAAM,SAAS;AAAA,EACb;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,MAAM,KAAK,QAAQ,QAAQ;AAAA;AAAA,IAE3B,OAAO;AAAA,EACT,CAAC;AAAA,EACD;AACF;AASA,MAAM,gBAAgB;AAAA,EACpB;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,MAAM,KAAK,QAAQ,eAAe;AAAA;AAAA,IAElC,kBAAkB,KAAK,OAAO;AAAA,EAChC,CAAC;AACH;AAcO,MAAM,uCAAuC,KAAK,MAAM,CAAC,cAAc,YAAY,QAAQ,aAAa,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/server-variable.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\n/** An object representing a Server Variable for server URL template substitution. */\nexport const ServerVariableObjectSchemaDefinition = Type.Object({\n /** An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty. */\n enum: Type.Optional(Type.Array(Type.String())),\n /** REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. If the enum is defined, the value MUST exist in the enum's values. Note that this behavior is different from the Schema Object's default keyword, which documents the receiver's behavior rather than inserting the value into the data. */\n default: Type.Optional(Type.String()),\n /** An optional description for the server variable. CommonMark syntax MAY be used for rich text representation. */\n description: Type.Optional(Type.String()),\n})\n\n/** An object representing a Server Variable for server URL template substitution. */\nexport type ServerVariableObject = {\n /** An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty. */\n enum?: string[]\n /** REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. If the enum is defined, the value MUST exist in the enum's values. Note that this behavior is different from the Schema Object's default keyword, which documents the receiver's behavior rather than inserting the value into the data. */\n default?: string\n /** An optional description for the server variable. CommonMark syntax MAY be used for rich text representation. */\n description?: string\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAGd,MAAM,uCAAuC,KAAK,OAAO;AAAA;AAAA,EAE9D,MAAM,KAAK,SAAS,KAAK,MAAM,KAAK,OAAO,CAAC,CAAC;AAAA;AAAA,EAE7C,SAAS,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,EAEpC,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAC1C,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/server.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport { ServerVariableObjectRef } from './ref-definitions'\nimport type { ServerVariableObject } from './server-variable'\n\n/** An object representing a Server. */\nexport const ServerObjectSchemaDefinition = Type.Object({\n /** REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the document containing the Server Object is being served. Variable substitutions will be made when a variable is named in {braces}. */\n url: Type.String(),\n /** An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation. */\n description: Type.Optional(Type.String()),\n /** A map between a variable name and its value. The value is used for substitution in the server's URL template. */\n variables: Type.Optional(Type.Record(Type.String(), ServerVariableObjectRef)),\n})\n\n/** An object representing a Server. */\nexport type ServerObject = {\n /** REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the document containing the Server Object is being served. Variable substitutions will be made when a variable is named in {braces}. */\n url: string\n /** An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation. */\n description?: string\n /** A map between a variable name and its value. The value is used for substitution in the server's URL template. */\n variables?: Record<string, ServerVariableObject>\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAErB,SAAS,+BAA+B;AAIjC,MAAM,+BAA+B,KAAK,OAAO;AAAA;AAAA,EAEtD,KAAK,KAAK,OAAO;AAAA;AAAA,EAEjB,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,EAExC,WAAW,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,uBAAuB,CAAC;AAC9E,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/tag.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport { type XInternal, XInternalSchema } from '@/schemas/extensions/document/x-internal'\nimport { type XScalarIgnore, XScalarIgnoreSchema } from '@/schemas/extensions/document/x-scalar-ignore'\nimport { type XScalarOrder, XScalarOrderSchema } from '@/schemas/extensions/general/x-scalar-order'\nimport { type XDisplayName, XDisplayNameSchema } from '@/schemas/extensions/tag/x-display-name'\n\nimport type { ExternalDocumentationObject } from './external-documentation'\nimport { ExternalDocumentationObjectRef } from './ref-definitions'\n\n/** Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. */\nexport const TagObjectSchemaDefinition = compose(\n Type.Object({\n /** REQUIRED. The name of the tag. */\n name: Type.String(),\n /** A description for the tag. CommonMark syntax MAY be used for rich text representation. */\n description: Type.Optional(Type.String()),\n /** Additional external documentation for this tag. */\n externalDocs: Type.Optional(ExternalDocumentationObjectRef),\n }),\n XDisplayNameSchema,\n XInternalSchema,\n XScalarIgnoreSchema,\n XScalarOrderSchema,\n)\n\n/** Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. */\nexport type TagObject = {\n /** REQUIRED. The name of the tag. */\n name: string\n /** A description for the tag. CommonMark syntax MAY be used for rich text representation. */\n description?: string\n /** Additional external documentation for this tag. */\n externalDocs?: ExternalDocumentationObject\n} & XDisplayName &\n XInternal &\n XScalarIgnore &\n XScalarOrder\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAErB,SAAS,eAAe;AACxB,SAAyB,uBAAuB;AAChD,SAA6B,2BAA2B;AACxD,SAA4B,0BAA0B;AACtD,SAA4B,0BAA0B;AAGtD,SAAS,sCAAsC;AAGxC,MAAM,4BAA4B;AAAA,EACvC,KAAK,OAAO;AAAA;AAAA,IAEV,MAAM,KAAK,OAAO;AAAA;AAAA,IAElB,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,IAExC,cAAc,KAAK,SAAS,8BAA8B;AAAA,EAC5D,CAAC;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/type-guards.ts"],
|
|
4
|
-
"sourcesContent": ["import type { SchemaObject } from '@/schemas/v3.1/strict/openapi-document'\nimport type { ParameterObject, ParameterWithContentObject } from '@/schemas/v3.1/strict/parameter'\n\nexport const isObjectSchema = (schema: SchemaObject): schema is Extract<SchemaObject, { type: 'object' }> => {\n return (\n 'type' in schema && (schema.type === 'object' || (Array.isArray(schema.type) && schema.type.includes('object')))\n )\n}\n\nexport const isArraySchema = (schema: SchemaObject): schema is Extract<SchemaObject, { type: 'array' }> => {\n return 'type' in schema && (schema.type === 'array' || (Array.isArray(schema.type) && schema.type.includes('array')))\n}\n\nexport const isStringSchema = (schema: SchemaObject): schema is Extract<SchemaObject, { type: 'string' }> => {\n return (\n 'type' in schema && (schema.type === 'string' || (Array.isArray(schema.type) && schema.type.includes('string')))\n )\n}\n\nexport const isNumberSchema = (\n schema: SchemaObject,\n): schema is Extract<SchemaObject, { type: 'number' | 'integer' }> => {\n return (\n 'type' in schema &&\n (schema.type === 'number' ||\n schema.type === 'integer' ||\n (Array.isArray(schema.type) && schema.type.includes('number')) ||\n (Array.isArray(schema.type) && schema.type.includes('integer')))\n )\n}\n\n/** Special type guard to remove our internal type */\nexport const isSchema = (schema: SchemaObject | undefined): schema is Exclude<SchemaObject, { __scalar_: string }> =>\n schema !== undefined && 'type' in schema\n\n/**\n * Type guard to check if the given parameter is a ParameterWithContentObject,\n * i.e., it has a 'content' property defined.\n */\nexport const isContentTypeParameterObject = (parameter: ParameterObject): parameter is ParameterWithContentObject => {\n return 'content' in parameter && parameter.content !== undefined\n}\n"],
|
|
5
|
-
"mappings": "AAGO,MAAM,iBAAiB,CAAC,WAA8E;AAC3G,SACE,UAAU,WAAW,OAAO,SAAS,YAAa,MAAM,QAAQ,OAAO,IAAI,KAAK,OAAO,KAAK,SAAS,QAAQ;AAEjH;AAEO,MAAM,gBAAgB,CAAC,WAA6E;AACzG,SAAO,UAAU,WAAW,OAAO,SAAS,WAAY,MAAM,QAAQ,OAAO,IAAI,KAAK,OAAO,KAAK,SAAS,OAAO;AACpH;AAEO,MAAM,iBAAiB,CAAC,WAA8E;AAC3G,SACE,UAAU,WAAW,OAAO,SAAS,YAAa,MAAM,QAAQ,OAAO,IAAI,KAAK,OAAO,KAAK,SAAS,QAAQ;AAEjH;AAEO,MAAM,iBAAiB,CAC5B,WACoE;AACpE,SACE,UAAU,WACT,OAAO,SAAS,YACf,OAAO,SAAS,aACf,MAAM,QAAQ,OAAO,IAAI,KAAK,OAAO,KAAK,SAAS,QAAQ,KAC3D,MAAM,QAAQ,OAAO,IAAI,KAAK,OAAO,KAAK,SAAS,SAAS;AAEnE;AAGO,MAAM,WAAW,CAAC,WACvB,WAAW,UAAa,UAAU;AAM7B,MAAM,+BAA+B,CAAC,cAAwE;AACnH,SAAO,aAAa,aAAa,UAAU,YAAY;AACzD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/schemas/v3.1/strict/xml.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\n/**\n * A metadata object that allows for more fine-tuned XML model definitions.\n *\n * When using arrays, XML element names are not inferred (for singular/plural forms) and the name field SHOULD be used to add that information. See examples for expected behavior.\n */\nexport const XMLObjectSchemaDefinition = Type.Object({\n /** Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being \"array\" (outside the items), it will affect the wrapping element if and only if wrapped is true. If wrapped is false, it will be ignored. */\n name: Type.Optional(Type.String()),\n /** The URI of the namespace definition. Value MUST be in the form of a non-relative URI. */\n namespace: Type.Optional(Type.String()),\n /** The prefix to be used for the name. */\n prefix: Type.Optional(Type.String()),\n /** Declares whether the property definition translates to an attribute instead of an element. Default value is false. */\n attribute: Type.Optional(Type.Boolean()),\n /** MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being \"array\" (outside the items). */\n wrapped: Type.Optional(Type.Boolean()),\n})\n\n/**\n * A metadata object that allows for more fine-tuned XML model definitions.\n *\n * When using arrays, XML element names are not inferred (for singular/plural forms) and the name field SHOULD be used to add that information. See examples for expected behavior.\n */\nexport type XMLObject = {\n /** Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being \"array\" (outside the items), it will affect the wrapping element if and only if wrapped is true. If wrapped is false, it will be ignored. */\n name?: string\n /** The URI of the namespace definition. Value MUST be in the form of a non-relative URI. */\n namespace?: string\n /** The prefix to be used for the name. */\n prefix?: string\n /** Declares whether the property definition translates to an attribute instead of an element. Default value is false. */\n attribute?: boolean\n /** MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being \"array\" (outside the items). */\n wrapped?: boolean\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAOd,MAAM,4BAA4B,KAAK,OAAO;AAAA;AAAA,EAEnD,MAAM,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,EAEjC,WAAW,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,EAEtC,QAAQ,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,EAEnC,WAAW,KAAK,SAAS,KAAK,QAAQ,CAAC;AAAA;AAAA,EAEvC,SAAS,KAAK,SAAS,KAAK,QAAQ,CAAC;AACvC,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/schemas/workspace-specification/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\nimport type { PartialDeep } from 'type-fest'\n\nimport { compose } from '@/schemas/compose'\nimport type { OpenApiDocument } from '@/schemas/v3.1/strict/openapi-document'\nimport { type WorkspaceMeta, WorkspaceMetaSchema } from '@/schemas/workspace'\nimport { type Info, InfoSchema } from '@/schemas/workspace-specification/info'\n\nexport const WorkspaceSpecificationSchema = compose(\n Type.Object({\n workspace: Type.Union([Type.Literal('draft')]),\n info: InfoSchema,\n documents: Type.Optional(\n Type.Record(\n Type.String(),\n Type.Object({\n $ref: Type.String(),\n }),\n ),\n ),\n overrides: Type.Optional(Type.Record(Type.String(), Type.Any())),\n }),\n WorkspaceMetaSchema,\n)\n\nexport type WorkspaceSpecification = {\n workspace: 'draft'\n info: Info\n documents?: Record<string, { $ref: string }>\n overrides?: Record<string, PartialDeep<OpenApiDocument>>\n} & WorkspaceMeta\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAGrB,SAAS,eAAe;AAExB,SAA6B,2BAA2B;AACxD,SAAoB,kBAAkB;AAE/B,MAAM,+BAA+B;AAAA,EAC1C,KAAK,OAAO;AAAA,IACV,WAAW,KAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,CAAC,CAAC;AAAA,IAC7C,MAAM;AAAA,IACN,WAAW,KAAK;AAAA,MACd,KAAK;AAAA,QACH,KAAK,OAAO;AAAA,QACZ,KAAK,OAAO;AAAA,UACV,MAAM,KAAK,OAAO;AAAA,QACpB,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA,WAAW,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC;AAAA,EACjE,CAAC;AAAA,EACD;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/schemas/workspace-specification/info.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nexport const InfoSchema = Type.Object({\n title: Type.String(),\n description: Type.Optional(Type.String()),\n})\n\nexport type Info = {\n title: string\n description?: string\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAEd,MAAM,aAAa,KAAK,OAAO;AAAA,EACpC,OAAO,KAAK,OAAO;AAAA,EACnB,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAC1C,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/schemas/workspace.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\nimport { AVAILABLE_CLIENTS, type AvailableClients } from '@scalar/types/snippetz'\n\nimport { compose } from '@/schemas/compose'\nimport { extensions } from '@/schemas/extensions'\nimport {\n type XScalarEnvironments,\n xScalarEnvironmentsSchema,\n} from '@/schemas/extensions/document/x-scalar-environments'\nimport {\n type XScalarActiveEnvironment,\n XScalarActiveEnvironmentSchema,\n} from '@/schemas/extensions/general/x-scalar-active-environment'\nimport { type XScalarCookies, xScalarCookiesSchema } from '@/schemas/extensions/general/x-scalar-cookies'\nimport { type XScalarOrder, XScalarOrderSchema } from '@/schemas/extensions/general/x-scalar-order'\nimport { type XScalarActiveProxy, XScalarActiveProxySchema } from '@/schemas/extensions/workspace/x-scalar-active-proxy'\nimport { type XScalarTabs, XScalarTabsSchema } from '@/schemas/extensions/workspace/x-scalar-tabs'\n\nimport { OpenAPIDocumentSchema, type OpenAPIExtensions, type OpenApiDocument } from './v3.1/strict/openapi-document'\n\nexport type WorkspaceDocumentMeta = Omit<\n OpenAPIExtensions,\n 'x-original-oas-version' | 'x-scalar-original-source-url' | 'x-scalar-original-document-hash'\n>\n\n// Note: use Type.Intersect to combine schemas here because Type.Compose does not work as expected with Modules\nexport const WorkspaceDocumentSchema = OpenAPIDocumentSchema\nexport type WorkspaceDocument = OpenApiDocument\n\nexport const ColorModeSchema = Type.Union([Type.Literal('system'), Type.Literal('light'), Type.Literal('dark')])\n\nexport const WorkspaceMetaSchema = Type.Partial(\n compose(\n Type.Object({\n [extensions.workspace.colorMode]: ColorModeSchema,\n [extensions.workspace.defaultClient]: Type.Union(AVAILABLE_CLIENTS.map((client) => Type.Literal(client))),\n [extensions.workspace.activeDocument]: Type.String(),\n [extensions.workspace.theme]: Type.String(),\n [extensions.workspace.sidebarWidth]: Type.Number({ default: 288 }),\n }),\n XScalarActiveProxySchema,\n ),\n)\n\nexport type ColorMode = 'system' | 'light' | 'dark'\n\nexport type WorkspaceMeta = {\n [extensions.workspace.colorMode]?: ColorMode\n [extensions.workspace.defaultClient]?: AvailableClients[number]\n [extensions.workspace.activeDocument]?: string\n [extensions.workspace.theme]?: string\n [extensions.workspace.sidebarWidth]?: number\n} & XScalarActiveProxy\n\nexport const WorkspaceExtensionsSchema = compose(\n xScalarEnvironmentsSchema,\n XScalarActiveEnvironmentSchema,\n XScalarOrderSchema,\n xScalarCookiesSchema,\n XScalarTabsSchema,\n)\n\nexport type WorkspaceExtensions = XScalarEnvironments &\n XScalarActiveEnvironment &\n XScalarOrder &\n XScalarCookies &\n XScalarTabs\n\nexport const WorkspaceSchema = compose(\n WorkspaceMetaSchema,\n Type.Object({\n documents: Type.Record(Type.String(), WorkspaceDocumentSchema),\n /** Active document is possibly undefined if we attempt to lookup with an invalid key */\n activeDocument: Type.Union([Type.Undefined(), WorkspaceDocumentSchema]),\n }),\n WorkspaceExtensionsSchema,\n)\n\nexport type Workspace = WorkspaceMeta & {\n documents: Record<string, WorkspaceDocument>\n activeDocument: WorkspaceDocument | undefined\n} & WorkspaceExtensions\n\nexport type DocumentMetaExtensions = WorkspaceDocumentMeta & OpenAPIExtensions\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AACrB,SAAS,yBAAgD;AAEzD,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAC3B;AAAA,EAEE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,OACK;AACP,SAA8B,4BAA4B;AAC1D,SAA4B,0BAA0B;AACtD,SAAkC,gCAAgC;AAClE,SAA2B,yBAAyB;AAEpD,SAAS,6BAA2E;AAQ7E,MAAM,0BAA0B;AAGhC,MAAM,kBAAkB,KAAK,MAAM,CAAC,KAAK,QAAQ,QAAQ,GAAG,KAAK,QAAQ,OAAO,GAAG,KAAK,QAAQ,MAAM,CAAC,CAAC;AAExG,MAAM,sBAAsB,KAAK;AAAA,EACtC;AAAA,IACE,KAAK,OAAO;AAAA,MACV,CAAC,WAAW,UAAU,SAAS,GAAG;AAAA,MAClC,CAAC,WAAW,UAAU,aAAa,GAAG,KAAK,MAAM,kBAAkB,IAAI,CAAC,WAAW,KAAK,QAAQ,MAAM,CAAC,CAAC;AAAA,MACxG,CAAC,WAAW,UAAU,cAAc,GAAG,KAAK,OAAO;AAAA,MACnD,CAAC,WAAW,UAAU,KAAK,GAAG,KAAK,OAAO;AAAA,MAC1C,CAAC,WAAW,UAAU,YAAY,GAAG,KAAK,OAAO,EAAE,SAAS,IAAI,CAAC;AAAA,IACnE,CAAC;AAAA,IACD;AAAA,EACF;AACF;AAYO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAQO,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA,KAAK,OAAO;AAAA,IACV,WAAW,KAAK,OAAO,KAAK,OAAO,GAAG,uBAAuB;AAAA;AAAA,IAE7D,gBAAgB,KAAK,MAAM,CAAC,KAAK,UAAU,GAAG,uBAAuB,CAAC;AAAA,EACxE,CAAC;AAAA,EACD;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/schemas.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/schemas.ts"],
|
|
4
|
-
"sourcesContent": ["// biome-ignore lint/performance/noBarrelFile: This is a barrel file that re-exports workspace schemas\nexport { type Workspace, type WorkspaceDocument, WorkspaceDocumentSchema, WorkspaceSchema } from './schemas/workspace'\n"],
|
|
5
|
-
"mappings": "AACA,SAAiD,yBAAyB,uBAAuB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/server.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/server.ts"],
|
|
4
|
-
"sourcesContent": ["import fs from 'node:fs/promises'\nimport { cwd } from 'node:process'\n\nimport { parseJsonPointerSegments } from '@scalar/helpers/json/parse-json-pointer-segments'\nimport { getValueAtPath } from '@scalar/helpers/object/get-value-at-path'\nimport type { LoaderPlugin } from '@scalar/json-magic/bundle'\nimport { fetchUrls, readFiles } from '@scalar/json-magic/bundle/plugins/node'\nimport { escapeJsonPointer } from '@scalar/json-magic/helpers/escape-json-pointer'\nimport { upgrade } from '@scalar/openapi-upgrader'\n\nimport { keyOf } from '@/helpers/general'\nimport { createNavigation } from '@/navigation'\nimport type { NavigationOptions } from '@/navigation/get-navigation-options'\nimport { extensions } from '@/schemas/extensions'\nimport type { TraversedDocument } from '@/schemas/navigation'\nimport { coerceValue } from '@/schemas/typebox-coerce'\nimport {\n type ComponentsObject,\n OpenAPIDocumentSchema,\n type OpenApiDocument,\n type OperationObject,\n type PathsObject,\n} from '@/schemas/v3.1/strict/openapi-document'\n\nimport type { Workspace, WorkspaceDocumentMeta, WorkspaceMeta } from './schemas/workspace'\n\nconst DEFAULT_ASSETS_FOLDER = 'assets'\nexport const WORKSPACE_FILE_NAME = 'scalar-workspace.json'\n\ntype WorkspaceDocumentMetaInput = {\n name: string\n meta?: WorkspaceDocumentMeta\n}\n\ntype UrlDoc = { url: string } & WorkspaceDocumentMetaInput\ntype FileDoc = { path: string } & WorkspaceDocumentMetaInput\ntype ObjectDoc = { document: Record<string, unknown> } & WorkspaceDocumentMetaInput\n\ntype WorkspaceDocumentInput = UrlDoc | ObjectDoc | FileDoc\n\ntype CreateServerWorkspaceStoreBase = {\n documents: WorkspaceDocumentInput[]\n meta?: WorkspaceMeta\n navigationOptions?: NavigationOptions\n}\ntype CreateServerWorkspaceStoreProps =\n | ({\n directory?: string\n mode: 'static'\n } & CreateServerWorkspaceStoreBase)\n | ({\n baseUrl: string\n mode: 'ssr'\n } & CreateServerWorkspaceStoreBase)\n\nconst httpMethods = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'])\n\n/**\n * Filters an OpenAPI PathsObject to only include standard HTTP methods.\n * Removes any vendor extensions or other non-HTTP properties.\n *\n * @param paths - The OpenAPI PathsObject to filter\n * @returns A new PathsObject containing only standard HTTP methods\n *\n * @example\n * Input: {\n * \"/users\": {\n * \"get\": {...},\n * \"x-custom\": {...},\n * \"post\": {...}\n * }\n * }\n * Output: {\n * \"/users\": {\n * \"get\": {...},\n * \"post\": {...}\n * }\n * }\n */\nexport function filterHttpMethodsOnly(paths: PathsObject): Record<string, Record<string, OperationObject>> {\n const result: Record<string, Record<string, OperationObject>> = {}\n\n // Todo: skip extension properties\n for (const [path, methods] of Object.entries(paths)) {\n if (!methods) {\n continue\n }\n\n const filteredMethods: Record<string, any> = {}\n\n for (const [method, operation] of Object.entries(methods)) {\n if (httpMethods.has(method.toLowerCase())) {\n filteredMethods[method] = operation\n }\n }\n\n if (Object.keys(filteredMethods).length > 0) {\n result[path] = filteredMethods\n }\n }\n\n return result\n}\n\n/**\n * Escapes path keys in an OpenAPI PathsObject to be JSON Pointer compatible.\n * This is necessary because OpenAPI paths can contain characters that need to be escaped\n * when used as JSON Pointer references (like '/' and '~').\n *\n * @example\n * Input: { \"/users/{id}\": { ... } }\n * Output: { \"/users~1{id}\": { ... } }\n */\nexport function escapePaths(\n paths: Record<string, Record<string, OperationObject>>,\n): Record<string, Record<string, OperationObject>> {\n const result: Record<string, Record<string, OperationObject>> = {}\n\n Object.keys(paths).forEach((path) => {\n if (paths[path]) {\n result[escapeJsonPointer(path)] = paths[path]\n }\n })\n\n return result\n}\n\n/**\n * Externalizes components by turning them into refs.\n */\nexport function externalizeComponentReferences(\n document: OpenApiDocument,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.components) {\n return result\n }\n\n Object.entries(document.components).forEach(([type, component]) => {\n if (!component || typeof component !== 'object') {\n return\n }\n\n result[type] = {}\n Object.keys(component).forEach((name) => {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/components/${type}/${name}#`\n : `./chunks/${meta.name}/components/${type}/${name}.json#`\n\n result[type][name] = { '$ref': ref, $global: true }\n })\n })\n\n return result\n}\n\n/**\n * Externalizes paths operations by turning them into refs.\n */\nexport function externalizePathReferences(\n document: OpenApiDocument,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.paths) {\n return result\n }\n\n Object.entries(document.paths).forEach(([path, pathItem]) => {\n if (!pathItem || typeof pathItem !== 'object') {\n return\n }\n\n const pathItemRecord = pathItem as Record<string, unknown>\n\n result[path] = {}\n\n const escapedPath = escapeJsonPointer(path)\n\n keyOf(pathItemRecord).forEach((type) => {\n if (httpMethods.has(type)) {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/operations/${escapedPath}/${type}#`\n : `./chunks/${meta.name}/operations/${escapedPath}/${type}.json#`\n\n result[path][type] = { '$ref': ref, $global: true }\n } else {\n result[path][type] = pathItemRecord[type]\n }\n })\n })\n\n return result\n}\n\ntype ServerWorkspace = Omit<Workspace, 'activeDocument'>\n\n/**\n * Resolves a workspace document from various input sources (URL, local file, or direct document object).\n *\n * @param workspaceDocument - The document input to resolve, which can be:\n * - A URL to fetch the document from\n * - A local file path to read the document from\n * - A direct document object\n * @returns A promise that resolves to an object containing:\n * - ok: boolean indicating if the resolution was successful\n * - data: The resolved document data\n *\n * @example\n * // Resolve from URL\n * const urlDoc = await loadDocument({ name: 'api', url: 'https://api.example.com/openapi.json' })\n *\n * // Resolve direct document\n * const directDoc = await loadDocument({\n * name: 'inline',\n * document: { openapi: '3.0.0', paths: {} }\n * })\n */\nfunction loadDocument(workspaceDocument: WorkspaceDocumentInput): ReturnType<LoaderPlugin['exec']> {\n if ('url' in workspaceDocument) {\n return fetchUrls().exec(workspaceDocument.url)\n }\n\n if ('path' in workspaceDocument) {\n return readFiles().exec(workspaceDocument.path)\n }\n\n return Promise.resolve({\n ok: true,\n data: workspaceDocument.document,\n raw: JSON.stringify(workspaceDocument.document),\n })\n}\n\n/**\n * Server workspace store interface\n */\nexport type ServerWorkspaceStore = {\n /**\n * Loads and registers a document in the workspace.\n *\n * Supported inputs include:\n * - `url`: fetch and parse an OpenAPI document from a remote URL\n * - `path`: read and parse an OpenAPI document from the filesystem\n * - `document`: use an in-memory OpenAPI object directly\n *\n * If loading fails, the document is not added.\n *\n * @example\n * ```ts\n * await store.addDocument({\n * url: 'https://example.com/openapi.json',\n * name: 'petstore',\n * })\n *\n * await store.addDocument({\n * path: './specs/billing.yaml',\n * name: 'billing',\n * })\n * ```\n *\n * @param input - Source and metadata used to load and register the document\n */\n addDocument: (input: WorkspaceDocumentInput, navigationOptions?: NavigationOptions) => Promise<void>\n /**\n * Generates chunk files for all loaded documents.\n *\n * Only available in `static` mode. Writes chunk files for:\n * - workspace metadata\n * - components (schemas, parameters, responses, etc.)\n * - operations (grouped by path and HTTP method)\n *\n * After generation, workspace references point to relative file paths.\n *\n * @example\n * ```ts\n * const store = await createServerWorkspaceStore({\n * mode: 'static',\n * outputPath: './dist/workspace',\n * meta: { title: 'Docs' },\n * })\n *\n * await store.generateWorkspaceChunks()\n * ```\n *\n * @throws {Error} If called when mode is not 'static'\n */\n generateWorkspaceChunks: () => Promise<void>\n /**\n * Returns the current workspace payload.\n *\n * The payload contains workspace metadata plus sparse documents whose heavy\n * sections are replaced by references:\n * - in `ssr` mode, references resolve from in-memory assets\n * - in `static` mode, references point to generated chunk files\n *\n * @example\n * ```ts\n * const workspace = store.getWorkspace()\n *\n * // Read available document names\n * const names = Object.keys(workspace.documents)\n * ```\n *\n * @returns Workspace metadata and document references used by the client\n */\n getWorkspace: () => ServerWorkspace\n /**\n * Resolves a chunk by JSON Pointer.\n *\n * Pointers can target component and operation chunks for loaded documents.\n * Returns `undefined` when the pointer does not resolve.\n *\n * @example\n * ```ts\n * // Resolve a component chunk\n * const userSchema = store.get('#/petstore/components/schemas/User')\n *\n * // Resolve an operation chunk\n * const listPets = store.get('#/petstore/operations/pets/get')\n * ```\n *\n * @param pointer - JSON Pointer to the desired chunk\n * @returns The resolved chunk, or `undefined` when not found\n */\n get: (pointer: string) => unknown\n}\n\n/**\n * Create server state workspace store\n */\nexport async function createServerWorkspaceStore(\n workspaceProps: CreateServerWorkspaceStoreProps,\n): Promise<ServerWorkspaceStore> {\n /**\n * Base workspace document containing essential metadata and document references.\n *\n * This workspace document provides the minimal information needed for initial rendering.\n * All components and path operations are replaced with references to enable lazy loading.\n *\n * In SSR mode, references point to API endpoints.\n * In static mode, references point to filesystem chunks.\n */\n const workspace: ServerWorkspace = {\n ...workspaceProps.meta,\n documents: {} as Record<string, OpenApiDocument & { [extensions.document.navigation]: TraversedDocument }>,\n }\n\n /**\n * A map of document chunks that can be loaded asynchronously by the client.\n * Each document is split into components and operations to enable lazy loading.\n * The keys are document names and values contain the components and operations\n * for that document.\n */\n const assets = {} as Record<\n string,\n { components?: ComponentsObject; operations?: Record<string, Record<string, OperationObject>> }\n >\n\n /**\n * Adds a new document to the workspace.\n *\n * This function processes an OpenAPI document by:\n * 1. Converting it to OpenAPI 3.1 format if needed\n * 2. Separating it into reusable components and path operations\n * 3. Externalizing references based on the workspace mode (SSR or static)\n * 4. Adding the processed document to the workspace with its metadata\n *\n * The resulting document contains minimal information with externalized references\n * that will be resolved on-demand through the workspace's get() method.\n *\n * @param document - The OpenAPI document to process and add\n * @param meta - Document metadata containing the required name and optional settings\n */\n const addDocumentSync = (\n document: Record<string, unknown>,\n meta: { name: string } & WorkspaceDocumentMeta,\n navigationOptions?: NavigationOptions,\n ) => {\n const { name, ...documentMeta } = meta\n\n const documentV3 = coerceValue(OpenAPIDocumentSchema, upgrade(document, '3.1'))\n\n // add the assets\n assets[meta.name] = {\n components: documentV3.components,\n operations: documentV3.paths && escapePaths(filterHttpMethodsOnly(documentV3.paths)),\n }\n\n const options =\n workspaceProps.mode === 'ssr'\n ? { mode: workspaceProps.mode, name, baseUrl: workspaceProps.baseUrl }\n : { mode: workspaceProps.mode, name, directory: workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER }\n\n const components = externalizeComponentReferences(documentV3, options)\n const paths = externalizePathReferences(documentV3, options)\n\n // Build the sidebar entries\n const navigation = createNavigation(name, documentV3, navigationOptions ?? workspaceProps.navigationOptions)\n\n // The document is now a minimal version with externalized references to components and operations.\n // These references will be resolved asynchronously when needed through the workspace's get() method.\n workspace.documents[meta.name] = {\n ...documentMeta,\n ...documentV3,\n components,\n paths,\n [extensions.document.navigation]: navigation,\n }\n }\n\n /**\n * Adds a new document to the workspace asynchronously.\n *\n * This function:\n * 1. Loads the document using the provided input\n * 2. Checks if the document loaded successfully\n * 3. If successful, adds the document to the workspace using addDocumentSync\n *\n * @param input - The document input containing the document source and metadata\n */\n const addDocument: ServerWorkspaceStore['addDocument'] = async (input, navigationOptions) => {\n const document = await loadDocument(input)\n\n if (!document.ok) {\n console.warn(`Failed to load document \"${input.name}`)\n return\n }\n\n addDocumentSync(document.data as Record<string, unknown>, { name: input.name, ...input.meta }, navigationOptions)\n }\n\n // Load and process all initial documents in parallel\n await Promise.all(workspaceProps.documents.map((document) => addDocument(document)))\n\n return {\n generateWorkspaceChunks: async () => {\n if (workspaceProps.mode !== 'static') {\n throw 'Mode has to be set to `static` to generate filesystem workspace chunks'\n }\n\n // Write the workspace document\n const basePath = `${cwd()}/${workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER}`\n await fs.mkdir(basePath, { recursive: true })\n\n // Write the workspace contents on the file system\n await fs.writeFile(`${basePath}/${WORKSPACE_FILE_NAME}`, JSON.stringify(workspace))\n\n // Write the chunks\n for (const [name, { components, operations }] of Object.entries(assets)) {\n // Write the components chunks\n if (components) {\n for (const [type, component] of Object.entries(components as Record<string, Record<string, unknown>>)) {\n const componentPath = `${basePath}/chunks/${name}/components/${type}`\n await fs.mkdir(componentPath, { recursive: true })\n\n for (const [key, value] of Object.entries(component)) {\n await fs.writeFile(`${componentPath}/${key}.json`, JSON.stringify(value))\n }\n }\n }\n\n // Write the operations chunks\n if (operations) {\n for (const [path, methods] of Object.entries(operations)) {\n const operationPath = `${basePath}/chunks/${name}/operations/${path}`\n await fs.mkdir(operationPath, { recursive: true })\n\n for (const [method, operation] of Object.entries(methods)) {\n await fs.writeFile(`${operationPath}/${method}.json`, JSON.stringify(operation))\n }\n }\n }\n }\n },\n getWorkspace: () => {\n return workspace\n },\n get: (pointer: string) => {\n const pointerPath = (() => {\n if (pointer.startsWith('#')) {\n return pointer.slice(1)\n }\n\n if (pointer.startsWith('/')) {\n return pointer\n }\n\n try {\n return new URL(pointer).pathname\n } catch {\n return pointer\n }\n })()\n\n // Keep the path segments escaped cuz we store them on the filesystem as escaped sequences\n const path = parseJsonPointerSegments(pointerPath).map(escapeJsonPointer)\n return getValueAtPath(assets, path)\n },\n addDocument,\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,QAAQ;AACf,SAAS,WAAW;AAEpB,SAAS,gCAAgC;AACzC,SAAS,sBAAsB;AAE/B,SAAS,WAAW,iBAAiB;AACrC,SAAS,yBAAyB;AAClC,SAAS,eAAe;AAExB,SAAS,aAAa;AACtB,SAAS,wBAAwB;AAEjC,SAAS,kBAAkB;AAE3B,SAAS,mBAAmB;AAC5B;AAAA,EAEE;AAAA,OAIK;AAIP,MAAM,wBAAwB;AACvB,MAAM,sBAAsB;AA4BnC,MAAM,cAAc,oBAAI,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,WAAW,QAAQ,SAAS,OAAO,CAAC;AAwB1F,SAAS,sBAAsB,OAAqE;AACzG,QAAM,SAA0D,CAAC;AAGjE,aAAW,CAAC,MAAM,OAAO,KAAK,OAAO,QAAQ,KAAK,GAAG;AACnD,QAAI,CAAC,SAAS;AACZ;AAAA,IACF;AAEA,UAAM,kBAAuC,CAAC;AAE9C,eAAW,CAAC,QAAQ,SAAS,KAAK,OAAO,QAAQ,OAAO,GAAG;AACzD,UAAI,YAAY,IAAI,OAAO,YAAY,CAAC,GA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