npm package: @flowcore/cli-plugin-types
Description: A plugin for generating types/interfaces from sampling an existing event stream
Author: flowcore-platform
Latest version: 1.1.3

Flowcore CLI Plugin - Types
=================

A plugin for generating types/interfaces from sampling an existing event stream

[![Version](https://img.shields.io/npm/v/@flowcore/flowcore-cli-plugin-scenario)](https://npmjs.org/package/@flowcore/flowcore-cli-plugin-scenario)
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Build and Release](https://github.com/@flowcore/flowcore-cli-plugin-scenario/actions/workflows/build.yml/badge.svg)](https://github.com/@flowcore/flowcore-cli-plugin-scenario/actions/workflows/build.yml)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @flowcore/cli-plugin-types
$ types COMMAND
running command...
$ types (--version)
@flowcore/cli-plugin-types/2.13.0 darwin-arm64 node-v20.15.0
$ types --help [COMMAND]
USAGE
  $ types COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`types types STREAM`](#types-types-stream)
* [`types types typescript STREAM`](#types-types-typescript-stream)

## `types types STREAM`

Get json schema from event type

```
USAGE
  $ types types STREAM --directory <value> [--profile <value>] [--first <value>] [--last <value>] [--random
    <value>] [--all]

ARGUMENTS
  STREAM  stream url to connect to

FLAGS
  --all                Sample all events
  --directory=<value>  (required) Directory to write the types to
  --first=<value>      Sample from the first messages
  --last=<value>       Sample from the latest messages
  --profile=<value>    Specify the configuration profile to use
  --random=<value>     Sample a number of random events

DESCRIPTION
  Get json schema from event type

EXAMPLES
  $ types types "https://flowcore.io/<org>/<data core>/*" --last 10

  $ types types "https://flowcore.io/<org>/<data core>/*" --first 10

  $ types types "https://flowcore.io/<org>/<data core>/*" --random 10

  $ types types "https://flowcore.io/<org>/<data core>/*" --all
```

_See code: [src/commands/types.ts](https://github.com/flowcore-io/cli-plugin-types/blob/v2.13.0/src/commands/types.ts)_

## `types types typescript STREAM`

Get typescript types from event type

```
USAGE
  $ types types typescript STREAM --directory <value> [--profile <value>] [--first <value>] [--last <value>] [--random
    <value>] [--all]

ARGUMENTS
  STREAM  stream url to connect to

FLAGS
  --all                Sample all events
  --directory=<value>  (required) Directory to write the types to
  --first=<value>      Sample from the first messages
  --last=<value>       Sample from the latest messages
  --profile=<value>    Specify the configuration profile to use
  --random=<value>     Sample a number of random events

DESCRIPTION
  Get typescript types from event type

EXAMPLES
  $ types types typescript "https://flowcore.io/<org>/<data core>/*" --last 10

  $ types types typescript "https://flowcore.io/<org>/<data core>/*" --first 10

  $ types types typescript "https://flowcore.io/<org>/<data core>/*" --random 10

  $ types types typescript "https://flowcore.io/<org>/<data core>/*" --all
```

_See code: [src/commands/types/typescript.ts](https://github.com/flowcore-io/cli-plugin-types/blob/v2.13.0/src/commands/types/typescript.ts)_
<!-- commandsstop -->