@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_.
13 lines (12 loc) • 609 B
text/typescript
import { DeploymentScheduleUpdateRequest } from '@/models/api/DeploymentScheduleUpdateRequest'
import { DeploymentScheduleUpdate } from '@/models/DeploymentScheduleUpdate'
import { MapFunction } from '@/services/Mapper'
export const mapDeploymentScheduleUpdateToDeploymentScheduleUpdateRequest: MapFunction<DeploymentScheduleUpdate, DeploymentScheduleUpdateRequest> = function(source) {
return {
slug: source.slug ?? null,
active: source.active,
schedule: this.map('Schedule', source.schedule, 'ScheduleRequest'),
job_variables: source.jobVariables,
parameters: source.parameters,
}
}