@grouparoo/core
Version:
The Grouparoo Core
36 lines (35 loc) • 1.52 kB
TypeScript
import { ExportRecordProperties } from "../../models/Export";
import { Export } from "../../models/Export";
import { Destination } from "../../models/Destination";
export declare namespace ExportOps {
/** Count up the exports in each state, optionally filtered for a record or destination */
function totals(where?: {
recordId?: string;
destinationId?: string;
}): Promise<{
failed: number;
canceled: number;
complete: number;
pending: number;
draft: number;
processing: number;
}>;
/**
* Given an export with stringified old/new record properties, this method will re-'inflate' them, ie turning date strings back to date objects.
* To be used in the getter, this method cannot be async.
*/
function deserializeExportRecordProperties(serializedStringifiedProperties: string): ExportRecordProperties;
function processPendingExportsForDestination(destination: Destination, limit?: number, delayMs?: number): Promise<number>;
/**
* Mark an array of Exports complete
*/
function completeBatch(_exports: Export[]): Promise<void>;
/**
* Finds failed exports within a time range and sets them back to pending
*/
function retryFailedExports(startDate: Date, endDate: Date, destination?: Destination, saveExports?: boolean): Promise<number>;
/**
* Finds finds and retries a failed or canceled export by id
*/
function retryExportById(exportId: string): Promise<number>;
}