https://github.com/deckdom/elastic-types
TypeScript Typings for ElasticSearch
https://github.com/deckdom/elastic-types
elasticsearch typescript typescript-definitions
Last synced: about 1 year ago
JSON representation
TypeScript Typings for ElasticSearch
- Host: GitHub
- URL: https://github.com/deckdom/elastic-types
- Owner: deckdom
- License: mit
- Created: 2019-10-07T17:37:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-13T15:54:28.000Z (over 4 years ago)
- Last Synced: 2024-04-26T19:03:06.433Z (about 2 years ago)
- Topics: elasticsearch, typescript, typescript-definitions
- Language: TypeScript
- Size: 112 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/SiNEXiST/elastic-types/actions)
[](https://www.npmjs.com/package/elastic-types)
[](https://github.com/sinexist/elastic-types/blob/master/LICENSE)
# ElasticSearch Types
TypeScript Typings for all Queries, Aggregations, Requests and Responses
to easily work with it, without the guess work!
## Installation
Simply install it as a dev-dependency with your preferred package-manager:
```sh
npm i -D elastic-types
yarn add -D elastic-types
```
Then import the Types you need and easily stick your queries together!
```typescript
import { TermQuery } from 'elastic-types/queries';
const validQuery: TermQuery = {
term: {
value: 'some cool text',
}
};
const invalidQuery: TermQuery = {
term: {
value: ['arrays', 'are', 'invalid']
}
};
```