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

18 lines (16 loc) 608 B
import { BlockSchema } from '@/models/BlockSchema' import { MockFunction } from '@/services/Mocker' export const randomBlockSchema: MockFunction<BlockSchema, [Partial<BlockSchema>?]> = function(overrides = {}) { const blockType = this.create('blockType', [overrides.blockType]) return new BlockSchema({ id: this.create('string'), created: this.create('date'), updated: this.create('date'), checksum: this.create('string'), fields: this.create('schema'), blockTypeId: blockType.id, blockType, capabilities: this.create('blockSchemaCapabilities'), ...overrides, }) }