Fix warning and update api-reports
Signed-off-by: Julio Zynger <julio.zynger@soundcloud.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
7bb98ee655
commit
b6fdf5c5f3
@@ -10,37 +10,94 @@ import { BackstagePlugin } from '@backstage/core-plugin-api';
|
||||
import { ConfigApi } from '@backstage/core-plugin-api';
|
||||
import { DiscoveryApi } from '@backstage/core-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
// @public (undocumented)
|
||||
export interface AggregatedError {
|
||||
// (undocumented)
|
||||
aggregation_key: string;
|
||||
// (undocumented)
|
||||
latest_errors: ErrorInstance[];
|
||||
// (undocumented)
|
||||
severity: string;
|
||||
// (undocumented)
|
||||
total_count: number;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
interface Error_2 {
|
||||
// (undocumented)
|
||||
cause?: Error_2 | null;
|
||||
// (undocumented)
|
||||
class: string;
|
||||
// (undocumented)
|
||||
message: string;
|
||||
// (undocumented)
|
||||
stacktrace?: string[];
|
||||
}
|
||||
export { Error_2 as Error };
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ErrorInstance {
|
||||
// (undocumented)
|
||||
error: Error_2;
|
||||
// (undocumented)
|
||||
http_context: HttpContext;
|
||||
// (undocumented)
|
||||
severity: string;
|
||||
// (undocumented)
|
||||
timestamp: number;
|
||||
// (undocumented)
|
||||
uuid: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface HttpContext {
|
||||
// (undocumented)
|
||||
request_body: string;
|
||||
// (undocumented)
|
||||
request_headers: RequestHeaders;
|
||||
// (undocumented)
|
||||
request_method: string;
|
||||
// (undocumented)
|
||||
request_url: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export const isPeriskopAvailable: (entity: Entity) => boolean;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface NotFoundInInstance {
|
||||
// (undocumented)
|
||||
body: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export const PERISKOP_NAME_ANNOTATION = 'periskop.io/name';
|
||||
|
||||
// @public
|
||||
export class PeriskopApi {
|
||||
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
||||
constructor(options: Options);
|
||||
// Warning: (ae-forgotten-export) The symbol "AggregatedError" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
constructor(options: PeriskopApiOptions);
|
||||
// (undocumented)
|
||||
getErrorInstanceUrl(
|
||||
locationName: string,
|
||||
instanceName: string,
|
||||
serviceName: string,
|
||||
error: AggregatedError,
|
||||
): string;
|
||||
// Warning: (ae-forgotten-export) The symbol "NotFoundInLocation" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// (undocumented)
|
||||
getErrors(
|
||||
locationName: string,
|
||||
instanceName: string,
|
||||
serviceName: string,
|
||||
): Promise<AggregatedError[] | NotFoundInLocation>;
|
||||
): Promise<AggregatedError[] | NotFoundInInstance>;
|
||||
// (undocumented)
|
||||
getLocationNames(): string[];
|
||||
getInstanceNames(): string[];
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type PeriskopApiOptions = {
|
||||
discoveryApi: DiscoveryApi;
|
||||
configApi: ConfigApi;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const periskopApiRef: ApiRef<PeriskopApi>;
|
||||
|
||||
@@ -48,12 +105,13 @@ export const periskopApiRef: ApiRef<PeriskopApi>;
|
||||
export const PeriskopErrorsTable: () => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export const periskopPlugin: BackstagePlugin<
|
||||
{
|
||||
root: RouteRef<undefined>;
|
||||
},
|
||||
{}
|
||||
>;
|
||||
export const periskopPlugin: BackstagePlugin<{}, {}>;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RequestHeaders {
|
||||
// (undocumented)
|
||||
[k: string]: string;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
import { ConfigApi, DiscoveryApi } from '@backstage/core-plugin-api';
|
||||
import { AggregatedError, NotFoundInInstance } from '../types';
|
||||
|
||||
type Options = {
|
||||
/** @public */
|
||||
export type PeriskopApiOptions = {
|
||||
discoveryApi: DiscoveryApi;
|
||||
configApi: ConfigApi;
|
||||
};
|
||||
@@ -36,7 +37,7 @@ export class PeriskopApi {
|
||||
private readonly discoveryApi: DiscoveryApi;
|
||||
private readonly instances: PeriskopInstance[];
|
||||
|
||||
constructor(options: Options) {
|
||||
constructor(options: PeriskopApiOptions) {
|
||||
this.discoveryApi = options.discoveryApi;
|
||||
this.instances = options.configApi
|
||||
.getConfigArray('periskop.instances')
|
||||
|
||||
@@ -21,3 +21,4 @@ export {
|
||||
PERISKOP_NAME_ANNOTATION,
|
||||
} from './components/PeriskopErrorsTable';
|
||||
export * from './api/index';
|
||||
export * from './types';
|
||||
|
||||
@@ -14,12 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/** @public */
|
||||
export interface AggregatedError {
|
||||
aggregation_key: string;
|
||||
total_count: number;
|
||||
severity: string;
|
||||
latest_errors: ErrorInstance[];
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface ErrorInstance {
|
||||
error: Error;
|
||||
uuid: string;
|
||||
@@ -27,22 +30,29 @@ export interface ErrorInstance {
|
||||
severity: string;
|
||||
http_context: HttpContext;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface Error {
|
||||
class: string;
|
||||
message: string;
|
||||
stacktrace?: string[];
|
||||
cause?: Error | null;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface HttpContext {
|
||||
request_method: string;
|
||||
request_url: string;
|
||||
request_headers: RequestHeaders;
|
||||
request_body: string;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface RequestHeaders {
|
||||
[k: string]: string;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface NotFoundInInstance {
|
||||
body: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user