UNPKG

@prefecthq/prefect-ui-library

Version:

This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.

19 lines (17 loc) 863 B
import { WorkerScheduledFlowRun, WorkerScheduledFlowRunResponse, WorkerScheduledFlowRuns, WorkerScheduledFlowRunsRequest } from '@/models' import { MapFunction } from '@/services' export const mapWorkerScheduledFlowRunResponseToWorkerScheduledFlowRun: MapFunction<WorkerScheduledFlowRunResponse, WorkerScheduledFlowRun> = function(source) { return { workPoolId: source.work_pool_id, workPoolQueueId: source.work_pool_queue_id, flowRun: this.map('FlowRunResponse', source.flow_run, 'FlowRun'), } } export const mapWorkerScheduledFlowRunsToWorkerScheduledFlowRunsRequest: MapFunction<WorkerScheduledFlowRuns, WorkerScheduledFlowRunsRequest> = function(source) { return { work_pool_queue_names: source.workPoolQueueNames, scheduled_before: source.scheduledBefore, scheduled_after: source.scheduledAfter, limit: source.limit, } }