import Api from '../api.js';
import { InspectScope } from '../apps/inspect-scope.js';
export declare const WORKFLOW_STATUSES: string[];
export declare const WORKFLOW_INSTANCE_ID_PATTERN: RegExp;
export interface WorkflowManifestRecord {
    app_id?: string;
    enabled?: boolean;
    id?: string;
    kind?: string;
    name?: string;
    summary?: WorkflowSummary;
    trigger?: string;
    workflow_name?: string;
}
export interface WorkflowSummary {
    active_instances?: number;
    completed_recent?: number;
    failed_instances?: number;
    last_failure?: WorkflowFailure;
    last_create_failure?: WorkflowFailure;
    last_runtime_failure?: WorkflowFailure;
    terminated_recent?: number;
}
export interface WorkflowFailure {
    code?: string;
    date?: string;
    message?: string;
}
export interface WorkflowRunRecord {
    app_id?: string;
    cf_instance_id?: string;
    date_completed?: string;
    date_created?: string;
    date_failed?: string;
    date_started?: string;
    date_terminated?: string;
    error?: {
        code?: string;
        message?: string;
    };
    failure_phase?: string;
    status?: string;
    trigger?: string;
    workflow_id?: string;
    workflow_instance_id?: string;
    workflow_name?: string;
}
export interface WorkflowOperationRef {
    appId: string;
    appSlug?: string;
    query: {
        workflow_id?: string;
        workflow_name?: string;
    };
}
export declare function resolveWorkflowOperationRef(api: Api, workflow: string, flags: {
    app?: string;
}): Promise<WorkflowOperationRef>;
export declare function resolveWorkflowScope(api: Api, flags: {
    app?: string;
}): Promise<InspectScope>;
export declare function isWorkflowInstanceIdentifier(value: string): boolean;
export declare function workflowDisplayName(record: WorkflowManifestRecord): string;
export declare function workflowListMeta(record: WorkflowManifestRecord): string;
export declare function workflowRunDate(run: WorkflowRunRecord): string | undefined;
export declare function workflowRunMeta(run: WorkflowRunRecord): string;
export declare function formatWorkflowRelativeTime(value: string, now?: number): string;
export declare function redactWorkflowPayload(value: unknown): unknown;
