# @agreed/typed

> [![Greenkeeper badge](https://badges.greenkeeper.io/akito0107/agreed-typed.svg)](https://greenkeeper.io/)

Latest version **6.0.1** (published 2024-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @agreed/typed
pnpm add @agreed/typed
yarn add @agreed/typed
bun add @agreed/typed
```

Provides the command `agreed-typed`.

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 6.0.1 |
| Published | 2024-03-15 |
| First published | 2019-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 99.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 215 |
| Author | Akito Ito |
| Maintainers | yosuke-furukawa, maxmellon |
| Keywords | typescript, agreed |

## Links

- npm: https://www.npmjs.com/package/@agreed/typed
- Repository: https://github.com/recruit-tech/agreed
- Homepage: https://github.com/recruit-tech/agreed#readme
- Issues: https://github.com/recruit-tech/agreed/issues
- npm.io page: https://npm.io/package/@agreed/typed

## Dependencies (10)

- [doctrine](https://npm.io/package/doctrine.md) ^3.0.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [json2yaml](https://npm.io/package/json2yaml.md) ^1.1.0
- [@types/node](https://npm.io/package/@types/node.md) ^18.0.0
- [@agreed/core](https://npm.io/package/@agreed/core.md) ^6.0.0
- [@types/estree](https://npm.io/package/@types/estree.md) 1.0.0
- [@types/minimist](https://npm.io/package/@types/minimist.md) ^1.2.0
- [typescript-json-schema](https://npm.io/package/typescript-json-schema.md) ^0.55.0
- [@typescript-eslint/types](https://npm.io/package/@typescript-eslint/types.md) ^7.2.0
- [@typescript-eslint/typescript-estree](https://npm.io/package/@typescript-eslint/typescript-estree.md) ^7.2.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 6.0.1 (latest) — 2024-03-15
- 6.0.0 — 2024-03-14
- 5.3.2-alpha.0 — 2022-08-25
- 5.3.1 — 2022-08-16
- 5.3.0 — 2022-07-21
- 5.2.1 — 2021-07-06
- 5.2.0 — 2021-01-29
- 5.1.10 — 2020-09-01
- 5.1.9 — 2020-08-07
- 5.1.8 — 2020-08-03
- 5.1.7 — 2020-05-28
- 5.1.6 — 2020-05-27
- 5.1.5 — 2020-04-06
- 5.1.4 — 2020-04-06
- 5.1.3 — 2020-03-30
- … 14 more at https://npm.io/package/@agreed/typed/versions

## README

# agreed-typed

[![Greenkeeper badge](https://badges.greenkeeper.io/akito0107/agreed-typed.svg)](https://greenkeeper.io/)

- agreed api type definitions (types.ts)
- agreed.ts to swagger generator

## install
```shell
$ npm install -g agreed-typed
```

## usage
```shell
$ agreed-typed --help
Usage: agreed-typed [subcommand] [options]
Subcommands:
  gen-swagger                        Generate swagger file.
Options:
  --help                             Shows the usage and exits.
  --version                          Shows version number and exits.
Examples:
  agreed-typed gen-swagger --path ./agreed.ts
```

### gen-swagger
```shell
$ agreed-typed gen-swagger --help
Usage: agreed-typed gen-swagger [options]
  Options:
    --path                             Agreed file path (required)
    --title                            swagger title
    --description                      swagger description
    --version                          document version
    --depth                            aggregate depth (default = 2)
    --dry-run                          dry-run mode (outputs on stdout)
    --output                           output filename (default schema.json)
    --host                             swagger host (default localhost:3030)
    --format                           file format [json|yaml] (default json)
    --help                             show help
  Examples:
    agreed-typed gen-swagger --path ./agreed.ts --output schema # output file = schema.json
    agreed-typed gen-swagger --path ./agreed.ts --output schema --format yaml #  output file = schema.yaml
```

## Annotations
### Validations
http://json-schema.org/latest/json-schema-validation.html

- multipleOf
- maximum
- exclusiveMaximum
- minimum
- exclusiveMinimum
- maxLength
- minLength
- pattern
- maxItems
- minItems
- uniqueItems
- maxProperties
- minProperties
- additionalProperties
- enum
- type
- examples
- ignore
- description
- format
- default
- $ref
- id

## License
This project is licensed under the Apache License 2.0 License - see the [LICENSE](LICENSE) file for details

---
_Source: https://npm.io/package/@agreed/typed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
