@redocly/api-docs 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -0
- package/README.md +3 -0
- package/lib/.tsbuildinfo +1 -0
- package/lib/RedoclyApiDocs.d.ts +22 -0
- package/lib/RedoclyApiDocs.js +1 -0
- package/lib/RedoclyApiDocsStandalone.d.ts +18 -0
- package/lib/RedoclyApiDocsStandalone.js +26 -0
- package/lib/adapters/asyncapi/build/context.d.ts +10 -0
- package/lib/adapters/asyncapi/build/context.js +1 -0
- package/lib/adapters/asyncapi/build/navigation.d.ts +2 -0
- package/lib/adapters/asyncapi/build/navigation.js +1 -0
- package/lib/adapters/asyncapi/build/utils.d.ts +3 -0
- package/lib/adapters/asyncapi/build/utils.js +1 -0
- package/lib/adapters/asyncapi/buildContext.d.ts +2 -0
- package/lib/adapters/asyncapi/buildContext.js +1 -0
- package/lib/adapters/asyncapi/index.d.ts +14 -0
- package/lib/adapters/asyncapi/index.js +1 -0
- package/lib/adapters/asyncapi/items/channel/content.d.ts +5 -0
- package/lib/adapters/asyncapi/items/channel/content.js +1 -0
- package/lib/adapters/asyncapi/items/channel/item.d.ts +13 -0
- package/lib/adapters/asyncapi/items/channel/item.js +1 -0
- package/lib/adapters/asyncapi/items/operation/content.d.ts +4 -0
- package/lib/adapters/asyncapi/items/operation/content.js +3 -0
- package/lib/adapters/asyncapi/items/operation/item.d.ts +15 -0
- package/lib/adapters/asyncapi/items/operation/item.js +1 -0
- package/lib/adapters/asyncapi/items/overview/content.d.ts +10 -0
- package/lib/adapters/asyncapi/items/overview/content.js +1 -0
- package/lib/adapters/asyncapi/items/overview/item.d.ts +16 -0
- package/lib/adapters/asyncapi/items/overview/item.js +1 -0
- package/lib/adapters/asyncapi/panels/brokers.d.ts +4 -0
- package/lib/adapters/asyncapi/panels/brokers.js +1 -0
- package/lib/adapters/asyncapi/panels/download.d.ts +3 -0
- package/lib/adapters/asyncapi/panels/download.js +1 -0
- package/lib/adapters/asyncapi/panels/group.d.ts +16 -0
- package/lib/adapters/asyncapi/panels/group.js +1 -0
- package/lib/adapters/asyncapi/panels/overview.d.ts +3 -0
- package/lib/adapters/asyncapi/panels/overview.js +1 -0
- package/lib/adapters/asyncapi/store.d.ts +4 -0
- package/lib/adapters/asyncapi/store.js +1 -0
- package/lib/adapters/asyncapi/utils/avro-to-json-schema.d.ts +4 -0
- package/lib/adapters/asyncapi/utils/avro-to-json-schema.js +1 -0
- package/lib/adapters/asyncapi/utils/get-channel-label.d.ts +3 -0
- package/lib/adapters/asyncapi/utils/get-channel-label.js +1 -0
- package/lib/adapters/asyncapi/utils/get-protocol-labels.d.ts +24 -0
- package/lib/adapters/asyncapi/utils/get-protocol-labels.js +1 -0
- package/lib/adapters/asyncapi/utils/get-server-host.d.ts +3 -0
- package/lib/adapters/asyncapi/utils/get-server-host.js +1 -0
- package/lib/adapters/asyncapi/utils/resolve-schema.d.ts +2 -0
- package/lib/adapters/asyncapi/utils/resolve-schema.js +1 -0
- package/lib/adapters/asyncapi/utils/resolveInDoc.d.ts +2 -0
- package/lib/adapters/asyncapi/utils/resolveInDoc.js +1 -0
- package/lib/adapters/build.d.ts +31 -0
- package/lib/adapters/build.js +1 -0
- package/lib/adapters/graphql/build/context.d.ts +9 -0
- package/lib/adapters/graphql/build/context.js +1 -0
- package/lib/adapters/graphql/buildContext.d.ts +2 -0
- package/lib/adapters/graphql/buildContext.js +1 -0
- package/lib/adapters/graphql/buildStoreFromSdl.d.ts +2 -0
- package/lib/adapters/graphql/buildStoreFromSdl.js +1 -0
- package/lib/adapters/graphql/group/custom.d.ts +2 -0
- package/lib/adapters/graphql/group/custom.js +1 -0
- package/lib/adapters/graphql/group/default.d.ts +2 -0
- package/lib/adapters/graphql/group/default.js +1 -0
- package/lib/adapters/graphql/group/errors.d.ts +1 -0
- package/lib/adapters/graphql/group/errors.js +1 -0
- package/lib/adapters/graphql/group/itemBuilders.d.ts +5 -0
- package/lib/adapters/graphql/group/itemBuilders.js +1 -0
- package/lib/adapters/graphql/group/utils.d.ts +8 -0
- package/lib/adapters/graphql/group/utils.js +1 -0
- package/lib/adapters/graphql/index.d.ts +10 -0
- package/lib/adapters/graphql/index.js +1 -0
- package/lib/adapters/graphql/items/directive/content.d.ts +4 -0
- package/lib/adapters/graphql/items/directive/content.js +1 -0
- package/lib/adapters/graphql/items/directive/item.d.ts +3 -0
- package/lib/adapters/graphql/items/directive/item.js +1 -0
- package/lib/adapters/graphql/items/enum/content.d.ts +4 -0
- package/lib/adapters/graphql/items/enum/content.js +1 -0
- package/lib/adapters/graphql/items/enum/item.d.ts +3 -0
- package/lib/adapters/graphql/items/enum/item.js +1 -0
- package/lib/adapters/graphql/items/input/content.d.ts +4 -0
- package/lib/adapters/graphql/items/input/content.js +1 -0
- package/lib/adapters/graphql/items/input/item.d.ts +3 -0
- package/lib/adapters/graphql/items/input/item.js +1 -0
- package/lib/adapters/graphql/items/interface/content.d.ts +4 -0
- package/lib/adapters/graphql/items/interface/content.js +1 -0
- package/lib/adapters/graphql/items/interface/item.d.ts +3 -0
- package/lib/adapters/graphql/items/interface/item.js +1 -0
- package/lib/adapters/graphql/items/mutation/content.d.ts +4 -0
- package/lib/adapters/graphql/items/mutation/content.js +1 -0
- package/lib/adapters/graphql/items/mutation/item.d.ts +3 -0
- package/lib/adapters/graphql/items/mutation/item.js +1 -0
- package/lib/adapters/graphql/items/object/content.d.ts +4 -0
- package/lib/adapters/graphql/items/object/content.js +1 -0
- package/lib/adapters/graphql/items/object/item.d.ts +3 -0
- package/lib/adapters/graphql/items/object/item.js +1 -0
- package/lib/adapters/graphql/items/operation/content.d.ts +7 -0
- package/lib/adapters/graphql/items/operation/content.js +1 -0
- package/lib/adapters/graphql/items/overview/content.d.ts +11 -0
- package/lib/adapters/graphql/items/overview/content.js +1 -0
- package/lib/adapters/graphql/items/overview/item.d.ts +4 -0
- package/lib/adapters/graphql/items/overview/item.js +1 -0
- package/lib/adapters/graphql/items/query/content.d.ts +4 -0
- package/lib/adapters/graphql/items/query/content.js +1 -0
- package/lib/adapters/graphql/items/query/item.d.ts +3 -0
- package/lib/adapters/graphql/items/query/item.js +1 -0
- package/lib/adapters/graphql/items/scalar/content.d.ts +4 -0
- package/lib/adapters/graphql/items/scalar/content.js +1 -0
- package/lib/adapters/graphql/items/scalar/item.d.ts +3 -0
- package/lib/adapters/graphql/items/scalar/item.js +1 -0
- package/lib/adapters/graphql/items/subscription/content.d.ts +4 -0
- package/lib/adapters/graphql/items/subscription/content.js +1 -0
- package/lib/adapters/graphql/items/subscription/item.d.ts +3 -0
- package/lib/adapters/graphql/items/subscription/item.js +1 -0
- package/lib/adapters/graphql/items/types.d.ts +7 -0
- package/lib/adapters/graphql/items/types.js +0 -0
- package/lib/adapters/graphql/items/union/content.d.ts +4 -0
- package/lib/adapters/graphql/items/union/content.js +1 -0
- package/lib/adapters/graphql/items/union/item.d.ts +3 -0
- package/lib/adapters/graphql/items/union/item.js +1 -0
- package/lib/adapters/graphql/panels/download.d.ts +3 -0
- package/lib/adapters/graphql/panels/download.js +1 -0
- package/lib/adapters/graphql/panels/group-items.d.ts +4 -0
- package/lib/adapters/graphql/panels/group-items.js +1 -0
- package/lib/adapters/graphql/panels/overview.d.ts +3 -0
- package/lib/adapters/graphql/panels/overview.js +1 -0
- package/lib/adapters/graphql/serializeType.d.ts +5 -0
- package/lib/adapters/graphql/serializeType.js +1 -0
- package/lib/adapters/graphql/store.d.ts +3 -0
- package/lib/adapters/graphql/store.js +1 -0
- package/lib/adapters/graphql/utils/appendGraphqlItemFeedback.d.ts +2 -0
- package/lib/adapters/graphql/utils/appendGraphqlItemFeedback.js +1 -0
- package/lib/adapters/graphql/utils/configMetadataRows.d.ts +3 -0
- package/lib/adapters/graphql/utils/configMetadataRows.js +1 -0
- package/lib/adapters/graphql/utils/constants.d.ts +23 -0
- package/lib/adapters/graphql/utils/constants.js +1 -0
- package/lib/adapters/graphql/utils/createApiItem.d.ts +15 -0
- package/lib/adapters/graphql/utils/createApiItem.js +1 -0
- package/lib/adapters/graphql/utils/getBadges.d.ts +4 -0
- package/lib/adapters/graphql/utils/getBadges.js +1 -0
- package/lib/adapters/graphql/utils/ignoreInternalItems.d.ts +3 -0
- package/lib/adapters/graphql/utils/ignoreInternalItems.js +1 -0
- package/lib/adapters/graphql/utils/isRootType.d.ts +2 -0
- package/lib/adapters/graphql/utils/isRootType.js +1 -0
- package/lib/adapters/graphql/utils/menuSlashRegex.d.ts +1 -0
- package/lib/adapters/graphql/utils/menuSlashRegex.js +1 -0
- package/lib/adapters/graphql/utils/normalizeMenu.d.ts +3 -0
- package/lib/adapters/graphql/utils/normalizeMenu.js +1 -0
- package/lib/adapters/graphql/utils/shouldIncludeItem.d.ts +2 -0
- package/lib/adapters/graphql/utils/shouldIncludeItem.js +1 -0
- package/lib/adapters/graphql/utils/summary.d.ts +4 -0
- package/lib/adapters/graphql/utils/summary.js +1 -0
- package/lib/adapters/graphql/utils/validateMenuConfig.d.ts +3 -0
- package/lib/adapters/graphql/utils/validateMenuConfig.js +1 -0
- package/lib/adapters/helpers.d.ts +47 -0
- package/lib/adapters/helpers.js +1 -0
- package/lib/adapters/openapi/build/context.d.ts +13 -0
- package/lib/adapters/openapi/build/context.js +1 -0
- package/lib/adapters/openapi/build-code-sample-source.d.ts +5 -0
- package/lib/adapters/openapi/build-code-sample-source.js +1 -0
- package/lib/adapters/openapi/buildContext.d.ts +2 -0
- package/lib/adapters/openapi/buildContext.js +1 -0
- package/lib/adapters/openapi/configure/apply-request-values.d.ts +3 -0
- package/lib/adapters/openapi/configure/apply-request-values.js +1 -0
- package/lib/adapters/openapi/configure/index.d.ts +3 -0
- package/lib/adapters/openapi/configure/index.js +1 -0
- package/lib/adapters/openapi/configure/merge-utils.d.ts +32 -0
- package/lib/adapters/openapi/configure/merge-utils.js +1 -0
- package/lib/adapters/openapi/configure/resolve-request-values.d.ts +17 -0
- package/lib/adapters/openapi/configure/resolve-request-values.js +1 -0
- package/lib/adapters/openapi/constants.d.ts +4 -0
- package/lib/adapters/openapi/constants.js +1 -0
- package/lib/adapters/openapi/group/content.d.ts +28 -0
- package/lib/adapters/openapi/group/content.js +1 -0
- package/lib/adapters/openapi/group/item.d.ts +11 -0
- package/lib/adapters/openapi/group/item.js +1 -0
- package/lib/adapters/openapi/index.d.ts +13 -0
- package/lib/adapters/openapi/index.js +1 -0
- package/lib/adapters/openapi/items/mcp/content.d.ts +5 -0
- package/lib/adapters/openapi/items/mcp/content.js +1 -0
- package/lib/adapters/openapi/items/mcp/item.d.ts +9 -0
- package/lib/adapters/openapi/items/mcp/item.js +1 -0
- package/lib/adapters/openapi/items/operation/content.d.ts +3 -0
- package/lib/adapters/openapi/items/operation/content.js +1 -0
- package/lib/adapters/openapi/items/operation/item.d.ts +9 -0
- package/lib/adapters/openapi/items/operation/item.js +1 -0
- package/lib/adapters/openapi/items/overview/content.d.ts +18 -0
- package/lib/adapters/openapi/items/overview/content.js +1 -0
- package/lib/adapters/openapi/items/overview/item.d.ts +3 -0
- package/lib/adapters/openapi/items/overview/item.js +1 -0
- package/lib/adapters/openapi/items/schema/content.d.ts +3 -0
- package/lib/adapters/openapi/items/schema/content.js +1 -0
- package/lib/adapters/openapi/items/schema/item.d.ts +9 -0
- package/lib/adapters/openapi/items/schema/item.js +1 -0
- package/lib/adapters/openapi/panels/download.d.ts +3 -0
- package/lib/adapters/openapi/panels/download.js +1 -0
- package/lib/adapters/openapi/panels/languages.d.ts +3 -0
- package/lib/adapters/openapi/panels/languages.js +1 -0
- package/lib/adapters/openapi/panels/mcp.d.ts +3 -0
- package/lib/adapters/openapi/panels/mcp.js +1 -0
- package/lib/adapters/openapi/panels/overview.d.ts +3 -0
- package/lib/adapters/openapi/panels/overview.js +1 -0
- package/lib/adapters/openapi/panels/servers.d.ts +3 -0
- package/lib/adapters/openapi/panels/servers.js +1 -0
- package/lib/adapters/openapi/resolve-openapi-example-value.d.ts +3 -0
- package/lib/adapters/openapi/resolve-openapi-example-value.js +1 -0
- package/lib/adapters/openapi/store.d.ts +4 -0
- package/lib/adapters/openapi/store.js +1 -0
- package/lib/adapters/openapi/utils/JsonPointer.d.ts +51 -0
- package/lib/adapters/openapi/utils/JsonPointer.js +1 -0
- package/lib/adapters/openapi/utils/applyIgnoreNamedSchemasDeep.d.ts +1 -0
- package/lib/adapters/openapi/utils/applyIgnoreNamedSchemasDeep.js +1 -0
- package/lib/adapters/openapi/utils/helpers.d.ts +14 -0
- package/lib/adapters/openapi/utils/helpers.js +1 -0
- package/lib/adapters/openapi/utils/merge-mock-server.d.ts +15 -0
- package/lib/adapters/openapi/utils/merge-mock-server.js +1 -0
- package/lib/adapters/openapi/utils/operation.d.ts +23 -0
- package/lib/adapters/openapi/utils/operation.js +1 -0
- package/lib/adapters/openapi/utils/resolvePathItemRef.d.ts +2 -0
- package/lib/adapters/openapi/utils/resolvePathItemRef.js +1 -0
- package/lib/adapters/openapi/utils/url.d.ts +2 -0
- package/lib/adapters/openapi/utils/url.js +1 -0
- package/lib/adapters/rbac-schema-propagation.d.ts +2 -0
- package/lib/adapters/rbac-schema-propagation.js +1 -0
- package/lib/adapters/scopedContext.d.ts +5 -0
- package/lib/adapters/scopedContext.js +1 -0
- package/lib/adapters/utils/convertSwagger2OpenAPI.d.ts +2 -0
- package/lib/adapters/utils/convertSwagger2OpenAPI.js +1 -0
- package/lib/adapters/utils/dompurify.d.ts +5 -0
- package/lib/adapters/utils/dompurify.js +1 -0
- package/lib/adapters/utils/infoMetadata.d.ts +5 -0
- package/lib/adapters/utils/infoMetadata.js +1 -0
- package/lib/adapters/utils/isPlainText.d.ts +6 -0
- package/lib/adapters/utils/isPlainText.js +1 -0
- package/lib/adapters/utils/markdoc.d.ts +38 -0
- package/lib/adapters/utils/markdoc.js +1 -0
- package/lib/adapters/utils/parseMarkdown.d.ts +8 -0
- package/lib/adapters/utils/parseMarkdown.js +1 -0
- package/lib/adapters/utils/seo.d.ts +3 -0
- package/lib/adapters/utils/seo.js +1 -0
- package/lib/adapters/utils/simplifyAstStructure.d.ts +2 -0
- package/lib/adapters/utils/simplifyAstStructure.js +1 -0
- package/lib/components/AdmonitionItem.d.ts +6 -0
- package/lib/components/AdmonitionItem.js +1 -0
- package/lib/components/ChannelAddressItem.d.ts +7 -0
- package/lib/components/ChannelAddressItem.js +31 -0
- package/lib/components/ContainerItem.d.ts +9 -0
- package/lib/components/ContainerItem.js +1 -0
- package/lib/components/EmptyMessageItem.d.ts +6 -0
- package/lib/components/EmptyMessageItem.js +6 -0
- package/lib/components/ErrorBoundary.d.ts +18 -0
- package/lib/components/ErrorBoundary.js +1 -0
- package/lib/components/ExtensionsItem.d.ts +7 -0
- package/lib/components/ExtensionsItem.js +1 -0
- package/lib/components/ExternalDocsItem.d.ts +8 -0
- package/lib/components/ExternalDocsItem.js +1 -0
- package/lib/components/FeedbackItem.d.ts +9 -0
- package/lib/components/FeedbackItem.js +17 -0
- package/lib/components/Header/HeaderItem.d.ts +91 -0
- package/lib/components/Header/HeaderItem.js +105 -0
- package/lib/components/Header/HeaderResponseCodeTabs.d.ts +8 -0
- package/lib/components/Header/HeaderResponseCodeTabs.js +1 -0
- package/lib/components/Header/ResponseDeepLinkAnchor.d.ts +9 -0
- package/lib/components/Header/ResponseDeepLinkAnchor.js +1 -0
- package/lib/components/Header/hooks.d.ts +5 -0
- package/lib/components/Header/hooks.js +1 -0
- package/lib/components/InfoMetadataItem.d.ts +7 -0
- package/lib/components/InfoMetadataItem.js +1 -0
- package/lib/components/ItemContent/ItemContentRenderer.d.ts +8 -0
- package/lib/components/ItemContent/ItemContentRenderer.js +11 -0
- package/lib/components/ItemContent/SectionHeader.d.ts +8 -0
- package/lib/components/ItemContent/SectionHeader.js +14 -0
- package/lib/components/ItemContent/hooks.d.ts +5 -0
- package/lib/components/ItemContent/hooks.js +1 -0
- package/lib/components/ItemContent/sections/BodyMimeTypeField.d.ts +12 -0
- package/lib/components/ItemContent/sections/BodyMimeTypeField.js +60 -0
- package/lib/components/ItemContent/sections/BodySection.d.ts +7 -0
- package/lib/components/ItemContent/sections/BodySection.js +13 -0
- package/lib/components/ItemContent/sections/CallbacksSection.d.ts +5 -0
- package/lib/components/ItemContent/sections/CallbacksSection.js +131 -0
- package/lib/components/ItemContent/sections/FieldsSection.d.ts +7 -0
- package/lib/components/ItemContent/sections/FieldsSection.js +79 -0
- package/lib/components/ItemContent/sections/MessagesSection.d.ts +5 -0
- package/lib/components/ItemContent/sections/MessagesSection.js +58 -0
- package/lib/components/ItemContent/sections/ParametersSection.d.ts +6 -0
- package/lib/components/ItemContent/sections/ParametersSection.js +4 -0
- package/lib/components/ItemContent/sections/ResponsesSection.d.ts +5 -0
- package/lib/components/ItemContent/sections/ResponsesSection.js +28 -0
- package/lib/components/ItemContent/sections/ValuesSection.d.ts +5 -0
- package/lib/components/ItemContent/sections/ValuesSection.js +26 -0
- package/lib/components/LicenseOverlay.d.ts +6 -0
- package/lib/components/LicenseOverlay.js +42 -0
- package/lib/components/Mapper.d.ts +25 -0
- package/lib/components/Mapper.js +1 -0
- package/lib/components/MarkdownItem.d.ts +6 -0
- package/lib/components/MarkdownItem.js +1 -0
- package/lib/components/Mcp/McpPrompt.d.ts +8 -0
- package/lib/components/Mcp/McpPrompt.js +1 -0
- package/lib/components/Mcp/McpResource.d.ts +8 -0
- package/lib/components/Mcp/McpResource.js +3 -0
- package/lib/components/Mcp/McpTool.d.ts +8 -0
- package/lib/components/Mcp/McpTool.js +1 -0
- package/lib/components/Mcp/styled.d.ts +19 -0
- package/lib/components/Mcp/styled.js +22 -0
- package/lib/components/Mcp/utils.d.ts +6 -0
- package/lib/components/Mcp/utils.js +1 -0
- package/lib/components/MessageLinksItem.d.ts +7 -0
- package/lib/components/MessageLinksItem.js +30 -0
- package/lib/components/RenderHook.d.ts +6 -0
- package/lib/components/RenderHook.js +1 -0
- package/lib/components/Replay/EmbeddedReplay.d.ts +16 -0
- package/lib/components/Replay/EmbeddedReplay.js +10 -0
- package/lib/components/Replay/Replay.d.ts +13 -0
- package/lib/components/Replay/Replay.js +1 -0
- package/lib/components/Replay/adapterToMarkdownParser.d.ts +12 -0
- package/lib/components/Replay/adapterToMarkdownParser.js +1 -0
- package/lib/components/Replay/index.d.ts +2 -0
- package/lib/components/Replay/index.js +1 -0
- package/lib/components/Schema/SchemaDescription.d.ts +5 -0
- package/lib/components/Schema/SchemaDescription.js +1 -0
- package/lib/components/Schema/SchemaView.d.ts +20 -0
- package/lib/components/Schema/SchemaView.js +1 -0
- package/lib/components/Schema/helpers.d.ts +1 -0
- package/lib/components/Schema/helpers.js +1 -0
- package/lib/components/Schema/hooks/useSchemaDocument.d.ts +7 -0
- package/lib/components/Schema/hooks/useSchemaDocument.js +1 -0
- package/lib/components/Schema/hooks/useSchemaFieldDeepLink.d.ts +5 -0
- package/lib/components/Schema/hooks/useSchemaFieldDeepLink.js +1 -0
- package/lib/components/Schema/hooks/useVariantIndexFromHash.d.ts +1 -0
- package/lib/components/Schema/hooks/useVariantIndexFromHash.js +1 -0
- package/lib/components/Schema/styled.d.ts +146 -0
- package/lib/components/Schema/styled.js +342 -0
- package/lib/components/Schema/utils.d.ts +26 -0
- package/lib/components/Schema/utils.js +1 -0
- package/lib/components/Schema/views/ArrayRenderer.d.ts +13 -0
- package/lib/components/Schema/views/ArrayRenderer.js +1 -0
- package/lib/components/Schema/views/CollapsibleNestedFields.d.ts +25 -0
- package/lib/components/Schema/views/CollapsibleNestedFields.js +1 -0
- package/lib/components/Schema/views/DefaultMappingOptionLabel.d.ts +5 -0
- package/lib/components/Schema/views/DefaultMappingOptionLabel.js +15 -0
- package/lib/components/Schema/views/DiscriminatorPropertyRow.d.ts +13 -0
- package/lib/components/Schema/views/DiscriminatorPropertyRow.js +1 -0
- package/lib/components/Schema/views/Examples.d.ts +7 -0
- package/lib/components/Schema/views/Examples.js +1 -0
- package/lib/components/Schema/views/ExpandableExample.d.ts +4 -0
- package/lib/components/Schema/views/ExpandableExample.js +3 -0
- package/lib/components/Schema/views/ObjectRenderer.d.ts +14 -0
- package/lib/components/Schema/views/ObjectRenderer.js +1 -0
- package/lib/components/Schema/views/Pattern.d.ts +6 -0
- package/lib/components/Schema/views/Pattern.js +1 -0
- package/lib/components/Schema/views/PrimitiveRenderer.d.ts +5 -0
- package/lib/components/Schema/views/PrimitiveRenderer.js +1 -0
- package/lib/components/Schema/views/PropertyFieldRow.d.ts +16 -0
- package/lib/components/Schema/views/PropertyFieldRow.js +1 -0
- package/lib/components/Schema/views/PropertyRenderer.d.ts +15 -0
- package/lib/components/Schema/views/PropertyRenderer.js +1 -0
- package/lib/components/Schema/views/SchemaEnumDescriptions.d.ts +9 -0
- package/lib/components/Schema/views/SchemaEnumDescriptions.js +5 -0
- package/lib/components/Schema/views/SchemaEnumValues.d.ts +8 -0
- package/lib/components/Schema/views/SchemaEnumValues.js +1 -0
- package/lib/components/Schema/views/SchemaTitleLabel.d.ts +5 -0
- package/lib/components/Schema/views/SchemaTitleLabel.js +1 -0
- package/lib/components/Schema/views/SchemaVariantSelector.d.ts +11 -0
- package/lib/components/Schema/views/SchemaVariantSelector.js +1 -0
- package/lib/components/Schema/views/SwitcherRenderer.d.ts +14 -0
- package/lib/components/Schema/views/SwitcherRenderer.js +1 -0
- package/lib/components/Schema/views/VariantDropdown.d.ts +14 -0
- package/lib/components/Schema/views/VariantDropdown.js +99 -0
- package/lib/components/SchemaCatalogLink.d.ts +6 -0
- package/lib/components/SchemaCatalogLink.js +35 -0
- package/lib/components/Security/Divider.d.ts +4 -0
- package/lib/components/Security/Divider.js +15 -0
- package/lib/components/Security/RequiredScopes.d.ts +4 -0
- package/lib/components/Security/RequiredScopes.js +5 -0
- package/lib/components/Security/ScopeTagWithTooltip.d.ts +11 -0
- package/lib/components/Security/ScopeTagWithTooltip.js +28 -0
- package/lib/components/Security/SecurityButtonPanel.d.ts +5 -0
- package/lib/components/Security/SecurityButtonPanel.js +1 -0
- package/lib/components/Security/SecurityFlowDetail.d.ts +5 -0
- package/lib/components/Security/SecurityFlowDetail.js +1 -0
- package/lib/components/Security/SecurityModal.d.ts +6 -0
- package/lib/components/Security/SecurityModal.js +1 -0
- package/lib/components/Security/SecuritySection.d.ts +3 -0
- package/lib/components/Security/SecuritySection.js +1 -0
- package/lib/components/Security/styled.d.ts +83 -0
- package/lib/components/Security/styled.js +219 -0
- package/lib/components/Security/types.d.ts +3 -0
- package/lib/components/Security/types.js +0 -0
- package/lib/components/SideMenu/SideMenu.d.ts +7 -0
- package/lib/components/SideMenu/SideMenu.js +4 -0
- package/lib/components/SideMenu/buildMenuItems.d.ts +29 -0
- package/lib/components/SideMenu/buildMenuItems.js +1 -0
- package/lib/components/SideMenu/useMenuItems.d.ts +14 -0
- package/lib/components/SideMenu/useMenuItems.js +1 -0
- package/lib/components/StickySidebar/SidebarActions.d.ts +1 -0
- package/lib/components/StickySidebar/SidebarActions.js +5 -0
- package/lib/components/StickySidebar/StickySidebar.d.ts +7 -0
- package/lib/components/StickySidebar/StickySidebar.js +22 -0
- package/lib/components/common/Badge.d.ts +43 -0
- package/lib/components/common/Badge.js +33 -0
- package/lib/components/common/Breadcrumbs.d.ts +11 -0
- package/lib/components/common/Breadcrumbs.js +43 -0
- package/lib/components/common/ContentWrapper.d.ts +25 -0
- package/lib/components/common/ContentWrapper.js +106 -0
- package/lib/components/common/DeepLinkAnchor.d.ts +20 -0
- package/lib/components/common/DeepLinkAnchor.js +32 -0
- package/lib/components/common/ExpandAllButton.d.ts +6 -0
- package/lib/components/common/ExpandAllButton.js +3 -0
- package/lib/components/common/ExternalDocumentation.d.ts +10 -0
- package/lib/components/common/ExternalDocumentation.js +10 -0
- package/lib/components/common/LazyMount.d.ts +9 -0
- package/lib/components/common/LazyMount.js +3 -0
- package/lib/components/common/LazySection.d.ts +14 -0
- package/lib/components/common/LazySection.js +9 -0
- package/lib/components/common/Markdown.d.ts +7 -0
- package/lib/components/common/Markdown.js +1 -0
- package/lib/components/common/MoreDetailsButton.d.ts +5 -0
- package/lib/components/common/MoreDetailsButton.js +12 -0
- package/lib/components/common/NestedToggleButton.d.ts +10 -0
- package/lib/components/common/NestedToggleButton.js +16 -0
- package/lib/components/common/PanelItem.d.ts +70 -0
- package/lib/components/common/PanelItem.js +62 -0
- package/lib/components/common/ResponseCodeTabs.d.ts +8 -0
- package/lib/components/common/ResponseCodeTabs.js +36 -0
- package/lib/components/common/Tag.d.ts +1 -0
- package/lib/components/common/Tag.js +11 -0
- package/lib/components/common/VendorExtensions.d.ts +7 -0
- package/lib/components/common/VendorExtensions.js +5 -0
- package/lib/components/common/ViewNested.d.ts +14 -0
- package/lib/components/common/ViewNested.js +31 -0
- package/lib/components/graphql/ArrowIcon.d.ts +9 -0
- package/lib/components/graphql/ArrowIcon.js +4 -0
- package/lib/components/graphql/GraphQLArgumentsSection.d.ts +10 -0
- package/lib/components/graphql/GraphQLArgumentsSection.js +1 -0
- package/lib/components/graphql/GraphQLEnumEmbedded.d.ts +5 -0
- package/lib/components/graphql/GraphQLEnumEmbedded.js +3 -0
- package/lib/components/graphql/GraphQLFieldView.d.ts +12 -0
- package/lib/components/graphql/GraphQLFieldView.js +1 -0
- package/lib/components/graphql/GraphQLFieldsEmbedded.d.ts +9 -0
- package/lib/components/graphql/GraphQLFieldsEmbedded.js +1 -0
- package/lib/components/graphql/GraphQLGroupTypeList.d.ts +5 -0
- package/lib/components/graphql/GraphQLGroupTypeList.js +11 -0
- package/lib/components/graphql/GraphQLHeaderExtras.d.ts +7 -0
- package/lib/components/graphql/GraphQLHeaderExtras.js +1 -0
- package/lib/components/graphql/GraphQLReturnTypeDetails.d.ts +11 -0
- package/lib/components/graphql/GraphQLReturnTypeDetails.js +18 -0
- package/lib/components/graphql/GraphQLTypeView.d.ts +9 -0
- package/lib/components/graphql/GraphQLTypeView.js +1 -0
- package/lib/components/graphql/GraphQLUnionEmbedded.d.ts +5 -0
- package/lib/components/graphql/GraphQLUnionEmbedded.js +1 -0
- package/lib/components/graphql/RequiresScopesButton.d.ts +9 -0
- package/lib/components/graphql/RequiresScopesButton.js +38 -0
- package/lib/components/graphql/RequiresScopesModal.d.ts +9 -0
- package/lib/components/graphql/RequiresScopesModal.js +88 -0
- package/lib/components/graphql/ViewNested.d.ts +14 -0
- package/lib/components/graphql/ViewNested.js +46 -0
- package/lib/components/graphql/renderDescription.d.ts +2 -0
- package/lib/components/graphql/renderDescription.js +1 -0
- package/lib/components/graphql/sections/GraphQLArgsSection.d.ts +5 -0
- package/lib/components/graphql/sections/GraphQLArgsSection.js +7 -0
- package/lib/components/graphql/sections/GraphQLFieldsSection.d.ts +5 -0
- package/lib/components/graphql/sections/GraphQLFieldsSection.js +1 -0
- package/lib/components/graphql/sections/ImplementedBySection.d.ts +5 -0
- package/lib/components/graphql/sections/ImplementedBySection.js +1 -0
- package/lib/components/graphql/sections/ImplementsSection.d.ts +5 -0
- package/lib/components/graphql/sections/ImplementsSection.js +1 -0
- package/lib/components/graphql/sections/PossibleTypesSection.d.ts +5 -0
- package/lib/components/graphql/sections/PossibleTypesSection.js +1 -0
- package/lib/components/graphql/sections/RequiresScopesSection.d.ts +5 -0
- package/lib/components/graphql/sections/RequiresScopesSection.js +1 -0
- package/lib/components/graphql/sections/ReturnTypeSection.d.ts +5 -0
- package/lib/components/graphql/sections/ReturnTypeSection.js +7 -0
- package/lib/components/graphql/styled.d.ts +45 -0
- package/lib/components/graphql/styled.js +124 -0
- package/lib/components/markdoc/Heading.d.ts +11 -0
- package/lib/components/markdoc/Heading.js +6 -0
- package/lib/components/markdoc/SchemaDefinition.d.ts +11 -0
- package/lib/components/markdoc/SchemaDefinition.js +6 -0
- package/lib/components/markdoc/apiDocsMarkdocComponents.d.ts +6 -0
- package/lib/components/markdoc/apiDocsMarkdocComponents.js +1 -0
- package/lib/components/markdoc/buildMarkdocOptions.d.ts +9 -0
- package/lib/components/markdoc/buildMarkdocOptions.js +1 -0
- package/lib/components/markdoc/defaultMarkdocConfig.d.ts +14 -0
- package/lib/components/markdoc/defaultMarkdocConfig.js +1 -0
- package/lib/components/markdoc/markdocAdapter.d.ts +11 -0
- package/lib/components/markdoc/markdocAdapter.js +1 -0
- package/lib/components/markdoc/markdocParser.d.ts +6 -0
- package/lib/components/markdoc/markdocParser.js +1 -0
- package/lib/components/markdoc/markdocRenderer.d.ts +8 -0
- package/lib/components/markdoc/markdocRenderer.js +3 -0
- package/lib/components/markdoc/tags/mcp-tag-schemas.d.ts +2 -0
- package/lib/components/markdoc/tags/mcp-tag-schemas.js +1 -0
- package/lib/components/markdoc/tags/schema-definition-tag.d.ts +2 -0
- package/lib/components/markdoc/tags/schema-definition-tag.js +1 -0
- package/lib/components/panels/DownloadPanelItem.d.ts +5 -0
- package/lib/components/panels/DownloadPanelItem.js +26 -0
- package/lib/components/panels/ExampleItem/CallbackPayloadItem.d.ts +5 -0
- package/lib/components/panels/ExampleItem/CallbackPayloadItem.js +5 -0
- package/lib/components/panels/ExampleItem/CodeSampleItem.d.ts +5 -0
- package/lib/components/panels/ExampleItem/CodeSampleItem.js +1 -0
- package/lib/components/panels/ExampleItem/ExamplesPanelItem.d.ts +3 -0
- package/lib/components/panels/ExampleItem/ExamplesPanelItem.js +1 -0
- package/lib/components/panels/ExampleItem/GraphQLQueryItem.d.ts +5 -0
- package/lib/components/panels/ExampleItem/GraphQLQueryItem.js +1 -0
- package/lib/components/panels/ExampleItem/GraphQLResponseItem.d.ts +5 -0
- package/lib/components/panels/ExampleItem/GraphQLResponseItem.js +1 -0
- package/lib/components/panels/ExampleItem/GraphQLTypeSampleItem.d.ts +5 -0
- package/lib/components/panels/ExampleItem/GraphQLTypeSampleItem.js +1 -0
- package/lib/components/panels/ExampleItem/GraphQLVariablesItem.d.ts +5 -0
- package/lib/components/panels/ExampleItem/GraphQLVariablesItem.js +1 -0
- package/lib/components/panels/ExampleItem/PayloadExampleItem.d.ts +5 -0
- package/lib/components/panels/ExampleItem/PayloadExampleItem.js +4 -0
- package/lib/components/panels/ExampleItem/ResponseExampleItem.d.ts +5 -0
- package/lib/components/panels/ExampleItem/ResponseExampleItem.js +1 -0
- package/lib/components/panels/ExampleItem/ServerDropdown.d.ts +17 -0
- package/lib/components/panels/ExampleItem/ServerDropdown.js +11 -0
- package/lib/components/panels/ExampleItem/hooks.d.ts +25 -0
- package/lib/components/panels/ExampleItem/hooks.js +1 -0
- package/lib/components/panels/ExampleItem/selectors.d.ts +36 -0
- package/lib/components/panels/ExampleItem/selectors.js +1 -0
- package/lib/components/panels/ExampleItem/styled.d.ts +164 -0
- package/lib/components/panels/ExampleItem/styled.js +128 -0
- package/lib/components/panels/ExampleItem/types.d.ts +9 -0
- package/lib/components/panels/ExampleItem/types.js +0 -0
- package/lib/components/panels/GroupPanelItem.d.ts +5 -0
- package/lib/components/panels/GroupPanelItem.js +116 -0
- package/lib/components/panels/LanguageItem/LanguageDropdown.d.ts +15 -0
- package/lib/components/panels/LanguageItem/LanguageDropdown.js +1 -0
- package/lib/components/panels/LanguageItem/LanguageItem.d.ts +11 -0
- package/lib/components/panels/LanguageItem/LanguageItem.js +1 -0
- package/lib/components/panels/LanguageItem/LanguageList.d.ts +10 -0
- package/lib/components/panels/LanguageItem/LanguageList.js +1 -0
- package/lib/components/panels/LanguageItem/LanguageListSkeleton.d.ts +4 -0
- package/lib/components/panels/LanguageItem/LanguageListSkeleton.js +22 -0
- package/lib/components/panels/LanguageItem/LanguagePanelItem.d.ts +5 -0
- package/lib/components/panels/LanguageItem/LanguagePanelItem.js +1 -0
- package/lib/components/panels/LanguageItem/constants.d.ts +2 -0
- package/lib/components/panels/LanguageItem/constants.js +1 -0
- package/lib/components/panels/LanguageItem/styled.d.ts +94 -0
- package/lib/components/panels/LanguageItem/styled.js +96 -0
- package/lib/components/panels/LocationsPanelItem.d.ts +5 -0
- package/lib/components/panels/LocationsPanelItem.js +1 -0
- package/lib/components/panels/McpExamplePanelItem.d.ts +5 -0
- package/lib/components/panels/McpExamplePanelItem.js +6 -0
- package/lib/components/panels/McpPanelItem.d.ts +3 -0
- package/lib/components/panels/McpPanelItem.js +54 -0
- package/lib/components/panels/OverviewPanelItem.d.ts +3 -0
- package/lib/components/panels/OverviewPanelItem.js +17 -0
- package/lib/components/panels/PanelMapper.d.ts +5 -0
- package/lib/components/panels/PanelMapper.js +1 -0
- package/lib/components/panels/PanelNodeProps.d.ts +4 -0
- package/lib/components/panels/PanelNodeProps.js +0 -0
- package/lib/components/panels/ReferencesPanelItem.d.ts +5 -0
- package/lib/components/panels/ReferencesPanelItem.js +19 -0
- package/lib/components/panels/ServerItem/ServerDescriptionTooltip.d.ts +4 -0
- package/lib/components/panels/ServerItem/ServerDescriptionTooltip.js +1 -0
- package/lib/components/panels/ServerItem/ServerItem.d.ts +5 -0
- package/lib/components/panels/ServerItem/ServerItem.js +40 -0
- package/lib/components/panels/ServerItem/ServerPanelItem.d.ts +5 -0
- package/lib/components/panels/ServerItem/ServerPanelItem.js +1 -0
- package/lib/components/panels/asyncapi/BrokerItem/BrokerBindingsSection.d.ts +7 -0
- package/lib/components/panels/asyncapi/BrokerItem/BrokerBindingsSection.js +1 -0
- package/lib/components/panels/asyncapi/BrokerItem/BrokerModal.d.ts +8 -0
- package/lib/components/panels/asyncapi/BrokerItem/BrokerModal.js +49 -0
- package/lib/components/panels/asyncapi/BrokerItem/BrokerOverviewSection.d.ts +6 -0
- package/lib/components/panels/asyncapi/BrokerItem/BrokerOverviewSection.js +25 -0
- package/lib/components/panels/asyncapi/BrokerItem/BrokerPanel.styled.d.ts +7 -0
- package/lib/components/panels/asyncapi/BrokerItem/BrokerPanel.styled.js +25 -0
- package/lib/components/panels/asyncapi/BrokerItem/BrokerPanelItem.d.ts +5 -0
- package/lib/components/panels/asyncapi/BrokerItem/BrokerPanelItem.js +48 -0
- package/lib/components/panels/asyncapi/ChannelBindingItem/ChannelBindingItem.d.ts +5 -0
- package/lib/components/panels/asyncapi/ChannelBindingItem/ChannelBindingItem.js +32 -0
- package/lib/components/panels/asyncapi/MessageBindingItem/MessageBindingItem.d.ts +5 -0
- package/lib/components/panels/asyncapi/MessageBindingItem/MessageBindingItem.js +1 -0
- package/lib/components/panels/asyncapi/MessageReferencesItem/MessageReferencesItem.d.ts +5 -0
- package/lib/components/panels/asyncapi/MessageReferencesItem/MessageReferencesItem.js +42 -0
- package/lib/components/panels/asyncapi/OperationBindingItem/OperationBindingItem.d.ts +5 -0
- package/lib/components/panels/asyncapi/OperationBindingItem/OperationBindingItem.js +1 -0
- package/lib/components/panels/asyncapi/common/bindingPanel.d.ts +29 -0
- package/lib/components/panels/asyncapi/common/bindingPanel.js +48 -0
- package/lib/components/panels/shared-panel-styles.d.ts +8 -0
- package/lib/components/panels/shared-panel-styles.js +38 -0
- package/lib/components/panels/styled.d.ts +20 -0
- package/lib/components/panels/styled.js +28 -0
- package/lib/components/pluggable/RedocCodeSample.d.ts +12 -0
- package/lib/components/pluggable/RedocCodeSample.js +1 -0
- package/lib/components/pluggable/RedocExample.d.ts +8 -0
- package/lib/components/pluggable/RedocExample.js +7 -0
- package/lib/components/pluggable/RedocResponseSamples.d.ts +9 -0
- package/lib/components/pluggable/RedocResponseSamples.js +1 -0
- package/lib/components/pluggable/RedocSchema.d.ts +12 -0
- package/lib/components/pluggable/RedocSchema.js +1 -0
- package/lib/components/pluggable/index.d.ts +6 -0
- package/lib/components/pluggable/index.js +1 -0
- package/lib/constants/openapi.d.ts +30 -0
- package/lib/constants/openapi.js +1 -0
- package/lib/constants/rendering.d.ts +8 -0
- package/lib/constants/rendering.js +1 -0
- package/lib/contexts/markdownAdapter.d.ts +21 -0
- package/lib/contexts/markdownAdapter.js +1 -0
- package/lib/contexts/telemetry.d.ts +3 -0
- package/lib/contexts/telemetry.js +1 -0
- package/lib/empty-linkedom.d.ts +1 -0
- package/lib/empty-linkedom.js +1 -0
- package/lib/empty.d.ts +7 -0
- package/lib/empty.js +1 -0
- package/lib/events/codeSampleCopy.d.ts +2 -0
- package/lib/events/codeSampleCopy.js +1 -0
- package/lib/events/creator.d.ts +2 -0
- package/lib/events/creator.js +1 -0
- package/lib/events/index.d.ts +8 -0
- package/lib/events/index.js +1 -0
- package/lib/events/languageSwitch.d.ts +2 -0
- package/lib/events/languageSwitch.js +1 -0
- package/lib/events/panelToggle.d.ts +2 -0
- package/lib/events/panelToggle.js +1 -0
- package/lib/events/serverSwitch.d.ts +2 -0
- package/lib/events/serverSwitch.js +1 -0
- package/lib/events/tryItOpen.d.ts +2 -0
- package/lib/events/tryItOpen.js +1 -0
- package/lib/events/tryItSent.d.ts +2 -0
- package/lib/events/tryItSent.js +1 -0
- package/lib/events/types.d.ts +9 -0
- package/lib/events/types.js +1 -0
- package/lib/hoc/withItemId.d.ts +6 -0
- package/lib/hoc/withItemId.js +1 -0
- package/lib/hoc/withReplayPrefetch.d.ts +14 -0
- package/lib/hoc/withReplayPrefetch.js +1 -0
- package/lib/hoc/withRouter.d.ts +4 -0
- package/lib/hoc/withRouter.js +1 -0
- package/lib/hoc/withStoreProvider.d.ts +23 -0
- package/lib/hoc/withStoreProvider.js +1 -0
- package/lib/hooks/useApiDocsRoutes.d.ts +8 -0
- package/lib/hooks/useApiDocsRoutes.js +1 -0
- package/lib/hooks/useApiDocsScroll.d.ts +9 -0
- package/lib/hooks/useApiDocsScroll.js +1 -0
- package/lib/hooks/useBodyScrollLock.d.ts +1 -0
- package/lib/hooks/useBodyScrollLock.js +1 -0
- package/lib/hooks/useCodeHighlight.d.ts +28 -0
- package/lib/hooks/useCodeHighlight.js +1 -0
- package/lib/hooks/useCopyCodeTelemetry.d.ts +13 -0
- package/lib/hooks/useCopyCodeTelemetry.js +1 -0
- package/lib/hooks/useDeepLinkSection.d.ts +16 -0
- package/lib/hooks/useDeepLinkSection.js +1 -0
- package/lib/hooks/useExpandableSection.d.ts +4 -0
- package/lib/hooks/useExpandableSection.js +1 -0
- package/lib/hooks/useHashLinkRedirect.d.ts +4 -0
- package/lib/hooks/useHashLinkRedirect.js +1 -0
- package/lib/hooks/useIsExpanded.d.ts +1 -0
- package/lib/hooks/useIsExpanded.js +1 -0
- package/lib/hooks/useIsHydrated.d.ts +4 -0
- package/lib/hooks/useIsHydrated.js +1 -0
- package/lib/hooks/useLicense.d.ts +6 -0
- package/lib/hooks/useLicense.js +1 -0
- package/lib/hooks/useManualScrollAnchor.d.ts +19 -0
- package/lib/hooks/useManualScrollAnchor.js +1 -0
- package/lib/hooks/useModalDismiss.d.ts +2 -0
- package/lib/hooks/useModalDismiss.js +1 -0
- package/lib/hooks/useNormalizeUrl.d.ts +2 -0
- package/lib/hooks/useNormalizeUrl.js +1 -0
- package/lib/hooks/useRouterHashBridge.d.ts +21 -0
- package/lib/hooks/useRouterHashBridge.js +1 -0
- package/lib/hooks/useScrollSpyUrlSync.d.ts +3 -0
- package/lib/hooks/useScrollSpyUrlSync.js +1 -0
- package/lib/hooks/useTelemetry.d.ts +2 -0
- package/lib/hooks/useTelemetry.js +1 -0
- package/lib/hooks/useTelemetryPageMetrics.d.ts +12 -0
- package/lib/hooks/useTelemetryPageMetrics.js +1 -0
- package/lib/hooks/useTranslate.d.ts +5 -0
- package/lib/hooks/useTranslate.js +1 -0
- package/lib/hooks/useUrlHash.d.ts +7 -0
- package/lib/hooks/useUrlHash.js +1 -0
- package/lib/hooks/useUserScrollIntent.d.ts +18 -0
- package/lib/hooks/useUserScrollIntent.js +1 -0
- package/lib/hooks/useVisitedChannelsTracker.d.ts +6 -0
- package/lib/hooks/useVisitedChannelsTracker.js +1 -0
- package/lib/icons/CSharpIcon/CSharpIcon.d.ts +2 -0
- package/lib/icons/CSharpIcon/CSharpIcon.js +1 -0
- package/lib/icons/CSharpIcon/index.d.ts +1 -0
- package/lib/icons/CSharpIcon/index.js +1 -0
- package/lib/icons/CurlIcon/CurlIcon.d.ts +4 -0
- package/lib/icons/CurlIcon/CurlIcon.js +16 -0
- package/lib/icons/CurlIcon/index.d.ts +1 -0
- package/lib/icons/CurlIcon/index.js +1 -0
- package/lib/icons/DefaultMappingIcon/DefaultMappingIcon.d.ts +4 -0
- package/lib/icons/DefaultMappingIcon/DefaultMappingIcon.js +10 -0
- package/lib/icons/DefaultMappingIcon/index.d.ts +1 -0
- package/lib/icons/DefaultMappingIcon/index.js +1 -0
- package/lib/icons/GOIcon/GOIcon.d.ts +2 -0
- package/lib/icons/GOIcon/GOIcon.js +1 -0
- package/lib/icons/GOIcon/index.d.ts +1 -0
- package/lib/icons/GOIcon/index.js +1 -0
- package/lib/icons/JavaIcon/JavaIcon.d.ts +2 -0
- package/lib/icons/JavaIcon/JavaIcon.js +1 -0
- package/lib/icons/JavaIcon/index.d.ts +1 -0
- package/lib/icons/JavaIcon/index.js +1 -0
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.d.ts +2 -0
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +1 -0
- package/lib/icons/JavaScriptIcon/index.d.ts +1 -0
- package/lib/icons/JavaScriptIcon/index.js +1 -0
- package/lib/icons/ListIcon/ListIcon.d.ts +14 -0
- package/lib/icons/ListIcon/ListIcon.js +10 -0
- package/lib/icons/NodeJSIcon/NodeJSIcon.d.ts +2 -0
- package/lib/icons/NodeJSIcon/NodeJSIcon.js +1 -0
- package/lib/icons/NodeJSIcon/index.d.ts +1 -0
- package/lib/icons/NodeJSIcon/index.js +1 -0
- package/lib/icons/PHPIcon/PHPIcon.d.ts +2 -0
- package/lib/icons/PHPIcon/PHPIcon.js +1 -0
- package/lib/icons/PHPIcon/index.d.ts +1 -0
- package/lib/icons/PHPIcon/index.js +1 -0
- package/lib/icons/PayloadIcon/PayloadIcon.d.ts +2 -0
- package/lib/icons/PayloadIcon/PayloadIcon.js +1 -0
- package/lib/icons/PayloadIcon/index.d.ts +1 -0
- package/lib/icons/PayloadIcon/index.js +1 -0
- package/lib/icons/PlusCircleIcon/PlusCircleIcon.d.ts +7 -0
- package/lib/icons/PlusCircleIcon/PlusCircleIcon.js +10 -0
- package/lib/icons/PythonIcon/PythonIcon.d.ts +2 -0
- package/lib/icons/PythonIcon/PythonIcon.js +1 -0
- package/lib/icons/PythonIcon/index.d.ts +1 -0
- package/lib/icons/PythonIcon/index.js +1 -0
- package/lib/icons/RIcon/RIcon.d.ts +2 -0
- package/lib/icons/RIcon/RIcon.js +1 -0
- package/lib/icons/RIcon/index.d.ts +1 -0
- package/lib/icons/RIcon/index.js +1 -0
- package/lib/icons/RubyIcon/RubyIcon.d.ts +2 -0
- package/lib/icons/RubyIcon/RubyIcon.js +1 -0
- package/lib/icons/RubyIcon/index.d.ts +1 -0
- package/lib/icons/RubyIcon/index.js +1 -0
- package/lib/index.d.ts +60 -0
- package/lib/index.js +1 -0
- package/lib/jotai/app.d.ts +76 -0
- package/lib/jotai/app.js +1 -0
- package/lib/jotai/examples.d.ts +5 -0
- package/lib/jotai/examples.js +1 -0
- package/lib/jotai/graphql.d.ts +10 -0
- package/lib/jotai/graphql.js +1 -0
- package/lib/jotai/itemStore.d.ts +49 -0
- package/lib/jotai/itemStore.js +1 -0
- package/lib/jotai/routes.d.ts +4 -0
- package/lib/jotai/routes.js +1 -0
- package/lib/jotai/schema.d.ts +3 -0
- package/lib/jotai/schema.js +1 -0
- package/lib/jotai/store.d.ts +25 -0
- package/lib/jotai/store.js +1 -0
- package/lib/options/constants.d.ts +16 -0
- package/lib/options/constants.js +1 -0
- package/lib/options/helpers.d.ts +26 -0
- package/lib/options/helpers.js +1 -0
- package/lib/options/normalizeOptions.d.ts +2 -0
- package/lib/options/normalizeOptions.js +1 -0
- package/lib/pages/EntryPage.d.ts +25 -0
- package/lib/pages/EntryPage.js +5 -0
- package/lib/pages/GroupPage.d.ts +1 -0
- package/lib/pages/GroupPage.js +47 -0
- package/lib/pages/ItemPage.d.ts +1 -0
- package/lib/pages/ItemPage.js +26 -0
- package/lib/pages/NotFoundPage.d.ts +6 -0
- package/lib/pages/NotFoundPage.js +1 -0
- package/lib/pages/OverviewPage.d.ts +1 -0
- package/lib/pages/OverviewPage.js +11 -0
- package/lib/pages/TopLevelEntryView.d.ts +17 -0
- package/lib/pages/TopLevelEntryView.js +1 -0
- package/lib/services/code-samples/builder.d.ts +38 -0
- package/lib/services/code-samples/builder.js +1 -0
- package/lib/services/code-samples/constants/try-it-loading-state.d.ts +6 -0
- package/lib/services/code-samples/constants/try-it-loading-state.js +1 -0
- package/lib/services/code-samples/convertSampleToString.d.ts +3 -0
- package/lib/services/code-samples/convertSampleToString.js +17 -0
- package/lib/services/code-samples/discriminator.d.ts +39 -0
- package/lib/services/code-samples/discriminator.js +1 -0
- package/lib/services/code-samples/example-key.d.ts +25 -0
- package/lib/services/code-samples/example-key.js +1 -0
- package/lib/services/code-samples/generators/csharp-newtonsoft.d.ts +9 -0
- package/lib/services/code-samples/generators/csharp-newtonsoft.js +2 -0
- package/lib/services/code-samples/generators/csharp.d.ts +9 -0
- package/lib/services/code-samples/generators/csharp.js +2 -0
- package/lib/services/code-samples/generators/curl.d.ts +8 -0
- package/lib/services/code-samples/generators/curl.js +7 -0
- package/lib/services/code-samples/generators/go.d.ts +13 -0
- package/lib/services/code-samples/generators/go.js +3 -0
- package/lib/services/code-samples/generators/helpers/code-builder.d.ts +56 -0
- package/lib/services/code-samples/generators/helpers/code-builder.js +3 -0
- package/lib/services/code-samples/generators/helpers/mime.d.ts +1 -0
- package/lib/services/code-samples/generators/helpers/mime.js +1 -0
- package/lib/services/code-samples/generators/helpers/oauth2-snippets.d.ts +21 -0
- package/lib/services/code-samples/generators/helpers/oauth2-snippets.js +1 -0
- package/lib/services/code-samples/generators/helpers/php-array.d.ts +6 -0
- package/lib/services/code-samples/generators/helpers/php-array.js +5 -0
- package/lib/services/code-samples/generators/helpers/r-utils.d.ts +7 -0
- package/lib/services/code-samples/generators/helpers/r-utils.js +6 -0
- package/lib/services/code-samples/generators/helpers/shell.d.ts +8 -0
- package/lib/services/code-samples/generators/helpers/shell.js +1 -0
- package/lib/services/code-samples/generators/helpers/string-utils.d.ts +4 -0
- package/lib/services/code-samples/generators/helpers/string-utils.js +1 -0
- package/lib/services/code-samples/generators/helpers/stringify-js.d.ts +11 -0
- package/lib/services/code-samples/generators/helpers/stringify-js.js +8 -0
- package/lib/services/code-samples/generators/helpers/sub-request.d.ts +2 -0
- package/lib/services/code-samples/generators/helpers/sub-request.js +1 -0
- package/lib/services/code-samples/generators/helpers/url-helpers.d.ts +17 -0
- package/lib/services/code-samples/generators/helpers/url-helpers.js +2 -0
- package/lib/services/code-samples/generators/index.d.ts +16 -0
- package/lib/services/code-samples/generators/index.js +1 -0
- package/lib/services/code-samples/generators/java.d.ts +9 -0
- package/lib/services/code-samples/generators/java.js +3 -0
- package/lib/services/code-samples/generators/java8.d.ts +9 -0
- package/lib/services/code-samples/generators/java8.js +2 -0
- package/lib/services/code-samples/generators/javascript.d.ts +9 -0
- package/lib/services/code-samples/generators/javascript.js +1 -0
- package/lib/services/code-samples/generators/node.d.ts +10 -0
- package/lib/services/code-samples/generators/node.js +1 -0
- package/lib/services/code-samples/generators/php.d.ts +13 -0
- package/lib/services/code-samples/generators/php.js +6 -0
- package/lib/services/code-samples/generators/python.d.ts +3 -0
- package/lib/services/code-samples/generators/python.js +9 -0
- package/lib/services/code-samples/generators/r.d.ts +10 -0
- package/lib/services/code-samples/generators/r.js +7 -0
- package/lib/services/code-samples/generators/ruby.d.ts +10 -0
- package/lib/services/code-samples/generators/ruby.js +1 -0
- package/lib/services/code-samples/generators/types.d.ts +6 -0
- package/lib/services/code-samples/generators/types.js +0 -0
- package/lib/services/code-samples/har.d.ts +45 -0
- package/lib/services/code-samples/har.js +0 -0
- package/lib/services/code-samples/index.d.ts +8 -0
- package/lib/services/code-samples/index.js +1 -0
- package/lib/services/code-samples/replay/embedded-replay-converter.d.ts +6 -0
- package/lib/services/code-samples/replay/embedded-replay-converter.js +1 -0
- package/lib/services/code-samples/replay/from-openapi-document.d.ts +12 -0
- package/lib/services/code-samples/replay/from-openapi-document.js +1 -0
- package/lib/services/code-samples/replay/har-to-code-sample-har.d.ts +41 -0
- package/lib/services/code-samples/replay/har-to-code-sample-har.js +1 -0
- package/lib/services/code-samples/replay/index.d.ts +8 -0
- package/lib/services/code-samples/replay/index.js +1 -0
- package/lib/services/code-samples/replay/map-servers.d.ts +19 -0
- package/lib/services/code-samples/replay/map-servers.js +1 -0
- package/lib/services/code-samples/replay/merge-configure-into-source.d.ts +17 -0
- package/lib/services/code-samples/replay/merge-configure-into-source.js +1 -0
- package/lib/services/code-samples/replay/normalize-servers.d.ts +3 -0
- package/lib/services/code-samples/replay/normalize-servers.js +1 -0
- package/lib/services/code-samples/replay/overlay-converter.d.ts +15 -0
- package/lib/services/code-samples/replay/overlay-converter.js +1 -0
- package/lib/services/code-samples/replay/replay-adapter.d.ts +5 -0
- package/lib/services/code-samples/replay/replay-adapter.js +1 -0
- package/lib/services/code-samples/replay/replay-handler.d.ts +5 -0
- package/lib/services/code-samples/replay/replay-handler.js +1 -0
- package/lib/services/code-samples/replay/replay-predefined-env.d.ts +4 -0
- package/lib/services/code-samples/replay/replay-predefined-env.js +1 -0
- package/lib/services/code-samples/replay/replay-types.d.ts +75 -0
- package/lib/services/code-samples/replay/replay-types.js +0 -0
- package/lib/services/code-samples/resolvers.d.ts +5 -0
- package/lib/services/code-samples/resolvers.js +1 -0
- package/lib/services/code-samples/sample-har.d.ts +41 -0
- package/lib/services/code-samples/sample-har.js +0 -0
- package/lib/services/code-samples/server-variables.d.ts +11 -0
- package/lib/services/code-samples/server-variables.js +1 -0
- package/lib/services/code-samples/source.d.ts +107 -0
- package/lib/services/code-samples/source.js +0 -0
- package/lib/services/code-samples/use-resolvers.d.ts +2 -0
- package/lib/services/code-samples/use-resolvers.js +1 -0
- package/lib/services/code-samples/utils/map-request-values.d.ts +6 -0
- package/lib/services/code-samples/utils/map-request-values.js +1 -0
- package/lib/services/license/check.d.ts +14 -0
- package/lib/services/license/check.js +1 -0
- package/lib/services/operation-samples/index.d.ts +14 -0
- package/lib/services/operation-samples/index.js +2 -0
- package/lib/services/operation-samples/types.d.ts +37 -0
- package/lib/services/operation-samples/types.js +0 -0
- package/lib/services/schema/dialects/graphqlSchema.d.ts +1 -0
- package/lib/services/schema/dialects/graphqlSchema.js +1 -0
- package/lib/services/schema/dialects/jsonSchema.d.ts +3 -0
- package/lib/services/schema/dialects/jsonSchema.js +1 -0
- package/lib/services/schema/index.d.ts +1 -0
- package/lib/services/schema/index.js +1 -0
- package/lib/services/schema/propertyBuilder.d.ts +32 -0
- package/lib/services/schema/propertyBuilder.js +1 -0
- package/lib/services/schema/propertyTreeBuilder.d.ts +21 -0
- package/lib/services/schema/propertyTreeBuilder.js +1 -0
- package/lib/services/schema/schemaProcessor.d.ts +2 -0
- package/lib/services/schema/schemaProcessor.js +1 -0
- package/lib/services/schema/variant-label.d.ts +6 -0
- package/lib/services/schema/variant-label.js +1 -0
- package/lib/telemetry/RedocTelemetry.d.ts +15 -0
- package/lib/telemetry/RedocTelemetry.js +1 -0
- package/lib/types/asyncapi.d.ts +367 -0
- package/lib/types/asyncapi.js +1 -0
- package/lib/types/common.d.ts +168 -0
- package/lib/types/common.js +1 -0
- package/lib/types/content.d.ts +535 -0
- package/lib/types/content.js +0 -0
- package/lib/types/events.d.ts +75 -0
- package/lib/types/events.js +0 -0
- package/lib/types/graphql-store.d.ts +60 -0
- package/lib/types/graphql-store.js +1 -0
- package/lib/types/graphql.d.ts +54 -0
- package/lib/types/graphql.js +0 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/index.js +1 -0
- package/lib/types/openapi.d.ts +586 -0
- package/lib/types/openapi.js +1 -0
- package/lib/types/options.d.ts +260 -0
- package/lib/types/options.js +0 -0
- package/lib/types/pluggable.d.ts +4 -0
- package/lib/types/pluggable.js +0 -0
- package/lib/types/schema.d.ts +155 -0
- package/lib/types/schema.js +1 -0
- package/lib/types/store.d.ts +182 -0
- package/lib/types/store.js +0 -0
- package/lib/utils/calculateMaxLength.d.ts +6 -0
- package/lib/utils/calculateMaxLength.js +1 -0
- package/lib/utils/compose.d.ts +7 -0
- package/lib/utils/compose.js +1 -0
- package/lib/utils/cookies.d.ts +7 -0
- package/lib/utils/cookies.js +1 -0
- package/lib/utils/deep-link.d.ts +146 -0
- package/lib/utils/deep-link.js +1 -0
- package/lib/utils/environments.d.ts +6 -0
- package/lib/utils/environments.js +1 -0
- package/lib/utils/expansion.d.ts +3 -0
- package/lib/utils/expansion.js +1 -0
- package/lib/utils/extract-extensions.d.ts +4 -0
- package/lib/utils/extract-extensions.js +1 -0
- package/lib/utils/fetch-openapi-definition.d.ts +6 -0
- package/lib/utils/fetch-openapi-definition.js +1 -0
- package/lib/utils/form-urlencoded.d.ts +6 -0
- package/lib/utils/form-urlencoded.js +1 -0
- package/lib/utils/graphql-directive-utils.d.ts +6 -0
- package/lib/utils/graphql-directive-utils.js +3 -0
- package/lib/utils/graphql-reference-map.d.ts +3 -0
- package/lib/utils/graphql-reference-map.js +1 -0
- package/lib/utils/graphql-samples.d.ts +25 -0
- package/lib/utils/graphql-samples.js +17 -0
- package/lib/utils/graphql-scopes.d.ts +6 -0
- package/lib/utils/graphql-scopes.js +1 -0
- package/lib/utils/graphql-type-expansion.d.ts +5 -0
- package/lib/utils/graphql-type-expansion.js +1 -0
- package/lib/utils/http-methods.d.ts +8 -0
- package/lib/utils/http-methods.js +1 -0
- package/lib/utils/languages.d.ts +18 -0
- package/lib/utils/languages.js +1 -0
- package/lib/utils/loadAndBundleSpec.d.ts +4 -0
- package/lib/utils/loadAndBundleSpec.js +1 -0
- package/lib/utils/logo.d.ts +8 -0
- package/lib/utils/logo.js +1 -0
- package/lib/utils/media-type.d.ts +7 -0
- package/lib/utils/media-type.js +1 -0
- package/lib/utils/multipart.d.ts +7 -0
- package/lib/utils/multipart.js +1 -0
- package/lib/utils/refPointer.d.ts +2 -0
- package/lib/utils/refPointer.js +1 -0
- package/lib/utils/resolveText.d.ts +2 -0
- package/lib/utils/resolveText.js +1 -0
- package/lib/utils/routing.d.ts +49 -0
- package/lib/utils/routing.js +1 -0
- package/lib/utils/scroll-anchoring.d.ts +3 -0
- package/lib/utils/scroll-anchoring.js +1 -0
- package/lib/utils/security-scope.d.ts +3 -0
- package/lib/utils/security-scope.js +1 -0
- package/lib/utils/serialize-parameter.d.ts +8 -0
- package/lib/utils/serialize-parameter.js +1 -0
- package/lib/utils/serialize-querystring.d.ts +6 -0
- package/lib/utils/serialize-querystring.js +1 -0
- package/lib/utils/session-storage.d.ts +2 -0
- package/lib/utils/session-storage.js +1 -0
- package/lib/utils/split-badges-by-position.d.ts +5 -0
- package/lib/utils/split-badges-by-position.js +1 -0
- package/lib/utils/status-code.d.ts +1 -0
- package/lib/utils/status-code.js +1 -0
- package/lib/utils/string.d.ts +18 -0
- package/lib/utils/string.js +1 -0
- package/lib/utils/telemetry.d.ts +1 -0
- package/lib/utils/telemetry.js +1 -0
- package/lib/utils/url.d.ts +9 -0
- package/lib/utils/url.js +1 -0
- package/lib/utils/xml.d.ts +1 -0
- package/lib/utils/xml.js +1 -0
- package/package.json +97 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LayoutVariant } from '@redocly/config';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { ApiItem, ApiStore } from './types/store.js';
|
|
4
|
+
import type { RawApiDocsOptions } from './types/options.js';
|
|
5
|
+
import type { RedocTelemetryConfig } from './telemetry/RedocTelemetry.js';
|
|
6
|
+
import type { MarkdownAdapter } from './contexts/markdownAdapter.js';
|
|
7
|
+
type RedoclyApiDocsInnerProps = {
|
|
8
|
+
items: ApiItem[];
|
|
9
|
+
basePath: string;
|
|
10
|
+
markdownAdapter: MarkdownAdapter;
|
|
11
|
+
telemetryConfig?: Partial<RedocTelemetryConfig>;
|
|
12
|
+
};
|
|
13
|
+
type RedoclyApiDocsProps = RedoclyApiDocsInnerProps & {
|
|
14
|
+
store: ApiStore;
|
|
15
|
+
options: RawApiDocsOptions;
|
|
16
|
+
layout?: LayoutVariant;
|
|
17
|
+
};
|
|
18
|
+
declare const RedoclyApiDocsComponent: (props: RedoclyApiDocsInnerProps) => ReactElement;
|
|
19
|
+
declare const RedoclyApiDocs: import("react").FC<RedoclyApiDocsProps>;
|
|
20
|
+
export { RedoclyApiDocs, RedoclyApiDocsComponent };
|
|
21
|
+
export type { RedoclyApiDocsProps };
|
|
22
|
+
export default RedoclyApiDocs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t,jsxs as f}from"react/jsx-runtime";import{memo as g,useCallback as S,useMemo as b}from"react";import{useAtomValue as v}from"jotai";import{GlobalStyle as T}from"@redocly/theme/core/openapi";import{RedocTelemetry as w}from"./telemetry/RedocTelemetry.js";import{TelemetryContext as x}from"./contexts/telemetry.js";import{MarkdownAdapterProvider as R}from"./contexts/markdownAdapter.js";import{specTypeAtom as P}from"./jotai/store.js";import{useApiDocsRoutes as A}from"./hooks/useApiDocsRoutes.js";import{useTelemetry as C}from"./hooks/useTelemetry.js";import{useVisitedChannelsTracker as k}from"./hooks/useVisitedChannelsTracker.js";import{useRouterHashBridge as j}from"./hooks/useRouterHashBridge.js";import{useScrollSpyUrlSync as D}from"./hooks/useScrollSpyUrlSync.js";import{useTelemetryPageMetrics as E}from"./hooks/useTelemetryPageMetrics.js";import{EntryPage as V}from"./pages/EntryPage.js";import{ErrorBoundary as B}from"./components/ErrorBoundary.js";import{compose as M}from"./utils/compose.js";import{withRouter as U}from"./hoc/withRouter.js";import{withStoreProvider as I}from"./hoc/withStoreProvider.js";import{withReplayPrefetch as N}from"./hoc/withReplayPrefetch.js";const u=r=>{const{items:s=[],basePath:o,markdownAdapter:m,telemetryConfig:e}=r,{routeIndex:c}=A(s,o),i=v(P),n=e?.specType,l=e?.collectorUrl,p=e?.serviceName,a=e?.serviceVersion,d=e?.disabled,h=b(()=>new w({specType:n??i,collectorUrl:l,serviceName:p??"realm-ui",serviceVersion:a,disabled:d}),[i,n,l,p,a,d]);return t(R,{value:m,children:f(x.Provider,{value:h,children:[t(H,{}),t(_,{routeIndex:c,basePath:o})]})})};function H(){return k(),j(),D(),null}const _=({routeIndex:r,basePath:s})=>{const o=C();E();const m=S((e,c)=>{o.sendErrorMessage([{id:"errorBoundaryCatch",object:"error",uri:typeof window<"u"?window.location.href:"",details:{message:e.message,stack:c.componentStack??void 0}}])},[o]);return f(B,{onError:m,children:[t(T,{}),t(V,{routeIndex:r,basePath:s})]})},y=M(I,U,g,r=>N(r,{respectHideReplay:!0}))(u);var ce=y;export{y as RedoclyApiDocs,u as RedoclyApiDocsComponent,ce as default};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ApiItem, ApiStore } from './types/store.js';
|
|
2
|
+
import type { RawApiDocsOptions } from './types/options.js';
|
|
3
|
+
import type { RedocTelemetryConfig } from './telemetry/RedocTelemetry.js';
|
|
4
|
+
import type { MarkdownAdapter } from './contexts/markdownAdapter.js';
|
|
5
|
+
import type { RawLogo } from './types/common.js';
|
|
6
|
+
type RedoclyApiDocsStandaloneProps = {
|
|
7
|
+
items: ApiItem[];
|
|
8
|
+
store: ApiStore;
|
|
9
|
+
basePath: string;
|
|
10
|
+
options: RawApiDocsOptions;
|
|
11
|
+
logo?: RawLogo;
|
|
12
|
+
telemetryConfig?: Partial<RedocTelemetryConfig>;
|
|
13
|
+
markdownAdapter?: MarkdownAdapter;
|
|
14
|
+
};
|
|
15
|
+
declare const RedoclyApiDocsStandalone: import("react").FC<any>;
|
|
16
|
+
export { RedoclyApiDocsStandalone };
|
|
17
|
+
export type { RedoclyApiDocsStandaloneProps };
|
|
18
|
+
export default RedoclyApiDocsStandalone;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{Fragment as j,jsx as o,jsxs as f}from"react/jsx-runtime";import{memo as D,useMemo as a}from"react";import{createMarkdocAdapter as O}from"./components/markdoc/markdocAdapter.js";import{styled as h}from"styled-components";import{useAtomValue as e}from"jotai";import{SidebarLogo as z}from"@redocly/theme/components/SidebarLogo/SidebarLogo";import{ThemeDataContext as I}from"@redocly/theme/core/openapi";import{RedoclyApiDocsComponent as M}from"./RedoclyApiDocs.js";import{SideMenu as P}from"./components/SideMenu/SideMenu.js";import{StickySidebar as T}from"./components/StickySidebar/StickySidebar.js";import{isGraphqlDocsSidebarHidden as H}from"./options/helpers.js";import{toSidebarLogo as R}from"./utils/logo.js";import{globalOptionsAtom as V,licenseKeyAtom as _,storeAtom as F}from"./jotai/store.js";import{collapsedSidebarAtom as K}from"./jotai/app.js";import{useLicense as q}from"./hooks/useLicense.js";import{LicenseOverlay as G}from"./components/LicenseOverlay.js";import{compose as N}from"./utils/compose.js";import{withRouter as Y}from"./hoc/withRouter.js";import{withStoreProvider as $}from"./hoc/withStoreProvider.js";import{useCodeHighlight as B}from"./hooks/useCodeHighlight.js";const E=({children:t})=>{const r=a(()=>({hooks:{useCodeHighlight:()=>({highlight:B})}}),[]);return o(I.Provider,{value:r,children:t})},p=N($,Y,D)(({items:t,basePath:r,logo:g,telemetryConfig:b,markdownAdapter:n})=>{const i=e(V),u=e(F),v=e(_),{isValid:s,licenseInfo:y,isPending:S}=q(v),m=s?t:[],{hideSidebar:x,scrollYOffset:l,markdocOptions:d}=i,A=a(()=>n??O(d),[n,d]),k=e(K),w=!x&&!H(i),L=R(g)??i.apiLogo??u.logo,C=a(()=>{const c=l?.()??0;return c>0?{"--navbar-height":`${c}px`}:void 0},[l]);return o(E,{children:f(J,{style:C,children:[!S&&!s&&o(G,{licenseInfo:y}),w&&o(j,{children:f(T,{className:"menu-content",collapsedSidebar:k,children:[o(z,{dataTestId:"logo",...L}),o(P,{items:m})]})}),o(Q,{children:o(M,{items:m,basePath:r,markdownAdapter:A,telemetryConfig:b})})]})})}),J=h.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
position: relative;
|
|
4
|
+
min-height: 100vh;
|
|
5
|
+
text-align: left;
|
|
6
|
+
background-color: var(--bg-color);
|
|
7
|
+
font-family: var(--font-family-base);
|
|
8
|
+
font-size: var(--font-size-base);
|
|
9
|
+
line-height: var(--line-height-base);
|
|
10
|
+
font-weight: var(--font-weight-regular);
|
|
11
|
+
color: var(--text-color-primary);
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
|
|
15
|
+
[data-section-id],
|
|
16
|
+
[id]:has([data-deep-link-anchor]) {
|
|
17
|
+
scroll-margin-top: calc(var(--navbar-height, 0) + var(--banner-height, 0));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
* {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
}
|
|
23
|
+
`,Q=h.div`
|
|
24
|
+
flex: 1;
|
|
25
|
+
min-width: 0;
|
|
26
|
+
`;var uo=p;export{p as RedoclyApiDocsStandalone,uo as default};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AsyncApiDefinition } from '../../../types/asyncapi.js';
|
|
2
|
+
import type { AsyncApiBuildContext as BuildContext } from '../../../types/asyncapi.js';
|
|
3
|
+
import type { AdapterBuildContextInput, StoreContext } from '../../../types/store.js';
|
|
4
|
+
type CreateBuildContextInputWithDocument = AdapterBuildContextInput & {
|
|
5
|
+
document: AsyncApiDefinition;
|
|
6
|
+
storeCtx: StoreContext;
|
|
7
|
+
processContent?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function createBuildContext({ document, options, basePath, storeCtx, processContent, }: CreateBuildContextInputWithDocument): BuildContext;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{findFirstBinding as o,mapChannelToOperations as a}from"./utils.js";function s({document:n,options:e,basePath:r,storeCtx:i,processContent:t=!0}){return{document:n,options:e,basePath:r,storeCtx:i,protocol:o(n),channelToOperations:a(n),groups:{},items:[],descriptionItems:[],channelSummaries:new Map,processContent:t}}export{s as createBuildContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{REDOCLY_TEAMS_RBAC as I}from"@redocly/config";import{combineUrls as T}from"@redocly/theme/core/openapi";import{contentType as k,nodeTypes as l}from"../../../types/common.js";import{asString as x,safeSlugify as u}from"../../../utils/string.js";import{buildMarkdownSectionItem as E,extractMarkdownSections as L,extractContentUntilFirstHeading as A,extractSummaryText as O}from"../../utils/markdoc.js";import{parseMarkdown as M}from"../../utils/parseMarkdown.js";import{itemLabelsByProtocol as D}from"../utils/get-protocol-labels.js";import{buildTaggedChannelItem as R,buildUntaggedChannelItem as v}from"../items/channel/item.js";import{asyncApiContext as P}from"../buildContext.js";import{buildGroupItemsPanel as N}from"../panels/group.js";function Y(){const n=P.get(),{document:a,basePath:m,channelToOperations:S,protocol:g,processContent:f}=n,w=a.channels||{},d=a.components?.tags||{},h=new Map;for(const[t,e]of Object.entries(S)){const o=w[t];if(!o)continue;const r=[];for(const s of o.tags??[]){const p=x(s?.name);p&&r.push(p)}const i=`${D(g,o.bindings).channel}s`;for(const s of r){const p=u(s).toLowerCase();n.groups[s]||(n.groups[s]=[]);const y=T(m,p,i,t).toLowerCase(),C=x(o.summary)??O(o.description,n.options);C&&n.channelSummaries.set(y,C),h.set(y,o),n.groups[s].push(R({channelId:t,channel:o,operationIds:e,tagName:s}))}r.length||n.items.push(v({channelId:t,channel:o,operationIds:e}))}if(f)for(const t of Object.keys(n.groups)){const e=d[t];for(const o of L(e?.description,n.options,u(t).toLowerCase()))n.groups[t].push(E({heading:o,basePath:m}))}const b=[...Object.keys(n.groups).map(t=>{const e=n.groups[t],o=T(m,u(t)).toLowerCase(),r=d[t],c=n.options,i=r?.externalDocs,s=A(r?.description,c);return{label:t,type:"group",link:o,routeSlug:o,items:e,content:f?{contentType:k.GROUP,children:[{nodeType:l.CONTAINER,children:[{nodeType:l.HEADER,level:2,label:t,showPageActions:!0},...s?[{nodeType:l.MARKDOC,content:s}]:[],...i?.url?[{nodeType:l.EXTERNAL_DOCS,url:i.url,description:M(i.description,c)??[]}]:[]],panels:[{children:[N({group:e,protocol:g,channelByLink:h,context:n})]}]}]}:null}}),...n.items];if(a["x-tagGroups"]&&a["x-tagGroups"].length>0){const t=[],e=new Map;return b.forEach(o=>{o.label&&e.set(o.label,o)}),a["x-tagGroups"].forEach(o=>{t.push({label:o.name,type:"separator",[I]:o[I],content:null}),o.tags.forEach(r=>{const c=e.get(r);c&&t.push(c)})}),t}return b}export{Y as buildNavigationItems};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ProtocolVariant, AsyncApiDefinition } from '../../../types/asyncapi.js';
|
|
2
|
+
export declare function findFirstBinding(obj: unknown, visited?: Set<unknown>): ProtocolVariant | null;
|
|
3
|
+
export declare function mapChannelToOperations(rawAsyncApiDoc: AsyncApiDefinition): Record<string, string[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function f(e,s=new Set){if(s.has(e)||typeof e!="object"||e===null)return null;s.add(e);const o=e;for(const l of Object.keys(o)){const n=o[l];if(n&&typeof n=="object"&&"bindings"in n&&n.bindings)return Object.keys(n.bindings)[0];const t=f(n,s);if(t)return t}return null}function d(e){const s=e.operations??{},o=e.channels??{},l=Object.keys(o),n={},t={};for(const[i,a]of Object.entries(o))t[i]=[],a.address&&(n[a.address]=i);for(const[i,a]of Object.entries(s)){const r=a.channel;if(!r)continue;let c;typeof r.$ref=="string"?c=r.$ref.split("/").pop():typeof r.address=="string"&&(c=n[r.address]),!(!c||!l.includes(c))&&t[c].push(i)}return t}export{f as findFirstBinding,d as mapChannelToOperations};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createScopedContext as t}from"../scopedContext.js";const e=t("AsyncAPI");export{e as asyncApiContext};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ApiDocAdapterProps, ApiItem, ApiStore } from '../../types/store.js';
|
|
2
|
+
import type { AsyncApiDefinition } from '../../types/asyncapi.js';
|
|
3
|
+
import type { StoreContext } from '../../types/store.js';
|
|
4
|
+
export declare function processAsyncApiDocument(props: ApiDocAdapterProps & {
|
|
5
|
+
document: AsyncApiDefinition;
|
|
6
|
+
processContent?: boolean;
|
|
7
|
+
}): {
|
|
8
|
+
items: ApiItem[];
|
|
9
|
+
store: ApiStore;
|
|
10
|
+
};
|
|
11
|
+
export declare function buildAsyncApiItems({ document, options, basePath, processContent, }: ApiDocAdapterProps & {
|
|
12
|
+
document: AsyncApiDefinition;
|
|
13
|
+
processContent?: boolean;
|
|
14
|
+
}, storeCtx: StoreContext): ApiItem[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{populateAsyncApiStore as u}from"./store.js";import{createStoreContext as l,toRecord as a}from"../helpers.js";import{collectMarkdownSections as f}from"../utils/markdoc.js";import{buildOverviewItem as S}from"./items/overview/item.js";import{createBuildContext as d}from"./build/context.js";import{buildNavigationItems as x}from"./build/navigation.js";import{asyncApiContext as I}from"./buildContext.js";function k(t){const r=t.processContent??!0,e=l(a(t.document));return r&&u(t.document,e),{items:h({...t,processContent:r},e),store:{schemaStore:e.schemaStore,exampleStore:e.exampleStore,securitySchemeStore:e.securitySchemeStore}}}function h({document:t,options:r,basePath:e,processContent:i=!0},n){const o=d({document:t,options:r,basePath:e,storeCtx:n,processContent:i});return I.run(o,()=>{const{sectionItems:c,sectionChildren:s}=i?f(t.info?.description,o.basePath,o.options):{sectionItems:[],sectionChildren:[]},m=S(t.info??{},{basePath:e,document:t,options:r,protocol:o.protocol,sectionChildren:s,processContent:i});o.descriptionItems.push(...c);const p=x();return[m,...o.descriptionItems,...p]})}export{h as buildAsyncApiItems,k as processAsyncApiDocument};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ApiItemContent, MessageReferencesGroups } from '../../../../types/content.js';
|
|
2
|
+
import type { AsyncApiChannel, AsyncApiDefinition, ProtocolVariant } from '../../../../types/asyncapi.js';
|
|
3
|
+
import type { ParseMarkdownOptions } from '../../../utils/parseMarkdown.js';
|
|
4
|
+
export declare function buildMessageReferencesGroups(document: AsyncApiDefinition, messageKey: string, protocol: ProtocolVariant | null | undefined): MessageReferencesGroups;
|
|
5
|
+
export declare function buildChannelContent(channelId: string, channel: AsyncApiChannel, document: AsyncApiDefinition, markdownOptions: ParseMarkdownOptions, protocol?: ProtocolVariant | null): ApiItemContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{REDOCLY_TEAMS_RBAC as w}from"@redocly/config";import{combineUrls as Q}from"@redocly/theme/core/openapi";import{asString as G,safeSlugify as ne}from"../../../../utils/string.js";import{normalizePath as te}from"../../../../utils/url.js";import{JsonPointer as ae}from"../../../openapi/utils/JsonPointer.js";import{contentType as oe,itemVariant as ie,nodeTypes as c,panelKind as R,schemaKind as v}from"../../../../types/common.js";import{registerSchema as B,registerExample as re,readRbacScope as O,rbacProp as b,splitRbacSection as J}from"../../../helpers.js";import{parseMarkdown as I}from"../../../utils/parseMarkdown.js";import{componentLabelsByProtocol as le,itemLabelsByProtocol as ce}from"../../utils/get-protocol-labels.js";import{resolveInDoc as $}from"../../utils/resolveInDoc.js";import{getServerHost as H}from"../../utils/get-server-host.js";import{resolveAsyncApiSchema as Y}from"../../utils/resolve-schema.js";import{getChannelLabel as W}from"../../utils/get-channel-label.js";import{asyncApiContext as pe}from"../../buildContext.js";function de(S,n,f){const l={exchanges:[],queues:[]};if(!S.channels)return l;for(const[h,a]of Object.entries(S.channels)){if(!a?.messages?.[n])continue;const E=`${ce(f??null,a.bindings).channel}s`,i=a.tags?.map(N=>G(N?.name)).find(Boolean),p=i?ne(i).toLowerCase():void 0,k=te(p?Q(p,E,h).toLowerCase():Q(E,h).toLowerCase()),C={key:h,label:W(a,h),link:k};a.bindings?.amqp?.is==="routingKey"?l.exchanges.push(C):l.queues.push(C)}return l}function Re(S,n,f,l,h){const{storeCtx:a}=pe.get(),L=[],E=W(n,S),i=le({protocol:h??null,channelBindings:n.bindings}),p=[{nodeType:c.HEADER,level:2,label:E,badges:n["x-badges"],showPageActions:!0,protocolTag:{label:i.channel,color:i.channel.toLowerCase()}}],k=G(n.address);k&&p.push({nodeType:c.CHANNEL_ADDRESS,address:k});const C=I(n.summary,l);C&&p.push({nodeType:c.MARKDOC,content:C});const N=I(n.description,l);N&&p.push({nodeType:c.MARKDOC,content:N});const j=n.externalDocs;if(j?.url&&p.push({nodeType:c.EXTERNAL_DOCS,url:j.url,description:I(j.description,l)??[]}),n.parameters&&Object.keys(n.parameters).length>0){const{sectionRbac:d,entries:x}=J(n.parameters),g=x.map(([u,o])=>{const e=$(f,o)??o,m={type:e.location||"string"};e.enum&&(m.enum=e.enum),e.default!==void 0&&(m.default=e.default),e.description&&(m.description=e.description),e.examples?.length&&(m.examples=e.examples);const P=B(a.schemaStore,a.hashIndex,{kind:v.JSON_SCHEMA,data:m});return{name:u,in:"path",schemaId:P,description:e.description,...b(O(e))}});p.push({nodeType:c.HEADER,level:4,label:"Parameters",labelTranslationKey:"parameters",deepLinkSuffix:"parameters",...b(d)},{nodeType:c.ITEM,variant:"parameters",parameters:g,pointer:`channels/${S}/parameters`,...b(d)})}const D=[];if(f.servers&&n.servers){const d=n.servers.map(o=>$(f,o)).filter(o=>!!o&&!!H(o)),{sectionRbac:x,entries:g}=J(f.servers),u=g.filter(([,o])=>d.some(e=>H(e)===H(o)));u.length>0&&D.push({children:[{kind:R.BROKERS,panelLabel:i.servers,brokers:u.map(([o,e])=>({name:o,url:H(e),description:I(e.description,l)??[],protocol:e.protocol,protocolVersion:e.protocolVersion,pathname:e.pathname,title:e.title,summary:e.summary,tags:e.tags,externalDocs:e.externalDocs,bindings:e.bindings,variables:e.variables,...b(O(e)??x)}))}]})}if(n.bindings){const d=Object.entries(n.bindings);if(d.length>0){const[x,g]=d[0];D.push({title:i.channelBinding,children:[{kind:R.CHANNEL_BINDING,panelLabel:i.channelBinding,bindingKey:x,bindingValue:g}]})}}if(L.push({nodeType:c.CONTAINER,children:p,panels:D.length>0?D:void 0}),n.messages&&Object.keys(n.messages).length>0){const{sectionRbac:d,entries:x}=J(n.messages),g=[{nodeType:c.HEADER,level:4,label:"Messages",labelTranslationKey:"messages",deepLinkSuffix:"messages"}],u={},o=x.map(([t,y])=>{const s=$(f,y)??y;let A,F;const _=[],U=O(y)??O(s);if(a&&s.payload&&typeof s.payload=="object"){const r=Y(s.payload);r&&(A=B(a.schemaStore,a.hashIndex,{kind:v.JSON_SCHEMA,data:r}))}if(a&&s.headers&&typeof s.headers=="object"){const r=Y(s.headers);r&&(F=B(a.schemaStore,a.hashIndex,{kind:v.JSON_SCHEMA,data:r}))}if(a&&s.examples&&Array.isArray(s.examples)){for(const r of s.examples)if(r.payload){const M=re(a.exampleStore,{value:r.payload,summary:r.summary||r.name});_.push(M)}}if(a&&s.bindings){const r=Object.entries(s.bindings);for(const[M,K]of r){if(!K||typeof K!="object")continue;let X;if(M==="kafka"){const q=K.key;if(q&&typeof q=="object"){const se=Y(q);X=B(a.schemaStore,a.hashIndex,{kind:v.JSON_SCHEMA,data:{type:"object",properties:{key:se}}})}}u[t]={bindingKey:M,bindingValue:K,keySchemaId:X,...b(U)};break}}const V=s.externalDocs,ee=V?.url?{url:V.url,description:I(V.description,l)??[]}:void 0;return{name:t,label:s.title||s.name||t,summary:typeof s.summary=="string"?s.summary:void 0,description:I(s.description,l),contentType:s.contentType,schemaId:A,headerSchemaId:F,exampleIds:_.length>0?_:void 0,payload:s.payload,payloadLabel:i.payload,headers:s.headers,externalDocs:ee,...b(U)}});g.push({nodeType:c.ITEM,variant:"messages",messages:o,pointer:`channels/${S}/messages`});const e=o.filter(t=>!t[w]),m=e.flatMap(t=>t.exampleIds??[]),P=e.find(t=>t.schemaId)?.schemaId,Z=o.some(t=>t.schemaId||(t.exampleIds?.length??0)>0),z={};for(const t of o){const y=t[w];z[t.name]={schemaId:t.schemaId,exampleIds:t.exampleIds,...b(y)}}const T=[];if(Z&&T.push({children:[{kind:R.PAYLOAD,panelLabel:i.payload,exampleIds:m.length>0?m:void 0,schemaId:P,examples:m.map(()=>({})),messagesByKey:z}]}),Object.keys(u).length>0&&T.push({title:"Message configuration",children:[{kind:R.MESSAGE_BINDING,bindingsByMessageKey:u}]}),h==="amqp"){const t={};let y=!1;for(const s of o){const A=de(f,s.name,h);(A.exchanges.length>0||A.queues.length>0)&&(t[s.name]=A,y=!0)}y&&T.push({children:[{kind:R.MESSAGE_REFERENCES,referencesByMessageKey:t}]})}L.push({nodeType:c.CONTAINER,children:g,panels:T.length>0?T:void 0,...b(d)})}return{contentType:oe.ITEM,itemVariant:ie.CHANNEL,meta:{name:E,pointer:ae.compile(["channels",S]),protocolTag:{label:i.channel,color:i.channel.toLowerCase()}},seo:{title:E,description:G(n.description)},children:L}}export{Re as buildChannelContent,de as buildMessageReferencesGroups};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ApiItem } from '../../../../types/store.js';
|
|
2
|
+
import type { AsyncApiChannel } from '../../../../types/asyncapi.js';
|
|
3
|
+
export declare function buildTaggedChannelItem({ channelId, channel, operationIds, tagName, }: {
|
|
4
|
+
channelId: string;
|
|
5
|
+
channel: AsyncApiChannel;
|
|
6
|
+
operationIds: string[];
|
|
7
|
+
tagName: string;
|
|
8
|
+
}): ApiItem;
|
|
9
|
+
export declare function buildUntaggedChannelItem({ channelId, channel, operationIds, }: {
|
|
10
|
+
channelId: string;
|
|
11
|
+
channel: AsyncApiChannel;
|
|
12
|
+
operationIds: string[];
|
|
13
|
+
}): ApiItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{REDOCLY_TEAMS_RBAC as S}from"@redocly/config";import{combineUrls as h}from"@redocly/theme/core/openapi";import{asString as D,safeSlugify as T}from"../../../../utils/string.js";import{componentLabelsByProtocol as x,itemLabelsByProtocol as y}from"../../utils/get-protocol-labels.js";import{buildChannelContent as B}from"./content.js";import{buildOperationItem as O}from"../operation/item.js";import{asyncApiContext as k}from"../../buildContext.js";import{resolveItemSeo as E}from"../../../utils/seo.js";import{extractSeoDescriptionText as R}from"../../../utils/markdoc.js";import{getChannelLabel as U}from"../../utils/get-channel-label.js";function P(o,e,r){const n=U(o,e),s=R(o.description,r)??D(o.summary);return{label:n,seo:E(o,{title:n,description:s})}}function w(o,e,r){const n=o.filter(t=>e[t]?.action==="send"),s=o.filter(t=>e[t]?.action==="receive");return[...n,...s].map(t=>n[0]===t?{operationId:t,groupHeaderLabel:r.send}:s[0]===t?{operationId:t,groupHeaderLabel:r.receive}:{operationId:t})}function F({channelId:o,channel:e,operationIds:r,tagName:n}){const{document:s,basePath:i,options:t,protocol:l,processContent:a}=k.get(),d=s.operations||{},f=r.length>0,c=y(l??null,e.bindings),p=x({protocol:l??null,channelBindings:e.bindings}),m=`${c.channel}s`,u=T(n).toLowerCase(),L=h(i,u,m,o).toLowerCase(),C=w(r,d,{send:p.sendLabel,receive:p.receiveLabel}),{label:b,seo:v}=P(e,o,t);return{label:b,type:"group",link:L,routeSlug:L,badges:e?.["x-badges"]||[],httpVerb:c.channel,metadata:{seo:v},content:a?B(o,e,s,t,l):null,[S]:e?.[S],...f?{items:C.map(({operationId:g,groupHeaderLabel:H},A)=>O({operationId:g,operation:d[g],linkParts:[i,u,m,o,"operations",g],channelBindings:e.bindings,document:s,options:t,protocol:l,groupHeaderLabel:H,processContent:a,showDivider:A!==C.length-1}))}:{}}}function J({channelId:o,channel:e,operationIds:r}){const{document:n,basePath:s,options:i,protocol:t,processContent:l}=k.get(),a=n.operations||{},d=r.length>0,f=y(t??null,e.bindings),c=x({protocol:t??null,channelBindings:e.bindings}),p=`${f.channel}s`,m=h(s,p,o).toLowerCase(),u=w(r,a,{send:c.sendLabel,receive:c.receiveLabel}),{label:L,seo:C}=P(e,o,i);return{label:L,type:"group",link:m,routeSlug:m,httpVerb:f.channel,badges:e?.["x-badges"]||[],metadata:{seo:C},[S]:e?.[S],content:l?B(o,e,n,i,t):null,...d?{items:u.map(({operationId:b,groupHeaderLabel:v},g)=>O({operationId:b,operation:a[b],linkParts:[s,p,o,"operations",b],channelBindings:e.bindings,document:n,options:i,protocol:t,groupHeaderLabel:v,processContent:l,showDivider:g!==u.length-1}))}:{}}}export{F as buildTaggedChannelItem,J as buildUntaggedChannelItem};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ApiItemContent } from '../../../../types/content.js';
|
|
2
|
+
import type { AsyncApiDefinition, AsyncApiOperation, ProtocolVariant } from '../../../../types/asyncapi.js';
|
|
3
|
+
import type { ApiDocsOptions } from '../../../../types/options.js';
|
|
4
|
+
export declare function buildOperationContent(operationId: string, operation: AsyncApiOperation, document: AsyncApiDefinition, pageSlug: string, options: ApiDocsOptions, protocol?: ProtocolVariant | null, groupHeaderLabel?: string, showDivider?: boolean): ApiItemContent;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{contentType as q,itemVariant as Q,nodeTypes as t,panelKind as U,schemaKind as K}from"../../../../types/common.js";import{registerSchema as $}from"../../../helpers.js";import{parseMarkdown as T}from"../../../utils/parseMarkdown.js";import{asString as I,safeSlugify as W}from"../../../../utils/string.js";import{normalizePath as B,toRelativePath as _}from"../../../../utils/url.js";import{JsonPointer as Y}from"../../../openapi/utils/JsonPointer.js";import{componentLabelsByProtocol as Z}from"../../utils/get-protocol-labels.js";import{resolveInDoc as g}from"../../utils/resolveInDoc.js";import{resolveAsyncApiSchema as H}from"../../utils/resolve-schema.js";import{asyncApiContext as w}from"../../buildContext.js";function de(O,e,h,S,m,V,k,J){const{basePath:R}=w.get(),A=I(e.title)??I(e.summary)??O,y=Z({protocol:V??null}),{feedback:G}=m,z=e.action==="send"?y.sendLabel:y.receiveLabel,M=e.action==="send"?y.send:y.receive,r=[];k&&r.push({nodeType:t.HEADER,level:4,label:k}),r.push({nodeType:t.HEADER,level:5,label:A,badges:e["x-badges"]||[],showPageActions:!0,protocolTag:{label:M,color:e.action}});const N=T(typeof e.summary=="string"?e.summary:void 0,m);N&&r.push({nodeType:t.MARKDOC,content:N});const v=T(e.description,m);v&&r.push({nodeType:t.MARKDOC,content:v});const C=e.externalDocs;C?.url&&r.push({nodeType:t.EXTERNAL_DOCS,url:C.url,description:T(C.description,m)??[]});const D=e.channel?g(h,e.channel):void 0,F=D?.bindings;if(e.messages&&e.messages.length>0){const l=S.split("/operations/")[0].toLowerCase(),p=B(_(l,R)),i=D?.messages??{},a=e.messages.map(n=>{const d=n.$ref,c=typeof d=="string"?d.split("/messages/").pop():void 0;let s=Object.keys(i).find(o=>{const b=i[o].$ref?.split("/messages/").pop();return b!==void 0&&b===c})??c,u=n;for(let o=0;o<4&&u?.$ref;o++)u=g(h,u);const f=u??n;if(!s){const o=f.payload?.$ref;for(const[b,P]of Object.entries(i)){const j=g(h,P)??P,x=j.payload?.$ref;if(o&&x&&o===x||f.title&&j.title===f.title){s=b;break}}}const X=f.title||f.name||s||"Message";if(!s){const o=I(f.title);s=f.name||(o?W(o):void 0)}return s?{name:s,label:X}:void 0}).filter(n=>!!n);a.length>0&&r.push({nodeType:t.MESSAGE_LINKS,channelLink:p,messages:a})}if(e.reply){const l=[];e.reply.address?.location&&l.push(`Address: \`${e.reply.address.location}\``);const p=g(h,e.reply.channel);if(p?.address&&l.push(`${y.channel}: \`${p.address}\``),e.reply.messages?.length){const i=e.reply.messages.map(a=>{const n=g(h,a);return n?.title||n?.name||a.title||a.name||"Message"}).join(", ");l.push(`Messages: ${i}`)}l.length>0&&r.push({nodeType:t.HEADER,level:4,label:"Reply",labelTranslationKey:"reply",deepLinkSuffix:"reply"},{nodeType:t.MARKDOC,content:T(l.join(`
|
|
2
|
+
|
|
3
|
+
`),m)??[]})}const E=[];if(e.bindings){const l=Object.entries(e.bindings);if(l.length>0){const[p,i]=l[0];let a,n;const d=w.get().storeCtx;if(d&&p==="kafka"&&i&&typeof i=="object"){const c=i;if(c.groupId&&typeof c.groupId=="object"){const s=H(c.groupId);a=$(d.schemaStore,d.hashIndex,{kind:K.JSON_SCHEMA,data:{type:"object",properties:{groupId:s}}})}if(c.clientId&&typeof c.clientId=="object"){const s=H(c.clientId);n=$(d.schemaStore,d.hashIndex,{kind:K.JSON_SCHEMA,data:{type:"object",properties:{clientId:s}}})}}E.push({title:"Operation configuration",children:[{kind:U.OPERATION_BINDING,bindingKey:p,bindingValue:i,groupIdSchemaId:a,clientIdSchemaId:n}]})}}const L=[{nodeType:t.CONTAINER,children:r,panels:E.length>0?E:void 0}];return G?.hide!==!0&&L.push({nodeType:t.CONTAINER,children:[{nodeType:t.FEEDBACK,pageSlug:B(_(S,R).toLowerCase())}],panels:[]}),{contentType:q.ITEM,itemVariant:Q.CHANNEL_OPERATION,meta:{name:A,pointer:Y.compile(["operations",O]),protocolTag:{label:M,color:e.action},action:e.action,actionLabel:z,channelBindings:F},seo:{title:A,description:I(e.description)},children:L,showDivider:J}}export{de as buildOperationContent};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ApiItem } from '../../../../types/store.js';
|
|
2
|
+
import type { AsyncApiDefinition, AsyncApiOperation, ProtocolVariant } from '../../../../types/asyncapi.js';
|
|
3
|
+
import type { ApiDocsOptions } from '../../../../types/options.js';
|
|
4
|
+
export declare function buildOperationItem({ operationId, operation, linkParts, channelBindings, document, options, protocol, groupHeaderLabel, processContent, showDivider, }: {
|
|
5
|
+
operationId: string;
|
|
6
|
+
operation: AsyncApiOperation;
|
|
7
|
+
linkParts: string[];
|
|
8
|
+
channelBindings?: Record<string, unknown>;
|
|
9
|
+
document: AsyncApiDefinition;
|
|
10
|
+
options: ApiDocsOptions;
|
|
11
|
+
protocol?: ProtocolVariant | null;
|
|
12
|
+
groupHeaderLabel?: string;
|
|
13
|
+
processContent?: boolean;
|
|
14
|
+
showDivider?: boolean;
|
|
15
|
+
}): ApiItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{REDOCLY_TEAMS_RBAC as l}from"@redocly/config";import{combineUrls as C}from"@redocly/theme/core/openapi";import{asString as e}from"../../../../utils/string.js";import{itemLabelsByProtocol as L}from"../../utils/get-protocol-labels.js";import{resolveItemSeo as k}from"../../../utils/seo.js";import{extractSeoDescriptionText as O}from"../../../utils/markdoc.js";import{buildOperationContent as P}from"./content.js";function h({operationId:m,operation:t,linkParts:n,channelBindings:c,document:a,options:o,protocol:s,groupHeaderLabel:f,processContent:u=!0,showDivider:b}){const d=L(s??null,c),[p,...S]=n;let r=p??"";for(const y of S)r=C(r,y);r=r.toLowerCase();const i=e(t.title)??e(t.summary)??m,g=O(t.description,o)??e(t.summary),x=k(t,{title:i,description:g});return{label:i,type:"link",link:r,routeSlug:r,httpVerb:d[t.action]||"",badges:t?.["x-badges"]||[],metadata:{seo:x},[l]:t?.[l],content:u?P(m,t,a,r,o,s,f,b):null}}export{h as buildOperationItem};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AsyncApiDefinition } from '../../../../types/asyncapi.js';
|
|
2
|
+
import type { ApiItemContent, ContentNode } from '../../../../types/content.js';
|
|
3
|
+
import type { ApiDocsOptions } from '../../../../types/options.js';
|
|
4
|
+
export declare function buildOverviewContent({ document, options, protocol, sectionChildren, basePath, }: {
|
|
5
|
+
document: AsyncApiDefinition;
|
|
6
|
+
options: ApiDocsOptions;
|
|
7
|
+
protocol: string | null;
|
|
8
|
+
sectionChildren: ContentNode[];
|
|
9
|
+
basePath: string;
|
|
10
|
+
}): ApiItemContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{extractContentUntilFirstHeading as u}from"../../../utils/markdoc.js";import{parseMarkdown as T}from"../../../utils/parseMarkdown.js";import{contentType as h,nodeTypes as n}from"../../../../types/common.js";import{buildDownloadPanelContent as C}from"../../panels/download.js";import{buildOverviewPanelContent as R}from"../../panels/overview.js";import{buildBrokersPanelContent as v}from"../../panels/brokers.js";import{buildInfoMetadataContentNode as I}from"../../../utils/infoMetadata.js";function V({document:t,options:o,protocol:a,sectionChildren:p,basePath:s}){const e=t.info,c=u(e?.description,o),f=[C(o.downloadUrls??[]),R(e),...t.servers?[v(t.servers,a,o)]:[]],r={nodeType:n.OVERVIEW_SECTION_WRAPPER,children:[{nodeType:n.HEADER,showPageActions:!0,level:1,label:`${e?.title??""} ${e?.version??""}`.trim()}],sectionId:s};c?.length&&r.children.push({nodeType:n.OVERVIEW_SECTION_WRAPPER,children:[{nodeType:n.MARKDOC,content:c}],sectionId:s});const i=e?.externalDocs;if(i?.url){const m=T(i.description,o)??[];r.children.push({nodeType:n.EXTERNAL_DOCS,url:i.url,description:m})}const l=I(e,o.hideInfoMetadata),d=[r];l&&d.push(l),d.push(...p);const E={nodeType:n.CONTAINER,panels:f,children:d};return{contentType:h.OVERVIEW,children:[E]}}export{V as buildOverviewContent};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ApiItem } from '../../../../types/store.js';
|
|
2
|
+
import type { ContentNode } from '../../../../types/content.js';
|
|
3
|
+
import type { AsyncApiDefinition } from '../../../../types/asyncapi.js';
|
|
4
|
+
import type { ApiDocsOptions } from '../../../../types/options.js';
|
|
5
|
+
type Options = {
|
|
6
|
+
basePath: string;
|
|
7
|
+
document: AsyncApiDefinition;
|
|
8
|
+
options: ApiDocsOptions;
|
|
9
|
+
protocol: string | null;
|
|
10
|
+
sectionChildren: ContentNode[];
|
|
11
|
+
processContent?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function buildOverviewItem(info: {
|
|
14
|
+
title?: string;
|
|
15
|
+
}, options: Options): ApiItem;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildOverviewContent as u}from"./content.js";function p(e,n){const{basePath:t,document:o,options:i,protocol:l,sectionChildren:r,processContent:s=!0}=n;return{type:"link",label:e.title??"Overview",labelTranslationKey:e.title?void 0:"asyncapi.info.title",link:t,routeSlug:t,content:s?u({document:o,options:i,protocol:l,sectionChildren:r,basePath:t}):null}}export{p as buildOverviewItem};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AsyncApiServer } from '../../../types/asyncapi.js';
|
|
2
|
+
import type { ParseMarkdownOptions } from '../../utils/parseMarkdown.js';
|
|
3
|
+
import { type BrokersNode } from '../../../types/content.js';
|
|
4
|
+
export declare function buildBrokersPanelContent(servers: Record<string, AsyncApiServer>, protocol: string | null, markdownOptions: ParseMarkdownOptions): BrokersNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{panelKind as l}from"../../../types/common.js";import{componentLabelsByProtocol as e}from"../utils/get-protocol-labels.js";import{getServerHost as m}from"../utils/get-server-host.js";import{parseMarkdown as s}from"../../utils/parseMarkdown.js";import{readRbacScope as b,rbacProp as d,splitRbacSection as f}from"../../helpers.js";function x(n,i,a){const t=e({protocol:i}).servers,{sectionRbac:c,entries:p}=f(n);return{title:t,children:[{kind:l.BROKERS,panelLabel:t,brokers:p.map(([r,o])=>({name:r,url:m(o),description:s(o.description,a)??[],variables:o.variables,protocol:o.protocol,protocolVersion:o.protocolVersion,pathname:o.pathname,title:o.title,summary:o.summary,tags:o.tags,externalDocs:o.externalDocs,bindings:o.bindings,...d(b(o)??c)}))}]}}export{x as buildBrokersPanelContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{panelKind as e}from"../../../types/common.js";function l(t){return{title:"Download AsyncAPI description",titleTranslationKey:"download.description.title",children:t.map(n=>({kind:e.DOWNLOAD,label:n.title,url:n.url}))}}export{l as buildDownloadPanelContent};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GroupItemNode } from '../../../types/content.js';
|
|
2
|
+
import type { AsyncApiBuildContext } from '../../../types/asyncapi.js';
|
|
3
|
+
import type { ApiItem } from '../../../types/store.js';
|
|
4
|
+
export declare function buildGroupItemsPanel({ group, protocol, channelByLink, context, }: {
|
|
5
|
+
group: ApiItem[];
|
|
6
|
+
protocol: AsyncApiBuildContext['protocol'];
|
|
7
|
+
channelByLink: Map<string, {
|
|
8
|
+
bindings?: Record<string, unknown>;
|
|
9
|
+
} | undefined>;
|
|
10
|
+
context: AsyncApiBuildContext;
|
|
11
|
+
}): GroupItemNode['children'][0];
|
|
12
|
+
type VisibleGroupItem = ApiItem & {
|
|
13
|
+
link: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function isVisibleGroupItem(item: ApiItem): item is VisibleGroupItem;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{panelKind as f}from"../../../types/common.js";import{normalizePath as d,toRelativePath as k}from"../../../utils/url.js";import{componentLabelsByProtocol as r}from"../utils/get-protocol-labels.js";function w({group:t,protocol:e,channelByLink:c,context:m}){const{channelSummaries:p,basePath:u}=m,s=t.filter(L),l=s.map(n=>{const i=c.get(n.link);return r({protocol:e,channelBindings:i?.bindings})}),h=new Set(l.map(n=>n.channels)),a=r({protocol:e}),b=h.size===1?l[0]?.channels??a.channels:a.channels;return{kind:f.GROUP_ITEMS,title:b,items:s.map((n,i)=>{const o=l[i]?.channel??a.channel;return{title:n.label??n.link,summary:p.get(n.link),link:d(k(n.link,u)).toLowerCase(),prefix:{name:o,color:o.toLowerCase()},deprecated:!1}})}}function L(t){const{link:e}=t;return typeof e=="string"&&!e.includes("section")}export{w as buildGroupItemsPanel,L as isVisibleGroupItem};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{panelKind as l}from"../../../types/common.js";function i(e){const t=[];return e?.contact?.url&&t.push({kind:l.EXTERNAL_LINK,title:"URL",titleTranslationKey:"info.contact.url",label:e.contact.url,url:e.contact.url}),e?.contact?.email&&t.push({kind:l.EMAIL,title:e.contact.name||"E-mail",titleTranslationKey:e.contact.name?void 0:"info.contact.name",email:e.contact.email,label:e.contact.email,withCopyButton:!0,copyContent:e.contact.email}),e.license?.url&&e.license.name?t.push({kind:l.EXTERNAL_LINK,title:"License",titleTranslationKey:"info.license",label:e.license.name,url:e.license.url}):e.license?.name&&t.push({kind:l.ATTRIBUTE,title:"License",titleTranslationKey:"info.license",label:e.license.name,value:e.license.name}),e.termsOfService&&t.push({kind:l.EXTERNAL_LINK,label:"Terms of Service",labelTranslationKey:"info.termsOfService",url:e.termsOfService}),{title:"Overview",titleTranslationKey:"info.title",children:t}}export{i as buildOverviewPanelContent};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ApiStore } from '../../types/store.js';
|
|
2
|
+
import type { AsyncApiDefinition } from '../../types/asyncapi.js';
|
|
3
|
+
import type { StoreContext } from '../../types/store.js';
|
|
4
|
+
export declare function populateAsyncApiStore(document: AsyncApiDefinition, existingCtx: StoreContext): ApiStore;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{schemaKind as d}from"../../types/common.js";import{registerSchema as l,registerExample as u,readRbacScope as x,rbacProp as n,splitRbacSection as S}from"../helpers.js";import{resolveAsyncApiSchema as f}from"./utils/resolve-schema.js";function v(y,g){const{schemaStore:t,exampleStore:m,hashIndex:r}=g,c=y.components;if(!c)return{schemaStore:t,exampleStore:m,securitySchemeStore:{}};if(c.schemas){const{sectionRbac:i,entries:p}=S(c.schemas);for(const[a,e]of p){const o=f(e);o&&l(t,r,{id:`components/schemas/${a}`,kind:d.JSON_SCHEMA,title:a,data:o,...n(i)})}}if(c.messages){const{sectionRbac:i,entries:p}=S(c.messages);for(const[a,e]of p){const o=x(e)??i;if(e.payload){const s=f(e.payload);s&&l(t,r,{id:`components/messages/${a}/payload`,kind:d.JSON_SCHEMA,title:`${a} payload`,data:s,...n(o)})}if(e.headers){const s=f(e.headers);s&&l(t,r,{id:`components/messages/${a}/headers`,kind:d.JSON_SCHEMA,title:`${a} headers`,data:s,...n(o)})}if(e.examples)for(let s=0;s<e.examples.length;s++){const h=e.examples[s];u(m,{id:`components/messages/${a}/examples/${s}`,value:h.payload,summary:h.summary,...n(o)})}}}return{schemaStore:t,exampleStore:m,securitySchemeStore:{}}}export{v as populateAsyncApiStore};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function c(n,e){switch(n){case"null":return{type:"null"};case"boolean":return{type:"boolean"};case"int":case"long":return{type:"integer"};case"float":case"double":return{type:"number"};case"bytes":return{type:"string",contentEncoding:"base64"};case"string":return{type:"string"};default:{const t=e[n];return t?{...t}:{type:"null"}}}}function s(n){return{type:"string",enum:n.symbols,title:n.name,description:n.doc}}function a(n,e){const t={},r=[];return n.fields?.forEach(i=>{t[i.name]=u(i.type,e),i.doc&&(t[i.name].description=i.doc),i.default!==void 0&&(t[i.name].default=i.default),i.default===void 0&&!f(i.type)&&r.push(i.name)}),{type:"object",title:n.name,description:n.doc,properties:t,required:r.length>0?r:void 0,additionalProperties:!1}}function f(n){return Array.isArray(n)?n.some(e=>e==="null"||typeof e=="object"&&!Array.isArray(e)&&e.type==="null"):!1}function o(n,e){return{type:"array",items:u(n.items,e),description:n.doc}}function l(n,e){return{type:"object",additionalProperties:u(n.values,e),description:n.doc}}function d(n,e){const t=n.findIndex(r=>r==="null"||typeof r=="object"&&!Array.isArray(r)&&r.type==="null");if(t!==-1){const r=[...n];return r.splice(t,1),r.length===1?{...u(r[0],e),nullable:!0}:{oneOf:r.map(i=>u(i,e)),nullable:!0}}return{oneOf:n.map(r=>u(r,e))}}function u(n,e){if(typeof n=="string")return c(n,e);if(!n)return{type:"null"};let t={};if(Array.isArray(n))t=d(n,e);else if(typeof n.type=="string")switch(n.type){case"record":t=a(n,e);break;case"enum":t=s(n);break;case"array":t=o(n,e);break;case"map":t=l(n,e);break;default:t=c(n.type,e)}else n.items?t=o(n,e):n.values&&(t=l(n,e));return!Array.isArray(n)&&n.name&&(e[n.name]=t),t}function b(n){return{...u(n,{})}}export{b as avroToJsonSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{asString as t}from"../../../utils/string.js";function m(r,e){return t(r?.title)??t(r?.summary)??t(r?.address)??e}export{m as getChannelLabel};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AsyncApiChannelBinding, ProtocolVariant } from '../../../types/asyncapi.js';
|
|
2
|
+
type Options = {
|
|
3
|
+
channel: string;
|
|
4
|
+
channels: string;
|
|
5
|
+
servers: string;
|
|
6
|
+
server: string;
|
|
7
|
+
send: string;
|
|
8
|
+
receive: string;
|
|
9
|
+
sendLabel: string;
|
|
10
|
+
receiveLabel: string;
|
|
11
|
+
channelBinding: string;
|
|
12
|
+
payload: string;
|
|
13
|
+
};
|
|
14
|
+
type Params = {
|
|
15
|
+
protocol: string | null;
|
|
16
|
+
channelBindings?: AsyncApiChannelBinding;
|
|
17
|
+
};
|
|
18
|
+
export declare function componentLabelsByProtocol({ protocol, channelBindings }: Params): Options;
|
|
19
|
+
export declare function itemLabelsByProtocol(protocol: ProtocolVariant | null, channelBindings?: AsyncApiChannelBinding): {
|
|
20
|
+
channel: string;
|
|
21
|
+
send: string;
|
|
22
|
+
receive: string;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a={channel:"Channel",channels:"Channels",servers:"Servers",server:"Server",send:"Send",receive:"Receive",sendLabel:"Send",receiveLabel:"Receive",channelBinding:"Channel binding",payload:"Payload"},s={channel:"Topic",channels:"Topics",servers:"Brokers",server:"Broker",send:"Pub",receive:"Sub",sendLabel:"Publish",receiveLabel:"Subscribe",channelBinding:"Topic configuration",payload:"Value"},c={channel:"Exchange",channels:"Exchanges",servers:"Brokers",server:"Broker",send:"Pub",receive:"Cons",sendLabel:"Publish",receiveLabel:"Consume",channelBinding:"Exchange configuration",payload:"Payload"},i={channel:"Queue",channels:"Queues",servers:"Brokers",server:"Broker",send:"Pub",receive:"Cons",sendLabel:"Publish",receiveLabel:"Consume",channelBinding:"Queue configuration",payload:"Payload"};function o({protocol:e,channelBindings:n}){const r=n?.amqp?.is==="routingKey";switch(e){case"kafka":return s;case"amqp":return r?c:i;default:return a}}function l(e,n){switch(e){case"kafka":return{channel:"topic",send:"pub",receive:"sub"};case"amqp":return{channel:n?.amqp?.is==="routingKey"?"exch":"queue",send:"pub",receive:"cons"};default:return{channel:"channel",send:"send",receive:"receive"}}}export{o as componentLabelsByProtocol,l as itemLabelsByProtocol};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function o(t){return t.host??t.url}export{o as getServerHost};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{avroToJsonSchema as t}from"./avro-to-json-schema.js";const n=["application/vnd.apache.avro","application/vnd.apache.avro+json","application/vnd.apache.avro+yaml"];function c(o){return o?n.some(r=>o.startsWith(r)):!1}function i(o){return typeof o=="object"&&o!==null&&"schema"in o&&"schemaFormat"in o}function e(o){return!o||typeof o!="object"?o:i(o)?c(o.schemaFormat)?t(o.schema):o.schema:o}export{e as resolveAsyncApiSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveRef as r}from"../../helpers.js";function t(e,o){return r(e,o)}export{t as resolveInDoc};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DocumentNode } from 'graphql';
|
|
2
|
+
import type { ApiDocAdapterProps, ApiItem, ApiStore } from '../types/store.js';
|
|
3
|
+
import type { OpenAPIDefinition } from '../types/openapi.js';
|
|
4
|
+
import type { AsyncApiDefinition } from '../types/asyncapi.js';
|
|
5
|
+
import type { ApiSpecType } from '../types/common.js';
|
|
6
|
+
import type { RawApiDocsOptions } from '../types/options.js';
|
|
7
|
+
import type { MarkdownParser } from './utils/parseMarkdown.js';
|
|
8
|
+
type ApiDocProps = Omit<ApiDocAdapterProps, 'options'> & {
|
|
9
|
+
options: RawApiDocsOptions;
|
|
10
|
+
markdownParser: MarkdownParser;
|
|
11
|
+
};
|
|
12
|
+
type BuildItemsResult = {
|
|
13
|
+
items: ApiItem[];
|
|
14
|
+
store: ApiStore;
|
|
15
|
+
specType: ApiSpecType;
|
|
16
|
+
};
|
|
17
|
+
export declare function buildItems(props: ApiDocProps): Promise<BuildItemsResult>;
|
|
18
|
+
export declare function isOpenApiDefinition(def: ApiDocProps): def is ApiDocProps & {
|
|
19
|
+
type: 'openapi';
|
|
20
|
+
document: OpenAPIDefinition;
|
|
21
|
+
};
|
|
22
|
+
export declare function isAsyncApiDefinition(def: ApiDocProps): def is ApiDocProps & {
|
|
23
|
+
type: 'asyncapi';
|
|
24
|
+
document: AsyncApiDefinition;
|
|
25
|
+
};
|
|
26
|
+
export declare function isGraphqlDefinition(def: ApiDocProps): def is ApiDocProps & {
|
|
27
|
+
type: 'graphql';
|
|
28
|
+
document: DocumentNode;
|
|
29
|
+
};
|
|
30
|
+
export declare function buildNavItems(props: ApiDocProps): Promise<Omit<BuildItemsResult, 'store'>>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{normalizeOptions as s}from"../options/normalizeOptions.js";import{propagateRbacToReferencedEntries as m}from"./rbac-schema-propagation.js";async function f(e){const i=e.type,o={...s(e.options),markdownParser:e.markdownParser};let t;if(r(e)){const{processOpenApiDocument:n}=await import("./openapi/index.js");t=await n({...e,options:o})}else if(c(e)){const{processAsyncApiDocument:n}=await import("./asyncapi/index.js");t=n({...e,options:o})}else if(a(e)){const{processGraphqlDocument:n}=await import("./graphql/index.js");t=n({...e,options:o})}return t?(m(t.items,t.store),{items:t.items,store:t.store,specType:i}):{items:[],store:{schemaStore:{},exampleStore:{},securitySchemeStore:{}},specType:i}}function r(e){return e.type==="openapi"}function c(e){return e.type==="asyncapi"}function a(e){return e.type==="graphql"}async function l(e){const i=e.type,o={...s(e.options),markdownParser:e.markdownParser};if(r(e)){const{processOpenApiDocument:t}=await import("./openapi/index.js"),{items:n}=await t({...e,options:o,processContent:!1});return{items:n,specType:i}}else if(c(e)){const{processAsyncApiDocument:t}=await import("./asyncapi/index.js"),{items:n}=t({...e,options:o,processContent:!1});return{items:n,specType:i}}else if(a(e)){const{processGraphqlDocument:t}=await import("./graphql/index.js"),{items:n}=t({...e,options:o,processContent:!1});return{items:n,specType:i}}return{items:[],specType:i}}export{f as buildItems,l as buildNavItems,c as isAsyncApiDefinition,a as isGraphqlDefinition,r as isOpenApiDefinition};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DocumentNode, GraphQLSchema } from 'graphql';
|
|
2
|
+
import type { AdapterBuildContextInput } from '../../../types/store.js';
|
|
3
|
+
import type { GraphqlBuildContext as BuildContext } from '../../../types/graphql.js';
|
|
4
|
+
export type CreateBuildContextInputWithDocumentAndSchema = AdapterBuildContextInput & {
|
|
5
|
+
document: DocumentNode;
|
|
6
|
+
prebuiltSchema?: GraphQLSchema;
|
|
7
|
+
processContent?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function createBuildContext({ document, options, basePath, prebuiltSchema, processContent, }: CreateBuildContextInputWithDocumentAndSchema): BuildContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildASTSchema as m}from"graphql";import{normalizeMenuConfig as f}from"../utils/normalizeMenu.js";import{extractInfoFromDirectives as a}from"../../../utils/graphql-directive-utils.js";function h({document:t,options:e,basePath:o,prebuiltSchema:r,processContent:i=!0}){const c=r??m(t),n=a(c);return{basePath:o,schema:c,menuConfig:f(e?.menu,c),options:n?{...e,info:{...n,...e?.info,contact:{...n.contact,...e?.info?.contact},license:{...n.license,...e?.info?.license}}}:e,processContent:i}}export{h as createBuildContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createScopedContext as t}from"../scopedContext.js";const e=t("GraphQL");export{e as graphqlContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildASTSchema as o,parse as p}from"graphql";import{populateGraphqlStore as t}from"./store.js";function m(r){return t(o(p(r)))}export{m as buildGraphqlStoreFromSdl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{itemVariant as c}from"../../../types/common.js";import{getItemDoesNotMatchAnyGroupErrorMessage as y}from"./errors.js";import{buildDirectiveItems as C}from"../items/directive/item.js";import{buildQueryItems as E}from"../items/query/item.js";import{buildMutationItems as P}from"../items/mutation/item.js";import{buildSubscriptionItems as S}from"../items/subscription/item.js";import{buildObjectItems as U}from"../items/object/item.js";import{buildEnumItems as L}from"../items/enum/item.js";import{buildScalarItems as O}from"../items/scalar/item.js";import{buildInputItems as R}from"../items/input/item.js";import{buildUnionItems as A}from"../items/union/item.js";import{buildInterfaceItems as B}from"../items/interface/item.js";import{createGroup as p}from"./utils.js";import{graphqlContext as b}from"../buildContext.js";import{joinWithSeparator as d}from"../../../utils/url.js";import{safeSlugify as h}from"../../../utils/string.js";import{DEFAULT_GROUP_LABELS as T,GRAPHQL_VARIANTS as F}from"../utils/constants.js";import{GRAPHQL_MENU_GROUP_ITEM_BUILDERS as G}from"./itemBuilders.js";function et(){const{menuConfig:t}=b.get();if(!t?.groups)return[];const r=[],i=new Set;for(const e of t.groups){const o=M(e,i);o&&r.push(o)}if(t.requireExactGroups){const e=q(i);if(e)throw new Error(y(e))}else{const e=N(i);e&&r.push(e)}return r}function q(t){for(const r of F){const[i]=G[r]({processedItems:t});if(i)return`${w(r)} ${i.label}`}}function w(t){return t===c.QUERY||t===c.MUTATION||t===c.SUBSCRIPTION?"Operation":t===c.DIRECTIVE?"Directive":"Type"}function M(t,r){const e=t.items,o=t.types,m=[],l=b.get(),n=d(l.basePath,h(t.name?.toLowerCase())),s=(u,f)=>{if(!u)return;const I=f();I.length>0&&m.push(...I)},a=Object.entries(t).map(([u])=>u).filter(_);if(e){const u=["queries","mutations","subscriptions","directives","types"];for(const f of u)a.includes(f)||a.push(f)}for(const u of a)switch(u){case"queries":s(!!(t.queries||e),()=>E({filter:t.queries,processedItems:r,menuCommonFilter:e,parentPath:n}));break;case"mutations":s(!!(t.mutations||e),()=>P({filter:t.mutations,processedItems:r,menuCommonFilter:e,parentPath:n}));break;case"subscriptions":s(!!(t.subscriptions||e),()=>S({filter:t.subscriptions,processedItems:r,menuCommonFilter:e,parentPath:n}));break;case"directives":s(!!(t.directives||e),()=>C({filter:t.directives,processedItems:r,menuCommonFilter:e,parentPath:n}));break;case"types":s(!!(o||e),()=>[...U({filter:o,processedItems:r,menuCommonFilter:e,parentPath:n}),...B({filter:o,processedItems:r,menuCommonFilter:e,parentPath:n}),...A({filter:o,processedItems:r,menuCommonFilter:e,parentPath:n}),...L({filter:o,processedItems:r,menuCommonFilter:e,parentPath:n}),...R({filter:o,processedItems:r,menuCommonFilter:e,parentPath:n}),...O({filter:o,processedItems:r,menuCommonFilter:e})]);break}return m.length===0?null:p({label:t.name,items:m})}function N(t){const r=b.get(),i=r.menuConfig?.otherItemsGroupName||"Other",e=d(r.basePath,h(i?.toLowerCase())),o=[];for(const m of F){const l=G[m]({processedItems:t,parentPath:d(e,h(T[m]?.toLowerCase()))});l.length>0&&o.push(p({parentPath:e,typeGroup:m,items:l}))}return o.length===0?null:p({label:i,items:o})}function _(t){return t==="queries"||t==="mutations"||t==="subscriptions"||t==="directives"||t==="types"}export{et as groupByCustomMenu};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GRAPHQL_VARIANTS as p}from"../utils/constants.js";import{GRAPHQL_MENU_GROUP_ITEM_BUILDERS as e}from"./itemBuilders.js";import{createGroup as f}from"./utils.js";function i(){const o=[];for(const r of p){const t=e[r]();t.length>0&&o.push(f({typeGroup:r,items:t}))}return o}export{i as groupByDefault};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getItemDoesNotMatchAnyGroupErrorMessage(itemDescription: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(o){return`All items in the GraphQL definition should belong to some group in strict mode. ${o} doesn't match any of the groups.`}export{t as getItemDoesNotMatchAnyGroupErrorMessage};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { GraphqlItemVariant } from '../../../types/graphql.js';
|
|
2
|
+
import type { ApiItem } from '../../../types/store.js';
|
|
3
|
+
import type { GraphqlMenuGroupItemsBuildParams } from '../items/types.js';
|
|
4
|
+
export type GraphqlMenuGroupItemsBuilder = (args?: GraphqlMenuGroupItemsBuildParams) => ApiItem[];
|
|
5
|
+
export declare const GRAPHQL_MENU_GROUP_ITEM_BUILDERS: Record<GraphqlItemVariant, GraphqlMenuGroupItemsBuilder>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{itemVariant as m}from"../../../types/common.js";import{buildDirectiveItems as t}from"../items/directive/item.js";import{buildEnumItems as i}from"../items/enum/item.js";import{buildInputItems as r}from"../items/input/item.js";import{buildInterfaceItems as o}from"../items/interface/item.js";import{buildMutationItems as I}from"../items/mutation/item.js";import{buildObjectItems as e}from"../items/object/item.js";import{buildQueryItems as u}from"../items/query/item.js";import{buildScalarItems as p}from"../items/scalar/item.js";import{buildSubscriptionItems as b}from"../items/subscription/item.js";import{buildUnionItems as f}from"../items/union/item.js";const O={[m.QUERY]:u,[m.MUTATION]:I,[m.SUBSCRIPTION]:b,[m.DIRECTIVE]:t,[m.OBJECT]:e,[m.INTERFACE]:o,[m.INPUT]:r,[m.UNION]:f,[m.ENUM]:i,[m.SCALAR]:p};export{O as GRAPHQL_MENU_GROUP_ITEM_BUILDERS};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ApiItem } from '../../../types/store.js';
|
|
2
|
+
import type { GraphqlItemVariant } from '../../../types/graphql.js';
|
|
3
|
+
export declare function createGroup({ typeGroup, items, label, parentPath, }: {
|
|
4
|
+
items: ApiItem[];
|
|
5
|
+
typeGroup?: GraphqlItemVariant;
|
|
6
|
+
label?: string;
|
|
7
|
+
parentPath?: string;
|
|
8
|
+
}): ApiItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{contentType as s,nodeTypes as a}from"../../../types/common.js";import{safeSlugify as c}from"../../../utils/string.js";import{joinWithSeparator as m}from"../../../utils/url.js";import{DEFAULT_GROUP_LABELS as u}from"../utils/constants.js";import{buildGroupItemsPanelContent as f}from"../panels/group-items.js";import{graphqlContext as g}from"../buildContext.js";function y({typeGroup:e,items:n,label:r,parentPath:p}){const t=g.get(),o=r??(e?u[e]:"Overview"),l=r?void 0:e?o.toLowerCase():"info.title",i=m(p??t.basePath,c(o?.toLowerCase()));return{type:"group",label:o,labelTranslationKey:l,link:i,routeSlug:i,items:n,content:t.processContent?{contentType:s.GROUP,children:[{nodeType:a.CONTAINER,children:[{nodeType:a.HEADER,level:2,label:o,labelTranslationKey:l,showPageActions:!0}],panels:[f(n,t,e)]}]}:null}}export{y as createGroup};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DocumentNode } from 'graphql';
|
|
2
|
+
import type { ApiDocAdapterProps, ApiItem, ApiStore } from '../../types/store.js';
|
|
3
|
+
export declare function processGraphqlDocument({ document, options, basePath, processContent, }: ApiDocAdapterProps & {
|
|
4
|
+
document: DocumentNode;
|
|
5
|
+
processContent?: boolean;
|
|
6
|
+
}): {
|
|
7
|
+
items: ApiItem[];
|
|
8
|
+
store: ApiStore;
|
|
9
|
+
};
|
|
10
|
+
export declare function buildGraphqlItems(): ApiItem[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildASTSchema as c}from"graphql";import{createBuildContext as p}from"./build/context.js";import{populateGraphqlStore as u}from"./store.js";import{collectMarkdownSections as l}from"../utils/markdoc.js";import{groupByDefault as a}from"./group/default.js";import{groupByCustomMenu as f}from"./group/custom.js";import{buildOverviewItem as h}from"./items/overview/item.js";import{graphqlContext as n}from"./buildContext.js";function w({document:t,options:o,basePath:r,processContent:i=!0}){const e=c(t),s=i?u(e):{schemaStore:{},exampleStore:{},securitySchemeStore:{}},m=p({document:t,options:o,basePath:r,prebuiltSchema:e,processContent:i});return n.run(m,()=>({items:S(),store:s}))}function S(){const t=n.get(),{sectionItems:o,sectionChildren:r}=t.processContent?l(t.options.info?.description||"",t.basePath,t.options):{sectionItems:[],sectionChildren:[]},e=[h(t,r),...o];return t.menuConfig?.groups?e.push(...f()):e.push(...a()),e}export{S as buildGraphqlItems,w as processGraphqlDocument};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GraphQLDirective } from 'graphql';
|
|
2
|
+
import type { ApiItemContent } from '../../../../types/content.js';
|
|
3
|
+
import type { ParseMarkdownOptions } from '../../../utils/parseMarkdown.js';
|
|
4
|
+
export declare function buildDirectiveContent(directive: GraphQLDirective, markdownOptions: ParseMarkdownOptions): ApiItemContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{contentType as i,itemVariant as r,nodeTypes as a,panelKind as m}from"../../../../types/common.js";import{parseMarkdown as p}from"../../../utils/parseMarkdown.js";function u(n,o){const t=[{nodeType:a.HEADER,level:2,label:`@${n.name}`,showPageActions:!0}],l=p(n.description,o);l&&t.push({nodeType:a.MARKDOC,content:l}),n.args&&n.args.length>0&&t.push({nodeType:a.ITEM,variant:"graphql-args",label:"Arguments",labelTranslationKey:"arguments.label",graphqlTypeName:n.name,graphqlSchema:n.args.map(e=>({name:e.name,type:e.type.toString(),description:p(e.description,o)??[],deprecationReason:e.deprecationReason||void 0,defaultValue:e.defaultValue}))});const s=[];return n.locations&&n.locations.length>0&&s.push({title:"Locations",titleTranslationKey:"locations",children:[{kind:m.LOCATIONS,locations:[...n.locations]}]}),{contentType:i.ITEM,itemVariant:r.DIRECTIVE,meta:{name:n.name},seo:{title:`@${n.name}`,description:n.description||void 0},children:[{nodeType:a.CONTAINER,children:t,panels:s}]}}export{u as buildDirectiveContent};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ApiItem } from '../../../../types/store.js';
|
|
2
|
+
import type { GraphqlMenuGroupItemsBuildParams } from '../types.js';
|
|
3
|
+
export declare function buildDirectiveItems({ filter, processedItems, menuCommonFilter, parentPath, }?: GraphqlMenuGroupItemsBuildParams): ApiItem[];
|