@scalar/workspace-store 0.68.4 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/channel-example/get-channel-connection-context.d.ts +1 -1
- package/dist/channel-example/get-channel-connection-context.js +8 -8
- package/dist/channel-example/get-channel-connection-security.js +1 -1
- package/dist/channel-example/get-channel-parameters.js +1 -1
- package/dist/channel-example/servers.d.ts +1 -1
- package/dist/channel-example/servers.js +1 -1
- package/dist/entities/auth/index.d.ts +1 -1
- package/dist/entities/auth/index.js +1 -1
- package/dist/entities/history/index.d.ts +1 -1
- package/dist/entities/history/index.js +1 -1
- package/dist/events/definitions/cookie.d.ts +1 -1
- package/dist/events/definitions/environment.d.ts +1 -1
- package/dist/events/definitions/hooks.d.ts +1 -1
- package/dist/events/definitions/index.d.ts +5 -5
- package/dist/helpers/asyncapi-model-chunk-reference.js +1 -1
- package/dist/helpers/chunk-index.d.ts.map +1 -1
- package/dist/helpers/chunk-index.js +9 -1
- package/dist/helpers/document-revision.js +1 -1
- package/dist/helpers/dynamic-ref.js +2 -2
- package/dist/helpers/for-each-path-item-operation.d.ts +1 -1
- package/dist/helpers/for-each-path-item-operation.js +1 -1
- package/dist/helpers/get-example-value.js +1 -1
- package/dist/helpers/get-parameter-example.js +1 -1
- package/dist/helpers/operation-examples.js +1 -1
- package/dist/helpers/querystring-parameter.js +1 -1
- package/dist/helpers/resolve-async-api-schema.d.ts +16 -0
- package/dist/helpers/resolve-async-api-schema.d.ts.map +1 -0
- package/dist/helpers/resolve-async-api-schema.js +42 -0
- package/dist/helpers/resolve-security-requirements.js +2 -2
- package/dist/helpers/snapshot-schema.js +1 -1
- package/dist/helpers/unpack-proxy.js +2 -2
- package/dist/helpers/use-external-examples.d.ts +1 -1
- package/dist/helpers/use-external-examples.js +1 -1
- package/dist/mutators/index.js +10 -10
- package/dist/mutators/operation/helpers/sync-path-parameters.js +1 -1
- package/dist/mutators/operation/index.js +5 -5
- package/dist/mutators/operation/operation.js +1 -1
- package/dist/navigation/get-navigation-options.d.ts +1 -1
- package/dist/navigation/helpers/get-navigation-tag-names.d.ts +1 -1
- package/dist/navigation/helpers/get-tag.d.ts +1 -1
- package/dist/navigation/helpers/traverse-asyncapi-document.d.ts +1 -1
- package/dist/navigation/helpers/traverse-asyncapi-document.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-asyncapi-document.js +10 -17
- package/dist/navigation/helpers/traverse-description.d.ts +1 -1
- package/dist/navigation/helpers/traverse-description.js +1 -1
- package/dist/navigation/helpers/traverse-document.d.ts +1 -1
- package/dist/navigation/helpers/traverse-document.js +1 -1
- package/dist/navigation/helpers/traverse-paths.d.ts +1 -1
- package/dist/navigation/helpers/traverse-paths.js +1 -1
- package/dist/navigation/helpers/traverse-schemas.d.ts +1 -1
- package/dist/navigation/helpers/traverse-schemas.js +2 -2
- package/dist/navigation/helpers/traverse-tags.d.ts +1 -1
- package/dist/navigation/helpers/traverse-tags.js +2 -2
- package/dist/navigation/helpers/traverse-webhooks.d.ts +1 -1
- package/dist/navigation/helpers/traverse-webhooks.js +1 -1
- package/dist/navigation/helpers/update-order-ids.js +2 -2
- package/dist/navigation/helpers/utils.d.ts +1 -1
- package/dist/persistence/index.js +3 -3
- package/dist/persistence/migrations/v1-initial.d.ts +1 -1
- package/dist/persistence/migrations/v2-team-to-local.d.ts +1 -1
- package/dist/plugins/bundler/index.js +1 -1
- package/dist/request-example/builder/body/get-request-body-example.js +3 -3
- package/dist/request-example/builder/build-request.d.ts +2 -2
- package/dist/request-example/builder/build-request.js +5 -5
- package/dist/request-example/builder/header/build-request-parameters.js +1 -1
- package/dist/request-example/builder/header/is-param-disabled.js +1 -1
- package/dist/request-example/builder/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/request-example/builder/helpers/get-example-from-schema.js +34 -1
- package/dist/request-example/builder/helpers/get-resolved-url.js +1 -1
- package/dist/request-example/builder/request-factory.d.ts +3 -3
- package/dist/request-example/builder/request-factory.js +2 -2
- package/dist/request-example/builder/resolve-request-factory-url.d.ts +1 -1
- package/dist/request-example/builder/security/build-request-security.d.ts +1 -1
- package/dist/request-example/builder/security/secret-types.d.ts +1 -1
- package/dist/request-example/context/get-request-example-context.d.ts +4 -4
- package/dist/request-example/context/get-request-example-context.js +9 -9
- package/dist/request-example/context/headers.js +2 -2
- package/dist/request-example/context/security/extract-security-scheme-secrets.d.ts +1 -1
- package/dist/request-example/context/security/get-security-schemes.d.ts +2 -2
- package/dist/request-example/context/security/merge-security.d.ts +1 -1
- package/dist/request-example/context/security/merge-security.js +1 -1
- package/dist/request-example/variable-store/index.d.ts +1 -1
- package/dist/schemas/extensions/tag/x-tag-groups.d.ts +1 -1
- package/dist/schemas/extensions/tag/x-tag-groups.js +2 -2
- package/dist/schemas/inmemory-workspace.d.ts +1 -1
- package/dist/schemas/navigation.d.ts +5 -5
- package/dist/schemas/navigation.js +2 -2
- package/dist/schemas/reference-config/settings.d.ts +1 -1
- package/dist/schemas/reference-config/settings.js +1 -1
- package/dist/schemas/v3.1/strict/example.js +2 -2
- package/dist/schemas/v3.1/strict/header.js +1 -1
- package/dist/schemas/v3.1/strict/info.d.ts +2 -2
- package/dist/schemas/v3.1/strict/info.js +3 -3
- package/dist/schemas/v3.1/strict/link.js +1 -1
- package/dist/schemas/v3.1/strict/oauth-flow.d.ts +8 -8
- package/dist/schemas/v3.1/strict/oauth-flow.js +9 -9
- package/dist/schemas/v3.1/strict/oauthflows.d.ts +1 -1
- package/dist/schemas/v3.1/strict/oauthflows.js +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +17 -17
- package/dist/schemas/v3.1/strict/openapi-document.js +18 -18
- package/dist/schemas/v3.1/strict/operation.d.ts +10 -10
- package/dist/schemas/v3.1/strict/operation.js +11 -11
- package/dist/schemas/v3.1/strict/parameter.d.ts +6 -6
- package/dist/schemas/v3.1/strict/parameter.js +6 -6
- package/dist/schemas/v3.1/strict/reference.js +1 -1
- package/dist/schemas/v3.1/strict/request-body.d.ts +1 -1
- package/dist/schemas/v3.1/strict/request-body.js +2 -2
- package/dist/schemas/v3.1/strict/response.d.ts +2 -2
- package/dist/schemas/v3.1/strict/schema.d.ts +11 -11
- package/dist/schemas/v3.1/strict/schema.js +10 -10
- package/dist/schemas/v3.1/strict/security-scheme.d.ts +3 -3
- package/dist/schemas/v3.1/strict/security-scheme.js +4 -4
- package/dist/schemas/v3.1/strict/tag.d.ts +4 -4
- package/dist/schemas/v3.1/strict/tag.js +5 -5
- package/dist/schemas/v3.1/strict/type-guards.d.ts +2 -2
- package/dist/schemas/v3.2/openapi/index.js +43 -43
- package/dist/schemas/v3.2/strict/example.js +2 -2
- package/dist/schemas/v3.2/strict/header.js +1 -1
- package/dist/schemas/v3.2/strict/info.d.ts +2 -2
- package/dist/schemas/v3.2/strict/info.js +3 -3
- package/dist/schemas/v3.2/strict/link.js +1 -1
- package/dist/schemas/v3.2/strict/oauth-flow.d.ts +8 -8
- package/dist/schemas/v3.2/strict/oauth-flow.js +9 -9
- package/dist/schemas/v3.2/strict/openapi-document.d.ts +17 -17
- package/dist/schemas/v3.2/strict/openapi-document.js +18 -18
- package/dist/schemas/v3.2/strict/operation.d.ts +10 -10
- package/dist/schemas/v3.2/strict/operation.js +11 -11
- package/dist/schemas/v3.2/strict/parameter.d.ts +6 -6
- package/dist/schemas/v3.2/strict/parameter.js +6 -6
- package/dist/schemas/v3.2/strict/reference.js +1 -1
- package/dist/schemas/v3.2/strict/request-body.d.ts +1 -1
- package/dist/schemas/v3.2/strict/request-body.js +2 -2
- package/dist/schemas/v3.2/strict/response.d.ts +2 -2
- package/dist/schemas/v3.2/strict/schema.d.ts +11 -11
- package/dist/schemas/v3.2/strict/schema.js +10 -10
- package/dist/schemas/v3.2/strict/security-scheme.d.ts +3 -3
- package/dist/schemas/v3.2/strict/security-scheme.js +4 -4
- package/dist/schemas/v3.2/strict/tag.d.ts +4 -4
- package/dist/schemas/v3.2/strict/tag.js +5 -5
- package/dist/schemas/v3.2/strict/type-guards.d.ts +2 -2
- package/dist/schemas/workspace-specification/index.d.ts +3 -3
- package/dist/schemas/workspace-specification/index.js +3 -3
- package/dist/schemas/workspace.d.ts +7 -7
- package/dist/schemas/workspace.js +8 -8
- package/package.json +15 -15
|
@@ -2,7 +2,7 @@ import { escapeJsonPointer } from '@scalar/json-magic/helpers/escape-json-pointe
|
|
|
2
2
|
import { forEachPathItemOperation, getPathItemOperationKey } from '../../helpers/for-each-path-item-operation.js';
|
|
3
3
|
import { getResolvedRef, mergeSiblingReferences } from '../../helpers/get-resolved-ref.js';
|
|
4
4
|
import { isHidden } from '../../helpers/is-hidden.js';
|
|
5
|
-
import { traverseOperationExamples } from '
|
|
5
|
+
import { traverseOperationExamples } from './traverse-examples.js';
|
|
6
6
|
import { XScalarStabilityValues } from '../../schemas/extensions/operation/index.js';
|
|
7
7
|
import { getNavigationTagNames } from './get-navigation-tag-names.js';
|
|
8
8
|
import { getTag } from './get-tag.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TagsMap, TraverseSpecOptions } from '
|
|
1
|
+
import type { TagsMap, TraverseSpecOptions } from '../types.js';
|
|
2
2
|
import type { TraversedSchema } from '../../schemas/navigation.js';
|
|
3
3
|
import type { OpenApiDocument } from '../../schemas/v3.2/strict/openapi-document.js';
|
|
4
4
|
/** Traverses the schemas in an OpenAPI document to build an array of model entries.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isObject } from '@scalar/helpers/object/is-object';
|
|
2
2
|
import { getResolvedRef, mergeSiblingReferences } from '../../helpers/get-resolved-ref.js';
|
|
3
3
|
import { isHidden } from '../../helpers/is-hidden.js';
|
|
4
|
-
import { getNavigationTagNames } from '
|
|
5
|
-
import { getTag } from '
|
|
4
|
+
import { getNavigationTagNames } from './get-navigation-tag-names.js';
|
|
5
|
+
import { getTag } from './get-tag.js';
|
|
6
6
|
/** Creates a traversed schema entry from an OpenAPI schema object.
|
|
7
7
|
*
|
|
8
8
|
* @param ref - JSON pointer reference to the schema in the OpenAPI document
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TagsMap, TraverseSpecOptions } from '
|
|
1
|
+
import type { TagsMap, TraverseSpecOptions } from '../types.js';
|
|
2
2
|
import type { TraversedEntry } from '../../schemas/navigation.js';
|
|
3
3
|
import type { OpenApiDocument } from '../../schemas/v3.2/strict/openapi-document.js';
|
|
4
4
|
type Options = Pick<TraverseSpecOptions, 'tagsSorter' | 'operationsSorter' | 'generateId'>;
|
|
@@ -2,8 +2,8 @@ import { sortByOrder } from '@scalar/helpers/array/sort-by-order';
|
|
|
2
2
|
import { getTagKind } from '../../helpers/get-tag-kind.js';
|
|
3
3
|
import { isHidden } from '../../helpers/is-hidden.js';
|
|
4
4
|
import { unpackProxyObject } from '../../helpers/unpack-proxy.js';
|
|
5
|
-
import { getTagExternalDocs } from '
|
|
6
|
-
import { getXKeysFromObject } from '
|
|
5
|
+
import { getTagExternalDocs } from './get-tag-external-docs.js';
|
|
6
|
+
import { getXKeysFromObject } from './get-x-keys.js';
|
|
7
7
|
import { getTag } from './get-tag.js';
|
|
8
8
|
/** Creates a traversed tag entry from an OpenAPI tag object.
|
|
9
9
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TagsMap, TraverseSpecOptions } from '
|
|
1
|
+
import type { TagsMap, TraverseSpecOptions } from '../types.js';
|
|
2
2
|
import type { TraversedWebhook } from '../../schemas/navigation.js';
|
|
3
3
|
import type { OpenApiDocument } from '../../schemas/v3.2/strict/openapi-document.js';
|
|
4
4
|
/** Traverses the webhooks in an OpenAPI document to build an array of webhook entries.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forEachPathItemOperation, getPathItemOperationKey } from '../../helpers/for-each-path-item-operation.js';
|
|
2
2
|
import { getResolvedRef, mergeSiblingReferences } from '../../helpers/get-resolved-ref.js';
|
|
3
3
|
import { isHidden } from '../../helpers/is-hidden.js';
|
|
4
|
-
import { isDeprecatedOperation } from '
|
|
4
|
+
import { isDeprecatedOperation } from './traverse-paths.js';
|
|
5
5
|
import { getNavigationTagNames } from './get-navigation-tag-names.js';
|
|
6
6
|
import { getTag } from './get-tag.js';
|
|
7
7
|
/** Creates a traversed webhook entry from an OpenAPI webhook object.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { canHaveOrder, getOpenapiObject } from '
|
|
2
|
-
import { getParentEntry } from '
|
|
1
|
+
import { canHaveOrder, getOpenapiObject } from './get-openapi-object.js';
|
|
2
|
+
import { getParentEntry } from './get-parent-entry.js';
|
|
3
3
|
import { isOpenApiDocument } from '../../schemas/type-guards.js';
|
|
4
4
|
/**
|
|
5
5
|
* Updates the order ID of an entry (operation or tag) in the sidebar.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Heading } from '
|
|
1
|
+
import type { Heading } from '../types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Extracts all headings from a Markdown string and adds URL-friendly slugs to each heading.
|
|
4
4
|
* Uses GithubSlugger to generate consistent slugs that match GitHub's heading anchor format.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type } from '@scalar/typebox';
|
|
2
|
-
import { createIndexDbConnection } from '
|
|
3
|
-
import { v1InitialMigration } from '
|
|
4
|
-
import { v2TeamToLocalMigration } from '
|
|
2
|
+
import { createIndexDbConnection } from './indexdb.js';
|
|
3
|
+
import { v1InitialMigration } from './migrations/v1-initial.js';
|
|
4
|
+
import { v2TeamToLocalMigration } from './migrations/v2-team-to-local.js';
|
|
5
5
|
/**
|
|
6
6
|
* Generates a fresh `workspaceUid` for new workspaces.
|
|
7
7
|
*
|
|
@@ -9,7 +9,7 @@ import { isSchemaPath } from '@scalar/helpers/openapi/is-schema-path';
|
|
|
9
9
|
import { resolveReferencePath } from '@scalar/json-magic/bundle';
|
|
10
10
|
import { isLocalRef } from '../../helpers/general.js';
|
|
11
11
|
import { syncParametersForPathChange, } from '../../mutators/operation/helpers/sync-path-parameters.js';
|
|
12
|
-
import { getResolvedRef } from '
|
|
12
|
+
import { getResolvedRef } from './helpers.js';
|
|
13
13
|
/**
|
|
14
14
|
* A lifecycle plugin that adds a `$status` property to nodes during resolution.
|
|
15
15
|
* - Sets `$status` to 'loading' when resolution starts.
|
|
@@ -4,9 +4,9 @@ import { getExampleValue } from '../../../helpers/get-example-value.js';
|
|
|
4
4
|
import { getResolvedRef } from '../../../helpers/get-resolved-ref.js';
|
|
5
5
|
import { serializeStreamExample } from '../../../helpers/serialize-stream-example.js';
|
|
6
6
|
import { snapshotSchema } from '../../../helpers/snapshot-schema.js';
|
|
7
|
-
import { getExample } from '
|
|
8
|
-
import { getExampleFromSchema } from '
|
|
9
|
-
import { getXmlBodyExample } from '
|
|
7
|
+
import { getExample } from '../helpers/get-example.js';
|
|
8
|
+
import { getExampleFromSchema } from '../helpers/get-example-from-schema.js';
|
|
9
|
+
import { getXmlBodyExample } from '../../xml/get-xml-body-example.js';
|
|
10
10
|
/**
|
|
11
11
|
* Generate a write-mode example directly from a request body's schema, ignoring any stored example.
|
|
12
12
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Result } from '@scalar/helpers/types/result';
|
|
2
|
-
import type { RequestFactory } from '
|
|
3
|
-
import { type ResolveRequestFactoryUrlError } from '
|
|
2
|
+
import type { RequestFactory } from './request-factory.js';
|
|
3
|
+
import { type ResolveRequestFactoryUrlError } from './resolve-request-factory-url.js';
|
|
4
4
|
/**
|
|
5
5
|
* The payload to build a request, useful when bypassing limitations of the browser Request object
|
|
6
6
|
*/
|
|
@@ -5,11 +5,11 @@ import { err, ok } from '@scalar/helpers/types/result';
|
|
|
5
5
|
import { safeRun } from '@scalar/helpers/types/safe-run';
|
|
6
6
|
import { redirectToProxy, shouldUseProxy } from '@scalar/helpers/url/redirect-to-proxy';
|
|
7
7
|
import { encode as encodeBase64 } from 'js-base64';
|
|
8
|
-
import { encodeMultipartBody } from '
|
|
9
|
-
import { buildRequestCookieHeader } from '
|
|
10
|
-
import { applyAllowReservedToUrl } from '
|
|
11
|
-
import { resolveRequestFactoryUrl, } from '
|
|
12
|
-
import { contextFunctions, isContextFunctionName } from '
|
|
8
|
+
import { encodeMultipartBody } from './body/encode-multipart-body.js';
|
|
9
|
+
import { buildRequestCookieHeader } from './header/build-request-cookie-header.js';
|
|
10
|
+
import { applyAllowReservedToUrl } from './helpers/apply-allow-reserved-to-url.js';
|
|
11
|
+
import { resolveRequestFactoryUrl, } from './resolve-request-factory-url.js';
|
|
12
|
+
import { contextFunctions, isContextFunctionName } from '../functions.js';
|
|
13
13
|
const FORBIDDEN_HEADERS = [
|
|
14
14
|
{ header: 'date', scalarHeader: X_SCALAR_DATE },
|
|
15
15
|
{ header: 'dnt', scalarHeader: X_SCALAR_DNT },
|
|
@@ -5,7 +5,7 @@ import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref
|
|
|
5
5
|
import { xScalarCookieSchema, } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
|
|
6
6
|
import { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce';
|
|
7
7
|
import { getParameterExample } from '../../../helpers/get-parameter-example.js';
|
|
8
|
-
import { deSerializeParameter } from '
|
|
8
|
+
import { deSerializeParameter } from './de-serialize-parameter.js';
|
|
9
9
|
import { filterDisabledProperties } from './filter-disabled-properties.js';
|
|
10
10
|
import { isParamDisabled } from './is-param-disabled.js';
|
|
11
11
|
import { serializeContentValue, serializeCookieStyle, serializeDeepObjectStyle, serializeFormStyle, serializeFormStyleForCookies, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle, } from './serialize-parameter.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getExampleValue } from '../../../helpers/get-example-value.js';
|
|
2
|
-
import { isGeneratedExample } from '
|
|
2
|
+
import { isGeneratedExample } from '../helpers/get-example.js';
|
|
3
3
|
/**
|
|
4
4
|
* Determines if a parameter is disabled
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/helpers/get-example-from-schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/helpers/get-example-from-schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAqD,MAAM,uBAAuB,CAAA;AAG5G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AAE1E,OAAO,EAAE,kBAAkB,EAA0B,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAwZ9G,gGAAgG;AAChG,eAAO,MAAM,wBAAwB,GACnC,QAAQ,YAAY,EACpB,YAAY,MAAM,EAAE,EACpB,UAAU,2BAA2B,EACrC,mBAAiB,EACjB,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B,YAAY,GAAG,SAoBjB,CAAA;AAiaD,sEAAsE;AACtE,MAAM,MAAM,2BAA2B,GAAG;IACxC,2EAA2E;IAC3E,CAAC,kBAAkB,CAAC,CAAC,EAAE,sBAAsB,CAAA;IAC7C,mFAAmF;IACnF,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kFAAkF;IAClF,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,qDAAqD;IACrD,8BAA8B,CAAC,EAAE,OAAO,CAAA;IACxC;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,0DAA0D;IAC1D,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9C,CAAA;AA+PD;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,yBAAyB,GAC7B,QAAQ,YAAY,EACpB,UAAU,2BAA2B,EACrC,iEAOG,OAAO,CAAC;IACT,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,YAAY,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;IACrB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,qGAAqG;IACrG,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAM,KACN,OA8QF,CAAA;AAoBD,gGAAgG;AAChG,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,YAAY,EACpB,UAAU,2BAA2B,EACrC,UAAS,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC,CAAM,KAC5D,OA2BF,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isDefined } from '@scalar/helpers/array/is-defined';
|
|
2
|
+
import { isJsonMediaType } from '@scalar/helpers/http/is-json-media-type';
|
|
2
3
|
import { escapeJsonPointer } from '@scalar/helpers/json/escape-json-pointer';
|
|
3
4
|
import { isDynamicRef, pushDynamicScope, resolveDynamicRef } from '../../../helpers/dynamic-ref.js';
|
|
4
5
|
import { unpackProxyObject } from '../../../helpers/unpack-proxy.js';
|
|
@@ -881,6 +882,13 @@ const getMaxDepthValue = (schema, options, schemaPath, seen = new Set()) => {
|
|
|
881
882
|
truncated = true;
|
|
882
883
|
return MAX_DEPTH_EXCEEDED;
|
|
883
884
|
};
|
|
885
|
+
const hasUnencodedJsonContent = (schema) => {
|
|
886
|
+
if (!('contentSchema' in schema) || !isJsonMediaType(schema.contentMediaType))
|
|
887
|
+
return false;
|
|
888
|
+
if ('contentEncoding' in schema)
|
|
889
|
+
return false;
|
|
890
|
+
return !('type' in schema) || getDeclaredTypes(schema).includes('string');
|
|
891
|
+
};
|
|
884
892
|
/**
|
|
885
893
|
* Generate an example value from a given OpenAPI SchemaObject.
|
|
886
894
|
*
|
|
@@ -1005,7 +1013,13 @@ const generateExampleFromSchema = (schema, options, { level = 0, parentSchema, n
|
|
|
1005
1013
|
if (selectedComposition && selectedVariant) {
|
|
1006
1014
|
const rootType = 'type' in _schema ? _schema.type : undefined;
|
|
1007
1015
|
const variantType = 'type' in selectedVariant ? selectedVariant.type : undefined;
|
|
1008
|
-
const selectedType = variantType ??
|
|
1016
|
+
const selectedType = variantType ??
|
|
1017
|
+
rootType ??
|
|
1018
|
+
(hasUnencodedJsonContent(_schema)
|
|
1019
|
+
? 'string'
|
|
1020
|
+
: 'items' in _schema && !('properties' in _schema)
|
|
1021
|
+
? 'array'
|
|
1022
|
+
: undefined);
|
|
1009
1023
|
if (selectedType !== undefined && selectedType !== 'object') {
|
|
1010
1024
|
const { oneOf: _oneOf, anyOf: _anyOf, ...base } = _schema;
|
|
1011
1025
|
const selectedSchema = { ...base, ...selectedVariant };
|
|
@@ -1028,6 +1042,25 @@ const generateExampleFromSchema = (schema, options, { level = 0, parentSchema, n
|
|
|
1028
1042
|
return cache(_schema, result, cacheKey, skipCache);
|
|
1029
1043
|
}
|
|
1030
1044
|
}
|
|
1045
|
+
if (hasUnencodedJsonContent(_schema)) {
|
|
1046
|
+
const contentSchema = resolve.schema(_schema.contentSchema);
|
|
1047
|
+
if (contentSchema) {
|
|
1048
|
+
// JSON content preserves strings and property names regardless of the enclosing wire format.
|
|
1049
|
+
const content = getExampleFromSchema(contentSchema, { ...options, xml: false, binaryAsFile: false }, {
|
|
1050
|
+
level: level + 1,
|
|
1051
|
+
// The decoded value inherits the field requirement, not the string wrapper as a parent.
|
|
1052
|
+
parentSchema,
|
|
1053
|
+
name,
|
|
1054
|
+
schemaPath: [...schemaPath, 'contentSchema'],
|
|
1055
|
+
seen,
|
|
1056
|
+
dynamicScope: childScope,
|
|
1057
|
+
});
|
|
1058
|
+
if (content !== undefined) {
|
|
1059
|
+
seen.delete(targetValue);
|
|
1060
|
+
return cache(_schema, JSON.stringify(content), cacheKey, skipCache);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1031
1064
|
// Handle object types - check for properties to identify objects
|
|
1032
1065
|
if ('properties' in _schema || ('type' in _schema && _schema.type === 'object')) {
|
|
1033
1066
|
const result = handleObjectSchema(_schema, options, level, seen, cacheKey, schemaPath, dynamicScope);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { replaceVariables } from '@scalar/helpers/regex/replace-variables';
|
|
2
2
|
import { mergeUrls } from '@scalar/helpers/url/merge-urls';
|
|
3
|
-
import { getServerVariables } from '
|
|
3
|
+
import { getServerVariables } from './get-server-variables.js';
|
|
4
4
|
/**
|
|
5
5
|
* Resolves the full request URL by:
|
|
6
6
|
* 1. Applying OpenAPI server variables to the server URL template.
|
|
@@ -4,9 +4,9 @@ import type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/o
|
|
|
4
4
|
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.2/strict/operation';
|
|
5
5
|
import type { ReservedPathParameter } from '../../helpers/encode-path-parameter.js';
|
|
6
6
|
import { type QuerystringParameter } from '../../helpers/querystring-parameter.js';
|
|
7
|
-
import { type BuildRequestSecurityResult } from '
|
|
8
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
9
|
-
import type { RequestExampleMeta } from '
|
|
7
|
+
import { type BuildRequestSecurityResult } from './security/build-request-security.js';
|
|
8
|
+
import type { SecuritySchemeObjectSecret } from './security/secret-types.js';
|
|
9
|
+
import type { RequestExampleMeta } from '../types.js';
|
|
10
10
|
import { type RequestBody } from './body/build-request-body.js';
|
|
11
11
|
/**
|
|
12
12
|
* RequestFactory
|
|
@@ -3,8 +3,8 @@ import { isHttpMethod } from '@scalar/helpers/http/is-http-method';
|
|
|
3
3
|
import { replacePathVariables } from '@scalar/helpers/regex/replace-variables';
|
|
4
4
|
import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref';
|
|
5
5
|
import { getQuerystringParameter } from '../../helpers/querystring-parameter.js';
|
|
6
|
-
import { getServerVariables } from '
|
|
7
|
-
import { buildRequestSecurity, } from '
|
|
6
|
+
import { getServerVariables } from './helpers/get-server-variables.js';
|
|
7
|
+
import { buildRequestSecurity, } from './security/build-request-security.js';
|
|
8
8
|
import { filterDisabledDefaultHeaders } from '../context/headers.js';
|
|
9
9
|
import { buildRequestBody } from './body/build-request-body.js';
|
|
10
10
|
import { buildRequestParameters } from './header/build-request-parameters.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Result } from '@scalar/helpers/types/result';
|
|
2
|
-
import type { RequestFactory } from '
|
|
2
|
+
import type { RequestFactory } from './request-factory.js';
|
|
3
3
|
/**
|
|
4
4
|
* Discriminated error code when the merged request URL is not a complete absolute target
|
|
5
5
|
* (for example no OpenAPI server, or unresolved `{{environment}}` segments left in the merged URL).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AuthSecretField } from '../../../helpers/auth-secret-fields.js';
|
|
2
|
-
import type { EncryptionSchemeType, SaslSchemeType } from '
|
|
2
|
+
import type { EncryptionSchemeType, SaslSchemeType } from './broker-scheme-types.js';
|
|
3
3
|
import type { XScalarAuthUrl, XScalarCredentialsLocation, XScalarSecretClientCertificate, XScalarSecretClientId, XScalarSecretClientSecret, XScalarSecretHTTP, XScalarSecretPrivateKey, XScalarSecretRedirectUri, XScalarSecretRefreshToken, XScalarSecretServiceName, XScalarSecretToken, XScalarTokenUrl } from '../../../schemas/extensions/security/index.js';
|
|
4
4
|
import type { OAuthFlowAuthorizationCode, OAuthFlowClientCredentials, OAuthFlowDeviceAuthorization, OAuthFlowImplicit, OAuthFlowPassword } from '../../../schemas/v3.2/strict/oauth-flow.js';
|
|
5
5
|
import type { ApiKeyObject, HttpObject, MutualTlsObject, OAuth2Object, OpenIdConnectObject } from '../../../schemas/v3.2/strict/security-scheme.js';
|
|
@@ -2,10 +2,10 @@ import type { AuthenticationConfiguration } from '@scalar/types/api-reference';
|
|
|
2
2
|
import type { WorkspaceStore } from '../../client.js';
|
|
3
3
|
import type { SelectedSecurity } from '../../entities/auth/index.js';
|
|
4
4
|
import type { AuthMeta, ServerMeta } from '../../events/index.js';
|
|
5
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
6
|
-
import { type Layout } from '
|
|
7
|
-
import { type MergedSecuritySchemes } from '
|
|
8
|
-
import type { RequestExampleMeta, Result } from '
|
|
5
|
+
import type { SecuritySchemeObjectSecret } from '../builder/security/secret-types.js';
|
|
6
|
+
import { type Layout } from './proxy.js';
|
|
7
|
+
import { type MergedSecuritySchemes } from './security/merge-security.js';
|
|
8
|
+
import type { RequestExampleMeta, Result } from '../types.js';
|
|
9
9
|
import type { XScalarEnvironment } from '../../schemas/extensions/document/x-scalar-environments.js';
|
|
10
10
|
import type { XScalarCookie } from '../../schemas/extensions/general/x-scalar-cookies.js';
|
|
11
11
|
import type { OperationObject } from '../../schemas/v3.2/strict/operation.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { getPathItemOperation, getResolvedPathItem } from '../../helpers/for-each-path-item-operation.js';
|
|
2
2
|
import { getResolvedRef } from '../../helpers/get-resolved-ref.js';
|
|
3
|
-
import { getActiveEnvironment } from '
|
|
4
|
-
import { getDefaultHeaders } from '
|
|
5
|
-
import { combineParams } from '
|
|
6
|
-
import { getActiveProxyUrl } from '
|
|
7
|
-
import { getSecurityRequirements } from '
|
|
8
|
-
import { getSecuritySchemes } from '
|
|
9
|
-
import { getSelectedSecurity } from '
|
|
10
|
-
import { mergeSecurity } from '
|
|
11
|
-
import { getSelectedServer, getServers } from '
|
|
3
|
+
import { getActiveEnvironment } from './environment.js';
|
|
4
|
+
import { getDefaultHeaders } from './headers.js';
|
|
5
|
+
import { combineParams } from './helpers/combine-params.js';
|
|
6
|
+
import { getActiveProxyUrl } from './proxy.js';
|
|
7
|
+
import { getSecurityRequirements } from './security/get-security-requirements.js';
|
|
8
|
+
import { getSecuritySchemes } from './security/get-security-schemes.js';
|
|
9
|
+
import { getSelectedSecurity } from './security/get-selected-security.js';
|
|
10
|
+
import { mergeSecurity } from './security/merge-security.js';
|
|
11
|
+
import { getSelectedServer, getServers } from './servers.js';
|
|
12
12
|
import { isOpenApiDocument } from '../../schemas/type-guards.js';
|
|
13
13
|
export const getRequestExampleContext = (workspaceStore, documentName, requestExampleMeta, options = {}) => {
|
|
14
14
|
const { path, method, exampleName, isWebhook = false } = requestExampleMeta;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { canMethodHaveBody } from '@scalar/helpers/http/can-method-have-body';
|
|
2
2
|
import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref';
|
|
3
|
-
import { isParamDisabled } from '
|
|
4
|
-
import { getExample } from '
|
|
3
|
+
import { isParamDisabled } from '../builder/header/is-param-disabled.js';
|
|
4
|
+
import { getExample } from '../builder/helpers/get-example.js';
|
|
5
5
|
/** Default Accept header value to accept all response types. */
|
|
6
6
|
const DEFAULT_ACCEPT = '*/*';
|
|
7
7
|
const CONVENTIONAL_DEFAULT_HEADER_NAMES = {
|
|
@@ -2,7 +2,7 @@ import type { SecurityScheme } from '@scalar/types/entities';
|
|
|
2
2
|
import type { AuthStore } from '@scalar/workspace-store/entities/auth';
|
|
3
3
|
import type { DeepPartial } from '@scalar/workspace-store/helpers/overrides-proxy';
|
|
4
4
|
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
5
|
-
import type { BrokerApiKeyObject, EncryptionObjectSecret, SaslObjectSecret, SecuritySchemeObjectSecret } from '
|
|
5
|
+
import type { BrokerApiKeyObject, EncryptionObjectSecret, SaslObjectSecret, SecuritySchemeObjectSecret } from '../../builder/security/secret-types.js';
|
|
6
6
|
/** A combined scheme that includes both the auth store secrets and a deep partial of the config auth */
|
|
7
7
|
export type ConfigAuthScheme = SecuritySchemeObject & DeepPartial<SecurityScheme>;
|
|
8
8
|
type BrokerSchemeType = SaslObjectSecret['type'] | EncryptionObjectSecret['type'] | 'X509' | 'gssapi';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
2
|
-
import type { MergedSecuritySchemes } from '
|
|
1
|
+
import type { SecuritySchemeObjectSecret } from '../../builder/security/secret-types.js';
|
|
2
|
+
import type { MergedSecuritySchemes } from './merge-security.js';
|
|
3
3
|
import type { SecurityRequirementObject } from '../../../schemas/v3.2/strict/security-requirement.js';
|
|
4
4
|
/**
|
|
5
5
|
* Get the selected security schemes from security requirements.
|
|
@@ -2,7 +2,7 @@ import type { AuthenticationConfiguration } from '@scalar/types/api-reference';
|
|
|
2
2
|
import type { AsyncApiComponentsObject } from '@scalar/types/asyncapi/3.1';
|
|
3
3
|
import type { AuthStore } from '@scalar/workspace-store/entities/auth';
|
|
4
4
|
import { type ComponentsObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
5
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
5
|
+
import type { SecuritySchemeObjectSecret } from '../../builder/security/secret-types.js';
|
|
6
6
|
/** Document security merged with the config security schemes */
|
|
7
7
|
export type MergedSecuritySchemes = Record<string, SecuritySchemeObjectSecret>;
|
|
8
8
|
/**
|
|
@@ -6,7 +6,7 @@ import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref
|
|
|
6
6
|
import { mergeObjects } from '@scalar/workspace-store/helpers/merge-object';
|
|
7
7
|
import { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce';
|
|
8
8
|
import { SecuritySchemeObjectSchema, } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
9
|
-
import { isEncryptionSchemeType, isSaslSchemeType } from '
|
|
9
|
+
import { isEncryptionSchemeType, isSaslSchemeType } from '../../builder/security/broker-scheme-types.js';
|
|
10
10
|
import { extractSecuritySchemeSecrets } from './extract-security-scheme-secrets.js';
|
|
11
11
|
import { usesApiKeyNameOverride } from './uses-api-key-name-override.js';
|
|
12
12
|
const hasAvailableScopes = (flow) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VariablesStore } from '
|
|
1
|
+
import type { VariablesStore } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Creates an in-memory VariablesStore for a single request execution,
|
|
4
4
|
* managing environment, collection, global, and local variables in priority order.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type } from '@scalar/typebox';
|
|
2
2
|
import { array, intersection, object, optional, string } from '@scalar/validation';
|
|
3
|
-
import { compose } from '
|
|
4
|
-
import { XScalarOrder as XScalarOrderFields, XScalarOrderSchema, } from '
|
|
3
|
+
import { compose } from '../../compose.js';
|
|
4
|
+
import { XScalarOrder as XScalarOrderFields, XScalarOrderSchema, } from '../general/x-scalar-order.js';
|
|
5
5
|
const XTagGroupSchema = compose(Type.Object({
|
|
6
6
|
/**
|
|
7
7
|
* The group name.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DocumentAuth } from '../entities/auth/schema.js';
|
|
2
2
|
import type { DocumentHistory } from '../entities/history/schema.js';
|
|
3
|
-
import type { WorkspaceDocument, WorkspaceExtensions, WorkspaceMeta } from '
|
|
3
|
+
import type { WorkspaceDocument, WorkspaceExtensions, WorkspaceMeta } from './workspace.js';
|
|
4
4
|
export type InMemoryWorkspace = {
|
|
5
5
|
meta: WorkspaceMeta & WorkspaceExtensions;
|
|
6
6
|
documents: Record<string, WorkspaceDocument>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
2
|
import type { AsyncApiInfoObject } from '@scalar/types/asyncapi/3.1';
|
|
3
3
|
import type { LiteralUnion } from 'type-fest';
|
|
4
|
-
import type { ExternalDocumentationObject } from '
|
|
5
|
-
import type { InfoObject } from '
|
|
6
|
-
import type { OperationObject } from '
|
|
7
|
-
import type { SchemaObject } from '
|
|
8
|
-
import type { TagObject } from '
|
|
4
|
+
import type { ExternalDocumentationObject } from './v3.2/strict/external-documentation.js';
|
|
5
|
+
import type { InfoObject } from './v3.2/strict/info.js';
|
|
6
|
+
import type { OperationObject } from './v3.2/strict/operation.js';
|
|
7
|
+
import type { SchemaObject } from './v3.2/strict/schema.js';
|
|
8
|
+
import type { TagObject } from './v3.2/strict/tag.js';
|
|
9
9
|
/**
|
|
10
10
|
* An operation method, including document-defined extension methods.
|
|
11
11
|
* Known methods retain editor completion; the open string branch still requires
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@scalar/typebox';
|
|
2
|
-
import { compose } from '
|
|
3
|
-
import { ExternalDocumentationObjectRef, TraversedEntryObjectRef } from '
|
|
2
|
+
import { compose } from './compose.js';
|
|
3
|
+
import { ExternalDocumentationObjectRef, TraversedEntryObjectRef } from './v3.2/strict/ref-definitions.js';
|
|
4
4
|
export const NavigationBaseSchemaDefinition = Type.Object({
|
|
5
5
|
id: Type.String(),
|
|
6
6
|
title: Type.String(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RequiredDeep } from 'type-fest';
|
|
2
|
-
import type { ServerObject } from '
|
|
2
|
+
import type { ServerObject } from '../v3.2/strict/server.js';
|
|
3
3
|
export declare const SettingsSchema: import("@scalar/typebox").TObject<{
|
|
4
4
|
proxyUrl: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
5
5
|
searchKey: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from '@scalar/typebox';
|
|
2
|
-
import { ServerObjectSchema } from '
|
|
2
|
+
import { ServerObjectSchema } from '../v3.2/strict/openapi-document.js';
|
|
3
3
|
export const SettingsSchema = Type.Partial(Type.Object({
|
|
4
4
|
/** Custom proxy configuration */
|
|
5
5
|
proxyUrl: Type.String(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@scalar/typebox';
|
|
2
|
-
import { compose } from '
|
|
3
|
-
import { XDisabledSchema } from '
|
|
2
|
+
import { compose } from '../../compose.js';
|
|
3
|
+
import { XDisabledSchema } from '../../extensions/example/x-disabled.js';
|
|
4
4
|
/**
|
|
5
5
|
* An object grouping an internal or external example value with basic summary and description metadata. This object is typically used in fields named examples (plural), and is a referenceable alternative to older example (singular) fields that do not support referencing or metadata.
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from '@scalar/typebox';
|
|
2
|
-
import { compose } from '
|
|
2
|
+
import { compose } from '../../compose.js';
|
|
3
3
|
import { ExampleObjectRef, MediaTypeObjectRef, SchemaObjectRef } from './ref-definitions.js';
|
|
4
4
|
import { reference } from './reference.js';
|
|
5
5
|
const HeaderObjectSchemaBase = Type.Object({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type XScalarLinks } from '
|
|
2
|
-
import { type XScalarSdkInstallation } from '
|
|
1
|
+
import { type XScalarLinks } from '../../extensions/document/x-scalar-links.js';
|
|
2
|
+
import { type XScalarSdkInstallation } from '../../extensions/document/x-scalar-sdk-installation.js';
|
|
3
3
|
import type { ContactObject } from './contact.js';
|
|
4
4
|
import type { LicenseObject } from './license.js';
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type } from '@scalar/typebox';
|
|
2
|
-
import { compose } from '
|
|
3
|
-
import { XScalarLinksSchema } from '
|
|
4
|
-
import { XScalarSdkInstallationSchema, } from '
|
|
2
|
+
import { compose } from '../../compose.js';
|
|
3
|
+
import { XScalarLinksSchema } from '../../extensions/document/x-scalar-links.js';
|
|
4
|
+
import { XScalarSdkInstallationSchema, } from '../../extensions/document/x-scalar-sdk-installation.js';
|
|
5
5
|
import { ContactObjectRef, LicenseObjectRef } from './ref-definitions.js';
|
|
6
6
|
/**
|
|
7
7
|
* The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from '@scalar/typebox';
|
|
2
|
-
import { ServerObjectRef } from '
|
|
2
|
+
import { ServerObjectRef } from './ref-definitions.js';
|
|
3
3
|
/**
|
|
4
4
|
* The Link Object represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.
|
|
5
5
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type XScalarIgnore } from '
|
|
2
|
-
import { type XOrder } from '
|
|
3
|
-
import { type XScalarCredentialsLocation } from '
|
|
4
|
-
import { type XScalarSecurityBody } from '
|
|
5
|
-
import { type XScalarSecurityQuery } from '
|
|
6
|
-
import { type XScalarAuthUrl, type XScalarTokenUrl } from '
|
|
7
|
-
import { type XTokenName } from '
|
|
8
|
-
import { type XusePkce } from '
|
|
1
|
+
import { type XScalarIgnore } from '../../extensions/document/x-scalar-ignore.js';
|
|
2
|
+
import { type XOrder } from '../../extensions/schema/x-order.js';
|
|
3
|
+
import { type XScalarCredentialsLocation } from '../../extensions/security/x-scalar-credentials-location.js';
|
|
4
|
+
import { type XScalarSecurityBody } from '../../extensions/security/x-scalar-security-body.js';
|
|
5
|
+
import { type XScalarSecurityQuery } from '../../extensions/security/x-scalar-security-query.js';
|
|
6
|
+
import { type XScalarAuthUrl, type XScalarTokenUrl } from '../../extensions/security/x-scalar-security-secrets.js';
|
|
7
|
+
import { type XTokenName } from '../../extensions/security/x-tokenName.js';
|
|
8
|
+
import { type XusePkce } from '../../extensions/security/x-use-pkce.js';
|
|
9
9
|
/** Common properties used across all OAuth flows */
|
|
10
10
|
type OAuthFlowCommon = {
|
|
11
11
|
/** The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Type } from '@scalar/typebox';
|
|
2
|
-
import { compose } from '
|
|
3
|
-
import { XScalarIgnoreSchema } from '
|
|
4
|
-
import { XOrderSchema } from '
|
|
5
|
-
import { XScalarCredentialsLocationSchema, } from '
|
|
6
|
-
import { XScalarSecurityBodySchema, } from '
|
|
7
|
-
import { XScalarSecurityQuerySchema, } from '
|
|
8
|
-
import { XScalarAuthUrlSchema, XScalarTokenUrlSchema, } from '
|
|
9
|
-
import { XTokenNameSchema } from '
|
|
10
|
-
import { XusePkceSchema } from '
|
|
2
|
+
import { compose } from '../../compose.js';
|
|
3
|
+
import { XScalarIgnoreSchema } from '../../extensions/document/x-scalar-ignore.js';
|
|
4
|
+
import { XOrderSchema } from '../../extensions/schema/x-order.js';
|
|
5
|
+
import { XScalarCredentialsLocationSchema, } from '../../extensions/security/x-scalar-credentials-location.js';
|
|
6
|
+
import { XScalarSecurityBodySchema, } from '../../extensions/security/x-scalar-security-body.js';
|
|
7
|
+
import { XScalarSecurityQuerySchema, } from '../../extensions/security/x-scalar-security-query.js';
|
|
8
|
+
import { XScalarAuthUrlSchema, XScalarTokenUrlSchema, } from '../../extensions/security/x-scalar-security-secrets.js';
|
|
9
|
+
import { XTokenNameSchema } from '../../extensions/security/x-tokenName.js';
|
|
10
|
+
import { XusePkceSchema } from '../../extensions/security/x-use-pkce.js';
|
|
11
11
|
/** Common properties used across all OAuth flows */
|
|
12
12
|
const OAuthFlowCommonSchema = compose(Type.Object({
|
|
13
13
|
/** The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|