add api-reports

Signed-off-by: Dominik Pfaffenbauer <dominik@pfaffenbauer.at>
This commit is contained in:
Dominik Pfaffenbauer
2023-01-19 09:02:06 +01:00
parent eef62546ce
commit f03ec5ee26
3 changed files with 111 additions and 495 deletions
+96 -221
View File
@@ -1,286 +1,161 @@
## API Report File for "@backstage/plugin-kubernetes-common"
## API Report File for "@backstage/plugin-lighthouse-common"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { Entity } from '@backstage/catalog-model';
import type { JsonObject } from '@backstage/types';
import { PodStatus } from '@kubernetes/client-node';
import { V1ConfigMap } from '@kubernetes/client-node';
import { V1CronJob } from '@kubernetes/client-node';
import { V1DaemonSet } from '@kubernetes/client-node';
import { V1Deployment } from '@kubernetes/client-node';
import { V1HorizontalPodAutoscaler } from '@kubernetes/client-node';
import { V1Ingress } from '@kubernetes/client-node';
import { V1Job } from '@kubernetes/client-node';
import { V1LimitRange } from '@kubernetes/client-node';
import { V1Pod } from '@kubernetes/client-node';
import { V1ReplicaSet } from '@kubernetes/client-node';
import { V1Service } from '@kubernetes/client-node';
import { V1StatefulSet } from '@kubernetes/client-node';
import { Config } from '@backstage/config';
// @public (undocumented)
export type AuthProviderType = 'google' | 'serviceAccount' | 'aws' | 'azure';
export type Audit = AuditRunning | AuditFailed | AuditCompleted;
// @public (undocumented)
export interface ClientContainerStatus {
export interface AuditBase {
// (undocumented)
container: string;
id: string;
// (undocumented)
cpuUsage: ClientCurrentResourceUsage;
timeCreated: string;
// (undocumented)
memoryUsage: ClientCurrentResourceUsage;
url: string;
}
// @public (undocumented)
export interface ClientCurrentResourceUsage {
export interface AuditCompleted extends AuditBase {
// (undocumented)
currentUsage: number | string;
categories: Record<LighthouseCategoryId, LighthouseCategoryAbbr>;
// (undocumented)
limitTotal: number | string;
report: Object;
// (undocumented)
requestTotal: number | string;
status: 'COMPLETED';
// (undocumented)
timeCompleted: string;
}
// @public (undocumented)
export interface ClientPodStatus {
export interface AuditFailed extends AuditBase {
// (undocumented)
containers: ClientContainerStatus[];
status: 'FAILED';
// (undocumented)
cpu: ClientCurrentResourceUsage;
// (undocumented)
memory: ClientCurrentResourceUsage;
// (undocumented)
pod: V1Pod;
timeCompleted: string;
}
// @public (undocumented)
export interface ClusterAttributes {
dashboardApp?: string;
dashboardParameters?: JsonObject;
dashboardUrl?: string;
name: string;
export interface AuditRunning extends AuditBase {
// (undocumented)
status: 'RUNNING';
}
// @public (undocumented)
export interface ClusterObjects {
export class FetchError extends Error {
// (undocumented)
cluster: ClusterAttributes;
static forResponse(resp: Response): Promise<FetchError>;
// (undocumented)
errors: KubernetesFetchError[];
// (undocumented)
podMetrics: ClientPodStatus[];
// (undocumented)
resources: FetchResponse[];
get name(): string;
}
// @public (undocumented)
export interface ConfigMapFetchResponse {
export type FormFactor = 'mobile' | 'desktop';
// @public (undocumented)
export interface LASListRequest {
// (undocumented)
resources: Array<V1ConfigMap>;
limit?: number;
// (undocumented)
type: 'configmaps';
offset?: number;
}
// @public (undocumented)
export interface CronJobsFetchResponse {
export interface LASListResponse<Item> {
// (undocumented)
resources: Array<V1CronJob>;
items: Item[];
// (undocumented)
type: 'cronjobs';
limit: number;
// (undocumented)
offset: number;
// (undocumented)
total: number;
}
// @public (undocumented)
export interface CustomObjectsByEntityRequest {
export type LighthouseApi = {
url: string;
getWebsiteList: (listOptions: LASListRequest) => Promise<WebsiteListResponse>;
getWebsiteForAuditId: (auditId: string) => Promise<Website>;
triggerAudit: (payload: TriggerAuditPayload) => Promise<Audit>;
getWebsiteByUrl: (websiteUrl: string) => Promise<Website>;
};
// @public (undocumented)
export interface LighthouseCategoryAbbr {
// (undocumented)
auth: KubernetesRequestAuth;
id: LighthouseCategoryId;
// (undocumented)
customResources: CustomResourceMatcher[];
score: number;
// (undocumented)
entity: Entity;
title: string;
}
// @public (undocumented)
export interface CustomResourceFetchResponse {
export type LighthouseCategoryId =
| 'pwa'
| 'seo'
| 'performance'
| 'accessibility'
| 'best-practices';
// @public (undocumented)
export type LighthouseConfigSettings = {
formFactor: FormFactor;
screenEmulation:
| {
mobile: boolean;
width: number;
height: number;
deviceScaleFactor: number;
disabled: boolean;
}
| undefined;
emulatedFormFactor: FormFactor;
};
// @public (undocumented)
export class LighthouseRestApi implements LighthouseApi {
constructor(url: string);
// (undocumented)
resources: Array<any>;
static fromConfig(config: Config): LighthouseRestApi;
// (undocumented)
type: 'customresources';
getWebsiteByUrl(websiteUrl: string): Promise<Website>;
// (undocumented)
getWebsiteForAuditId(auditId: string): Promise<Website>;
// (undocumented)
getWebsiteList(options?: LASListRequest): Promise<WebsiteListResponse>;
// (undocumented)
triggerAudit(payload: TriggerAuditPayload): Promise<Audit>;
// (undocumented)
url: string;
}
// @public (undocumented)
export interface CustomResourceMatcher {
export interface TriggerAuditPayload {
// (undocumented)
apiVersion: string;
// (undocumented)
group: string;
// (undocumented)
plural: string;
}
// @public (undocumented)
export interface DaemonSetsFetchResponse {
// (undocumented)
resources: Array<V1DaemonSet>;
// (undocumented)
type: 'daemonsets';
}
// @public (undocumented)
export interface DeploymentFetchResponse {
// (undocumented)
resources: Array<V1Deployment>;
// (undocumented)
type: 'deployments';
}
// @public (undocumented)
export type FetchResponse =
| PodFetchResponse
| ServiceFetchResponse
| ConfigMapFetchResponse
| DeploymentFetchResponse
| LimitRangeFetchReponse
| ReplicaSetsFetchResponse
| HorizontalPodAutoscalersFetchResponse
| JobsFetchResponse
| CronJobsFetchResponse
| IngressesFetchResponse
| CustomResourceFetchResponse
| StatefulSetsFetchResponse
| DaemonSetsFetchResponse
| PodStatusFetchResponse;
// @public (undocumented)
export interface HorizontalPodAutoscalersFetchResponse {
// (undocumented)
resources: Array<V1HorizontalPodAutoscaler>;
// (undocumented)
type: 'horizontalpodautoscalers';
}
// @public (undocumented)
export interface IngressesFetchResponse {
// (undocumented)
resources: Array<V1Ingress>;
// (undocumented)
type: 'ingresses';
}
// @public (undocumented)
export interface JobsFetchResponse {
// (undocumented)
resources: Array<V1Job>;
// (undocumented)
type: 'jobs';
}
// @public (undocumented)
export type KubernetesErrorTypes =
| 'BAD_REQUEST'
| 'UNAUTHORIZED_ERROR'
| 'NOT_FOUND'
| 'SYSTEM_ERROR'
| 'UNKNOWN_ERROR';
// @public (undocumented)
export type KubernetesFetchError = StatusError | RawFetchError;
// @public (undocumented)
export interface KubernetesRequestAuth {
// (undocumented)
google?: string;
// (undocumented)
oidc?: {
[key: string]: string;
options: {
lighthouseConfig: {
settings: LighthouseConfigSettings;
};
};
// (undocumented)
url: string;
}
// @public (undocumented)
export interface KubernetesRequestBody {
export interface Website {
// (undocumented)
auth?: KubernetesRequestAuth;
audits: Audit[];
// (undocumented)
entity: Entity;
lastAudit: Audit;
// (undocumented)
url: string;
}
// @public (undocumented)
export interface LimitRangeFetchReponse {
// (undocumented)
resources: Array<V1LimitRange>;
// (undocumented)
type: 'limitranges';
}
// @public (undocumented)
export interface ObjectsByEntityResponse {
// (undocumented)
items: ClusterObjects[];
}
// @public (undocumented)
export interface PodFetchResponse {
// (undocumented)
resources: Array<V1Pod>;
// (undocumented)
type: 'pods';
}
// @public (undocumented)
export interface PodStatusFetchResponse {
// (undocumented)
resources: Array<PodStatus>;
// (undocumented)
type: 'podstatus';
}
// @public (undocumented)
export interface RawFetchError {
// (undocumented)
errorType: 'FETCH_ERROR';
// (undocumented)
message: string;
}
// @public (undocumented)
export interface ReplicaSetsFetchResponse {
// (undocumented)
resources: Array<V1ReplicaSet>;
// (undocumented)
type: 'replicasets';
}
// @public (undocumented)
export interface ServiceFetchResponse {
// (undocumented)
resources: Array<V1Service>;
// (undocumented)
type: 'services';
}
// @public (undocumented)
export interface StatefulSetsFetchResponse {
// (undocumented)
resources: Array<V1StatefulSet>;
// (undocumented)
type: 'statefulsets';
}
// @public (undocumented)
export interface StatusError {
// (undocumented)
errorType: KubernetesErrorTypes;
// (undocumented)
resourcePath?: string;
// (undocumented)
statusCode?: number;
}
// @public (undocumented)
export interface WorkloadsByEntityRequest {
// (undocumented)
auth: KubernetesRequestAuth;
// (undocumented)
entity: Entity;
}
export type WebsiteListResponse = LASListResponse<Website>;
```