@grouparoo/core
Version:
The Grouparoo Core
72 lines (71 loc) • 3.29 kB
TypeScript
import { Source, SimpleSourceOptions, SourceMapping, BootstrapUniquePropertyParams } from "../../models/Source";
import { Property, PropertyFiltersWithKey, SimplePropertyOptions } from "../../models/Property";
import { GrouparooRecord } from "../../models/GrouparooRecord";
import { OptionHelper } from "../optionHelper";
import { RecordPropertiesPluginMethodResponse, RecordPropertyPluginMethodResponse } from "../../classes/plugin";
export declare namespace SourceOps {
/**
* Get the connection options for this source from the plugin
*/
function sourceConnectionOptions(source: Source, sourceOptions?: SimpleSourceOptions): Promise<import("../../classes/plugin").SourceOptionsMethodResponse>;
/**
* Load a preview of the data from this Source
*/
function sourcePreview(source: Source, sourceOptions?: SimpleSourceOptions): Promise<import("../../classes/plugin").SourcePreviewMethodResponseRow[]>;
/**
* Import a record property for a GrouparooRecord from this source
*/
function importRecordProperty(source: Source, record: GrouparooRecord, property: Property, propertyOptionsOverride?: OptionHelper.SimpleOptions, propertyFiltersOverride?: PropertyFiltersWithKey[]): Promise<RecordPropertyPluginMethodResponse>;
/**
* Import a record property for a GrouparooRecord from this source
*/
function importRecordProperties(source: Source, records: GrouparooRecord[], properties: Property[], propertyOptionsOverride?: {
[key: string]: SimplePropertyOptions;
}, propertyFiltersOverride?: {
[key: string]: PropertyFiltersWithKey[];
}): Promise<RecordPropertiesPluginMethodResponse>;
function applyNonUniqueMappedResultsToAllRecords(response: RecordPropertiesPluginMethodResponse, { records, properties, sourceMapping, }: {
records: GrouparooRecord[];
properties: Property[];
sourceMapping: SourceMapping;
}): Promise<void>;
/**
* Import all record properties from a Source for a GrouparooRecord
*/
function _import(source: Source, record: GrouparooRecord): Promise<{
canImport: boolean;
properties: Record<string, RecordPropertyPluginMethodResponse>;
}>;
/**
* Sorts an array of Sources by their dependencies.
* Be sure to eager-load Mappings and Properties
*/
function sortByDependencies(sources: Source[]): Source[];
/**
* Get the default values of the options of a Property from this source
*/
function defaultPropertyOptions(source: Source): Promise<{
key: string;
displayName?: string;
default?: boolean;
description: string;
required: boolean;
type: string;
primary?: boolean;
options: {
key: string;
description?: string;
default?: boolean;
examples?: any[];
}[];
}[]>;
/**
* This method is used to bootstrap a new source which requires a Property for a mapping, when the rule doesn't yet exist.
*/
function bootstrapUniqueProperty(source: Source, params: BootstrapUniquePropertyParams): Promise<Property>;
function pendingImportsBySource(): Promise<{
counts: {
[sourceId: string]: number;
};
}>;
}