Merge pull request #6513 from kuangp/chore/catalogExports

This commit is contained in:
Himanshu Mishra
2021-07-19 14:56:50 +02:00
committed by GitHub
7 changed files with 77 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-client': patch
---
Export `CatalogRequestOptions` type
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
Export `CatalogClientWrapper` class
+7 -2
View File
@@ -34,8 +34,6 @@ export interface CatalogApi {
location: AddLocationRequest,
options?: CatalogRequestOptions,
): Promise<AddLocationResponse>;
// Warning: (ae-forgotten-export) The symbol "CatalogRequestOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
getEntities(
request?: CatalogEntitiesRequest,
@@ -138,6 +136,13 @@ export type CatalogListResponse<T> = {
items: T[];
};
// Warning: (ae-missing-release-tag) "CatalogRequestOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type CatalogRequestOptions = {
token?: string;
};
// Warning: (ae-missing-release-tag) "ENTITY_STATUS_CATALOG_PROCESSING_TYPE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
@@ -20,5 +20,6 @@ export type {
CatalogApi,
CatalogEntitiesRequest,
CatalogListResponse,
CatalogRequestOptions,
} from './api';
export { ENTITY_STATUS_CATALOG_PROCESSING_TYPE } from './status';
+56
View File
@@ -5,12 +5,21 @@
```ts
/// <reference types="react" />
import { AddLocationRequest } from '@backstage/catalog-client';
import { AddLocationResponse } from '@backstage/catalog-client';
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 { CatalogListResponse } from '@backstage/catalog-client';
import { CatalogRequestOptions } from '@backstage/catalog-client';
import { Entity } from '@backstage/catalog-model';
import { EntityName } from '@backstage/catalog-model';
import { ExternalRouteRef } from '@backstage/core-plugin-api';
import { IconComponent } from '@backstage/core-plugin-api';
import { IdentityApi } from '@backstage/core-plugin-api';
import { InfoCardVariants } from '@backstage/core-components';
import { Location as Location_2 } from '@backstage/catalog-model';
import { PropsWithChildren } from 'react';
import { default as React_2 } from 'react';
import { ReactNode } from 'react';
@@ -43,6 +52,53 @@ export const AboutField: ({
children,
}: Props_3) => JSX.Element;
// Warning: (ae-missing-release-tag) "CatalogClientWrapper" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class CatalogClientWrapper implements CatalogApi {
constructor(options: { client: CatalogClient; identityApi: IdentityApi });
// (undocumented)
addLocation(
request: AddLocationRequest,
options?: CatalogRequestOptions,
): Promise<AddLocationResponse>;
// (undocumented)
getEntities(
request?: CatalogEntitiesRequest,
options?: CatalogRequestOptions,
): Promise<CatalogListResponse<Entity>>;
// (undocumented)
getEntityByName(
compoundName: EntityName,
options?: CatalogRequestOptions,
): Promise<Entity | undefined>;
// (undocumented)
getLocationByEntity(
entity: Entity,
options?: CatalogRequestOptions,
): Promise<Location_2 | undefined>;
// (undocumented)
getLocationById(
id: string,
options?: CatalogRequestOptions,
): Promise<Location_2 | undefined>;
// (undocumented)
getOriginLocationByEntity(
entity: Entity,
options?: CatalogRequestOptions,
): Promise<Location_2 | undefined>;
// (undocumented)
removeEntityByUid(
uid: string,
options?: CatalogRequestOptions,
): Promise<void>;
// (undocumented)
removeLocationById(
id: string,
options?: CatalogRequestOptions,
): Promise<void>;
}
// Warning: (ae-missing-release-tag) "CatalogEntityPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
+2 -5
View File
@@ -19,16 +19,13 @@ import {
AddLocationRequest,
AddLocationResponse,
CatalogApi,
CatalogClient,
CatalogEntitiesRequest,
CatalogListResponse,
CatalogClient,
CatalogRequestOptions,
} from '@backstage/catalog-client';
import { IdentityApi } from '@backstage/core-plugin-api';
type CatalogRequestOptions = {
token?: string;
};
/**
* CatalogClient wrapper that injects identity token for all requests
*/
+1
View File
@@ -15,6 +15,7 @@
*/
export * from './components/AboutCard';
export { CatalogClientWrapper } from './CatalogClientWrapper';
export { CatalogLayout } from './components/CatalogPage';
export { CatalogResultListItem } from './components/CatalogResultListItem';
export { CatalogTable } from './components/CatalogTable';