diff --git a/plugins/incremental-ingestion-backend/api-report.md b/plugins/incremental-ingestion-backend/api-report.md
index 6d4d12cc6d..8aabaa428f 100644
--- a/plugins/incremental-ingestion-backend/api-report.md
+++ b/plugins/incremental-ingestion-backend/api-report.md
@@ -3,8 +3,6 @@
> 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';
@@ -96,12 +94,15 @@ export class IncrementalIngestionDatabaseManager {
>;
createMark(options: MarkRecordInsert): Promise;
createMarkEntities(markId: string, entities: DeferredEntity[]): Promise;
- createProviderIngestionRecord(provider: string): Promise<{
- ingestionId: string;
- nextAction: string;
- attempts: number;
- nextActionAt: number;
- }>;
+ createProviderIngestionRecord(provider: string): Promise<
+ | {
+ ingestionId: string;
+ nextAction: string;
+ attempts: number;
+ nextActionAt: number;
+ }
+ | undefined
+ >;
// (undocumented)
getAllMarks(ingestionId: string): Promise;
getCurrentIngestionRecord(
@@ -117,9 +118,7 @@ export class IncrementalIngestionDatabaseManager {
'id' | 'provider_name'
>[]
>;
- insertIngestionRecord(options: IngestionRecordInsert): Promise;
- // (undocumented)
- insertRecord(options: IngestionRecordInsert): Promise;
+ insertIngestionRecord(record: IngestionUpsertIFace): Promise;
listProviders(): Promise;
purgeAndResetProvider(provider: string): Promise<{
provider: string;
@@ -155,35 +154,12 @@ export class IncrementalIngestionDatabaseManager {
}
// @public
-export interface IngestionRecord {
- // (undocumented)
- attempts: number;
- // (undocumented)
+export interface IngestionRecord extends IngestionUpsertIFace {
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;
-}
-
-// @public
-export interface IngestionRecordInsert {
- // (undocumented)
- record: IngestionUpsertIFace & {
- id: string;
- };
}
// @public
@@ -196,13 +172,11 @@ export interface IngestionRecordUpdate {
// @public
export interface IngestionUpsertIFace {
- // (undocumented)
attempts?: number;
- // (undocumented)
- ingestion_completed_at?: Date;
- // (undocumented)
- last_error?: string;
- // (undocumented)
+ completion_ticket: string;
+ id?: string;
+ ingestion_completed_at?: Date | string | null;
+ last_error?: string | null;
next_action:
| 'rest'
| 'ingest'
@@ -210,13 +184,9 @@ export interface IngestionUpsertIFace {
| 'cancel'
| 'nothing (done)'
| 'nothing (canceled)';
- // (undocumented)
next_action_at?: Date;
- // (undocumented)
provider_name: string;
- // (undocumented)
- rest_completed_at?: Date;
- // (undocumented)
+ rest_completed_at?: Date | string | null;
status:
| 'complete'
| 'bursting'
@@ -226,13 +196,13 @@ export interface IngestionUpsertIFace {
| 'backing off';
}
-// @public
+// @public (undocumented)
export interface IterationEngine {
// (undocumented)
taskFn: TaskFunction;
}
-// @public
+// @public (undocumented)
export interface IterationEngineOptions {
// (undocumented)
backoff?: IncrementalEntityProviderOptions['backoff'];
@@ -275,7 +245,7 @@ export interface MarkRecordInsert {
};
}
-// @public
+// @public (undocumented)
export type PluginEnvironment = {
logger: Logger;
database: PluginDatabaseManager;
diff --git a/plugins/incremental-ingestion-backend/src/types.ts b/plugins/incremental-ingestion-backend/src/types.ts
index 7032b13a0c..8a3233e3b7 100644
--- a/plugins/incremental-ingestion-backend/src/types.ts
+++ b/plugins/incremental-ingestion-backend/src/types.ts
@@ -86,7 +86,7 @@ export interface IncrementalEntityProvider {
/**
* Value returned by an {@link IncrementalEntityProvider} to provide a
* single page of entities to ingest.
- *
+ *
* @public
*/
export interface EntityIteratorResult {
@@ -132,7 +132,7 @@ export interface IncrementalEntityProviderOptions {
/**
* In the event of an error during an ingestion burst, the backoff
* determines how soon it will be retried. E.g.
- * [{ minutes: 1}, { minutes: 5}, {minutes: 30 }, { hours: 3 }]
+ * `[{ minutes: 1}, { minutes: 5}, {minutes: 30 }, { hours: 3 }]`
*/
backoff?: DurationObjectUnits[];
}
@@ -165,7 +165,7 @@ export interface IterationEngineOptions {
/**
* The shape of data inserted into or updated in the `ingestion.ingestions` table.
- *
+ *
* @public
*/
export interface IngestionUpsertIFace {
@@ -225,7 +225,7 @@ export interface IngestionUpsertIFace {
/**
* This interface is for updating an existing ingestion record.
- *
+ *
* @public
*/
export interface IngestionRecordUpdate {
@@ -235,7 +235,7 @@ export interface IngestionRecordUpdate {
/**
* The expected response from the `ingestion.ingestion_marks` table.
- *
+ *
* @public
*/
export interface MarkRecord {
@@ -248,7 +248,7 @@ export interface MarkRecord {
/**
* The expected response from the `ingestion.ingestions` table.
- *
+ *
* @public
*/
export interface IngestionRecord extends IngestionUpsertIFace {
@@ -262,7 +262,7 @@ export interface IngestionRecord extends IngestionUpsertIFace {
/**
* This interface supplies all the values for adding an ingestion mark.
- *
+ *
* @public
*/
export interface MarkRecordInsert {