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_.

14 lines (12 loc) 604 B
import { BlockDocumentUpdateRequest } from '@/models/api/BlockDocumentUpdateRequest' import { BlockDocumentUpdate } from '@/models/BlockDocumentUpdate' import { MapFunction } from '@/services/Mapper' export const mapBlockDocumentUpdateToBlockDocumentUpdateRequest: MapFunction<BlockDocumentUpdate, BlockDocumentUpdateRequest> = function(source) { const { blockSchema, data: values, mergeExistingData } = source const schema = blockSchema.fields const data = this.map('SchemaValues', { values, schema }, 'SchemaValuesRequest') return { data, merge_existing_data: mergeExistingData, } }