chore(org): update api-report

Signed-off-by: Carl-Erik Bergström <cbergstrom@spotify.com>
This commit is contained in:
Carl-Erik Bergström
2023-07-05 15:39:12 +02:00
parent 2b01aa144e
commit b9827143b0
4 changed files with 24 additions and 11 deletions
+12 -2
View File
@@ -10,6 +10,12 @@ import { ExternalRouteRef } from '@backstage/core-plugin-api';
import { IconComponent } from '@backstage/core-plugin-api';
import { InfoCardVariants } from '@backstage/core-components';
// @public (undocumented)
export const DefaultRelationType: {
readonly Direct: 'direct';
readonly Aggregated: 'aggregated';
};
// @public (undocumented)
export const EntityGroupProfileCard: (props: {
variant?: InfoCardVariants | undefined;
@@ -28,7 +34,7 @@ export const EntityOwnershipCard: (props: {
variant?: InfoCardVariants | undefined;
entityFilterKind?: string[] | undefined;
hideRelationsToggle?: boolean | undefined;
relationsType?: string | undefined;
relationsType?: RelationType | undefined;
entityLimit?: number | undefined;
}) => JSX.Element;
@@ -75,10 +81,14 @@ export const OwnershipCard: (props: {
variant?: InfoCardVariants;
entityFilterKind?: string[];
hideRelationsToggle?: boolean;
relationsType?: string;
relationsType?: RelationType;
entityLimit?: number;
}) => JSX.Element;
// @public (undocumented)
export type RelationType =
(typeof DefaultRelationType)[keyof typeof DefaultRelationType];
// @public (undocumented)
export const UserProfileCard: (props: {
variant?: InfoCardVariants;
@@ -33,7 +33,7 @@ import {
import React from 'react';
import pluralize from 'pluralize';
import { catalogIndexRouteRef } from '../../../routes';
import { AnyRelationsType, useGetEntities } from './useGetEntities';
import { RelationType, useGetEntities } from './useGetEntities';
const useStyles = makeStyles((theme: BackstageTheme) =>
createStyles({
@@ -113,7 +113,7 @@ export const ComponentsGrid = ({
entityLimit = 6,
}: {
entity: Entity;
relationsType: AnyRelationsType;
relationsType: RelationType;
entityFilterKind?: string[];
entityLimit?: number;
}) => {
@@ -27,7 +27,9 @@ import {
} from '@material-ui/core';
import React, { useState } from 'react';
import { ComponentsGrid } from './ComponentsGrid';
import { AnyRelationsType, DefaultRelationType } from './useGetEntities';
import { type RelationType, DefaultRelationType } from './useGetEntities';
export { type RelationType, DefaultRelationType } from './useGetEntities';
const useStyles = makeStyles(theme => ({
list: {
@@ -57,7 +59,7 @@ export const OwnershipCard = (props: {
variant?: InfoCardVariants;
entityFilterKind?: string[];
hideRelationsToggle?: boolean;
relationsType?: AnyRelationsType;
relationsType?: RelationType;
entityLimit?: number;
}) => {
const {
@@ -122,7 +122,7 @@ const getChildOwnershipEntityRefs = async (
const getOwners = async (
entity: Entity,
relationsType: AnyRelationsType,
relationsType: RelationType,
catalogApi: CatalogApi,
): Promise<string[]> => {
const isGroup = entity.kind === 'Group';
@@ -148,14 +148,15 @@ const getOwners = async (
return owners;
};
/** @public */
export const DefaultRelationType = {
Direct: 'direct',
Aggregated: 'aggregated',
} as const;
export type AnyRelationsType =
| (typeof DefaultRelationType)[keyof typeof DefaultRelationType]
| string;
/** @public */
export type RelationType =
(typeof DefaultRelationType)[keyof typeof DefaultRelationType];
const getOwnedEntitiesByOwners = (
owners: string[],
@@ -180,7 +181,7 @@ const getOwnedEntitiesByOwners = (
export function useGetEntities(
entity: Entity,
relationsType: AnyRelationsType,
relationsType: RelationType,
entityFilterKind?: string[],
entityLimit = 6,
): {