Merge pull request #13252 from backstage/freben/api-well-ok-then

When the 🧹 s go marching in
This commit is contained in:
Fredrik Adelöw
2022-08-23 13:55:58 +02:00
committed by GitHub
273 changed files with 2469 additions and 1529 deletions
-38
View File
@@ -9,8 +9,6 @@ import { ApiRef } from '@backstage/core-plugin-api';
import { BackstagePlugin } from '@backstage/core-plugin-api';
import { RouteRef } from '@backstage/core-plugin-api';
// Warning: (ae-missing-release-tag) "ApplyProfileRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ApplyProfileRequest {
// (undocumented)
@@ -25,8 +23,6 @@ export interface ApplyProfileRequest {
targetRepo: string;
}
// Warning: (ae-missing-release-tag) "ChangeClusterStateRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ChangeClusterStateRequest {
// (undocumented)
@@ -41,8 +37,6 @@ export interface ChangeClusterStateRequest {
targetRepo: string;
}
// Warning: (ae-missing-release-tag) "CloneFromTemplateRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface CloneFromTemplateRequest {
// (undocumented)
@@ -62,8 +56,6 @@ export interface CloneFromTemplateRequest {
templateRepository: string;
}
// Warning: (ae-missing-release-tag) "ClusterStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ClusterStatus {
// (undocumented)
@@ -78,8 +70,6 @@ export interface ClusterStatus {
status: string;
}
// Warning: (ae-missing-release-tag) "FetchError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class FetchError extends Error {
// (undocumented)
@@ -88,24 +78,18 @@ export class FetchError extends Error {
get name(): string;
}
// Warning: (ae-missing-release-tag) "GithubUserInfoRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface GithubUserInfoRequest {
// (undocumented)
accessToken: string;
}
// Warning: (ae-missing-release-tag) "GithubUserInfoResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface GithubUserInfoResponse {
// (undocumented)
login: string;
}
// Warning: (ae-missing-release-tag) "GitOpsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type GitOpsApi = {
url: string;
@@ -117,28 +101,18 @@ export type GitOpsApi = {
fetchUserInfo(req: GithubUserInfoRequest): Promise<GithubUserInfoResponse>;
};
// Warning: (ae-missing-release-tag) "gitOpsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const gitOpsApiRef: ApiRef<GitOpsApi>;
// Warning: (ae-missing-release-tag) "GitopsProfilesClusterListPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const GitopsProfilesClusterListPage: () => JSX.Element;
// Warning: (ae-missing-release-tag) "GitopsProfilesClusterPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const GitopsProfilesClusterPage: () => JSX.Element;
// Warning: (ae-missing-release-tag) "GitopsProfilesCreatePage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const GitopsProfilesCreatePage: () => JSX.Element;
// Warning: (ae-missing-release-tag) "gitopsProfilesPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
const gitopsProfilesPlugin: BackstagePlugin<
{
@@ -155,8 +129,6 @@ const gitopsProfilesPlugin: BackstagePlugin<
export { gitopsProfilesPlugin };
export { gitopsProfilesPlugin as plugin };
// Warning: (ae-missing-release-tag) "GitOpsRestApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class GitOpsRestApi implements GitOpsApi {
constructor(url?: string);
@@ -176,8 +148,6 @@ export class GitOpsRestApi implements GitOpsApi {
url: string;
}
// Warning: (ae-missing-release-tag) "ListClusterRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ListClusterRequest {
// (undocumented)
@@ -186,16 +156,12 @@ export interface ListClusterRequest {
gitHubUser: string;
}
// Warning: (ae-missing-release-tag) "ListClusterStatusesResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ListClusterStatusesResponse {
// (undocumented)
result: ClusterStatus[];
}
// Warning: (ae-missing-release-tag) "PollLogRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface PollLogRequest {
// (undocumented)
@@ -208,8 +174,6 @@ export interface PollLogRequest {
targetRepo: string;
}
// Warning: (ae-missing-release-tag) "Status" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface Status {
// (undocumented)
@@ -220,8 +184,6 @@ export interface Status {
status: string;
}
// Warning: (ae-missing-release-tag) "StatusResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface StatusResponse {
// (undocumented)
+16
View File
@@ -13,8 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createApiRef } from '@backstage/core-plugin-api';
/** @public */
export interface CloneFromTemplateRequest {
templateRepository: string;
secrets: {
@@ -27,6 +29,7 @@ export interface CloneFromTemplateRequest {
gitHubToken: string;
}
/** @public */
export interface ApplyProfileRequest {
targetOrg: string;
targetRepo: string;
@@ -35,6 +38,7 @@ export interface ApplyProfileRequest {
profiles: string[];
}
/** @public */
export interface ChangeClusterStateRequest {
targetOrg: string;
targetRepo: string;
@@ -43,6 +47,7 @@ export interface ChangeClusterStateRequest {
clusterState: 'present' | 'absent'; // /api/cluster/state
}
/** @public */
export interface PollLogRequest {
targetOrg: string;
targetRepo: string;
@@ -50,18 +55,21 @@ export interface PollLogRequest {
gitHubToken: string;
}
/** @public */
export interface Status {
status: string; // queued, in_progress, or completed
message: string;
conclusion: string; // success, failure, neutral, cancelled, skipped, timed_out, or action_required
}
/** @public */
export interface StatusResponse {
result: Status[];
link: string;
status: string;
}
/** @public */
export interface ClusterStatus {
name: string;
link: string;
@@ -70,23 +78,28 @@ export interface ClusterStatus {
runStatus: Status[];
}
/** @public */
export interface ListClusterStatusesResponse {
result: ClusterStatus[];
}
/** @public */
export interface ListClusterRequest {
gitHubUser: string;
gitHubToken: string;
}
/** @public */
export interface GithubUserInfoRequest {
accessToken: string;
}
/** @public */
export interface GithubUserInfoResponse {
login: string;
}
/** @public */
export class FetchError extends Error {
get name(): string {
return this.constructor.name;
@@ -101,6 +114,7 @@ export class FetchError extends Error {
}
}
/** @public */
export type GitOpsApi = {
url: string;
fetchLog(req: PollLogRequest): Promise<StatusResponse>;
@@ -111,10 +125,12 @@ export type GitOpsApi = {
fetchUserInfo(req: GithubUserInfoRequest): Promise<GithubUserInfoResponse>;
};
/** @public */
export const gitOpsApiRef = createApiRef<GitOpsApi>({
id: 'plugin.gitops.service',
});
/** @public */
export class GitOpsRestApi implements GitOpsApi {
constructor(public url: string = '') {}
+4
View File
@@ -26,6 +26,7 @@ import {
createRoutableExtension,
} from '@backstage/core-plugin-api';
/** @public */
export const gitopsProfilesPlugin = createPlugin({
id: 'gitops-profiles',
apis: [
@@ -38,6 +39,7 @@ export const gitopsProfilesPlugin = createPlugin({
},
});
/** @public */
export const GitopsProfilesClusterListPage = gitopsProfilesPlugin.provide(
createRoutableExtension({
name: 'GitopsProfilesClusterListPage',
@@ -46,6 +48,7 @@ export const GitopsProfilesClusterListPage = gitopsProfilesPlugin.provide(
}),
);
/** @public */
export const GitopsProfilesClusterPage = gitopsProfilesPlugin.provide(
createRoutableExtension({
name: 'GitopsProfilesClusterPage',
@@ -54,6 +57,7 @@ export const GitopsProfilesClusterPage = gitopsProfilesPlugin.provide(
}),
);
/** @public */
export const GitopsProfilesCreatePage = gitopsProfilesPlugin.provide(
createRoutableExtension({
name: 'GitopsProfilesCreatePage',