From a1594fb8cabf1d76cb2940b29a5582babc40d162 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Tue, 5 Oct 2021 09:52:43 +0200 Subject: [PATCH] api reports Signed-off-by: Johan Haals --- packages/catalog-client/api-report.md | 24 ++++++++++++++++++++++++ plugins/catalog/api-report.md | 26 +++++++++++++++++++++++--- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/packages/catalog-client/api-report.md b/packages/catalog-client/api-report.md index 8a81c0eb10..3571cbf57e 100644 --- a/packages/catalog-client/api-report.md +++ b/packages/catalog-client/api-report.md @@ -38,6 +38,11 @@ export interface CatalogApi { options?: CatalogRequestOptions, ): Promise>; // (undocumented) + getEntityAncestors( + request: CatalogEntityAncestorsRequest, + options?: CatalogRequestOptions, + ): Promise; + // (undocumented) getEntityByName( name: EntityName, options?: CatalogRequestOptions, @@ -88,6 +93,11 @@ export class CatalogClient implements CatalogApi { options?: CatalogRequestOptions, ): Promise>; // (undocumented) + getEntityAncestors( + request: CatalogEntityAncestorsRequest, + options?: CatalogRequestOptions, + ): Promise; + // (undocumented) getEntityByName( compoundName: EntityName, options?: CatalogRequestOptions, @@ -133,6 +143,20 @@ export type CatalogEntitiesRequest = { fields?: string[] | undefined; }; +// @public (undocumented) +export type CatalogEntityAncestorsRequest = { + entityRef: EntityName; +}; + +// @public (undocumented) +export type CatalogEntityAncestorsResponse = { + root: EntityName; + items: { + entity: Entity; + parents: EntityName[]; + }[]; +}; + // @public (undocumented) export type CatalogListResponse = { items: T[]; diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index 1ee0d841c9..4937a3eb86 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -7,10 +7,13 @@ import { AddLocationRequest } from '@backstage/catalog-client'; import { AddLocationResponse } from '@backstage/catalog-client'; +import { ApiHolder } from '@backstage/core-plugin-api'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { CatalogApi } from '@backstage/catalog-client'; import { CatalogClient } from '@backstage/catalog-client'; import { CatalogEntitiesRequest } from '@backstage/catalog-client'; +import { CatalogEntityAncestorsRequest } from '@backstage/catalog-client'; +import { CatalogEntityAncestorsResponse } from '@backstage/catalog-client'; import { CatalogListResponse } from '@backstage/catalog-client'; import { CatalogRequestOptions } from '@backstage/catalog-client'; import { Entity } from '@backstage/catalog-model'; @@ -68,6 +71,11 @@ export class CatalogClientWrapper implements CatalogApi { options?: CatalogRequestOptions, ): Promise>; // (undocumented) + getEntityAncestors( + request: CatalogEntityAncestorsRequest, + options?: CatalogRequestOptions, + ): Promise; + // (undocumented) getEntityByName( compoundName: EntityName, options?: CatalogRequestOptions, @@ -346,7 +354,7 @@ export const EntityPageLayout: { // Warning: (ae-missing-release-tag) "EntityProcessingErrorsPanel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export const EntityProcessingErrorsPanel: () => JSX.Element; +export const EntityProcessingErrorsPanel: () => JSX.Element | null; // Warning: (ae-missing-release-tag) "EntitySwitch" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -354,7 +362,14 @@ export const EntityProcessingErrorsPanel: () => JSX.Element; export const EntitySwitch: { ({ children }: PropsWithChildren<{}>): JSX.Element | null; Case: (_: { - if?: ((entity: Entity) => boolean) | undefined; + if?: + | (( + entity: Entity, + context: { + apis: ApiHolder; + }, + ) => boolean | Promise) + | undefined; children: ReactNode; }) => null; }; @@ -382,7 +397,12 @@ export const FilteredEntityLayout: ({ // Warning: (ae-missing-release-tag) "hasCatalogProcessingErrors" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const hasCatalogProcessingErrors: (entity: Entity) => boolean; +export const hasCatalogProcessingErrors: ( + entity: Entity, + context: { + apis: ApiHolder; + }, +) => Promise; // Warning: (ae-missing-release-tag) "isComponentType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) //