n8n
Version:
n8n Workflow Automation Tool
35 lines (34 loc) • 2.33 kB
TypeScript
import type { TagImportPlan } from '../entities/tag/tag.types';
import type { VariableApplyResult, VariableImportPlan } from '../entities/variable/variable.types';
import type { PersistedWorkflowOutcome, PreparedWorkflow } from '../entities/workflow/workflow-import.types';
import type { PackagePublishingResults } from '../entities/workflow/workflow-publisher';
import type { ImportBindingMap, ImportCredentialSummary, ImportedFolderSummary, ImportedProjectSummary, ImportedWorkflowSummary, ImportPackageSummary, ImportResult, ImportTagSummary, ImportVariableSummary, PackageImportBindings } from '../n8n-packages.types';
import type { PackageManifest } from '../spec/manifest.schema';
import type { PackageCredentialRequirement } from '../spec/requirements.schema';
export declare function toPackageSummary(manifest: PackageManifest): ImportPackageSummary;
export declare function toImportedWorkflowSummaries(outcomes: PersistedWorkflowOutcome[], projectId: string, published: PackagePublishingResults): ImportedWorkflowSummary[];
export declare function buildImportResult(input: {
package: ImportPackageSummary;
workflows: ImportedWorkflowSummary[];
folders: ImportedFolderSummary[];
projects: ImportedProjectSummary[];
bindings: PackageImportBindings;
credentials: ImportCredentialSummary;
variables: ImportVariableSummary;
tags: ImportTagSummary;
}): ImportResult;
export declare function reconcileVariableSummary(input: {
matched: Iterable<string>;
missing: Iterable<string>;
created: Iterable<string>;
stubbed: Iterable<string>;
skipped: Iterable<string>;
updated: Iterable<string>;
}): ImportVariableSummary;
export declare function toVariableSummary(plan: VariableImportPlan, result: VariableApplyResult): ImportVariableSummary;
export declare function toTagSummary(plan: TagImportPlan): ImportTagSummary;
export declare function unionTagSummaries(summaries: ImportTagSummary[]): ImportTagSummary;
export declare function identifyRequirements<T extends {
usedByWorkflows: string[];
}>(requirements: T[] | undefined, workflows: PreparedWorkflow[]): T[] | undefined;
export declare function scopeCredentialBindingsToRequirements(bindings: ImportBindingMap | undefined, requirements: PackageCredentialRequirement[] | undefined): ImportBindingMap | undefined;