@digital-ai/plugin-dai-deploy
Version:
Frontend functionalities for the dai-deploy backstage plugin
47 lines (41 loc) • 2.04 kB
TypeScript
import * as react from 'react';
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';
import { DeploymentStatusResponse } from '@digital-ai/plugin-dai-deploy-common';
import { Entity } from '@backstage/catalog-model';
declare const daiDeployPlugin: _backstage_core_plugin_api.BackstagePlugin<{}, {}, {}>;
declare const DaiDeployEntityDeploymentsContent: () => react.JSX.Element;
/** @public */
declare const daiDeployApiRef: _backstage_core_plugin_api.ApiRef<DaiDeployApi>;
/** @public */
interface DaiDeployApi {
getCurrentDeployments(ciId: string, page: number, rowsPerPage: number, orderBy: string, orderDirection: string, entity: string): Promise<{
items: DeploymentStatusResponse;
}>;
getDeploymentsReports(ciId: string, page: number, rowsPerPage: number, orderBy: string, orderDirection: string, entity: string): Promise<{
items: DeploymentStatusResponse;
}>;
}
declare class DaiDeployApiClient implements DaiDeployApi {
private readonly discoveryApi;
private readonly identityApi;
constructor(options: {
discoveryApi: DiscoveryApi;
identityApi: IdentityApi;
});
private getToken;
getCurrentDeployments(ciId: string, page: number, rowsPerPage: number, orderBy: string, orderDirection: string, entity: string): Promise<{
items: DeploymentStatusResponse;
}>;
getDeploymentsReports(ciId: string, page: number, rowsPerPage: number, orderBy: string, orderDirection: string, entity: string): Promise<{
items: DeploymentStatusResponse;
}>;
private get;
}
/**
* Utility function to determine if the given entity has an Airbrake ID set in the repos catalog-info.yml .
* @public
*/
declare const isCiCdAvailable: (entity: Entity) => boolean;
export { DaiDeployApiClient, DaiDeployEntityDeploymentsContent, daiDeployApiRef, daiDeployPlugin, isCiCdAvailable, isCiCdAvailable as isPluginApplicableToEntity };
export type { DaiDeployApi };