From 4faab54915fae7cd414f1610440e40911c7854d3 Mon Sep 17 00:00:00 2001 From: Jonathan Mezach Date: Thu, 16 Feb 2023 08:48:56 +0100 Subject: [PATCH] Fix API report Signed-off-by: Jonathan Mezach --- plugins/octopus-deploy/api-report.md | 28 +++++++------------------ plugins/octopus-deploy/src/api/index.ts | 11 +++++++++- plugins/octopus-deploy/src/plugin.ts | 2 ++ 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/plugins/octopus-deploy/api-report.md b/plugins/octopus-deploy/api-report.md index 84d65804ca..563e7ebea4 100644 --- a/plugins/octopus-deploy/api-report.md +++ b/plugins/octopus-deploy/api-report.md @@ -11,8 +11,6 @@ import { DiscoveryApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { IdentityApi } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "EntityOctopusDeployContent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityOctopusDeployContent: (props: { defaultLimit?: number | undefined; @@ -21,8 +19,6 @@ export const EntityOctopusDeployContent: (props: { // @public (undocumented) export const isOctopusDeployAvailable: (entity: Entity) => boolean; -// Warning: (ae-missing-release-tag) "OctopusDeployApi" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface OctopusDeployApi { // (undocumented) @@ -32,16 +28,11 @@ export interface OctopusDeployApi { ): Promise; } -// Warning: (ae-missing-release-tag) "octopusDeployApiRef" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const octopusDeployApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "OctopusDeployClient" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class OctopusDeployClient implements OctopusDeployApi { - // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts constructor(options: Options); // (undocumented) getReleaseProgression( @@ -50,44 +41,32 @@ export class OctopusDeployClient implements OctopusDeployApi { ): Promise; } -// Warning: (ae-missing-release-tag) "OctopusDeployment" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type OctopusDeployment = { State: string; }; -// Warning: (ae-missing-release-tag) "octopusDeployPlugin" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const octopusDeployPlugin: BackstagePlugin<{}, {}, {}>; -// Warning: (ae-missing-release-tag) "OctopusEnvironment" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type OctopusEnvironment = { Id: string; Name: string; }; -// Warning: (ae-missing-release-tag) "OctopusProgression" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type OctopusProgression = { Environments: OctopusEnvironment[]; Releases: OctopusReleaseProgression[]; }; -// Warning: (ae-missing-release-tag) "OctopusRelease" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type OctopusRelease = { Id: string; Version: string; }; -// Warning: (ae-missing-release-tag) "OctopusReleaseProgression" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type OctopusReleaseProgression = { Release: OctopusRelease; @@ -96,5 +75,12 @@ export type OctopusReleaseProgression = { }; }; +// @public (undocumented) +export type Options = { + discoveryApi: DiscoveryApi; + identityApi: IdentityApi; + proxyPathBase?: string; +}; + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/octopus-deploy/src/api/index.ts b/plugins/octopus-deploy/src/api/index.ts index f89e429f64..dcdd881c10 100644 --- a/plugins/octopus-deploy/src/api/index.ts +++ b/plugins/octopus-deploy/src/api/index.ts @@ -19,37 +19,44 @@ import { IdentityApi, } from '@backstage/core-plugin-api'; +/** @public */ export type OctopusProgression = { Environments: OctopusEnvironment[]; Releases: OctopusReleaseProgression[]; }; +/** @public */ export type OctopusEnvironment = { Id: string; Name: string; }; +/** @public */ export type OctopusReleaseProgression = { Release: OctopusRelease; Deployments: { [key: string]: OctopusDeployment[] }; }; +/** @public */ export type OctopusRelease = { Id: string; Version: string; }; +/** @public */ export type OctopusDeployment = { State: string; }; +/** @public */ export const octopusDeployApiRef = createApiRef({ id: 'plugin.octopusdeploy.service', }); const DEFAULT_PROXY_PATH_BASE = '/octopus-deploy'; -type Options = { +/** @public */ +export type Options = { discoveryApi: DiscoveryApi; identityApi: IdentityApi; /** @@ -58,6 +65,7 @@ type Options = { proxyPathBase?: string; }; +/** @public */ export interface OctopusDeployApi { getReleaseProgression( projectId: string, @@ -65,6 +73,7 @@ export interface OctopusDeployApi { ): Promise; } +/** @public */ export class OctopusDeployClient implements OctopusDeployApi { private readonly discoveryApi: DiscoveryApi; private readonly identityApi: IdentityApi; diff --git a/plugins/octopus-deploy/src/plugin.ts b/plugins/octopus-deploy/src/plugin.ts index 1634da2a9a..15bb32c9bd 100644 --- a/plugins/octopus-deploy/src/plugin.ts +++ b/plugins/octopus-deploy/src/plugin.ts @@ -32,6 +32,7 @@ import { Entity } from '@backstage/catalog-model'; export const isOctopusDeployAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[OCTOPUS_DEPLOY_PROJECT_ID_ANNOTATION]); +/** @public */ export const octopusDeployPlugin = createPlugin({ id: 'octopus-deploy', apis: [ @@ -55,6 +56,7 @@ export const OctopusDeployPage = octopusDeployPlugin.provide( ); */ +/** @public */ export const EntityOctopusDeployContent = octopusDeployPlugin.provide( createRoutableExtension({ name: 'EntityOctopusDeployContent',