UNPKG

@backstage/plugin-techdocs

Version:

The Backstage plugin that renders technical documentation for your components

361 lines (357 loc) • 19.7 kB
import * as _backstage_core_components from '@backstage/core-components'; import * as _backstage_plugin_catalog_react_alpha from '@backstage/plugin-catalog-react/alpha'; import * as _backstage_catalog_model from '@backstage/catalog-model'; import * as _backstage_filter_predicates from '@backstage/filter-predicates'; import * as _backstage_plugin_techdocs_react from '@backstage/plugin-techdocs-react'; import * as _backstage_core_plugin_api from '@backstage/core-plugin-api'; import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api'; import * as react from 'react'; import * as _backstage_plugin_search_react_alpha from '@backstage/plugin-search-react/alpha'; /** @alpha */ declare const techdocsTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"techdocs", { readonly "search.placeholder": "Search {{entityTitle}} docs"; readonly "search.noResults": "No results found"; readonly "error.couldNotLoad": "Could not load available documentation."; readonly "nav.title": "Docs"; readonly "table.columns.type": "Type"; readonly "table.columns.document": "Document"; readonly "table.columns.kind": "Kind"; readonly "table.columns.owner": "Owner"; readonly "table.body.emptyDataSourceMessage": "No records to display"; readonly "table.header.actions": "Actions"; readonly "table.title.all": "All"; readonly "table.toolbar.searchPlaceholder": "Filter"; readonly "table.actions.addToFavorites": "Add to favorites"; readonly "table.actions.removeFromFavorites": "Remove from favorites"; readonly "table.actions.copyDocsUrl": "Click to copy documentation link to clipboard"; readonly "table.pagination.labelRowsSelect": "rows"; readonly "table.emptyState.title": "No documents to show"; readonly "table.emptyState.description": "Create your own document. Check out our Getting Started Information"; readonly "table.emptyState.docsButton": "DOCS"; readonly "home.supportButton": "Discover documentation in your ecosystem."; readonly "aboutCard.viewTechdocs": "View TechDocs"; readonly "notFound.title": "Documentation not found"; readonly "notFound.builderNote": "Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."; readonly "buildLogs.title": "Build Details"; readonly "buildLogs.closeDrawer": "Close the drawer"; readonly "buildLogs.showBuildLogs": "Show Build Logs"; readonly "buildLogs.waitingForLogs": "Waiting for logs..."; readonly "stateIndicator.initialBuild.message": "Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."; readonly "stateIndicator.contentStaleRefreshing.message": "A newer version of this documentation is being prepared and will be available shortly."; readonly "stateIndicator.contentStaleReady.message": "A newer version of this documentation is now available, please refresh to view."; readonly "stateIndicator.contentStaleReady.refreshButton": "Refresh"; readonly "stateIndicator.contentStaleError.message": "Building a newer version of this documentation failed."; readonly "redirectNotification.redirectNow": "Redirect now"; readonly "readerPageHeader.source": "Source"; readonly "readerPageHeader.owner": "Owner"; readonly "readerPageHeader.lifecycle": "Lifecycle"; readonly "pageWrapper.title": "Documentation"; readonly "pageWrapper.subtitle": "Documentation available in {{orgName}}"; readonly "entityContent.title": "TechDocs"; readonly "reader.settings": "Settings"; }>; /** @alpha */ declare const techDocsSearchResultListItemExtension: _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ config: { title: string | undefined; lineClamp: number; asLink: boolean; asListItem: boolean; noTrack: boolean; }; configInput: { title?: string | undefined; lineClamp?: number | undefined; asLink?: boolean | undefined; asListItem?: boolean | undefined; noTrack?: boolean | undefined; }; output: _backstage_frontend_plugin_api.ExtensionDataRef<{ predicate?: _backstage_plugin_search_react_alpha.SearchResultItemExtensionPredicate; component: _backstage_plugin_search_react_alpha.SearchResultItemExtensionComponent; icon?: react.JSX.Element; }, "search.search-result-list-item.item", {}>; inputs: {}; kind: "search-result-list-item"; name: undefined; params: _backstage_plugin_search_react_alpha.SearchResultListItemBlueprintParams; }>; /** @alpha */ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{ root: _backstage_core_plugin_api.RouteRef<undefined>; docRoot: _backstage_core_plugin_api.RouteRef<{ name: string; kind: string; namespace: string; }>; entityContent: _backstage_core_plugin_api.RouteRef<undefined>; }, {}, { "api:techdocs": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ kind: "api"; name: undefined; config: {}; configInput: {}; output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>; inputs: {}; params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>; }>; "api:techdocs/addons": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ config: {}; configInput: {}; output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>; inputs: { addons: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_plugin_techdocs_react.TechDocsAddonOptions, "techdocs.addon", {}>, { singleton: false; optional: false; internal: false; }>; }; kind: "api"; name: "addons"; params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>; }>; "api:techdocs/storage": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ kind: "api"; name: "storage"; config: {}; configInput: {}; output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>; inputs: {}; params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>; }>; "empty-state:techdocs/entity-content": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ config: {}; configInput: {}; output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", { optional: true; }>; inputs: { [x: string]: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ExtensionDataRef, { singleton: boolean; optional: boolean; internal?: boolean; }>; }; params: never; kind: "empty-state"; name: "entity-content"; }>; "entity-content:techdocs": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ config: { path: string | undefined; title: string | undefined; filter: _backstage_filter_predicates.FilterPredicate | undefined; group: string | false | undefined; icon: string | undefined; }; configInput: { path?: string | undefined; title?: string | undefined; filter?: _backstage_filter_predicates.FilterPredicate | undefined; group?: string | false | undefined; icon?: string | undefined; }; output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", { optional: true; }> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", { optional: true; }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-filter-expression", { optional: true; }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-group", { optional: true; }> | _backstage_frontend_plugin_api.ExtensionDataRef<string | react.ReactElement<any, string | react.JSXElementConstructor<any>>, "catalog.entity-content-icon", { optional: true; }>; inputs: { addons: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_plugin_techdocs_react.TechDocsAddonOptions, "techdocs.addon", {}>, { singleton: false; optional: false; internal: false; }>; emptyState: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", { optional: true; }>, { singleton: true; optional: true; internal: false; }>; }; kind: "entity-content"; name: undefined; params: { defaultPath?: [Error: `Use the 'path' param instead`]; path: string; defaultTitle?: [Error: `Use the 'title' param instead`]; title: string; defaultGroup?: [Error: `Use the 'group' param instead`]; group?: keyof typeof _backstage_plugin_catalog_react_alpha.defaultEntityContentGroups | (string & {}); icon?: string | react.ReactElement; loader: () => Promise<JSX.Element>; routeRef?: _backstage_frontend_plugin_api.RouteRef; filter?: string | _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean); }; }>; "entity-icon-link:techdocs/read-docs": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ kind: "entity-icon-link"; name: "read-docs"; config: { label: string | undefined; title: string | undefined; filter: _backstage_filter_predicates.FilterPredicate | undefined; }; configInput: { label?: string | undefined; title?: string | undefined; filter?: _backstage_filter_predicates.FilterPredicate | undefined; }; output: _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", { optional: true; }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-filter-expression", { optional: true; }> | _backstage_frontend_plugin_api.ExtensionDataRef<() => _backstage_core_components.IconLinkVerticalProps, "entity-icon-link-props", {}>; inputs: {}; params: { useProps: () => Omit<_backstage_core_components.IconLinkVerticalProps, "color">; filter?: _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean); }; }>; "page:techdocs": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ kind: "page"; name: undefined; config: { path: string | undefined; title: string | undefined; }; configInput: { path?: string | undefined; title?: string | undefined; }; output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", { optional: true; }> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.title", { optional: true; }> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", { optional: true; }>; inputs: { pages: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", { optional: true; }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.title", { optional: true; }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", { optional: true; }>, { singleton: false; optional: false; internal: false; }>; }; params: { path: string; title?: string; icon?: _backstage_frontend_plugin_api.IconElement; loader?: () => Promise<react.JSX.Element>; routeRef?: _backstage_frontend_plugin_api.RouteRef; noHeader?: boolean; }; }>; "page:techdocs/reader": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ config: { withoutSearch: boolean; withoutHeader: boolean; path: string | undefined; title: string | undefined; }; configInput: { withoutSearch?: boolean | undefined; withoutHeader?: boolean | undefined; path?: string | undefined; title?: string | undefined; }; output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", { optional: true; }> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.title", { optional: true; }> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", { optional: true; }>; inputs: { pages: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", { optional: true; }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.title", { optional: true; }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", { optional: true; }>, { singleton: false; optional: false; internal: false; }>; addons: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_plugin_techdocs_react.TechDocsAddonOptions, "techdocs.addon", {}>, { singleton: false; optional: false; internal: false; }>; }; kind: "page"; name: "reader"; params: { path: string; title?: string; icon?: _backstage_frontend_plugin_api.IconElement; loader?: () => Promise<react.JSX.Element>; routeRef?: _backstage_frontend_plugin_api.RouteRef; noHeader?: boolean; }; }>; "plugin-header-action:techdocs": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ kind: "plugin-header-action"; name: undefined; config: {}; configInput: {}; output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}>; inputs: {}; params: { loader: () => Promise<JSX.Element>; }; }>; "search-filter-result-type:techdocs": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ kind: "search-filter-result-type"; name: undefined; config: {}; configInput: {}; output: _backstage_frontend_plugin_api.ExtensionDataRef<{ value: string; name: string; icon: react.JSX.Element; }, "search.filters.result-types.type", {}>; inputs: {}; params: _backstage_plugin_search_react_alpha.SearchFilterResultTypeBlueprintParams; }>; "search-result-list-item:techdocs": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{ config: { title: string | undefined; lineClamp: number; asLink: boolean; asListItem: boolean; noTrack: boolean; }; configInput: { title?: string | undefined; lineClamp?: number | undefined; asLink?: boolean | undefined; asListItem?: boolean | undefined; noTrack?: boolean | undefined; }; output: _backstage_frontend_plugin_api.ExtensionDataRef<{ predicate?: _backstage_plugin_search_react_alpha.SearchResultItemExtensionPredicate; component: _backstage_plugin_search_react_alpha.SearchResultItemExtensionComponent; icon?: react.JSX.Element; }, "search.search-result-list-item.item", {}>; inputs: {}; kind: "search-result-list-item"; name: undefined; params: _backstage_plugin_search_react_alpha.SearchResultListItemBlueprintParams; }>; }>; export { _default as default, techDocsSearchResultListItemExtension, techdocsTranslationRef };