@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_.
25 lines (23 loc) • 819 B
text/typescript
import { kebabCase } from '@prefecthq/prefect-design'
import { CollectionItem } from '@/models'
import { MockFunction } from '@/services/Mocker'
export const randomCollectionItem: MockFunction<CollectionItem, [Partial<CollectionItem>?]> = function(overrides) {
const name = this.create('runName')
return {
name,
collectionType: 'flow',
category: this.create('noun'),
description: this.create('sentence'),
returns: this.create('string'),
examples: this.createMany('paragraph', 1),
documentationUrl: this.create('string'),
entrypoint: this.create('string'),
installCommand: this.create('string'),
logoUrl: this.create('image'),
path: this.create('string'),
repositoryUrl: this.create('string'),
slug: kebabCase(name),
parameters: null,
...overrides,
}
}