Include api-report.md

Signed-off-by: Damon Kaswell <damon.kaswell1@hp.com>
This commit is contained in:
Damon Kaswell
2022-10-28 07:50:15 -07:00
committed by Fredrik Adelöw
parent 59d7227a26
commit 981bfe3eeb
@@ -0,0 +1,378 @@
## API Report File for "@backstage/plugin-incremental-ingestion-backend"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { CatalogBuilder } from '@backstage/plugin-catalog-backend';
import type { Config } from '@backstage/config';
import type { DeferredEntity } from '@backstage/plugin-catalog-backend';
import { Duration } from 'luxon';
import type { DurationObjectUnits } from 'luxon';
import type { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
import { Knex } from 'knex';
import type { Logger } from 'winston';
import type { PermissionAuthorizer } from '@backstage/plugin-permission-common';
import type { PluginDatabaseManager } from '@backstage/backend-common';
import type { PluginTaskScheduler } from '@backstage/backend-tasks';
import { Router } from 'express';
import type { TaskFunction } from '@backstage/backend-tasks';
import type { UrlReader } from '@backstage/backend-common';
// Warning: (ae-missing-release-tag) "Deferred" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class Deferred<T> implements Promise<T> {
// (undocumented)
[Symbol.toStringTag]: 'Deferred';
constructor();
// (undocumented)
catch: Promise<T>['catch'];
// (undocumented)
finally: Promise<T>['finally'];
// (undocumented)
reject: (error: Error) => void;
// (undocumented)
resolve: (value: T) => void;
// (undocumented)
then: Promise<T>['then'];
}
// Warning: (tsdoc-at-sign-without-tag-name) Expecting a TSDoc tag name after "@"; if it is not a tag, use a backslash to escape this character
// 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: (ae-missing-release-tag) "EntityIteratorResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface EntityIteratorResult<T> {
cursor: T;
done: boolean;
entities: DeferredEntity[];
}
// @public
export const INCREMENTAL_ENTITY_PROVIDER_ANNOTATION =
'backstage.io/incremental-provider-name';
// Warning: (ae-missing-release-tag) "IncrementalCatalogBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class IncrementalCatalogBuilder {
// (undocumented)
addIncrementalEntityProvider<T, C>(
provider: IncrementalEntityProvider<T, C>,
options: IncrementalEntityProviderOptions,
): void;
// (undocumented)
build(): Promise<{
incrementalAdminRouter: Router;
manager: IncrementalIngestionDatabaseManager;
}>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
static create(
env: PluginEnvironment,
builder: CatalogBuilder,
): Promise<IncrementalCatalogBuilder>;
}
// Warning: (ae-missing-release-tag) "IncrementalEntityProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface IncrementalEntityProvider<TCursor, TContext> {
around(burst: (context: TContext) => Promise<void>): Promise<void>;
getProviderName(): string;
next(
context: TContext,
cursor?: TCursor,
): Promise<EntityIteratorResult<TCursor>>;
}
// Warning: (ae-missing-release-tag) "IncrementalEntityProviderOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface IncrementalEntityProviderOptions {
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// 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-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
backoff?: DurationObjectUnits[];
burstInterval: DurationObjectUnits;
burstLength: DurationObjectUnits;
restLength: DurationObjectUnits;
}
// Warning: (ae-missing-release-tag) "IncrementalIngestionDatabaseManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class IncrementalIngestionDatabaseManager {
constructor(options: { client: Knex });
cleanupProviders(): Promise<{
ingestionsDeleted: void;
ingestionMarksDeleted: void;
markEntitiesDeleted: void;
}>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
clearDuplicateIngestions(
ingestionId: string,
provider: string,
): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
clearFinishedIngestions(provider: string): Promise<{
deletions: {
markEntitiesDeleted: number;
marksDeleted: number;
ingestionsDeleted: number;
};
}>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
computeRemoved(
provider: string,
ingestionId: string,
): Promise<
{
entity: any;
}[]
>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
createMark(options: MarkRecordInsert): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
createMarkEntities(markId: string, entities: DeferredEntity[]): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
createProviderIngestionRecord(provider: string): Promise<{
ingestionId: string;
nextAction: string;
attempts: number;
nextActionAt: number;
}>;
// (undocumented)
getAllMarks(ingestionId: string): Promise<MarkRecord[]>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
getCurrentIngestionRecord(
provider: string,
): Promise<IngestionRecord | undefined>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
getLastMark(ingestionId: string): Promise<MarkRecord | undefined>;
healthcheck(): Promise<
Pick<
{
id: string;
provider_name: string;
},
'id' | 'provider_name'
>[]
>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
insertIngestionRecord(options: IngestionRecordInsert): Promise<void>;
// (undocumented)
insertRecord(options: IngestionRecordInsert): Promise<void>;
listProviders(): Promise<string[]>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
purgeAndResetProvider(provider: string): Promise<{
provider: string;
ingestionsDeleted: number;
marksDeleted: number;
markEntitiesDeleted: number;
}>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
purgeTable(table: string): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
setProviderBackoff(
ingestionId: string,
attempts: number,
error: Error,
backoffLength: number,
): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
setProviderBursting(ingestionId: string): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
setProviderCanceled(ingestionId: string): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
setProviderCanceling(ingestionId: string, message?: string): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
setProviderComplete(ingestionId: string): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
setProviderIngesting(ingestionId: string): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
setProviderInterstitial(ingestionId: string): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
setProviderResting(ingestionId: string, restLength: Duration): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
triggerNextProviderAction(provider: string): Promise<void>;
// (undocumented)
updateByName(
provider: string,
update: Partial<IngestionUpsertIFace>,
): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
updateIngestionRecordById(options: IngestionRecordUpdate): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
updateIngestionRecordByProvider(
provider: string,
update: Partial<IngestionUpsertIFace>,
): Promise<void>;
}
// Warning: (ae-missing-release-tag) "IngestionRecord" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface IngestionRecord {
// (undocumented)
attempts: number;
// (undocumented)
created_at: string;
// (undocumented)
id: string;
// (undocumented)
ingestion_completed_at: string | null;
// (undocumented)
last_error: string | null;
// (undocumented)
next_action: string;
// (undocumented)
next_action_at: Date;
// (undocumented)
provider_name: string;
// (undocumented)
rest_completed_at: string | null;
// (undocumented)
status: string;
}
// Warning: (ae-missing-release-tag) "IngestionRecordInsert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface IngestionRecordInsert {
// (undocumented)
record: IngestionUpsertIFace & {
id: string;
};
}
// Warning: (ae-missing-release-tag) "IngestionRecordUpdate" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface IngestionRecordUpdate {
// (undocumented)
ingestionId: string;
// (undocumented)
update: Partial<IngestionUpsertIFace>;
}
// Warning: (ae-missing-release-tag) "IngestionUpsertIFace" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface IngestionUpsertIFace {
// (undocumented)
attempts?: number;
// (undocumented)
ingestion_completed_at?: Date;
// (undocumented)
last_error?: string;
// (undocumented)
next_action:
| 'rest'
| 'ingest'
| 'backoff'
| 'cancel'
| 'nothing (done)'
| 'nothing (canceled)';
// (undocumented)
next_action_at?: Date;
// (undocumented)
provider_name: string;
// (undocumented)
rest_completed_at?: Date;
// (undocumented)
status:
| 'complete'
| 'bursting'
| 'resting'
| 'canceling'
| 'interstitial'
| 'backing off';
}
// Warning: (ae-missing-release-tag) "IterationEngine" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface IterationEngine {
// (undocumented)
taskFn: TaskFunction;
}
// Warning: (ae-missing-release-tag) "IterationEngineOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface IterationEngineOptions {
// (undocumented)
backoff?: IncrementalEntityProviderOptions['backoff'];
// (undocumented)
connection: EntityProviderConnection;
// (undocumented)
logger: Logger;
// (undocumented)
manager: IncrementalIngestionDatabaseManager;
// (undocumented)
provider: IncrementalEntityProvider<unknown, unknown>;
// (undocumented)
ready: Promise<void>;
// (undocumented)
restLength: DurationObjectUnits;
}
// Warning: (ae-missing-release-tag) "MarkRecord" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface MarkRecord {
// (undocumented)
created_at: string;
// (undocumented)
cursor: string;
// (undocumented)
id: string;
// (undocumented)
ingestion_id: string;
// (undocumented)
sequence: number;
}
// Warning: (ae-missing-release-tag) "MarkRecordInsert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface MarkRecordInsert {
// (undocumented)
record: {
id: string;
ingestion_id: string;
cursor: unknown;
sequence: number;
};
}
// Warning: (ae-missing-release-tag) "PluginEnvironment" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type PluginEnvironment = {
logger: Logger;
database: PluginDatabaseManager;
scheduler: PluginTaskScheduler;
config: Config;
reader: UrlReader;
permissions: PermissionAuthorizer;
};
// (No @packageDocumentation comment for this package)
```