Add new api-report
Update persistence context to not be wrapped into a useless class. Modify the way test databases are created. Signed-off-by: Jussi Hallila <jussi@hallila.com>
This commit is contained in:
@@ -0,0 +1,155 @@
|
||||
## API Report File for "@backstage/plugin-tech-insights-node"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { CheckResult } from '@backstage/plugin-tech-insights-common';
|
||||
import { Config } from '@backstage/config';
|
||||
import { DateTime } from 'luxon';
|
||||
import { Logger as Logger_2 } from 'winston';
|
||||
import { PluginEndpointDiscovery } from '@backstage/backend-common';
|
||||
|
||||
// @public
|
||||
export type CheckValidationResponse = {
|
||||
valid: boolean;
|
||||
message?: string;
|
||||
errors?: unknown[];
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface FactChecker<
|
||||
CheckType extends TechInsightCheck,
|
||||
CheckResultType extends CheckResult,
|
||||
> {
|
||||
getChecks(): Promise<CheckType[]>;
|
||||
runChecks(entity: string, checks?: string[]): Promise<CheckResultType[]>;
|
||||
validate(check: CheckType): Promise<CheckValidationResponse>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FactCheckerFactory<
|
||||
CheckType extends TechInsightCheck,
|
||||
CheckResultType extends CheckResult,
|
||||
> {
|
||||
// (undocumented)
|
||||
construct(
|
||||
repository: TechInsightsStore,
|
||||
): FactChecker<CheckType, CheckResultType>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FactRetriever {
|
||||
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
|
||||
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
|
||||
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
|
||||
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
|
||||
entityFilter?:
|
||||
| Record<string, string | symbol | (string | symbol)[]>[]
|
||||
| Record<string, string | symbol | (string | symbol)[]>;
|
||||
handler: (ctx: FactRetrieverContext) => Promise<TechInsightFact[]>;
|
||||
id: string;
|
||||
schema: FactSchema;
|
||||
version: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type FactRetrieverContext = {
|
||||
config: Config;
|
||||
discovery: PluginEndpointDiscovery;
|
||||
logger: Logger_2;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type FactRetrieverRegistration = {
|
||||
factRetriever: FactRetriever;
|
||||
cadence?: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type FactSchema = {
|
||||
[name: string]: {
|
||||
type: 'integer' | 'float' | 'string' | 'boolean' | 'datetime' | 'set';
|
||||
description: string;
|
||||
since?: string;
|
||||
metadata?: Record<string, any>;
|
||||
};
|
||||
};
|
||||
|
||||
// Warning: (ae-missing-release-tag) "FactSchemaDefinition" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export type FactSchemaDefinition = Omit<FactRetriever, 'handler'>;
|
||||
|
||||
// @public
|
||||
export type FlatTechInsightFact = TechInsightFact & {
|
||||
id: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface TechInsightCheck {
|
||||
description: string;
|
||||
factIds: string[];
|
||||
failureMetadata?: Record<string, any>;
|
||||
id: string;
|
||||
name: string;
|
||||
successMetadata?: Record<string, any>;
|
||||
type: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface TechInsightCheckRegistry<CheckType extends TechInsightCheck> {
|
||||
// (undocumented)
|
||||
get(checkId: string): Promise<CheckType>;
|
||||
// (undocumented)
|
||||
getAll(checks: string[]): Promise<CheckType[]>;
|
||||
// (undocumented)
|
||||
list(): Promise<CheckType[]>;
|
||||
// (undocumented)
|
||||
register(check: CheckType): Promise<CheckType>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type TechInsightFact = {
|
||||
entity: {
|
||||
namespace: string;
|
||||
kind: string;
|
||||
name: string;
|
||||
};
|
||||
facts: Record<
|
||||
string,
|
||||
| number
|
||||
| string
|
||||
| boolean
|
||||
| DateTime
|
||||
| number[]
|
||||
| string[]
|
||||
| boolean[]
|
||||
| DateTime[]
|
||||
>;
|
||||
timestamp?: DateTime;
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface TechInsightsStore {
|
||||
getFactsBetweenTimestampsByIds(
|
||||
ids: string[],
|
||||
entity: string,
|
||||
startDateTime: DateTime,
|
||||
endDateTime: DateTime,
|
||||
): Promise<{
|
||||
[factRef: string]: FlatTechInsightFact[];
|
||||
}>;
|
||||
// (undocumented)
|
||||
getLatestFactsByIds(
|
||||
ids: string[],
|
||||
entity: string,
|
||||
): Promise<{
|
||||
[factRef: string]: FlatTechInsightFact;
|
||||
}>;
|
||||
getLatestSchemas(ids?: string[]): Promise<FactSchema[]>;
|
||||
insertFacts(id: string, facts: TechInsightFact[]): Promise<void>;
|
||||
insertFactSchema(schemaDefinition: FactSchemaDefinition): Promise<void>;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
Reference in New Issue
Block a user