@redocly/api-docs 0.2.0-next.1 → 0.2.0-next.10
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/lib/RedocStandalone.d.ts +38 -0
- package/lib/RedocStandalone.js +1 -0
- package/lib/RedoclyApiDocs.js +1 -1
- package/lib/RedoclyApiDocsStandalone.d.ts +2 -0
- package/lib/RedoclyApiDocsStandalone.js +3 -3
- package/lib/adapters/asyncapi/build/navigation.js +1 -1
- package/lib/adapters/asyncapi/items/channel/content.js +1 -1
- package/lib/adapters/asyncapi/items/channel/item.js +1 -1
- package/lib/adapters/asyncapi/items/operation/item.js +1 -1
- package/lib/adapters/asyncapi/items/overview/content.js +1 -1
- package/lib/adapters/graphql/group/utils.js +1 -1
- package/lib/adapters/graphql/utils/createApiItem.js +1 -1
- package/lib/adapters/helpers.d.ts +3 -10
- package/lib/adapters/helpers.js +1 -1
- package/lib/adapters/openapi/build/context.js +1 -1
- package/lib/adapters/openapi/build-code-sample-source.d.ts +1 -1
- package/lib/adapters/openapi/build-code-sample-source.js +1 -1
- package/lib/adapters/openapi/configure/merge-utils.d.ts +1 -1
- package/lib/adapters/openapi/configure/resolve-request-values.js +1 -1
- package/lib/adapters/openapi/group/item.d.ts +0 -3
- package/lib/adapters/openapi/group/item.js +1 -1
- package/lib/adapters/openapi/index.js +1 -1
- package/lib/adapters/openapi/items/operation/content.js +1 -1
- package/lib/adapters/openapi/items/operation/item.d.ts +2 -2
- package/lib/adapters/openapi/items/operation/item.js +1 -1
- package/lib/adapters/openapi/items/overview/content.js +1 -1
- package/lib/adapters/openapi/items/schema/item.js +1 -1
- package/lib/adapters/openapi/store.js +1 -1
- package/lib/adapters/openapi/utils/merge-mock-server.d.ts +2 -2
- package/lib/adapters/rbac.d.ts +14 -0
- package/lib/adapters/rbac.js +1 -0
- package/lib/adapters/utils/descriptionToMarkdown.d.ts +6 -0
- package/lib/adapters/utils/descriptionToMarkdown.js +11 -0
- package/lib/adapters/utils/markdoc.d.ts +8 -1
- package/lib/adapters/utils/markdoc.js +1 -1
- package/lib/components/ErrorBoundary.d.ts +4 -2
- package/lib/components/ErrorBoundary.js +55 -1
- package/lib/components/Header/HeaderItem.js +5 -5
- package/lib/components/Header/HeaderPageActions.d.ts +4 -0
- package/lib/components/Header/HeaderPageActions.js +1 -0
- package/lib/components/Header/PageActions.d.ts +4 -0
- package/lib/components/Header/PageActions.js +11 -0
- package/lib/components/ItemContent/hooks.d.ts +12 -1
- package/lib/components/ItemContent/hooks.js +1 -1
- package/lib/components/ItemContent/sections/BodySection.js +3 -3
- package/lib/components/ItemContent/sections/CallbacksSection.js +4 -4
- package/lib/components/ItemContent/sections/MessagesSection.js +17 -17
- package/lib/components/ItemContent/sections/ResponsesSection.js +7 -7
- package/lib/components/Mcp/McpPrompt.js +1 -1
- package/lib/components/Mcp/McpTool.js +1 -1
- package/lib/components/Mcp/utils.d.ts +1 -1
- package/lib/components/Mcp/utils.js +1 -1
- package/lib/components/Schema/SchemaDescription.js +1 -1
- package/lib/components/Schema/styled.js +5 -5
- package/lib/components/Schema/views/ArrayRenderer.js +1 -1
- package/lib/components/Schema/views/CollapsibleNestedFields.js +1 -1
- package/lib/components/Schema/views/DiscriminatorPropertyRow.js +1 -1
- package/lib/components/Schema/views/Examples.js +1 -1
- package/lib/components/Schema/views/SwitcherRenderer.js +1 -1
- package/lib/components/Search/index.d.ts +15 -0
- package/lib/components/Search/index.js +1 -0
- package/lib/components/Security/SecurityFlowDetail.js +1 -1
- package/lib/components/Security/styled.js +7 -7
- package/lib/components/StickySidebar/FloatingButton.d.ts +1 -0
- package/lib/components/StickySidebar/FloatingButton.js +32 -0
- package/lib/components/StickySidebar/RedoclyAttributionLogo.d.ts +5 -0
- package/lib/components/StickySidebar/RedoclyAttributionLogo.js +1 -0
- package/lib/components/StickySidebar/StickySidebar.js +33 -9
- package/lib/components/common/Breadcrumbs.js +2 -2
- package/lib/components/common/DeepLinkAnchor.js +9 -9
- package/lib/components/common/PanelItem.js +5 -5
- package/lib/components/common/ResponseCodeTabs.js +1 -1
- package/lib/components/common/Tag.js +1 -1
- package/lib/components/common/VendorExtensions.js +1 -1
- package/lib/components/common/ViewNested.js +2 -2
- package/lib/components/graphql/GraphQLFieldView.js +1 -1
- package/lib/components/graphql/RequiresScopesModal.js +3 -3
- package/lib/components/graphql/sections/GraphQLArgsSection.js +1 -1
- package/lib/components/markdoc/SchemaDefinition.js +1 -1
- package/lib/components/markdoc/html/html-jsx-attribute-mapping.d.ts +5 -0
- package/lib/components/markdoc/html/html-jsx-attribute-mapping.js +1 -0
- package/lib/components/markdoc/html/process-html-tokens.d.ts +1 -0
- package/lib/components/markdoc/html/process-html-tokens.js +1 -0
- package/lib/components/markdoc/markdocParser.d.ts +2 -0
- package/lib/components/markdoc/markdocParser.js +1 -1
- package/lib/components/panels/ExampleItem/CallbackPayloadItem.js +2 -2
- package/lib/components/panels/ExampleItem/CodeSampleItem.js +1 -1
- package/lib/components/panels/ExampleItem/PayloadExampleItem.js +2 -2
- package/lib/components/panels/ExampleItem/ResponseExampleItem.js +1 -1
- package/lib/components/panels/ExampleItem/SecuritySchemeSelector.d.ts +9 -0
- package/lib/components/panels/ExampleItem/SecuritySchemeSelector.js +1 -0
- package/lib/components/panels/ExampleItem/ServerDropdown.js +2 -2
- package/lib/components/panels/ExampleItem/generate-request-sample.d.ts +28 -0
- package/lib/components/panels/ExampleItem/generate-request-sample.js +1 -0
- package/lib/components/panels/ExampleItem/selectors.d.ts +5 -2
- package/lib/components/panels/ExampleItem/selectors.js +1 -1
- package/lib/components/panels/ExampleItem/styled.d.ts +2 -49
- package/lib/components/panels/ExampleItem/styled.js +11 -5
- package/lib/components/panels/ExampleItem/useActiveServer.d.ts +17 -0
- package/lib/components/panels/ExampleItem/useActiveServer.js +1 -0
- package/lib/components/panels/ExampleItem/useCodeSampleLanguages.d.ts +23 -0
- package/lib/components/panels/ExampleItem/useCodeSampleLanguages.js +1 -0
- package/lib/components/panels/ExampleItem/useReplayRequestState.d.ts +18 -0
- package/lib/components/panels/ExampleItem/useReplayRequestState.js +1 -0
- package/lib/components/panels/ExampleItem/useTryItFooter.d.ts +3 -0
- package/lib/components/panels/ExampleItem/useTryItFooter.js +7 -0
- package/lib/components/panels/GroupPanelItem.js +1 -1
- package/lib/components/panels/LanguageItem/LanguagePanelItem.js +5 -1
- package/lib/components/panels/LanguageItem/styled.js +17 -14
- package/lib/components/panels/McpExamplePanelItem.js +2 -2
- package/lib/components/panels/McpPanelItem.js +2 -2
- package/lib/components/panels/ServerItem/ServerItem.js +1 -1
- package/lib/components/panels/asyncapi/BrokerItem/BrokerModal.js +1 -1
- package/lib/components/panels/asyncapi/BrokerItem/BrokerPanelItem.js +1 -1
- package/lib/components/panels/asyncapi/MessageBindingItem/MessageBindingItem.js +1 -1
- package/lib/components/panels/shared-panel-styles.js +1 -1
- package/lib/components/panels/styled.js +1 -1
- package/lib/components/pluggable/RedocExample.js +5 -2
- package/lib/components/pluggable/RedocResponseSamples.js +1 -1
- package/lib/hoc/withLicenseGate.d.ts +5 -0
- package/lib/hoc/withLicenseGate.js +1 -0
- package/lib/hoc/withRouter.js +1 -1
- package/lib/hoc/withStoreProvider.d.ts +2 -0
- package/lib/hoc/withStoreProvider.js +1 -1
- package/lib/hooks/deepLinkHash.d.ts +5 -0
- package/lib/hooks/deepLinkHash.js +1 -0
- package/lib/hooks/useApiDocsScroll.js +1 -1
- package/lib/hooks/useCopySpecSlice.d.ts +9 -0
- package/lib/hooks/useCopySpecSlice.js +1 -0
- package/lib/hooks/useDeepLinkSection.js +1 -1
- package/lib/hooks/useInitialTelemetry.d.ts +2 -0
- package/lib/hooks/useInitialTelemetry.js +1 -0
- package/lib/hooks/useLicense.js +1 -1
- package/lib/hooks/useLicenseGate.d.ts +6 -0
- package/lib/hooks/useLicenseGate.js +1 -0
- package/lib/hooks/useRouterHashBridge.d.ts +4 -0
- package/lib/hooks/useRouterHashBridge.js +1 -1
- package/lib/hooks/useScrollSpyUrlSync.js +1 -1
- package/lib/hooks/useUrlHash.d.ts +3 -2
- package/lib/hooks/useUrlHash.js +1 -1
- package/lib/hooks/useUrlHashReassert.d.ts +2 -0
- package/lib/hooks/useUrlHashReassert.js +1 -0
- package/lib/index.d.ts +5 -1
- package/lib/index.js +1 -1
- package/lib/jotai/app.d.ts +6 -0
- package/lib/jotai/app.js +1 -1
- package/lib/jotai/examples.js +1 -1
- package/lib/jotai/itemStore.d.ts +1 -0
- package/lib/jotai/itemStore.js +1 -1
- package/lib/jotai/store.d.ts +4 -0
- package/lib/jotai/store.js +1 -1
- package/lib/options/editionOverrides.d.ts +3 -0
- package/lib/options/editionOverrides.js +1 -0
- package/lib/options/helpers.d.ts +1 -2
- package/lib/options/helpers.js +1 -1
- package/lib/options/normalizeOptions.d.ts +1 -1
- package/lib/options/normalizeOptions.js +1 -1
- package/lib/options/standaloneLayoutVars.d.ts +3 -0
- package/lib/options/standaloneLayoutVars.js +1 -0
- package/lib/otel-semantic-conventions.d.ts +10 -0
- package/lib/otel-semantic-conventions.js +1 -0
- package/lib/pages/ItemPage.js +4 -2
- package/lib/pages/NotFoundPage.js +40 -1
- package/lib/services/code-samples/apply-env-variables.d.ts +8 -0
- package/lib/services/code-samples/apply-env-variables.js +1 -0
- package/lib/services/code-samples/builder.d.ts +8 -5
- package/lib/services/code-samples/builder.js +1 -1
- package/lib/services/code-samples/discriminator.d.ts +16 -10
- package/lib/services/code-samples/discriminator.js +1 -1
- package/lib/services/code-samples/generators/java8.js +2 -2
- package/lib/services/code-samples/language-availability.d.ts +4 -0
- package/lib/services/code-samples/language-availability.js +1 -0
- package/lib/services/code-samples/{replay/normalize-servers.d.ts → normalize-servers.d.ts} +1 -1
- package/lib/services/code-samples/normalize-servers.js +1 -0
- package/lib/services/code-samples/replay/embedded-replay-converter.d.ts +1 -1
- package/lib/services/code-samples/replay/embedded-replay-converter.js +1 -1
- package/lib/services/code-samples/replay/find-operation.d.ts +17 -0
- package/lib/services/code-samples/replay/find-operation.js +1 -0
- package/lib/services/code-samples/replay/from-openapi-document.d.ts +12 -2
- package/lib/services/code-samples/replay/from-openapi-document.js +1 -1
- package/lib/services/code-samples/replay/index.d.ts +1 -1
- package/lib/services/code-samples/replay/index.js +1 -1
- package/lib/services/code-samples/replay/overlay-converter.js +1 -1
- package/lib/services/code-samples/replay/parameter-descriptions.d.ts +7 -0
- package/lib/services/code-samples/replay/parameter-descriptions.js +1 -0
- package/lib/services/code-samples/replay/replay-adapter.d.ts +1 -1
- package/lib/services/code-samples/replay/replay-adapter.js +1 -1
- package/lib/services/code-samples/replay/replay-handler.js +1 -1
- package/lib/services/code-samples/replay/replay-predefined-env.d.ts +1 -2
- package/lib/services/code-samples/replay/replay-predefined-env.js +1 -1
- package/lib/services/code-samples/replay/schema-declared-value.d.ts +2 -0
- package/lib/services/code-samples/replay/schema-declared-value.js +1 -0
- package/lib/services/code-samples/resolvers.js +1 -1
- package/lib/services/code-samples/server-env.d.ts +3 -0
- package/lib/services/code-samples/server-env.js +1 -0
- package/lib/services/code-samples/source.d.ts +3 -3
- package/lib/services/license/check.d.ts +1 -0
- package/lib/services/license/check.js +1 -1
- package/lib/services/operation-samples/index.js +1 -1
- package/lib/services/schema/dialects/jsonSchema.d.ts +5 -1
- package/lib/services/schema/dialects/jsonSchema.js +1 -1
- package/lib/services/schema/propertyTreeBuilder.js +1 -1
- package/lib/services/search/index.d.ts +2 -0
- package/lib/services/search/index.js +1 -0
- package/lib/services/search/indexer/context.d.ts +8 -0
- package/lib/services/search/indexer/context.js +0 -0
- package/lib/services/search/indexer/deep-links.d.ts +12 -0
- package/lib/services/search/indexer/deep-links.js +1 -0
- package/lib/services/search/indexer/extractors/asyncapi.d.ts +8 -0
- package/lib/services/search/indexer/extractors/asyncapi.js +1 -0
- package/lib/services/search/indexer/extractors/body.d.ts +2 -0
- package/lib/services/search/indexer/extractors/body.js +1 -0
- package/lib/services/search/indexer/extractors/callbacks.d.ts +4 -0
- package/lib/services/search/indexer/extractors/callbacks.js +1 -0
- package/lib/services/search/indexer/extractors/context.d.ts +25 -0
- package/lib/services/search/indexer/extractors/context.js +1 -0
- package/lib/services/search/indexer/extractors/examples.d.ts +3 -0
- package/lib/services/search/indexer/extractors/examples.js +1 -0
- package/lib/services/search/indexer/extractors/graphql.d.ts +2 -0
- package/lib/services/search/indexer/extractors/graphql.js +1 -0
- package/lib/services/search/indexer/extractors/heading-sections.d.ts +3 -0
- package/lib/services/search/indexer/extractors/heading-sections.js +1 -0
- package/lib/services/search/indexer/extractors/index.d.ts +12 -0
- package/lib/services/search/indexer/extractors/index.js +1 -0
- package/lib/services/search/indexer/extractors/mcp.d.ts +9 -0
- package/lib/services/search/indexer/extractors/mcp.js +1 -0
- package/lib/services/search/indexer/extractors/named-rows.d.ts +9 -0
- package/lib/services/search/indexer/extractors/named-rows.js +1 -0
- package/lib/services/search/indexer/extractors/panels.d.ts +10 -0
- package/lib/services/search/indexer/extractors/panels.js +1 -0
- package/lib/services/search/indexer/extractors/parameters.d.ts +2 -0
- package/lib/services/search/indexer/extractors/parameters.js +1 -0
- package/lib/services/search/indexer/extractors/responses.d.ts +2 -0
- package/lib/services/search/indexer/extractors/responses.js +1 -0
- package/lib/services/search/indexer/extractors/schema-page.d.ts +9 -0
- package/lib/services/search/indexer/extractors/schema-page.js +1 -0
- package/lib/services/search/indexer/extractors/security.d.ts +4 -0
- package/lib/services/search/indexer/extractors/security.js +1 -0
- package/lib/services/search/indexer/index.d.ts +14 -0
- package/lib/services/search/indexer/index.js +1 -0
- package/lib/services/search/indexer/param.d.ts +7 -0
- package/lib/services/search/indexer/param.js +1 -0
- package/lib/services/search/indexer/places.d.ts +40 -0
- package/lib/services/search/indexer/places.js +1 -0
- package/lib/services/search/indexer/schema-walker.d.ts +29 -0
- package/lib/services/search/indexer/schema-walker.js +1 -0
- package/lib/services/search/indexer/text.d.ts +2 -0
- package/lib/services/search/indexer/text.js +1 -0
- package/lib/services/search/types.d.ts +28 -0
- package/lib/services/search/types.js +0 -0
- package/lib/services/spec-slice/assistant-links.d.ts +9 -0
- package/lib/services/spec-slice/assistant-links.js +5 -0
- package/lib/services/spec-slice/asyncapi-slice.d.ts +5 -0
- package/lib/services/spec-slice/asyncapi-slice.js +1 -0
- package/lib/services/spec-slice/clone-strip.d.ts +1 -0
- package/lib/services/spec-slice/clone-strip.js +1 -0
- package/lib/services/spec-slice/component-closure.d.ts +6 -0
- package/lib/services/spec-slice/component-closure.js +1 -0
- package/lib/services/spec-slice/graphql-slice.d.ts +2 -0
- package/lib/services/spec-slice/graphql-slice.js +1 -0
- package/lib/services/spec-slice/index.d.ts +6 -0
- package/lib/services/spec-slice/index.js +1 -0
- package/lib/services/spec-slice/openapi-slice.d.ts +6 -0
- package/lib/services/spec-slice/openapi-slice.js +1 -0
- package/lib/services/spec-slice/resolve-scope.d.ts +4 -0
- package/lib/services/spec-slice/resolve-scope.js +1 -0
- package/lib/services/spec-slice/types.d.ts +37 -0
- package/lib/services/spec-slice/types.js +0 -0
- package/lib/standalone.d.ts +19 -0
- package/lib/standalone.js +2 -0
- package/lib/standaloneThemeConfig.d.ts +3 -0
- package/lib/standaloneThemeConfig.js +1 -0
- package/lib/telemetry/RedocTelemetry.d.ts +3 -0
- package/lib/telemetry/RedocTelemetry.js +1 -1
- package/lib/telemetry/defaults.d.ts +2 -0
- package/lib/telemetry/defaults.js +1 -0
- package/lib/types/asyncapi.d.ts +2 -1
- package/lib/types/code-samples-config.d.ts +68 -0
- package/lib/types/code-samples-config.js +0 -0
- package/lib/types/common.d.ts +1 -2
- package/lib/types/content.d.ts +6 -4
- package/lib/types/edition-config.d.ts +4 -0
- package/lib/types/edition-config.js +0 -0
- package/lib/types/events.d.ts +2 -2
- package/lib/types/openapi.d.ts +3 -3
- package/lib/types/options.d.ts +24 -88
- package/lib/types/store.d.ts +3 -2
- package/lib/url-compat.d.ts +22 -0
- package/lib/url-compat.js +1 -0
- package/lib/utils/compose.d.ts +1 -0
- package/lib/utils/deep-link.d.ts +2 -1
- package/lib/utils/deep-link.js +1 -1
- package/lib/utils/extract-extensions.js +1 -1
- package/lib/utils/graphql-parse.d.ts +1 -0
- package/lib/utils/graphql-parse.js +1 -0
- package/lib/utils/scroll-anchoring.d.ts +2 -1
- package/lib/utils/x-logo.d.ts +13 -0
- package/lib/utils/x-logo.js +1 -0
- package/lib/yaml-compat.d.ts +7 -0
- package/lib/yaml-compat.js +1 -0
- package/package.json +36 -15
- package/lib/services/code-samples/replay/normalize-servers.js +0 -1
|
@@ -3,4 +3,4 @@ import type { ApiDocsOptions } from '../../../types/options.js';
|
|
|
3
3
|
import type { ExampleEntry } from '../../../types/store.js';
|
|
4
4
|
import type { CodeSampleSource } from '../source.js';
|
|
5
5
|
import type { HARBuildResolvers } from '../builder.js';
|
|
6
|
-
export declare function createEmbeddedReplayConvertOperation(operationSourceMap: Map<string, CodeSampleSource>, resolvers: HARBuildResolvers, options: ApiDocsOptions, exampleStore: Record<string, ExampleEntry>, requestValues: Record<string, unknown>, activeMimeName?: string): (path: string, method: string) => ReplayNormalizedOpenAPIOperation | undefined;
|
|
6
|
+
export declare function createEmbeddedReplayConvertOperation(operationSourceMap: Map<string, CodeSampleSource>, resolvers: HARBuildResolvers, options: ApiDocsOptions, exampleStore: Record<string, ExampleEntry>, requestValues: Record<string, unknown>, activeMimeName?: string): (path: string, method: string, document?: unknown) => ReplayNormalizedOpenAPIOperation | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerExample as
|
|
1
|
+
import{registerExample as b}from"../../../adapters/helpers.js";import{appendUndeclaredConfigureParameters as g,mergeConfigureIntoSourceForReplay as h,pickRuntimeConfigureRequestValues as k}from"./merge-configure-into-source.js";import{toReplayOperation as B}from"./replay-adapter.js";function R(e){const o={};return e.path&&typeof e.path=="object"&&(o.path=e.path),e.query&&typeof e.query=="object"&&(o.query=e.query),e.header&&typeof e.header=="object"&&(o.headers=e.header),e.cookie&&typeof e.cookie=="object"&&(o.cookie=e.cookie),o}function j(e,o,t,y){if(o===void 0||!e.requestBody||Object.keys(e.requestBody).length===0)return e;const n=t&&e.requestBody[t]?t:Object.keys(e.requestBody)[0],i=e.requestBody[n];if(!i)return e;const p=b(y,{value:o,summary:void 0});return{...e,requestBody:{...e.requestBody,[n]:{...i,exampleIds:[p]}}}}function E(e,o,t,y,n,i){const p=R(n),c=n.body,f=k(t,p);return(m,a,u)=>{try{const r=e.get(`${a.toLowerCase()}:${m}`);if(!r)return;let d=f?h(r,f):r;return f&&(d=g(d,f)),c!==void 0&&(d=j(d,c,i,y)),B(d,o,u)}catch(r){console.error("[Replay] embedded convertOperationToReplayValue error:",r);return}}}export{E as createEmbeddedReplayConvertOperation};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { OpenAPIDefinition, OpenAPIOperation as OpenAPISpecOperation, OpenAPIPath } from '../../../types/openapi.js';
|
|
2
|
+
/**
|
|
3
|
+
* Follows a `$ref` chain, dropping the `$ref` as it goes so nested references resolve. Keys sitting
|
|
4
|
+
* next to a `$ref` override what it points at, as the docs page renders them.
|
|
5
|
+
*/
|
|
6
|
+
export declare function derefWithSiblings(doc: OpenAPIDefinition, value: Record<string, unknown>): Record<string, unknown>;
|
|
7
|
+
export type DocumentOperation = {
|
|
8
|
+
operation: OpenAPISpecOperation;
|
|
9
|
+
pathItem: OpenAPIPath;
|
|
10
|
+
resolvedMethodKey: string;
|
|
11
|
+
isAdditionalOperation: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Locates an operation in a raw OpenAPI document, covering the `query` verb (`x-query`) and
|
|
15
|
+
* `additionalOperations` alongside the standard methods.
|
|
16
|
+
*/
|
|
17
|
+
export declare function findOperationInDocument(doc: OpenAPIDefinition, pathName: string, method: string): DocumentOperation | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isRecord as l,resolveRef as h,toRecord as b}from"../../../adapters/helpers.js";function w(a,d){const i=b(a),o=new Set;let e=d;for(;typeof e.$ref=="string"&&!o.has(e.$ref);){o.add(e.$ref);const t=h(i,e);if(!l(t))break;const{$ref:r,...s}=e;e={...t,...s}}return e}function q(a,d,i){const o=a.paths;if(!o||typeof o!="object")return;const e=o[d];if(!l(e))return;const t=w(a,e),r=i.toLowerCase(),s=t;let f=r,n=s[r],u=!1;if(!n&&r==="query"&&s["x-query"]&&(n=s["x-query"],f="x-query"),!n&&r!=="query"&&t.additionalOperations){const c=t.additionalOperations,p=i in c?i:Object.keys(c).find(y=>y.toLowerCase()===r);p&&(n=c[p],f=p,u=!0)}if(!(!n||typeof n!="object"))return{operation:n,pathItem:t,resolvedMethodKey:f,isAdditionalOperation:u}}export{w as derefWithSiblings,q as findOperationInDocument};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Referenced } from '../../../types/common.js';
|
|
2
|
+
import type { OperationInfo, OpenAPIParameter } from '../../../types/openapi.js';
|
|
3
|
+
import type { ApiDocsOptions, RawApiDocsOptions } from '../../../types/options.js';
|
|
3
4
|
import type { StoreContext } from '../../../types/store.js';
|
|
4
5
|
import type { CodeSampleSource } from '../source.js';
|
|
6
|
+
import type { ReplayNormalizedOpenAPIOperation } from './replay-types.js';
|
|
5
7
|
import type { OpenAPIDefinition } from '../../../types/openapi.js';
|
|
8
|
+
/** Operation parameters with the path-level ones appended, minus those the operation overrides. */
|
|
9
|
+
export declare function mergeParametersForReplay(pathParams: Referenced<OpenAPIParameter>[], operationParams: Referenced<OpenAPIParameter>[] | undefined): Referenced<OpenAPIParameter>[] | undefined;
|
|
6
10
|
/** Hook to apply adapter-time `configure()` results to a fallback-built `OperationInfo`. */
|
|
7
11
|
export type ApplyConfigureToOperationInfo = (operationInfo: OperationInfo, storeCtx: StoreContext, doc: OpenAPIDefinition) => void;
|
|
8
12
|
/**
|
|
@@ -10,3 +14,9 @@ export type ApplyConfigureToOperationInfo = (operationInfo: OperationInfo, store
|
|
|
10
14
|
* Fallback path used by the Replay overlay when the prebuilt source map misses.
|
|
11
15
|
*/
|
|
12
16
|
export declare function buildCodeSampleSourceFromDocument(pathName: string, method: string, doc: OpenAPIDefinition, options: ApiDocsOptions, applyConfigure?: ApplyConfigureToOperationInfo): CodeSampleSource | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Build a Replay `convertOperationToReplayValue` for hosts that have no api-docs store —
|
|
19
|
+
* the standalone Replay desktop app. Resolvers are read back from the store context that
|
|
20
|
+
* {@link buildCodeSampleSourceFromDocument} just populated, so schema and example ids match.
|
|
21
|
+
*/
|
|
22
|
+
export declare function createDocumentReplayConverter(rawOptions: RawApiDocsOptions): (path: string, method: string, document: unknown) => ReplayNormalizedOpenAPIOperation | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createStoreContext as
|
|
1
|
+
import{createStoreContext as y,toRecord as S}from"../../../adapters/helpers.js";import{populateOpenApiStore as x}from"../../../adapters/openapi/store.js";import{buildCodeSampleSource as C}from"../../../adapters/openapi/build-code-sample-source.js";import{normalizeOptions as h}from"../../../options/normalizeOptions.js";import{createCodeSampleResolvers as g}from"../resolvers.js";import{findOperationInDocument as v}from"./find-operation.js";import{toReplayOperation as $}from"./replay-adapter.js";function O(e,t){if(!e.length)return t;if(!t?.length)return e;const n=new Set(t.map(s=>{const o=s;return`${o.in}:${o.name}`})),i=[...t];for(const s of e){const o=s,r=`${o.in}:${o.name}`;n.has(r)||i.push(s)}return i}let u=null;function d(e,t){if(u?.doc===e)return u.ctx;const n=y(S(e));return x(e,n,t),u={doc:e,ctx:n},n}function R(e,t,n,i,s){const o=v(n,e,t);if(!o)return;const{operation:r,pathItem:p,resolvedMethodKey:a,isAdditionalOperation:c}=o,l=p.parameters??[],m={pointer:c?`/paths/${e}/additionalOperations/${a}`:`/paths/${e}/${a}`,pathName:e,httpVerb:t.toUpperCase(),operationId:r.operationId,summary:typeof r.summary=="string"?r.summary:void 0,isWebhook:!1,isAdditionalOperation:c,tags:[],parameters:O(l,r.parameters),requestBody:r.requestBody,servers:r.servers??p.servers,security:r.security},f=d(n,i);return s?.(m,f,n),C(m,f,i.ignoreNamedSchemas,void 0,void 0,i)}function F(e){const t=h(e);return(n,i,s)=>{if(!s||typeof s!="object")return;const o=s;try{const r=R(n,i,o,t);if(!r)return;const p=d(o,t);return $(r,g(p.schemaStore,p.exampleStore,t),o)}catch(r){console.error("[Replay] createDocumentReplayConverter error:",r);return}}}export{R as buildCodeSampleSourceFromDocument,F as createDocumentReplayConverter,O as mergeParametersForReplay};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { buildCodeSampleSourceFromDocument } from './from-openapi-document.js';
|
|
1
|
+
export { buildCodeSampleSourceFromDocument, createDocumentReplayConverter, } from './from-openapi-document.js';
|
|
2
2
|
export { REPLAY_TRY_IT_LOADING_STATE, type ReplayTryItLoadingState, } from '../constants/try-it-loading-state.js';
|
|
3
3
|
export { createReplayOverlayConverter } from './overlay-converter.js';
|
|
4
4
|
export { createReplayConverter, toReplayOperation } from './replay-adapter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildCodeSampleSourceFromDocument as o}from"./from-openapi-document.js";import{REPLAY_TRY_IT_LOADING_STATE as
|
|
1
|
+
import{buildCodeSampleSourceFromDocument as o,createDocumentReplayConverter as a}from"./from-openapi-document.js";import{REPLAY_TRY_IT_LOADING_STATE as t}from"../constants/try-it-loading-state.js";import{createReplayOverlayConverter as l}from"./overlay-converter.js";import{createReplayConverter as R,toReplayOperation as f}from"./replay-adapter.js";import{handleReplayParamChange as y}from"./replay-handler.js";import{pickRuntimeConfigureRequestValues as c}from"./merge-configure-into-source.js";import{ReplayCodeSampleHTTPSnippet as T,replayHarToCodeSampleHar as i}from"./har-to-code-sample-har.js";export{t as REPLAY_TRY_IT_LOADING_STATE,T as ReplayCodeSampleHTTPSnippet,o as buildCodeSampleSourceFromDocument,a as createDocumentReplayConverter,R as createReplayConverter,l as createReplayOverlayConverter,y as handleReplayParamChange,c as pickRuntimeConfigureRequestValues,i as replayHarToCodeSampleHar,f as toReplayOperation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildCodeSampleSourceFromDocument as
|
|
1
|
+
import{buildCodeSampleSourceFromDocument as S}from"./from-openapi-document.js";import{mergeConfigureIntoSourceForReplay as v,pickRuntimeConfigureRequestValues as C}from"./merge-configure-into-source.js";import{createReplayConverter as R,toReplayOperation as b}from"./replay-adapter.js";import{applyRequestValuesToOperationInfo as k}from"../../../adapters/openapi/configure/apply-request-values.js";import{mergeInMockServer as O,pickOperationServers as q}from"../../../adapters/openapi/utils/merge-mock-server.js";import{openApiContext as w}from"../../../adapters/openapi/buildContext.js";function x(c,u,n){return{storeCtx:c,document:u,options:n,basePath:"/",downloadUrls:[],tagsMap:new Map,collectedTagOrder:[],badgeTags:[],processContent:!0}}function A(c,u,n,f,m,l){const p=C(n,f),s=p?r=>v(r,p,m):void 0,d=l?(r,a,e)=>{const t=l(r,e);if(!t||Object.keys(t).length===0)return;const i=q(r.servers,e.servers).filter(y=>typeof y?.url=="string"),o=O(i,n.mockServer);w.run(x(a,e,n),()=>k(r,t,o))}:void 0,g=R(c,u,s);return(r,a,e)=>{try{const o=g(r,a,e);if(o)return o}catch(o){console.error("[Replay] createReplayConverter error:",o)}if(!e||typeof e!="object")return;const t=S(r,a,e,n,d);if(!t)return;const i=s?s(t):t;return b(i,u,e)}}export{A as createReplayOverlayConverter};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameter descriptions for one operation, keyed `${in}:${name}`, as markdown source.
|
|
3
|
+
*
|
|
4
|
+
* Read straight from the document Replay already holds rather than carried through
|
|
5
|
+
* `CodeSampleSource`, which the server ships with every operation item.
|
|
6
|
+
*/
|
|
7
|
+
export declare function collectParameterDescriptions(document: unknown, path: string, method: string): Map<string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isRecord as p}from"../../../adapters/helpers.js";import{descriptionToMarkdown as l}from"../../../adapters/utils/descriptionToMarkdown.js";import{derefWithSiblings as g,findOperationInDocument as h}from"./find-operation.js";function I(r,m,d){const n=new Map;if(!p(r))return n;const e=r,o=h(e,m,d);if(!o)return n;const u=[...o.operation.parameters??[],...o.pathItem.parameters??[]],i=new Set;for(const s of u){if(!p(s))continue;const{name:c,in:a,description:w}=g(e,s);if(typeof c!="string"||typeof a!="string")continue;const t=`${a}:${c}`;if(i.has(t))continue;i.add(t);const f=l(w);f&&n.set(t,f)}return n}export{I as collectParameterDescriptions};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReplayNormalizedOpenAPIOperation } from './replay-types.js';
|
|
2
2
|
import type { CodeSampleSource } from '../source.js';
|
|
3
3
|
import type { HARBuildResolvers } from '../builder.js';
|
|
4
|
-
export declare function toReplayOperation(source: CodeSampleSource, resolvers: HARBuildResolvers): ReplayNormalizedOpenAPIOperation;
|
|
4
|
+
export declare function toReplayOperation(source: CodeSampleSource, resolvers: HARBuildResolvers, document?: unknown): ReplayNormalizedOpenAPIOperation;
|
|
5
5
|
export declare function createReplayConverter(operationSourceMap: Map<string, CodeSampleSource>, resolvers: HARBuildResolvers, augmentSource?: (source: CodeSampleSource) => CodeSampleSource): (path: string, method: string, openAPI: unknown) => ReplayNormalizedOpenAPIOperation | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isRecord as
|
|
1
|
+
import{isRecord as g}from"../../../adapters/helpers.js";import{humanizeConstraints as O}from"../../schema/propertyBuilder.js";import{collectParameterDescriptions as I}from"./parameter-descriptions.js";import{descriptionToMarkdown as b}from"../../../adapters/utils/descriptionToMarkdown.js";import{isMarkdocAst as v}from"../../../adapters/utils/markdoc.js";import{mergeBodyValue as R}from"../../../adapters/openapi/configure/merge-utils.js";import{mapToReplayServers as j}from"./map-servers.js";import{pickDeclaredSchemaValue as q}from"./schema-declared-value.js";function S(e){return e.startsWith("#/")?e.slice(2):e}const k="#/components/schemas/";function w(e,r){if(!e)return;const i=Object.create(null),t=new Set,n=[],a=new Map;function l(s){if(!g(s)&&!Array.isArray(s))return s;const u=a.get(s);if(a.has(s))return u===void 0?s:u;a.set(s,void 0);const o=Array.isArray(s)?p(s):f(s);return a.set(s,o),o}function p(s){let u=!1;const o=s.map(m=>{const c=l(m);return c!==m&&(u=!0),c});return u?o:s}function f(s){const u=s.$ref;if(typeof u=="string"&&u.startsWith(k)){const m=u.slice(k.length);return t.has(m)||(t.add(m),n.push({name:m,ref:u})),s}let o=s;for(const[m,c]of Object.entries(s)){const y=m==="description"&&v(c)?b(c):l(c);y!==c&&(o===s&&(o={...s}),o[m]=y)}return o}const d=l(e);for(;n.length;){const{name:s,ref:u}=n.pop(),o=r.resolveSchema(S(u));o&&(i[s]=l(o))}return Object.keys(i).length>0?{...d,components:{schemas:i}}:d}function T(e,r){const i={},t=e.discriminator;if(t?.propertyName&&t.mapping){const a=t.propertyName;for(const[l,p]of Object.entries(t.mapping)){if(typeof p!="string")continue;const f=r.resolveSchema(S(p));if(!f)continue;const d=r.sampleFromSchema(f,{skipReadOnly:!0});d!=null&&(g(d)&&(d[a]=l),i[l]={value:d})}if(Object.keys(i).length>0)return i}if(Array.isArray(e.oneOf)&&e.oneOf.length>0){const a=e.oneOf;for(let l=0;l<a.length;l++){const p=a[l];let f;if(g(p)&&(f=p,typeof p.$ref=="string"&&(f=r.resolveSchema(S(p.$ref))??p)),!f)continue;const d=r.sampleFromSchema(f,{skipReadOnly:!0});if(d==null)continue;const s=typeof f.title=="string"?f.title:`option ${l+1}`;i[s]={value:d}}if(Object.keys(i).length>0)return i}const n=r.sampleFromSchema(e,{skipReadOnly:!0});return n!=null&&(i.default={value:n}),i}function $(e,r,i){const t={};if(e.exampleIds?.length)for(const n of e.exampleIds){const a=r.resolveExample(n);a&&(t[n]={value:a.value,summary:a.summary})}if(Object.keys(t).length===0&&e.schemaId){const n=r.resolveSchema(e.schemaId);n&&Object.assign(t,T(n,r))}if(i!==void 0)if(Object.keys(t).length===0)t.default={value:i};else for(const n of Object.keys(t)){const a=t[n];t[n]={...a,value:R(a.value,i)}}return t}function A(e,r,i){const t=[],n=I(i,e.path,e.method),a=(o,m)=>{for(const c of o){const y=c.example??q(c.schemaId?r.resolveSchema(c.schemaId):void 0);let x;if(c.schemaId){const h=r.resolveSchema(c.schemaId);h&&(x={typePrefix:"",title:h.title??c.name,displayType:h.type??"string",displayFormat:h.format,constraints:O(h),enum:h.enum??void 0})}t.push({name:c.name,in:m,required:c.required??!1,description:n.get(`${m}:${c.name}`),example:y!=null?String(y):void 0,schema:x})}};a(e.parameters.path,"path"),a(e.parameters.query,"query"),a(e.parameters.header,"header"),a(e.parameters.cookie,"cookie");for(const o of e.parameters.querystring)t.push(C(o,r,n.get(`querystring:${o.name}`)));const l=j(e.servers),p=e.security.map(o=>o.schemes.map(m=>P(m,o.scopes)));let f;if(e.requestBody){const o=e.requestValues?.body,m={};for(const[c,y]of Object.entries(e.requestBody)){const x=$(y,r,o);m[c]={name:c,examples:Object.keys(x).length>0?x:void 0,schema:y.schemaId?w(r.resolveSchema(y.schemaId),r):void 0,parameters:[]}}f={mediaTypes:m}}const d=e.method.toLowerCase(),s=`${d}:${e.path}`,u=e.openApiOperationId??s;return{id:u,name:e.summary||`${e.method.toUpperCase()} ${e.path}`,method:d,path:e.path,href:"",operationId:u,parameters:t,servers:l,security:p,body:f}}function C(e,r,i){const t=e.schemaId?r.resolveSchema(e.schemaId):void 0,n=e.example!=null?e.example:t?r.sampleFromSchema(t,{skipReadOnly:!0}):void 0,a=F(t,n),l={typePrefix:"",title:t?.title??e.name,displayType:t?.type??"object",constraints:t?O(t):[],...a&&a.length>0?{fields:a}:{},...n!==void 0?{example:n}:{}};return{name:e.name,in:"querystring",required:e.required??!1,description:i,schema:l}}function F(e,r){const i=e?.properties;if(!i)return;const t=g(r)?r:{};return Object.keys(i).map(n=>{const a=t[n]!==void 0?t[n]:i[n]?.example;return{name:n,example:a}})}function P(e,r){return{id:e.id,type:e.type,name:e.name,in:e.in==="querystring"?"query":e.in,scheme:e.scheme,openIdConnectUrl:e.openIdConnectUrl,scopes:r,flows:e.flows,"x-defaultAccessToken":e["x-defaultAccessToken"],"x-defaultTokenType":e["x-defaultTokenType"],"x-defaultClientId":e["x-defaultClientId"],"x-defaultClientSecret":e["x-defaultClientSecret"],"x-defaultUsername":e["x-defaultUsername"],"x-defaultPassword":e["x-defaultPassword"],serverValues:e.serverValues}}function W(e,r,i){return(t,n,a)=>{const l=`${n.toLowerCase()}:${t}`,p=e.get(l);if(!p)return;const f=i?i(p):p;return A(f,r,a)}}export{W as createReplayConverter,A as toReplayOperation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
import{appendKeyValue as f}from"../builder.js";function u(e,o,a){(e.environment||e.environments)&&o({environment:e.environment,environments:e.environments});for(const i of e.operations??[]){const{apiPath:r,requestValues:n,activeSecuritySchemeIds:c,activeExampleName:m}=i,t={};n.header&&Object.keys(n.header).length>0&&(t.headers=n.header),n.query&&Object.keys(n.query).length>0&&(t.queryString=n.query),n.cookie&&Object.keys(n.cookie).length>0&&(t.cookies=n.cookie),n.body!==void 0&&(t.body=s(n.body)),c?.length&&(t.activeSecuritySchemeIds=c),m&&(t.activeExampleName=m),e.activeMimeName&&(t.activeMimeName=e.activeMimeName),a(r.path,r.method,t)}}function s(e){if(!(e instanceof FormData)&&!(e instanceof URLSearchParams))return e;const o={};for(const[a,i]of e)f(o,a,typeof i=="string"?i:i.name);return o}export{u as handleReplayParamChange};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { OpenAPIDefinition
|
|
1
|
+
import type { OpenAPIDefinition } from '../../../types/openapi.js';
|
|
2
2
|
import type { MockServerOptions } from '../../../adapters/openapi/utils/merge-mock-server.js';
|
|
3
|
-
export declare function buildServerEnvValues(servers: OpenAPIServer[]): Record<string, Record<string, string>>;
|
|
4
3
|
export declare function buildReplayPredefinedEnvValues(definition: OpenAPIDefinition, mockServer: MockServerOptions): Record<string, Record<string, string>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeInMockServer as
|
|
1
|
+
import{mergeInMockServer as t}from"../../../adapters/openapi/utils/merge-mock-server.js";import{buildServerEnvValues as i}from"../server-env.js";function f(e,r){const n=t((e.servers??[]).filter(o=>typeof o?.url=="string"),r);return i(n)}export{f as buildReplayPredefinedEnvValues};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(r){if(r)return r.const!==void 0?r.const:Array.isArray(r.examples)&&r.examples.length>0?r.examples[0]:Array.isArray(r.enum)&&r.enum.length>0?r.enum[0]:r.default}export{n as pickDeclaredSchemaValue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as s from"openapi-sampler";import{serializeParameterValue as l}from"../../utils/serialize-parameter.js";import{applyActiveVariantsToSchema as u,applyActiveVariantsToStore as c,applyDiscriminatorValue as y,hoistActiveVariantSchemaForSampling as d}from"./discriminator.js";function f(n,p,o){const a=c(n,p,o),t={};for(const[i,r]of Object.entries(a)){const e=i.startsWith("components/schemas/")?i.replace("components/schemas/",""):i;t[e]=r}return{openapi:"3.0.0",info:{title:"",version:""},paths:{},components:{schemas:t}}}function k(n,p,o,a,t){const i=f(n,a,t);return{resolveSchema(r){return n[r]?.data},resolveExample(r){const e=p[r];if(e)return{value:e.value,summary:e.summary,key:e.key}},sampleFromSchema(r,e){try{return s.sample(r,{skipReadOnly:e.skipReadOnly,skipWriteOnly:e.skipWriteOnly,quiet:!0,skipNonRequired:o.onlyRequiredInSamples,maxSampleDepth:e.maxDepth??o.generatedSamplesMaxDepth,...e.format==="xml"&&{format:"xml"}},i)}catch{return}},serializeParameter(r,e){return typeof e!="object"||e===null?String(e??""):l({name:r.name,in:r.in},e)},resolveVariantSchemaForSampling(r){const e=d(r,n,a,t),m=e?.schema??n[r]?.data;if(m)return{schema:u(m,n,a,t),variantSchemaId:e?.variantSchemaId??r,mappingKey:e?.mappingKey}},applyDiscriminatorValue(r,e,m){!r||typeof r!="object"||Array.isArray(r)||y(r,e,n,m)}}}export{f as buildOpenApiStubForSampler,k as createCodeSampleResolvers};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { OpenAPIServer } from '../../types/openapi.js';
|
|
2
|
+
/** Seeds one environment per global server so a saved environment name can resolve to a server in a fresh session. */
|
|
3
|
+
export declare function buildServerEnvValues(servers: OpenAPIServer[]): Record<string, Record<string, string>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{normalizeServers as o}from"./normalize-servers.js";import{getServerEnvName as m}from"../../utils/environments.js";function f(r){const t=o(void 0,r);return Object.fromEntries(t.map(e=>[String(m(e)),{server:e.url,...Object.fromEntries(Object.entries(e.variables??{}).map(([n,i])=>[n,i.default||""]))}]))}export{f as buildServerEnvValues};
|
|
@@ -96,11 +96,11 @@ export type CodeSampleSource = {
|
|
|
96
96
|
/** Raw pointer into the spec (for deep linking) */
|
|
97
97
|
pointer?: string;
|
|
98
98
|
/** Docs route slug of the operation page, relative to the routing base path
|
|
99
|
-
* (e.g. `operations/getmuseumhours`) —
|
|
99
|
+
* (e.g. `operations/getmuseumhours`) — lets hosts link back to the description */
|
|
100
100
|
href?: string;
|
|
101
|
-
/** OpenAPI `operationId` — should match the loaded spec so
|
|
101
|
+
/** OpenAPI `operationId` — should match the loaded spec so hosts can resolve the operation */
|
|
102
102
|
openApiOperationId?: string;
|
|
103
|
-
/** OpenAPI operation `summary` —
|
|
103
|
+
/** OpenAPI operation `summary` — the human-readable operation name */
|
|
104
104
|
summary?: string;
|
|
105
105
|
/** OpenAPI `security` array (AND-groups) for multi-scheme UI selection */
|
|
106
106
|
securityGroups?: Array<Record<string, string[]>>;
|
|
@@ -10,5 +10,6 @@ export type LicenseInfo = {
|
|
|
10
10
|
cryptoMissing?: boolean;
|
|
11
11
|
};
|
|
12
12
|
export declare function isHostAllowed(hostname: string, hosts: string[] | boolean | undefined): boolean;
|
|
13
|
+
export declare function isLicenseBypassed(): boolean;
|
|
13
14
|
export declare function parseLicense(key?: string): Promise<LicenseInfo>;
|
|
14
15
|
export default parseLicense;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMHjNir5fXx/ZXoaEeXQ5XyxbNJ4YJYczoCRdSkL6NLzw1FHnng5Vfcgk5+bvox9QRYRbuk84mA4f2NhywDbXKECAwEAAQ==",o=typeof window<"u"&&(window.crypto||window.msCrypto)||void 0;function u(e){return"then"in e?e:new Promise(t=>{e.oncomplete=n=>{t(n.target.result)}})}function f(e){const t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let i=0,r=e.length;i<r;i++)n[i]=e.charCodeAt(i);return t}function
|
|
1
|
+
const a="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMHjNir5fXx/ZXoaEeXQ5XyxbNJ4YJYczoCRdSkL6NLzw1FHnng5Vfcgk5+bvox9QRYRbuk84mA4f2NhywDbXKECAwEAAQ==",o=typeof window<"u"&&(window.crypto||window.msCrypto)||void 0;function u(e){return"then"in e?e:new Promise(t=>{e.oncomplete=n=>{t(n.target.result)}})}function f(e){const t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let i=0,r=e.length;i<r;i++)n[i]=e.charCodeAt(i);return t}function c(e){if(typeof TextEncoder<"u")return new TextEncoder().encode(e);const t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function l(){const e=f(atob(typeof REDOCLY_PUBLIC_KEY<"u"?REDOCLY_PUBLIC_KEY:a));return u(o.subtle.importKey("spki",e,{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},!0,["verify"]))}async function s(e,t){return u(o.subtle.verify({name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},await l(),f(atob(t)),c(e)))}function d(e,t){return t===!0?!0:Array.isArray(t)&&typeof window<"u"?e==="localhost"||e==="127.0.0.1"||e.endsWith(".localhost")||t.find(n=>n===e||e.endsWith("."+n))?!0:!!t.find(n=>{if(n.indexOf("*")!==n.lastIndexOf("*"))return!1;const[i,r]=n.split("*");return!!r&&e.startsWith(i)&&e.endsWith(r)&&r.split(".").length>2}):!1}function p(){return process.env.REDOCLY_FIRST_PARTY==="true"||process.env.NODE_ENV==="development"}async function w(e){if(p())return{valid:!0,allowed:!0};const t=window.location.hostname;if(!e)return t==="localhost"||t==="127.0.0.1"||t.endsWith(".localhost")?{local:!0}:{};const[n,i]=e.split(".");let r;try{if(!await s(atob(n),i))return{valid:!1};r=JSON.parse(atob(n))}catch{return{valid:!1,cryptoMissing:!0}}return r.valid=!0,(!r.e||Date.now()/1e3>r.e)&&(r.expired=!0),r.allowed=d(t,r.h),r}var y=w;export{y as default,d as isHostAllowed,p as isLicenseBypassed,w as parseLicense};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import*as B from"openapi-sampler";import{createStoreContext as I,resolveContent as C,resolveRef as h,toRecord as u}from"../../adapters/helpers.js";import{populateOpenApiStore as M}from"../../adapters/openapi/store.js";import{buildCodeSampleSource as N}from"../../adapters/openapi/build-code-sample-source.js";import{resolveOpenApiExampleValue as w}from"../../adapters/openapi/resolve-openapi-example-value.js";import{JsonPointer as b}from"../../adapters/openapi/utils/JsonPointer.js";import{createCodeSampleResolvers as A}from"../code-samples/resolvers.js";import{buildCodeSampleHAR as P}from"../code-samples/builder.js";import{tryGenerateCodeSample as T}from"../code-samples/generators/index.js";import{convertSampleToString as E}from"../code-samples/convertSampleToString.js";import{encodeExampleForMediaType as K,isSampleableMediaType as D,isSequentialMediaType as V,langFromMime as W}from"../../utils/media-type.js";import{getGeneratorKey as $,getLangKey as g}from"../../utils/languages.js";import{getServerEnvName as q}from"../../utils/environments.js";import{isOperationName as R}from"../../utils/http-methods.js";import{isStatusCode as F}from"../../utils/status-code.js";let v=null;function G(t,e){const n=e.ignoreNamedSchemas,o=n?[...n].sort().join(`
|
|
2
|
-
`):"";if(v?.doc===t&&v.optionsKey===o)return v.ctx;const r=I(u(t));return M(t,r,e),v={doc:t,optionsKey:o,ctx:r},r}function L(t,e){const n=t.paths;if(!(!n||typeof n!="object")){for(const[o,r]of Object.entries(n))if(!(!r||typeof r!="object"))for(const[s,i]of Object.entries(r)){if(!R(s)||!i||typeof i!="object")continue;const a=i;if(a.operationId===e)return{pathName:o,method:s,operation:a,pointer:b.compile(["paths",o,s])}}}}function U(t,e){const n=b.parse(e),o=n.indexOf("paths"),r=o>=0?n[o+1]:void 0,s=o>=0?n[o+2]:void 0;if(!r||!s||!R(s))return;const a=t.paths?.[r]?.[s];if(!(!a||typeof a!="object"))return{pathName:r,method:s,operation:a,pointer:b.compile(["paths",r,s])}}function H(t,{operationId:e,pointer:n}){if(e)return L(t,e);if(n)return U(t,n)}function ue(t,e,n){const o=H(t,n);if(!o)return;const{pathName:r,method:s,operation:i,pointer:a}=o,p=t.paths?.[r]??{},l={pointer:a,pathName:r,httpVerb:s.toUpperCase(),operationId:i.operationId,summary:typeof i.summary=="string"?i.summary:void 0,isWebhook:!1,isAdditionalOperation:!1,tags:i.tags??[],parameters:J(t,p.parameters,i.parameters),requestBody:i.requestBody,responses:i.responses,servers:i.servers??p.servers??t.servers,security:i.security},m=G(t,e),d=N(l,m,e,e
|
|
2
|
+
`):"";if(v?.doc===t&&v.optionsKey===o)return v.ctx;const r=I(u(t));return M(t,r,e),v={doc:t,optionsKey:o,ctx:r},r}function L(t,e){const n=t.paths;if(!(!n||typeof n!="object")){for(const[o,r]of Object.entries(n))if(!(!r||typeof r!="object"))for(const[s,i]of Object.entries(r)){if(!R(s)||!i||typeof i!="object")continue;const a=i;if(a.operationId===e)return{pathName:o,method:s,operation:a,pointer:b.compile(["paths",o,s])}}}}function U(t,e){const n=b.parse(e),o=n.indexOf("paths"),r=o>=0?n[o+1]:void 0,s=o>=0?n[o+2]:void 0;if(!r||!s||!R(s))return;const a=t.paths?.[r]?.[s];if(!(!a||typeof a!="object"))return{pathName:r,method:s,operation:a,pointer:b.compile(["paths",r,s])}}function H(t,{operationId:e,pointer:n}){if(e)return L(t,e);if(n)return U(t,n)}function ue(t,e,n){const o=H(t,n);if(!o)return;const{pathName:r,method:s,operation:i,pointer:a}=o,p=t.paths?.[r]??{},l={pointer:a,pathName:r,httpVerb:s.toUpperCase(),operationId:i.operationId,summary:typeof i.summary=="string"?i.summary:void 0,isWebhook:!1,isAdditionalOperation:!1,tags:i.tags??[],parameters:J(t,p.parameters,i.parameters),requestBody:i.requestBody,responses:i.responses,servers:i.servers??p.servers??t.servers,security:i.security},m=G(t,e),d=N(l,m,e.ignoreNamedSchemas,void 0,void 0,e),O=i["x-codeSamples"];O?.length&&(d.definitionSamples=O.map(({lang:S,label:c,source:f})=>({lang:S,label:c,source:f})));const y=A(m.schemaStore,m.exampleStore,e);return{doc:t,options:e,operation:i,pathName:r,method:s,source:d,storeCtx:m,resolvers:y}}function J(t,e,n){if(!e?.length)return n;if(!n?.length)return e;const o=u(t),r=a=>{const p=h(o,a)??a;return`${p.in}:${p.name}`},s=new Set(n.map(r));return[...e.filter(a=>!s.has(r(a))),...n]}function z(t,{environment:e,environments:n}){let o=t;if(e){const r=o.filter(s=>String(q(s))===e||s.url===e);o=r.length?r:o}return n&&(o=o.map(r=>{const s=n[String(q(r))]?.server;return s?{...r,url:s}:r})),o}function le(t,e={}){const{source:n,options:o}=t,r=o.codeSamples?.languages??[],s=new Map(r.map((c,f)=>[c.key,f])),i=z(n.servers,e),a=e.environment&&e.environments?.[e.environment]||{},p=(n.definitionSamples??[]).filter(c=>s.has(g(c))&&typeof c.source=="string"),l=new Set(p.map(g)),m={serverUrl:i[0]?.url??a.server,mediaType:e.mimeType,exampleName:e.exampleKey,environment:a,requestValues:e.parameters,replayBody:e.requestBody},d={skipOptionalParameters:o.codeSamples?.skipOptionalParameters,withOAuth2Call:o.codeSamples?.withOAuth2Call,generatedPayloadSamplesMaxDepth:o.generatedSamplesMaxDepth},y=n.operationType==="webhook"?void 0:P({...n,servers:i},m,d,t.resolvers),S=[];if(y)for(const c of r){const f=$(c);if(f==="payload"||l.has(c.key))continue;const x=T(f,y,c.options),k=x.kind==="ok"?x.source:x.kind==="unsupported-language"?"Language is not supported.":"Failed to generate code sample.";k&&S.push({lang:c.lang,label:c.label,source:k})}return[...p,...S].filter(c=>!!c.source).sort((c,f)=>(s.get(g(c))??9999)-(s.get(g(f))??9999))}function Q(t,e,n){if(e.examples&&typeof e.examples=="object"){const o=Object.keys(e.examples);if(o.length){const r=o.length===1?o[0]:n&&o.includes(n)?n:o[0],s=h(u(t),e.examples[r])??e.examples[r],i=w(s);if(i!==void 0)return i}}if(e.example!==void 0)return e.example}function X(t,e,n,o){const r=e.schema??e.itemSchema;if(!r)return;const s=h(u(t),r)??r;try{return B.sample(s,{skipReadOnly:o==="request",skipWriteOnly:o==="response",quiet:!0,skipNonRequired:n.onlyRequiredInSamples,maxSampleDepth:n.generatedSamplesMaxDepth},u(t))}catch{return}}function j(t,e,n,o,r,s){const i=[];if(!e)return i;for(const[a,p]of Object.entries(e)){if(!p||typeof p!="object"||s&&a!==s)continue;let l=Q(t.doc,p,n);const m=l===void 0&&D(a);if(m&&(l=X(t.doc,p,t.options,r)),l===void 0)continue;const d=E(l,a,p.schema??p.itemSchema,m&&V(a));d!==void 0&&i.push({lang:W(a),title:`${o} ${a}`,source:K(d,a,p.encoding)})}return i}function fe(t,{exampleKey:e,mimeType:n,titlePrefix:o="Payload"}={}){const r=h(u(t.doc),t.operation.requestBody)??t.operation.requestBody,s=C(u(t.doc),r);return j(t,s,e,o,"request",n)}function de(t,{exampleKey:e}={}){const n=t.operation.responses;if(!n||typeof n!="object")return[];const o=[];for(const[r,s]of Object.entries(n)){if(!F(r))continue;const i=h(u(t.doc),s)??s,a=C(u(t.doc),i);o.push(...j(t,a,e,r,"response"))}return o}export{le as buildCodeSamples,fe as getRequestBodySamples,de as getResponseSamples,ue as resolveOperationSampleContext};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import type { SchemaProcessorDialect } from '../../../types/schema.js';
|
|
1
|
+
import type { SchemaProcessorDialect, Document } from '../../../types/schema.js';
|
|
2
|
+
export declare function getImplicitDiscriminatorChildren(document: Document): Record<string, Array<{
|
|
3
|
+
ref: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}>>;
|
|
2
6
|
export declare const JsonSchemaDialectId: "json-schema";
|
|
3
7
|
export declare const jsonSchemaDialect: SchemaProcessorDialect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{merge as
|
|
1
|
+
import{merge as M,openApiJsonSchemaMergeRules as j}from"@redocly/allof-merge";import{schemaKind as P}from"../../../types/common.js";import{isSchemaNode as l}from"../../../types/schema.js";import{encodeJsonPointerSegment as A}from"../../../utils/refPointer.js";import{buildPropertyTree as D}from"../propertyTreeBuilder.js";function J(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function O(e,r){if(!r.startsWith("#/"))return;const i=r.slice(2).split("/").map(J);let n=e;for(const t of i){if(!l(n))return;n=n[t]}return l(n)?n:void 0}function h(e,r,i,n,t,f=!1){if(!e||typeof e!="object")return e;if(Array.isArray(e)){const s=i??new Set;return e.map(o=>h(o,r,s,n,t,f))}if(!l(e))return e;const c=i??new Set;if(e.$ref!==void 0){const s=e.$ref;if(typeof s!="string")return e;if(c.has(s)){for(const k of c)t?.add(k);const g=O(r,s);if(!l(g))return{"x-circular-ref":!0};if(f&&g.allOf!==void 0)return{};const{allOf:u,oneOf:m,anyOf:x,...y}=g;return{...y,"x-circular-ref":!0,"x-original-ref":s}}const o=n?.get(s);if(o&&l(o)){const g={};for(const[u,m]of Object.entries(e))u!=="$ref"&&(g[u]=h(m,r,c,n,t));return w({...o,...g,"x-original-ref":s},r)}const p=O(r,s);if(!p)return e;c.add(s);const a=h(p,r,c,n,t,f);c.delete(s);const d={};for(const[g,u]of Object.entries(e))g!=="$ref"&&(d[g]=h(u,r,c,n,t));return l(a)?(t?.has(s)||n?.set(s,a),w({...a,...d,"x-original-ref":s},r)):a}return Object.fromEntries(Object.entries(e).map(([s,o])=>[s,h(o,r,c,n,t,s==="allOf"&&Array.isArray(o))]))}function b(e,r,i,n){const t="openapi"in r?r.openapi:void 0,f=typeof t=="string"&&t.startsWith("3.0")?"3.0.x":"3.1.x",s=h(e,r,n,i,new Set),o=l(s)?w(s,r):e,p=M(o,{mergeCombinarySibling:!0,applyAdditionalPropertiesToSiblings:!1,rules:j(f)});return l(p)?p:o}function C(e,r){const i=[],n=new Set,t=f=>{const c=O(e,f);if(!(!l(c)||!Array.isArray(c.allOf)))for(const s of c.allOf)l(s)&&typeof s.$ref=="string"&&i.push(s.$ref)};for(t(r);i.length>0;){const f=i.pop();if(f===r)return!0;n.has(f)||(n.add(f),t(f))}return!1}function $(e,r){if(!Array.isArray(e.allOf))return[];const i=[],n=t=>{i.includes(t)||i.push(t)};for(const t of e.allOf){if(!l(t))continue;if(Array.isArray(t.allOf)){const c=t["x-original-ref"];t.discriminator&&typeof c=="string"&&!C(r,c)&&n(c);for(const s of $(t,r))n(s);continue}const f=t["x-original-ref"];typeof f=="string"&&n(f)}return i}function w(e,r){const i=$(e,r);return i.length>0&&(e["x-parentRefs"]=i),e}const R=new WeakMap;function W(e){const r=R.get(e);if(r)return r;const i=e.components?.schemas,n={};if(i&&typeof i=="object")for(const[t,f]of Object.entries(i)){if(!l(f)||!Array.isArray(f.allOf))continue;const c=typeof f["x-discriminator-value"]=="string"?f["x-discriminator-value"]:t,s=`#/components/schemas/${A(t)}`;for(const o of f.allOf)l(o)&&typeof o.$ref=="string"&&(n[o.$ref]??=[]).push({ref:s,value:c})}return R.set(e,n),n}const v=new WeakMap;function S(e,r){if(!l(e)){if(Array.isArray(e))for(const t of e)S(t,r);return}for(const[t,f]of Object.entries(e))t==="$ref"&&typeof f=="string"?r.add(f):S(f,r);const i=e.discriminator??e["x-discriminator"],n=l(i)?i.mapping:void 0;if(l(n))for(const t of Object.values(n))typeof t=="string"&&r.add(t)}function I(e){const r=new Set;let i=0;const n=new Map,t=new Map,f=new Set,c=[];for(const s of e.keys()){if(n.has(s))continue;const o=[{node:s,edge:0}];for(;o.length>0;){const p=o[o.length-1],{node:a}=p;p.edge===0&&(n.set(a,i),t.set(a,i),i++,c.push(a),f.add(a));const d=e.get(a)??[];if(p.edge<d.length){const u=d[p.edge];if(p.edge++,!e.has(u))continue;n.has(u)?f.has(u)&&t.set(a,Math.min(t.get(a)??0,n.get(u)??0)):o.push({node:u,edge:0});continue}if((t.get(a)??0)===(n.get(a)??0)){const u=[];let m="";do m=c.pop()??a,f.delete(m),u.push(m);while(m!==a);const x=(e.get(u[0])??[]).includes(u[0]);if(u.length>1||x)for(const y of u)r.add(y)}o.pop();const g=o[o.length-1];g&&t.set(g.node,Math.min(t.get(g.node)??0,t.get(a)??0))}}return r}function N(e){const r=v.get(e);if(r)return r;const i=e.components?.schemas,n=new Map;if(i&&typeof i=="object"){const f=o=>`#/components/schemas/${A(o)}`,c=o=>o.replace(/^#\/components\/schemas\//,"").replace(/~1/g,"/").replace(/~0/g,"~"),s=o=>{const p=i[c(o)];return l(p)&&!!(p.discriminator||p["x-discriminator"])};for(const[o,p]of Object.entries(i)){const a=new Set;S(p,a),n.set(f(o),[...a])}for(const[o,p]of Object.entries(i))if(!(!l(p)||!Array.isArray(p.allOf)))for(const a of p.allOf)l(a)&&typeof a.$ref=="string"&&s(a.$ref)&&n.get(a.$ref)?.push(f(o))}const t=I(n);return v.set(e,t),t}const _=P.JSON_SCHEMA,F={id:_,process(e,r,i){const n=new Map,t=i?.rootJsonPointer??"#",f=t.startsWith("#/")&&e.$ref!==t?new Set([t]):void 0,c=b(e,r,n,f),s={prepareVariant:o=>b(o,r,n),propertyRefCache:new Map,variantResolutionCache:new Map,implicitDiscriminatorChildren:W(r),exampleSerializer:i?.exampleSerializer,sortRequiredPropsFirst:i?.sortRequiredPropsFirst,activeRefs:t.startsWith("#/")?new Set([t]):new Set,depth:0,recursiveRefs:N(r)};return D(c,s,t)}};export{_ as JsonSchemaDialectId,W as getImplicitDiscriminatorChildren,F as jsonSchemaDialect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{encodeJsonPointerSegment as
|
|
1
|
+
import{encodeJsonPointerSegment as F}from"../../utils/refPointer.js";import{isSchemaNode as b,switcherLabel as S}from"../../types/schema.js";import{buildPropertyShell as Y,detectJsonSchemaType as D,getAccessMode as z,getDiscriminatorObject as j,getDocumentedPrimitiveArrayItems as G,getEnum as U,humanizeConstraints as W,isPrimitiveLikeSchema as x,isStructuredArrayItems as Q,primitiveArrayItemsHaveOwnInfo as Z,promotePrimitiveArrayMetadata as ee,schemaHasType as I,toPropertyExample as L}from"./propertyBuilder.js";import{deriveVariantLabel as ie}from"./variant-label.js";const te=10,re=200;function ne(e,i,r,t){const n=j(i)?`${e}:d`:e;return t?`${n}#rec`:`${n}@${r}`}function N(e){if(e.isCircular)return!0;if(e.properties){for(const i of Object.values(e.properties))if(N(i))return!0}if(e.items){for(const i of e.items)if(N(i))return!0}if(e.switcher)for(const i of Object.values(e.switcher.options)){if(i.isCircular)return!0;if(i.properties){for(const r of Object.values(i.properties))if(N(r))return!0}}return!1}const h=/^#\/components\/(schemas|pathItems)\/([^/]+)$/;function se(e){const i=e.match(h);if(i)return i[2].replace(/~1/g,"/").replace(/~0/g,"~")}function g(e,i,r={},t){const n=Y(e,{...r,exampleSerializer:i.exampleSerializer});if(!n.title){const o=se(t);o&&(n.title=o)}if(n.isCircular||n.isComplex)return n;const s=e["x-original-ref"];if(s&&i.activeRefs.has(s))return n.isCircular=!0,n;if(i.activeRefs.size>te||i.depth>re)return n.isComplex=!0,n;const f=s!==void 0&&i.recursiveRefs.has(s),l=s===void 0?void 0:ne(s,e,t,f);if(l){const o=i.propertyRefCache.get(l);if(o)return{...o,...n}}s&&i.activeRefs.add(s);try{oe(n,e,{...i,depth:i.depth+1},t)}finally{s&&i.activeRefs.delete(s)}return l&&(f||!N(n))&&i.propertyRefCache.set(l,n),n.isExpandable=fe(n),n}function fe(e){if(e.isCircular)return!1;const i=t=>!t.isCircular&&(!!t.switcher||!!t.items?.length||!!(t.properties&&Object.keys(t.properties).length)),r=t=>t.isCircular?!1:!!(t.properties&&Object.values(t.properties).some(i)||t.items?.some(r)||t.switcher&&Object.values(t.switcher.options).some(r));return!!(e.properties&&Object.values(e.properties).some(i)||e.switcher&&Object.values(e.switcher.options).some(r)||e.items?.some(r))}function k(e,i){if(!Array.isArray(e)||e.length===0)return;let r;for(let t=0;t<e.length;t++){const n=e[t];if(!b(n))return;const s=i(n);if(s===void 0)return;if(t===0)r=s;else if(s!==r)return}return r}function M(e,i,r){if(e.example!==void 0||k(i,s=>s.example===void 0?void 0:JSON.stringify(s.example))===void 0)return;const n=Array.isArray(i)?i[0]:void 0;b(n)&&(e.example=L(n.example,r))}function T(e,i){if(e.accessMode!==void 0)return;const r=k(i,z);r&&(e.accessMode=r)}function oe(e,i,r,t){const n=i.type||D(i),s=x(i,n),f=X(i,r,t);if(f){e.switcher=f,M(e,i.oneOf??i.anyOf,r.exampleSerializer),T(e,i.oneOf??i.anyOf),i.properties&&(e.properties=A(i,r,t));return}if(i.oneOf!==void 0){if(e.switcher=E(i.oneOf,S.ONE_OF,r,t,"oneOf",i),M(e,i.oneOf,r.exampleSerializer),T(e,i.oneOf),i.properties){const l=A(i,r,t);e.properties=l;for(const o of Object.values(e.switcher.options))o.properties={...l,...o.properties||{}}}return}if(i.anyOf!==void 0){if(e.switcher=E(i.anyOf,S.ANY_OF,r,t,"anyOf",i),M(e,i.anyOf,r.exampleSerializer),T(e,i.anyOf),i.properties){const l=A(i,r,t);e.properties=l;for(const o of Object.values(e.switcher.options))o.properties={...l,...o.properties||{}}}return}if(i.if&&i.then||i.if&&i.else){e.switcher=Oe(i,r,t);return}!s&&I(n,"object")&&(e.properties=A(i,r,t)),!s&&I(n,"array")&&(e.items=B(i,r,t),P(i)!==void 0&&delete e.example,e.example===void 0&&b(i.items)&&i.items.example!==void 0&&!G(i,n)&&(e.example=L([i.items.example],r.exampleSerializer))),ee(e,i,n,r.exampleSerializer)}function le(e,i){const r=[],t=[],n=[];for(const[s,f]of Object.entries(e))f.isRequired?i.includes(s)?r.push([s,f]):t.push([s,f]):n.push([s,f]);return r.sort(([s],[f])=>i.indexOf(s)-i.indexOf(f)),Object.fromEntries([...r,...t,...n])}function A(e,i,r){const t={},n={...i,isChild:!1},s=e.required||[],f=b(e.default)?e.default:{},l=b(e.example)?e.example:void 0,o=e.properties||{};for(const[u,d]of Object.entries(o)){const p={...d};p.default===void 0&&f[u]!==void 0&&(p.default=f[u]),p.example===void 0&&l?.[u]!==void 0&&(p.example=l[u]);const w=`${r}/properties/${F(u)}`;t[u]=g(p,n,{isRequired:s.includes(u)},w)}for(const[u,d]of Object.entries(e.patternProperties||{})){const p=`${r}/patternProperties/${F(u)}`;t[u]=g(d,n,{isPatternProperty:!0},p)}const a=e.additionalProperties??e.unevaluatedProperties;if(b(a)){const u=(a["x-additionalPropertiesName"]||"property name")+"*",d=`${r}/additionalProperties`;t[u]=g(a,n,{isAdditionalProperty:!0},d)}else a===!0&&(t["property name*"]=g({},n,{isAdditionalProperty:!0},`${r}/additionalProperties`));return i.sortRequiredPropsFirst?q(le(t,s)):q(t)}function q(e){const i={};for(const[r,t]of Object.entries(e).sort(([,n],[,s])=>+!!n.isDeprecated-+!!s.isDeprecated))i[r]=t;return i}function P(e){const i=Array.isArray(e.prefixItems)?e.prefixItems:Array.isArray(e.items)?e.items:void 0;return!i?.length||!Array.isArray(e.example)||!e.example.length||e.example.length>i.length||e.example.some((t,n)=>t!==void 0&&b(i[n])&&i[n].example!==void 0)?void 0:e.example}function B(e,i,r){const t={...i},n=P(e),s=(f,l)=>n?.[l]!==void 0?{...f,example:n[l]}:f;if(Array.isArray(e.prefixItems)){const f=e.prefixItems.map((l,o)=>H(g(s(l,o),t,{},`${r}/prefixItems/${o}`)));return f.push(...K(e.items,t,`${r}/items`)),f}if(Array.isArray(e.items)){const f=e.items.map((l,o)=>H(g(s(l,o),t,{},`${r}/items/${o}`)));return f.push(...K(e.additionalItems,t,`${r}/additionalItems`)),f}return b(e.items)&&(Q(e.items)||!x(e.items,e.items.type||D(e.items))||Z(e.items))?[g(e.items,t,{},`${r}/items`)]:[]}function K(e,i,r){return e!==!0&&!b(e)?[]:[ue(g(e===!0?{}:e,i,{},r))]}function ue(e){return{...e,isAdditionalItems:!0}}function H(e){return{...e,isTupleItem:!0}}function J(e,i){const r=i.prepareVariant({$ref:e});if(b(r))return typeof r.$ref=="string"?void 0:r}function de(e,i,r){if(!i)return!1;const t=J(e,r);return t!==void 0&&j(t)?.propertyName===i}function R(e,i){const r=i.variantResolutionCache.get(e);if(r)return r;const t=J(e,i);if(t){delete t.discriminator,delete t["x-discriminator"],delete t["x-original-ref"];for(const n of["oneOf","anyOf"]){const s=t[n];Array.isArray(s)&&s.some(f=>b(f)&&f["x-original-ref"]===e)&&delete t[n]}return i.variantResolutionCache.set(e,t),t}}const ae="Default mapping";function pe(e,i){if(typeof e["x-original-ref"]=="string")return e["x-original-ref"];if(h.test(i))return i}function X(e,i,r){const t=j(e);if(i.isChild||!t?.propertyName)return;const n=ce(e,t,i,r);return Object.keys(n.options).length>0?n:void 0}function ce(e,i,r,t){const n=i.mapping||{},s=i["x-explicitMappingOnly"]??Object.keys(n).length>0,f=e.oneOf||e.anyOf||[],l=pe(e,t),o={...r,isChild:!0},a=O=>O&&O===l?{...o,activeRefs:new Set([...r.activeRefs].filter(c=>c!==l))}:o,u=e.oneOf!==void 0?"oneOf":"anyOf",d={};if(Object.keys(n).length>0)for(const[O,c]of Object.entries(n)){const m=R(c,r);if(!m)continue;const y=f.findIndex(v=>v["x-original-ref"]===c),C=y>=0?`${t}/${u}/${y}`:t;d[O]=$(m,a(c),!1,C,c)}else for(let O=0;O<f.length;O++){const c=f[O],m=c["x-original-ref"],y=typeof m=="string"?R(m,r):c;if(!y)continue;const C=c.title||m?.split("/").pop()||"Variant",v=`${t}/${u}/${O}`;d[C]=$(y,a(m),!1,v,m)}if(f.length===0&&!s){const O=new Set(Object.values(n)),m=[...(e["x-parentRefs"]??[]).filter(y=>de(y,i.propertyName,r)),...l?[l]:[]];for(const y of m){const C=r.implicitDiscriminatorChildren?.[y];if(C)for(const{ref:v,value:_}of C){if(O.has(v)||Object.hasOwn(d,_))continue;const V=R(v,r);V&&(d[_]=$(V,a(v),!1,t,v))}}}const p=i.defaultMapping,w=p?R(p,r):void 0;if(p&&w){const O=p.split("/").pop();O&&delete d[O];const c=f.findIndex(y=>y["x-original-ref"]===p),m=c>=0?`${t}/${u}/${c}`:t;d[ae]=$(w,a(p),!0,m,p)}return{type:"discriminator",label:S.DISCRIMINATOR,propertyName:i.propertyName,jsonPointer:t,options:d}}function E(e,i,r,t,n,s){const f={},l={...r,isChild:!1};for(let o=0;o<e.length;o++){const a=e[o],u={type:s.type,...a},{label:d,typeLabel:p}=ie(a,s),w=`${t}/${n}/${o}`,O=f[d]?`${d} (${o+1})`:d,c=$(u,l,!1,w,a["x-original-ref"]);c.typeLabel=p,a.title&&(c.title=a.title),f[O]=c}return{type:"oneOf",label:i,jsonPointer:t,options:f}}function Oe(e,i,r){const{if:t,then:n={},else:s={},description:f,...l}=e,o={...i,isChild:!1},a=(...u)=>i.prepareVariant({allOf:u.filter(d=>d!=null)});return{type:"oneOf",label:S.ONE_OF,jsonPointer:r,options:{[t?.["x-displayName"]||t?.title||"case 1"]:$(a(l,n,t),o,!1,r),[s?.["x-displayName"]||s?.title||"case 2"]:$(a(l,s),o,!1,r)}}}function $(e,i,r,t,n){const s={isDeprecated:!!e.deprecated,isDefaultMapping:r};e.description&&(s.description=e.description);const f=(e["x-original-ref"]??n)?.split("/").pop();f&&(s.schemaName=f);const l=z(e);l&&(s.accessMode=l);const o=W(e);o.length&&(s.constraints=o);const a=U(e);if(a&&(s.enum=a),n&&i.activeRefs.has(n))return s.isCircular=!0,s;const u=e.type||D(e);n&&i.activeRefs.add(n);try{const d=X(e,i,t);if(d?(s.switcher=d,e.properties&&(s.properties=A(e,i,t))):e.oneOf!==void 0?(s.switcher=E(e.oneOf,S.ONE_OF,i,t,"oneOf",e),e.properties&&(s.properties=A(e,i,t))):e.anyOf!==void 0?(s.switcher=E(e.anyOf,S.ANY_OF,i,t,"anyOf",e),e.properties&&(s.properties=A(e,i,t))):!x(e,u)&&(I(u,"object")||e.properties)&&(s.properties=A(e,i,t)),!x(e,u)&&I(u,"array")){const p=B(e,i,t);p.length&&(s.items=p)}}finally{n&&i.activeRefs.delete(n)}return s}function ve(e,i,r){return delete e["x-original-ref"],g(e,i,{},r)}export{ve as buildPropertyTree};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ApiDocsSearchIndexer as o}from"./indexer/index.js";export{o as ApiDocsSearchIndexer};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Node } from '@markdoc/markdoc';
|
|
2
|
+
export type AsyncMessageSubsection = 'payload' | 'headers' | 'bindings';
|
|
3
|
+
export type DescriptionFormatter = (desc: string | Node | Node[]) => string;
|
|
4
|
+
export type WalkScope = {
|
|
5
|
+
callbackId?: string;
|
|
6
|
+
messageKey?: string;
|
|
7
|
+
pathOnly?: boolean;
|
|
8
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AsyncMessageSubsection, WalkScope } from './context.js';
|
|
2
|
+
export type FieldDeepLink = {
|
|
3
|
+
slug: string;
|
|
4
|
+
type: string;
|
|
5
|
+
in?: string;
|
|
6
|
+
contentType?: string;
|
|
7
|
+
responseCode?: string;
|
|
8
|
+
fieldPath: string[];
|
|
9
|
+
scope: WalkScope;
|
|
10
|
+
};
|
|
11
|
+
export declare function buildFieldDeepLink({ slug, type, in: inValue, contentType, responseCode, fieldPath, scope, }: FieldDeepLink): string;
|
|
12
|
+
export declare function buildAsyncMessageDeepLink(slug: string, messageKey: string | undefined, subsection: AsyncMessageSubsection, fieldPath: string[]): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildOpenApiFieldSuffix as u,makeDeepLink as d,serializeFieldParams as f}from"../../../utils/deep-link.js";function o({slug:e,type:n,in:t,contentType:r,responseCode:i,fieldPath:s,scope:p}){if(!e)return"";const a=s.join("/")||void 0;return p.pathOnly?a?d(e,f({path:a})):"":d(e,u({t:n,in:t,c:i,cb:p.callbackId,ct:r,path:a}))}function m(e,n,t,r){if(!e)return"";const i=f({m:n,t,path:r.join("/")||void 0});return d(e,i?`messages&${i}`:"messages")}export{m as buildAsyncMessageDeepLink,o as buildFieldDeepLink};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ContainerNode, ContentNode } from '../../../../types/content.js';
|
|
2
|
+
import type { ExtractContext, Extractor } from './context.js';
|
|
3
|
+
export declare const messagesExtractor: Extractor;
|
|
4
|
+
export declare function extractMessageBindingFields(container: ContainerNode, ctx: ExtractContext): void;
|
|
5
|
+
/** The channel address, rendered under the channel title; sits inside the page container. */
|
|
6
|
+
export declare function extractChannelAddress(children: ContentNode[]): string | undefined;
|
|
7
|
+
/** One row per server (broker) the page lists: name, host, title, summary and description. */
|
|
8
|
+
export declare function extractServerFields(container: ContainerNode, ctx: ExtractContext): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hasRbacScope as o}from"../../../../adapters/rbac.js";import{nodeTypes as t,panelKind as d}from"../../../../types/common.js";import{buildAsyncApiSuffix as l,makeDeepLink as u}from"../../../../utils/deep-link.js";import{makeParam as c}from"../param.js";import{MESSAGE_BINDINGS_PLACE as S,MESSAGE_HEADERS_PLACE as h,MESSAGE_PAYLOAD_PLACE as E,MESSAGE_PLACE as A,SERVER_PLACE as y}from"../places.js";import{addRow as p,describe as m}from"./context.js";import{extractServerVariableRows as g}from"./panels.js";const N={matches:n=>!!n.messages?.length,extract(n,e){if(e.hasSchemas)for(const a of n.messages??[])o(a)||k(a,e)}};function k(n,e){p(e,c({name:n.name,description:[m(e,n.description),n.summary].filter(Boolean).join(" "),place:A,type:"unknown",deepLink:e.slug?u(e.slug,l({section:"messages",messageKey:n.name})):void 0}));const a={...e.scope,messageKey:n.name},i=new Set;n.schemaId&&e.walker.extractSchemaFields({schemaId:n.schemaId,place:E,paramsMap:e.paramsMap,slug:e.slug,mediaType:n.contentType,visited:i},a),n.headerSchemaId&&e.walker.extractSchemaFields({schemaId:n.headerSchemaId,place:h,paramsMap:e.paramsMap,slug:e.slug,visited:i},a)}function B(n,e){if(e.hasSchemas)for(const a of n.panels??[])for(const i of a.children??[]){if(i.kind!==d.MESSAGE_BINDING)continue;const r=i.bindingsByMessageKey??{};for(const[f,s]of Object.entries(r))s?.keySchemaId&&e.walker.extractSchemaFields({schemaId:s.keySchemaId,place:S,paramsMap:e.paramsMap,slug:e.slug,visited:new Set},{...e.scope,messageKey:f})}}function I(n){for(const e of n){if(e.nodeType===t.CHANNEL_ADDRESS)return e.address;if(e.nodeType===t.CONTAINER){const a=I(e.children);if(a)return a}}}function D(n,e){for(const a of n.panels??[])for(const i of a.children??[])if(i.kind===d.BROKERS)for(const r of i.brokers)o(r)||!r.name||(p(e,c({name:r.name,description:[r.url,r.title,r.summary,m(e,r.description)].filter(Boolean).join(" "),place:y,type:"unknown"})),g(r.variables,e))}export{I as extractChannelAddress,B as extractMessageBindingFields,D as extractServerFields,N as messagesExtractor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hasRbacScope as t}from"../../../../adapters/rbac.js";import{buildOpenApiSectionSuffix as c,CALLBACKS_SECTION as d,makeDeepLink as l}from"../../../../utils/deep-link.js";import{makeParam as n}from"../param.js";import{fieldsPlaceOf as f,REQUEST_BODY_PLACE as h,scopedPlace as m}from"../places.js";import{addRow as u,describe as b}from"./context.js";const v={matches:a=>!!a.mediaTypeSchemas||!!a.schemaId||a.variant==="body"&&!!a.description,extract(a,e){if(a.variant==="body"&&y(a,e),!e.hasSchemas)return;const s=m(f(a.variant),e.scope.callbackId),i=a.variant==="responses";if(a.mediaTypeSchemas){const p=Object.entries(a.mediaTypeSchemas).filter(([,r])=>!t(r)&&r.schemaId);for(const[r,o]of p)e.walker.extractSchemaFields({schemaId:o.schemaId,place:s,paramsMap:e.paramsMap,slug:e.slug,mediaType:r,hasMultipleMediaTypes:p.length>1,isResponse:i},e.scope)}else a.schemaId&&e.walker.extractSchemaFields({schemaId:a.schemaId,place:s,paramsMap:e.paramsMap,slug:e.slug,isResponse:i,visited:e.visited},e.scope)}};function y(a,e){const s=b(e,a.description);if(!s)return;const i=c("request","body"),p=e.scope.callbackId?`${c(d,e.scope.callbackId)}/${i}`:i;u(e,n({name:a.mediaTypes?.join(", ")||"body",description:s,place:m(h,e.scope.callbackId),type:"unknown",deepLink:e.slug?l(e.slug,p):void 0}))}export{v as bodyExtractor};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ContentNode, ItemContentNode } from '../../../../types/content.js';
|
|
2
|
+
import type { ExtractContext } from './context.js';
|
|
3
|
+
export type VisitNodes = (nodes: ContentNode[], ctx: ExtractContext) => void;
|
|
4
|
+
export declare function extractCallback(callback: NonNullable<ItemContentNode['callback']>, ctx: ExtractContext, visit: VisitNodes): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildOpenApiSectionSuffix as t,makeDeepLink as p,CALLBACKS_SECTION as d}from"../../../../utils/deep-link.js";import{makeParam as m}from"../param.js";import{CALLBACK_PLACE as f}from"../places.js";import{addRow as s,describe as C,withScope as u}from"./context.js";import{extractHeadingSections as L}from"./heading-sections.js";function h(e,i,o){const r=[e.summary??"",C(i,e.description)].filter(Boolean).join(" ").trim();s(i,m({name:e.callbackName,description:r,place:f,type:"unknown",deepLink:i.slug?p(i.slug,t(d,e.callbackId)):void 0}));const n=u(i,{callbackId:e.callbackId});e.description&&typeof e.description!="string"&&L(e.description,n),e.contentChildren?.length&&o(e.contentChildren,n)}export{h as extractCallback};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { OperationParameter } from '@redocly/theme/core/openapi';
|
|
2
|
+
import type { Node } from '@markdoc/markdoc';
|
|
3
|
+
import type { ItemContentNode } from '../../../../types/content.js';
|
|
4
|
+
import type { ExampleEntry } from '../../../../types/store.js';
|
|
5
|
+
import type { SchemaWalker } from '../schema-walker.js';
|
|
6
|
+
import type { DescriptionFormatter, WalkScope } from '../context.js';
|
|
7
|
+
export type ExtractContext = {
|
|
8
|
+
slug: string;
|
|
9
|
+
scope: WalkScope;
|
|
10
|
+
paramsMap: Record<string, OperationParameter>;
|
|
11
|
+
visited: Set<string>;
|
|
12
|
+
walker: SchemaWalker;
|
|
13
|
+
formatDescription: DescriptionFormatter;
|
|
14
|
+
hasSchemas: boolean;
|
|
15
|
+
exampleStore?: Record<string, ExampleEntry>;
|
|
16
|
+
/** True on the API overview page; parts that should lead there only are gated on it. */
|
|
17
|
+
isOverview: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type Extractor = {
|
|
20
|
+
matches(node: ItemContentNode): boolean;
|
|
21
|
+
extract(node: ItemContentNode, ctx: ExtractContext): void;
|
|
22
|
+
};
|
|
23
|
+
export declare function addRow(ctx: ExtractContext, param: OperationParameter): void;
|
|
24
|
+
export declare function describe(ctx: ExtractContext, desc: string | Node | Node[] | undefined): string;
|
|
25
|
+
export declare function withScope(ctx: ExtractContext, scope: Partial<WalkScope>): ExtractContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getParameterId as r}from"../param.js";function p(o,e){o.paramsMap[r(e,o.scope.callbackId)]=e}function n(o,e){return e?o.formatDescription(e):""}function c(o,e){return{...o,scope:{...o.scope,...e}}}export{p as addRow,n as describe,c as withScope};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hasRbacScope as p}from"../../../../adapters/rbac.js";import{buildAsyncApiSuffix as E,buildOpenApiSectionSuffix as d,CALLBACKS_SECTION as k,makeDeepLink as I}from"../../../../utils/deep-link.js";import{makeParam as T}from"../param.js";import{MESSAGE_EXAMPLES_PLACE as h,REQUEST_EXAMPLES_PLACE as A,responseExamplesPlace as C,scopedPlace as L}from"../places.js";import{addRow as w,describe as P}from"./context.js";const M={matches:e=>e.variant==="body"&&y({exampleIds:e.exampleIds,mediaTypeContent:e.mediaTypeSchemas})||!!e.responses?.some(o=>y(o))||!!e.messages?.some(o=>o.exampleIds?.length),extract(e,o){if(o.exampleStore){e.variant==="body"&&S(o,{exampleIds:e.exampleIds,mediaTypeContent:e.mediaTypeSchemas},{place:A,suffix:d("request","body")});for(const s of e.responses??[])p(s)||S(o,s,{place:C(s.code),suffix:d("response",void 0,s.code)});for(const s of e.messages??[])p(s)||u(o,s.exampleIds??[],{place:h,suffix:E({section:"messages",messageKey:s.name}),callbackScoped:!1,selectable:!1})}}};function y(e){return $(e).length>0}function S(e,o,s){u(e,o.exampleIds??[],s);const t=Object.entries(o.mediaTypeContent??{}).filter(([,n])=>!p(n)),c=n=>{const i=e.exampleStore?.[n];return i?.summary??i?.key},l=n=>(n.exampleIds??[]).filter(i=>{const m=e.exampleStore?.[i];return!!m&&!p(m)}),a=new Map;for(const[,n]of t)for(const i of new Set(l(n).map(c)))i&&a.set(i,(a.get(i)??0)+1);const f=new Set;for(const[n,i]of t)for(const m of l(i)){const r=c(m);if(!r||f.has(r))continue;const x=(a.get(r)??0)>1;x&&f.add(r);const b=t.length>1&&!x?`${s.suffix}&ct=${n}`:s.suffix;u(e,[m],{...s,suffix:b})}}function $(e){const o=new Set(e.exampleIds??[]);for(const s of Object.values(e.mediaTypeContent??{}))for(const t of s.exampleIds??[])o.add(t);return[...o]}function u(e,o,s){const{callbackId:t}=e.scope,c=s.callbackScoped===!1||!t?s.suffix:`${d(k,t)}/${s.suffix}`;for(const l of o){const a=e.exampleStore?.[l];if(!a||p(a))continue;const f=a.summary??a.key;if(!f)continue;const n=s.selectable!==!1&&a.key&&!/[/&]/.test(a.key)?`&ex=${a.key}`:"";w(e,T({name:f,description:P(e,a.description),place:L(s.place,t),type:"unknown",deepLink:e.slug?I(e.slug,`${c}${n}`):void 0}))}}export{M as examplesExtractor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildGraphqlSuffix as l,makeDeepLink as g}from"../../../../utils/deep-link.js";import{makeParam as h}from"../param.js";import{GRAPHQL_ARGUMENTS_PLACE as u,fieldsPlaceOf as d,scopedPlace as q}from"../places.js";import{addRow as o,describe as c}from"./context.js";function k(a){return a.variant!=="graphql-args"?a.graphqlTypeName:a.graphqlFieldName?a.graphqlFieldName:a.graphqlTypeName?`@${a.graphqlTypeName}`:void 0}const S={matches:a=>!!a.graphqlSchema,extract(a,i){const t=Array.isArray(a.graphqlSchema)?a.graphqlSchema:a.graphqlSchema?.fields;t?.length&&y(t,q(d(a.variant),i.scope.callbackId),a,i)}};function y(a,i,t,r){const f=t.variant==="graphql-args",m=k(t),s=e=>r.slug&&m?g(r.slug,e):void 0;for(const e of a){const n=`${m}.${e.name}`;o(r,h({name:e.name,description:c(r,e.description),place:i,path:[],type:e.type??"unknown",deepLink:s(f?l({t:"argument",path:n,arg:e.name}):l({t:"field",path:n}))}));for(const p of e.args??[])o(r,h({name:p.name,description:c(r,p.description),place:u,path:[e.name],type:p.type??"unknown",deepLink:s(l({t:"argument",path:`${n}.${p.name}`,arg:p.name}))}))}}export{S as graphqlExtractor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{extractFullText as f}from"../../../../adapters/utils/markdoc.js";import{safeSlugify as m}from"../../../../utils/string.js";import{makeParam as p}from"../param.js";import{DESCRIPTION_PLACE as l,scopedPlace as u}from"../places.js";import{addRow as c}from"./context.js";function L(r,o){if(!r||typeof r=="string"||!o.slug)return;const d=Array.isArray(r)?r:r.children??[];let i,a=[];const s=()=>{i&&(c(o,p({name:i.name,description:a.join(" ").trim(),place:u(l,o.scope.callbackId),deepLink:`/${o.slug}#${i.id}`.toLowerCase()})),i=void 0,a=[])};for(const t of d){if(t.type==="heading"){s();const e=f(t),n=typeof t.attributes?.id=="string"&&t.attributes.id?t.attributes.id:e?`section/${m(e)}`:"";e&&n&&(i={id:n,name:e});continue}if(i){const e=f(t);e&&a.push(e)}}s()}export{L as extractHeadingSections};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ItemContentNode } from '../../../../types/content.js';
|
|
2
|
+
import type { Extractor } from './context.js';
|
|
3
|
+
export declare const extractors: readonly Extractor[];
|
|
4
|
+
export declare function extractorsFor(node: ItemContentNode): Extractor[];
|
|
5
|
+
export type { ExtractContext, Extractor } from './context.js';
|
|
6
|
+
export { extractCallback } from './callbacks.js';
|
|
7
|
+
export { extractHeadingSections } from './heading-sections.js';
|
|
8
|
+
export { extractChannelAddress, extractMessageBindingFields, extractServerFields, } from './asyncapi.js';
|
|
9
|
+
export { extractMcpFields } from './mcp.js';
|
|
10
|
+
export { extractInfoMetadataRows, extractPanelRows } from './panels.js';
|
|
11
|
+
export { extractSecurityRows } from './security.js';
|
|
12
|
+
export { extractSchemaPageFields } from './schema-page.js';
|