@scalar/workspace-store 0.15.8 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist/client.d.ts +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -2
- package/dist/client.js.map +2 -2
- package/dist/mutators/index.d.ts +6 -24
- package/dist/mutators/index.d.ts.map +1 -1
- package/dist/mutators/index.js +0 -2
- package/dist/mutators/index.js.map +2 -2
- package/dist/navigation/helpers/traverse-description.d.ts +1 -1
- package/dist/navigation/helpers/traverse-description.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-description.js.map +1 -1
- package/dist/navigation/helpers/traverse-document.d.ts +2 -182
- package/dist/navigation/helpers/traverse-document.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-document.js.map +2 -2
- package/dist/navigation/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-paths.js +1 -1
- package/dist/navigation/helpers/traverse-paths.js.map +2 -2
- package/dist/navigation/helpers/traverse-schemas.d.ts +2 -1
- package/dist/navigation/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-schemas.js.map +2 -2
- package/dist/navigation/helpers/traverse-tags.d.ts +2 -1
- package/dist/navigation/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-tags.js +1 -0
- package/dist/navigation/helpers/traverse-tags.js.map +2 -2
- package/dist/navigation/helpers/traverse-webhooks.d.ts +2 -1
- package/dist/navigation/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-webhooks.js +1 -1
- package/dist/navigation/helpers/traverse-webhooks.js.map +2 -2
- package/dist/navigation/types.d.ts +2 -1
- package/dist/navigation/types.d.ts.map +1 -1
- package/dist/schemas/extensions/document/x-internal.d.ts +4 -0
- package/dist/schemas/extensions/document/x-internal.d.ts.map +1 -1
- package/dist/schemas/extensions/document/x-internal.js.map +1 -1
- package/dist/schemas/extensions/document/x-scalar-icon.d.ts +4 -0
- package/dist/schemas/extensions/document/x-scalar-icon.d.ts.map +1 -1
- package/dist/schemas/extensions/document/x-scalar-icon.js.map +1 -1
- package/dist/schemas/extensions/document/x-scalar-ignore.d.ts +4 -0
- package/dist/schemas/extensions/document/x-scalar-ignore.d.ts.map +1 -1
- package/dist/schemas/extensions/document/x-scalar-ignore.js.map +1 -1
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.d.ts +8 -2
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.d.ts.map +1 -1
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.js.map +2 -2
- package/dist/schemas/extensions/document/x-tags.d.ts +3 -0
- package/dist/schemas/extensions/document/x-tags.d.ts.map +1 -1
- package/dist/schemas/extensions/document/x-tags.js.map +1 -1
- package/dist/schemas/extensions/operation/index.d.ts +2 -0
- package/dist/schemas/extensions/operation/index.d.ts.map +1 -0
- package/dist/schemas/extensions/operation/index.js +1 -0
- package/dist/schemas/extensions/operation/x-badge.d.ts +62 -22
- package/dist/schemas/extensions/operation/x-badge.d.ts.map +1 -1
- package/dist/schemas/extensions/operation/x-badge.js +24 -3
- package/dist/schemas/extensions/operation/x-badge.js.map +2 -2
- package/dist/schemas/extensions/operation/x-code-samples.d.ts +10 -0
- package/dist/schemas/extensions/operation/x-code-samples.d.ts.map +1 -1
- package/dist/schemas/extensions/operation/x-code-samples.js.map +1 -1
- package/dist/schemas/extensions/operation/x-post-response.d.ts +18 -0
- package/dist/schemas/extensions/operation/x-post-response.d.ts.map +1 -1
- package/dist/schemas/extensions/operation/x-post-response.js.map +1 -1
- package/dist/schemas/extensions/operation/x-scalar-stability.d.ts +11 -0
- package/dist/schemas/extensions/operation/x-scalar-stability.d.ts.map +1 -1
- package/dist/schemas/extensions/operation/x-scalar-stability.js.map +1 -1
- package/dist/schemas/extensions/schema/x-additional-properties-name.d.ts +10 -0
- package/dist/schemas/extensions/schema/x-additional-properties-name.d.ts.map +1 -1
- package/dist/schemas/extensions/schema/x-additional-properties-name.js.map +1 -1
- package/dist/schemas/extensions/schema/x-enum-descriptions.d.ts +30 -0
- package/dist/schemas/extensions/schema/x-enum-descriptions.d.ts.map +1 -1
- package/dist/schemas/extensions/schema/x-enum-descriptions.js.map +1 -1
- package/dist/schemas/extensions/schema/x-enum-varnames.d.ts +38 -0
- package/dist/schemas/extensions/schema/x-enum-varnames.d.ts.map +1 -1
- package/dist/schemas/extensions/schema/x-enum-varnames.js.map +1 -1
- package/dist/schemas/extensions/schema/x-variable.d.ts +3 -0
- package/dist/schemas/extensions/schema/x-variable.d.ts.map +1 -1
- package/dist/schemas/extensions/schema/x-variable.js.map +1 -1
- package/dist/schemas/extensions/security/x-default-scopes.d.ts +33 -0
- package/dist/schemas/extensions/security/x-default-scopes.d.ts.map +1 -0
- package/dist/schemas/extensions/security/x-default-scopes.js +8 -0
- package/dist/schemas/extensions/security/x-default-scopes.js.map +7 -0
- package/dist/schemas/extensions/security/x-scalar-credentials-location.d.ts +16 -0
- package/dist/schemas/extensions/security/x-scalar-credentials-location.d.ts.map +1 -1
- package/dist/schemas/extensions/security/x-scalar-credentials-location.js.map +1 -1
- package/dist/schemas/extensions/security/x-scalar-security-body.d.ts +15 -1
- package/dist/schemas/extensions/security/x-scalar-security-body.d.ts.map +1 -1
- package/dist/schemas/extensions/security/x-scalar-security-body.js +2 -2
- package/dist/schemas/extensions/security/x-scalar-security-body.js.map +2 -2
- package/dist/schemas/extensions/security/x-scalar-security-query.d.ts +15 -1
- package/dist/schemas/extensions/security/x-scalar-security-query.d.ts.map +1 -1
- package/dist/schemas/extensions/security/x-scalar-security-query.js +2 -2
- package/dist/schemas/extensions/security/x-scalar-security-query.js.map +2 -2
- package/dist/schemas/extensions/security/x-scalar-security-secrets.d.ts +68 -3
- package/dist/schemas/extensions/security/x-scalar-security-secrets.d.ts.map +1 -1
- package/dist/schemas/extensions/security/x-scalar-security-secrets.js +15 -3
- package/dist/schemas/extensions/security/x-scalar-security-secrets.js.map +2 -2
- package/dist/schemas/extensions/security/x-tokenName.d.ts +12 -1
- package/dist/schemas/extensions/security/x-tokenName.d.ts.map +1 -1
- package/dist/schemas/extensions/security/x-tokenName.js +2 -2
- package/dist/schemas/extensions/security/x-tokenName.js.map +2 -2
- package/dist/schemas/extensions/security/x-use-pkce.d.ts +7 -1
- package/dist/schemas/extensions/security/x-use-pkce.d.ts.map +1 -1
- package/dist/schemas/extensions/security/x-use-pkce.js +1 -3
- package/dist/schemas/extensions/security/x-use-pkce.js.map +2 -2
- package/dist/schemas/extensions/tag/x-display-name.d.ts +11 -0
- package/dist/schemas/extensions/tag/x-display-name.d.ts.map +1 -1
- package/dist/schemas/extensions/tag/x-display-name.js.map +1 -1
- package/dist/schemas/extensions/tag/x-tag-groups.d.ts +18 -0
- package/dist/schemas/extensions/tag/x-tag-groups.d.ts.map +1 -1
- package/dist/schemas/extensions/tag/x-tag-groups.js.map +2 -2
- package/dist/schemas/inmemory-workspace.d.ts +207 -86
- package/dist/schemas/inmemory-workspace.d.ts.map +1 -1
- package/dist/schemas/inmemory-workspace.js +4 -1
- package/dist/schemas/inmemory-workspace.js.map +2 -2
- package/dist/schemas/navigation.d.ts +50 -1
- package/dist/schemas/navigation.d.ts.map +1 -1
- package/dist/schemas/navigation.js +5 -9
- package/dist/schemas/navigation.js.map +2 -2
- package/dist/schemas/reference-config/appearance.d.ts +9 -2
- package/dist/schemas/reference-config/appearance.d.ts.map +1 -1
- package/dist/schemas/reference-config/appearance.js.map +2 -2
- package/dist/schemas/reference-config/features.d.ts +11 -2
- package/dist/schemas/reference-config/features.d.ts.map +1 -1
- package/dist/schemas/reference-config/features.js.map +2 -2
- package/dist/schemas/reference-config/index.d.ts +114 -45
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/index.js +5 -5
- package/dist/schemas/reference-config/index.js.map +2 -2
- package/dist/schemas/reference-config/meta.d.ts +8 -2
- package/dist/schemas/reference-config/meta.d.ts.map +1 -1
- package/dist/schemas/reference-config/meta.js.map +2 -2
- package/dist/schemas/reference-config/routing.d.ts +4 -2
- package/dist/schemas/reference-config/routing.d.ts.map +1 -1
- package/dist/schemas/reference-config/routing.js.map +2 -2
- package/dist/schemas/reference-config/settings.d.ts +105 -45
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.js.map +2 -2
- package/dist/schemas/v3.1/strict/callback.d.ts +4 -0
- package/dist/schemas/v3.1/strict/callback.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/callback.js +2 -2
- package/dist/schemas/v3.1/strict/callback.js.map +2 -2
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies.d.ts +19 -3
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies.js.map +2 -2
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.d.ts +10 -4
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.js.map +2 -2
- package/dist/schemas/v3.1/strict/components.d.ts +34 -0
- package/dist/schemas/v3.1/strict/components.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/components.js +1 -1
- package/dist/schemas/v3.1/strict/components.js.map +2 -2
- package/dist/schemas/v3.1/strict/contact.d.ts +9 -0
- package/dist/schemas/v3.1/strict/contact.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/contact.js.map +1 -1
- package/dist/schemas/v3.1/strict/discriminator.d.ts +11 -0
- package/dist/schemas/v3.1/strict/discriminator.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/discriminator.js.map +1 -1
- package/dist/schemas/v3.1/strict/encoding.d.ts +15 -0
- package/dist/schemas/v3.1/strict/encoding.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/encoding.js +1 -1
- package/dist/schemas/v3.1/strict/encoding.js.map +2 -2
- package/dist/schemas/v3.1/strict/example.d.ts +15 -0
- package/dist/schemas/v3.1/strict/example.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/example.js.map +1 -1
- package/dist/schemas/v3.1/strict/external-documentation.d.ts +9 -2
- package/dist/schemas/v3.1/strict/external-documentation.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/external-documentation.js +3 -3
- package/dist/schemas/v3.1/strict/external-documentation.js.map +2 -2
- package/dist/schemas/v3.1/strict/header.d.ts +41 -0
- package/dist/schemas/v3.1/strict/header.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/header.js +2 -2
- package/dist/schemas/v3.1/strict/header.js.map +2 -2
- package/dist/schemas/v3.1/strict/info.d.ts +24 -2
- package/dist/schemas/v3.1/strict/info.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/info.js +7 -5
- package/dist/schemas/v3.1/strict/info.js.map +2 -2
- package/dist/schemas/v3.1/strict/license.d.ts +9 -0
- package/dist/schemas/v3.1/strict/license.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/license.js.map +1 -1
- package/dist/schemas/v3.1/strict/link.d.ts +22 -0
- package/dist/schemas/v3.1/strict/link.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/link.js.map +2 -2
- package/dist/schemas/v3.1/strict/media-type.d.ts +19 -0
- package/dist/schemas/v3.1/strict/media-type.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/media-type.js +2 -2
- package/dist/schemas/v3.1/strict/media-type.js.map +2 -2
- package/dist/schemas/v3.1/strict/oauth-flow.d.ts +171 -29
- package/dist/schemas/v3.1/strict/oauth-flow.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/oauth-flow.js +43 -15
- package/dist/schemas/v3.1/strict/oauth-flow.js.map +2 -2
- package/dist/schemas/v3.1/strict/oauthflows.d.ts +78 -12
- package/dist/schemas/v3.1/strict/oauthflows.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/oauthflows.js.map +2 -2
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +3369 -1476
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.js +45 -44
- package/dist/schemas/v3.1/strict/openapi-document.js.map +2 -2
- package/dist/schemas/v3.1/strict/operation.d.ts +44 -17
- package/dist/schemas/v3.1/strict/operation.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/operation.js +2 -3
- package/dist/schemas/v3.1/strict/operation.js.map +2 -2
- package/dist/schemas/v3.1/strict/parameter.d.ts +45 -0
- package/dist/schemas/v3.1/strict/parameter.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/parameter.js.map +2 -2
- package/dist/schemas/v3.1/strict/path-item.d.ts +38 -0
- package/dist/schemas/v3.1/strict/path-item.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/path-item.js +1 -1
- package/dist/schemas/v3.1/strict/path-item.js.map +2 -2
- package/dist/schemas/v3.1/strict/paths.d.ts +5 -0
- package/dist/schemas/v3.1/strict/paths.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/paths.js +1 -1
- package/dist/schemas/v3.1/strict/paths.js.map +2 -2
- package/dist/schemas/v3.1/strict/reference.d.ts +21 -4
- package/dist/schemas/v3.1/strict/reference.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/reference.js.map +2 -2
- package/dist/schemas/v3.1/strict/request-body.d.ts +10 -0
- package/dist/schemas/v3.1/strict/request-body.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/request-body.js +1 -1
- package/dist/schemas/v3.1/strict/request-body.js.map +2 -2
- package/dist/schemas/v3.1/strict/response.d.ts +17 -0
- package/dist/schemas/v3.1/strict/response.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/response.js +1 -1
- package/dist/schemas/v3.1/strict/response.js.map +2 -2
- package/dist/schemas/v3.1/strict/responses.d.ts +12 -0
- package/dist/schemas/v3.1/strict/responses.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/responses.js +1 -1
- package/dist/schemas/v3.1/strict/responses.js.map +2 -2
- package/dist/schemas/v3.1/strict/schema.d.ts +144 -1
- package/dist/schemas/v3.1/strict/schema.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/schema.js +40 -60
- package/dist/schemas/v3.1/strict/schema.js.map +2 -2
- package/dist/schemas/v3.1/strict/security-requirement.d.ts +12 -0
- package/dist/schemas/v3.1/strict/security-requirement.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/security-requirement.js.map +1 -1
- package/dist/schemas/v3.1/strict/security-scheme.d.ts +49 -8
- package/dist/schemas/v3.1/strict/security-scheme.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/security-scheme.js +3 -1
- package/dist/schemas/v3.1/strict/security-scheme.js.map +2 -2
- package/dist/schemas/v3.1/strict/server-variable.d.ts +9 -0
- package/dist/schemas/v3.1/strict/server-variable.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/server-variable.js.map +1 -1
- package/dist/schemas/v3.1/strict/server.d.ts +10 -0
- package/dist/schemas/v3.1/strict/server.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/server.js +1 -1
- package/dist/schemas/v3.1/strict/server.js.map +2 -2
- package/dist/schemas/v3.1/strict/tag.d.ts +13 -0
- package/dist/schemas/v3.1/strict/tag.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/tag.js +1 -1
- package/dist/schemas/v3.1/strict/tag.js.map +2 -2
- package/dist/schemas/v3.1/strict/type-guards.d.ts +1 -1
- package/dist/schemas/v3.1/strict/type-guards.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/type-guards.js.map +1 -1
- package/dist/schemas/v3.1/strict/xml.d.ts +17 -0
- package/dist/schemas/v3.1/strict/xml.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/xml.js.map +1 -1
- package/dist/schemas/workspace-specification/config.d.ts +101 -44
- package/dist/schemas/workspace-specification/config.d.ts.map +1 -1
- package/dist/schemas/workspace-specification/config.js.map +2 -2
- package/dist/schemas/workspace-specification/index.d.ts +110 -44
- package/dist/schemas/workspace-specification/index.d.ts.map +1 -1
- package/dist/schemas/workspace-specification/index.js.map +2 -2
- package/dist/schemas/workspace-specification/info.d.ts +4 -0
- package/dist/schemas/workspace-specification/info.d.ts.map +1 -1
- package/dist/schemas/workspace-specification/info.js.map +1 -1
- package/dist/schemas/workspace.d.ts +707 -300
- package/dist/schemas/workspace.d.ts.map +1 -1
- package/dist/schemas/workspace.js +11 -3
- package/dist/schemas/workspace.js.map +2 -2
- package/dist/server.d.ts +6 -5
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js.map +2 -2
- package/package.json +9 -14
- package/dist/mutators/request-example.d.ts +0 -21
- package/dist/mutators/request-example.d.ts.map +0 -1
- package/dist/mutators/request-example.js +0 -55
- package/dist/mutators/request-example.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-redirect-uri.d.ts +0 -4
- package/dist/schemas/extensions/security/x-scalar-redirect-uri.d.ts.map +0 -1
- package/dist/schemas/extensions/security/x-scalar-redirect-uri.js +0 -8
- package/dist/schemas/extensions/security/x-scalar-redirect-uri.js.map +0 -7
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example.d.ts +0 -38
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example.d.ts.map +0 -1
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example.js +0 -45
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example.js.map +0 -7
- package/dist/types.d.ts +0 -18
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -1
- /package/dist/{types.js.map → schemas/extensions/operation/index.js.map} +0 -0
|
@@ -1,3 +1,144 @@
|
|
|
1
|
+
import { type XInternal } from '../../../schemas/extensions/document/x-internal.js';
|
|
2
|
+
import { type XScalarIgnore } from '../../../schemas/extensions/document/x-scalar-ignore.js';
|
|
3
|
+
import { XTags } from '../../../schemas/extensions/document/x-tags.js';
|
|
4
|
+
import { type XAdditionalPropertiesName } from '../../../schemas/extensions/schema/x-additional-properties-name.js';
|
|
5
|
+
import { type XEnumDescriptions } from '../../../schemas/extensions/schema/x-enum-descriptions.js';
|
|
6
|
+
import { type XEnumVarNames } from '../../../schemas/extensions/schema/x-enum-varnames.js';
|
|
7
|
+
import { type XVariable } from '../../../schemas/extensions/schema/x-variable.js';
|
|
8
|
+
import type { ExternalDocumentationObject } from '../../../schemas/v3.1/strict/external-documentation.js';
|
|
9
|
+
import type { XMLObject } from '../../../schemas/v3.1/strict/xml.js';
|
|
10
|
+
import type { DiscriminatorObject } from './discriminator.js';
|
|
11
|
+
import { type ReferenceType } from './reference.js';
|
|
12
|
+
/** We use this type to ensure that we are parsing a schema object as every property can be optional */
|
|
13
|
+
type _InternalType = CoreProperties & {
|
|
14
|
+
_: string;
|
|
15
|
+
} & Extensions;
|
|
16
|
+
/**
|
|
17
|
+
* Primitive types that don't have additional validation properties.
|
|
18
|
+
* These types (null, boolean, string, number, integer, object, array) can be used
|
|
19
|
+
* without additional validation constraints.
|
|
20
|
+
*
|
|
21
|
+
* TODO: Type array will actually validate against every union type but we can cross that bridge when we come to it
|
|
22
|
+
*/
|
|
23
|
+
declare const OtherTypes: import("@scalar/typebox").TObject<{
|
|
24
|
+
type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"null">, import("@scalar/typebox").TLiteral<"boolean">, import("@scalar/typebox").TArray<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"null">, import("@scalar/typebox").TLiteral<"boolean">, import("@scalar/typebox").TLiteral<"string">, import("@scalar/typebox").TLiteral<"number">, import("@scalar/typebox").TLiteral<"integer">, import("@scalar/typebox").TLiteral<"object">, import("@scalar/typebox").TLiteral<"array">]>>]>;
|
|
25
|
+
}>;
|
|
26
|
+
type OtherType = 'boolean' | 'null' | ('string' | 'number' | 'boolean' | 'object' | 'null' | 'integer' | 'array')[];
|
|
27
|
+
type OtherTypes = CoreProperties & {
|
|
28
|
+
type: OtherType;
|
|
29
|
+
} & Extensions;
|
|
30
|
+
export type Extensions = XScalarIgnore & XInternal & XVariable & XEnumDescriptions & XEnumVarNames & XAdditionalPropertiesName & XTags;
|
|
31
|
+
export type CoreProperties = {
|
|
32
|
+
name?: string;
|
|
33
|
+
/** A title for the schema. */
|
|
34
|
+
title?: string;
|
|
35
|
+
/** A description of the schema. */
|
|
36
|
+
description?: string;
|
|
37
|
+
/** Default value for the schema. */
|
|
38
|
+
default?: unknown;
|
|
39
|
+
/** Array of allowed values. */
|
|
40
|
+
enum?: unknown[];
|
|
41
|
+
/** Constant value that must match exactly. */
|
|
42
|
+
const?: unknown;
|
|
43
|
+
/** Media type for content validation. */
|
|
44
|
+
contentMediaType?: string;
|
|
45
|
+
/** Content encoding. */
|
|
46
|
+
contentEncoding?: string;
|
|
47
|
+
/** Schema for content validation. */
|
|
48
|
+
contentSchema?: ReferenceType<SchemaObject>;
|
|
49
|
+
/** Whether the schema is deprecated. */
|
|
50
|
+
deprecated?: boolean;
|
|
51
|
+
/** 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. */
|
|
52
|
+
discriminator?: DiscriminatorObject;
|
|
53
|
+
/** Whether the schema is read-only. */
|
|
54
|
+
readOnly?: boolean;
|
|
55
|
+
/** Whether the schema is write-only. */
|
|
56
|
+
writeOnly?: boolean;
|
|
57
|
+
/** 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. */
|
|
58
|
+
xml?: XMLObject;
|
|
59
|
+
/** Additional external documentation for this schema. */
|
|
60
|
+
externalDocs?: ExternalDocumentationObject;
|
|
61
|
+
/**
|
|
62
|
+
* 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.
|
|
63
|
+
*
|
|
64
|
+
* @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.
|
|
65
|
+
*/
|
|
66
|
+
example?: unknown;
|
|
67
|
+
/**
|
|
68
|
+
* An array of examples of valid instances for this schema. This keyword follows the JSON Schema Draft 2020-12 specification.
|
|
69
|
+
* Each example should be a valid instance of the schema.
|
|
70
|
+
*/
|
|
71
|
+
examples?: unknown[];
|
|
72
|
+
/** All schemas must be valid. */
|
|
73
|
+
allOf?: ReferenceType<SchemaObject>[];
|
|
74
|
+
/** Exactly one schema must be valid. */
|
|
75
|
+
oneOf?: ReferenceType<SchemaObject>[];
|
|
76
|
+
/** At least one schema must be valid. */
|
|
77
|
+
anyOf?: ReferenceType<SchemaObject>[];
|
|
78
|
+
/** Schema must not be valid. */
|
|
79
|
+
not?: ReferenceType<SchemaObject>;
|
|
80
|
+
};
|
|
81
|
+
export type NumericObject = CoreProperties & {
|
|
82
|
+
type: 'number' | 'integer';
|
|
83
|
+
/** Different subtypes */
|
|
84
|
+
format?: 'int8' | 'int16' | 'int32' | 'int64' | 'uint8' | 'uint16' | 'uint32' | 'uint64' | 'double-int' | 'float' | 'double' | 'decimal' | 'decimal128' | 'sf-integer' | 'sf-decimal' | (string & {});
|
|
85
|
+
/** Number must be a multiple of this value. */
|
|
86
|
+
multipleOf?: number;
|
|
87
|
+
/** Maximum value (inclusive). */
|
|
88
|
+
maximum?: number;
|
|
89
|
+
/** Maximum value (exclusive). */
|
|
90
|
+
exclusiveMaximum?: boolean | number;
|
|
91
|
+
/** Minimum value (inclusive). */
|
|
92
|
+
minimum?: number;
|
|
93
|
+
/** Minimum value (exclusive). */
|
|
94
|
+
exclusiveMinimum?: boolean | number;
|
|
95
|
+
} & Extensions;
|
|
96
|
+
/**
|
|
97
|
+
* Supported string formats in OpenAPI schemas.
|
|
98
|
+
*
|
|
99
|
+
* These provide better type safety for string format validation. We wanted to allow any arbitrary string
|
|
100
|
+
* in the schema, so we type it in typescript instead. This gives us autocomplete while allowing any string!
|
|
101
|
+
*/
|
|
102
|
+
export type StringFormat = 'date' | 'date-time' | 'date-time-local' | 'time' | 'time-local' | 'duration' | 'http-date' | 'email' | 'idn-email' | 'hostname' | 'idn-hostname' | 'ipv4' | 'ipv6' | 'uri' | 'uri-reference' | 'uri-template' | 'iri' | 'iri-reference' | 'uuid' | 'binary' | 'byte' | 'base64url' | 'html' | 'commonmark' | 'password' | 'regex' | 'json-pointer' | 'relative-json-pointer' | 'media-range' | 'char' | 'sf-string' | 'sf-token' | 'sf-binary' | 'sf-boolean' | (string & {});
|
|
103
|
+
export type StringObject = CoreProperties & {
|
|
104
|
+
type: 'string';
|
|
105
|
+
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
106
|
+
format?: StringFormat;
|
|
107
|
+
/** Maximum string length. */
|
|
108
|
+
maxLength?: number;
|
|
109
|
+
/** Minimum string length. */
|
|
110
|
+
minLength?: number;
|
|
111
|
+
/** Regular expression pattern. */
|
|
112
|
+
pattern?: string;
|
|
113
|
+
} & Extensions;
|
|
114
|
+
export type ArrayObject = CoreProperties & {
|
|
115
|
+
type: 'array';
|
|
116
|
+
/** Maximum number of items in array. */
|
|
117
|
+
maxItems?: number;
|
|
118
|
+
/** Minimum number of items in array. */
|
|
119
|
+
minItems?: number;
|
|
120
|
+
/** Whether array items must be unique. */
|
|
121
|
+
uniqueItems?: boolean;
|
|
122
|
+
/** Schema for array items. */
|
|
123
|
+
items?: ReferenceType<SchemaObject>;
|
|
124
|
+
/** Schema for tuple validation. */
|
|
125
|
+
prefixItems?: ReferenceType<SchemaObject>[];
|
|
126
|
+
} & Extensions;
|
|
127
|
+
export type ObjectObject = CoreProperties & {
|
|
128
|
+
type: 'object';
|
|
129
|
+
/** Maximum number of properties. */
|
|
130
|
+
maxProperties?: number;
|
|
131
|
+
/** Minimum number of properties. */
|
|
132
|
+
minProperties?: number;
|
|
133
|
+
/** Array of required property names. */
|
|
134
|
+
required?: string[];
|
|
135
|
+
/** Object property definitions. */
|
|
136
|
+
properties?: Record<string, ReferenceType<SchemaObject>>;
|
|
137
|
+
/** Schema for additional properties. */
|
|
138
|
+
additionalProperties?: boolean | ReferenceType<SchemaObject>;
|
|
139
|
+
/** Properties matching regex patterns. */
|
|
140
|
+
patternProperties?: Record<string, ReferenceType<SchemaObject>>;
|
|
141
|
+
} & Extensions;
|
|
1
142
|
/** Builds the recursive schema schema */
|
|
2
143
|
export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
3
144
|
_: import("@scalar/typebox").TString;
|
|
@@ -226,7 +367,7 @@ export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUn
|
|
|
226
367
|
}>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
227
368
|
type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"number">, import("@scalar/typebox").TLiteral<"integer">]>;
|
|
228
369
|
/** Different subtypes */
|
|
229
|
-
format: import("@scalar/typebox").TOptional<import("@scalar/typebox").
|
|
370
|
+
format: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
230
371
|
/** Number must be a multiple of this value. */
|
|
231
372
|
multipleOf: import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
232
373
|
/** Maximum value (inclusive). */
|
|
@@ -759,4 +900,6 @@ export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUn
|
|
|
759
900
|
}>, import("@scalar/typebox").TObject<{
|
|
760
901
|
'x-tags': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
761
902
|
}>]>]>]>;
|
|
903
|
+
export type SchemaObject = _InternalType | OtherTypes | NumericObject | StringObject | ObjectObject | ArrayObject;
|
|
904
|
+
export {};
|
|
762
905
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v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;;IAEnC,oCAAoC;;IAEpC,+BAA+B;;IAE/B,8CAA8C;;IAE9C,yCAAyC;;IAEzC,wBAAwB;;IAExB,qCAAqC;;;;;;;;;;;IAErC,wCAAwC;;IAExC,0LAA0L;;IAE1L,uCAAuC;;IAEvC,wCAAwC;;IAExC,iKAAiK;;IAEjK,yDAAyD;;IAEzD;;;;OAIG;;IAEH;;;OAGG;;IAEH,iCAAiC;;;;;;;;;;;IAEjC,wCAAwC;;;;;;;;;;;IAExC,yCAAyC;;;;;;;;;;;IAEzC,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;QA6PhC,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,UAAU,GAAG,aAAa,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,CAAA"}
|
|
@@ -3,7 +3,9 @@ import { compose } from "../../../schemas/compose.js";
|
|
|
3
3
|
import { XInternalSchema } from "../../../schemas/extensions/document/x-internal.js";
|
|
4
4
|
import { XScalarIgnoreSchema } from "../../../schemas/extensions/document/x-scalar-ignore.js";
|
|
5
5
|
import { XTags } from "../../../schemas/extensions/document/x-tags.js";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
XAdditionalPropertiesNameSchema
|
|
8
|
+
} from "../../../schemas/extensions/schema/x-additional-properties-name.js";
|
|
7
9
|
import { XEnumDescriptionsSchema } from "../../../schemas/extensions/schema/x-enum-descriptions.js";
|
|
8
10
|
import { XEnumVarNamesSchema } from "../../../schemas/extensions/schema/x-enum-varnames.js";
|
|
9
11
|
import { XVariableSchema } from "../../../schemas/extensions/schema/x-variable.js";
|
|
@@ -12,8 +14,8 @@ import {
|
|
|
12
14
|
ExternalDocumentationObjectRef,
|
|
13
15
|
SchemaObjectRef,
|
|
14
16
|
XMLObjectRef
|
|
15
|
-
} from "
|
|
16
|
-
import { reference } from "
|
|
17
|
+
} from "./ref-definitions.js";
|
|
18
|
+
import { reference } from "./reference.js";
|
|
17
19
|
const schemaOrReference = Type.Union([SchemaObjectRef, reference(SchemaObjectRef)]);
|
|
18
20
|
const OtherTypes = Type.Object({
|
|
19
21
|
type: Type.Union([
|
|
@@ -32,53 +34,15 @@ const OtherTypes = Type.Object({
|
|
|
32
34
|
)
|
|
33
35
|
])
|
|
34
36
|
});
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
Type.Literal("int64"),
|
|
45
|
-
Type.Literal("uint8"),
|
|
46
|
-
Type.Literal("uint16"),
|
|
47
|
-
Type.Literal("uint32"),
|
|
48
|
-
Type.Literal("uint64"),
|
|
49
|
-
Type.Literal("double-int"),
|
|
50
|
-
// Number formats
|
|
51
|
-
Type.Literal("float"),
|
|
52
|
-
Type.Literal("double"),
|
|
53
|
-
Type.Literal("decimal"),
|
|
54
|
-
Type.Literal("decimal128"),
|
|
55
|
-
// Structured field number formats
|
|
56
|
-
Type.Literal("sf-integer"),
|
|
57
|
-
Type.Literal("sf-decimal")
|
|
58
|
-
])
|
|
59
|
-
),
|
|
60
|
-
/** Number must be a multiple of this value. */
|
|
61
|
-
multipleOf: Type.Optional(Type.Number()),
|
|
62
|
-
/** Maximum value (inclusive). */
|
|
63
|
-
maximum: Type.Optional(Type.Number()),
|
|
64
|
-
/** Maximum value (exclusive). */
|
|
65
|
-
exclusiveMaximum: Type.Optional(Type.Union([Type.Boolean(), Type.Number()])),
|
|
66
|
-
/** Minimum value (inclusive). */
|
|
67
|
-
minimum: Type.Optional(Type.Number()),
|
|
68
|
-
/** Minimum value (exclusive). */
|
|
69
|
-
exclusiveMinimum: Type.Optional(Type.Union([Type.Boolean(), Type.Number()]))
|
|
70
|
-
});
|
|
71
|
-
const StringValidationProperties = Type.Object({
|
|
72
|
-
type: Type.Literal("string"),
|
|
73
|
-
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
74
|
-
format: Type.Optional(Type.String()),
|
|
75
|
-
/** Maximum string length. */
|
|
76
|
-
maxLength: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
77
|
-
/** Minimum string length. */
|
|
78
|
-
minLength: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
79
|
-
/** Regular expression pattern. */
|
|
80
|
-
pattern: Type.Optional(Type.String())
|
|
81
|
-
});
|
|
37
|
+
const Extensions = compose(
|
|
38
|
+
XScalarIgnoreSchema,
|
|
39
|
+
XInternalSchema,
|
|
40
|
+
XVariableSchema,
|
|
41
|
+
XEnumDescriptionsSchema,
|
|
42
|
+
XEnumVarNamesSchema,
|
|
43
|
+
XAdditionalPropertiesNameSchema,
|
|
44
|
+
XTags
|
|
45
|
+
);
|
|
82
46
|
const CorePropertiesWithSchema = Type.Object({
|
|
83
47
|
name: Type.Optional(Type.String()),
|
|
84
48
|
/** A title for the schema. */
|
|
@@ -91,7 +55,6 @@ const CorePropertiesWithSchema = Type.Object({
|
|
|
91
55
|
enum: Type.Optional(Type.Array(Type.Unknown())),
|
|
92
56
|
/** Constant value that must match exactly. */
|
|
93
57
|
const: Type.Optional(Type.Unknown()),
|
|
94
|
-
// OpenAPI 3.1
|
|
95
58
|
/** Media type for content validation. */
|
|
96
59
|
contentMediaType: Type.Optional(Type.String()),
|
|
97
60
|
/** Content encoding. */
|
|
@@ -130,6 +93,32 @@ const CorePropertiesWithSchema = Type.Object({
|
|
|
130
93
|
/** Schema must not be valid. */
|
|
131
94
|
not: Type.Optional(schemaOrReference)
|
|
132
95
|
});
|
|
96
|
+
const NumericProperties = Type.Object({
|
|
97
|
+
type: Type.Union([Type.Literal("number"), Type.Literal("integer")]),
|
|
98
|
+
/** Different subtypes */
|
|
99
|
+
format: Type.Optional(Type.String()),
|
|
100
|
+
/** Number must be a multiple of this value. */
|
|
101
|
+
multipleOf: Type.Optional(Type.Number()),
|
|
102
|
+
/** Maximum value (inclusive). */
|
|
103
|
+
maximum: Type.Optional(Type.Number()),
|
|
104
|
+
/** Maximum value (exclusive). */
|
|
105
|
+
exclusiveMaximum: Type.Optional(Type.Union([Type.Boolean(), Type.Number()])),
|
|
106
|
+
/** Minimum value (inclusive). */
|
|
107
|
+
minimum: Type.Optional(Type.Number()),
|
|
108
|
+
/** Minimum value (exclusive). */
|
|
109
|
+
exclusiveMinimum: Type.Optional(Type.Union([Type.Boolean(), Type.Number()]))
|
|
110
|
+
});
|
|
111
|
+
const StringValidationProperties = Type.Object({
|
|
112
|
+
type: Type.Literal("string"),
|
|
113
|
+
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
114
|
+
format: Type.Optional(Type.String()),
|
|
115
|
+
/** Maximum string length. */
|
|
116
|
+
maxLength: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
117
|
+
/** Minimum string length. */
|
|
118
|
+
minLength: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
119
|
+
/** Regular expression pattern. */
|
|
120
|
+
pattern: Type.Optional(Type.String())
|
|
121
|
+
});
|
|
133
122
|
const ArrayValidationPropertiesWithSchema = Type.Object({
|
|
134
123
|
type: Type.Literal("array"),
|
|
135
124
|
/** Maximum number of items in array. */
|
|
@@ -158,15 +147,6 @@ const ObjectValidationPropertiesWithSchema = Type.Object({
|
|
|
158
147
|
/** Properties matching regex patterns. */
|
|
159
148
|
patternProperties: Type.Optional(Type.Record(Type.String(), schemaOrReference))
|
|
160
149
|
});
|
|
161
|
-
const Extensions = compose(
|
|
162
|
-
XScalarIgnoreSchema,
|
|
163
|
-
XInternalSchema,
|
|
164
|
-
XVariableSchema,
|
|
165
|
-
XEnumDescriptionsSchema,
|
|
166
|
-
XEnumVarNamesSchema,
|
|
167
|
-
XAdditionalPropertiesNameSchema,
|
|
168
|
-
XTags
|
|
169
|
-
);
|
|
170
150
|
const SchemaObjectSchemaDefinition = Type.Union([
|
|
171
151
|
// Keep compositions first so they get priority when union is evaluated
|
|
172
152
|
// Make sure there is always a required field so not all properties are optional
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/schemas/v3.1/strict/schema.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport { XInternalSchema } from '@/schemas/extensions/document/x-internal'\nimport { XScalarIgnoreSchema } from '@/schemas/extensions/document/x-scalar-ignore'\nimport { XTags } from '@/schemas/extensions/document/x-tags'\nimport { XAdditionalPropertiesNameSchema } from '@/schemas/extensions/schema/x-additional-properties-name'\nimport { XEnumDescriptionsSchema } from '@/schemas/extensions/schema/x-enum-descriptions'\nimport { XEnumVarNamesSchema } from '@/schemas/extensions/schema/x-enum-varnames'\nimport { XVariableSchema } from '@/schemas/extensions/schema/x-variable'\nimport {\n DiscriminatorObjectRef,\n ExternalDocumentationObjectRef,\n SchemaObjectRef,\n XMLObjectRef,\n} from '@/schemas/v3.1/strict/ref-definitions'\nimport { reference } from '@/schemas/v3.1/strict/reference'\n\nconst schemaOrReference = Type.Union([SchemaObjectRef, reference(SchemaObjectRef)])\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\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(\n Type.Union([\n // Integer formats\n Type.Literal('int8'),\n Type.Literal('int16'),\n Type.Literal('int32'),\n Type.Literal('int64'),\n Type.Literal('uint8'),\n Type.Literal('uint16'),\n Type.Literal('uint32'),\n Type.Literal('uint64'),\n Type.Literal('double-int'),\n // Number formats\n Type.Literal('float'),\n Type.Literal('double'),\n Type.Literal('decimal'),\n Type.Literal('decimal128'),\n // Structured field number formats\n Type.Literal('sf-integer'),\n Type.Literal('sf-decimal'),\n ]),\n ),\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.Union([Type.Boolean(), Type.Number()])),\n /** Minimum value (inclusive). */\n minimum: Type.Optional(Type.Number()),\n /** Minimum value (exclusive). */\n exclusiveMinimum: Type.Optional(Type.Union([Type.Boolean(), Type.Number()])),\n})\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\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\n // OpenAPI 3.1\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\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\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\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})\n\nconst Extensions = compose(\n XScalarIgnoreSchema,\n XInternalSchema,\n XVariableSchema,\n XEnumDescriptionsSchema,\n XEnumVarNamesSchema,\n XAdditionalPropertiesNameSchema,\n XTags,\n)\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({ _: 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"],
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAErB,SAAS,eAAe;AACxB,
|
|
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 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 ReferenceType, reference } from './reference'\n\nconst schemaOrReference = Type.Union([SchemaObjectRef, reference(SchemaObjectRef)])\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 _: 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 XEnumDescriptionsSchema,\n XEnumVarNamesSchema,\n XAdditionalPropertiesNameSchema,\n XTags,\n)\n\nexport type Extensions = XScalarIgnore &\n XInternal &\n XVariable &\n XEnumDescriptions &\n XEnumVarNames &\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\nexport type 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?: ReferenceType<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?: ReferenceType<SchemaObject>[]\n /** Exactly one schema must be valid. */\n oneOf?: ReferenceType<SchemaObject>[]\n /** At least one schema must be valid. */\n anyOf?: ReferenceType<SchemaObject>[]\n /** Schema must not be valid. */\n not?: ReferenceType<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.Union([Type.Boolean(), Type.Number()])),\n /** Minimum value (inclusive). */\n minimum: Type.Optional(Type.Number()),\n /** Minimum value (exclusive). */\n exclusiveMinimum: Type.Optional(Type.Union([Type.Boolean(), Type.Number()])),\n})\n\nexport type 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?: boolean | number\n /** Minimum value (inclusive). */\n minimum?: number\n /** Minimum value (exclusive). */\n exclusiveMinimum?: boolean | 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 */\nexport type 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\nexport type 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\nexport type 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?: ReferenceType<SchemaObject>\n /** Schema for tuple validation. */\n prefixItems?: ReferenceType<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})\n\nexport type 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, ReferenceType<SchemaObject>>\n /** Schema for additional properties. */\n additionalProperties?: boolean | ReferenceType<SchemaObject>\n /** Properties matching regex patterns. */\n patternProperties?: Record<string, ReferenceType<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({ _: 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\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;AAKhD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAA6B,iBAAiB;AAE9C,MAAM,oBAAoB,KAAK,MAAM,CAAC,iBAAiB,UAAU,eAAe,CAAC,CAAC;AAclF,MAAM,aAA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C;AAChF,CAAC;AAmBM,MAAM,+BAA+B,KAAK,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrD,QAAQ,KAAK,OAAO,EAAE,GAAG,KAAK,OAAO,EAAE,CAAC,GAAG,0BAA0B,UAAU;AAAA,EAC/E,QAAQ,YAAY,0BAA0B,UAAU;AAAA,EACxD,QAAQ,mBAAmB,0BAA0B,UAAU;AAAA,EAC/D,QAAQ,4BAA4B,0BAA0B,UAAU;AAAA,EACxE,QAAQ,sCAAsC,0BAA0B,UAAU;AAAA,EAClF,QAAQ,qCAAqC,0BAA0B,UAAU;AACnF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -8,4 +8,16 @@
|
|
|
8
8
|
* An empty Security Requirement Object ({}) indicates anonymous access is supported.
|
|
9
9
|
*/
|
|
10
10
|
export declare const SecurityRequirementObjectSchemaDefinition: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
11
|
+
/**
|
|
12
|
+
* 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.
|
|
13
|
+
*
|
|
14
|
+
* 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.
|
|
15
|
+
*
|
|
16
|
+
* 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.
|
|
17
|
+
*
|
|
18
|
+
* An empty Security Requirement Object ({}) indicates anonymous access is supported.
|
|
19
|
+
*/
|
|
20
|
+
export type SecurityRequirementObject = Record<string,
|
|
21
|
+
/** 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. */
|
|
22
|
+
string[]>;
|
|
11
23
|
//# sourceMappingURL=security-requirement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-requirement.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/security-requirement.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,eAAO,MAAM,yCAAyC,2IAIrD,CAAA"}
|
|
1
|
+
{"version":3,"file":"security-requirement.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/security-requirement.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,eAAO,MAAM,yCAAyC,2IAIrD,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAC5C,MAAM;AACN,ofAAof;AACpf,MAAM,EAAE,CACT,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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.Record(\n Type.String(),\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.Array(Type.String()),\n)\n"],
|
|
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.Record(\n Type.String(),\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.Array(Type.String()),\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 * An empty Security Requirement Object ({}) indicates anonymous access is supported.\n */\nexport type SecurityRequirementObject = Record<\n string,\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>\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,YAAY;AAWd,MAAM,4CAA4C,KAAK;AAAA,EAC5D,KAAK,OAAO;AAAA;AAAA,EAEZ,KAAK,MAAM,KAAK,OAAO,CAAC;AAC1B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
+
import { type XDefaultScopes } from '../../../schemas/extensions/security/x-default-scopes.js';
|
|
2
|
+
import { type XScalarSecretHTTP, type XScalarSecretToken } from '../../../schemas/extensions/security/x-scalar-security-secrets.js';
|
|
3
|
+
import type { OAuthFlowsObject } from '../../../schemas/v3.1/strict/oauthflows.js';
|
|
1
4
|
export declare const DescriptionSchema: import("@scalar/typebox").TObject<{
|
|
2
5
|
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
3
6
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
4
7
|
}>;
|
|
8
|
+
type Description = {
|
|
9
|
+
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
10
|
+
description?: string;
|
|
11
|
+
};
|
|
5
12
|
export declare const ApiKeySchema: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
6
13
|
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
7
14
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
8
15
|
}>, import("@scalar/typebox").TObject<{
|
|
9
|
-
'x-scalar-secret-token': import("@scalar/typebox").
|
|
16
|
+
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
10
17
|
}>, import("@scalar/typebox").TObject<{
|
|
11
18
|
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
12
19
|
type: import("@scalar/typebox").TLiteral<"apiKey">;
|
|
@@ -15,14 +22,22 @@ export declare const ApiKeySchema: import("@scalar/typebox").TIntersect<[import(
|
|
|
15
22
|
/** REQUIRED. The location of the API key. Valid values are "query", "header", or "cookie". */
|
|
16
23
|
in: import("@scalar/typebox").TString;
|
|
17
24
|
}>]>;
|
|
25
|
+
export type ApiKeyObject = Description & {
|
|
26
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
27
|
+
type: 'apiKey';
|
|
28
|
+
/** REQUIRED. The name of the header, query or cookie parameter to be used. */
|
|
29
|
+
name: string;
|
|
30
|
+
/** REQUIRED. The location of the API key. Valid values are "query", "header", or "cookie". */
|
|
31
|
+
in: string;
|
|
32
|
+
} & XScalarSecretToken;
|
|
18
33
|
export declare const HttpSchema: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
19
34
|
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
20
35
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
21
36
|
}>, import("@scalar/typebox").TObject<{
|
|
22
|
-
'x-scalar-secret-token': import("@scalar/typebox").
|
|
37
|
+
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
23
38
|
}>, import("@scalar/typebox").TObject<{
|
|
24
|
-
'x-scalar-secret-username': import("@scalar/typebox").
|
|
25
|
-
'x-scalar-secret-password': import("@scalar/typebox").
|
|
39
|
+
'x-scalar-secret-username': import("@scalar/typebox").TString;
|
|
40
|
+
'x-scalar-secret-password': import("@scalar/typebox").TString;
|
|
26
41
|
}>, import("@scalar/typebox").TObject<{
|
|
27
42
|
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
28
43
|
type: import("@scalar/typebox").TLiteral<"http">;
|
|
@@ -31,6 +46,14 @@ export declare const HttpSchema: import("@scalar/typebox").TIntersect<[import("@
|
|
|
31
46
|
/** 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. */
|
|
32
47
|
bearerFormat: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
33
48
|
}>]>;
|
|
49
|
+
export type HttpObject = Description & {
|
|
50
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
51
|
+
type: 'http';
|
|
52
|
+
/** 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. */
|
|
53
|
+
scheme: string;
|
|
54
|
+
/** 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. */
|
|
55
|
+
bearerFormat?: string;
|
|
56
|
+
} & XScalarSecretHTTP & XScalarSecretToken;
|
|
34
57
|
export declare const OAuth2: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
35
58
|
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
36
59
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -39,7 +62,15 @@ export declare const OAuth2: import("@scalar/typebox").TIntersect<[import("@scal
|
|
|
39
62
|
type: import("@scalar/typebox").TLiteral<"oauth2">;
|
|
40
63
|
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
41
64
|
flows: import("@scalar/typebox").TRef<"OAuthFlowsObject">;
|
|
65
|
+
}>, import("@scalar/typebox").TObject<{
|
|
66
|
+
'x-default-scopes': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
42
67
|
}>]>;
|
|
68
|
+
export type OAuth2Object = Description & {
|
|
69
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
70
|
+
type: 'oauth2';
|
|
71
|
+
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
72
|
+
flows: OAuthFlowsObject;
|
|
73
|
+
} & XDefaultScopes;
|
|
43
74
|
export declare const OpenIdConnect: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
44
75
|
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
45
76
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -49,6 +80,12 @@ export declare const OpenIdConnect: import("@scalar/typebox").TIntersect<[import
|
|
|
49
80
|
/** REQUIRED. Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata. */
|
|
50
81
|
openIdConnectUrl: import("@scalar/typebox").TString;
|
|
51
82
|
}>]>;
|
|
83
|
+
export type OpenIdConnectObject = Description & {
|
|
84
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
85
|
+
type: 'openIdConnect';
|
|
86
|
+
/** REQUIRED. Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata. */
|
|
87
|
+
openIdConnectUrl: string;
|
|
88
|
+
};
|
|
52
89
|
/**
|
|
53
90
|
* Defines a security scheme that can be used by the operations.
|
|
54
91
|
*
|
|
@@ -58,7 +95,7 @@ export declare const SecuritySchemeObjectSchemaDefinition: import("@scalar/typeb
|
|
|
58
95
|
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
59
96
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
60
97
|
}>, import("@scalar/typebox").TObject<{
|
|
61
|
-
'x-scalar-secret-token': import("@scalar/typebox").
|
|
98
|
+
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
62
99
|
}>, import("@scalar/typebox").TObject<{
|
|
63
100
|
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
64
101
|
type: import("@scalar/typebox").TLiteral<"apiKey">;
|
|
@@ -70,10 +107,10 @@ export declare const SecuritySchemeObjectSchemaDefinition: import("@scalar/typeb
|
|
|
70
107
|
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
71
108
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
72
109
|
}>, import("@scalar/typebox").TObject<{
|
|
73
|
-
'x-scalar-secret-token': import("@scalar/typebox").
|
|
110
|
+
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
74
111
|
}>, import("@scalar/typebox").TObject<{
|
|
75
|
-
'x-scalar-secret-username': import("@scalar/typebox").
|
|
76
|
-
'x-scalar-secret-password': import("@scalar/typebox").
|
|
112
|
+
'x-scalar-secret-username': import("@scalar/typebox").TString;
|
|
113
|
+
'x-scalar-secret-password': import("@scalar/typebox").TString;
|
|
77
114
|
}>, import("@scalar/typebox").TObject<{
|
|
78
115
|
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
79
116
|
type: import("@scalar/typebox").TLiteral<"http">;
|
|
@@ -89,6 +126,8 @@ export declare const SecuritySchemeObjectSchemaDefinition: import("@scalar/typeb
|
|
|
89
126
|
type: import("@scalar/typebox").TLiteral<"oauth2">;
|
|
90
127
|
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
91
128
|
flows: import("@scalar/typebox").TRef<"OAuthFlowsObject">;
|
|
129
|
+
}>, import("@scalar/typebox").TObject<{
|
|
130
|
+
'x-default-scopes': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
92
131
|
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
93
132
|
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
94
133
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -98,4 +137,6 @@ export declare const SecuritySchemeObjectSchemaDefinition: import("@scalar/typeb
|
|
|
98
137
|
/** REQUIRED. Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata. */
|
|
99
138
|
openIdConnectUrl: import("@scalar/typebox").TString;
|
|
100
139
|
}>]>]>;
|
|
140
|
+
export type SecuritySchemeObject = ApiKeyObject | HttpObject | OAuth2Object | OpenIdConnectObject;
|
|
141
|
+
export {};
|
|
101
142
|
//# sourceMappingURL=security-scheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/security-scheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/security-scheme.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,gDAAgD,CAAA;AAC1G,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,kBAAkB,EAExB,MAAM,yDAAyD,CAAA;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAGxE,eAAO,MAAM,iBAAiB;IAC5B,qGAAqG;;EAErG,CAAA;AAEF,KAAK,WAAW,GAAG;IACjB,qGAAqG;IACrG,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,YAAY;IATvB,qGAAqG;;;;;IAanG,4HAA4H;;IAE5H,8EAA8E;;IAE9E,8FAA8F;;IAGjG,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACvC,4HAA4H;IAC5H,IAAI,EAAE,QAAQ,CAAA;IACd,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAA;IACZ,8FAA8F;IAC9F,EAAE,EAAE,MAAM,CAAA;CACX,GAAG,kBAAkB,CAAA;AAEtB,eAAO,MAAM,UAAU;IA/BrB,qGAAqG;;;;;;;;IAoCnG,4HAA4H;;IAE5H,gQAAgQ;;IAEhQ,uMAAuM;;IAG1M,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG;IACrC,4HAA4H;IAC5H,IAAI,EAAE,MAAM,CAAA;IACZ,gQAAgQ;IAChQ,MAAM,EAAE,MAAM,CAAA;I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