Skip to content

Latest commit

 

History

History
225 lines (214 loc) · 9.46 KB

report-alpha.api.md

File metadata and controls

225 lines (214 loc) · 9.46 KB

API Report File for "@backstage/plugin-catalog-react"

Do not edit this file. It is a report generated by API Extractor.

/// <reference types="react" />

import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
import { ComponentType } from 'react';
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
import { Entity } from '@backstage/catalog-model';
import { ExtensionBlueprint } from '@backstage/frontend-plugin-api';
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
import { JSX as JSX_2 } from 'react';
import { ResourcePermission } from '@backstage/plugin-permission-common';
import { RouteRef } from '@backstage/frontend-plugin-api';
import { TranslationRef } from '@backstage/core-plugin-api/alpha';

// @alpha (undocumented)
export const catalogReactTranslationRef: TranslationRef<
  'catalog-react',
  {
    readonly 'catalogFilter.title': 'Filters';
    readonly 'catalogFilter.buttonTitle': 'Filters';
    readonly 'entityKindPicker.title': 'Kind';
    readonly 'entityKindPicker.errorMessage': 'Failed to load entity kinds';
    readonly 'entityLifecyclePicker.title': 'Lifecycle';
    readonly 'entityNamespacePicker.title': 'Namespace';
    readonly 'entityOwnerPicker.title': 'Owner';
    readonly 'entityProcessingStatusPicker.title': 'Processing Status';
    readonly 'entityTagPicker.title': 'Tags';
    readonly 'entityPeekAheadPopover.title': 'Drill into the entity to see all of the tags.';
    readonly 'entityPeekAheadPopover.entityCardActionsTitle': 'Show details';
    readonly 'entityPeekAheadPopover.emailCardAction.title': 'Email {{email}}';
    readonly 'entityPeekAheadPopover.emailCardAction.subTitle': 'mailto {{email}}';
    readonly 'entitySearchBar.placeholder': 'Search';
    readonly 'entityTypePicker.title': 'Type';
    readonly 'entityTypePicker.errorMessage': 'Failed to load entity types';
    readonly 'entityTypePicker.optionAllTitle': 'all';
    readonly 'favoriteEntity.addToFavorites': 'Add to favorites';
    readonly 'favoriteEntity.removeFromFavorites': 'Remove from favorites';
    readonly 'inspectEntityDialog.title': 'Entity Inspector';
    readonly 'inspectEntityDialog.closeButtonTitle': 'Close';
    readonly 'inspectEntityDialog.ancestryPage.title': 'Ancestry';
    readonly 'inspectEntityDialog.colocatedPage.title': 'Colocated';
    readonly 'inspectEntityDialog.colocatedPage.description': 'These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).';
    readonly 'inspectEntityDialog.colocatedPage.alertNoLocation': 'Entity had no location information.';
    readonly 'inspectEntityDialog.colocatedPage.alertNoEntity': 'There were no other entities on this location.';
    readonly 'inspectEntityDialog.jsonPage.title': 'Entity as JSON';
    readonly 'inspectEntityDialog.jsonPage.description': 'This is the raw entity data as received from the catalog, on JSON form.';
    readonly 'inspectEntityDialog.overviewPage.title': 'Overview';
    readonly 'inspectEntityDialog.yamlPage.title': 'Entity as YAML';
    readonly 'inspectEntityDialog.yamlPage.description': 'This is the raw entity data as received from the catalog, on YAML form.';
    readonly 'unregisterEntityDialog.title': 'Are you sure you want to unregister this entity?';
    readonly 'unregisterEntityDialog.cancelButtonTitle': 'Cancel';
    readonly 'unregisterEntityDialog.deleteButtonTitle': 'Delete Entity';
    readonly 'unregisterEntityDialog.deleteEntitySuccessMessage': 'Removed entity {{entityName}}';
    readonly 'unregisterEntityDialog.onlyDeleteStateTitle': 'This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.';
    readonly 'unregisterEntityDialog.errorStateTitle': 'Internal error: Unknown state';
    readonly 'unregisterEntityDialog.bootstrapState.title': 'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "{{location}}"). If you believe this is in error, please contact the {{appTitle}} integrator.';
    readonly 'unregisterEntityDialog.bootstrapState.advancedDescription': 'You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.';
    readonly 'unregisterEntityDialog.bootstrapState.advancedOptions': 'Advanced Options';
    readonly 'unregisterEntityDialog.unregisterState.title': 'This action will unregister the following entities:';
    readonly 'unregisterEntityDialog.unregisterState.description': 'To undo, just re-register the entity in {{appTitle}}.';
    readonly 'unregisterEntityDialog.unregisterState.subTitle': 'Located at the following location:';
    readonly 'unregisterEntityDialog.unregisterState.advancedDescription': 'You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.';
    readonly 'unregisterEntityDialog.unregisterState.advancedOptions': 'Advanced Options';
    readonly 'unregisterEntityDialog.unregisterState.unregisterButtonTitle': 'Unregister Location';
    readonly 'userListPicker.defaultOrgName': 'Company';
    readonly 'userListPicker.orgFilterAllLabel': 'All';
    readonly 'userListPicker.personalFilter.title': 'Personal';
    readonly 'userListPicker.personalFilter.ownedLabel': 'Owned';
    readonly 'userListPicker.personalFilter.starredLabel': 'Starred';
  }
