import { Message } from '@cumulus/types'; declare type MessageWithOptionalWorkflowInfo = Message.CumulusMessage & { cumulus_meta: { workflow_start_time?: number; workflow_stop_time?: number; }; meta: { status?: Message.WorkflowStatus; workflow_tasks?: object; }; }; /** * Get the status of a workflow message, if any. * * @param {MessageWithOptionalStatus} message - A workflow message object * @returns {Message.WorkflowStatus|undefined} The workflow status * * @alias module:workflows */ export declare const getMetaStatus: (message: MessageWithOptionalWorkflowInfo) => Message.WorkflowStatus | undefined; /** * Get the workflow tasks in a workflow message, if any. * * @param {MessageWithOptionalWorkflowInfo} message - A workflow message object * @returns {Object|undefined} A map of the workflow tasks * * @alias module:workflows */ export declare const getMessageWorkflowTasks: (message: MessageWithOptionalWorkflowInfo) => object | undefined; /** * Get the workflow start time, if any. * * @param {MessageWithOptionalWorkflowInfo} message - A workflow message object * @returns {number|undefined} The workflow start time, in milliseconds * * @alias module:workflows */ export declare const getMessageWorkflowStartTime: (message: MessageWithOptionalWorkflowInfo) => number; /** * Get the workflow stop time, if any. * * @param {MessageWithOptionalWorkflowInfo} message - A workflow message object * @returns {number|undefined} The workflow stop time, in milliseconds * * @alias module:workflows */ export declare const getMessageWorkflowStopTime: (message: MessageWithOptionalWorkflowInfo) => number | undefined; /** * Get the workflow name, if any. * * @param {Message.CumulusMessage} message - A workflow message object * @returns {string|undefined} The workflow name * * @alias module:workflows */ export declare const getMessageWorkflowName: (message: Message.CumulusMessage) => string | undefined; /** * Get the workflow duration. * * @param {number} startTime - Workflow start time (as timestamp in ms) * @param {number} [stopTime] - Time to use for measuring duration (as timestamp in ms) * @returns {number} The workflow duration (in seconds) * * @alias module:workflows */ export declare const getWorkflowDuration: (startTime: number, stopTime?: number) => number; export {}; //# sourceMappingURL=workflows.d.ts.map