>;

// @alpha (undocumented)
export function convertLegacyEntityCardExtension(
  LegacyExtension: ComponentType<{}>,
  overrides?: {
    name?: string;
    filter?:
      | typeof EntityCardBlueprint.dataRefs.filterFunction.T
      | typeof EntityCardBlueprint.dataRefs.filterExpression.T;
  },
): ExtensionDefinition;

// @alpha (undocumented)
export function convertLegacyEntityContentExtension(
  LegacyExtension: ComponentType<{}>,
  overrides?: {
    name?: string;
    filter?:
      | typeof EntityContentBlueprint.dataRefs.filterFunction.T
      | typeof EntityContentBlueprint.dataRefs.filterExpression.T;
    defaultPath?: string;
    defaultTitle?: string;
  },
): ExtensionDefinition;

// @alpha
export const EntityCardBlueprint: ExtensionBlueprint<{
  kind: 'entity-card';
  name: undefined;
  params: {
    loader: () => Promise<JSX.Element>;
    filter?: string | ((entity: Entity) => boolean) | undefined;
  };
  output:
    | ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
    | ConfigurableExtensionDataRef<
        (entity: Entity) => boolean,
        'catalog.entity-filter-function',
        {
          optional: true;
        }
      >
    | ConfigurableExtensionDataRef<
        string,
        'catalog.entity-filter-expression',
        {
          optional: true;
        }
      >;
  inputs: {};
  config: {
    filter: string | undefined;
  };
  configInput: {
    filter?: string | undefined;
  };
  dataRefs: {
    filterFunction: ConfigurableExtensionDataRef<
      (entity: Entity) => boolean,
      'catalog.entity-filter-function',
      {}
    >;
    filterExpression: ConfigurableExtensionDataRef<
      string,
      'catalog.entity-filter-expression',
      {}
    >;
  };
}>;

// @alpha
export const EntityContentBlueprint: ExtensionBlueprint<{
  kind: 'entity-content';
  name: undefined;
  params: {
    loader: () => Promise<JSX.Element>;
    defaultPath: string;
    defaultTitle: string;
    routeRef?: RouteRef<AnyRouteRefParams> | undefined;
    filter?: string | ((entity: Entity) => boolean) | undefined;
  };
  output:
    | ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
    | ConfigurableExtensionDataRef<string, 'core.routing.path', {}>
    | ConfigurableExtensionDataRef<
        RouteRef<AnyRouteRefParams>,
        'core.routing.ref',
        {
          optional: true;
        }
      >
    | ConfigurableExtensionDataRef<string, 'catalog.entity-content-title', {}>
    | ConfigurableExtensionDataRef<
        (entity: Entity) => boolean,
        'catalog.entity-filter-function',
        {
          optional: true;
        }
      >
    | ConfigurableExtensionDataRef<
        string,
        'catalog.entity-filter-expression',
        {
          optional: true;
        }
      >;
  inputs: {};
  config: {
    path: string | undefined;
    title: string | undefined;
    filter: string | undefined;
  };
  configInput: {
    filter?: string | undefined;
    title?: string | undefined;
    path?: string | undefined;
  };
  dataRefs: {
    title: ConfigurableExtensionDataRef<
      string,
      'catalog.entity-content-title',
      {}
    >;
    filterFunction: ConfigurableExtensionDataRef<
      (entity: Entity) => boolean,
      'catalog.entity-filter-function',
      {}
    >;
    filterExpression: ConfigurableExtensionDataRef<
      string,
      'catalog.entity-filter-expression',
      {}
    >;
  };
}>;

// @alpha
export function isOwnerOf(owner: Entity, entity: Entity): boolean;

// @alpha
export function useEntityPermission(
  permission: ResourcePermission<'catalog-entity'>,
): {
  loading: boolean;
  allowed: boolean;
  error?: Error;
};

// (No @packageDocumentation comment for this package)